From 3595c59810d41c68e7caf510edba25c27b70779b Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 10 Sep 2013 19:41:23 +0800 Subject: [PATCH] some unmerged code i pushd 3 months back not update by chris --- .../app/assets/javascripts/galleryAPI.js.erb | 21 +++++---- .../javascripts/galleryAPI_frontend.js.erb | 44 ++++++++++++++----- 2 files changed, 42 insertions(+), 23 deletions(-) diff --git a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI.js.erb b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI.js.erb index e5037d41d..5082929d2 100644 --- a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI.js.erb +++ b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI.js.erb @@ -244,18 +244,17 @@ var galleryAPI = function(){ bindHandlers(); }) } + if(rcom.getInternetExplorerVersion()!=-1){ - var url_constructor = window.location.href.split("/"); - var url = ""; - for(x=0;x<=url_constructor.length-1;x++){ - if(x == url_constructor.length-1){ - url+="#!/"+url_constructor[x]; - }else{ - url+=url_constructor[x]+"/"; - } - } - - window.location.href = url; + var photo_id = window.location.hash.replace("#",""); + if(photo_id){ + var url = window.location.href; + var params = url.split("/"); + // params[params.length-1] = photo_id; + url = url.replace(params[params.length-1],photo_id); + + window.location.href = url; + } } var albumid = $("#main_pic").attr("data-content"); diff --git a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb index 12f2bef40..0290b50a2 100644 --- a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb +++ b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb @@ -13,12 +13,32 @@ var galleryAPI = function(){ this.loading = $("#loading"); // this.authenticated = false; this.initialize = function(callbackFn){ + if(g.loadArea == "theater"){ + if(rcom.getInternetExplorerVersion()!=-1){ + var photo_id = window.location.hash.replace("#",""); + if(photo_id){ + var params = rcom.getUrlVars(); + var url = window.location.href.split("?")[0]; + params["id"] = photo_id; + for(i=0;i