some update

This commit is contained in:
devin 2012-04-20 05:38:53 +08:00
parent c3eef6eaa6
commit 19750d69e0
4 changed files with 75 additions and 35 deletions

View File

@ -352,7 +352,7 @@ var orbitDesktop = function(dom){
this.initializeSectionsManager = function(target){
o.currenthtml = target;
o.currentface = "sections";
var elementParent,element;
var elementParent,element,slabel;
var bindHandlers = function(){
var groupWrapperWidth = 0;
$("div#sections .group").width(400);
@ -360,26 +360,27 @@ var orbitDesktop = function(dom){
groupWrapperWidth+=200;
groupWrapperHeight = $(".group").height() + 20;
$("#group_wrapper").width(groupWrapperWidth);
$("div#sections #group_wrapper .to_drop").sortable({
$("div#sections #group_wrapper .grp").sortable({
start:function(){
var $elementParent = $(this).parent().parent();
elementParent = $elementParent;
element = $(this);
$elementParent.find("div.section_label ul li").fadeIn(500);
slabel = $(this).siblings('.section_label');
slabel.find('li:hidden').fadeIn(500);
},
stop:function(){
elementParent.find("div.section_label ul li:not(:nth-child(1))").fadeOut(500);
slabel.find('li:not(:nth-child(1))').fadeOut(500);
}
});
$("div#sections .section_label ul li:not(:nth-child(1))").droppable({
drop:function(){
if($("#"+$(this).attr("data-category")+" .element").length>=24){
$("div#sections .section_label li:not(:nth-child(1))").droppable({
drop:function(event, ui){
element = ui.draggable;
elementParent = ui.draggable.parent();
if($("#"+$(this).data("category")+" .element").length>=24){
o.notify("Section is full.","alert");
}
else{
$("#"+$(this).attr("data-category")).append(element);
$.post("/desktop/save_desktop_settings",{"save":"appnewsection","appid":element.attr("id"),"newsectionid":$(this).attr("data-content"),"desktopid":o.desktopId})
if(o.sectionId == $(this).attr("data-content") || o.sectionId == elementParent.attr("id")){
element.appendTo('body');
// .appendTo("#"+$(this).data("category"));
$.post("/desktop/save_desktop_settings",{"save":"appnewsection","appid":element.attr("id"),"newsectionid":$(this).data("content"),"desktopid":o.desktopId})
if(o.sectionId == $(this).data("content") || o.sectionId == elementParent.attr("id")){
o.desktopData["home"]="";
}
}
@ -555,6 +556,24 @@ var orbitDesktop = function(dom){
$(this).parents('.ssl').find('.ssl_des').removeClass('thmtxt');
$(this).find('.ssl_des').addClass('thmtxt');
}
},
mouseenter: function(){
if( !$(this).hasClass('active') ){
$(this).addClass('thmc1');
if( $(this).find('.ssl_des') ){
$(this).find('.ssl_des').addClass('thmtxt');
}
}
},
mouseleave: function(){
if( !$(this).hasClass('active') ){
$(this).removeClass('thmc1');
if( $(this).find('.ssl_des') ){
$(this).find('.ssl_des').removeClass('thmtxt');
}
}
}
});
});
@ -607,16 +626,6 @@ var orbitDesktop = function(dom){
}
}
});
$('.theme_list li:first-child').data('clicked',true); // this line just for demo
$('.theme_list li').hover(function(){
$(this).addClass('thmc1').find('.theme_name').addClass('thmtxt');
}, function(){
var c = $(this).data('clicked') ? '' : 'thmc1',
t = $(this).data('clicked') ? '' : 'thmtxt';
$(this).removeClass(c).find('.theme_name').removeClass(t);
});
$("a#theme_submit").click(function(){
o.confirm({
@ -675,7 +684,11 @@ var orbitDesktop = function(dom){
}
$("div#settings div#panel_r").load("/desktop/settingthemes",function(){
$.getJSON("/desktop/get_desktop_settings",{"get":"theme","desktopid":o.desktopId},function(theme){
$("#st1 ul.theme_list li#"+theme).addClass("thmc1").find("span").addClass("thmtxt");
$('#st1 .theme_list [id='+theme+']')
.addClass("thmc1 active", 300)
.find("span")
.addClass("thmtxt");
bindHandlers();
loadthmc();
})

View File

@ -280,6 +280,12 @@ a:focus { outline: none; }
.stock_wallpaper img { }
.s_title { font-size: 15px; line-height: 60px; text-align: left; }
.s_subtitle {
font-size: 13px;
line-height: 1.5em;
color: #ccc;
padding: 12px 0 24px 0;
}
.s_action {
padding: 24px 0;
margin-top: 12px;
@ -358,7 +364,7 @@ a:focus { outline: none; }
/* tiny scrollbar */
.tinycanvas { overflow: hidden; position: relative; height: 100%; }
.tinycanvas .viewport { width: auto; height: 100%; overflow: hidden; position: relative; }
.tinycanvas .overview { position: absolute; left: 0; top: 0; }
.tinycanvas .overview { position: absolute; left: 0; top: 0; min-width: 100%; }
.tinycanvas .scrollbar { position: absolute; z-index: 9; }
.tinycanvas .scrollbar.sb_h { left: 0; bottom: 0; height: 6px; }
.tinycanvas .scrollbar.sb_v { right: 0; top: 0; width: 6px; }
@ -424,6 +430,26 @@ a:focus { outline: none; }
font-size: 15px;
margin: 0 6px;
}
.s_form { font-size: 15px; }
.s_form li { overflow: hidden; padding: 6px 0; margin-bottom: 12px; }
.s_form label {
font-size: 13px;
display: inline-block;
vertical-align: middle;
width: 100px;
margin-right: 24px;
}
.s_form input[type=text], .s_form input[type=password]{
outline: solid 3px #f6f6f6;
border: solid 1px #eee;
font-size: 18px;
margin: 0;
padding: 6px;
}
.s_form input[type=text]:focus, .s_form input[type=password]:focus {
background-color: #333;
color: #fff;
}
#group_wrapper{

View File

@ -10,6 +10,7 @@
<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_subtitle">sample desciption</div>
<div class="s_action">
<a href="" id="name_save_btn" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick='return false;'>Confirm</a>
</div>

View File

@ -40,19 +40,19 @@
</tr>
<tr>
<td>
<input type="hidden" class="color-picker black" value="#000000" for="thmc4">
<input type="hidden" class="color-picker black" value="#0099cc" for="thmc1">
<input type="hidden" class="color-picker black" value="#3366cc" for="thmc2">
<input type="hidden" class="color-picker black" value="" for="thmc4">
<input type="hidden" class="color-picker black" value="" for="thmc1">
<input type="hidden" class="color-picker black" value="" for="thmc2">
</td>
<td>
<input type="hidden" class="color-picker black" value="#ffffff" for="g_sep">
<input type="hidden" class="color-picker black" value="" for="g_sep">
</td>
<td>
<input type="hidden" class="color-picker black" value="#ffffff" for="thmtxth">
<input type="hidden" class="color-picker black" value="#ffffff" for="thmtxt">
<input type="hidden" class="color-picker black" value="" for="thmtxth">
<input type="hidden" class="color-picker black" value="" for="thmtxt">
</td>
<td>
<input type="hidden" class="color-picker black" value="#000000" for="background">
<input type="hidden" class="color-picker black" value="" for="background">
</td>
</tr>
</table>
@ -77,9 +77,9 @@
<div class="sb11 ssl_item"><img src="assets/stockBackground/thumb/11.jpg" alt="11.jpg"></div>
<div class="sb12 ssl_item"><img src="assets/stockBackground/thumb/12.jpg" alt="12.jpg"></div>
</div>
<div class="s_action">
<!-- <div href="" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick="o.tempFunc();return false;">Confirm</a> -->
</div>
<!-- <div class="s_action">
<div href="" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick="o.tempFunc();return false;">Confirm</a>
</div> -->
<div class="clear"></div>
</div>
</div>