diff --git a/app/assets/javascripts/orbit-1.0.js b/app/assets/javascripts/orbit-1.0.js index e83c69f6..5f69b297 100644 --- a/app/assets/javascripts/orbit-1.0.js +++ b/app/assets/javascripts/orbit-1.0.js @@ -51,7 +51,7 @@ $(document).ready(function(){ $('#main-sidebar').css("height", viewportheight-30); $('#main-sidebar .viewport').css("height", viewportheight-30); $('.post-title').css("width", viewportwidth-495); - $('#main-wrap > .subnav').css("width", viewportwidth-$mainWrapMarginLeft) + $('#main-wrap .subnav').css("width", viewportwidth-$mainWrapMarginLeft); $('#main-sidebar').tinyscrollbar(); $('.detal-list').tinyscrollbar(); $('#main-sidebar').tinyscrollbar({size:(viewportheight-34)}); @@ -72,14 +72,14 @@ $(window).resize(function(){ $('#main-sidebar').css("height", viewportheight-30); $('#main-sidebar .viewport').css("height", viewportheight-30); $('.post-title').css("width", viewportwidth-495); - $('#main-wrap > .subnav').css("width", viewportwidth-$mainWrapMarginLeft) + $('#main-wrap .subnav').css("width", viewportwidth-$mainWrapMarginLeft) $('#main-sidebar').tinyscrollbar({size:(viewportheight-34)}); mainTablePosition(); }); /*main-table position*/ function mainTablePosition() { var $height = $('#main-wrap .subnav').length && $('#main-wrap .subnav').height(); - var $table = $('#main-wrap > table').length && $('#main-wrap > table'); + var $table = $('.main-list').length && $('.main-list:last'); if($table && $table==0){ $table.css({marginTop:$height}); } diff --git a/app/assets/javascripts/side_bar_history.js b/app/assets/javascripts/side_bar_history.js index e9505aa1..4b5da1d4 100644 --- a/app/assets/javascripts/side_bar_history.js +++ b/app/assets/javascripts/side_bar_history.js @@ -1,28 +1,28 @@ var history_edited = false; -$('#back_sidebar a, #back_main a.nav').live('click', - function () { - $.getScript(this.href); - history.pushState(null, document.title, this.href); - history_edited = true; - return false; - } -); +// $('#back_sidebar a, #back_main a.nav').live('click', +// function () { +// $.getScript(this.href); +// history.pushState(null, document.title, this.href); +// history_edited = true; +// return false; +// } +// ); -$('#back_main a.reload').live('click', - function () { - $.getScript(this.href); - history.replaceState(null, document.title, this.href); - history_edited = true; - return false; - } -); +// $('#back_main a.reload').live('click', +// function () { +// $.getScript(this.href); +// history.replaceState(null, document.title, this.href); +// history_edited = true; +// return false; +// } +// ); -$('.form').live('submit', function () { - $.post(this.action, $(this).serialize(), null, 'script'); - history_edited = true; - return false; -}); +// $('.form').live('submit', function () { +// $.post(this.action, $(this).serialize(), null, 'script'); +// history_edited = true; +// return false; +// }); $(document).on('click', '.js_history', function () { diff --git a/app/assets/stylesheets/inc/permission-checkbox.css b/app/assets/stylesheets/inc/permission-checkbox.css new file mode 100644 index 00000000..0adf7225 --- /dev/null +++ b/app/assets/stylesheets/inc/permission-checkbox.css @@ -0,0 +1,77 @@ +.checkblock { + display: inline-block; + float: left; + width: 200px; +} +.check[type="checkbox"]{ + display:none; +} +.checkbox{ + padding: 5px; + margin: 5px 5px 10px; + display: inline-block; + color:#777777; + text-shadow: 0 1px 0px rgba(255,255,255,.4); + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + height: 30px; + position: relative; + cursor: pointer; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) ); + background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf'); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} +.checkbox .check-icon { + display: none; + position: absolute; + width: 26px; + height: 26px; + background: url('img/check.png') no-repeat left top; + right: -10px; + top: -5px; +} +.checkbox .member-name { + cursor: pointer; + font-family: helvetica; + font-size: 12px; + line-height: 30px; + padding: 0 10px 0 40px; + color: #333333; + display: inline-block; + margin-bottom: 0; +} +.member-avatar { + position: absolute; + width: 34px; + height: 34px; + overflow: hidden; + margin-top: -2px; +} +img.member-img { + max-width: 100%; +} +.checked .check-icon { + display: block; +} +.popover-inner { + width: auto; + display: inline-block; + text-align: center; +} +.popover-title { + display: block; + font-size: 12px; + font-weight: normal; + padding: 3px 10px; +} +.popover-content { + padding: 3px 10px; + color: #898989; +} +.popover-content p { + font-size: 12px; +} \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2f37a517..e45fa4d6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -83,7 +83,7 @@ module ApplicationHelper end def active_for_action(controller_name, action_name) - (controller.controller_name.eql?(controller_name) && controller.action_name.eql?(action_name)) ? 'active' : nil + ((controller.controller_name.eql?(controller_name) || request.fullpath.eql?(controller_name)) && controller.action_name.eql?(action_name)) ? 'active' : nil end def sortable(column) diff --git a/app/views/admin/ad_banners/_ad_image_update.html.erb b/app/views/admin/ad_banners/_ad_image_update.html.erb index b87e5684..34723b7e 100644 --- a/app/views/admin/ad_banners/_ad_image_update.html.erb +++ b/app/views/admin/ad_banners/_ad_image_update.html.erb @@ -1,4 +1,4 @@ -
  • +
  • <%= image_tag ad_image.file rescue nil%>

    <%= ad_image.display? ? '[Showing]' : '[NotShawing]' %> diff --git a/app/views/layouts/_drop_down_menu.html.erb b/app/views/layouts/_drop_down_menu.html.erb index 900437a6..89285ebb 100644 --- a/app/views/layouts/_drop_down_menu.html.erb +++ b/app/views/layouts/_drop_down_menu.html.erb @@ -7,18 +7,4 @@

  • <%= link_to t('admin.member'), admin_users_path, :class => 'orblink' %>
  • <%= link_to t('admin.translation'), admin_translations_path, :class => 'orblink' %>
  • <%= link_to t('admin.site'), admin_sites_path, :class => 'orblink' %>
  • - - \ No newline at end of file diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index 3a36a48a..f74f24f6 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -2,14 +2,14 @@ <%= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %> <% end -%> -<%= content_tag :li, :class => active_for_controllers('bulletins', 'tags', 'bulletin_categorys') do -%> +<%= content_tag :li, :class => active_for_controllers('bulletins', 'tags', 'bulletin_categorys', 'fact_checks') do -%> <%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('bulletins', 'tags', 'bulletin_categorys')) do -%> + <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('bulletins', 'tags', 'bulletin_categorys', 'fact_checks')) do -%> <%= content_tag :li, link_to(t('admin.all_articles'), panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %> <%= content_tag :li, link_to(t('admin.add_new'), new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') %> <%= content_tag :li, link_to(t('admin.categories'), panel_announcement_back_end_bulletin_categorys_path), :class => active_for_action('bulletin_categorys', 'index') %> - <%= content_tag :li, link_to(t('admin.tags'), panel_announcement_back_end_tags_path), :class => active_for_action('tags', 'index') %> - <%= content_tag :li, link_to(t('announcement.bulletin.fact_check_setting'), panel_announcement_back_end_fact_checks_setting_path), :class => active_for_action('bulletins', 'fact_check_setting') if (is_manager? rescue nil) %> + <%= content_tag :li, link_to(t('admin.tags'), panel_announcement_back_end_tags_path), :class => active_for_action('panel/bulletin/back_end/tags', 'index') %> + <%= content_tag :li, link_to(t('announcement.bulletin.fact_check_setting'), panel_announcement_back_end_fact_checks_setting_path), :class => active_for_action('fact_checks', 'setting') if (is_manager? rescue nil) %> <% end -%> <% end -%> @@ -44,7 +44,7 @@ <%= content_tag :li, link_to(t('admin.all_articles'), panel_web_resource_back_end_web_links_path), :class => active_for_action('web_link', 'index') %> <%= content_tag :li, link_to(t('admin.add_new'), new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_link', 'new') %> <%= content_tag :li, link_to(t('admin.categories'), panel_web_resource_back_end_web_link_categorys_path), :class => active_for_action('web_link_categorys', 'index') %> - <%= content_tag :li, link_to(t('admin.tags'), panel_web_resource_back_end_tags_path), :class => active_for_action('tags', 'index') %> + <%= content_tag :li, link_to(t('admin.tags'), panel_web_resource_back_end_tags_path), :class => active_for_action('panel/web_resource/back_end/tags', 'index') %> <% end -%> <% end -%> diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.js.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.js.erb index 292e97bd..24e36542 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.js.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.js.erb @@ -1,7 +1,7 @@ $("#collapse-status").html("<%= j render 'filter_status' %>"); $("#collapse-category").html("<%= j render 'filter_categories' %>"); $("#collapse-tags").html("<%= j render 'filter_tags' %>"); -$("#delete_bulletins").attr("action", "<%= delete_panel_announcement_back_end_bulletins_path(:direction => params[:direction], :sort => params[:sort], :filter => @filter]) %>"); +$("#delete_bulletins").attr("action", "<%= delete_panel_announcement_back_end_bulletins_path(:direction => params[:direction], :sort => params[:sort], :filter => @filter) %>"); $("#sort_headers").html("<%= j render 'sort_headers' %>"); $("#tbody_bulletins").html("<%= j render :partial => 'bulletin', :collection => @bulletins %>"); $("#bulletin_pagination").html("<%= j paginate @bulletins, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>"); \ No newline at end of file