some unmerged code i pushd 3 months back not update by chris

This commit is contained in:
Harry Bomrah 2013-09-10 19:41:23 +08:00 committed by chris
parent 789e02e313
commit 3595c59810
2 changed files with 42 additions and 23 deletions

View File

@ -244,18 +244,17 @@ var galleryAPI = function(){
bindHandlers(); bindHandlers();
}) })
} }
if(rcom.getInternetExplorerVersion()!=-1){ if(rcom.getInternetExplorerVersion()!=-1){
var url_constructor = window.location.href.split("/"); var photo_id = window.location.hash.replace("#","");
var url = ""; if(photo_id){
for(x=0;x<=url_constructor.length-1;x++){ var url = window.location.href;
if(x == url_constructor.length-1){ var params = url.split("/");
url+="#!/"+url_constructor[x]; // params[params.length-1] = photo_id;
}else{ url = url.replace(params[params.length-1],photo_id);
url+=url_constructor[x]+"/";
} window.location.href = url;
} }
window.location.href = url;
} }
var albumid = $("#main_pic").attr("data-content"); var albumid = $("#main_pic").attr("data-content");

View File

@ -13,12 +13,32 @@ var galleryAPI = function(){
this.loading = $("#loading"); this.loading = $("#loading");
// this.authenticated = false; // this.authenticated = false;
this.initialize = function(callbackFn){ 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<params.length;i++){
if(i == 0)
url+="?"+params[i]+"="+params[params[i]];
else
url+="&"+params[i]+"="+params[params[i]];
}
window.location.href = url;
}
}
}
$(document).ready(function(){ $(document).ready(function(){
//bindHandlers(); //bindHandlers();
}) })
var bindHandlers = function(){ var bindHandlers = function(){
} }
} }
this.loadAlbums = function(id){ this.loadAlbums = function(id){
@ -262,19 +282,19 @@ var galleryAPI = function(){
bindHandlers(); bindHandlers();
}) })
} }
if(rcom.getInternetExplorerVersion()!=-1){ // if(rcom.getInternetExplorerVersion()!=-1){
var url_constructor = window.location.href.split("/"); // var url_constructor = window.location.href.split("/");
var url = ""; // var url = "";
for(x=0;x<=url_constructor.length-1;x++){ // for(x=0;x<=url_constructor.length-1;x++){
if(x == url_constructor.length-1){ // if(x == url_constructor.length-1){
url+="#!/"+url_constructor[x]; // url+="#!/"+url_constructor[x];
}else{ // }else{
url+=url_constructor[x]+"/"; // url+=url_constructor[x]+"/";
} // }
} // }
window.location.href = url; // window.location.href = url;
} // }
var albumid = $("#main_pic").attr("data-content"); var albumid = $("#main_pic").attr("data-content");
g.albumArea.css("margin-bottom","0"); g.albumArea.css("margin-bottom","0");