Some UI cleanup for the schema alignment interface

This commit is contained in:
Antonin Delpeuch 2017-09-13 19:57:07 +01:00
parent 23355eb472
commit 67e5bcd504
2 changed files with 7 additions and 17 deletions

View File

@ -171,11 +171,13 @@ SchemaAlignmentDialog._createDialog = function() {
helper: "clone",
cursor: "crosshair",
snap: ".wbs-item-input input, .wbs-target-input input",
zIndex: 100,
});
$('.wbs-unreconciled-column').draggable({
helper: "clone",
cursor: "crosshair",
snap: ".wbs-target-input input",
zIndex: 100,
});
@ -485,6 +487,7 @@ SchemaAlignmentDialog._getPropertyType = function(pid, callback) {
SchemaAlignmentDialog._initPropertyField = function(inputContainer, targetContainer, initialValue) {
var input = $('<input></input>').appendTo(inputContainer);
input.attr("placeholder", "Wikidata property");
if (this._reconService !== null) {
endpoint = this._reconService.suggest.property;
@ -529,6 +532,7 @@ SchemaAlignmentDialog._initField = function(inputContainer, mode, initialValue)
var input = $('<input></input>').appendTo(inputContainer);
if (this._reconService !== null && mode === "wikibase-item") {
input.attr("placeholder", "Wikidata item or reconciled column");
var endpoint = null;
endpoint = this._reconService.suggest.entity;
var suggestConfig = $.extend({}, endpoint);
@ -654,13 +658,6 @@ SchemaAlignmentDialog.preview = function(initial) {
$('.invalid-schema-warning').hide();
this._previewPanes.empty();
/*
if (!(initial)) {
this._elmts.statusIndicator.show().text("There are unsaved changes.");
this._hasUnsavedChanges = true;
}
*/
var schema = this.getJSON();
$.post(
"command/wikidata/preview-wikibase-schema?" + $.param({ project: theProject.id }),
@ -677,13 +674,4 @@ SchemaAlignmentDialog.preview = function(initial) {
);
};
SchemaAlignmentDialog._findColumn = function(cellIndex) {
var columns = theProject.columnModel.columns;
for (var i = 0; i < columns.length; i++) {
var column = columns[i];
if (column.cellIndex == cellIndex) {
return column;
}
}
return null;
};

View File

@ -49,6 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.schema-alignment-dialog-columns-area {
border: 1px solid #bcf;
padding: 5px;
max-height: 100px;
overflow-y: scroll;
}
.wbs-draggable-column {