Merge branch 'desktop_devin' of https://github.com/Rulingcom/orbit into desktop_devin

This commit is contained in:
Harry Bomrah 2012-07-16 20:27:39 +08:00
commit 5429e8905f
1 changed files with 49 additions and 111 deletions

View File

@ -249,12 +249,10 @@ var orbitDesktop = function(dom){
} }
} }
}); });
$('div#desktop .tinycanvas')
.tinyscrollbar({ axis: 'x' })
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
o.tinyscrollbar_ext({
main: '.tinycanvas'
})
o.simple_drop_down(); o.simple_drop_down();
$("div#group_wrapper ul li[data-category=app]").click(function(){ $("div#group_wrapper ul li[data-category=app]").click(function(){
@ -432,11 +430,9 @@ var orbitDesktop = function(dom){
}) })
return false; return false;
}) })
$('.tinycanvas') o.tinyscrollbar_ext({
.tinyscrollbar({ axis: 'x'}) main: '.tinycanvas'
.find('.scrollbar') })
.delay(1500)
.addClass('op00', 500);
} }
var loadApps = function(){ //this load apps for sorting and searching var loadApps = function(){ //this load apps for sorting and searching
$.getJSON("/desktop/getapplist",{desktopid:o.desktopId},function(appss){ $.getJSON("/desktop/getapplist",{desktopid:o.desktopId},function(appss){
@ -517,11 +513,9 @@ var orbitDesktop = function(dom){
}, },
accept: '.to_drop' accept: '.to_drop'
}); });
$('.tinycanvas') o.tinyscrollbar_ext({
.tinyscrollbar({ axis: 'x'}) main: '.tinycanvas'
.find('.scrollbar') })
.delay(1500)
.addClass('op00', 500);
}; };
@ -614,12 +608,6 @@ var orbitDesktop = function(dom){
},{ },{
axis : "y" axis : "y"
}) })
// $(this)
// .css({'height': h-sh-24})
// .tinyscrollbar({ axis: 'y'})
// .find('.scrollbar')
// .delay(1500)
// .addClass('op00', 500);
}); });
$("a#name_save_btn").click(function(){ $("a#name_save_btn").click(function(){
@ -668,12 +656,13 @@ var orbitDesktop = function(dom){
$('.tinycanvas').each(function(){ $('.tinycanvas').each(function(){
var h = $(this).parent().height(), var h = $(this).parent().height(),
sh = $(this).siblings('.s_tab').height(); sh = $(this).siblings('.s_tab').height();
$(this)
.css({'height': h-sh-24}) o.tinyscrollbar_ext({
.tinyscrollbar({ axis: 'y'}) main: $(this),
.find('.scrollbar') height: h-sh-24
.delay(1500) },{
.addClass('op00', 500); axis: 'y'
})
}); });
o.single_select(); o.single_select();
@ -819,11 +808,9 @@ var orbitDesktop = function(dom){
$('#connection_setting').width(conlist_w); $('#connection_setting').width(conlist_w);
$('.tinycanvas') o.tinyscrollbar_ext({
.tinyscrollbar({ axis: 'x'}) main: '.tinycanvas'
.find('.scrollbar') })
.delay(1500)
.addClass('op00', 500);
} }
var saveaccount = function(usernm,pwd,type,what){ var saveaccount = function(usernm,pwd,type,what){
@ -916,18 +903,10 @@ var orbitDesktop = function(dom){
var bindHandlers = function(){ // to bind handlers for list page var bindHandlers = function(){ // to bind handlers for list page
o.simple_drop_down(); o.simple_drop_down();
// fill width for tiny scroll bar o.tinyscrollbar_ext({
var e = $('.list_t'), main: '.tinycanvas',
count = e.length, fill: '.list_t'
baseWidth = e.eq(1).outerWidth(true); })
e.parents('.overview').width( baseWidth * count );
$('.tinycanvas')
.tinyscrollbar({ axis: 'x'})
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
$("#journal_selection_options a").click(function(){ $("#journal_selection_options a").click(function(){
@ -1064,20 +1043,10 @@ var orbitDesktop = function(dom){
var bindHandlers = function(){ // to bind handlers for add page var bindHandlers = function(){ // to bind handlers for add page
o.simple_drop_down(); o.simple_drop_down();
// fill width for tiny scroll bar o.tinyscrollbar_ext({
var e = $('.s_grid_con'), main: '.tinycanvas',
count = e.length, fill: '.s_grid_con'
baseWidth = e.eq(1).outerWidth(true); })
e.parents('.overview').width( baseWidth * count );
$('.tinycanvas')
.tinyscrollbar({ axis: 'x'})
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
} }
$("div#journal_p div#panel_r").load("/desktop/journal_p_add",function(){ $("div#journal_p div#panel_r").load("/desktop/journal_p_add",function(){
bindHandlers(); bindHandlers();
@ -1187,18 +1156,11 @@ var orbitDesktop = function(dom){
} }
return false; return false;
}); });
// fill width for tiny scroll bar
var e = $('.list_t'),
count = e.length,
baseWidth = e.eq(1).outerWidth(true);
e.parents('.overview').width( baseWidth * count ); o.tinyscrollbar_ext({
main: '.tinycanvas',
$('.tinycanvas') fill: '.list_t'
.tinyscrollbar({ axis: 'x'}) })
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
} }
$("div#apps_store div#panel_r").load("/desktop_appstore/widgets",function(){ $("div#apps_store div#panel_r").load("/desktop_appstore/widgets",function(){
@ -1309,18 +1271,10 @@ var orbitDesktop = function(dom){
var bindHandlers = function(){ var bindHandlers = function(){
o.simple_drop_down(); o.simple_drop_down();
// fill width for tiny scroll bar o.tinyscrollbar_ext({
var e = $('.list_t'), main: '.tinycanvas',
count = e.length, fill: '.list_t'
baseWidth = e.eq(1).outerWidth(true); })
e.parents('.overview').width( baseWidth * count );
$('.tinycanvas')
.tinyscrollbar({ axis: 'x'})
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
} }
$("div#books div#panel_r").load("/desktop/books_list",function(){ $("div#books div#panel_r").load("/desktop/books_list",function(){
@ -1332,18 +1286,10 @@ var orbitDesktop = function(dom){
var bindHandlers = function(){ var bindHandlers = function(){
o.simple_drop_down(); o.simple_drop_down();
// fill width for tiny scroll bar o.tinyscrollbar_ext({
var e = $('.s_grid_con'), main: '.tinycanvas',
count = e.length, fill: '.s_grid_con'
baseWidth = e.eq(1).outerWidth(true); })
e.parents('.overview').width( baseWidth * count );
$('.tinycanvas')
.tinyscrollbar({ axis: 'x'})
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
} }
@ -1411,18 +1357,10 @@ var orbitDesktop = function(dom){
var bindHandlers = function(){ var bindHandlers = function(){
o.simple_drop_down(); o.simple_drop_down();
// fill width for tiny scroll bar o.tinyscrollbar_ext({
var e = $('.s_grid_con'), main: '.tinycanvas',
count = e.length, fill: '.s_grid_con'
baseWidth = e.eq(1).outerWidth(true); })
e.parents('.overview').width( baseWidth * count );
$('.tinycanvas')
.tinyscrollbar({ axis: 'x'})
.find('.scrollbar')
.delay(1500)
.addClass('op00', 500);
} }
$("div#seminar_p div#panel_r").load("/desktop/seminar_p_add",function(){ $("div#seminar_p div#panel_r").load("/desktop/seminar_p_add",function(){
@ -1498,14 +1436,14 @@ var orbitDesktop = function(dom){
var count,baseWidth,fillArray,pxs; var count,baseWidth,fillArray,pxs;
if( typeof target.fill == 'object' ){ if( typeof target.fill == 'string' ){
fillArray = target.main.find(target.fill); fillArray = target.main.find(target.fill);
count = fillArray.length; count = fillArray.length;
baseWidth = fillArray.eq(1).outerWidth(true); baseWidth = $(target.fill).eq(1).outerWidth(true);
target.main.find('.overview').width( baseWidth * count); target.main.find('.overview').width( baseWidth * count);
} else if( typeof fill == 'number' ){ } else if( typeof target.fill == 'number' ){
target.main.find('.overview').width( target.fill ); target.main.find('.overview').width( target.fill );
} else if( typeof fill == 'undefined' ){ } else if( typeof target.fill == 'undefined' ){
} else { } else {
o.notify('tinyscrollbar: setting width failed','imp',2); o.notify('tinyscrollbar: setting width failed','imp',2);