Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbc3d3ae86 | ||
|
|
ed569601c3 | ||
|
|
9e432a5a93 | ||
|
|
2f61f55be2 |
No files matched your search
@@ -38,9 +38,11 @@ if($.support.touch) {
|
||||
$checked.each(function() {
|
||||
if(!$(this).closest('div').hasClass('togglebox')) {
|
||||
$(this).wrap('<div class="toggle-control"/>');
|
||||
if($(this).attr('type') == "hidden" && $(this).attr('value')) {
|
||||
$(this).wrap('<div class="togglebox disabled" />');
|
||||
if($(this).attr('type') == "hidden" && $(this).attr('value') == 'true') {
|
||||
console.log('true')
|
||||
$(this).wrap('<div class="togglebox disable" />');
|
||||
} else {
|
||||
console.log('false')
|
||||
$(this).wrap('<div class="togglebox" />');
|
||||
}
|
||||
$('<label><b></b></label>').insertAfter($(this));
|
||||
@@ -541,6 +543,7 @@ function changeStatusHidden() {
|
||||
|
||||
// Document Ready
|
||||
$(function() {
|
||||
console.log('true')
|
||||
showFiltersOnPageRefresh();
|
||||
|
||||
new ini();
|
||||
|
||||
@@ -222,7 +222,7 @@ $(function() {
|
||||
});
|
||||
$('#user-forms').delegate('.togglebox, .delete, .trigger, .remove-input', clickEvent, function(event) {
|
||||
if($(this).hasClass('togglebox')) {
|
||||
if($(this).hasClass('disabled')) {
|
||||
if($(this).hasClass('disable')) {
|
||||
$(this).find('.toggle-check')
|
||||
.attr('value', 'false')
|
||||
.closest('.attributes')
|
||||
@@ -237,7 +237,7 @@ $(function() {
|
||||
.children('.attributes-body')
|
||||
.fadeOut(300);
|
||||
}
|
||||
$(this).toggleClass('disabled');
|
||||
$(this).toggleClass('disable');
|
||||
};
|
||||
if($(this).hasClass('remove-input')) {
|
||||
$(this).closest('.input-append').fadeOut(300, function() {
|
||||
@@ -382,7 +382,7 @@ $(function() {
|
||||
});
|
||||
$('#attributes-area').delegate('.togglebox, .delete, .trigger, .remove-input', clickEvent, function(event) {
|
||||
if($(this).hasClass('togglebox')) {
|
||||
if($(this).hasClass('disabled')) {
|
||||
if($(this).hasClass('disable')) {
|
||||
$(this).find('.toggle-check')
|
||||
.attr('value', 'false')
|
||||
.closest('.attributes')
|
||||
@@ -411,7 +411,7 @@ $(function() {
|
||||
$(this).parent('.field-type').removeClass('in');
|
||||
});
|
||||
}
|
||||
$(this).toggleClass('disabled');
|
||||
$(this).toggleClass('disable');
|
||||
};
|
||||
if($(this).hasClass('delete')) {
|
||||
$(this).closest('.attributes').fadeOut(300, function() {
|
||||
|
||||
@@ -51,7 +51,7 @@ $(function() {
|
||||
}
|
||||
if($('.set-sidebar-state').length) {
|
||||
if(window.localStorage.getItem('sidebarState') == 1) {
|
||||
$('.set-sidebar-state').prop('checked',true).parent('.togglebox').removeClass('disabled');
|
||||
$('.set-sidebar-state').prop('checked',true).parent('.togglebox').removeClass('disable');
|
||||
}
|
||||
$('.set-sidebar-state').on({
|
||||
change: function() {
|
||||
|
||||
@@ -21,11 +21,15 @@ class Admin::PagesController < Admin::ItemsController
|
||||
end
|
||||
|
||||
def update
|
||||
if params[:page][:category][0] == ""
|
||||
params[:page][:category] = []
|
||||
if params[:page][:category]
|
||||
if params[:page][:category][0] == ""
|
||||
params[:page][:category] = []
|
||||
end
|
||||
end
|
||||
if params[:page][:tag][0] == ""
|
||||
params[:page][:tag] = []
|
||||
if params[:page][:tag]
|
||||
if params[:page][:tag][0] == ""
|
||||
params[:page][:tag] = []
|
||||
end
|
||||
end
|
||||
@item = Page.find(params[:id])
|
||||
if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
||||
|
||||
@@ -5,12 +5,7 @@
|
||||
|
||||
<div class="attributes <%= role_disable ? 'disabled' : '' %>">
|
||||
<div class="attributes-header clearfix">
|
||||
<div class="toggle-control" style="float: right;">
|
||||
<div class="togglebox <%= role_disable ? 'disabled' : '' %>">
|
||||
<%= hidden_field_tag("user[disable_role][id][#{role.id}]",role_disable,:for=>@form_index,"data-deploy"=>"right",:class=>"toggle-check",:value=>role_disable)%>
|
||||
<label><b></b></label>
|
||||
</div>
|
||||
</div>
|
||||
<%= hidden_field_tag("user[disable_role][id][#{role.id}]",role_disable,:for=>@form_index,"data-deploy"=>"right",:class=>"toggle-check",:value=>role_disable)%>
|
||||
<h4><%= role.title %><%= t(:role_info)%></h4>
|
||||
</div>
|
||||
|
||||
|
||||
+1
-2
@@ -26,7 +26,7 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
||||
end
|
||||
|
||||
def index
|
||||
|
||||
@bulletins = get_bulletins_for_index
|
||||
end
|
||||
|
||||
def get_bulletins_for_index
|
||||
@@ -47,7 +47,6 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
||||
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:category_id.in => params[:category_id], :tagged_ids.in => params[:tag_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
# @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:category_id.in=>params[:category_id],:tagged_ids.in=>params[:tag_id])
|
||||
@current_category = BulletinCategory.from_id(params[:category_id]) rescue nil
|
||||
debugger
|
||||
elsif !params[:category_id].blank?
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:category_id.in => params[:category_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
@current_category = BulletinCategory.from_id(params[:category_id]) rescue nil
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ module Announcement
|
||||
image :image
|
||||
field :postdate
|
||||
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self}
|
||||
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:bulletin_category,:id]}}
|
||||
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
|
||||
field :subtitle
|
||||
link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
|
||||
end
|
||||
|
||||
+2
-2
@@ -37,14 +37,14 @@ class Panel::Faq::FrontEnd::QasController < OrbitWidgetController
|
||||
|
||||
def show
|
||||
@qa = Qa.find(params[:id])
|
||||
get_categorys
|
||||
# get_categorys
|
||||
end
|
||||
|
||||
|
||||
protected
|
||||
|
||||
def get_categorys
|
||||
@qa_categorys = QaCategory.excludes('disable' => true)
|
||||
# @qa_categorys = QaCategory.excludes('disable' => true)
|
||||
end
|
||||
|
||||
end
|
||||
+1
-1
@@ -22,7 +22,7 @@ class Qa
|
||||
accepts_nested_attributes_for :qa_files, :allow_destroy => true
|
||||
accepts_nested_attributes_for :qa_links, :allow_destroy => true
|
||||
|
||||
belongs_to :qa_category
|
||||
# belongs_to :qa_category
|
||||
|
||||
before_save :clean_values
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<h1 class="h1"><%= @qa.title %></h1>
|
||||
<div class="info">
|
||||
<div class="info1">
|
||||
<span><%= t(:category) %>:<%= @qa.qa_category.title rescue nil %></span>
|
||||
<span><%= t(:category) %>:<%= @qa.category.title rescue nil %></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="news_paragraph">
|
||||
|
||||
Vendored
+7
-8
@@ -16,7 +16,7 @@ module Faq
|
||||
end
|
||||
end
|
||||
|
||||
category ["QaCategory"]
|
||||
# category ["QaCategory"]
|
||||
data_count 1..20
|
||||
|
||||
taggable
|
||||
@@ -25,9 +25,9 @@ module Faq
|
||||
|
||||
widgets do
|
||||
default_widget do
|
||||
query 'Qa.all'
|
||||
# enable ['typeA']
|
||||
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:qa_category,:id]}}
|
||||
query 'Qa'
|
||||
enable ['typeA']
|
||||
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:category,:id]}}
|
||||
link_field :title, {:method => 'panel_faq_front_end_qa_path',:args=>:self}
|
||||
link_to_more 'panel_faq_front_end_qas_path',:title_i18n=> 'faq.default_widget.to_more'
|
||||
end
|
||||
@@ -45,7 +45,7 @@ module Faq
|
||||
side_bar do
|
||||
head_label_i18n 'faq.faq',:icon_class=>"icons-help"
|
||||
available_for [:admin,:guest,:manager,:sub_manager]
|
||||
active_for_controllers ({:private=>['qas', 'qa_categorys']})
|
||||
active_for_controllers ({:private=>['qas', 'qa_categorys','module_tags', 'categories']})
|
||||
active_for_object_auth ['QaCategory']
|
||||
|
||||
head_link_path "panel_faq_back_end_qas_path"
|
||||
@@ -65,11 +65,10 @@ module Faq
|
||||
context_link 'categories',
|
||||
:link_path=>"admin_module_app_categories_path(get_module_app)" ,
|
||||
:priority=>3,
|
||||
:active_for_category => 'Qa',
|
||||
:active_for_category => 'Faq',
|
||||
:available_for => [:manager]
|
||||
|
||||
context_link 'tags',
|
||||
:link_path=>"admin_module_tags_path(:module_app_id => ModuleApp.first(conditions: {title: 'Faq'}))" ,
|
||||
:link_path=>"admin_module_tags_path(module_app_id: get_module_app)" ,
|
||||
:priority=>4,
|
||||
:active_for_tag => 'Faq',
|
||||
:available_for => [:manager]
|
||||
|
||||
Reference in new issue
Block a user