Permalink
Browse files

redirect grid updates for context support

  • Loading branch information...
1 parent a91272d commit 38f2e8fb01f9a59c7eae3f4b632efa5da1002823 @netProphET committed Nov 22, 2011
Showing with 28 additions and 14 deletions.
  1. +28 −14 assets/components/redirector/js/mgr/widgets/redirects.grid.js
@@ -12,30 +12,36 @@ Redi.grid.Redirects = function(config) {
,url: Redi.config.connector_url
,baseParams: { action: 'mgr/redirect/getList' }
,save_action: 'mgr/redirect/updateFromGrid'
- ,fields: ['id','pattern','target','active','menu']
+ ,fields: ['id','context_key','pattern','target','hits','active','menu']
,paging: true
,autosave: true
,remoteSort: true
,anchor: '97%'
,autoExpandColumn: 'name'
,plugins: [cb]
,columns: [{
+ header: _('redirector.context')
+ ,dataIndex: 'context_key'
+ ,sortable: true
+ ,width: 40
+ ,editor: { xtype: 'textfield' }
+ },{
header: _('redirector.pattern')
,dataIndex: 'pattern'
,sortable: true
- ,width: 180
+ ,width: 160
,editor: { xtype: 'textfield' }
},{
header: _('redirector.target')
,dataIndex: 'target'
,sortable: false
- ,width: 180
+ ,width: 160
,editor: { xtype: 'textfield' }
},{
header: _('redirector.hits')
,dataIndex: 'hits'
,sortable: false
- ,width: 40
+ ,width: 30
,editor: { xtype: 'textfield' }
},cb]
,tbar: [{
@@ -139,6 +145,15 @@ Redi.window.CreateRedirect = function(config) {
action: 'mgr/redirect/create'
}
,fields: [{
+ xtype: 'modx-combo-context'
+ ,fieldLabel: _('context')
+ ,description: MODx.expandHelp ? '' : _('context_desc')
+ ,hiddenName: 'context_key'
+ ,editable: false
+ ,allowBlank: true
+ ,anchor: '100%'
+ ,width: 300
+ },{
xtype: 'textfield'
,fieldLabel: _('redirector.pattern')
,name: 'pattern'
@@ -149,11 +164,6 @@ Redi.window.CreateRedirect = function(config) {
,name: 'target'
,width: 300
},{
- xtype: 'textfield'
- ,fieldLabel: _('redirector.hits')
- ,name: 'hits'
- ,width: 50
- },{
xtype: 'checkbox'
,fieldLabel: _('redirector.active')
,name: 'active'
@@ -179,6 +189,15 @@ Redi.window.UpdateRedirect = function(config) {
xtype: 'hidden'
,name: 'id'
},{
+ xtype: 'modx-combo-context'
+ ,fieldLabel: _('context')
+ ,description: MODx.expandHelp ? '' : _('context_desc')
+ ,hiddenName: 'context_key'
+ ,editable: false
+ ,allowBlank: true
+ ,anchor: '100%'
+ ,width: 300
+ },{
xtype: 'textfield'
,fieldLabel: _('redirector.pattern')
,name: 'pattern'
@@ -189,11 +208,6 @@ Redi.window.UpdateRedirect = function(config) {
,name: 'target'
,width: 300
},{
- xtype: 'textfield'
- ,fieldLabel: _('redirector.hits')
- ,name: 'hits'
- ,width: 50
- },{
xtype: 'checkbox'
,fieldLabel: _('redirector.active')
,name: 'active'

0 comments on commit 38f2e8f

Please sign in to comment.