Skip to content

Commit

Permalink
Use HTML widget in GXP for any field starting with "descriptio". Refs #…
Browse files Browse the repository at this point in the history
  • Loading branch information
capooti committed Apr 25, 2018
1 parent e227835 commit f9e81c6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,12 @@ var GeoExplorer = Ext.extend(gxp.Viewer, {
var oldInitComponent = gxp.plugins.FeatureEditorGrid.prototype.initComponent;
gxp.plugins.FeatureEditorGrid.prototype.initComponent = function(){
oldInitComponent.apply(this);
if (this.customEditors["Description"] != undefined && this.customEditors["Description"].field.maxLength == undefined) {
this.customEditors["Description"].addListener("startedit",
function(el, value) {
var htmlEditWindow = new Ext.Window({
id: 'displayXHRTrouble',
for(var key in this.customEditors) {
if (this.customEditors.hasOwnProperty(key)) {
if (key.match(/descripti/i) && this.customEditors[key].field.maxLength == undefined) {
customEditField = this.customEditors[key];
customEditField.addListener("startedit", function(el, value) {
var htmlEditWindow = new Ext.Window({
title: 'HTML Editor',
renderTo: Ext.getBody(),
width: 600,
Expand All @@ -534,7 +535,6 @@ var GeoExplorer = Ext.extend(gxp.Viewer, {
"->",
//saveAsButton,
new Ext.Button({
id: 'saveAsButtonBbar',
text: "Save",
cls:'x-btn-text',
handler: function() {
Expand All @@ -546,26 +546,25 @@ var GeoExplorer = Ext.extend(gxp.Viewer, {
scope: this
}),
new Ext.Button({
id: 'cancelButtonBbar',
text: 'Cancel',
text: "Cancel",
cls:'x-btn-text',
handler: function() {
htmlEditWindow.destroy();
},
scope: this
})
]
}
);

htmlEditWindow.show();
var myNicEditor = new nicEditor({fullPanel : true, maxHeight: 190, iconsPath: nicEditIconsPath}).panelInstance('html_textarea')
return true;
}
);
htmlEditWindow.show();
var myNicEditor = new nicEditor({fullPanel : true, maxHeight: 190, iconsPath: nicEditIconsPath}).panelInstance('html_textarea');
return true;
}
);
}
);
}
}
}

},

//Check permissions for selected layer and enable/disable feature edit buttons accordingly
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f9e81c6

Please sign in to comment.