From 0f5707394b667a5e9420cda8e88ea118c05244d2 Mon Sep 17 00:00:00 2001 From: devin Date: Mon, 6 Aug 2012 22:11:36 +0800 Subject: [PATCH 1/2] encoding fixed Maybe there are some "chinese" in galleryAPI.js.erb and Ruby treat them all US-ASCII, so everything crash. see this post "http://stackoverflow.com/questions/7761540/encoding-issues-in-javascrip t-files-using-rails-asset-pipeline" --- .../gallery/app/assets/javascripts/galleryAPI.js.erb | 1 + 1 file changed, 1 insertion(+) 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 8c9c8d37..4feb3d03 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 @@ -1,3 +1,4 @@ +<%# encoding: utf-8 %> var galleryAPI = function(){ g = this; this.urlVars = rcom.getUrlVars(); From b5227c7b6c0d57f22e68088ef497be54dadbf079 Mon Sep 17 00:00:00 2001 From: devin Date: Tue, 7 Aug 2012 14:33:30 +0800 Subject: [PATCH 2/2] gallery update --- .../app/assets/javascripts/galleryAPI.js.erb | 20 ++++----- .../app/assets/stylesheets/gallery.css | 45 ++++++++++++++++--- 2 files changed, 49 insertions(+), 16 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 4feb3d03..b057a69d 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 @@ -119,13 +119,13 @@ var galleryAPI = function(){ this.loadImages = function(id){ //'); + var uploadpanel = $(''); + var frame = $(''); g.albumArea.find(".rghead .rgfn").html(headarea); g.albumArea.find(".rghead .rgfn a.bt-add").click(function(){ showUploadPanel(); @@ -311,8 +311,8 @@ var galleryAPI = function(){ }) } - var head = $('"><%= I18n.t("gallery.back_to_photos") %>'); - var head1 = $('" href="" ><%= I18n.t("gallery.edit") %>'); + var head = $('"><%= I18n.t("gallery.back_to_photos") %>'); + var head1 = $('" href="" ><%= I18n.t("gallery.edit") %>'); g.albumArea.find("#imgholder").load("theater?pic="+id,function(theater,response,xhr){ if(xhr.status == 404){ $(this).text("<%= I18n.t('gallery.pic_not_found') %>."); @@ -389,9 +389,9 @@ var galleryAPI = function(){ } $("#filter").remove(); g.albumArea.css("margin-top",""); - var head ='"><%= I18n.t("gallery.back_to_photos") %>'; - head+=''; - head+=''; + var head ='"><%= I18n.t("gallery.back_to_photos") %>'; + head+=''; + head+=''; g.albumArea.find(".rghead .rgfn").html(head); g.albumArea.find("#imgholder").load("edit_album?aid="+id,function(data,response,xhr){ if(xhr.status == 404){ 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 db766d6c..e21256bf 100755 --- a/vendor/built_in_modules/gallery/app/assets/stylesheets/gallery.css +++ b/vendor/built_in_modules/gallery/app/assets/stylesheets/gallery.css @@ -11,7 +11,11 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m */ -.rg, .rgp { } +.rg, .rgp { + transition: all 0.3s ease; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; +} .rg input, .rgp input, .rg textarea, .rgp textarea { resize: none; border: none; @@ -25,10 +29,9 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m .rgp textarea { overflow: auto; } .rg a, .rgp a { text-decoration: none; - color: #555; outline: none; } -.rg a:hover { color: #333; } +.rg a:hover { } .rg img { display: block; border: none; width: 120px; height: 90px; } .rgmask { background: #000; width: 100%; position: fixed; top: 0; left: 0; } @@ -52,9 +55,9 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m padding: 0 8px; } .rgbody { - /*padding: 20px 0 0 20px;*/ + } -.rgfn { float: right; padding: 4px 8px 0 0; } +.rgfn { overflow: hidden; padding: 4px 10px; } .rgalbum, .rgphoto { float: left; margin: 0 16px 24px 0; } .rgalbum { width: 134px; height: 169px; text-align: center; position: relative; margin-bottom: 12px; } .rgalbum img { @@ -164,6 +167,10 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m clear: both; z-index: 99; min-height: 250px; + + transition: all 0.3s ease; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; } .rslide.fullscreen { position: fixed; } .rslideinside { @@ -181,6 +188,10 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m height: auto; overflow: hidden; position: relative; + + transition: all 0.3s ease; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; } .comp img{ display: block; width: auto; height: auto; margin: 0 auto; cursor: pointer; min-height: 250px; } .comp .full{ width: auto; height: auto; max-width: 100%; max-height: 100%; } @@ -462,7 +473,29 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m .w380 { width: 380px; } +/* upload panel */ +#upload_panel_holder { + display: none; + margin: 16px 0 0 0; + clear: both; + float: right; + width: 100%; +} +#upload_panel { + background-color: #ddd; +} + +/* orbit style implementation */ +#orbit_gallery { + margin-bottom: 30px; +} #orbit_gallery .nav-tabs, #orbit_gallery .tab-pane { margin-left: 8px; margin-right: 8px; -} \ No newline at end of file +} +#orbit_gallery .btn { margin: 0; } +#orbit_gallery .rgfn .btn { + margin-left: 8px; +} +#orbit_gallery .rgfn i { margin-right: 4px; } +#orbit_gallery .form-actions { background-color: whiteSmoke; } \ No newline at end of file