final on 13 april 00:00

This commit is contained in:
Harry Bomrah 2012-04-13 00:00:24 +08:00
parent 6b43e70f53
commit 64a9579b92
2 changed files with 20 additions and 8 deletions

View File

@ -218,6 +218,16 @@ var orbitDesktop = function(dom){
bindHandlers();
o.initializeWidgets();
bindSecondaryHandlers();
$("div#desktop ul#section_list").empty();
$.each(o.sectionList,function(i,section){
var tempstyle="";
if(i==0){
tempstyle = "style='display:none;'";
$("div#desktop span#section_heading").text(section.name);
}
$("div#desktop ul#section_list").append($('<li class="section_name" '+tempstyle+'><a class="admtxt hp w2 hh2" onclick="return false;" href="'+section._id+'" >'+section.name+'</a></li>'));
})
bindSecondaryHandlers();
}
};
this.tempFunc = function(th){
@ -291,10 +301,10 @@ var orbitDesktop = function(dom){
o.currentface = "sections";
var elementParent,element,groupWrapperWidth;
var bindHandlers = function(){
$("div#sections .group").width(530);
$("div#sections .group").width(400);
$("div#sections .group").each(function(){groupWrapperWidth+=$(this).width();})
groupWrapperWidth+=200;
// groupWrapperHeight = $(".group").height() + 20;
groupWrapperHeight = $(".group").height() + 20;
// groupWrapperHeight = (groupWrapperHeight > ($(window).height()-extraspace))? $(window).height()-extraspace:groupWrapperHeight;
$("div#sections #group_wrapper").css("width",groupWrapperWidth);
$("div#sections #group_wrapper .to_drop").sortable({
@ -340,7 +350,7 @@ var orbitDesktop = function(dom){
$group = $('<div class="group"><div class="section_label"><ul class="section_grp"></ul></div><ul class="grp" id="section'+(z+1)+'"></ul></div>');
for(x=0;x<4;x++){
if(x==0){
$li = $('<li class="element w1 h1 hp vp thmtxt"><span class="tile thmc1"></span><span class="thmtxt">'+o.sectionList[z].name+'</span></li>');
$li = $('<li class="element w1 h1 hp vp thmtxt" style="font-size:20px;"><span class="tile thmc1"></span><span class="thmtxt">'+o.sectionList[z].name+'</span></li>');
$group.find("ul.section_grp").append($li);
}
if(z!=x){
@ -355,7 +365,6 @@ var orbitDesktop = function(dom){
$.each(appss,function(i,apps){
$.each(apps,function(i,app){
// alert(yy);
$li = $('<li class="element to_drop w1 hh2 hp vp" data-category="'+app.data_category+'" data-content="'+app.data_content+'"><div class="appicon"><img src="'+o.iconPath+app.data_content+'.png" class="" width="30" /></div><h1 class="appname thmtxth">'+app.title+'</h1></li>');
$("ul#section"+yy).append($li);
})
@ -427,6 +436,9 @@ var orbitDesktop = function(dom){
o.notify("Connection problem!!","alert",2);
}
})
$.each(o.sectionList,function(i,sec){
sec.name = desktopnm[i];
})
})
}
$("div#settings div#panel_r").load("/desktop/settingsections",function(){

View File

@ -6,9 +6,9 @@
<div class="s_title hh3">Sections Name</div>
<ul class="s_form" id="desktop_names">
<li><label for="s_name1">Section 1</label><input id="s_name1" type="text" value=""></li>
<li><label for="s_name2">Section1</label><input id="s_name2" type="text" value=""></li>
<li><label for="s_name3">Section1</label><input id="s_name3" type="text" value=""></li>
<li><label for="s_name4">Section1</label><input id="s_name4" type="text" value=""></li>
<li><label for="s_name2">Section 2</label><input id="s_name2" type="text" value=""></li>
<li><label for="s_name3">Section 3</label><input id="s_name3" type="text" value=""></li>
<li><label for="s_name4">Section 4</label><input id="s_name4" type="text" value=""></li>
</ul>
<div class="s_action">
<a href="" id="name_save_btn" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick='return false;'>Confirm</a>