Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e351a84097 |
No files matched your search
@@ -107,18 +107,15 @@ $(function() {
|
|||||||
}
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#module_widget').on('change', '.checkbox-groups input', function(event) {
|
$('#module_widget').on('change', '.checkbox-groups input', function(event) {
|
||||||
var $checked = $(this);
|
var $checked = $(this);
|
||||||
if($checked.attr('type') == 'checkbox') {
|
if($checked.attr('type') == 'checkbox') {
|
||||||
if($checked.hasClass('select_all')) {
|
if($checked.hasClass('select_all') && $checked.prop('checked')) {
|
||||||
if($checked.prop('checked')){
|
$checked.closest('.checkbox').siblings('.groups').find('input[type="checkbox"]').prop('checked', false);
|
||||||
$checked.closest('.checkbox').siblings('.groups').find('input[type="checkbox"]').prop('checked', true);
|
} else if($checked.prop('checked') && !$checked.hasClass('lang-enable')) {
|
||||||
$checked.closest('.checkbox').siblings('.groups').find("input[type=hidden]").removeAttr('name');
|
$checked.closest('.groups').siblings('.checkbox').find('.select_all').prop('checked', false);
|
||||||
}else{
|
} else {
|
||||||
$checked.closest('.checkbox').siblings('.groups').find('input[type="checkbox"]').prop('checked', false);
|
|
||||||
$checked.closest('.checkbox').siblings('.groups').find("input[type=hidden]").attr('name', 'page_part['+$checked.closest('.checkbox-groups').data('for')+'][]');
|
|
||||||
}
|
|
||||||
} else if($checked.hasClass('lang-enable')) {
|
|
||||||
if($checked.prop('checked')) {
|
if($checked.prop('checked')) {
|
||||||
$checked.closest('.active-link').addClass('active').siblings('active-link').removeClass('active').end().find('.active-mune').slideDown(300);
|
$checked.closest('.active-link').addClass('active').siblings('active-link').removeClass('active').end().find('.active-mune').slideDown(300);
|
||||||
if(_status) {
|
if(_status) {
|
||||||
@@ -132,19 +129,6 @@ $(function() {
|
|||||||
$(this).find('input:eq(0)').prop('checked', true);
|
$(this).find('input:eq(0)').prop('checked', true);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
var checkboxes_size = $checked.closest('.groups').find("input[type=checkbox]").length,
|
|
||||||
checked_size = $checked.closest('.groups').find("input:checked").length;
|
|
||||||
if(checkboxes_size == checked_size)
|
|
||||||
$checked.closest('.groups').siblings('.checkbox').find('.select_all').prop('checked', true);
|
|
||||||
else
|
|
||||||
$checked.closest('.groups').siblings('.checkbox').find('.select_all').prop('checked', false);
|
|
||||||
|
|
||||||
if(checked_size == 0)
|
|
||||||
$checked.closest('.groups').find("input[type=hidden]").attr('name', 'page['+$checked.closest('.checkbox-groups').data('for')+'][]');
|
|
||||||
else
|
|
||||||
$checked.closest('.groups').find("input[type=hidden]").removeAttr('name');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
} else if($checked.attr('type') == 'radio' && !$(this).closest('div').hasClass('active-mune')) {
|
} else if($checked.attr('type') == 'radio' && !$(this).closest('div').hasClass('active-mune')) {
|
||||||
|
|||||||
@@ -153,15 +153,15 @@ class ApplicationController < ActionController::Base
|
|||||||
if LIST[:forbidden_item_names].include?(env['PATH_INFO'].split('/')[1].to_s)
|
if LIST[:forbidden_item_names].include?(env['PATH_INFO'].split('/')[1].to_s)
|
||||||
condition = VALID_LOCALES.include?(session[:locale])
|
condition = VALID_LOCALES.include?(session[:locale])
|
||||||
#check if the default locale is present or not
|
#check if the default locale is present or not
|
||||||
elsif params[:locale]
|
elsif session[:locale]
|
||||||
condition = @site.in_use_locales.include?(params[:locale])
|
condition = @site.in_use_locales.include?(session[:locale])
|
||||||
elsif @site.default_locale.present?
|
|
||||||
default_locale = @site.default_locale
|
|
||||||
condition = @site.in_use_locales.include?(default_locale)
|
|
||||||
elsif @site.enable_language_detection
|
elsif @site.enable_language_detection
|
||||||
#check enable langauge detection
|
#check enable langauge detection
|
||||||
browser_locale = request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first rescue nil
|
browser_locale = request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first rescue nil
|
||||||
condition = @site.in_use_locales.include?(browser_locale)
|
condition = @site.in_use_locales.include?(browser_locale)
|
||||||
|
elsif @site.default_locale.present?
|
||||||
|
default_locale = @site.default_locale
|
||||||
|
condition = @site.in_use_locales.include?(default_locale)
|
||||||
end
|
end
|
||||||
|
|
||||||
session[:locale] = condition ? (browser_locale || session[:locale] || default_locale) : I18n.default_locale.to_s
|
session[:locale] = condition ? (browser_locale || session[:locale] || default_locale) : I18n.default_locale.to_s
|
||||||
|
|||||||
@@ -197,7 +197,6 @@ class PagesController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
@item = Item.root.children.where(:module_app_id => module_app.id).first unless @item
|
@item = Item.root.children.where(:module_app_id => module_app.id).first unless @item
|
||||||
@item = Item.where(:module_app_id => module_app.id).first unless @item
|
|
||||||
end
|
end
|
||||||
raise PageError,'Missing Frontend Page' if @item.nil?
|
raise PageError,'Missing Frontend Page' if @item.nil?
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -97,26 +97,25 @@
|
|||||||
<%= f.select :widget_path, @widget_paths, {}, selected: (@part.widget_path rescue nil), class: "input-xlarge change" %>
|
<%= f.select :widget_path, @widget_paths, {}, selected: (@part.widget_path rescue nil), class: "input-xlarge change" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group input-content checkbox-groups <%= 'hide' if @module_app_categories.blank? %>" id="page-category-groups" data-for="category">
|
<div class="control-group input-content checkbox-groups <%= 'hide' if @module_app_categories.blank? %>" id="page-category-groups">
|
||||||
<%= f.label :categories, t(:categories), class: "control-label muted" %>
|
<%= f.label :categories, t(:categories), class: "control-label muted" %>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= content_tag :label, class: "checkbox" do %>
|
<%= content_tag :label, class: "checkbox" do %>
|
||||||
<%= check_box_tag nil, nil, (@part.category.size == @module_app_categories.size ? true : false), class: "select_all" %> <%= t(:all) %>
|
<%= check_box_tag nil, nil, false, class: "select_all" %> <%= t(:all) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="groups" id="page-category">
|
<div class="groups" id="page-category">
|
||||||
<%= content_tag_for(:label, @module_app_categories, class: "checkbox inline") do |category|%>
|
<%= content_tag_for(:label, @module_app_categories, class: "checkbox inline") do |category|%>
|
||||||
<%= check_box_tag("page_part[category][]", category.id, (@part.category.include?(category.id.to_s) rescue false) ) %>
|
<%= check_box_tag("page_part[category][]", category.id, (@part.category.include?(category.id.to_s) rescue false) ) %>
|
||||||
<%= category.title %>
|
<%= category.title %>
|
||||||
<% end if @module_app_categories %>
|
<% end if @module_app_categories %>
|
||||||
<input type="hidden" value>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group input-content checkbox-groups <%= 'hide' if @module_app_tags.blank? %>" id="page-tags-groups" data-for="tag">
|
<div class="control-group input-content checkbox-groups <%= 'hide' if @module_app_tags.blank? %>" id="page-tags-groups">
|
||||||
<%= f.label :tags, t(:tags), class: "control-label muted" %>
|
<%= f.label :tags, t(:tags), class: "control-label muted" %>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= content_tag :label, class: "checkbox" do %>
|
<%= content_tag :label, class: "checkbox" do %>
|
||||||
<%= check_box_tag nil, nil, (@part.tag.size == @module_app_tags.size ? true : false), class: "select_all" %> <%= t(:all) %>
|
<%= check_box_tag nil, nil, true, class: "select_all" %> <%= t(:all) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="groups" id="page-tags">
|
<div class="groups" id="page-tags">
|
||||||
<%= content_tag_for(:label, @module_app_tags, class: "checkbox inline") do |tag|%>
|
<%= content_tag_for(:label, @module_app_tags, class: "checkbox inline") do |tag|%>
|
||||||
@@ -163,8 +162,8 @@
|
|||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
function toggleChecked(status) {
|
function toggleChecked(status) {
|
||||||
$(".checkbox").each( function() {
|
$(".checkbox").each( function() {
|
||||||
$(this).attr("checked",status);
|
$(this).attr("checked",status);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -1,23 +1,19 @@
|
|||||||
<% if @menu_page.children.present? %>
|
<% if @menu_page %>
|
||||||
<div class='category_list'>
|
<div class='category_list'>
|
||||||
<!-- <h3 class='h3'><%#= @menu_page.title %></h3> -->
|
<!-- <h3 class='h3'><%#= @menu_page.title %></h3> -->
|
||||||
<ul class='list'>
|
<ul class='list'>
|
||||||
|
|
||||||
<% @menu_page.visible_children.each do |child| %>
|
<% @menu_page.visible_children.each do |child| %>
|
||||||
|
<% if @menu_page.visible_children.nil?%>
|
||||||
|
<p>Test</p>
|
||||||
|
<li class="<%= @page_id.eql?(child.parent.id) ? 'active' : nil %>">
|
||||||
|
<a href="<%= (child.parent.class.to_s.eql?('Page') ? '/' + child.parent.path : child.parent.url) %>"><%= child.parent.title %></a>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
|
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
|
||||||
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>
|
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<div class='category_list'>
|
|
||||||
<!-- <h3 class='h3'><%#= @menu_page.title %></h3> -->
|
|
||||||
<ul class='list'>
|
|
||||||
<% @menu_page.parent.parent.visible_children.each do |child| %>
|
|
||||||
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
|
|
||||||
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<%= stylesheet_link_tag "default_widget" %>
|
<%= stylesheet_link_tag "default_widget" %>
|
||||||
<%= javascript_include_tag "mobile/jquery.mu.image.resize.js" %>
|
<script type='text/javascript' src='/assets/lib/jquery.mu.image.resize.js'></script>
|
||||||
<!-- <script type='text/javascript' src='/assets/lib/jquery.mu.image.resize.degsin.js'></script> -->
|
<!-- <script type='text/javascript' src='/assets/lib/jquery.mu.image.resize.degsin.js'></script> -->
|
||||||
|
|
||||||
<div id="bulletin_widget">
|
<div id="bulletin_widget">
|
||||||
|
|||||||
Vendored
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
<%= stylesheet_link_tag "default_widget" %>
|
<%= stylesheet_link_tag "default_widget" %>
|
||||||
<%= javascript_include_tag "mobile/jquery.mu.image.resize.js" %>
|
<script type='text/javascript' src='/assets/jquery.mu.image.resize.js'></script>
|
||||||
|
<script type='text/javascript' src='/assets/jquery.mu.image.resize.degsin.js'></script>
|
||||||
|
|
||||||
<div id="archive_file_widget">
|
<div id="archive_file_widget">
|
||||||
<%= render 'index' %>
|
<%= render 'index' %>
|
||||||
|
|||||||
Vendored
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
<%= stylesheet_link_tag "default_widget" %>
|
<%= stylesheet_link_tag "default_widget" %>
|
||||||
<%= javascript_include_tag "mobile/jquery.mu.image.resize.js" %>
|
<script type='text/javascript' src='/assets/jquery.mu.image.resize.js'></script>
|
||||||
|
<script type='text/javascript' src='/assets/jquery.mu.image.resize.degsin.js'></script>
|
||||||
|
|
||||||
<div id="archive_file_widget">
|
<div id="archive_file_widget">
|
||||||
<%= render 'index' %>
|
<%= render 'index' %>
|
||||||
|
|||||||
Vendored
+1
-7
@@ -108,16 +108,10 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
|||||||
tags << get_tags.include?(tag)
|
tags << get_tags.include?(tag)
|
||||||
end
|
end
|
||||||
|
|
||||||
if image.file.theater.present?
|
|
||||||
@image_file = image.file.theater.url
|
|
||||||
else
|
|
||||||
@image_file = image.file.url
|
|
||||||
end
|
|
||||||
|
|
||||||
output << {
|
output << {
|
||||||
image_title: image.title,
|
image_title: image.title,
|
||||||
image_description: image.description,
|
image_description: image.description,
|
||||||
image_file: { url: "http://#{request.host_with_port}#{@image_file}",
|
image_file: { url: "http://#{request.host_with_port}#{image.file.url}",
|
||||||
thumb: "http://#{request.host_with_port}#{image.file.thumb.to_s}"},
|
thumb: "http://#{request.host_with_port}#{image.file.thumb.to_s}"},
|
||||||
image_tag_names: tags}
|
image_tag_names: tags}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -91,10 +91,9 @@ class WritingBook
|
|||||||
title << self.publisher if self.publisher.present?
|
title << self.publisher if self.publisher.present?
|
||||||
title << self.isbn if self.isbn.present?
|
title << self.isbn if self.isbn.present?
|
||||||
|
|
||||||
if !self.publish_date.nil?
|
pd = self.publish_date.strftime("%Y-%m-%d").split('-')
|
||||||
pd = self.publish_date.strftime("%Y-%m-%d").split('-')
|
|
||||||
title << pd[0]+"/"+pd[1]
|
title << pd[0]+"/"+pd[1]
|
||||||
end
|
|
||||||
|
|
||||||
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
|
|||||||
+2
-4
@@ -88,11 +88,9 @@ class WritingConference
|
|||||||
|
|
||||||
title << self.authors if self.authors.present?
|
title << self.authors if self.authors.present?
|
||||||
|
|
||||||
if !self.publication_date.nil?
|
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
|
||||||
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
|
|
||||||
title << pd[0]
|
|
||||||
end
|
|
||||||
|
|
||||||
|
title << pd[0]
|
||||||
title << self.paper_title if self.paper_title.present?
|
title << self.paper_title if self.paper_title.present?
|
||||||
title << self.conference_title if self.conference_title.present?
|
title << self.conference_title if self.conference_title.present?
|
||||||
title << self.location if self.location.present?
|
title << self.location if self.location.present?
|
||||||
|
|||||||
@@ -94,10 +94,9 @@ class WritingJournal
|
|||||||
|
|
||||||
title << self.authors if self.authors.present?
|
title << self.authors if self.authors.present?
|
||||||
|
|
||||||
if !self.publication_date.nil?
|
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
|
||||||
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
|
|
||||||
title << pd[0]
|
title << pd[0]
|
||||||
end
|
|
||||||
title << self.paper_title if self.paper_title.present?
|
title << self.paper_title if self.paper_title.present?
|
||||||
title << self.journal_title if self.journal_title.present?
|
title << self.journal_title if self.journal_title.present?
|
||||||
title << self.vol_no if (self.vol_no.present? && self.vol_no != "0")
|
title << self.vol_no if (self.vol_no.present? && self.vol_no != "0")
|
||||||
|
|||||||
Reference in new issue
Block a user