dustin@569: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz dustin@569: * Software engineering by Intevation GmbH dustin@569: * dustin@569: * This file is Free Software under the GNU GPL (v>=3) dustin@569: * and comes with ABSOLUTELY NO WARRANTY! Check out dustin@569: * the documentation coming with IMIS-Labordaten-Application for details. dustin@569: */ dustin@569: dustin@569: /** dustin@569: * Model class for Status dustin@569: */ dustin@569: Ext.define('Lada.model.Status', { dustin@569: extend: 'Ext.data.Model', dustin@569: dustin@569: fields: [{ dustin@569: name: 'id' dustin@569: }, { dustin@702: name: 'readonly', dustin@702: type: 'boolean', dustin@702: persist: false dustin@702: }, { dustin@945: name: 'owner', dustin@965: type: 'boolean' dustin@945: }, { dustin@569: name: 'messungsId' dustin@569: }, { raimund@593: name: 'erzeuger' raimund@593: }, { dustin@945: name: 'statusStufe', dustin@988: type: 'int' dustin@569: }, { dustin@945: name: 'statusWert', dustin@956: type: 'int', dustin@956: defaultValue: 0 dustin@945: }, { dustin@945: name: 'treeModified', dustin@945: serialize: function(value) { dustin@945: if (value === '') { dustin@945: return null; dustin@945: } dustin@945: return value; dustin@945: } dustin@945: }, { dustin@945: name: 'parentModified', dustin@945: serialize: function(value) { dustin@945: if (value === '') { dustin@945: return null; dustin@945: } dustin@945: return value; dustin@945: } dustin@945: }, { dustin@945: name: 'datum', raimund@593: type: 'date', raimund@593: convert: function(v) { raimund@593: if (!v) { raimund@593: return v; raimund@593: } raimund@593: return new Date(v); dustin@970: } dustin@569: }, { dustin@945: name: 'text' dustin@569: }], dustin@569: dustin@569: idProperty: 'id', dustin@569: dustin@569: proxy: { dustin@569: type: 'rest', dustin@999: url: 'lada-server/rest/status', dustin@569: reader: { dustin@569: type: 'json', dustin@569: root: 'data' dustin@569: } dustin@569: } dustin@569: });