Small fixes to the data extension interface
- removed mention to a missing .less file - fixed the position of the Reset button in the preview dialog - fixed the error for empty property selections
This commit is contained in:
parent
1fec3df0cb
commit
4033465cb4
@ -370,7 +370,6 @@ function init() {
|
||||
|
||||
"styles/index/default-importing-sources.less",
|
||||
"styles/views/data-table-view.less", // for the preview table's styles
|
||||
"styles/views/extend-data-preview-dialog.less",
|
||||
"styles/index/fixed-width-parser-ui.less",
|
||||
"styles/index/xml-parser-ui.less",
|
||||
"styles/index/json-parser-ui.less"
|
||||
|
@ -107,16 +107,6 @@ ExtendReconciledDataPreviewDialog.getAllProperties = function(url, typeID, onDon
|
||||
id: property.id,
|
||||
name: property.name
|
||||
};
|
||||
/*if ("id2" in property) {
|
||||
property2.expected = property.schema2;
|
||||
property2.properties = [{
|
||||
id: property.id2,
|
||||
name: property.name2,
|
||||
expected: property.expects
|
||||
}];
|
||||
} else {
|
||||
property2.expected = property.expects;
|
||||
} */
|
||||
allProperties.push(property2);
|
||||
}
|
||||
allProperties.sort(function(a, b) { return a.name.localeCompare(b.name); });
|
||||
@ -183,19 +173,25 @@ ExtendReconciledDataPreviewDialog.prototype._update = function() {
|
||||
columnName: this._column.name
|
||||
};
|
||||
|
||||
$.post(
|
||||
"command/core/preview-extend-data?" + $.param(params),
|
||||
{
|
||||
rowIndices: JSON.stringify(this._rowIndices),
|
||||
extension: JSON.stringify(this._extension)
|
||||
},
|
||||
function(data) {
|
||||
self._renderPreview(data);
|
||||
},
|
||||
"json"
|
||||
).fail(function(data) {
|
||||
console.log(data);
|
||||
});
|
||||
if(this._extension.properties.length == 0) {
|
||||
// if the column selection is empty, reset the view
|
||||
this._elmts.previewContainer.empty();
|
||||
} else {
|
||||
// otherwise, refresh the preview
|
||||
$.post(
|
||||
"command/core/preview-extend-data?" + $.param(params),
|
||||
{
|
||||
rowIndices: JSON.stringify(this._rowIndices),
|
||||
extension: JSON.stringify(this._extension)
|
||||
},
|
||||
function(data) {
|
||||
self._renderPreview(data);
|
||||
},
|
||||
"json"
|
||||
).fail(function(data) {
|
||||
console.log(data);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
ExtendReconciledDataPreviewDialog.prototype._addProperty = function(p) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
<tr>
|
||||
<td width="300" height="1">Add Property</td>
|
||||
<td height="1">Preview</td>
|
||||
<td height="1" width="1%"><button class="button" bind="resetButton">Reset</button></td>
|
||||
<td height="1" style="text-align: right"><button class="button" bind="resetButton">Reset</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top;" height="1"><div class="input-container"><input bind="addPropertyInput" /></div></td>
|
||||
@ -23,4 +23,4 @@
|
||||
<button class="button" bind="okButton"> OK </button>
|
||||
<button class="button" bind="cancelButton">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user