From e8a0015365bcd3bf58a64a6ce30d5e955b0ffd1d Mon Sep 17 00:00:00 2001 From: devin Date: Wed, 22 Aug 2012 15:59:06 +0800 Subject: [PATCH] gallery update --- .../app/assets/images/gallery/pbar-ani.gif | Bin 0 -> 3159 bytes .../app/assets/images/gallery/slideui.gif | Bin 372 -> 431 bytes .../app/assets/javascripts/galleryAPI.js.erb | 54 +++++++++--------- .../app/assets/stylesheets/gallery.css | 6 +- 4 files changed, 33 insertions(+), 27 deletions(-) create mode 100755 vendor/built_in_modules/gallery/app/assets/images/gallery/pbar-ani.gif diff --git a/vendor/built_in_modules/gallery/app/assets/images/gallery/pbar-ani.gif b/vendor/built_in_modules/gallery/app/assets/images/gallery/pbar-ani.gif new file mode 100755 index 0000000000000000000000000000000000000000..6edd17420169a20ba7700755ead09074b27a5f57 GIT binary patch literal 3159 zcmcJRX;f1O8iwNn)`WlyATT1(N`(+2M;!?gS;T~}XjKr@Q_%!NSR|q%LdbS6$;}=R zBmx1`0s;k!EohV_S_CXENU2*rRIP#ri6RwQ;xKe>Y;`*4+;jS4?7#fV``qXI?tQ<| zFbdI+=7X|FHK9;-O&2N~bd~kGlc!FrD;m`04SAYsWl_2GxE3lX2ajp_iV}`Yoh><$ zDJqzmHQVhs%w}?QR7mg^@+yMQoLMLo%FQ&_Vjju{g@=Em%zulTt4r$+tFv=8_GDZC z=%(7Y(}`T$uwUbpfOn}$X&se3=e!&{s~H{la$4B_s3&dz?81<$redM4GAjOd%cTUq zC72mW&~!aGu#&^l-W+!B-xT_p<5U~(*wDXz698NcTLg(YpbQj>RghGkpOagdg~6bU zH6>-mC%;gtbBn&Ls?t=5tn2G*s!PB9y6Mc>CiMB{me#grtnNFVzN7PE`}YlT{x9rH7L^NsSZh2$)z)dhc`XQnVoAW)pu4b)ZD(Y=$EHp-*I8r;H!H?LhFiWNByj$@efpO zTiaLqzRu=u;xoV;0l@FUyFQ4fSw9DRUox>LF#0o_~q(mAikOwM{$NO2;!*b$Kio`~oF(1?@raT0hZ zneTV9+PQb$^Z5rm%SS$nn2i-C{`%T0y!wV=eCO@WE||-)`5sF;2E-=(veWVxuYCzC z*NsGVJ?{U`V8`K+(Sj&$ybwr|lEo5{D}+>sMAk=`~+` zf&NW*#Ed%Ja3iROaw^1Fc;)7dy%oznm;iR=Hu~XXmfTAukmAyRDwbKCJNUiV1ec8F zM{?*nf1Eedg1L58cxSgLn{VXO_ka=^csAphiY8xgCFY?2@?$4>-h zFl|6SV!XK*j8=bFJe5lYnPvnjZ>sbA+iC-SZ=l&!EQbW}L=fmF6v)>q z7a%GIZ?(70o5_Gnpc2tAs<7BgdNsF#i8|kEv3E)(93IBp=(D@}t*UpU!;Yt~O%D z?Ua4}siG#w^h$c}e$sMiM*5%3ErC8F;f-oweXtIa`E0_ zFu3rKOC`{DB(wy5v^Ph_zSr*i^gb+vO#v8u2K+G~$l^Y_$fzdEW2<`<>*hs=s zniLTs_Z%j`DrD&oFoHUG4lS8v&%cGU)hOe#q-jUmYr;DR8XZ%YYv7rL>{ecU7A(5| zeCQwJ2e3STHU&%&B*3jik{?kLb3a97NE^N41AmxPX0^l)8IX;ji*6Kfd@) z1aqv+QAg+susU5m$CBSkClE<9>VP@4VMXwPZNq)LZnI9e2!CqcOLUKKG?fOZdu=SH zzs@+N2zzNM^0!+A=0u&jlb$KfhAyP+0!CF0$`5uDdSLJyXw0w1G zq_itzham<(ribgv3Z2?n{z$TMS^!^-Q`8OB(Z&UJ>DyeSK1bT8z%Fv5V;O;O_f)Jw z`}P8|H+S1tKJ78jf(#rG20`LIvUG``axEeOE3G@UP9G~!X4}L`{ s4MhL--CFslZD^T)v=@-W+rTs`VFDJw$P$7SG@m45$Qi1jg((0301o9upa1{> literal 0 HcmV?d00001 diff --git a/vendor/built_in_modules/gallery/app/assets/images/gallery/slideui.gif b/vendor/built_in_modules/gallery/app/assets/images/gallery/slideui.gif index 1a3df3681f15dd688b7f8e0a5b2aa9854492cbd9..8d16d90254552f37bdc0dcda4a96e188bb9e2cc0 100755 GIT binary patch delta 94 zcmV-k0HOc%0'); var frame = $(''); - uploadpanel.find("a.bt-cls").click(function(){ + uploadpanel.find(".bt-cls").click(function(){ uploadpanel.hide("slide"); frame.remove(); g.loadImages(id); @@ -308,13 +308,13 @@ var galleryAPI = function(){ var re1 = new RegExp("^[\u4E00-\uFA29]*$"); //Chinese character range var re2 = new RegExp("^[\uE7C7-\uE7F3]*$"); if ((re1.test(sval) && (re2.test(sval)))){ - $("ul#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp(); + $("#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp(); }else{ - $("ul#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp(); + $("#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp(); } }else{ - $("ul#gallery_tag_list li").slideDown(); + $("#gallery_tag_list li").slideDown(); } }) g.albumArea.find("#tag_panel .bt-save").click(function(){ @@ -330,37 +330,38 @@ var galleryAPI = function(){ $slidelist.find("ul").hide(); } }) - $(".slidectrl a.togglescreen").click(function(){ + $(".slidectrl .togglescreen").click(function(){ toggleFullscreen(); }) - $(".slidectrl a.browserfullscreen").click(function(){ + $(".slidectrl .browserfullscreen").click(function(){ browserFullScreen(); }) - $slidelist.find("a.list_element").click(function(){ + $slidelist.find(".list_element").click(function(){ imagecount = parseInt($(this).parent().attr("for")); changeImage($(this)); }) - $rslidenav.find("a.navN").click(function(){ + $rslidenav.find(".navN").click(function(){ nextpic($(this)); }) $rslidenav.find("a.navP").click(function(){ prevpic($(this)); }) - $("a#nextpic").click(function(){ + $("#nextpic").click(function(){ nextpic($(this)); }) $(document).keydown(function(e){ if (e.keyCode == 37){ - prevpic($rslidenav.find("a.navP")); + prevpic($rslidenav.find(".navP")); return false; } if(e.keyCode == 39){ - nextpic($rslidenav.find("a.navN")); + nextpic($rslidenav.find(".navN")); return false; } if(e.keyCode == 27){ toggleFullscreen(); + $rslide.removeClass('browserFullScreen'); return false; } if(e.keyCode == 70 || e.keyCode == 102){ @@ -372,6 +373,7 @@ var galleryAPI = function(){ var el = document.documentElement, rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen; rfs.call(el); + $rslide.addClass('browserFullScreen'); } var nextpic = function(dom){ if(imagecount == imageArray.length - 1) @@ -391,7 +393,7 @@ var galleryAPI = function(){ if($rslide.hasClass("fullscreen")){ $rslide.css("position","relative"); $rslide.removeClass("fullscreen"); - $(".slidectrl a.browserfullscreen").hide(); + $(".slidectrl .browserfullscreen").hide(); $img.css({"padding":""}) $("#main_pic").height(picHeight ); }else{ @@ -400,7 +402,7 @@ var galleryAPI = function(){ $rslide.css("position",""); $rslide.addClass("fullscreen"); $img.css({"padding":($rslide.height()-$img.height())/2}) - $(".slidectrl a.browserfullscreen").show(); + $(".slidectrl .browserfullscreen").show(); } } var changeImage = function(dom){ @@ -419,7 +421,7 @@ var galleryAPI = function(){ // $(".slideinfo b.info").text(imageArray[imagecount].title); if($('.bt-tag').hasClass("active")) updatePhotoTag(); - $(".slideinfo span.info").text(imageArray[imagecount].description); + $(".slideinfo .info").text(imageArray[imagecount].description); if(imageArray.length > 1) updateNavigation(); }) @@ -437,8 +439,8 @@ var galleryAPI = function(){ next = imagecount + 1; prev = imagecount - 1; } - $("a.navN").attr({"href":"orbit_gallery?theater="+imageArray[next]._id,"data-content":imageArray[next].file.url}); - $("a.navP").attr({"href":"orbit_gallery?theater="+imageArray[prev]._id,"data-content":imageArray[prev].file.url}); + $(".navN").attr({"href":"orbit_gallery?theater="+imageArray[next]._id,"data-content":imageArray[next].file.url}); + $(".navP").attr({"href":"orbit_gallery?theater="+imageArray[prev]._id,"data-content":imageArray[prev].file.url}); }; if(imageArray.length > 1) updateNavigation(); @@ -465,8 +467,8 @@ var galleryAPI = function(){ g.loadFooterPanel(g.loadArea,id,function(head){ head = $(head); g.albumArea.find(".rghead .rgfn").html(head); - g.albumArea.find("a.bt-back").attr("href","orbit_gallery?album="+albumid); - g.albumArea.find("a.bt-edit").attr("href","orbit_gallery?edit="+albumid); + g.albumArea.find(".bt-back").attr("href","orbit_gallery?album="+albumid); + g.albumArea.find(".bt-edit").attr("href","orbit_gallery?edit="+albumid); }) g.albumArea.css("margin-bottom","0"); picHeight = $(window).height() - ($("#orbit-bar").outerHeight() + $("#orbit_gallery .form-actions").outerHeight()); @@ -537,13 +539,13 @@ var galleryAPI = function(){ var re1 = new RegExp("^[\u4E00-\uFA29]*$"); //Chinese character range var re2 = new RegExp("^[\uE7C7-\uE7F3]*$"); if ((re1.test(sval) && (re2.test(sval)))){ - $("ul#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp(); + $("#gallery_tag_list li span:not(:contains("+sval+"))").parent().slideUp(); }else{ - $("ul#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp(); + $("#gallery_tag_list li span:not(:containsi("+sval+"))").parent().slideUp(); } }else{ - $("ul#gallery_tag_list li").slideDown(); + $("#gallery_tag_list li").slideDown(); } }) g.albumArea.find("#tag_panel .bt-save").click(function(){ diff --git a/vendor/built_in_modules/gallery/app/assets/stylesheets/gallery.css b/vendor/built_in_modules/gallery/app/assets/stylesheets/gallery.css index bb242c98..9c71fa01 100755 --- a/vendor/built_in_modules/gallery/app/assets/stylesheets/gallery.css +++ b/vendor/built_in_modules/gallery/app/assets/stylesheets/gallery.css @@ -224,10 +224,14 @@ border-left: solid 1px #222; } .slidectrl a.togglelist { background-position: 0 -30px; } +.slidectrl a.togglescreen { background-position: 0 -90px; } .slidectrl a.toinline { background-position: -30px 0; } .slidectrl a.sharebt { background-position: -30px -30px; } -.slidectrl a.browserfullscreen {background-position: -30px -30px; display:none;} +.slidectrl a.browserfullscreen { display:none;} .slidectrl a.slidestop { background-position: 0 -60px; } +.fullscreen .slidectrl a.togglescreen { background-position: -30px -90px; } +.browserFullScreen .slidectrl a.browserfullscreen { background-position: -30px 0; } +.browserFullScreen .togglescreen { display: none; } .slideinfo { height: 30px; line-height: 30px;