Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // серия
- var series_comboBox = new Ext.form.ComboBox({
- value : options['series_id'],
- hiddenName : 'series_id',
- hidden : false,
- store : new Ext.data.JsonStore({
- url:'modules/router.php',
- baseParams:{
- action:'content/manufacturers.productSeries',
- manufacturer_id: options['manufacturers_id'],
- cat_id: options['categories_id']
- },
- sortInfo:{ field:'title', direction:'ASC' },
- root:'records',
- fields:[
- { type:'int', name:'id' },
- { type:'string', name:'title' }
- ],
- autoLoad: true
- }),
- fieldLabel : 'Серия',
- displayField : 'title',
- valueField : 'id',
- triggerAction : 'all',
- mode : 'remote',
- editable : User.getPerm('content', 'addproductseries'),
- width : 165,
- listWidth : 187,
- emptyText : 'укажите серию'
- }).on('beforeshow', function(el)
- {
- console.log("here");
- Ext.Ajax.request({
- url : '/modules/router.php',
- async : false,
- params : {
- action : 'content/manufacturers.isEnabled',
- manufacturer_id: options['manufacturers_id'],
- cat_id: options['categories_id']
- },
- success : function (res) {
- var result = Ext.decode(res.responseText);
- if (result.success) {
- el.hidden = false;
- } else {
- el.hidden = true;
- }
- },
- failure : function (res) {
- console.log(res);
- el.hidden = true;
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment