forked from MapComplete/MapComplete
Merge master
This commit is contained in:
commit
149e117887
11 changed files with 44 additions and 63 deletions
|
@ -97,7 +97,7 @@ export default class ScrollableFullScreen extends UIElement {
|
|||
}
|
||||
|
||||
private static PatchLeaflet(htmlElement) {
|
||||
if(htmlElement === null){
|
||||
if(htmlElement === undefined || htmlElement === null){
|
||||
return;
|
||||
}
|
||||
do {
|
||||
|
@ -141,8 +141,9 @@ export default class ScrollableFullScreen extends UIElement {
|
|||
}
|
||||
|
||||
public PrepFullscreen(htmlElement = undefined) {
|
||||
htmlElement = htmlElement ?? document.getElementById(this.id);
|
||||
ScrollableFullScreen.PatchLeaflet(htmlElement);
|
||||
|
||||
htmlElement = htmlElement ?? document.getElementById(this.id);
|
||||
ScrollableFullScreen.HideClutter(htmlElement);
|
||||
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ export default class EditableTagRendering extends UIElement {
|
|||
// And at last, set up the skip button
|
||||
const cancelbutton =
|
||||
Translations.t.general.cancel.Clone()
|
||||
.SetClass("cancel")
|
||||
.SetClass("btn btn-secondary mr-3")
|
||||
.onClick(() => {
|
||||
self._editMode.setData(false)
|
||||
});
|
||||
|
|
|
@ -33,7 +33,7 @@ export default class QuestionBox extends UIElement {
|
|||
self._skippedQuestions.ping();
|
||||
},
|
||||
Translations.t.general.skip.Clone()
|
||||
.SetClass("cancel")
|
||||
.SetClass("btn btn-secondary mr-3")
|
||||
.onClick(() => {
|
||||
self._skippedQuestions.data.push(i);
|
||||
self._skippedQuestions.ping();
|
||||
|
|
|
@ -22,15 +22,14 @@ export class SaveButton extends UIElement {
|
|||
}
|
||||
|
||||
InnerRender(): string {
|
||||
let clss = "save";
|
||||
|
||||
if(this._userDetails != undefined && !this._userDetails.data.loggedIn){
|
||||
return this._friendlyLogin.Render();
|
||||
}
|
||||
let inactive_class = ''
|
||||
if (this._value.data === false || (this._value.data ?? "") === "") {
|
||||
clss = "save-non-active";
|
||||
inactive_class = "btn-disabled";
|
||||
}
|
||||
return Translations.t.general.save.Clone().SetClass(clss).Render();
|
||||
return Translations.t.general.save.Clone().SetClass(`btn ${inactive_class}`).Render();
|
||||
}
|
||||
|
||||
}
|
|
@ -148,7 +148,7 @@ export default class ShowDataLayer {
|
|||
leafletLayer.on("click", () => {
|
||||
// We set the element as selected...
|
||||
|
||||
uiElement.Activate(e => e.PrepFullscreen());
|
||||
uiElement.Activate();
|
||||
State.state.selectedElement.setData(feature);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue