Changes in orbit_bar and js in announcements

This commit is contained in:
Christophe Vilayphiou 2012-02-21 01:13:22 +08:00
parent 48d94d5e15
commit ba4d71a026
18 changed files with 127 additions and 51 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -29,18 +29,21 @@ $(document).ready(function(){
placement: "left"
});
var $role = $('.select-role');
$('.privacy').each(function($i) {
$(this).click(function() {
switch ($i) {
case 0:
$role.slideUp(300);
break;
case 1:
$role.slideDown(300);
break;
}
});
$(document).on('click', '.privacy', function() {
switch ($(this).val()) {
case 'true':
$(this).parents('.controls').children('.select-role').slideUp(300);
break;
case 'false':
$(this).parents('.controls').children('.select-role').slideDown(300);
break;
}
});
$(document).on('click', '.toggle-tr-edit', function() {
$(this).parents('tr').next('.qe-block').removeClass('hide');
$(this).parents('tr').next('.qe-block').find('.qe-edit-div').addClass('hide');
$(this).parents('tr').next('.qe-block').find('#qe-' + $(this).attr('rel')).toggleClass('hide');
});
/*tinyscrollbar&windows-Size*/

View File

@ -44,7 +44,7 @@
margin-top: 15px;
margin-bottom: 3px;
}
.main-list tr:hover .hide {
.main-list tr.with_action:hover .hide {
display:block !important;
}
.main-list .label-group {

View File

@ -38,11 +38,34 @@
background-image: linear-gradient(top, #545b60, #191a1c);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#545b60', endColorstr='#191a1c', GradientType=0);
}
#orbit-bar .navbar-search {
float: none;
margin: 6px auto 0;
text-align: center;
}
#orbit-bar .nav.pull-right {
margin-right: -20px;
}
#orbit-bar .search-query {
background-image: url(<%= asset_path 'main-search.png' %>);
background-repeat: no-repeat;
background-position: 5px 6px;
background-color: rgba(255, 255, 255, 0.8);
color: #333;
padding-left: 25px;
text-shadow: 0px 1px 0px #FFF;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) inset, 0 1px 0 rgba(255, 255, 255, 0.15);
}
#orbit-bar .search-query:focus {
background-color: rgba(255, 255, 255, 0.9);
text-shadow: 0px 1px 0px #FFF;
background-position: 6px 7px;
}
#orbit-bar .container {
width:100%;
}
#orbit-bar .orbit-logo .brand {
background: url(<%= 'orbit-bar.png' %>) no-repeat -162px top;
background: url(<%= asset_path 'orbit-bar.png' %>) no-repeat -162px top;
text-indent:-9999px;
}
#orbit-bar .orbit-logo .brand:hover {
@ -58,7 +81,7 @@
background-color: rgba(0,157,220,1);
}
#orbit-bar .nav > li > a {
background-image: url(<%= 'orbit-bar.png' %>);
background-image: url(<%= asset_path 'orbit-bar.png' %>);
background-repeat:no-repeat;
display: inline-block;
width: 16px;
@ -72,20 +95,33 @@
#orbit-bar .nav > li > a.orbit-bar-desktop {
background-position: -100px -4px;
}
#orbit-bar .nav > li > a.orbit-bar-logout {
background-position: -38px -4px;
margin: 0 10px 0 0;
}
#orbit-bar .nav > li > a.orbit-bar-member {
background-position: -4px -37px;
}
#orbit-bar .nav > li > a.orbit-bar-search {
background-position: -68px -4px;
}
#orbit-bar .nav > li > a.orbit-bar-account {
background-image: none;
height: 34px;
padding: 3px;
text-indent: inherit;
min-width: 120px;
width: auto !important;
}
#orbit-bar .nav span.member-name {
display: inline-block;
float: right;
line-height: 34px;
padding: 0 10px;
}
#orbit-bar .account-menu {
right: 5px;
}
#orbit-bar .bar-login {
}
#orbit-bar .bar-login .open {
#orbit-bar .bar-login .open, #orbit-bar .open .orbit-bar-account {
background-color: #009DDC;
}
#orbit-bar .bar-login .dropdown-menu {
@ -97,7 +133,7 @@
list-style: none outside none;
}
#orbit-bar .bar-login .dropdown-menu .log .title {
background: url(<%= 'sign-in-logo2.png' %>) no-repeat center center;
background: url(<%= asset_path 'sign-in-logo2.png' %>) no-repeat center center;
height: 70px;
}
#orbit-bar .bar-login .dropdown-menu .log form {
@ -150,11 +186,8 @@
font-size:16px;
text-align: center;
}
#signin-body{
background: url(<%= 'background.jpg' %>) repeat left top;
}
#main-sidebar {
background: url(<%= 'background.jpg' %>) repeat left top;
background: url(<%= asset_path 'background.jpg' %>) repeat left top;
width: 155px;
padding-right: 4px;
border-right: 1px solid rgba(0,0,0,.2);
@ -166,7 +199,7 @@
padding-top: 5px;
}
#main-sidebar .nav > li.active > a [class^="icons-"] {
background-image: url(<%= 'icons_pack_white.png' %>);
background-image: url(<%= asset_path 'icons_pack_white.png' %>);
}
#main-sidebar .nav > li > .nav {
margin-left: -14px;
@ -200,6 +233,7 @@
padding-top: 42px;
padding-bottom: 18px;
position: relative;
min-height: 100%;
}
#main-wrap > .form-actions {
background-color: #FFF;
@ -476,7 +510,7 @@
width: 16px;
height: 16px;
vertical-align: text-top;
background-image: url(<%= 'icons_pack.png' %>);
background-image: url(<%= asset_path 'icons_pack.png' %>);
background-position: 16px 16px;
background-repeat: no-repeat;
*margin-right: .3em;
@ -486,7 +520,7 @@
*margin-left: 0;
}
.icons-white {
background-image: url(<%= 'icons_pack_white.png' %>);
background-image: url(<%= asset_path 'icons_pack_white.png' %>);
}
/*1*/
.icons-pencil {
@ -600,6 +634,9 @@
.icons-calendars {
background-position: -384px -96px;
}
.icons-out {
background-position: -416px -96px;
}
/*5*/
.icons-page-blank {
background-position: 0px -128px;
@ -719,6 +756,9 @@
background-position: -0px -512px;
}
/*18*/
.icons-help {
background-position: -160px -544px;
}
.icons- {
background-position: -0px -544px;
}
@ -729,6 +769,9 @@
.icons-plus {
background-position: -288px -576px;
}
.icons-power {
background-position: -0px -608px;
}
/*20*/
.icons- {
background-position: -0px -608px;

View File

@ -19,7 +19,29 @@
</ul>
<ul class="nav pull-right">
<% if user_signed_in? %>
<li><%= link_to t(:logout), destroy_user_session_path, :class => 'orbit-bar-logout' %></li>
<li class="dropdown active clear">
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
<img src="images/menber-pic.png" />
<span class="member-name"><%= current_user.name %></span>
</a>
<ul class="dropdown-menu account-menu">
<li>
<a href="#">
<i class="icons-wrench"></i>
Account settings
</a>
</li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-out') + t(:logout), destroy_user_session_path %></li>
<li class="divider"></li>
<li>
<a href="#">
<i class="icons-help"></i>
Help
</a>
</li>
</ul>
</li>
<% else %>
<li class="dropdown bar-login">
<a class="brand dropdown-toggle orbit-bar-member" href="#"><%= t(:login) %></a>
@ -57,12 +79,10 @@
</div>
</li>
<% end %>
<li>
<form class="navbar-search pull-left" action="">
<input class="search-query span2" type="text" placeholder="Search">
</form>
</li>
</ul>
<form class="navbar-search span6" action="">
<input class="search-query span4" type="text" placeholder="Search Ruling University">
</form>
</div>
</div>
</header>

View File

@ -1,5 +1,13 @@
<li><%= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %></li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %></li>
<li class="active">
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %>
<ul class="nav nav-list">
<li class="active"><%= link_to t('admin.all_articles'), panel_announcement_back_end_bulletins_path %></li>
<li><%= link_to t('admin.add_new'), new_panel_announcement_back_end_bulletin_path %></li>
<li><%= link_to t('admin.categories'), panel_announcement_back_end_bulletin_categorys_path %></li>
<li><%= link_to t('admin.tags'), panel_announcement_back_end_tags_path %></li>
</ul>
</li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %></li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-page') + t('admin.page'), admin_items_path %></li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-window-block') + t('admin.design'), admin_designs_path %></li>

View File

@ -23,6 +23,7 @@ en:
hide: Hide
homepage: Homepage
login: Login
logout: Logout
no_: "No"
nothing: Nothing
or_lower: or

View File

@ -1,6 +1,6 @@
class Panel::Announcement::BackEnd::BulletinCategorysController < ApplicationController
layout 'admin'
layout 'new_admin'
def index
@bulletin_categorys = BulletinCategory.all

View File

@ -1,4 +1,4 @@
<tr id="<%= dom_id bulletin %>">
<tr id="<%= dom_id bulletin %>" class="with_action">
<td><input type="checkbox"></td>
<td>
<% if bulletin.is_top? %>
@ -14,13 +14,13 @@
<ul class="nav nav-pills hide">
<li><%= link_to t('bulletin.edit'), edit_panel_announcement_back_end_bulletin_path(bulletin) %></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Quick Edit<b class="caret"></b></a>
<a href="#" data-toggle="dropdown" class="dropdown-toggle"><%= t(:quick_edit) %><b class="caret"></b></a>
<ul class="dropdown-menu" id="menu1">
<li><a href="#">Basic</a></li>
<li><a href="#">Picture</a></li>
<li><a href="#">Tags</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">File</a></li>
<li><a href="#" class='toggle-tr-edit' rel='basic'><%= t(:basic) %></a></li>
<li><a href="#" class='toggle-tr-edit' rel='picture'><%= t(:picture) %></a></li>
<li><a href="#" class='toggle-tr-edit' rel='tags'><%= t(:tags) %></a></li>
<li><a href="#" class='toggle-tr-edit' rel='link'><%= t(:link) %></a></li>
<li><a href="#" class='toggle-tr-edit' rel='file'><%= t(:file) %></a></li>
</ul>
</li>
<li class="dropdown"><%= link_to t('bulletin.delete'), panel_announcement_back_end_bulletin_path(bulletin), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>

View File

@ -1,12 +1,13 @@
<!-- <tr class="qe-block hide"> -->
<tr class="qe-block">
<tr class="qe-block hide">
<td colspan="8">
<legend>Quick Edit - Basic / Picture / Tags / Link / File</legend>
<legend><%= t(:quick_edit) %> - <span class='qe_title'></span>Basic / Picture / Tags / Link / File</legend>
<%= form_for bulletin, :url => panel_announcement_back_end_bulletin_path(bulletin), :html => {:class => 'form-horizontal'} do |f| %>
<%= render :partial => "quick_edit_basic", :locals => { :f => f, :bulletin => bulletin } %>
<%= render :partial => "quick_edit_picture", :locals => { :f => f, :bulletin => bulletin } %>
<%#= render :partial => "quick_edit_links", :locals => { :f => f, :bulletin => bulletin } %>
<%= render :partial => "quick_edit_tags", :locals => { :f => f, :bulletin => bulletin } %>
<%= render :partial => "quick_edit_links", :locals => { :f => f, :bulletin => bulletin } %>
<%= render :partial => "quick_edit_files", :locals => { :f => f, :bulletin => bulletin } %>
<div class="form-actions">
<%= f.submit t(:submit), :class => 'btn btn-primary' %>
<%= f.submit t(:cancel), :class => 'btn', :type => 'reset' %>

View File

@ -1,4 +1,4 @@
<div id="qe-basic">
<div id="qe-basic" class="qe-edit-div hide">
<div id="widget-category">
<div class="control-group">
<label class="control-label"><%= t(:category) %></label>

View File

@ -1,4 +1,4 @@
<div id="qe-file">
<div id="qe-file" class="qe-edit-div hide">
<div id="widget-file">
<div class="control-group">
<table class="table table-condensed">

View File

@ -1,4 +1,4 @@
<div id="qe-link">
<div id="qe-link" class="qe-edit-div hide">
<div id="widget-link">
<div class="control-group">
<table class="table table-condensed">

View File

@ -1,4 +1,4 @@
<div id="qe-picture">
<div id="qe-picture" class="qe-edit-div hide">
<div id="widget-picture">
<div class="control-group">
<label class="control-label">Picture</label>

View File

@ -32,7 +32,7 @@
</div>
</div> -->
<div id="qe-tags">
<div id="qe-tags" class="qe-edit-div hide">
<div id="widget-tags">
<div class="form-horizontal">
<% @tags.each do |tag| %>