commit 7466dafdbdee5c258ddb3de2195afc740415b301
parent 540ce7414803e6eb200c762961a88813d8e5758c
Author: Felicitus <felicitus@felicitus.org>
Date: Fri, 4 Sep 2015 17:03:02 +0200
Migrated triggerField to ExtJS6, added UrlTextField for the Website
Diffstat:
1 file changed, 47 insertions(+), 39 deletions(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Distributor/DistributorEditor.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/Distributor/DistributorEditor.js
@@ -1,42 +1,50 @@
Ext.define('PartKeepr.DistributorEditor', {
- extend: 'PartKeepr.Editor',
- alias: 'widget.DistributorEditor',
- items: [{
- xtype: 'textfield',
- name: 'name',
- fieldLabel: i18n("Distributor")
- },{
- xtype: 'textarea',
- name: 'address',
- fieldLabel: i18n("Address")
- },{
- xtype: 'textfield',
- name: 'url',
- fieldLabel: i18n("Website")
- },{
- xtype: 'triggerfield',
- name: 'skuurl',
- fieldLabel: i18n("SKU URL"),
- triggerCls: 'x-form-trigger-help',
- onTriggerClick: function() {
- Ext.Msg.alert(i18n("Help"), i18n("Enter the URL of the distributor's SKU URL. Use %s as a placeholder for the SKU. Example: http://de.farnell.com/product/dp/%s"));
+ extend: 'PartKeepr.Editor',
+ alias: 'widget.DistributorEditor',
+ items: [
+ {
+ xtype: 'textfield',
+ name: 'name',
+ fieldLabel: i18n("Distributor")
+ }, {
+ xtype: 'textarea',
+ name: 'address',
+ fieldLabel: i18n("Address")
+ }, {
+ xtype: 'urltextfield',
+ name: 'url',
+ fieldLabel: i18n("Website")
+ }, {
+ xtype: 'textfield',
+ name: 'skuurl',
+ fieldLabel: i18n("SKU URL"),
+ triggers: {
+ help: {
+ cls: 'x-form-trigger-help',
+ handler: function ()
+ {
+ Ext.Msg.alert(i18n("Help"), i18n(
+ "Enter the URL of the distributor's SKU URL. Use %s as a placeholder for the SKU. Example: http://de.farnell.com/product/dp/%s"));
+ }
+ }
+ },
+ }, {
+ xtype: 'textfield',
+ name: 'email',
+ fieldLabel: i18n("Email")
+ }, {
+ xtype: 'textfield',
+ name: 'phone',
+ fieldLabel: i18n("Phone")
+ }, {
+ xtype: 'textfield',
+ name: 'fax',
+ fieldLabel: i18n("Fax")
+ }, {
+ xtype: 'textarea',
+ name: 'comment',
+ fieldLabel: i18n("Comment")
}
- },{
- xtype: 'textfield',
- name: 'email',
- fieldLabel: i18n("Email")
- },{
- xtype: 'textfield',
- name: 'phone',
- fieldLabel: i18n("Phone")
- },{
- xtype: 'textfield',
- name: 'fax',
- fieldLabel: i18n("Fax")
- },{
- xtype: 'textarea',
- name: 'comment',
- fieldLabel: i18n("Comment")
- }],
- saveText: i18n("Save Distributor")
+ ],
+ saveText: i18n("Save Distributor")
});