Ray's changes in tags, css and js
This commit is contained in:
parent
6c50aa5243
commit
503f71e554
|
@ -0,0 +1,12 @@
|
||||||
|
$('.check[checked="checked"]').parents(".checkbox").addClass("checked")
|
||||||
|
$(".checkbox").click(function(){
|
||||||
|
if($(this).children(".check").attr("checked")){
|
||||||
|
// uncheck
|
||||||
|
$(this).children(".check").attr('checked', false);
|
||||||
|
$(this).removeClass("checked");
|
||||||
|
}else{
|
||||||
|
// check
|
||||||
|
$(this).children(".check").attr({checked: "checked"});
|
||||||
|
$(this).addClass("checked");
|
||||||
|
}
|
||||||
|
});
|
|
@ -9,27 +9,14 @@ function resize() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$(document).on('click', '.orbit-bar-member', function(){
|
|
||||||
$(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open');
|
|
||||||
$('.bar-login .dropdown-menu').toggle();
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).click(function() {
|
|
||||||
$('.orbit-bar-member').removeClass("open");
|
|
||||||
$('.bar-login .dropdown-menu').hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click', '.bar-login .dropdown-menu', function(e) {
|
|
||||||
e.stopPropagation();
|
|
||||||
$('.bar-login .dropdown-menu').show();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.tip').tooltip({
|
$('.tip').tooltip({
|
||||||
placement: "left"
|
placement: "left"
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.privacy', function() {
|
$(document).on('click', '.privacy', function() {
|
||||||
|
|
||||||
|
console.log($(this).val());
|
||||||
switch ($(this).val()) {
|
switch ($(this).val()) {
|
||||||
case 'true':
|
case 'true':
|
||||||
$(this).parents('.controls').children('.select-role').slideUp(300);
|
$(this).parents('.controls').children('.select-role').slideUp(300);
|
||||||
|
@ -68,7 +55,7 @@ $(document).ready(function(){
|
||||||
$('#main-sidebar').tinyscrollbar();
|
$('#main-sidebar').tinyscrollbar();
|
||||||
$('.detal-list').tinyscrollbar();
|
$('.detal-list').tinyscrollbar();
|
||||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-34)});
|
$('#main-sidebar').tinyscrollbar({size:(viewportheight-34)});
|
||||||
mainTablePosition()
|
mainTablePosition();
|
||||||
|
|
||||||
/*isotope*/
|
/*isotope*/
|
||||||
var $container = $('#isotope');
|
var $container = $('#isotope');
|
||||||
|
@ -87,18 +74,23 @@ $(window).resize(function(){
|
||||||
$('.post-title').css("width", viewportwidth-495);
|
$('.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)});
|
$('#main-sidebar').tinyscrollbar({size:(viewportheight-34)});
|
||||||
mainTablePosition()
|
mainTablePosition();
|
||||||
});
|
});
|
||||||
/*main-table position*/
|
/*main-table position*/
|
||||||
function mainTablePosition() {
|
function mainTablePosition() {
|
||||||
var $height = $('#main-wrap > .subnav').height()
|
var $height = $('#main-wrap .subnav').length && $('#main-wrap .subnav').height();
|
||||||
var $table = $('#main-wrap > .table')
|
var $table = $('#main-wrap > .table').length && $('#main-wrap > .table');
|
||||||
|
var $nottable = $('#main-wrap .nottable').length && $('#main-wrap .nottable');
|
||||||
//alert ($table.height())
|
//alert ($table.height())
|
||||||
|
if($nottable==0){
|
||||||
|
if($height>0){
|
||||||
$height = $height-17;
|
$height = $height-17;
|
||||||
if($height<0){
|
|
||||||
$height = 0;
|
|
||||||
}
|
}
|
||||||
$table.stop().animate({marginTop:$height},500)
|
$table.stop().animate({marginTop:$height},500);
|
||||||
|
}
|
||||||
|
if($table==0){
|
||||||
|
$nottable.css({marginTop:$height});
|
||||||
|
};
|
||||||
//$table.css({marginTop : $height})
|
//$table.css({marginTop : $height})
|
||||||
}
|
}
|
||||||
$(window).scroll(function () {
|
$(window).scroll(function () {
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
$(document).on('click', '.orbit-bar-member', function(){
|
||||||
|
$(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open');
|
||||||
|
$('.bar-login .dropdown-menu').toggle();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).click(function() {
|
||||||
|
$('.orbit-bar-member').removeClass("open");
|
||||||
|
$('.bar-login .dropdown-menu').hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.bar-login .dropdown-menu', function(e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
$('.bar-login .dropdown-menu').show();
|
||||||
|
});
|
|
@ -0,0 +1,53 @@
|
||||||
|
.checkblock {
|
||||||
|
display: inline-block;
|
||||||
|
float: left;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
.check[type="checkbox"]{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
.checkbox{
|
||||||
|
padding:5px;
|
||||||
|
margin:5px;
|
||||||
|
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: 22px;
|
||||||
|
height: 22px;
|
||||||
|
border-radius: 11px;
|
||||||
|
background-color: #d0f311;
|
||||||
|
right: -5px;
|
||||||
|
top: -5px;
|
||||||
|
box-shadow: 0px 0px 5px rgba(0,0,0,.05);
|
||||||
|
}
|
||||||
|
.checkbox .check-icon i {
|
||||||
|
margin: 1px 0 0 3px;
|
||||||
|
}
|
||||||
|
.checkbox .member-name {
|
||||||
|
line-height: 30px;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
img.member-img {
|
||||||
|
display: inline-block;
|
||||||
|
float: left;
|
||||||
|
max-width: 30px;
|
||||||
|
}
|
||||||
|
.checked .check-icon {
|
||||||
|
display: block;
|
||||||
|
}
|
|
@ -266,7 +266,6 @@
|
||||||
padding-top: 32px;
|
padding-top: 32px;
|
||||||
padding-bottom: 18px;
|
padding-bottom: 18px;
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100%;
|
|
||||||
}
|
}
|
||||||
#main-wrap > .form-actions {
|
#main-wrap > .form-actions {
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
|
@ -383,6 +382,9 @@
|
||||||
border-top-color: #0088CC;
|
border-top-color: #0088CC;
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
|
.filter form {
|
||||||
|
margin: 5px 10px;
|
||||||
|
}
|
||||||
.filter .active {
|
.filter .active {
|
||||||
background-color: #0088CC;
|
background-color: #0088CC;
|
||||||
}
|
}
|
||||||
|
@ -417,6 +419,26 @@
|
||||||
.filters .in {
|
.filters .in {
|
||||||
/*border-bottom: 1px solid rgba(0,0,0,0.07)*/
|
/*border-bottom: 1px solid rgba(0,0,0,0.07)*/
|
||||||
}
|
}
|
||||||
|
#tags {
|
||||||
|
}
|
||||||
|
#tags .tag {
|
||||||
|
line-height: 32px;
|
||||||
|
padding: 0 10px;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
border-bottom: 1px solid #DDDDDD;
|
||||||
|
border-top: medium none;
|
||||||
|
}
|
||||||
|
#tags .tag form, #tags .tag form input {
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
#tags .tagitem {
|
||||||
|
display: inline-block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
#tags .action {
|
||||||
|
display: inline-block;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
.sign-in {
|
.sign-in {
|
||||||
width: 360px;
|
width: 360px;
|
||||||
margin: 0 auto 70px;
|
margin: 0 auto 70px;
|
||||||
|
@ -775,6 +797,9 @@
|
||||||
background-position: -224px -320px;
|
background-position: -224px -320px;
|
||||||
}
|
}
|
||||||
/*12*/
|
/*12*/
|
||||||
|
.icons-check-2 {
|
||||||
|
background-position: -288px -352px;
|
||||||
|
}
|
||||||
.icons-star-thin {
|
.icons-star-thin {
|
||||||
background-position: -416px -352px;
|
background-position: -416px -352px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,7 +145,7 @@ module ApplicationHelper
|
||||||
javascripts << "<script type='text/javascript' src='/assets/bootstrap.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/bootstrap.js'></script>\n"
|
||||||
javascripts << "<script type='text/javascript' src='/assets/jquery.tinyscrollbar.min.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/jquery.tinyscrollbar.min.js'></script>\n"
|
||||||
javascripts << "<script type='text/javascript' src='/assets/jquery.isotope.min.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/jquery.isotope.min.js'></script>\n"
|
||||||
javascripts << "<script type='text/javascript' src='/assets/orbit-1.0.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-member.js'></script>\n"
|
||||||
javascripts << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>\n"
|
||||||
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
javascripts << "<script type='text/javascript' src='/assets/event.js'></script>\n"
|
||||||
page.design.javascripts.each do |js|
|
page.design.javascripts.each do |js|
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
<div id="<%= dom_id tag %>" >
|
<div id="<%= dom_id tag %>" class="tag clear">
|
||||||
|
<div class="tagitem">
|
||||||
|
<i class="icons-tag"></i>
|
||||||
<% @site_valid_locales.each do |locale| %>
|
<% @site_valid_locales.each do |locale| %>
|
||||||
<%= I18nVariable.from_locale(locale) %>:
|
<%#= I18nVariable.from_locale(locale) %>
|
||||||
<%= tag[locale] %>
|
<%= tag[locale] %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="action">
|
||||||
<%= link_to t(:edit), edit_admin_tag_path(tag), :remote => true %>
|
<%= link_to t(:edit), edit_admin_tag_path(tag), :remote => true %>
|
||||||
<%= link_to t(:delete), admin_tag_path(tag), :confirm => t('sure?'), :method => :delete, :remote => true %>
|
<%= link_to t(:delete), admin_tag_path(tag), :confirm => t('sure?'), :method => :delete, :remote => true %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,6 +1,16 @@
|
||||||
<div id='tags'>
|
<div class="subnav">
|
||||||
|
<ul class="nav nav-pills filter">
|
||||||
|
<li class="accordion-group">
|
||||||
|
<form class="form-search">
|
||||||
|
<input type="text" class="input-medium search-query">
|
||||||
|
<button type="submit" class="btn">Search</button>
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id='tags' class="nottable clear">
|
||||||
<%= render :partial => 'tag', :collection => @tags %>
|
<%= render :partial => 'tag', :collection => @tags %>
|
||||||
</div>
|
</div>
|
||||||
-------------------------
|
<div class="form-actions">
|
||||||
<br/>
|
<%= render 'add' %>
|
||||||
<%= render 'add' %>
|
</div>
|
|
@ -1 +1 @@
|
||||||
$('#<%= dom_id @tag %>').html("<%= j render :partial => 'tag', :object => @tag %>")
|
$('#<%= dom_id @tag %>').replaceWith("<%= j render :partial => 'tag', :object => @tag %>")
|
|
@ -1,17 +1,24 @@
|
||||||
<%= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
|
<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
|
||||||
<br/>
|
|
||||||
<%= form_tag('', :remote => true) %>
|
<%= form_tag('', :remote => true) %>
|
||||||
<%= label_tag :category, t("announcement.bulletin.category") %>
|
<div class="subnav">
|
||||||
<%= select_tag "category_id", options_from_collection_for_select(@bulletin_categorys, "id", "key") %>
|
<ul class="nav nav-pills filter">
|
||||||
|
<li class="accordion-group">
|
||||||
<br/>
|
<div class="form-search" style="margin: 5px 10px;">
|
||||||
<%= label_tag :role, t("admin.roles") %>
|
<%= label_tag :category, t("announcement.bulletin.category") %>
|
||||||
|
<%= select_tag "category_id", options_from_collection_for_select(@bulletin_categorys, "id", "key") %>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<%#= label_tag :role, t("admin.roles") %>
|
||||||
|
<div class="nottable clear">
|
||||||
<%= content_tag :div do -%>
|
<%= content_tag :div do -%>
|
||||||
<% form_tag :action => "update_setting" do %>
|
<% form_tag :action => "update_setting" do %>
|
||||||
<%= render :partial => "privilege_user", :locals => {:users => @users_array} %>
|
<%= render :partial => "privilege_user", :locals => {:users => @users_array} %>
|
||||||
<%= submit_tag "Update" %>
|
<%= submit_tag "Update" %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
$('#category_id').change(function() {
|
$('#category_id').change(function() {
|
||||||
|
|
Loading…
Reference in New Issue