theater view fixed in IE

This commit is contained in:
Harry Bomrah 2013-07-19 16:22:33 +08:00 committed by chris
parent 71e8b3c042
commit 8c3fb43bf5
3 changed files with 29 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -12,12 +12,22 @@ var galleryAPI = function(){
this.tagList = $(".taglist ul");
// this.authenticated = false;
this.initialize = function(callbackFn){
$(document).ready(function(){
//bindHandlers();
})
var bindHandlers = function(){
if(g.loadArea == "theater"){
if(rcom.getInternetExplorerVersion()!=-1){
var photo_id = window.location.hash.replace("#","");
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;
}
}
}
this.loadAlbums = function(id){
@ -198,9 +208,13 @@ var galleryAPI = function(){
$img.fadeOut(200,function(){
if($rslide.hasClass("fullscreen"))
$img.attr({"src":dom.attr("data-content")}).css("height","100%");
$img.attr({"src":dom.attr("data-content")}).css("height","100%").load(function(){
});
else
$img.attr({"src":dom.attr("data-content")}).css("height","auto");
$img.attr({"src":dom.attr("data-content")}).css("height","auto").load(function(){
});
$img.fadeIn(200);
if($rslide.hasClass("fullscreen")){
$img.css({"padding":($rslide.height()-$img.height())/2})
@ -254,6 +268,7 @@ var galleryAPI = function(){
bindHandlers();
})
}
var url_constructor = function(){
if(rcom.getInternetExplorerVersion()!=-1){
var url_constructor = window.location.href.split("/");
var url = "";
@ -264,9 +279,11 @@ var galleryAPI = function(){
url+=url_constructor[x]+"/";
}
}
window.location.href = url;
return url;
// window.location.href = url;
}
}
var albumid = $("#main_pic").attr("data-content");
g.albumArea.css("margin-bottom","0");

View File

@ -56,8 +56,9 @@
<script type="text/javascript">
galleryAPI.prototype.locale = "<%= I18n.locale %>";
var gallery = new galleryAPI();
gallery.initialize();
gallery.loadArea = "theater";
gallery.initialize();
gallery.loadTheater("<%= params[:id] %>");
</script>