Changes for orbit bar, login

This commit is contained in:
Christophe Vilayphiou committed 2012-02-19 16:33:22 +08:00
1 parent 0b71714d44
commit 44a346ffe9
34 files changed
+724 -648

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require new_admin
+33 -17
View File
@@ -1,6 +1,6 @@
var viewportwidth;
var viewportheight;
function resize(){
var viewportwidth,
viewportheight;
function resize() {
viewportheight=$(window).height();
viewportwidth=$(window).width();
if(window.navigator.userAgent.indexOf("MSIE")>0){
@@ -9,32 +9,47 @@ function resize(){
}
}
$(document).ready(function(){
$('.orbit-bar-member').live('click', 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();
});
$('.dropdown-menu').live('click', function(e) {
e.stopPropagation();
$('.bar-login .dropdown-menu').show();
});
$('.tip').tooltip({
placement: "left"
});
$(function() {
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;
}
});
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;
}
});
});
/*tinyscrollbar&windows-Size*/
resize();
$('#main-sidebar').css("height", viewportheight-40);
//$('#content-wrap .viewport').css("height", viewportheight-44);
//$('#content-wrap').css("width", viewportwidth-186);
$('#main-sidebar .viewport').css("height", viewportheight-40);
$('.post-title').css("width", viewportwidth-495);
$('#main-sidebar').tinyscrollbar();
$('#main-sidebar').tinyscrollbar({ size:(viewportheight-44)});
@@ -44,5 +59,6 @@ $(window).resize(function(){
resize();
$('#main-sidebar').css("height", viewportheight-40);
$('#main-sidebar .viewport').css("height", viewportheight-40);
$('.post-title').css("width", viewportwidth-495);
$('#main-sidebar').tinyscrollbar({ size:(viewportheight-44)});
});
});
+5 -2
View File
@@ -1,4 +1,7 @@
$(document).ready(function() {
$('body').prepend("<div id='orbit_bar'/>");
ajax_load_proc($('#orbit_bar'), '/load_orbit_bar');
$('body').prepend("<div id='orbit_bar_temp'/>");
$("#orbit_bar_temp").load('/load_orbit_bar',function(){
$('body').prepend($(this).html());
$(this).remove();
});
});