From 1357124f6f179f648cbc146817a1af101bf129ba Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 19 Jul 2013 18:11:21 +0800 Subject: [PATCH] backend theater for ie fixed --- .../app/assets/javascripts/galleryAPI.js.erb | 37 +++++++++++++------ .../back_end/album_images/show.html.erb | 2 +- 2 files changed, 26 insertions(+), 13 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 080a85207..0ce2abdbb 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 @@ -11,6 +11,19 @@ var galleryAPI = function(){ this.loadArea = null; this.tagList = $("ul#gallery_tag_list"); this.initialize = function(callbackFn){ + if(g.loadArea == "theater"){ + if(rcom.getInternetExplorerVersion()!=-1){ + 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; + } + } + } $(document).ready(function(){ bindHandlers(); }) @@ -437,19 +450,19 @@ 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]+"/"; - } - } + // 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; - } + // window.location.href = url; + // } var albumid = $("#main_pic").attr("data-content"); g.albumArea.find(".bt-back").attr("href","../albums/"+albumid); diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/album_images/show.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/album_images/show.html.erb index f72a28b6c..efcbfa7f0 100644 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/album_images/show.html.erb +++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/album_images/show.html.erb @@ -106,8 +106,8 @@