diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js
index 26f67fb92..0a6307c18 100755
--- a/app/assets/javascripts/orbitdesktop.js
+++ b/app/assets/javascripts/orbitdesktop.js
@@ -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('
');
+ var check_container = $("").html(h).find("div[container=true]");
+ if(check_container.length > 0){
+ $("div[container=true]").html(check_container.html()).find("div.overview").wrap('');
+ }else{
+ $("div[container=true]").html(h).find("div.overview").wrap('');
+ }
$("div[container=true]").find("div.tinycanvas").prepend('');
var f = o.layout_data.generate_layout_html(h)
$("div[container=true] div.overview").html(f.markup);
diff --git a/app/controllers/desktop_controller.rb b/app/controllers/desktop_controller.rb
index 0af956217..882765f10 100644
--- a/app/controllers/desktop_controller.rb
+++ b/app/controllers/desktop_controller.rb
@@ -152,9 +152,9 @@ class DesktopController< ApplicationController
def widget_layout
widget = DesktopWidget.find(params[:id])
- link = ''
+ # link = ''
content = widget.widget_layout.body
- dhtml = link + content
+ dhtml = content
render :text => dhtml.html_safe
end