From 50baac2cb7122a6a51101697e381e2b24dcd2804 Mon Sep 17 00:00:00 2001 From: devin Date: Thu, 9 Aug 2012 18:09:36 +0800 Subject: [PATCH] gallery update add "tag panel", not complete --- .../app/assets/javascripts/galleryAPI.js.erb | 14 +++- .../app/assets/stylesheets/gallery.css | 79 ++++++++++++++++++- .../back_end/orbit_galleries/index.html.erb | 57 +++++++++++++ .../gallery/config/locales/en.yml | 1 + .../gallery/config/locales/zh_tw.yml | 1 + 5 files changed, 148 insertions(+), 4 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 b057a69d..d323be35 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,10 +119,11 @@ var galleryAPI = function(){ this.loadImages = function(id){ //'); @@ -164,6 +165,13 @@ var galleryAPI = function(){ }) g.albumArea.find("#imgholder").append($addsign); + + // tag + $('.bt-tag').click(function(){ + $('#tag_panel').animate({'right':0}); + return false; + }); + } this.loadTheater = function(id){ var imageArray; @@ -311,7 +319,7 @@ var galleryAPI = function(){ }) } - var head = $('"><%= I18n.t("gallery.back_to_photos") %>'); + 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){ @@ -389,7 +397,7 @@ var galleryAPI = function(){ } $("#filter").remove(); g.albumArea.css("margin-top",""); - var head ='"><%= I18n.t("gallery.back_to_photos") %>'; + var head ='"><%= I18n.t("gallery.back_to_photos") %>'; head+=''; head+=''; g.albumArea.find(".rghead .rgfn").html(head); 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 4bd01d47..6147da3e 100755 --- a/vendor/built_in_modules/gallery/app/assets/stylesheets/gallery.css +++ b/vendor/built_in_modules/gallery/app/assets/stylesheets/gallery.css @@ -383,7 +383,7 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m text-indent: -999px; background-position: -358px 0; } - +/* .bt-add { background-position: 0 -106px; } .bt-add:hover { background-position: 0 -296px; } .bt-add:active { background-position: 0 -486px; } @@ -399,6 +399,7 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m .bt-save, .bt-finish { background-position: 0 -220px; } .bt-save:hover, .bt-finish:hover { background-position: 0 -410px; } .bt-save:active, .bt-finish:active { background-position: 0 -600px; } +*/ .bt-finish { display: block; float: right; clear: both; } .bt-addnew { margin: 0 auto; @@ -422,6 +423,7 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m right: 6px; top: 6px; } +/* .bt-close:hover { background-position: -436px 0; } .bt-close:active { background-position: -514px 0; } .bt-cls { background-position: 0 -790px; } @@ -441,6 +443,7 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m .bt-languages { background-position: -398px -72px; width: 32px; position: relative; } .bt-languages:hover { background-position: -438px -72px; } .bt-languages:active { background-position: -477px -72px; } +*/ .inputui { background: transparent 0 0 url(../../../assets/gallery/inputui.png) no-repeat; @@ -486,6 +489,80 @@ body.fullscreen, .fullscreen #container, .fullscreen #container2, .fullscreen #m background-color: #ddd; } +/* tag panel */ +#tag_panel { + position: fixed; + right: -200px; + top: 31px; + width: 200px; + min-height: 100px; + border-left: solid 1px #ccc; + background-color: #fff; +} +#tag_panel .scrollbar { + right: 0px; + top: 0px; + width: 9px; +} +#tag_panel .viewport { + height: 100%; +} + +.tag_list { + margin: 0; + padding: 0; +} +.tag_list li { + padding: 4px 6px; + border-top: solid 1px #f6f6f6; +} +.tag_list li:first-child { + border: 0; +} +.tag_list li:hover { + background-color: #08c; +} +.tag_list li:hover label { + color: #fff; +} +.tag_list input[type=checkbox], .tag_list label { + display: inline-block; + vertical-align: middle; + text-transform: capitalize; + margin: 0; +} +.tag_list label { + padding: 0 6px; +} +.tag_search { + position: absolute; + left: -1px; + bottom: -32px; + width: 200px; + height: 32px; + background-color: #f5f5f5; + border-left: solid 1px #ccc; + border-top: solid 1px #ddd; +} +.tag_search input[type=text] { + box-shadow: none; + width: 170px; + height: 25px; + line-height: 25px; + padding: 3px 6px 3px 24px; + border-top: solid 1px #fff; +} +.tag_search input[type=text]:focus { + background-color: #fff; +} +.tag_search .icon-search { + position: absolute; + left: 6px; + top: 50%; + margin-top: -7px; +} + + /* orbit style implementation */ #orbit_gallery { margin-bottom: 30px; diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/orbit_galleries/index.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/orbit_galleries/index.html.erb index 2ac01b05..32f73fd6 100644 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/orbit_galleries/index.html.erb +++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/orbit_galleries/index.html.erb @@ -61,11 +61,68 @@ --> +
+ +
+
+
+
+
+
+
+
+
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
+ +
+ +
diff --git a/vendor/built_in_modules/gallery/config/locales/en.yml b/vendor/built_in_modules/gallery/config/locales/en.yml index abdff615..afe5cf7b 100644 --- a/vendor/built_in_modules/gallery/config/locales/en.yml +++ b/vendor/built_in_modules/gallery/config/locales/en.yml @@ -1,6 +1,7 @@ en: gallery: album_name: Album Name + album_tag: Album Tag all: All select_category: "--Select a category--" manage_categories: Manage Categories diff --git a/vendor/built_in_modules/gallery/config/locales/zh_tw.yml b/vendor/built_in_modules/gallery/config/locales/zh_tw.yml index 97e59418..3288ba04 100644 --- a/vendor/built_in_modules/gallery/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/gallery/config/locales/zh_tw.yml @@ -1,6 +1,7 @@ zh_tw: gallery: album_name: 相簿名稱 + album_tag: 相簿標籤 all: 全部 select_category: 選擇類別 manage_categories: 類別管理