diff --git a/src/Resources/public/js/datatypes/tags/dynamicPermissionResource.js b/src/Resources/public/js/datatypes/tags/dynamicPermissionResource.js index 54ab91f..bfa2369 100644 --- a/src/Resources/public/js/datatypes/tags/dynamicPermissionResource.js +++ b/src/Resources/public/js/datatypes/tags/dynamicPermissionResource.js @@ -44,9 +44,9 @@ pimcore.object.tags.dynamicPermissionResource = Class.create(pimcore.object.tags name: name, //this.fieldConfig.name + '[' + name + ']', triggerAction: "all", editable: false, - fieldLabel: ts(config['label']), + fieldLabel: t(config['label']), store: store, - itemCls: "object_field", + componentCls: this.getWrapperClassNames(), width: (this.fieldConfig.labelWidth || 0) + 200 }; diff --git a/src/Resources/public/js/datatypes/tags/permissionResource.js b/src/Resources/public/js/datatypes/tags/permissionResource.js index b28d4e3..4a53bdf 100644 --- a/src/Resources/public/js/datatypes/tags/permissionResource.js +++ b/src/Resources/public/js/datatypes/tags/permissionResource.js @@ -12,49 +12,50 @@ */ -pimcore.registerNS("pimcore.object.tags.permissionResource"); -pimcore.object.tags.permissionResource = Class.create(pimcore.object.tags.select, { - - type: "permissionResource", - - initialize: function (data, fieldConfig) { - this.data = data; - this.fieldConfig = fieldConfig; - }, - - getLayoutEdit: function () { - - // generate store - var store = []; - var validValues = []; - - for (var i = 0; i < this.fieldConfig.options.length; i++) { - store.push([this.fieldConfig.options[i].value, ts(this.fieldConfig.options[i].key)]); - validValues.push(this.fieldConfig.options[i].value); - } - - var options = { - name: this.fieldConfig.name, - triggerAction: "all", - editable: false, - fieldLabel: this.fieldConfig.title, - store: store, - itemCls: "object_field", - width: this.fieldConfig.labelWidth + 200 - }; - - if (typeof this.data == "string" || typeof this.data == "number") { - if (in_array(this.data, validValues)) { - options.value = this.data; - } else { - options.value = ""; - } - } else { - options.value = ""; - } - - this.component = new Ext.form.ComboBox(options); - - return this.component; - } +pimcore.registerNS("pimcore.object.tags.permissionResource"); +pimcore.object.tags.permissionResource = Class.create(pimcore.object.tags.select, { + + type: "permissionResource", + + initialize: function (data, fieldConfig) { + this.data = data; + this.fieldConfig = fieldConfig; + }, + + getLayoutEdit: function () { + + // generate store + var store = []; + var validValues = []; + + for (var i = 0; i < this.fieldConfig.options.length; i++) { + store.push([this.fieldConfig.options[i].value, ts(this.fieldConfig.options[i].key)]); + validValues.push(this.fieldConfig.options[i].value); + } + + var options = { + name: this.fieldConfig.name, + triggerAction: "all", + editable: false, + fieldLabel: this.fieldConfig.title, + store: store, + componentCls: this.getWrapperClassNames(), + itemCls: "object_field", + width: this.fieldConfig.labelWidth + 200 + }; + + if (typeof this.data == "string" || typeof this.data == "number") { + if (in_array(this.data, validValues)) { + options.value = this.data; + } else { + options.value = ""; + } + } else { + options.value = ""; + } + + this.component = new Ext.form.ComboBox(options); + + return this.component; + } }); \ No newline at end of file