mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 02:31:14 +01:00
use tabs for repository details
This commit is contained in:
@@ -50,10 +50,13 @@ Sonia.repository.isOwner = function(repository){
|
|||||||
return admin || repository.permissions != null;
|
return admin || repository.permissions != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sonia.repository.setEditPanel = function(panel){
|
Sonia.repository.setEditPanel = function(panels){
|
||||||
var editPanel = Ext.getCmp('repositoryEditPanel');
|
var editPanel = Ext.getCmp('repositoryEditPanel');
|
||||||
editPanel.removeAll();
|
editPanel.removeAll();
|
||||||
|
Ext.each(panels, function(panel){
|
||||||
editPanel.add(panel);
|
editPanel.add(panel);
|
||||||
|
});
|
||||||
|
editPanel.setActiveTab(0);
|
||||||
editPanel.doLayout();
|
editPanel.doLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,6 +71,7 @@ Sonia.repository.DefaultPanel = {
|
|||||||
title: 'Repository Form',
|
title: 'Repository Form',
|
||||||
padding: 5,
|
padding: 5,
|
||||||
xtype: 'panel',
|
xtype: 'panel',
|
||||||
|
bodyCssClass: 'x-panel-mc',
|
||||||
html: 'Add or select an Repository'
|
html: 'Add or select an Repository'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +80,7 @@ Sonia.repository.NoPermissionPanel = {
|
|||||||
title: 'Repository Form',
|
title: 'Repository Form',
|
||||||
padding: 5,
|
padding: 5,
|
||||||
xtype: 'panel',
|
xtype: 'panel',
|
||||||
|
bodyCssClass: 'x-panel-mc',
|
||||||
html: 'No permission to modify this repository'
|
html: 'No permission to modify this repository'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,15 +144,13 @@ Sonia.repository.Grid = Ext.extend(Sonia.rest.Grid, {
|
|||||||
console.debug( item.name + ' selected' );
|
console.debug( item.name + ' selected' );
|
||||||
}
|
}
|
||||||
|
|
||||||
var panel = null;
|
var panels = null;
|
||||||
|
|
||||||
if ( Sonia.repository.isOwner(item) ){
|
if ( Sonia.repository.isOwner(item) ){
|
||||||
Ext.getCmp('repoRmButton').setDisabled(false);
|
Ext.getCmp('repoRmButton').setDisabled(false);
|
||||||
panel = new Sonia.repository.FormPanel({
|
panels = [{
|
||||||
item: item,
|
item: item,
|
||||||
region: 'south',
|
xtype: 'repositoryPropertiesForm',
|
||||||
title: this.formTitleText,
|
|
||||||
padding: 5,
|
|
||||||
onUpdate: {
|
onUpdate: {
|
||||||
fn: this.reload,
|
fn: this.reload,
|
||||||
scope: this
|
scope: this
|
||||||
@@ -156,12 +159,23 @@ Sonia.repository.Grid = Ext.extend(Sonia.rest.Grid, {
|
|||||||
fn: this.reload,
|
fn: this.reload,
|
||||||
scope: this
|
scope: this
|
||||||
}
|
}
|
||||||
});
|
},{
|
||||||
|
item: item,
|
||||||
|
xtype: 'repositoryPermissionsForm',
|
||||||
|
onUpdate: {
|
||||||
|
fn: this.reload,
|
||||||
|
scope: this
|
||||||
|
},
|
||||||
|
onCreate: {
|
||||||
|
fn: this.reload,
|
||||||
|
scope: this
|
||||||
|
}
|
||||||
|
}];
|
||||||
} else {
|
} else {
|
||||||
Ext.getCmp('repoRmButton').setDisabled(true);
|
Ext.getCmp('repoRmButton').setDisabled(true);
|
||||||
panel = Sonia.repository.NoPermissionPanel;
|
panels = Sonia.repository.NoPermissionPanel;
|
||||||
}
|
}
|
||||||
Sonia.repository.setEditPanel(panel);
|
Sonia.repository.setEditPanel(panels);
|
||||||
},
|
},
|
||||||
|
|
||||||
renderRepositoryType: function(repositoryType){
|
renderRepositoryType: function(repositoryType){
|
||||||
@@ -202,12 +216,180 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
|||||||
Permissions explenation:<br /><b>READ</b> = read<br /><b>WRITE</b> = read and write<br />\n\
|
Permissions explenation:<br /><b>READ</b> = read<br /><b>WRITE</b> = read and write<br />\n\
|
||||||
<b>OWNER</b> = read, write and also the ability to manage the properties and permissions',
|
<b>OWNER</b> = read, write and also the ability to manage the properties and permissions',
|
||||||
|
|
||||||
|
initComponent: function(){
|
||||||
|
Sonia.repository.FormPanel.superclass.initComponent.apply(this, arguments);
|
||||||
|
},
|
||||||
|
|
||||||
|
update: function(item){
|
||||||
|
item = Ext.apply( this.item, item );
|
||||||
|
if ( debug ){
|
||||||
|
console.debug( 'update repository: ' + item.name );
|
||||||
|
}
|
||||||
|
var url = restUrl + 'repositories/' + item.id + '.json';
|
||||||
|
var el = this.el;
|
||||||
|
var tid = setTimeout( function(){el.mask('Loading ...');}, 100);
|
||||||
|
|
||||||
|
// this.updatePermissions(item);
|
||||||
|
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: url,
|
||||||
|
jsonData: item,
|
||||||
|
method: 'PUT',
|
||||||
|
scope: this,
|
||||||
|
success: function(){
|
||||||
|
if ( debug ){
|
||||||
|
console.debug('update success');
|
||||||
|
}
|
||||||
|
// this.clearModifications();
|
||||||
|
clearTimeout(tid);
|
||||||
|
el.unmask();
|
||||||
|
this.execCallback(this.onUpdate, item);
|
||||||
|
},
|
||||||
|
failure: function(){
|
||||||
|
clearTimeout(tid);
|
||||||
|
el.unmask();
|
||||||
|
Ext.MessageBox.show({
|
||||||
|
title: this.errorTitleText,
|
||||||
|
msg: this.updateErrorMsgText,
|
||||||
|
buttons: Ext.MessageBox.OK,
|
||||||
|
icon:Ext.MessageBox.ERROR
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
create: function(item){
|
||||||
|
if ( debug ){
|
||||||
|
console.debug( 'create repository: ' + item.name );
|
||||||
|
}
|
||||||
|
var url = restUrl + 'repositories.json';
|
||||||
|
var el = this.el;
|
||||||
|
var tid = setTimeout( function(){el.mask('Loading ...');}, 100);
|
||||||
|
|
||||||
|
// this.updatePermissions(item);
|
||||||
|
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: url,
|
||||||
|
jsonData: item,
|
||||||
|
method: 'POST',
|
||||||
|
scope: this,
|
||||||
|
success: function(){
|
||||||
|
if ( debug ){
|
||||||
|
console.debug('create success');
|
||||||
|
}
|
||||||
|
// this.permissionStore.removeAll();
|
||||||
|
this.getForm().reset();
|
||||||
|
clearTimeout(tid);
|
||||||
|
el.unmask();
|
||||||
|
this.execCallback(this.onCreate, item);
|
||||||
|
},
|
||||||
|
failure: function(){
|
||||||
|
clearTimeout(tid);
|
||||||
|
el.unmask();
|
||||||
|
Ext.MessageBox.show({
|
||||||
|
title: this.errorTitleText,
|
||||||
|
msg: this.createErrorMsgText,
|
||||||
|
buttons: Ext.MessageBox.OK,
|
||||||
|
icon:Ext.MessageBox.ERROR
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
cancel: function(){
|
||||||
|
if ( debug ){
|
||||||
|
console.debug( 'cancel form' );
|
||||||
|
}
|
||||||
|
Sonia.repository.setEditPanel( Sonia.repository.DefaultPanel );
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// register xtype
|
||||||
|
Ext.reg('repositoryForm', Sonia.repository.FormPanel);
|
||||||
|
|
||||||
|
|
||||||
|
Sonia.repository.PropertiesFormPanel = Ext.extend(Sonia.repository.FormPanel, {
|
||||||
|
|
||||||
|
initComponent: function(){
|
||||||
|
var update = this.item != null;
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
title: this.formTitleText,
|
||||||
|
items: [{
|
||||||
|
id: 'repositoryName',
|
||||||
|
fieldLabel: this.nameText,
|
||||||
|
name: 'name',
|
||||||
|
readOnly: update,
|
||||||
|
allowBlank: false,
|
||||||
|
helpText: this.nameHelpText
|
||||||
|
},{
|
||||||
|
fieldLabel: this.typeText,
|
||||||
|
name: 'type',
|
||||||
|
xtype: 'combo',
|
||||||
|
readOnly: update,
|
||||||
|
hiddenName : 'type',
|
||||||
|
typeAhead: true,
|
||||||
|
triggerAction: 'all',
|
||||||
|
lazyRender: true,
|
||||||
|
mode: 'local',
|
||||||
|
editable: false,
|
||||||
|
store: repositoryTypeStore,
|
||||||
|
valueField: 'name',
|
||||||
|
displayField: 'displayName',
|
||||||
|
allowBlank: false,
|
||||||
|
helpText: this.typeHelpText
|
||||||
|
},{
|
||||||
|
fieldLabel: this.contactText,
|
||||||
|
name: 'contact',
|
||||||
|
vtype: 'email',
|
||||||
|
helpText: this.contactHelpText
|
||||||
|
},{
|
||||||
|
fieldLabel: this.descriptionText,
|
||||||
|
name: 'description',
|
||||||
|
xtype: 'textarea',
|
||||||
|
helpText: this.descriptionHelpText
|
||||||
|
},{
|
||||||
|
fieldLabel: this.publicText,
|
||||||
|
name: 'public',
|
||||||
|
xtype: 'checkbox',
|
||||||
|
helpText: this.publicHelpText
|
||||||
|
},
|
||||||
|
// TODO remove
|
||||||
|
{
|
||||||
|
fieldLabel: 'ChangesetViewer',
|
||||||
|
text: 'ChangesetViewer',
|
||||||
|
xtype: 'button',
|
||||||
|
scope: this,
|
||||||
|
handler: function(){
|
||||||
|
var changesetViewer = {
|
||||||
|
id: this.item.id + '-changesetViewer',
|
||||||
|
title: 'ChangesetViewer ' + this.item.name,
|
||||||
|
repository: this.item,
|
||||||
|
xtype: 'repositoryChangesetViewerPanel',
|
||||||
|
closable: true,
|
||||||
|
autoScroll: true
|
||||||
|
}
|
||||||
|
main.addTab(changesetViewer);
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
|
||||||
|
Ext.apply(this, Ext.apply(this.initialConfig, config));
|
||||||
|
Sonia.repository.PropertiesFormPanel.superclass.initComponent.apply(this, arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
// register xtype
|
||||||
|
Ext.reg('repositoryPropertiesForm', Sonia.repository.PropertiesFormPanel);
|
||||||
|
|
||||||
|
|
||||||
|
Sonia.repository.PermissionFormPanel = Ext.extend(Sonia.repository.FormPanel, {
|
||||||
|
|
||||||
permissionStore: null,
|
permissionStore: null,
|
||||||
|
|
||||||
initComponent: function(){
|
initComponent: function(){
|
||||||
|
|
||||||
update = this.item != null;
|
|
||||||
|
|
||||||
var permissionStore = new Ext.data.JsonStore({
|
var permissionStore = new Ext.data.JsonStore({
|
||||||
root: 'permissions',
|
root: 'permissions',
|
||||||
fields: [
|
fields: [
|
||||||
@@ -290,7 +472,7 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if ( update ){
|
if ( this.item != null ){
|
||||||
if ( this.item.permissions == null ){
|
if ( this.item.permissions == null ){
|
||||||
this.item.permissions = [];
|
this.item.permissions = [];
|
||||||
}
|
}
|
||||||
@@ -302,76 +484,9 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
|||||||
});
|
});
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
|
// TODO i18n
|
||||||
|
title: 'Permissions',
|
||||||
items:[{
|
items:[{
|
||||||
xtype : 'fieldset',
|
|
||||||
checkboxToggle : false,
|
|
||||||
title : this.formTitleText,
|
|
||||||
collapsible : true,
|
|
||||||
autoHeight : true,
|
|
||||||
autoWidth: true,
|
|
||||||
autoScroll: true,
|
|
||||||
defaults: {width: 240},
|
|
||||||
defaultType: 'textfield',
|
|
||||||
buttonAlign: 'center',
|
|
||||||
items: [{
|
|
||||||
id: 'repositoryName',
|
|
||||||
fieldLabel: this.nameText,
|
|
||||||
name: 'name',
|
|
||||||
readOnly: update,
|
|
||||||
allowBlank: false,
|
|
||||||
helpText: this.nameHelpText
|
|
||||||
},{
|
|
||||||
fieldLabel: this.typeText,
|
|
||||||
name: 'type',
|
|
||||||
xtype: 'combo',
|
|
||||||
readOnly: update,
|
|
||||||
hiddenName : 'type',
|
|
||||||
typeAhead: true,
|
|
||||||
triggerAction: 'all',
|
|
||||||
lazyRender: true,
|
|
||||||
mode: 'local',
|
|
||||||
editable: false,
|
|
||||||
store: repositoryTypeStore,
|
|
||||||
valueField: 'name',
|
|
||||||
displayField: 'displayName',
|
|
||||||
allowBlank: false,
|
|
||||||
helpText: this.typeHelpText
|
|
||||||
},{
|
|
||||||
fieldLabel: this.contactText,
|
|
||||||
name: 'contact',
|
|
||||||
vtype: 'email',
|
|
||||||
helpText: this.contactHelpText
|
|
||||||
},{
|
|
||||||
fieldLabel: this.descriptionText,
|
|
||||||
name: 'description',
|
|
||||||
xtype: 'textarea',
|
|
||||||
helpText: this.descriptionHelpText
|
|
||||||
},{
|
|
||||||
fieldLabel: this.publicText,
|
|
||||||
name: 'public',
|
|
||||||
xtype: 'checkbox',
|
|
||||||
helpText: this.publicHelpText
|
|
||||||
},
|
|
||||||
// TODO remove
|
|
||||||
{
|
|
||||||
fieldLabel: 'ChangesetViewer',
|
|
||||||
text: 'ChangesetViewer',
|
|
||||||
xtype: 'button',
|
|
||||||
scope: this,
|
|
||||||
handler: function(){
|
|
||||||
var changesetViewer = {
|
|
||||||
id: this.item.id + '-changesetViewer',
|
|
||||||
title: 'ChangesetViewer ' + this.item.name,
|
|
||||||
repository: this.item,
|
|
||||||
xtype: 'repositoryChangesetViewerPanel',
|
|
||||||
closable: true,
|
|
||||||
autoScroll: true
|
|
||||||
}
|
|
||||||
main.addTab(changesetViewer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},{
|
|
||||||
id: 'permissionGrid',
|
id: 'permissionGrid',
|
||||||
xtype: 'editorgrid',
|
xtype: 'editorgrid',
|
||||||
title: this.permissionsText,
|
title: this.permissionsText,
|
||||||
@@ -423,12 +538,12 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
|||||||
};
|
};
|
||||||
|
|
||||||
Ext.apply(this, Ext.apply(this.initialConfig, config));
|
Ext.apply(this, Ext.apply(this.initialConfig, config));
|
||||||
Sonia.repository.FormPanel.superclass.initComponent.apply(this, arguments);
|
Sonia.repository.PermissionFormPanel.superclass.initComponent.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
afterRender: function(){
|
afterRender: function(){
|
||||||
// call super
|
// call super
|
||||||
Sonia.repository.FormPanel.superclass.afterRender.apply(this, arguments);
|
Sonia.repository.PermissionFormPanel.superclass.afterRender.apply(this, arguments);
|
||||||
|
|
||||||
Ext.QuickTips.register({
|
Ext.QuickTips.register({
|
||||||
target: Ext.getCmp('permissionGridHelp'),
|
target: Ext.getCmp('permissionGridHelp'),
|
||||||
@@ -451,92 +566,14 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
|
|||||||
},
|
},
|
||||||
|
|
||||||
update: function(item){
|
update: function(item){
|
||||||
item = Ext.apply( this.item, item );
|
|
||||||
if ( debug ){
|
|
||||||
console.debug( 'update repository: ' + item.name );
|
|
||||||
}
|
|
||||||
var url = restUrl + 'repositories/' + item.id + '.json';
|
|
||||||
var el = this.el;
|
|
||||||
var tid = setTimeout( function(){el.mask('Loading ...');}, 100);
|
|
||||||
|
|
||||||
this.updatePermissions(item);
|
this.updatePermissions(item);
|
||||||
|
// call super
|
||||||
Ext.Ajax.request({
|
Sonia.repository.PermissionFormPanel.superclass.update.apply(this, arguments);
|
||||||
url: url,
|
|
||||||
jsonData: item,
|
|
||||||
method: 'PUT',
|
|
||||||
scope: this,
|
|
||||||
success: function(){
|
|
||||||
if ( debug ){
|
|
||||||
console.debug('update success');
|
|
||||||
}
|
|
||||||
this.clearModifications();
|
|
||||||
clearTimeout(tid);
|
|
||||||
el.unmask();
|
|
||||||
this.execCallback(this.onUpdate, item);
|
|
||||||
},
|
|
||||||
failure: function(){
|
|
||||||
clearTimeout(tid);
|
|
||||||
el.unmask();
|
|
||||||
Ext.MessageBox.show({
|
|
||||||
title: this.errorTitleText,
|
|
||||||
msg: this.updateErrorMsgText,
|
|
||||||
buttons: Ext.MessageBox.OK,
|
|
||||||
icon:Ext.MessageBox.ERROR
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
create: function(item){
|
|
||||||
if ( debug ){
|
|
||||||
console.debug( 'create repository: ' + item.name );
|
|
||||||
}
|
|
||||||
var url = restUrl + 'repositories.json';
|
|
||||||
var el = this.el;
|
|
||||||
var tid = setTimeout( function(){el.mask('Loading ...');}, 100);
|
|
||||||
|
|
||||||
this.updatePermissions(item);
|
|
||||||
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url: url,
|
|
||||||
jsonData: item,
|
|
||||||
method: 'POST',
|
|
||||||
scope: this,
|
|
||||||
success: function(){
|
|
||||||
if ( debug ){
|
|
||||||
console.debug('create success');
|
|
||||||
}
|
|
||||||
this.permissionStore.removeAll();
|
|
||||||
this.getForm().reset();
|
|
||||||
clearTimeout(tid);
|
|
||||||
el.unmask();
|
|
||||||
this.execCallback(this.onCreate, item);
|
|
||||||
},
|
|
||||||
failure: function(){
|
|
||||||
clearTimeout(tid);
|
|
||||||
el.unmask();
|
|
||||||
Ext.MessageBox.show({
|
|
||||||
title: this.errorTitleText,
|
|
||||||
msg: this.createErrorMsgText,
|
|
||||||
buttons: Ext.MessageBox.OK,
|
|
||||||
icon:Ext.MessageBox.ERROR
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
cancel: function(){
|
|
||||||
if ( debug ){
|
|
||||||
console.debug( 'cancel form' );
|
|
||||||
}
|
|
||||||
Sonia.repository.setEditPanel( Sonia.repository.DefaultPanel );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// register xtype
|
Ext.reg('repositoryPermissionsForm', Sonia.repository.PermissionFormPanel);
|
||||||
Ext.reg('repositoryForm', Sonia.repository.FormPanel);
|
|
||||||
|
|
||||||
// RepositoryPanel
|
// RepositoryPanel
|
||||||
Sonia.repository.Panel = Ext.extend(Ext.Panel, {
|
Sonia.repository.Panel = Ext.extend(Ext.Panel, {
|
||||||
@@ -568,7 +605,6 @@ Sonia.repository.Panel = Ext.extend(Ext.Panel, {
|
|||||||
var config = {
|
var config = {
|
||||||
layout: 'border',
|
layout: 'border',
|
||||||
hideMode: 'offsets',
|
hideMode: 'offsets',
|
||||||
bodyCssClass: 'x-panel-mc',
|
|
||||||
enableTabScroll: true,
|
enableTabScroll: true,
|
||||||
region:'center',
|
region:'center',
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
@@ -579,18 +615,18 @@ Sonia.repository.Panel = Ext.extend(Ext.Panel, {
|
|||||||
region: 'center'
|
region: 'center'
|
||||||
}, {
|
}, {
|
||||||
id: 'repositoryEditPanel',
|
id: 'repositoryEditPanel',
|
||||||
layout: 'fit',
|
xtype: 'tabpanel',
|
||||||
items: [{
|
activeTab: 0,
|
||||||
region: 'south',
|
|
||||||
title: this.titleText,
|
|
||||||
xtype: 'panel',
|
|
||||||
padding: 5,
|
|
||||||
html: this.emptyText
|
|
||||||
}],
|
|
||||||
height: 250,
|
height: 250,
|
||||||
split: true,
|
split: true,
|
||||||
border: false,
|
border: true,
|
||||||
region: 'south'
|
region: 'south',
|
||||||
|
items: [{
|
||||||
|
bodyCssClass: 'x-panel-mc',
|
||||||
|
title: this.titleText,
|
||||||
|
padding: 5,
|
||||||
|
html: this.emptyText
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -652,10 +688,8 @@ Sonia.repository.Panel = Ext.extend(Ext.Panel, {
|
|||||||
|
|
||||||
showAddForm: function(){
|
showAddForm: function(){
|
||||||
Ext.getCmp('repoRmButton').setDisabled(true);
|
Ext.getCmp('repoRmButton').setDisabled(true);
|
||||||
var panel = new Sonia.repository.FormPanel({
|
Sonia.repository.setEditPanel([{
|
||||||
region: 'south',
|
xtype: 'repositoryPropertiesForm',
|
||||||
title: this.titleText,
|
|
||||||
padding: 5,
|
|
||||||
onUpdate: {
|
onUpdate: {
|
||||||
fn: this.reload,
|
fn: this.reload,
|
||||||
scope: this
|
scope: this
|
||||||
@@ -664,8 +698,7 @@ Sonia.repository.Panel = Ext.extend(Ext.Panel, {
|
|||||||
fn: this.reload,
|
fn: this.reload,
|
||||||
scope: this
|
scope: this
|
||||||
}
|
}
|
||||||
});
|
}]);
|
||||||
Sonia.repository.setEditPanel(panel);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
reload: function(){
|
reload: function(){
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ Sonia.rest.FormPanel = Ext.extend(Ext.FormPanel,{
|
|||||||
|
|
||||||
initComponent: function(){
|
initComponent: function(){
|
||||||
var config = {
|
var config = {
|
||||||
|
bodyCssClass: 'x-panel-mc',
|
||||||
padding: 5,
|
padding: 5,
|
||||||
labelWidth: 100,
|
labelWidth: 100,
|
||||||
defaults: {width: 240},
|
defaults: {width: 240},
|
||||||
@@ -176,6 +177,9 @@ Sonia.rest.FormPanel = Ext.extend(Ext.FormPanel,{
|
|||||||
monitorValid: true,
|
monitorValid: true,
|
||||||
defaultType: 'textfield',
|
defaultType: 'textfield',
|
||||||
buttonAlign: 'center',
|
buttonAlign: 'center',
|
||||||
|
footerCfg: {
|
||||||
|
cls: 'x-panel-mc'
|
||||||
|
},
|
||||||
buttons: [
|
buttons: [
|
||||||
{text: this.okText, formBind: true, scope: this, handler: this.submit},
|
{text: this.okText, formBind: true, scope: this, handler: this.submit},
|
||||||
{text: this.cancelText, scope: this, handler: this.cancel}
|
{text: this.cancelText, scope: this, handler: this.cancel}
|
||||||
|
|||||||
Reference in New Issue
Block a user