Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\js\edeal\models\possibleValue.js
Models.PossibleValue = Models.Base.extend({ classType: "MODELS.POSSIBLEVALUE", defaults: { // id: "", value: "", label: "", selected: false, index: -1 }, initialize: function() { if (!this.get("label")) { this.set("label", this.get("value")); } else { this.set("label", decodeURIComponent(this.get("label")).replace( new RegExp( "\\+", "g" ), " " )); } }, clear: function() { this.set("value", ""); this.set("label", ""); this.set("selected", false); this.set("index", -1); } }); Models.PossibleValueCollection = Models.BaseCollection.extend({ model: Models.PossibleValue, initFromObjectArray: function(objArr) { for(var i=0;i<objArr.length;i++) { objArr[i].id=i; this.add(new Models.PossibleValue(objArr[i])); }; }, setIndex: function() { var i=0; this.each(function(aPossibleValue) { aPossibleValue.set("index", i); i++; }); }, setAllValuesUnSelected: function() { this.each(function(aPossibleValue) { aPossibleValue.set("selected", false); }); }, setValueSelected: function(aValue) { this.each(function(aPossibleValue) { if (aPossibleValue.get("value") == aValue) { aPossibleValue.set("selected", true); } else { aPossibleValue.set("selected", false); } }); }, addValue: function(oModelValue) { if (!oModelValue) { oModelValue = new Models.PossibleValue(); } this.add(oModelValue); }, getJSONObject : function () { var toReturn = { possibleValues: this.toJSON() } return toReturn; } });
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de