summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-17 18:14:40 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-17 18:14:40 +0200
commit712deb604be9d608b990c6ba1f9af2560e8f20e3 (patch)
treedfa8889be024038eaedcc238cb2892fdcc38f12e /StoneIsland/www/js
parent76df508468975b9ffdd47373e5a406e21ac8cfdf (diff)
confirm error msg better
Diffstat (limited to 'StoneIsland/www/js')
-rwxr-xr-xStoneIsland/www/js/index.js8
-rwxr-xr-xStoneIsland/www/js/lib/_router.js3
-rwxr-xr-xStoneIsland/www/js/lib/blogs/BlogView.js1
-rwxr-xr-xStoneIsland/www/js/lib/view/Serializable.js4
-rwxr-xr-xStoneIsland/www/js/sdk/_sdk.js2
5 files changed, 11 insertions, 7 deletions
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index 9b54ad44..a5a2cdfa 100755
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -96,9 +96,9 @@ var app = (function(){
app.view = null
app.router = new SiteRouter ()
-// if (sdk.env == "test") {
-// app.router.launch()
-// }
+ // if (sdk.env == "test") {
+ // app.router.launch()
+ // }
// else {
// }
@@ -106,7 +106,7 @@ var app = (function(){
app.account.connect(window.deepLinkRoute || '/intro')
app.blog.fetch(function(){
console.log("navigating to deep link route after fetch")
- app.router.initial_route = window.deepLinkRoute || "/intro"
+ app.router.initial_route = window.deepLinkRoute || null
app.router.launch()
})
}
diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js
index 19bd3247..19b6fd63 100755
--- a/StoneIsland/www/js/lib/_router.js
+++ b/StoneIsland/www/js/lib/_router.js
@@ -51,6 +51,7 @@ var SiteRouter = Router.extend({
initial_route: null,
launch: function(){
+ console.log("LAUNCH!")
if (this.initial_route) {
this.parseRoute( this.initial_route )
}
@@ -89,7 +90,7 @@ var SiteRouter = Router.extend({
}
// window.FirebasePlugin && window.FirebasePlugin.setScreenName(name)
-
+console.log("view >>", app.view)
app.header.set_back( !! app.view.back )
app.view.show()
}.bind(this)
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js
index 6eea977f..e9086982 100755
--- a/StoneIsland/www/js/lib/blogs/BlogView.js
+++ b/StoneIsland/www/js/lib/blogs/BlogView.js
@@ -54,6 +54,7 @@ var BlogView = View.extend({
app.closed.storeClosedMessageTwo = app.store.StoreClosedMessageTwo
break
}
+ console.log(data)
if (app.closed.storeIsClosed && sdk.env !== 'test') {
app.closed.populate(app.store.ClosedStoreImages)
diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js
index de5fe951..f1c61072 100755
--- a/StoneIsland/www/js/lib/view/Serializable.js
+++ b/StoneIsland/www/js/lib/view/Serializable.js
@@ -105,7 +105,9 @@ var SerializableView = View.extend({
var msgs = []
errors.forEach(function(e, i){
if (i > 0) { return }
- this.$("[name=" + e[0] + "]").addClass('error_hilite')
+ if (e[0]) {
+ this.$("[name=" + e[0] + "]").addClass('error_hilite')
+ }
msgs.push(e[1])
}.bind(this))
this.$msg.html(msgs.join("<br>"))
diff --git a/StoneIsland/www/js/sdk/_sdk.js b/StoneIsland/www/js/sdk/_sdk.js
index ef29ff92..aba05ca3 100755
--- a/StoneIsland/www/js/sdk/_sdk.js
+++ b/StoneIsland/www/js/sdk/_sdk.js
@@ -9,7 +9,7 @@ var sdk = (function(){
sdk.init = function(opt){
switch (sdk.env = opt.env || "development") {
case 'test':
- endpoint = window.location.origin + "/"
+ endpoint = ('window' in this ? window.location.origin + "/" : "http://lvh.me:9090/")
break
default:
case 'development':