More Home progress (favorites):

- Put show header button into header
 - Fix mixing columns between multiple favorites on home
 - Fix changing column spacing when hiding header
 - Fix add favorite from context menu didn't load properly
This commit is contained in:
Nathan Gray
2014-11-25 21:50:42 +00:00
parent baa7cbe38e
commit dd0e95d232
6 changed files with 47 additions and 29 deletions

View File

@ -188,10 +188,10 @@ app.classes.home = AppJS.extend(
}
var portlet = et2_createWidget('portlet',attrs, this.portlet_container);
// Override content ID so etemplate loads
portlet.content.attr('id', attrs.id);
portlet.loadingFinished();
// Immediately add content ID so etemplate loads into the right place
portlet.content.append('<div id="'+ attrs.id+'" class="et2_container"/>');
// Get actual attributes & settings, since they're not available client side yet
portlet._process_edit(et2_dialog.OK_BUTTON, attrs);
@ -233,8 +233,8 @@ app.classes.home = AppJS.extend(
}
var portlet = et2_createWidget('portlet',attrs, this.portlet_container);
// Override content ID so etemplate loads
portlet.content.attr('id', attrs.id);
// Immediately add content ID so etemplate loads into the right place
portlet.content.append('<div id="'+ attrs.id+'" class="et2_container"/>');
portlet.loadingFinished();
// Get actual attributes & settings, since they're not available client side yet
@ -563,11 +563,10 @@ app.classes.home = AppJS.extend(
// We operate on the DOM here, nm should be unaware of our fiddling
var nm = widget.getParent().getWidgetById('nm');
if(!nm) return;
var header = nm.header;
var header_height = header.div.innerHeight();
// Hide header
nm.div.toggleClass('header_hidden');
nm.set_hide_header(nm.div.hasClass('header_hidden'));
nm.resize();
}
});