Permalink
Browse files

[NEXUS-5360] Fix Display of TextEntryList

  • Loading branch information...
1 parent 9d6a3a5 commit 77106a13742ec18c5c306ebf8d05d437d462aaba @nabcos nabcos committed with cstamas Nov 20, 2012
@@ -20,7 +20,12 @@ Ext.override(Ext.form.Field, {
afterRenderOrig : Ext.form.Field.prototype.afterRender,
afterRender : function() {
var helpClass = null, wrapDiv = null, helpMark = null;
- if (this.getXType() === 'combo' || this.getXType() === 'uxgroupcombo' || this.getXType() === 'datefield' || this.getXType() === 'timefield')
+ if ( this.helpMarker === true )
+ {
+ wrapDiv = this.getEl().up('div');
+ helpClass = 'form-label-helpmark';
+ }
+ else if (this.getXType() === 'combo' || this.getXType() === 'uxgroupcombo' || this.getXType() === 'datefield' || this.getXType() === 'timefield')
{
wrapDiv = this.getEl().up('div.x-form-field-wrap');
helpClass = 'form-label-helpmark-combo';
@@ -35,6 +40,11 @@ Ext.override(Ext.form.Field, {
wrapDiv = this.getEl().up('div.x-form-element');
helpClass = 'form-label-helpmark-textarea';
}
+ else if ( this.getXType() === 'textentrylist' )
+ {
+ wrapDiv = this.getEl().up();
+ helpClass = 'form-label-helpmark';
+ }
else
{
wrapDiv = this.getEl().up('div.x-form-element');
@@ -29,10 +29,10 @@ Nexus.ext.TextEntryList = function(cfg) {
this.textEntryField = new Ext.form.Field({
xtype : 'textfield',
- fieldLabel : config.entryLabel,
helpText : config.entryHelpText,
name : 'entryName',
- width : 300
+ width : 300,
+ helpMarker : true
});
this.addEntryButton = new Ext.Button({
@@ -109,11 +109,12 @@ Nexus.ext.TextEntryList = function(cfg) {
},
items : [{
xtype : 'panel',
+ fieldLabel : config.entryLabel,
layout : 'column',
- items : [{
+ items : [
+ {
xtype : 'panel',
- layout : 'form',
- width : 500,
+ width : 320,
items : [this.textEntryField]
}, {
xtype : 'panel',
@@ -122,9 +123,9 @@ Nexus.ext.TextEntryList = function(cfg) {
}]
}, {
xtype : 'panel',
+ fieldLabel : config.listLabel,
layout : 'column',
autoHeight : true,
- style : 'padding-left: 180px',
items : [this.entryList, {
xtype : 'panel',
width : 120,
@@ -135,7 +136,7 @@ Nexus.ext.TextEntryList = function(cfg) {
};
-Ext.extend(Nexus.ext.TextEntryList, Ext.Panel, {
+Ext.extend(Nexus.ext.TextEntryList, Ext.FormPanel, {
addEntryNode : function(treePanel, entry) {
var id = Ext.id();
@@ -224,7 +225,3 @@ Ext.extend(Nexus.ext.TextEntryList, Ext.Panel, {
Ext.reg('textentrylist', Nexus.ext.TextEntryList);
});
-
-define('sonatype/ext/TextEntryList', ['sonatype', 'nexus/ext/TextEntryList'], function(Sonatype, Nexus){
- Sonatype.ext.TextEntryList = Nexus.ext.TextEntryList;
-});

0 comments on commit 77106a1

Please sign in to comment.