Skip to content

Commit

Permalink
Detail View is readonly #44
Browse files Browse the repository at this point in the history
  • Loading branch information
timo11 committed May 13, 2020
1 parent 08e7358 commit 61db130
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions PortalApp/app/view/DetailView.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,15 @@ Ext.define('SpWebPortal.view.DetailView', {
var flds = [];
for (var f = 1; f < fieldStore.count(); f++) {
var fld = fieldStore.getAt(f);
if (fld.get('linkify')) {
//Display object is less than ideal for columns with values that may or may not
//contain embedded links. Linkless values will be unbordered and unadorned and might
//look strange.
flds[f] = Ext.create('Ext.form.field.Display', {
fieldLabel: fld.get('title'),
name: fld.get('solrname'),
readOnly: true,
labelAlign: 'right',
anchor: '100%',
displaycolidx: fld.get('displaycolidx'),
linkify: fld.get('linkify')
});
} else {
flds[f] = Ext.create('Ext.form.field.Text', {
fieldLabel: fld.get('title'),
name: fld.get('solrname'),
labelAlign: 'right',
anchor: '100%',
displaycolidx: fld.get('displaycolidx'),
linkify: fld.get('linkify')
});
}
flds[f] = Ext.create('Ext.form.field.Display', {
fieldLabel: fld.get('title'),
name: fld.get('solrname'),
readOnly: true,
labelAlign: 'right',
anchor: '100%',
displaycolidx: fld.get('displaycolidx'),
linkify: fld.get('linkify')
});
}
flds.sort(function(a, b){return a.displaycolidx - b.displaycolidx;});
this.items = flds;
Expand Down

0 comments on commit 61db130

Please sign in to comment.