css minor changes.
This commit is contained in:
parent
9f362d9ae6
commit
edd2c1f522
|
@ -39,6 +39,7 @@ var orbitDesktop = function(dom){
|
||||||
this.tp = "";
|
this.tp = "";
|
||||||
this.sectionList;
|
this.sectionList;
|
||||||
this.data_method;
|
this.data_method;
|
||||||
|
this.gridvar = null;
|
||||||
this.initialize = function(){
|
this.initialize = function(){
|
||||||
|
|
||||||
var theme = o.theme;
|
var theme = o.theme;
|
||||||
|
@ -423,21 +424,21 @@ var orbitDesktop = function(dom){
|
||||||
var row = 1,col = 1,x = 1,y = 1;
|
var row = 1,col = 1,x = 1,y = 1;
|
||||||
var $group = $('<div class="grid"></div>');
|
var $group = $('<div class="grid"></div>');
|
||||||
var $ul = $('<ul style="margin: -6px 0 0 -6px;"></ul>');
|
var $ul = $('<ul style="margin: -6px 0 0 -6px;"></ul>');
|
||||||
|
|
||||||
$.each(tiles,function(i,tile){
|
$.each(tiles,function(i,tile){
|
||||||
if(row >= 4){
|
if(row >= 4){
|
||||||
row = 1;
|
row = 1;
|
||||||
col++;
|
col++;
|
||||||
}
|
}
|
||||||
|
|
||||||
var shape = tile.shape.split(" ");
|
var shape = tile.shape.split(" ");
|
||||||
x = parseInt(shape[0].substr(1,1));
|
x = parseInt(shape[0].substr(1,1));
|
||||||
y = parseInt(shape[1].substr(1,1));
|
y = parseInt(shape[1].substr(1,1));
|
||||||
var tilecolor = tilecolors[Math.floor(Math.random()*tilecolors.length)];
|
var tilecolor = tilecolors[Math.floor(Math.random()*tilecolors.length)];
|
||||||
var op = opacity[Math.floor(Math.random()*opacity.length)];
|
var op = opacity[Math.floor(Math.random()*opacity.length)];
|
||||||
if(tile.data_category == "app")
|
if(tile.data_category == "app")
|
||||||
$li = $('<li data-id="'+tile.id+'" class="tile '+tilecolor+' '+op+'" data-row="'+row+'" data-col="'+col+'" data-sizex="'+x+'" data-sizey="'+y+'" data-category="'+tile.data_category+'" data-content="'+tile.data_content+'"><a href="'+tile.data_content+'" class="appicon" onclick="return false;"><img src="'+o.iconPath+tile.data_content+'.png" alt="" ></a><h1 class="appname thmtxt">'+tile.title+'</h1></li>');
|
$li = $('<li data-id="'+tile.id+'" class="element" data-row="'+row+'" data-col="'+col+'" data-sizex="'+x+'" data-sizey="'+y+'" data-category="'+tile.data_category+'" data-content="'+tile.data_content+'"><span class="tile '+tilecolor+' '+op+'"></span><a href="'+tile.data_content+'" class="appicon" onclick="return false;"><img src="'+o.iconPath+tile.data_content+'.png" alt="" ></a><h1 class="appname thmtxt">'+tile.title+'</h1></li>');
|
||||||
else
|
else
|
||||||
$li = $('<li data-id="'+tile.id+'" class="tile '+tilecolor+' '+op+'" data-row="'+row+'" data-col="'+col+'" data-sizex="'+x+'" data-sizey="'+y+'" data-category="'+tile.data_category+'" data-content="'+tile.data_content+'" js-link="'+tile.js[0].url+'" css-link="'+tile.css.url+'"><div class="appholder">Loading...</div><h1 class="appname thmtxt">'+tile.title+'</h1></li>');
|
$li = $('<li data-id="'+tile.id+'" class="element" data-row="'+row+'" data-col="'+col+'" data-sizex="'+x+'" data-sizey="'+y+'" data-category="'+tile.data_category+'" data-content="'+tile.data_content+'" js-link="'+tile.js[0].url+'" css-link="'+tile.css.url+'"><span class="tile '+tilecolor+' '+op+'"></span><div class="appholder">Loading...</div><h1 class="appname thmtxt">'+tile.title+'</h1></li>');
|
||||||
|
|
||||||
row = row + y;
|
row = row + y;
|
||||||
|
|
||||||
|
@ -446,7 +447,7 @@ var orbitDesktop = function(dom){
|
||||||
$group.append($ul);
|
$group.append($ul);
|
||||||
console.log($group);
|
console.log($group);
|
||||||
$("div#desktop div#group_wrapper").append($group);
|
$("div#desktop div#group_wrapper").append($group);
|
||||||
$(".grid ul").gridster({
|
o.gridvar = $(".grid ul").gridster({
|
||||||
widget_margins: [6, 6],
|
widget_margins: [6, 6],
|
||||||
widget_base_dimensions: [120, 120]
|
widget_base_dimensions: [120, 120]
|
||||||
});
|
});
|
||||||
|
@ -1218,7 +1219,7 @@ var orbitDesktop = function(dom){
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
this.initializeWidgets = function(){ // this function will initialize all the widgets in the desktop
|
this.initializeWidgets = function(){ // this function will initialize all the widgets in the desktop
|
||||||
var elements = $("#group_wrapper li.tile");
|
var elements = $("#group_wrapper li.element");
|
||||||
$.each(elements,function(){
|
$.each(elements,function(){
|
||||||
var widget = $(this);
|
var widget = $(this);
|
||||||
if(widget.attr("data-category")=="widget"){
|
if(widget.attr("data-category")=="widget"){
|
||||||
|
|
|
@ -388,9 +388,9 @@ a:focus { outline: none; }
|
||||||
.hp { padding-left: 12px; padding-right: 12px; }
|
.hp { padding-left: 12px; padding-right: 12px; }
|
||||||
.vp { padding-top: 12px; padding-bottom: 12px; }
|
.vp { padding-top: 12px; padding-bottom: 12px; }
|
||||||
.element {
|
.element {
|
||||||
margin: 0 12px 12px 0;
|
/*margin: 0 12px 12px 0;
|
||||||
float: left;
|
float: left;*/
|
||||||
position: relative;
|
position: absolute;
|
||||||
/*display:inline-block;*/
|
/*display:inline-block;*/
|
||||||
}
|
}
|
||||||
.group{
|
.group{
|
||||||
|
|
Reference in New Issue