Skip to content

Commit

Permalink
no team
Browse files Browse the repository at this point in the history
  • Loading branch information
kaheetonaa committed Oct 22, 2024
1 parent b6e69c0 commit 69f77d7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 65 deletions.
25 changes: 4 additions & 21 deletions dist/iD.js
Original file line number Diff line number Diff line change
Expand Up @@ -67796,37 +67796,23 @@
showSplash = true;
}
console.log(typeof __team_selected);
if (!showSplash) return;
corePreferences("sawSplash", true);
let modalSelection = uiModal(selection2);
modalSelection.select(".modal").attr("class", "modal-splash modal");
let introModal = modalSelection.select(".content").append("div").attr("class", "fillL");
introModal.append("div").attr("class", "modal-section").html("<h2>EUthMappers Sandbox for editing </h2>");
let team_select = introModal.append("select").attr("name", "team").attr("id", "team");
team_select.append("option").attr("value", "null").html("Please select a nation");
team_select.append("option").attr("value", "italia").html("Italia");
team_select.append("option").attr("value", "portugal").html("Portugal");
team_select.append("option").attr("value", "spain").html("Romania");
team_select.append("option").attr("value", "slovakia").html("Slovakia");
team_select.append("option").attr("value", "spain").html("Spain");
let modalSection = introModal.append("div").attr("class", "modal-section");
modalSection.append("p").html("Welcome to <b>Sandbox for editing</b> by <b>EUthMappers</b>");
let buttonWrap = introModal.append("div").attr("class", "modal-actions");
let walkthrough = buttonWrap.append("button").attr("class", "walkthrough").on("click", () => {
if (document.getElementById("team").value != "null") {
__team_selected = document.getElementById("team").value + " #EuthMappers";
context.container().call(uiIntro(context));
modalSelection.close();
corePreferences("hashtags", __team_selected);
}
context.container().call(uiIntro(context));
modalSelection.close();
});
walkthrough.append("svg").attr("class", "logo logo-walkthrough").append("use").attr("xlink:href", "#iD-logo-walkthrough");
walkthrough.append("div").call(_t.append("splash.walkthrough"));
let startEditing = buttonWrap.append("button").attr("class", "start-editing").on("click", () => {
if (document.getElementById("team").value != "null") {
__team_selected = document.getElementById("team").value + " #EuthMappers";
modalSelection.close();
corePreferences("hashtags", __team_selected);
}
modalSelection.close();
});
startEditing.append("svg").attr("class", "logo logo-features").append("use").attr("xlink:href", "#iD-logo-features");
startEditing.append("div").call(_t.append("splash.start"));
Expand Down Expand Up @@ -74331,9 +74317,6 @@
});
if (!onInput) {
var commentOnly = changed.hasOwnProperty("comment") && changed.comment !== "";
if (typeof __team_selected != "undefined") {
commentOnly += __team_selected;
}
var arr = findHashtags(tags, commentOnly);
if (arr.length) {
tags.hashtags = context.cleanTagValue(arr.join(";"));
Expand Down
4 changes: 2 additions & 2 deletions dist/iD.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion modules/ui/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ export function uiCommit(context) {
if (!onInput) {
// when changing the comment, override hashtags with any found in comment.
var commentOnly = changed.hasOwnProperty('comment') && (changed.comment !== '');
if(typeof __team_selected!= "undefined"){commentOnly+=__team_selected}
var arr = findHashtags(tags, commentOnly);
if (arr.length) {
tags.hashtags = context.cleanTagValue(arr.join(';'));
Expand Down
44 changes: 3 additions & 41 deletions modules/ui/splash.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function uiSplash(context) {
showSplash = true;
}
console.log(typeof __team_selected)
//if (!showSplash) return;
if (!showSplash) return;

prefs('sawSplash', true);

Expand All @@ -44,38 +44,6 @@ export function uiSplash(context) {
.html("<h2>EUthMappers Sandbox for editing </h2>")
//.call(t.append('splash.welcome'));

let team_select=introModal
.append('select')
.attr('name','team')
.attr('id','team')

team_select.append('option')
.attr('value','null')
.html('Please select a nation')

team_select.append('option')
.attr('value','italia')
.html('Italia')

team_select.append('option')
.attr('value','portugal')
.html('Portugal')

team_select.append('option')
.attr('value','spain')
.html('Romania')

team_select.append('option')
.attr('value','slovakia')
.html('Slovakia')

team_select.append('option')
.attr('value','spain')
.html('Spain')




let modalSection = introModal
.append('div')
.attr('class','modal-section');
Expand Down Expand Up @@ -108,12 +76,8 @@ export function uiSplash(context) {
.append('button')
.attr('class', 'walkthrough')
.on('click', () => {
if (document.getElementById("team").value!='null'){
__team_selected=document.getElementById("team").value+" #EuthMappers";
context.container().call(uiIntro(context));
modalSelection.close();
prefs('hashtags', __team_selected);
}
});

walkthrough
Expand All @@ -129,11 +93,9 @@ export function uiSplash(context) {
let startEditing = buttonWrap
.append('button')
.attr('class', 'start-editing')
.on('click', ()=>{if (document.getElementById("team").value!='null'){
__team_selected=document.getElementById("team").value+" #EuthMappers";
.on('click', ()=>{
modalSelection.close();
prefs('hashtags', __team_selected)
}});
});

startEditing
.append('svg')
Expand Down

0 comments on commit 69f77d7

Please sign in to comment.