Merge branch 'openness' of github.com:Rulingcom/orbit into openness

Conflicts:
	vendor/built_in_modules/calendar/app/assets/javascripts/calendarAPI.js.erb
This commit is contained in:
chris 2012-11-21 18:33:04 +08:00
commit 0aaadbc82d
8 changed files with 27 additions and 22 deletions

View File

@ -321,8 +321,6 @@ var calendarAPI = function(){
var recordcurdate = true; var recordcurdate = true;
if(allow){ if(allow){
//console.log(pos);
if(pos == 1){ if(pos == 1){
var colspan = 0; var colspan = 0;
if(evnt.total_days>7){ if(evnt.total_days>7){

View File

@ -1,7 +1,12 @@
class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
include AdminHelper include AdminHelper
before_filter :force_order_for_user, :except => [:index,:get_album_json,:get_imgs_json] # before_filter :force_order_for_user, :except => [:index,:get_album_json,:get_imgs_json]
before_filter :force_order_for_visitor,:only=>[:index,:get_album_json,:get_imgs_json,:get_albums]
before_filter :force_order_for_user,:except => [:index,:get_album_json,:get_imgs_json,:get_albums]
before_filter :for_app_sub_manager,:except => [:index,:get_album_json,:get_imgs_json,:get_albums]
# before_filter lambda
def index def index
if is_manager? || is_admin? || is_sub_manager? if is_manager? || is_admin? || is_sub_manager?

View File

@ -1,7 +1,7 @@
class Panel::Gallery::Widget::AlbumsController < OrbitWidgetController class Panel::Gallery::Widget::AlbumsController < OrbitWidgetController
def widget1 def widget1
@settings = {"vertical"=>2,"horizontal"=>6} @settings = {"vertical"=>2,"horizontal"=>6} #[note] horizontal has it's limitation from 2 to 6
@class = "c" + @settings["horizontal"].to_s @class = "c" + @settings["horizontal"].to_s
@total = @settings["vertical"] * @settings["horizontal"] @total = @settings["vertical"] * @settings["horizontal"]
@rnd = Random.new @rnd = Random.new

View File

@ -5,7 +5,7 @@ class GalleryAlbum
field :name, localize: true field :name, localize: true
field :description, localize: true field :description, localize: true
field :cover, default: "default" field :cover, default: "default"
field :cover_path field :cover_path #can refact
field :tag_names field :tag_names
belongs_to :gallery_category belongs_to :gallery_category

View File

@ -48,17 +48,17 @@
<div class="viewport"> <div class="viewport">
<div class="overview"> <div class="overview">
<ul class="tag_list" id="gallery_tag_list"> <ul class="tag_list" id="gallery_tag_list">
<% if @authenticated %> <%# if @authenticated %>
<% @tags.each do |tag| %> <% @tags.each do |tag| %>
<li data-content="<%= tag.id %>"><input id="tag_<%= tag.id %>" type="checkbox"><label for="tag_<%= tag.id %>"><%= tag[I18n.locale] %></label><span style="display:none;"><%= tag[@locales[1]] %> <%= tag[@locales[0]] %></span></li> <li data-content="<%= tag.id %>"><input id="tag_<%= tag.id %>" type="checkbox"><label for="tag_<%= tag.id %>"><%= tag[I18n.locale] %></label><span style="display:none;"><%= tag[@locales[1]] %> <%= tag[@locales[0]] %></span></li>
<% end %> <% end %>
<% end %> <%# end %>
</ul> </ul>
</div> </div>
</div> </div>
<% if @authenticated %> <%# if @authenticated %>
<div class="tag_search"><div class="icon-search"></div><input type="text" value="<%= t('gallery.search_tags') %>" onblur="if(this.value=='')this.value='<%= t('gallery.search_tags') %>';" onfocus="if(this.value=='<%= t("gallery.search_tags") %>')this.value='';" id="tag_search_box"> <div class="tag_save"><a class="btn bt-save"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a></div></div> <div class="tag_search"><div class="icon-search"></div><input type="text" value="<%= t('gallery.search_tags') %>" onblur="if(this.value=='')this.value='<%= t('gallery.search_tags') %>';" onfocus="if(this.value=='<%= t("gallery.search_tags") %>')this.value='';" id="tag_search_box"> <div class="tag_save"><a class="btn bt-save"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a></div></div>
<% end %> <%# end %>
</div> </div>
@ -83,9 +83,9 @@
<div class="form-actions form-fixed pagination-right rghead"> <div class="form-actions form-fixed pagination-right rghead">
<div class="rgfn"> <div class="rgfn">
<a href="" class="bt-back btn pull-left" title="<%= I18n.t("gallery.back_to_photos") %>"><i class="icon-arrow-left icon-black"></i><%= I18n.t("gallery.back_to_photos") %></a> <a href="" class="bt-back btn pull-left" title="<%= I18n.t("gallery.back_to_photos") %>"><i class="icon-arrow-left icon-black"></i><%= I18n.t("gallery.back_to_photos") %></a>
<% if @authenticated %> <%# if @authenticated %>
<a class="bt-edit btn btn-primary pull-right" title="<%= I18n.t("gallery.edit") %>" href="<%= edit_panel_gallery_back_end_album_path(@album) %>" ><i class="icon-pencil icon-white"></i><%= I18n.t("gallery.edit") %></a> <a class="bt-edit btn btn-primary pull-right" title="<%= I18n.t("gallery.edit") %>" href="<%= edit_panel_gallery_back_end_album_path(@album) %>" ><i class="icon-pencil icon-white"></i><%= I18n.t("gallery.edit") %></a>
<% end %> <% #end %>
<a class="bt-tag btn btn-primary pull-right" title="<%= I18n.t("gallery.photo_tag") %>" href="#tags" ><i class="icon-tag icon-white"></i><%= I18n.t("gallery.photo_tag") %></a> <a class="bt-tag btn btn-primary pull-right" title="<%= I18n.t("gallery.photo_tag") %>" href="#tags" ><i class="icon-tag icon-white"></i><%= I18n.t("gallery.photo_tag") %></a>
</div> </div>
</div> </div>

View File

@ -1,4 +1,3 @@
<%= stylesheet_link_tag "gallery" %> <%= stylesheet_link_tag "gallery" %>
<div id="filter" class="subnav"> <div id="filter" class="subnav">
@ -44,13 +43,16 @@
</div> </div>
</div> </div>
<% if is_sub_manager? %>
<div class="form-actions form-fixed pagination-right rghead"> <div class="form-actions form-fixed pagination-right rghead">
<div class="rgfn"> <div class="rgfn">
<% if @authenticated %>
<a class="btn btn-primary pull-right" title="<%= I18n.t("gallery.add_album") %>" href="<%= new_panel_gallery_back_end_album_path %>" onclick="return false;"><i class="icon-plus icon-white"></i><%= I18n.t("gallery.add_album") %></a> <a class="btn btn-primary pull-right" title="<%= I18n.t("gallery.add_album") %>" href="<%= new_panel_gallery_back_end_album_path %>" onclick="return false;"><i class="icon-plus icon-white"></i><%= I18n.t("gallery.add_album") %></a>
<% end %>
</div> </div>
</div> </div>
<%end %>
</div> </div>
<% content_for :page_specific_javascript do %> <% content_for :page_specific_javascript do %>
<%= javascript_include_tag "galleryAPI" %> <%= javascript_include_tag "galleryAPI" %>

View File

@ -25,17 +25,17 @@
<div class="viewport"> <div class="viewport">
<div class="overview"> <div class="overview">
<ul class="tag_list" id="gallery_tag_list"> <ul class="tag_list" id="gallery_tag_list">
<% if @authenticated %> <%# if @authenticated %>
<% @tags.each do |tag| %> <% @tags.each do |tag| %>
<li data-content="<%= tag.id %>"><input id="tag_<%= tag.id %>" type="checkbox"><label for="tag_<%= tag.id %>"><%= tag[I18n.locale] %></label><span style="display:none;"><%= tag[@locales[1]] %> <%= tag[@locales[0]] %></span></li> <li data-content="<%= tag.id %>"><input id="tag_<%= tag.id %>" type="checkbox"><label for="tag_<%= tag.id %>"><%= tag[I18n.locale] %></label><span style="display:none;"><%= tag[@locales[1]] %> <%= tag[@locales[0]] %></span></li>
<% end %> <% end %>
<% end %> <%# end %>
</ul> </ul>
</div> </div>
</div> </div>
<% if @authenticated %> <% #if @authenticated %>
<div class="tag_search"><div class="icon-search"></div><input type="text" value="<%= t('gallery.search_tags') %>" onblur="if(this.value=='')this.value='<%= t('gallery.search_tags') %>';" onfocus="if(this.value=='<%= t("gallery.search_tags") %>')this.value='';" id="tag_search_box"> <div class="tag_save"><a class="btn bt-save"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a></div></div> <div class="tag_search"><div class="icon-search"></div><input type="text" value="<%= t('gallery.search_tags') %>" onblur="if(this.value=='')this.value='<%= t('gallery.search_tags') %>';" onfocus="if(this.value=='<%= t("gallery.search_tags") %>')this.value='';" id="tag_search_box"> <div class="tag_save"><a class="btn bt-save"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a></div></div>
<% end %> <%# end %>
</div> </div>
@ -61,11 +61,11 @@
<div class="rgfn"> <div class="rgfn">
<a class="bt-back btn btn-primary pull-left" title="<%= I18n.t("gallery.back_to_albums") %>" href="<%= panel_gallery_back_end_albums_path %>"><i class="icon-arrow-left icon-white"></i><%= I18n.t("gallery.back_to_albums") %></a> <a class="bt-back btn btn-primary pull-left" title="<%= I18n.t("gallery.back_to_albums") %>" href="<%= panel_gallery_back_end_albums_path %>"><i class="icon-arrow-left icon-white"></i><%= I18n.t("gallery.back_to_albums") %></a>
<a class="bt-tag btn btn-primary pull-right" title="<%= I18n.t("gallery.album_tag") %>" href="" ><i class="icon-tag icon-white"></i><%= I18n.t("gallery.album_tag") %></ a> <a class="bt-tag btn btn-primary pull-right" title="<%= I18n.t("gallery.album_tag") %>" href="" ><i class="icon-tag icon-white"></i><%= I18n.t("gallery.album_tag") %></ a>
<% if @authenticated %> <%# if @authenticated %>
<a class="bt-add btn btn-primary pull-right" title="<%= I18n.t("gallery.add_images") %>" href="images" onclick="return false;"><i class="icon-plus icon-white"></i><%= I18n.t("gallery.add_images") %></a> <a class="bt-add btn btn-primary pull-right" title="<%= I18n.t("gallery.add_images") %>" href="images" onclick="return false;"><i class="icon-plus icon-white"></i><%= I18n.t("gallery.add_images") %></a>
<a class="bt-del btn btn-primary pull-right" title="<%= I18n.t("gallery.del_album") %>" href="delete" onclick="return false;"><i class="icon-trash icon-white"></i><%= I18n.t("gallery.del_album") %></a> <a class="bt-del btn btn-primary pull-right" title="<%= I18n.t("gallery.del_album") %>" href="delete" onclick="return false;"><i class="icon-trash icon-white"></i><%= I18n.t("gallery.del_album") %></a>
<a class="bt-edit btn btn-primary pull-right" title="<%= I18n.t("gallery.edit") %>" href="<%= edit_panel_gallery_back_end_album_path(@album) %>" ><i class="icon-pencil icon-white"></i><%= I18n.t("gallery.edit") %></a> <a class="bt-edit btn btn-primary pull-right" title="<%= I18n.t("gallery.edit") %>" href="<%= edit_panel_gallery_back_end_album_path(@album) %>" ><i class="icon-pencil icon-white"></i><%= I18n.t("gallery.edit") %></a>
<% end %> <%# end %>
</div> </div>
</div> </div>
</div> </div>

View File

@ -14,7 +14,7 @@
</div> </div>
</div> </div>
<!-- tag part --> <!-- tag part -->
<% if @authenticated %> <%# if @authenticated %>
<div id="tag_panel" class="my_scroll"> <div id="tag_panel" class="my_scroll">
<div class="scrollbar"> <div class="scrollbar">
<div class="track"> <div class="track">
@ -41,7 +41,7 @@
<div class="tag_search"><div class="icon-search"></div><input type="text" value="<%= t('gallery.search_tags') %>" onblur="if(this.value=='')this.value='<%= t('gallery.search_tags') %>';" onfocus="if(this.value=='<%= t("gallery.search_tags") %>')this.value='';" id="tag_search_box"><div class="tag_save"><a class="btn bt-save"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a></div></div> <div class="tag_search"><div class="icon-search"></div><input type="text" value="<%= t('gallery.search_tags') %>" onblur="if(this.value=='')this.value='<%= t('gallery.search_tags') %>';" onfocus="if(this.value=='<%= t("gallery.search_tags") %>')this.value='';" id="tag_search_box"><div class="tag_save"><a class="btn bt-save"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a></div></div>
</div> </div>
<% end %> <%# end %>
<% content_for :page_specific_javascript do %> <% content_for :page_specific_javascript do %>
<%= javascript_include_tag "jquery.tinyscrollbar" %> <%= javascript_include_tag "jquery.tinyscrollbar" %>
<% end %> <% end %>