diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-12-02 17:37:35 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-12-02 17:37:35 +0100 |
| commit | 8d4ace1dbea3b38e08a2fa369cf988eaac5b3dba (patch) | |
| tree | 7a1e600400383404c1787a42f7568a8d51f5d300 /StoneIsland/www/js | |
| parent | 1420584ae4c41d4f89743c512b00befe814b54bb (diff) | |
fixing more stuff
Diffstat (limited to 'StoneIsland/www/js')
| -rwxr-xr-x | StoneIsland/www/js/lib/auth/SignupView.js | 20 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/blogs/StoryView.js | 4 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/nav/NavView.js | 8 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/view/Serializable.js | 2 |
4 files changed, 28 insertions, 6 deletions
diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js index b16ff887..18fecebb 100755 --- a/StoneIsland/www/js/lib/auth/SignupView.js +++ b/StoneIsland/www/js/lib/auth/SignupView.js @@ -63,8 +63,18 @@ var SignupView = FormView.extend({ if (! data.Email.match("@")) { errors.push([ "Email", "Email address is not valid." ]) } if (data.Email.toLowerCase() !== data.ConfirmEmail.toLowerCase()) { errors.push([ "ConfirmEmail", "Email addresses don't match." ]) } // if (data.Gender === "NONE") { errors.push([ "Gender", "Please supply your gender." ]) } - if (data.DataProfiling !== "true") { errors.push([ "DataProfiling", "You must consent to data profiling to use the Stone Island app." ]) } - if (data.GdprTerms !== "true") { errors.push([ "GdprTerms", "You must agree to the Your My Account terms to use the Stone Island app." ]) } + if (data.DataProfiling !== "true") { + errors.push([ "DataProfiling", "You must consent to data profiling to use the Stone Island app." ]) + setTimeout(function(){ + this.$("#checkbox-shopping-data-profiling-label").closest(".checkbox-row").addClass("error_hilite") + }.bind(this), 10) + } + if (data.GdprTerms !== "true") { + errors.push([ "GdprTerms", "You must agree to the Your My Account terms to use the Stone Island app." ]) + setTimeout(function(){ + this.$("#checkbox-shopping-account-terms").closest(".checkbox-row").addClass("error_hilite") + }.bind(this), 10) + } var now = new Date () var year = now.getFullYear() @@ -78,6 +88,12 @@ var SignupView = FormView.extend({ } data.YooxLetter = this.$("[name=YooxLetter]").prop("checked") + if (!data.YooxLetter) { + errors.push([ "YooxLetter", "You must consent to marketing to use the Stone Island app." ]) + setTimeout(function(){ + this.$("#checkbox-data-profiling").closest(".checkbox-row").addClass("error_hilite") + }.bind(this), 10) + } }, finalize: function(data){ diff --git a/StoneIsland/www/js/lib/blogs/StoryView.js b/StoneIsland/www/js/lib/blogs/StoryView.js index 71f1cc0c..19d5bac8 100755 --- a/StoneIsland/www/js/lib/blogs/StoryView.js +++ b/StoneIsland/www/js/lib/blogs/StoryView.js @@ -40,8 +40,8 @@ var StoryView = ScrollableView.extend({ .replace(/{{body}}/, row.body.replace(/\n/g, "<br>")) var li = document.createElement("li") li.dataset.id = row.id - li.innerHTML = "<div>" + row.title + "</div>" - li.setAttribute('role', "link") + li.innerHTML = "<div style='pointer-events: none'>" + row.title + "</div>" + li.setAttribute('role', "menuitem") this.sections[row.id] = row this.$links.append(li) this.$content.append(t) diff --git a/StoneIsland/www/js/lib/nav/NavView.js b/StoneIsland/www/js/lib/nav/NavView.js index a9a1938e..a6a39633 100755 --- a/StoneIsland/www/js/lib/nav/NavView.js +++ b/StoneIsland/www/js/lib/nav/NavView.js @@ -1,3 +1,5 @@ +var klassTimeout; + var NavView = View.extend({ el: "#nav", @@ -52,14 +54,16 @@ var NavView = View.extend({ doneShowingNav = true }, 800) if (klass) { - setTimeout(function(){ + klassTimeout = setTimeout(function(){ this.addClass(klass) }.bind(this), 500) } }, hide: function(){ - if (!doneShowingNav) return + if (!doneShowingNav) { + clearTimeout(klassTimeout) + } $("body").removeClass("nav") app.curtain.hide("dark") }, diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js index 08802fa9..0d638412 100755 --- a/StoneIsland/www/js/lib/view/Serializable.js +++ b/StoneIsland/www/js/lib/view/Serializable.js @@ -61,6 +61,7 @@ var SerializableView = View.extend({ focus_input: function(e){ $(e.currentTarget).removeClass("error_hilite") + $(e.currentTarget).closest(".checkbox-row").removeClass("error_hilite") }, focus_date: function(e){ @@ -128,6 +129,7 @@ var SerializableView = View.extend({ // this.$msg.html(msgs.join("<br>")) this.$msg.addClass('alert-notice') if (app.view.scroller) { + app.view.scroller.refresh() app.view.scroller.scrollTo(0, 0) } }, |
