Solve margin issue.

This commit is contained in:
Michael Teeuw
2016-10-15 17:06:52 +02:00
parent 0e026de5bd
commit 6816bd8bad
3 changed files with 19 additions and 5 deletions

View File

@@ -30,6 +30,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Remove extensive logging in newsfeed node helper. - Remove extensive logging in newsfeed node helper.
- Calendar times are now uniformly capitalized. - Calendar times are now uniformly capitalized.
### Fixed
- Solve an issue where module margins would appear when the first module of a section was hidden.
## [2.0.5] - 2016-09-20 ## [2.0.5] - 2016-09-20
### Added ### Added

View File

@@ -113,13 +113,15 @@ sup {
*/ */
.module { .module {
margin-top: 30px; margin-bottom: 30px;
} }
.module:first-child { .region.bottom .module {
margin-top: 0; margin-top: 30px;
margin-bottom: 0px;
} }
/** /**
* Region Definitions. * Region Definitions.
*/ */

View File

@@ -10,19 +10,28 @@ Module.register("updatenotification", {
start: function () { start: function () {
Log.log("Start updatenotification"); Log.log("Start updatenotification");
var self = this;
}, },
notificationReceived: function(notification, payload, sender) { notificationReceived: function(notification, payload, sender) {
if (notification === "DOM_OBJECTS_CREATED") { if (notification === "DOM_OBJECTS_CREATED") {
this.sendSocketNotification("CONFIG", this.config); this.sendSocketNotification("CONFIG", this.config);
this.hide(0,{lockString: self.identifier});
} }
}, },
socketNotificationReceived: function (notification, payload) { socketNotificationReceived: function (notification, payload) {
if (notification === "STATUS") { if (notification === "STATUS") {
this.status = payload; this.status = payload;
this.updateDom(1000); this.updateUI();
}
},
updateUI: function() {
var self = this;
if (this.status && this.status.behind > 0) {
self.updateDom(0);
self.show(1000, {lockString: self.identifier});
} }
}, },