mirror of
https://github.com/documize/community.git
synced 2025-07-28 09:39:42 +02:00
improved sidebar height rendering
This commit is contained in:
parent
42b8397a3f
commit
7e2cf3b276
2 changed files with 15 additions and 9 deletions
|
@ -22,6 +22,20 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
|
||||||
session: service(),
|
session: service(),
|
||||||
|
|
||||||
beforeModel(transition) {
|
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 => {
|
return this.get('appMeta').boot(transition.targetName).then(data => {
|
||||||
if (this.get('session.session.authenticator') !== "authenticator:documize" && data.allowAnonymousAccess) {
|
if (this.get('session.session.authenticator') !== "authenticator:documize" && data.allowAnonymousAccess) {
|
||||||
return this.get('session').authenticate('authenticator:anonymous', data);
|
return this.get('session').authenticate('authenticator:anonymous', data);
|
||||||
|
@ -37,14 +51,6 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
|
||||||
Mousetrap.reset();
|
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*/ ) {
|
error(error /*, transition*/ ) {
|
||||||
if (error) {
|
if (error) {
|
||||||
if (netUtil.isAjaxAccessError(error)) {
|
if (netUtil.isAjaxAccessError(error)) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ type ProdInfo struct {
|
||||||
// Product returns product edition details
|
// Product returns product edition details
|
||||||
func Product() (p ProdInfo) {
|
func Product() (p ProdInfo) {
|
||||||
p.Major = "0"
|
p.Major = "0"
|
||||||
p.Minor = "18"
|
p.Minor = "19"
|
||||||
p.Patch = "0"
|
p.Patch = "0"
|
||||||
p.Version = fmt.Sprintf("%s.%s.%s", p.Major, p.Minor, p.Patch)
|
p.Version = fmt.Sprintf("%s.%s.%s", p.Major, p.Minor, p.Patch)
|
||||||
p.Edition = "Community"
|
p.Edition = "Community"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue