diff --git a/main/webapp/modules/core/scripts/dialogs/extend-data-preview-dialog.js b/main/webapp/modules/core/scripts/dialogs/extend-data-preview-dialog.js index 2aa6f9e66..bdb5d5fdc 100644 --- a/main/webapp/modules/core/scripts/dialogs/extend-data-preview-dialog.js +++ b/main/webapp/modules/core/scripts/dialogs/extend-data-preview-dialog.js @@ -183,7 +183,6 @@ ExtendReconciledDataPreviewDialog.prototype._update = function() { columnName: this._column.name }; - console.log(this._extension); $.post( "command/core/preview-extend-data?" + $.param(params), { @@ -253,17 +252,17 @@ ExtendReconciledDataPreviewDialog.prototype._renderPreview = function(data) { $('
').appendTo(th); $('') - .text($.i18n("core-views")["remove-prop"]) + .text($.i18n._("core-views")["remove-prop"]) .addClass("action") - .attr("title", $.i18n("core-views")["remove-col"]) + .attr("title", $.i18n._("core-views")["remove-col"]) .click(function() { self._removeProperty(column.id); }).appendTo(th); $('') - .text($.i18n("core-views")["configure-prop"]) + .text($.i18n._("core-views")["configure-prop"]) .addClass("action") - .attr("title", $.i18n("core-views")["configure-col"]) + .attr("title", $.i18n._("core-views")["configure-col"]) .click(function() { self._constrainProperty(column.id); }).appendTo(th); @@ -325,19 +324,9 @@ ExtendReconciledDataPreviewDialog.prototype._constrainProperty = function(id) { var body = $('
').addClass("dialog-body").appendTo(frame); var footer = $('
').addClass("dialog-footer").appendTo(frame); - // by default we display an area where the user can input JSON - var form = ( - '' + - 'Enter query settings as JSON' + - '' + - '' + - '' + - ''); - - // If the service metadata specifies fields, we build a proper form to make it more user-friendly var fields = self._serviceMetadata.extend.property_settings; + var table = $('
'); if (fields != null) { - form = ''; for(var i = 0; i < fields.length; i++) { var field = fields[i]; var fieldHTML = ''; @@ -345,57 +334,60 @@ ExtendReconciledDataPreviewDialog.prototype._constrainProperty = function(id) { if (property.settings != null && property.settings[field.name] != null) { currentValue = property.settings[field.name]; } + var tr = $(''); + var td = $('').attr('title', field.help_text).appendTo(tr); if (field.type == 'select') { - fieldHTML += ''+field.label+':
'; + var fieldLabel = $('').text(field.label+':').appendTo(td); + td.append($('
')); for(var j = 0; j < field.choices.length; j++) { var choice = field.choices[j]; - fieldHTML += '