|
|
|
@@ -41,12 +41,11 @@ var sortDescending = function(a, b) {
|
|
|
|
|
|
|
|
|
|
Array.prototype.indexOfObject = function(object){
|
|
|
|
|
for(i = 0;i < this.length; i++){
|
|
|
|
|
if(this[i] === object){
|
|
|
|
|
if(this[i] === object)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return i;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
jQuery.ajax = (function(_ajax){
|
|
|
|
|
|
|
|
|
@@ -137,7 +136,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
o.getlocation();
|
|
|
|
|
$.getJSON("/desktop/get_desktop_settings",{"get":"desktop","desktopid":o.desktopId},function(desktopSettings){
|
|
|
|
|
if(desktopSettings){
|
|
|
|
|
if(desktopSettings.theme!=="custom"){
|
|
|
|
|
if(desktopSettings.theme!="custom"){
|
|
|
|
|
theme = desktopSettings.theme;
|
|
|
|
|
}else{
|
|
|
|
|
theme = "4f8d3f493b67fcd05f086359";
|
|
|
|
@@ -164,17 +163,17 @@ var orbitDesktop = function(dom){
|
|
|
|
|
$(o.contentHolder).empty().load("/desktop/desktop",function(){
|
|
|
|
|
o.desktopData["d_desktop"] = "";
|
|
|
|
|
o.initializeDesktop("d_desktop","",false);
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
o.customPage(custom_load);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
this.customPage = function(customload){
|
|
|
|
|
customload = customload.replace("#","");
|
|
|
|
|
if(customload.search("-") !== -1){
|
|
|
|
|
if(customload.search("-") != -1){
|
|
|
|
|
customload = customload.split("-");
|
|
|
|
|
o.menu_item($(".docklist a[custom-load="+customload[0]+"]"),true,customload[1]);
|
|
|
|
|
}else{
|
|
|
|
@@ -189,7 +188,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
$('head').append( $('<link rel="stylesheet" id="dyn_css" type="text/css" />').attr('href', "/"+o.themefolder+"/"+theme+"/css/"+ts.css));
|
|
|
|
|
o.loadWallpaper();
|
|
|
|
|
o.loadIconCache();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.getlocation = function(){
|
|
|
|
@@ -202,11 +201,11 @@ var orbitDesktop = function(dom){
|
|
|
|
|
});
|
|
|
|
|
o.locationdata.formatted_address = data.results[0].formatted_address;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var locationError = function(){
|
|
|
|
|
o.notify("Unable to find your location!","alert");
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (navigator.geolocation) {
|
|
|
|
|
navigator.geolocation.getCurrentPosition(locationSuccess,locationError);
|
|
|
|
@@ -215,7 +214,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
o.notify("Your browser does not support Geolocation!","alert");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
|
|
|
|
|
$(".docklist a").click(function(){
|
|
|
|
@@ -261,7 +260,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
error:function(){
|
|
|
|
|
o.notify("Please try again later!","imp");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
$(this).ajaxSubmit(options);
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
@@ -288,16 +287,15 @@ var orbitDesktop = function(dom){
|
|
|
|
|
url : $e.attr("href"),
|
|
|
|
|
success : function(data){
|
|
|
|
|
if(typeof data == "string"){
|
|
|
|
|
if(ca){
|
|
|
|
|
if(ca)
|
|
|
|
|
$(ca).html(data);
|
|
|
|
|
} else {
|
|
|
|
|
else{
|
|
|
|
|
o.layout_data(data);
|
|
|
|
|
// $("div[container=true]").html(data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(exe){
|
|
|
|
|
if(exe)
|
|
|
|
|
window.o[o.data_method][exe](data,$e);
|
|
|
|
|
}
|
|
|
|
|
if(t == "delete"){
|
|
|
|
|
if($e.attr("delete-item")=="true"){
|
|
|
|
|
var li_to_delete = $e.parentsUntil("li[item=true]").find("li[item=true]");
|
|
|
|
@@ -306,7 +304,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
if($e.attr("confirm-message")){
|
|
|
|
|
o.confirm({
|
|
|
|
|
buttons : ["Yes","No"],
|
|
|
|
@@ -316,7 +314,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
if(value){
|
|
|
|
|
a();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
a();
|
|
|
|
|
}
|
|
|
|
@@ -324,8 +322,11 @@ var orbitDesktop = function(dom){
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(window).resize(function(){
|
|
|
|
|
$('.tinycanvas').tinyscrollbar_update('relative');
|
|
|
|
|
|
|
|
|
|
// var ww = $(window).width();
|
|
|
|
|
// $("img#thmbackground").attr({"width":ww});
|
|
|
|
|
// if( $('.tinycanvas').length > 0 ){
|
|
|
|
|
$('.tinycanvas').tinyscrollbar_update('relative');
|
|
|
|
|
// }
|
|
|
|
|
if($(o.contentHolder).find("div.app_frame").length > 0){
|
|
|
|
|
$(o.contentHolder).find("div.app_frame").each(function(){
|
|
|
|
|
var app_holder_height = $(this).height() - 72;
|
|
|
|
@@ -348,10 +349,11 @@ var orbitDesktop = function(dom){
|
|
|
|
|
|
|
|
|
|
var split = function( val ) {
|
|
|
|
|
return val.split( /,\s*/ );
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
var extractLast = function( term ) {
|
|
|
|
|
return split( term ).pop();
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $("body").on("keydown","*[autocomplete]", function( event ) {
|
|
|
|
|
// var autocompleteList = $(this).attr("autocomplete-list");
|
|
|
|
@@ -400,7 +402,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
x = 0;
|
|
|
|
|
temp_div.append(column);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
if(x != 0){
|
|
|
|
|
temp_div.append(column);
|
|
|
|
|
}
|
|
|
|
@@ -416,7 +418,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
column.append(ul);
|
|
|
|
|
x++;
|
|
|
|
|
temp_div.append(column);
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
total_width = (!isNaN(base_width)) ? (base_width + gutter*2 +1) * total_columns : null;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
@@ -425,11 +427,11 @@ var orbitDesktop = function(dom){
|
|
|
|
|
}
|
|
|
|
|
// total_width = (!isNaN(base_width) ? ( base_width + 12 ) * total_columns : null);
|
|
|
|
|
return {
|
|
|
|
|
"markup":temp_div[0].innerHTML,
|
|
|
|
|
"markup":temp_div.html(),
|
|
|
|
|
"width":total_width,
|
|
|
|
|
"total":entries.length
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
var check_container = $("<div></div>").html(h).find("div[container=true]");
|
|
|
|
|
if(check_container.length > 0){
|
|
|
|
|
$("div[container=true]")
|
|
|
|
@@ -445,7 +447,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
$("div[container=true]")
|
|
|
|
|
.find("div.tinycanvas")
|
|
|
|
|
.prepend('<div class="scrollbar sb_h"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>');
|
|
|
|
|
var f = o.layout_data.generate_layout_html(h);
|
|
|
|
|
var f = o.layout_data.generate_layout_html(h)
|
|
|
|
|
$("div[container=true] div.overview").html(f.markup);
|
|
|
|
|
var settings = {main : ".tinycanvas"};
|
|
|
|
|
var tsettings = {};
|
|
|
|
@@ -464,7 +466,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
o.pagination(pagination_link,pagination_variable,page_no);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// call other functions here
|
|
|
|
|
o.tinyscrollbar_ext(settings,tsettings);
|
|
|
|
@@ -472,8 +474,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
o.autocomplete();
|
|
|
|
|
o.use_select2();
|
|
|
|
|
o.check_simple_layout();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.paging = true;
|
|
|
|
|
this.pagination = function(link,variable,page_no){
|
|
|
|
|
var retvalue = null;
|
|
|
|
@@ -496,7 +497,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.insert_new_column = function(index){
|
|
|
|
|
var column_container = $("div[container=true] .overview"),layout = column_container.attr("content-layout"),base_width = parseInt(column_container.attr("base-width")),column;
|
|
|
|
@@ -506,15 +507,16 @@ var orbitDesktop = function(dom){
|
|
|
|
|
switch(layout){
|
|
|
|
|
case "datalist":
|
|
|
|
|
column = $("<div class='column type_column' style='width:"+base_width+"px'></div");
|
|
|
|
|
break;
|
|
|
|
|
break;
|
|
|
|
|
case "column":
|
|
|
|
|
column = $("<div class='column type_column' style='width:"+base_width+"px'></div");
|
|
|
|
|
break;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if(index == 0){
|
|
|
|
|
column.insertBefore(previous_column);
|
|
|
|
|
column.insertBefore(previous_column)
|
|
|
|
|
}else{
|
|
|
|
|
column.insertAfter(previous_column);
|
|
|
|
|
}
|
|
|
|
@@ -522,29 +524,29 @@ var orbitDesktop = function(dom){
|
|
|
|
|
o.tinyscrollbar_ext({
|
|
|
|
|
main : ".tinycanvas",
|
|
|
|
|
fill : base_width * total_columns
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
return column;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.remove_column = function(index){
|
|
|
|
|
var column_container = $("div[container=true] .overview"),layout = column_container.attr("content-layout"),column = column_container.find(".column").eq(index),base_width = parseInt(column_container.attr("base-width"));
|
|
|
|
|
if(column.length == 0){ return false; }
|
|
|
|
|
if(column.length == 0)return false;
|
|
|
|
|
switch(layout){
|
|
|
|
|
case "datalist":
|
|
|
|
|
break;
|
|
|
|
|
case "column":
|
|
|
|
|
break;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
column.remove();
|
|
|
|
|
var total_columns = column_container.find(".column").length;
|
|
|
|
|
o.tinyscrollbar_ext({
|
|
|
|
|
main : ".tinycanvas",
|
|
|
|
|
fill : base_width * total_columns
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
return column;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.menu_item = function(dom,customload,submenuitem){
|
|
|
|
|
if(!customload)customload=false;
|
|
|
|
@@ -645,12 +647,17 @@ var orbitDesktop = function(dom){
|
|
|
|
|
}
|
|
|
|
|
if(dom.length == 0)
|
|
|
|
|
o.layout_data(data);
|
|
|
|
|
// $('*[content-type=menu] a').removeClass('thmc1 thmtxt active');
|
|
|
|
|
// dom.addClass('thmc1 thmtxt active');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.initializeDesktop = function(target,url,cache){ //this is for initializing main desktops that are sections and tiles
|
|
|
|
|
target = (!target) ? 'desktop' : target;
|
|
|
|
|
var bindHandlers = function(){ // this function will bind all the handlers in the desktop
|
|
|
|
|
var dragged = null,draggable,lastpos = [];
|
|
|
|
|
/* Hotfix - Part 1 */
|
|
|
|
|
// var items = $(".gridster ul li");
|
|
|
|
|
// items.detach();
|
|
|
|
|
|
|
|
|
|
o.gridvar = $(".grid ul").find("> li ")
|
|
|
|
|
.mousedown(function(e){
|
|
|
|
@@ -673,6 +680,15 @@ var orbitDesktop = function(dom){
|
|
|
|
|
dragged.addClass("noClick");
|
|
|
|
|
},
|
|
|
|
|
stop: function(event, ui){
|
|
|
|
|
// for (var i = 1; i <= 30; i++) {
|
|
|
|
|
// // var celement = $(".grid ul .widget[data-col="+i+"]:last");
|
|
|
|
|
// $(".grid ul .widget[data-col="+i+"]").each(function(){
|
|
|
|
|
// var pos = $(this).position();
|
|
|
|
|
// if(pos && (pos.top + $(this).height() + 6) > 550){
|
|
|
|
|
// revertbacktiles();
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
$('.tinycanvas').tinyscrollbar_update('relative');
|
|
|
|
|
var newpos = o.gridvar.serialize();
|
|
|
|
|
$.post("/desktop/newpositions",{"newpositions":newpos});
|
|
|
|
@@ -681,6 +697,16 @@ var orbitDesktop = function(dom){
|
|
|
|
|
})
|
|
|
|
|
.data('gridster');
|
|
|
|
|
|
|
|
|
|
/* Hotfix - Part 2 */
|
|
|
|
|
// $.each(items , function (i, e) {
|
|
|
|
|
// var item = $(this);
|
|
|
|
|
// var columns = parseInt(item.attr("data-sizex"));
|
|
|
|
|
// var rows = parseInt(item.attr("data-sizey"));
|
|
|
|
|
// var col = parseInt(item.attr("data-col"));
|
|
|
|
|
// var row = parseInt(item.attr("data-row"));
|
|
|
|
|
// o.gridvar.add_widget(item, columns, rows, col, row);
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
var revertbacktiles = function(){
|
|
|
|
|
lastpos.push({"col":"","row":""});
|
|
|
|
|
$(".grid ul li").each(function(i){
|
|
|
|
@@ -689,6 +715,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
}
|
|
|
|
|
var remove_empty_columns = function(){
|
|
|
|
|
for (var i = 1; i <= 30; i++) {
|
|
|
|
|
// var celement = $(".grid ul .widget[data-col="+i+"]:last");
|
|
|
|
|
$(".grid ul .widget[data-col="+i+"]").each(function(){
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
@@ -708,6 +735,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
dragged.removeClass("noClick");
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
o.appname_substr('.gridster li');
|
|
|
|
|
o.simple_drop_down();
|
|
|
|
|
o.tinyscrollbar_ext({
|
|
|
|
|
main: '.tinycanvas'
|
|
|
|
@@ -726,7 +754,12 @@ var orbitDesktop = function(dom){
|
|
|
|
|
|
|
|
|
|
$.each(tiles,function(i,tile){
|
|
|
|
|
var shape = tile.shape.split(" ");
|
|
|
|
|
// if(tile.title == "Weather")console.log("Big - row : " + tile.row + ", col : "+ tile.column);
|
|
|
|
|
// if(tile.title == "Google Scholar")console.log("Scholar - row : " + tile.row + ", col : "+ tile.column);
|
|
|
|
|
|
|
|
|
|
// if(total_x % 2 != 0)
|
|
|
|
|
// row = row - y;
|
|
|
|
|
// if(i == 7)tile.row = null;
|
|
|
|
|
if(tile.row){
|
|
|
|
|
row = tile.row;
|
|
|
|
|
col = tile.column;
|
|
|
|
@@ -753,9 +786,9 @@ var orbitDesktop = function(dom){
|
|
|
|
|
var f = (tile.fullsize?"fullsize":null);
|
|
|
|
|
|
|
|
|
|
if(tile.data_category == "app"){
|
|
|
|
|
$li = $('<li data-id="'+tile.id+'" class="app" 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;" data-url="'+tile.link+'"><img src="'+tile.icon+'" alt="" ></a><h1 class="appname thmtxt text_ofl"><span>'+tile.title+'</span></h1></li>');
|
|
|
|
|
$li = $('<li data-id="'+tile.id+'" class="app" data-row="'+row+'" data-col="'+col+'" data-sizex="'+x+'" data-sizey="'+y+'" data-title="'+tile.title+'" 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;" data-url="'+tile.link+'"><img src="'+tile.icon+'" alt="" ></a><h1 class="appname thmtxt">'+tile.title+'</h1></li>');
|
|
|
|
|
} else {
|
|
|
|
|
$li = $('<li data-id="'+tile.id+'" class="widget '+f+'" 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"></div><h1 class="appname thmtxt text_ofl"><span>'+tile.title+'</span></h1></li>');
|
|
|
|
|
$li = $('<li data-id="'+tile.id+'" class="widget '+f+'" 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"></div><h1 class="appname thmtxt">'+tile.title+'</h1></li>');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -794,6 +827,8 @@ var orbitDesktop = function(dom){
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if(cache){
|
|
|
|
|
bindHandlers();
|
|
|
|
|
o.initializeWidgets();
|
|
|
|
|
$("#desktop #section_list").empty();
|
|
|
|
|
$.each(o.sectionList,function(i,section){
|
|
|
|
|
var tempstyle="";
|
|
|
|
@@ -803,7 +838,8 @@ var orbitDesktop = function(dom){
|
|
|
|
|
}
|
|
|
|
|
$("#desktop #section_list").append($('<li class="section_name" '+tempstyle+'><a class="admtxt hp hh1" onclick="return false;" href="'+section._id+'" >'+section.name+'</a></li>'));
|
|
|
|
|
});
|
|
|
|
|
loadTiles(o.sectionId);
|
|
|
|
|
bindSecondaryHandlers();
|
|
|
|
|
o.simple_drop_down();
|
|
|
|
|
}else{
|
|
|
|
|
loadSectionList();
|
|
|
|
|
loadTiles(o.sectionId);
|
|
|
|
@@ -844,12 +880,18 @@ var orbitDesktop = function(dom){
|
|
|
|
|
$result.empty().show();
|
|
|
|
|
$applist.hide();
|
|
|
|
|
|
|
|
|
|
// searchArray = $elements.filter(":containsi("+$(this).val()+")").clone(1,1);
|
|
|
|
|
// searchArray = $('#app_list').find('[data-title*="'+query+'"]').clone(1,1);
|
|
|
|
|
searchArray = $elements.filter(function(){
|
|
|
|
|
var matcher = new RegExp(query, "i");
|
|
|
|
|
return matcher.test( $(this).find('.appname span')[0].innerHTML );
|
|
|
|
|
return matcher.test( $(this).attr('data-title') );
|
|
|
|
|
}).clone(1,1);
|
|
|
|
|
|
|
|
|
|
if(searchArray.length > 0){
|
|
|
|
|
// searchArray.each(function(){
|
|
|
|
|
// $(this).hide("fold","fast");
|
|
|
|
|
// })
|
|
|
|
|
// $("#app_manager #seperator").show();
|
|
|
|
|
var i = 0, c = 1; // c for numbers of columns
|
|
|
|
|
var $column;
|
|
|
|
|
searchArray.each(function(){
|
|
|
|
@@ -1049,6 +1091,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
elementSetting();
|
|
|
|
|
o.appname_substr('#group_wrapper .element');
|
|
|
|
|
o.check_simple_layout();
|
|
|
|
|
}
|
|
|
|
|
var elementSettingsData = {};
|
|
|
|
@@ -1072,7 +1115,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
var $app;
|
|
|
|
|
count++;
|
|
|
|
|
elementSettingsData[app.id] = {"sections" : app.sections};
|
|
|
|
|
$app = $('<div class="element w1 h1 thmc2" data-type="'+app.data_category+'" data-title="'+app.title+'" data-author="'+app.author+'" data-version="'+app.version+'" data-update="'+app.last_update+'" data-id="'+app.id+'" data-text-color="'+app.text_color+'" data-background="'+app.background+'" ><span class="tile thmc2"></span><a href="'+app.id+'" class="appicon"><img src="'+app.icon+'" alt="" onclick="return false;"></a><h1 class="appname thmtxt text_ofl"><span>'+app.title+'</span></h1></div>');
|
|
|
|
|
$app = $('<div class="element w1 h1 thmc2" data-type="'+app.data_category+'" data-title="'+app.title+'" data-author="'+app.author+'" data-version="'+app.version+'" data-update="'+app.last_update+'" data-id="'+app.id+'" data-text-color="'+app.text_color+'" data-background="'+app.background+'" ><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 ){
|
|
|
|
|
count = 1, colindex+=1;
|
|
|
|
|
$('#app_list').append('<div class="g_col g_col_w1 col'+ colindex +'"/>');
|
|
|
|
@@ -1090,146 +1133,8 @@ var orbitDesktop = function(dom){
|
|
|
|
|
loadApps();
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
this.t = {}
|
|
|
|
|
this.initializeSectionsManager = function(target,url,cache){ // this is init function for section manager
|
|
|
|
|
var elementParent,element,slabel;
|
|
|
|
|
var bindHandlers = function(){ // this is bind handler for section manager page
|
|
|
|
|
var groupWrapperWidth = 0;
|
|
|
|
|
$("#sections .group").each(function(){groupWrapperWidth+=$(this).width();})
|
|
|
|
|
groupWrapperWidth+=200;
|
|
|
|
|
groupWrapperHeight = $(".group").height() + 20;
|
|
|
|
|
$("#group_wrapper").width(groupWrapperWidth);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var sortingoptions = {
|
|
|
|
|
start:function(){
|
|
|
|
|
slabel = $(this).parent().siblings('.section_label');
|
|
|
|
|
slabel.find('li:hidden').stop(1,1).fadeIn(500);
|
|
|
|
|
},
|
|
|
|
|
stop:function(){
|
|
|
|
|
slabel.find('li:not(:nth-child(1))').stop(1,1).fadeOut(500);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$("#sections #group_wrapper .appgroup").sortable(sortingoptions);
|
|
|
|
|
|
|
|
|
|
$("#sections .section_label li:not(:nth-child(1))").droppable({
|
|
|
|
|
drop:function(event, ui){
|
|
|
|
|
elementParent = ui.draggable.parents('.group');
|
|
|
|
|
elementParentUl = ui.draggable.parents(".appgroup");
|
|
|
|
|
var $item = $( this ),
|
|
|
|
|
$list = $( '#'+$item.data("category") );
|
|
|
|
|
if($list.children('.element').length>=24){
|
|
|
|
|
o.notify("Section is full.","alert");
|
|
|
|
|
}else{
|
|
|
|
|
ui.draggable.hide('fast',function(){
|
|
|
|
|
var newul = false;
|
|
|
|
|
if($list.find("ul").length == 0){
|
|
|
|
|
$list.append(('<ul class="appgroup w1" ></ul>'));
|
|
|
|
|
newul = true;
|
|
|
|
|
}else if($list.find("ul:eq(0) li").length == 7){
|
|
|
|
|
$list.append(('<ul class="appgroup w1" ></ul>'));
|
|
|
|
|
newul = true;
|
|
|
|
|
}
|
|
|
|
|
$(this).appendTo($list.find("ul:last")).fadeIn();
|
|
|
|
|
var next_group = elementParent.find(".grp ul").eq(elementParentUl.index() + 1);
|
|
|
|
|
if(elementParentUl.index() == 0){
|
|
|
|
|
if(elementParentUl.find("li").length < 7){
|
|
|
|
|
|
|
|
|
|
var element_to_shift = next_group.find("li").eq(0);
|
|
|
|
|
if(element_to_shift.length != 0){
|
|
|
|
|
elementParentUl.append(element_to_shift);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(next_group.find("li").length == 0){
|
|
|
|
|
next_group.remove();
|
|
|
|
|
}
|
|
|
|
|
if(elementParentUl.find("li").length == 0){
|
|
|
|
|
elementParentUl.remove();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(elementParent.find(".grp ul").length == 0){
|
|
|
|
|
elementParent.find(".grp").addClass("no_app");
|
|
|
|
|
}else{
|
|
|
|
|
elementParent.find(".grp").removeClass("no_app");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(newul){
|
|
|
|
|
$("#sections #group_wrapper .appgroup").sortable(sortingoptions);
|
|
|
|
|
$list.removeClass("no_app");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$.post("/desktop/save_desktop_settings",{"save":"appnewsection","appid":ui.draggable.attr("id"),"newsectionid":$(this).data("content"),"desktopid":o.desktopId});
|
|
|
|
|
// if(o.sectionId == $(this).data("content") || o.sectionId == elementParent.attr("id")){
|
|
|
|
|
o.desktopData["home"]="";
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
$(this).find('span.tile').addClass('op06',400);
|
|
|
|
|
},
|
|
|
|
|
over:function(){
|
|
|
|
|
$(this).find('span.tile').removeClass('op06');
|
|
|
|
|
},
|
|
|
|
|
out:function(){
|
|
|
|
|
$(this).find('span.tile').addClass('op06');
|
|
|
|
|
},
|
|
|
|
|
accept: '.to_drop'
|
|
|
|
|
});
|
|
|
|
|
o.tinyscrollbar_ext({
|
|
|
|
|
main: '.tinycanvas',
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var loadApps = function(){ // this loads apps from db to in each sections
|
|
|
|
|
$.getJSON("/desktop/getapplist",{desktopid:o.desktopId},function(appss){
|
|
|
|
|
var $group,$lii,$li;
|
|
|
|
|
var z=0;
|
|
|
|
|
for(section in o.sectionList){
|
|
|
|
|
$group = $('<div class="group" id="'+o.sectionList[section]._id+'"><div class="section_label"><ul class="section_grp"></ul></div><div id="section'+(z+1)+'" class="grp no_app" style="min-width:120px;"></div></div>');
|
|
|
|
|
for(x=0;x<4;x++){
|
|
|
|
|
if(x==0){
|
|
|
|
|
$li = $('<li class="element w1 h1 hp vp thmtxt" data-content="'+o.sectionList[z]._id+'"><span class="tile thmc1"></span><span class="thmtxt">'+o.sectionList[z].name+'</span></li>');
|
|
|
|
|
$group.find("ul.section_grp").append($li);
|
|
|
|
|
}
|
|
|
|
|
if(z!=x){
|
|
|
|
|
$lii = $('<li class="element w1 h1 hp vp thmtxt" style="display: none;" data-category="section'+(x+1)+'" data-content="'+o.sectionList[x]._id+'"><span class="tile thmc2 op06"></span><span class="thmtxt">'+o.sectionList[x].name+'</span></li>');
|
|
|
|
|
$group.find(".section_grp").append($lii);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
z++;
|
|
|
|
|
|
|
|
|
|
$("#group_wrapper").append($group);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var x = 0;
|
|
|
|
|
$.each(appss,function(i,apps){
|
|
|
|
|
x = 0;
|
|
|
|
|
$.each(apps,function(y,app){
|
|
|
|
|
x++;
|
|
|
|
|
if(x == 1){
|
|
|
|
|
$ul = $('<ul class="appgroup w1" ></ul>');
|
|
|
|
|
}
|
|
|
|
|
$li = $('<li class="element to_drop w1 hh2 hp vp" data-category="'+app.data_category+'" data-content="'+app.data_content+'" id="'+app._id+'"><div class="appicon"><img src="'+o.iconPath+app.data_content+'.png" class="" width="30" /></div><h1 class="appname thmtxth text_ofl"><span>'+app.title+'</span></h1></li>');
|
|
|
|
|
$ul.append($li);
|
|
|
|
|
if(x == 7){
|
|
|
|
|
$("#group_wrapper #section"+(i+1)).append($ul);
|
|
|
|
|
$("#group_wrapper #section"+(i+1)).removeClass("no_app")
|
|
|
|
|
x = 0;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if(x != 0){
|
|
|
|
|
$("#group_wrapper #section"+(i+1)).append($ul);
|
|
|
|
|
$("#group_wrapper #section"+(i+1)).removeClass("no_app")
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
bindHandlers();
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(cache)
|
|
|
|
|
bindHandlers();
|
|
|
|
|
else
|
|
|
|
|
loadApps();
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
this.initializeSettings = function(target,url,cache){ //this is to initialize setting page
|
|
|
|
|
|
|
|
|
|
this.initializeSettings.account = function(data){}
|
|
|
|
@@ -1286,6 +1191,8 @@ var orbitDesktop = function(dom){
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
o.single_select();
|
|
|
|
|
o.simple_tab();
|
|
|
|
|
|
|
|
|
|
$('.color-picker').miniColors({
|
|
|
|
|
change:function(hex){
|
|
|
|
@@ -1336,10 +1243,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
$(".stock_wallpaper .ssl_item").click(function(){
|
|
|
|
|
var wallpapername = $(this).find("img").attr("alt");
|
|
|
|
|
o.changeWallpaper(wallpapername);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
o.single_select();
|
|
|
|
|
o.simple_tab();
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
var loadthmc = function(){ // a general function to load the themecolor in color selector
|
|
|
|
|
$('.color-picker').each(function(){
|
|
|
|
@@ -1362,19 +1266,19 @@ var orbitDesktop = function(dom){
|
|
|
|
|
color = $('#theme_preview_area .'+cc).css(hex);
|
|
|
|
|
$(this).miniColors("value", o.rgb2hex(color));
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.getJSON("/desktop/get_desktop_settings",{"get":"theme","desktopid":o.desktopId},function(theme){
|
|
|
|
|
|
|
|
|
|
$('#st1 .theme_list [id='+theme+']')
|
|
|
|
|
.addClass("thmc1 active", 300)
|
|
|
|
|
.find("span")
|
|
|
|
|
.addClass("thmtxt");
|
|
|
|
|
.addClass("thmc1 active", 300)
|
|
|
|
|
.find("span")
|
|
|
|
|
.addClass("thmtxt");
|
|
|
|
|
|
|
|
|
|
bindHandlers();
|
|
|
|
|
loadthmc();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
bindHandlers();
|
|
|
|
|
loadthmc();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.initializeSettings.connection = function(){
|
|
|
|
@@ -1449,17 +1353,17 @@ var orbitDesktop = function(dom){
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$.getJSON("/otheraccounts/getaccounts",function(accounts){
|
|
|
|
|
$.each(accounts,function(i,account){
|
|
|
|
|
$ul = $("#"+account.type+"_connection");
|
|
|
|
|
$ul.find("input[type=text]").replaceWith("<div class='c_info usrnm'>"+account.email+"</div>")
|
|
|
|
|
$ul.find("input[type=password]").replaceWith("<div class='c_info pwd'>••••••</div>");
|
|
|
|
|
$ul.find("a[for=new]").text("Edit").attr("for","edit");
|
|
|
|
|
$ul.find("a[for=delete]").show();
|
|
|
|
|
$ul.find(".c_status").text("Connected").addClass("c_status_on");
|
|
|
|
|
})
|
|
|
|
|
bindHandlers();
|
|
|
|
|
})
|
|
|
|
|
// $.getJSON("/otheraccounts/getaccounts",function(accounts){
|
|
|
|
|
// $.each(accounts,function(i,account){
|
|
|
|
|
// $ul = $("#"+account.type+"_connection");
|
|
|
|
|
// $ul.find("input[type=text]").replaceWith("<div class='c_info usrnm'>"+account.email+"</div>")
|
|
|
|
|
// $ul.find("input[type=password]").replaceWith("<div class='c_info pwd'>••••••</div>");
|
|
|
|
|
// $ul.find("a[for=new]").text("Edit").attr("for","edit");
|
|
|
|
|
// $ul.find("a[for=delete]").show();
|
|
|
|
|
// $ul.find(".c_status").text("Connected").addClass("c_status_on");
|
|
|
|
|
// })
|
|
|
|
|
// bindHandlers();
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -1582,6 +1486,7 @@ var orbitDesktop = function(dom){
|
|
|
|
|
}else{
|
|
|
|
|
li.find(".not_status").html("Install on <a href='addthis' for='"+o.sectionList[0]._id+"' style='text-decoration:underline;'>"+o.sectionList[0].name+"</a> <a href='addthis' for='"+o.sectionList[1]._id+"' style='text-decoration:underline;'>"+o.sectionList[1].name+"</a> <a href='addthis' for='"+o.sectionList[2]._id+"' style='text-decoration:underline;'>"+o.sectionList[2].name+"</a> <a href='addthis' for='"+o.sectionList[3]._id+"' style='text-decoration:underline;'>"+o.sectionList[3].name)+"</a>";
|
|
|
|
|
}
|
|
|
|
|
//console.log(section_names);
|
|
|
|
|
column.find("ul").append(li);
|
|
|
|
|
if(counter%4==0){
|
|
|
|
|
$("#apps_store #widget_list").append(column);
|
|
|
|
@@ -1609,9 +1514,9 @@ var orbitDesktop = function(dom){
|
|
|
|
|
this.loadWallpaper = function(wallpaper){ // this is to load new wallpaper
|
|
|
|
|
wallpapernm = (!wallpaper) ? o.themesettings.background : wallpaper;
|
|
|
|
|
if(!wallpaper){
|
|
|
|
|
$("#thmbackground").css("background-image","url(/"+o.themefolder+"/"+o.theme+"/images/"+wallpapernm+")");
|
|
|
|
|
$("#thmbackground").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+wallpapernm);
|
|
|
|
|
} else {
|
|
|
|
|
$("#thmbackground").css("background-image","url("+o.wallpaperPath+wallpaper+")");
|
|
|
|
|
$("#thmbackground").attr("src",o.wallpaperPath+wallpaper);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@@ -1627,11 +1532,11 @@ var orbitDesktop = function(dom){
|
|
|
|
|
loading = '<div class="thmtxt o-loading"><i class="icon-spin icon-spinner"></i> Loading</div>';
|
|
|
|
|
$.each(elements,function(){
|
|
|
|
|
var widget = $(this),
|
|
|
|
|
widget_holder = $(this).find('.appholder'),
|
|
|
|
|
widget_style = (widget.find('.widget_style').length > 0) ? '' : '<link class="widget_style" rel="stylesheet" href="'+widget.attr("css-link")+'" type="text/css" />';
|
|
|
|
|
widget_holder = $(this).find('.appholder')
|
|
|
|
|
// widget_style = (widget.find('.widget_style').length > 0) ? '' : '<link class="widget_style" rel="stylesheet" href="'+widget.attr("css-link")+'" type="text/css" />';
|
|
|
|
|
if(widget.attr("data-category")=="widget"){
|
|
|
|
|
var widgetname = widget.attr("data-content");
|
|
|
|
|
widget_holder.before(widget_style).empty();
|
|
|
|
|
// widget_holder.before(widget_style).empty();
|
|
|
|
|
$.getScript(widget.attr("js-link")).done(function(){
|
|
|
|
|
// widget.find(".appholder").load(widget.attr("data-content"));
|
|
|
|
|
$.ajax({
|
|
|
|
@@ -1707,7 +1612,6 @@ var orbitDesktop = function(dom){
|
|
|
|
|
// ** not sure to update canvas here ( $.tinyscrollbar_update() )
|
|
|
|
|
var sw = 0,
|
|
|
|
|
$simple_layout = $('#content .overview[content-layout=simple]');
|
|
|
|
|
|
|
|
|
|
if($simple_layout.find(".s_column").length > 0){
|
|
|
|
|
$simple_layout.each(function(){
|
|
|
|
|
$(this).find(".s_column").filter(":visible").each(function(){
|
|
|
|
@@ -1716,6 +1620,9 @@ var orbitDesktop = function(dom){
|
|
|
|
|
$simple_layout.css('width',sw);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// if($simple_layout.find(".s_column").length > 0){
|
|
|
|
|
// $simple_layout.css('width',sw);
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
this.simple_drop_down = function(){
|
|
|
|
|
// simple dropdown menu
|
|
|
|
@@ -1734,64 +1641,46 @@ var orbitDesktop = function(dom){
|
|
|
|
|
};
|
|
|
|
|
this.simple_tab = function(){
|
|
|
|
|
// tab
|
|
|
|
|
var active = 'thmc2 thmtxt',
|
|
|
|
|
normal = 'admtxt admbg';
|
|
|
|
|
var $anchor = $('.s_tab a[href*=#]'),
|
|
|
|
|
$tabcontent = $('.st_c');
|
|
|
|
|
|
|
|
|
|
$('.s_tab').each(function(){
|
|
|
|
|
var $anchor = $(this).find('a[href*=#]'),
|
|
|
|
|
$current_tab = $anchor.filter('[data-active="true"]');
|
|
|
|
|
|
|
|
|
|
// initialize
|
|
|
|
|
$current_tab.switchClass(normal,active,300);
|
|
|
|
|
$($current_tab.attr('href')).show();
|
|
|
|
|
|
|
|
|
|
$anchor.each(function(){
|
|
|
|
|
$(this).click(function(){
|
|
|
|
|
var target = $(this).attr('href');
|
|
|
|
|
$anchor.switchClass(active,normal,200);
|
|
|
|
|
$(this)
|
|
|
|
|
.switchClass(normal,active,200)
|
|
|
|
|
.parents('.s_tab')
|
|
|
|
|
.find('a[href*=#]').not('a[href*='+target+']')
|
|
|
|
|
.switchClass(active,normal,200);
|
|
|
|
|
$(target)
|
|
|
|
|
.siblings('.st_c')
|
|
|
|
|
.hide()
|
|
|
|
|
.end()
|
|
|
|
|
.show();
|
|
|
|
|
if( $(target).parents('.tinycanvas').length > 0 ){
|
|
|
|
|
$(target).parents('.tinycanvas').tinyscrollbar_update();
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
$anchor.each(function(){
|
|
|
|
|
$(this).click(function(){
|
|
|
|
|
var target = $(this).attr('href');
|
|
|
|
|
$anchor.removeClass('thmc2 thmtxt admtxt admbg').addClass('admtxt admbg');
|
|
|
|
|
$(this).toggleClass('thmc2 thmtxt admtxt admbg');
|
|
|
|
|
$tabcontent.hide();
|
|
|
|
|
$(target).show();
|
|
|
|
|
if( $('.tinycanvas').length > 0 ){
|
|
|
|
|
$('.tinycanvas').tinyscrollbar_update();
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.simple_switch = function(func){
|
|
|
|
|
$('.s_switch').each(function(){
|
|
|
|
|
var switcher = $(this).find('.s_switch_switcher'),
|
|
|
|
|
checkbox = $(this).find('input[type=checkbox]'),
|
|
|
|
|
status = $(this).find('.s_switch_status'),
|
|
|
|
|
var $switcher = $(this).find('.s_switch_switcher'),
|
|
|
|
|
$checkbox = $(this).find('input[type=checkbox]'),
|
|
|
|
|
$status = $(this).find('.s_switch_status'),
|
|
|
|
|
toggle = '<span class="s_switch_toggle"></span>',
|
|
|
|
|
text_on = status.attr('status-on'),
|
|
|
|
|
text_off = status.attr('status-off'),
|
|
|
|
|
status_on = 'thmc2',
|
|
|
|
|
status_off = 'admbg2',
|
|
|
|
|
status_on = $status.attr('status-on'),
|
|
|
|
|
status_off = $status.attr('status-off'),
|
|
|
|
|
ini, set;
|
|
|
|
|
ini = switcher.hasClass(status_off) ? null : switcher.addClass(status_off);
|
|
|
|
|
ini = switcher.find('.s_switch_toggle').length < 1 ? checkbox.after(toggle) : null;
|
|
|
|
|
set = checkbox.is(':checked') ? status.text(text_on) : status.text(text_off);
|
|
|
|
|
checkbox.unbind().change(function(){
|
|
|
|
|
ini = ($switcher.hasClass('admbg2')) ? null : $switcher.addClass('admbg2');
|
|
|
|
|
ini = ($switcher.find('.s_switch_toggle').length < 1) ? $checkbox.after(toggle) : null;
|
|
|
|
|
set = ($checkbox.is(':checked')) ? $status.text(status_on) : $status.text(status_off);
|
|
|
|
|
$checkbox.unbind().change(function(){
|
|
|
|
|
var v = $(this).attr('checked');
|
|
|
|
|
switch (v) {
|
|
|
|
|
case 'checked':
|
|
|
|
|
switcher.switchClass(status_off,status_on);
|
|
|
|
|
status.text(text_on);
|
|
|
|
|
$switcher.switchClass('admbg2','thmc2');
|
|
|
|
|
$status.text(status_on);
|
|
|
|
|
break;
|
|
|
|
|
case undefined:
|
|
|
|
|
switcher.switchClass(status_on,status_off);
|
|
|
|
|
status.text(text_off);
|
|
|
|
|
$switcher.switchClass('thmc2','admbg2');
|
|
|
|
|
$status.text(status_off);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if(typeof func == "function"){
|
|
|
|
@@ -1886,17 +1775,19 @@ var orbitDesktop = function(dom){
|
|
|
|
|
fields = fields.replace("]","");
|
|
|
|
|
fields = fields.replace("[","");
|
|
|
|
|
fields = fields.split(",");
|
|
|
|
|
|
|
|
|
|
options.formatResult = function(data){
|
|
|
|
|
var markup = "";
|
|
|
|
|
var x = 0;
|
|
|
|
|
for(i in fields){
|
|
|
|
|
if(x > 0)markup += " " + seperator + " ";
|
|
|
|
|
x++;
|
|
|
|
|
for(i = 0;i < fields.length; i++){
|
|
|
|
|
|
|
|
|
|
if(i > 0)markup += " " + seperator + " ";
|
|
|
|
|
if(data[fields[i]])
|
|
|
|
|
markup += data[fields[i]];
|
|
|
|
|
else
|
|
|
|
|
markup += fields[i] + " not available";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return markup;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|