[pve-devel] applied: [PATCH widget-toolkit 1/1] add returnCompleteRecord to ObjectStore
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Apr 30 10:52:57 CEST 2018
applied, with follow up which renames it to the simpler
and shorter getRecord
On 4/27/18 12:28 PM, Dominik Csapak wrote:
> this can be useful when needing multiple fields
>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> data/ObjectStore.js | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/data/ObjectStore.js b/data/ObjectStore.js
> index 1e3771f..ec35cbf 100644
> --- a/data/ObjectStore.js
> +++ b/data/ObjectStore.js
> @@ -6,6 +6,16 @@
> Ext.define('Proxmox.data.ObjectStore', {
> extend: 'Proxmox.data.UpdateStore',
>
> + returnCompleteRecord: function() {
> + var me = this;
> + var record = Ext.create('Ext.data.Model');
> + me.getData().each(function(item) {
> + record.set(item.data.key, item.data.value);
> + });
> + record.commit(true);
> + return record;
> + },
> +
> constructor: function(config) {
> var me = this;
>
>
More information about the pve-devel
mailing list