app manager view update

This commit is contained in:
devin chen 2013-05-06 14:43:31 +08:00 committed by Matt K. Fu
parent 7e6433f71c
commit 41afb46bf6
3 changed files with 7 additions and 13 deletions

View File

@ -927,16 +927,16 @@ var orbitDesktop = function(dom){
sectionids.push(sec.id); sectionids.push(sec.id);
}) })
$appinfolist.find("li:eq(0)").empty(); $appinfolist.find("[info=section_activation]").empty();
$.each(o.sectionList,function(i,sec){ $.each(o.sectionList,function(i,sec){
var present = $.inArray(sec._id,sectionids); var present = $.inArray(sec._id,sectionids);
if(present == -1){ if(present == -1){
$sectionswitch = $('<label class="s_grid s_grid_3">'+ sec.name +'</label><div class="s_grid s_grid_9 s_switch"><div class="s_switch_status" status-off="Off">Off</div><label class="s_switch_switcher admbg2"><input type="checkbox" data-widget="'+ $e.data("id") +'" data-section="'+ sec._id +'"><span class="s_switch_toggle"></span></label></div>'); $sectionswitch = $('<div class="s_grid_row"><label class="s_grid s_grid_3">'+ sec.name +'</label><div class="s_grid s_grid_6 s_switch"><div class="s_switch_status" status-off="Off">Off</div><label class="s_switch_switcher admbg2"><input type="checkbox" data-widget="'+ $e.data("id") +'" data-section="'+ sec._id +'"><span class="s_switch_toggle"></span></label></div></div>');
}else{ }else{
$sectionswitch = $('<label class="s_grid s_grid_3">'+ sec.name +'</label><div class="s_grid s_grid_9 s_switch"><div class="s_switch_status" status-on="On">On</div><label class="s_switch_switcher thmc2"><input type="checkbox" checked="checked" data-widget="'+ $e.data("id") +'" data-section="'+ sec._id +'"><span class="s_switch_toggle"></span></label></div>'); $sectionswitch = $('<div class="s_grid_row"><label class="s_grid s_grid_3">'+ sec.name +'</label><div class="s_grid s_grid_6 s_switch"><div class="s_switch_status" status-on="On">On</div><label class="s_switch_switcher thmc2"><input type="checkbox" checked="checked" data-widget="'+ $e.data("id") +'" data-section="'+ sec._id +'"><span class="s_switch_toggle"></span></label></div></div>');
} }
$appinfolist.find("li:eq(0)").append($sectionswitch); $appinfolist.find("[info=section_activation]").append($sectionswitch);
}) })
$appinfo.show(); $appinfo.show();
o.simple_switch(function(dom){ o.simple_switch(function(dom){
@ -983,7 +983,7 @@ var orbitDesktop = function(dom){
var $app; var $app;
count++; count++;
elementSettingsData[app.id] = {"sections" : app.sections}; elementSettingsData[app.id] = {"sections" : app.sections};
$app = $('<div class="element w1 h1 hp vp thmc2" data-category="'+app.data_category+'" data-title="'+app.title+'" data-author="'+app.author+'" data-version="'+app.version+'" data-update="'+app.last_update+'" data-id="'+app.id+'" ><span class="tile thmc2"></span><a href="'+app.id+'" class="appicon"><img src="'+app.icon+'" alt="" onclick="return false;"></a><h1 class="appname thmtxt">'+app.title+'</h1></div>'); $app = $('<div class="element w1 h1 thmc2" data-category="'+app.data_category+'" data-title="'+app.title+'" data-author="'+app.author+'" data-version="'+app.version+'" data-update="'+app.last_update+'" data-id="'+app.id+'" ><span class="tile thmc2"></span><a href="'+app.id+'" class="appicon"><img src="'+app.icon+'" alt="" onclick="return false;"></a><h1 class="appname thmtxt">'+app.title+'</h1></div>');
if( count > 4 ){ if( count > 4 ){
count = 1, colindex+=1; count = 1, colindex+=1;
$('#app_list').append('<div class="g_col g_col_w1 col'+ colindex +'"/>'); $('#app_list').append('<div class="g_col g_col_w1 col'+ colindex +'"/>');

View File

@ -604,7 +604,6 @@ a.admtxt.admbg2:hover {
width: 420px; width: 420px;
height: 516px; height: 516px;
margin-right: 36px; } margin-right: 36px; }
#app_info .app_info_header { #app_info .app_info_header {
height: 120px; height: 120px;
margin: -12px -12px 12px -12px; margin: -12px -12px 12px -12px;

View File

@ -25,13 +25,8 @@
</div> </div>
<ul class="app_info_list"> <ul class="app_info_list">
<li class="s_grid_row"> <li class="s_grid_row">
<!-- <label class="s_grid s_grid_3">Activation</label> <label class="s_grid s_grid_3">Activation</label>
<div class="s_grid s_grid_9 s_switch"> --> <div info="section_activation" class="s_grid s_grid_9 s_switch"></div>
<!-- <div class="s_switch_status" status-on="On" status-off="Off"></div>
<label class="s_switch_switcher">
<input type="checkbox">
</label> -->
<!-- </div> -->
</li> </li>
<li class="s_grid_row"> <li class="s_grid_row">
<label class="s_grid s_grid_3">Description</label> <label class="s_grid s_grid_3">Description</label>