mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
issue 1309 fixed bug in image gallery with IE8.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10357 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
0c586d4d10
commit
3a57aab83e
3 changed files with 20 additions and 13 deletions
|
|
@ -43,15 +43,6 @@
|
|||
{Context::getHtmlHeader()}
|
||||
</head>
|
||||
<body{Context::getBodyClass()}>
|
||||
|
||||
{Context::getBodyHeader()}
|
||||
|
||||
{$content}
|
||||
|
||||
{Context::getHtmlFooter()}
|
||||
<!-- ETC -->
|
||||
<div class="wfsr"></div>
|
||||
{@$ssl_actions=Context::getSSLActions()}
|
||||
<script type="text/javascript"|cond="$db_info->use_html5!='Y'">
|
||||
//<![CDATA[
|
||||
var current_url = "{$current_url}";
|
||||
|
|
@ -66,6 +57,15 @@
|
|||
<block cond="Context::get('_use_ssl') && Context::get('_use_ssl') == 'always'">var enforce_ssl = true;</block>
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
{Context::getBodyHeader()}
|
||||
|
||||
{$content}
|
||||
|
||||
{Context::getHtmlFooter()}
|
||||
<!-- ETC -->
|
||||
<div class="wfsr"></div>
|
||||
{@$ssl_actions=Context::getSSLActions()}
|
||||
{@ $js_body_files = Context::getJsFile('body') }
|
||||
<block loop="$js_body_files => $key, $js_file">
|
||||
<block cond="$js_file['targetie']"><!--[if {$js_file['targetie']}]></block><script type="text/javascript"|cond="$db_info->use_html5!='Y'" src="{$js_file['file']}"></script><block cond="$js_file['targetie']"><![endif]--></block>
|
||||
|
|
|
|||
|
|
@ -110,6 +110,13 @@ var slideShow = xe.createPlugin('slideShow', {
|
|||
w1 = im.$obj.prop('width');
|
||||
h1 = im.$obj.prop('height');
|
||||
|
||||
if (w1 == 0){
|
||||
w1 = im.$obj.attr('width');
|
||||
}
|
||||
if(h1 ==0){
|
||||
h1 = im.$obj.attr('height');
|
||||
}
|
||||
|
||||
if(w1 > iwidth - 20) {
|
||||
w2 = iwidth - 20;
|
||||
scale = w2 / w1;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* @brief Slideshow type image gallery plugin
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
(function(k){var m=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={};this._thumbs={};this._current={}},API_SHOW_SLIDE:function(g,e){var b=this,a=e[0],c="@"+a,d,f,j,i,h,l;d=this.cast("GET_IMAGES",[a]);if(d.length){f=k("#zone_slide_gallery_"+a);i=f.find(".slide_gallery_placeholder").css("overflow","hidden");f.find(".slide_gallery_loading_text").remove();j=f.find(".slide_gallery_thumbnail_image_box").show();h=0;for(l=d.length;h<l;h++)d[h].$obj.clone().css({cursor:"pointer",
|
||||
width:"60px",height:"60px",margin:"5px",opacity:0.5}).click({idx:h},function(c){b.cast("SET_SLIDE",[a,c.data.idx])}).appendTo(j);k("#zone_gallery_navigator_status_"+a).click(function(){j.toggle()});f.find(".__prev").click(function(){b.cast("PREV_SLIDE",[a]);return!1}).end().find(".__next").click(function(){b.cast("NEXT_SLIDE",[a]);return!1});this._holders[c]=i;this._thumbs[c]=j;this._current[c]=0;this.cast("SET_SLIDE",[a,0])}},_showSideSlide:function(g,e){var b,a;b=this.cast("GET_IMAGES",[g]);b.length&&
|
||||
(a=this._current["@"+g]+e,a<0?a=b.length-1:a>=b.length&&(a=0),this.cast("SET_SLIDE",[g,a]))},API_NEXT_SLIDE:function(g,e){this._showSideSlide(e[0],1)},API_PREV_SLIDE:function(g,e){this._showSideSlide(e[0],-1)},API_SET_SLIDE:function(g,e){var b=e[0],a=e[1],c,d,f;c=this.cast("GET_IMAGES",[b]);if(c.length&&is_def(d=c[a]))this._current["@"+b]=a,k("#zone_gallery_navigator_status_"+b).text(a+1+"/"+c.length),this._thumbs["@"+b].find("img").eq(a).animate({opacity:1}).end().not(":eq("+a+")").animate({opacity:0.5}),
|
||||
b=this._holders["@"+b],c=b.parent().innerWidth(),a=d.$obj.prop("width"),f=d.$obj.prop("height"),a>c-20&&(c-=20,f=Math.floor(f*(c/a)),a=c,d.$obj.css("cursor","pointer"),d.$obj.attr("rel","xe_gallery")),d.$obj.css({width:a,height:f,margin:"0 10px"}),b.empty().append(d.$obj)}}),i=xe.getApp("Gallery")[0];i&&i.registerPlugin(new m)})(jQuery);
|
||||
(function(k){var m=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={};this._thumbs={};this._current={}},API_SHOW_SLIDE:function(g,f){var b=this,a=f[0],c="@"+a,d,e,j,i,h,l;d=this.cast("GET_IMAGES",[a]);if(d.length){e=k("#zone_slide_gallery_"+a);i=e.find(".slide_gallery_placeholder").css("overflow","hidden");e.find(".slide_gallery_loading_text").remove();j=e.find(".slide_gallery_thumbnail_image_box").show();h=0;for(l=d.length;h<l;h++)d[h].$obj.clone().css({cursor:"pointer",
|
||||
width:"60px",height:"60px",margin:"5px",opacity:0.5}).click({idx:h},function(c){b.cast("SET_SLIDE",[a,c.data.idx])}).appendTo(j);k("#zone_gallery_navigator_status_"+a).click(function(){j.toggle()});e.find(".__prev").click(function(){b.cast("PREV_SLIDE",[a]);return!1}).end().find(".__next").click(function(){b.cast("NEXT_SLIDE",[a]);return!1});this._holders[c]=i;this._thumbs[c]=j;this._current[c]=0;this.cast("SET_SLIDE",[a,0])}},_showSideSlide:function(g,f){var b,a;b=this.cast("GET_IMAGES",[g]);b.length&&
|
||||
(a=this._current["@"+g]+f,0>a?a=b.length-1:a>=b.length&&(a=0),this.cast("SET_SLIDE",[g,a]))},API_NEXT_SLIDE:function(g,f){this._showSideSlide(f[0],1)},API_PREV_SLIDE:function(g,f){this._showSideSlide(f[0],-1)},API_SET_SLIDE:function(g,f){var b=f[0],a=f[1],c,d,e;c=this.cast("GET_IMAGES",[b]);if(c.length&&is_def(d=c[a]))this._current["@"+b]=a,k("#zone_gallery_navigator_status_"+b).text(a+1+"/"+c.length),this._thumbs["@"+b].find("img").eq(a).animate({opacity:1}).end().not(":eq("+a+")").animate({opacity:0.5}),
|
||||
b=this._holders["@"+b],c=b.parent().innerWidth(),a=d.$obj.prop("width"),e=d.$obj.prop("height"),0==a&&(a=d.$obj.attr("width")),0==e&&(e=d.$obj.attr("height")),a>c-20&&(c-=20,e=Math.floor(e*(c/a)),a=c,d.$obj.css("cursor","pointer"),d.$obj.attr("rel","xe_gallery")),d.$obj.css({width:a,height:e,margin:"0 10px"}),b.empty().append(d.$obj)}}),i=xe.getApp("Gallery")[0];i&&i.registerPlugin(new m)})(jQuery);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue