1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-25 08:09:43 +02:00

improved sidebar height rendering

This commit is contained in:
Harvey Kandola 2016-09-13 09:01:25 -07:00
parent 42b8397a3f
commit 7e2cf3b276
2 changed files with 15 additions and 9 deletions

View file

@ -22,6 +22,20 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
session: service(),
beforeModel(transition) {
let MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
let observer = new MutationObserver(function(/*mutations, observer*/) {
// fired when a mutation occurs
// console.log(mutations, observer);
$("#zone-sidebar").css('height', $(document).height() - $("#zone-navigation").height() - $("#zone-header").height() - 35);
});
observer.observe(document, {
subtree: true,
attributes: false,
childList: true
});
return this.get('appMeta').boot(transition.targetName).then(data => {
if (this.get('session.session.authenticator') !== "authenticator:documize" && data.allowAnonymousAccess) {
return this.get('session').authenticate('authenticator:anonymous', data);
@ -37,14 +51,6 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
Mousetrap.reset();
},
didTransition() {
Ember.run.schedule("afterRender", this, function () {
$("#zone-sidebar").css('height', $(document).height() - $("#zone-navigation").height() - $("#zone-header").height() - 35);
});
return true;
},
error(error /*, transition*/ ) {
if (error) {
if (netUtil.isAjaxAccessError(error)) {

View file

@ -26,7 +26,7 @@ type ProdInfo struct {
// Product returns product edition details
func Product() (p ProdInfo) {
p.Major = "0"
p.Minor = "18"
p.Minor = "19"
p.Patch = "0"
p.Version = fmt.Sprintf("%s.%s.%s", p.Major, p.Minor, p.Patch)
p.Edition = "Community"