Fix appearance of inputs in Firefox for Wikidata schema
This commit is contained in:
parent
eed1049df3
commit
02f908b827
@ -176,13 +176,14 @@ SchemaAlignmentDialog.launch = function(onDone) {
|
|||||||
this._reset(theProject.overlayModels.wikibaseSchema, true);
|
this._reset(theProject.overlayModels.wikibaseSchema, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var beforeUnload = function(e) {
|
||||||
$(window).bind('beforeunload', function(e) {
|
console.log(SchemaAlignmentDialog._hasUnsavedChanges);
|
||||||
if (SchemaAlignmentDialog.isSetUp() && SchemaAlignmentDialog._hasUnsavedChanges) {
|
if (SchemaAlignmentDialog.isSetUp() && SchemaAlignmentDialog._hasUnsavedChanges === true) {
|
||||||
return (e = $.i18n._('wikidata-schema')["unsaved-warning"]);
|
return (e = $.i18n._('wikidata-schema')["unsaved-warning"]);
|
||||||
}
|
}
|
||||||
return null;
|
};
|
||||||
});
|
|
||||||
|
$(window).bind('beforeunload', beforeUnload);
|
||||||
|
|
||||||
SchemaAlignmentDialog._reset = function(schema, initial) {
|
SchemaAlignmentDialog._reset = function(schema, initial) {
|
||||||
this._originalSchema = schema || { itemDocuments: [] };
|
this._originalSchema = schema || { itemDocuments: [] };
|
||||||
@ -1015,6 +1016,7 @@ SchemaAlignmentDialog._initField = function(inputContainer, mode, initialValue,
|
|||||||
input.val(initialValue.value);
|
input.val(initialValue.value);
|
||||||
} else if (initialValue.type === "wblanguageconstant") {
|
} else if (initialValue.type === "wblanguageconstant") {
|
||||||
input.val(initialValue.id);
|
input.val(initialValue.id);
|
||||||
|
input.addClass("wbs-validated-input");
|
||||||
} else if (initialValue.type === "wbstringvariable" ||
|
} else if (initialValue.type === "wbstringvariable" ||
|
||||||
initialValue.type === "wbdatevariable" ||
|
initialValue.type === "wbdatevariable" ||
|
||||||
initialValue.type === "wblocationvariable" ||
|
initialValue.type === "wblocationvariable" ||
|
||||||
|
@ -171,10 +171,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
.wbs-item-input, .wbs-prop-input, .wbs-target-input {
|
.wbs-item-input, .wbs-prop-input, .wbs-target-input {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
/* border: 1px solid #a2a9b1; */
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
/* background: white; */
|
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
white-space: normal;
|
||||||
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wbs-target-input {
|
.wbs-target-input {
|
||||||
@ -193,7 +193,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
width: 120px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wbs-item-input input, .wbs-prop-input input, .wbs-target-input input {
|
// Fix input rendering for Firefox
|
||||||
|
.wbs-item-input input, .wbs-prop-input input, .wbs-target-input input,
|
||||||
|
.wbs-monolingual-container input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: solid #b5b5b5 1px;
|
border: solid #b5b5b5 1px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
|
Loading…
Reference in New Issue
Block a user