From 67e5bcd50446fac2e7c7517b916edfce39f863d9 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Wed, 13 Sep 2017 19:57:07 +0100 Subject: [PATCH] Some UI cleanup for the schema alignment interface --- .../dialogs/schema-alignment-dialog.js | 22 +++++-------------- .../dialogs/schema-alignment-dialog.less | 2 ++ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/extensions/wikidata/module/scripts/dialogs/schema-alignment-dialog.js b/extensions/wikidata/module/scripts/dialogs/schema-alignment-dialog.js index 366aa2740..b540215fb 100644 --- a/extensions/wikidata/module/scripts/dialogs/schema-alignment-dialog.js +++ b/extensions/wikidata/module/scripts/dialogs/schema-alignment-dialog.js @@ -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 = $('').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 = $('').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; -}; + diff --git a/extensions/wikidata/module/styles/dialogs/schema-alignment-dialog.less b/extensions/wikidata/module/styles/dialogs/schema-alignment-dialog.less index 8a0e7ae50..ff86224ed 100644 --- a/extensions/wikidata/module/styles/dialogs/schema-alignment-dialog.less +++ b/extensions/wikidata/module/styles/dialogs/schema-alignment-dialog.less @@ -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 {