Compare commits

...
Author SHA1 Message Date
harrybomrah 1c2c271232 design change in album view 2013-11-06 16:34:09 +08:00
harrybomrah 6f44a20843 gallery all bugs fixed.. 2013-11-06 15:23:28 +08:00
9 changed files with 46 additions and 30 deletions

No files matched your search

@@ -239,7 +239,7 @@ $(function() {
}
});
var fetchNewImages = function(){
var lastid = $("li.rgalbum:last").data("image-id"),
var lastid = ( $("li.rgalbum:last").length ? $("li.rgalbum:last").data("image-id") : null),
albumid = $("#fileupload_aid").val();
$.ajax({
@@ -13,6 +13,7 @@ var galleryAPI = function(){
this.loading = $("#loading");
this.loadTheater = function(id){
$( ".breadcrumb li:eq(1) a" ).attr("href","/panel/gallery/back_end/albums");
g.loadstart();
var imageArray;
var imagecount = 0;
@@ -17,7 +17,7 @@
#orbit_gallery .rgalbum:hover {
box-shadow: 0px 0px 5px rgba(0,0,0,.2);
}
#orbit_gallery .rgalbum a {
#orbit_gallery .rgalbum > a {
position: relative;
display: block;
overflow: hidden;
@@ -35,7 +35,7 @@
#orbit_gallery .rgalbum:hover a img {
-webkit-filter: blur(2px);
}
#orbit_gallery .rgalbum a:after {
#orbit_gallery .rgalbum > a:after {
content: "";
position: absolute;
top: 0;
@@ -95,15 +95,24 @@
display: inline-block;
float: left;
color: #777777;
font-size: 11px;
font-size: 1.2em;
line-height: 20px;
cursor: pointer;
}
#orbit_gallery .rgalbum .gallery_info li > a {
display: inline-block;
margin-left: 5px;
color: #777777;
}
#orbit_gallery .rgalbum .gallery_info li:hover > a {
color: #E41B2B;
text-decoration: none;
}
#orbit_gallery .rgalbum .gallery_info li:hover {
color: #0088CC;
}
#orbit_gallery .rgalbum .gallery_info li .icons-tag {
margin-left: 10px;
margin-left: 3px;
}
#orbit_gallery .rgalbum .gallery_info li.albumcateg {
float: right;
@@ -230,6 +239,7 @@
#imgholder .rgalbum a img {
max-width: none;
}
#imgholder .rgalbum .check {
position: absolute;
top: 0;
@@ -557,8 +557,8 @@
}
#loading{
background: #fff 0 center url("../../../assets/gallery/ajax-loader.gif") no-repeat;
background: #fff 0 center url("../../../assets/loading.gif") no-repeat;
height: 16px;
margin: auto;
width: 32px;
width: 220px;
}
@@ -155,10 +155,15 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
render :json=>{"files"=>a}.to_json
end
def new_images
@lastimage = GalleryImage.find(params[:last_image_id])
@album = GalleryAlbum.find(params[:album_id])
@newimages = @album.gallery_images.where(:created_at.gt => @lastimage.created_at)
def new_images
if params[:last_image_id] != ""
@lastimage = GalleryImage.find(params[:last_image_id])
@album = GalleryAlbum.find(params[:album_id])
@newimages = @album.gallery_images.where(:created_at.gt => @lastimage.created_at)
else
@album = GalleryAlbum.find(params[:album_id])
@newimages = @album.gallery_images
end
render :layout=>false
end
@@ -184,9 +189,11 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
tagsToDestroy << tag
end
end
new_tags.each do |tag|
if !old_tags.include?(tag)
tagsToAdd << tag
if new_tags != nil
new_tags.each do |tag|
if !old_tags.include?(tag)
tagsToAdd << tag
end
end
end
update_children_image_tag(tagsToDestroy,tagsToAdd)
@@ -8,9 +8,10 @@
<p class="albumname"><%= album.name %></p>
</a>
<ul class="gallery_info clearfix">
<li class="view"><i class="icons-eye"></i> 321</li>
<!-- <li class="view"><i class="icons-eye"></i> 321</li> -->
<li><i class="icons-tag"></i></li>
<li class="albumcateg"></li>
<li><%= link_to (content_tag(:i,"",:class=>"icon-trash danger")), panel_gallery_back_end_album_path(album), :confirm => "Are you sure?", :method=>:delete %></li>
<li class="albumcateg"><%= Category.find(album.category_id).title %></li>
</ul>
<ul class="albumtag">
<% album.tagged_ids.each do |tag| %>
@@ -63,15 +63,9 @@
<div class="nav-name"><strong>Language</strong></div>
<ul class="nav nav-pills language-nav">
<% @site_valid_locales.each_with_index do |locale, i| %>
<% if i == 0 %>
<li class="active">
<a href=".en" data-toggle="tab">English</a>
<li <%= (i == 0 ? 'class=active' : '') %>>
<a href=".<%= locale %>" data-toggle="tab"><%= I18nVariable.from_locale(locale) %></a>
</li>
<% else %>
<li>
<a href=".tw_zh" data-toggle="tab">Chinese</a>
</li>
<% end %>
<% end %>
</ul>
<div class="tab-content language-area">
@@ -79,11 +73,8 @@
<% @site_valid_locales.each_with_index do |locale, i| %>
<% if i == 0 %>
<div class="tab-pane fade in active en">
<% else %>
<div class="tab-pane fade tw_zh">
<% end %>
<div class="tab-pane fade in <%= (i == 0 ? 'active' : '') %> <%= locale %>">
<div class="control-group input-title">
<%= f.fields_for :name_translations do |name| %>
<%= label_tag(locale, t("gallery.album_name"),:class=>"control-label muted") %>
@@ -4,6 +4,12 @@
values: @tags,
translation: 'tags',
object_field: 'name'
filter_field type: 'objects',
values: @categories,
translation: 'category',
object_field: 'title'
footer link: 'new_panel_gallery_back_end_album_path',
paginate: false
end %>
@@ -19,7 +19,7 @@
<a href="#view-photo-tags" class="btn btn-primary btn-small addtags open hide" for="batch"><i class="icons-tag"></i> Add Tags</a>
<a href="<%= edit_panel_gallery_back_end_album_path(@album) %>" class="btn btn-small btn-success"><i class="icon-edit"></i> Edit</a>
<b class="divider"></b>
<%= link_to (content_tag(:i,"",:class=>"icon-trash")), panel_gallery_back_end_album_path(@album), :class=>"btn btn-small btn-danger", :confirm => "Are you sure?", :method=>:delete %>
<a href="#" class="add-imgs btn btn-small btn-primary"><i class="icons-plus"></i> Add Image</a>
</div>
<form action="<%= panel_gallery_back_end_upload_image_path %>", id='fileupload'>