duplicate error fixed and css inside widgets fixed, duplicate location fixed

This commit is contained in:
Harry Bomrah 2013-04-17 17:53:35 +08:00 committed by saurabhbhatia
parent 78d6e33865
commit dc94283af9
2 changed files with 8 additions and 4 deletions

View File

@ -148,7 +148,6 @@ var orbitDesktop = function(dom){
o.loadWallpaper(customwallpaper);
o.bindDesktopEvents();
o.loadIconCache();
o.getlocation();
var custom_load = window.location.hash;
if(!custom_load){
$(o.contentHolder).empty().load("/desktop/desktop",function(){
@ -438,7 +437,12 @@ var orbitDesktop = function(dom){
// total_width = (!isNaN(base_width) ? ( base_width + 12 ) * total_columns : null);
return {"markup":temp_div.html(),"width":total_width,"total":entries.length};
}
$("div[container=true]").html(h).find("div.overview").wrap('<div class="tinycanvas"><div class="viewport"></div></div>');
var check_container = $("<div></div>").html(h).find("div[container=true]");
if(check_container.length > 0){
$("div[container=true]").html(check_container.html()).find("div.overview").wrap('<div class="tinycanvas"><div class="viewport"></div></div>');
}else{
$("div[container=true]").html(h).find("div.overview").wrap('<div class="tinycanvas"><div class="viewport"></div></div>');
}
$("div[container=true]").find("div.tinycanvas").prepend('<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>');
var f = o.layout_data.generate_layout_html(h)
$("div[container=true] div.overview").html(f.markup);

View File

@ -152,9 +152,9 @@ class DesktopController< ApplicationController
def widget_layout
widget = DesktopWidget.find(params[:id])
link = '<link href="'+widget.css_default.file.to_s+'" media="screen" rel="stylesheet" type="text/css" />'
# link = '<link href="'+widget.css_default.file.to_s+'" media="screen" rel="stylesheet" type="text/css" />'
content = widget.widget_layout.body
dhtml = link + content
dhtml = content
render :text => dhtml.html_safe
end