use simpleConfigForm instead of configForm

This commit is contained in:
Sebastian Sdorra
2011-02-08 20:01:54 +01:00
parent c844ecf1f1
commit b54a0cb149
3 changed files with 9 additions and 123 deletions

View File

@@ -32,8 +32,9 @@
registerConfigPanel({
xtype : 'configForm',
xtype : 'simpleConfigForm',
title : 'Bazaar Settings',
configUrl: restUrl + 'config/repositories/bzr.json',
items : [{
xtype : 'textfield',
fieldLabel : 'Bzr Binary',
@@ -53,44 +54,5 @@ registerConfigPanel({
name: 'repositoryDirectory',
fieldLabel: 'Repository directory',
allowBlank : false
}],
onSubmit: function(values){
this.el.mask('Submit ...');
Ext.Ajax.request({
url: restUrl + 'config/repositories/bzr.json',
method: 'POST',
jsonData: values,
scope: this,
disableCaching: true,
success: function(response){
this.el.unmask();
},
failure: function(){
this.el.unmask();
}
});
},
onLoad: function(el){
var tid = setTimeout( function(){ el.mask('Loading ...'); }, 100);
Ext.Ajax.request({
url: restUrl + 'config/repositories/bzr.json',
method: 'GET',
scope: this,
disableCaching: true,
success: function(response){
var obj = Ext.decode(response.responseText);
this.load(obj);
clearTimeout(tid);
el.unmask();
},
failure: function(){
el.unmask();
clearTimeout(tid);
alert('failure');
}
});
}
}]
});

View File

@@ -30,51 +30,13 @@
*/
registerConfigPanel({
xtype : 'configForm',
xtype : 'simpleConfigForm',
title : 'Git Settings',
configUrl: restUrl + 'config/repositories/git.json',
items : [{
xtype: 'textfield',
name: 'repositoryDirectory',
fieldLabel: 'Repository directory',
allowBlank : false
}],
onSubmit: function(values){
this.el.mask('Submit ...');
Ext.Ajax.request({
url: restUrl + 'config/repositories/git.json',
method: 'POST',
jsonData: values,
scope: this,
disableCaching: true,
success: function(response){
this.el.unmask();
},
failure: function(){
this.el.unmask();
}
});
},
onLoad: function(el){
var tid = setTimeout( function(){ el.mask('Loading ...'); }, 100);
Ext.Ajax.request({
url: restUrl + 'config/repositories/git.json',
method: 'GET',
scope: this,
disableCaching: true,
success: function(response){
var obj = Ext.decode(response.responseText);
this.load(obj);
clearTimeout(tid);
el.unmask();
},
failure: function(){
el.unmask();
clearTimeout(tid);
alert('failure');
}
});
}
}]
});

View File

@@ -30,51 +30,13 @@
*/
registerConfigPanel({
xtype : 'configForm',
xtype : 'simpleConfigForm',
title : 'Subversion Settings',
configUrl: restUrl + 'config/repositories/svn.json',
items : [{
xtype: 'textfield',
name: 'repositoryDirectory',
fieldLabel: 'Repository directory',
allowBlank : false
}],
onSubmit: function(values){
this.el.mask('Submit ...');
Ext.Ajax.request({
url: restUrl + 'config/repositories/svn.json',
method: 'POST',
jsonData: values,
scope: this,
disableCaching: true,
success: function(response){
this.el.unmask();
},
failure: function(){
this.el.unmask();
}
});
},
onLoad: function(el){
var tid = setTimeout( function(){ el.mask('Loading ...'); }, 100);
Ext.Ajax.request({
url: restUrl + 'config/repositories/svn.json',
method: 'GET',
scope: this,
disableCaching: true,
success: function(response){
var obj = Ext.decode(response.responseText);
this.load(obj);
clearTimeout(tid);
el.unmask();
},
failure: function(){
el.unmask();
clearTimeout(tid);
alert('failure');
}
});
}
}]
});