summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js')
-rwxr-xr-xStoneIsland/www/js/index.js2
-rwxr-xr-xStoneIsland/www/js/lib/blogs/BlogView.js10
-rwxr-xr-xStoneIsland/www/js/lib/etc/push.js2
-rwxr-xr-xStoneIsland/www/js/lib/products/CollectionView.js1
4 files changed, 10 insertions, 5 deletions
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index 06bfaaac..e583a2cd 100755
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -4,7 +4,7 @@ var app = (function(){
app.init = function(){
console.log("init")
- sdk.init({ env: "production" })
+ sdk.init({ env: "test" })
app.bind()
app.build()
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js
index 1bd56908..fe36e025 100755
--- a/StoneIsland/www/js/lib/blogs/BlogView.js
+++ b/StoneIsland/www/js/lib/blogs/BlogView.js
@@ -9,8 +9,8 @@ var BlogView = View.extend({
fetch: function(fn){
$.ajax({
method: "GET",
-// url: sdk.env == 'test' ? '/db.json' : "https://stone.sup.land/db.json",
- url: "https://stone.sup.land/db.json",
+ url: sdk.env === 'test' ? '/db.json' : "https://stone.sup.land/db.json",
+ // url: "https://stone.sup.land/db.json",
success: function(data){
this.success(data)
fn && fn()
@@ -42,7 +42,7 @@ var BlogView = View.extend({
break
}
- if (app.closed.storeIsClosed) {
+ if (app.closed.storeIsClosed && sdk.env !== 'test') {
app.closed.populate(data.store[0].ClosedStoreImages)
}
else {
@@ -52,6 +52,10 @@ var BlogView = View.extend({
app.collection.setCollectionName( data.store[0].Departments[0].text )
//// demo department for shoes with weird SizeTypeId
// app.department_id = "NKDrtSC"
+ if (sdk.env === 'test') {
+ app.department_id = window.location.search.substr(1) || app.department_id
+ console.log('using test department id', app.department_id)
+ }
app.collection.loaded = false
app.collection.fetch()
}
diff --git a/StoneIsland/www/js/lib/etc/push.js b/StoneIsland/www/js/lib/etc/push.js
index da63fdd1..043a4d75 100755
--- a/StoneIsland/www/js/lib/etc/push.js
+++ b/StoneIsland/www/js/lib/etc/push.js
@@ -2,7 +2,7 @@ var push = (function(){
var push = { settings: {}, disabled: false }
var pushPlugin
push.init = function(){
- if (device.platform !== "ios") {
+ if (! ('device' in window) || device.platform !== "ios") {
push.disabled = true
return
}
diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js
index 3bc2623c..67a3a456 100755
--- a/StoneIsland/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/www/js/lib/products/CollectionView.js
@@ -98,6 +98,7 @@ var CollectionView = ScrollableView.extend({
if (is_single_product) {
console.log("IS SINGLE PRODUCT")
var item = data.SearchResponseFull.Results.Items[0]
+ console.log(item)
var url = sdk.image(item['DefaultCode10'], '13_f')
console.log(url)
var img = new Image ()