improve spacing and other syntactical stuff

This commit is contained in:
Lorenz H-S 2014-02-08 12:49:21 +00:00
parent f4ee683100
commit 0cd4f04740
2 changed files with 45 additions and 45 deletions

View file

@ -44,7 +44,7 @@ weechat.factory('handlers', ['$rootScope', 'models', 'plugins', function($rootSc
$rootScope.$emit('notificationChanged'); $rootScope.$emit('notificationChanged');
} }
if(buffer.notify !== 0 && message.highlight || _.contains(message.tags, 'notify_private') ) { if ((buffer.notify !== 0 && message.highlight) || _.contains(message.tags, 'notify_private')) {
buffer.notification++; buffer.notification++;
$rootScope.createHighlight(buffer, message); $rootScope.createHighlight(buffer, message);
$rootScope.$emit('notificationChanged'); $rootScope.$emit('notificationChanged');
@ -153,8 +153,7 @@ weechat.factory('handlers', ['$rootScope', 'models', 'plugins', function($rootSc
buffer.nicklist[group] = g; buffer.nicklist[group] = g;
group = g.name; group = g.name;
} }
} } else {
else {
var nick = new models.Nick(n); var nick = new models.Nick(n);
if(d == 43) { // + if(d == 43) { // +
buffer.addNick(group, nick); buffer.addNick(group, nick);
@ -225,7 +224,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
callbacks[cbId] = { callbacks[cbId] = {
time: new Date(), time: new Date(),
cb: defer, cb: defer
}; };
defer.id = cbId; defer.id = cbId;
@ -606,7 +605,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Determine if we want to scroll at all // Determine if we want to scroll at all
// Give the check 3 pixels of slack so you don't have to hit // Give the check 3 pixels of slack so you don't have to hit
// the exact spot. This fixes a bug in some browsers // the exact spot. This fixes a bug in some browsers
if (nonIncremental && sTop < sVal || (sTop - sVal < 3)) { if ((nonIncremental && sTop < sVal) || (sTop - sVal < 3)) {
var readmarker = document.getElementById('readmarker'); var readmarker = document.getElementById('readmarker');
if (nonIncremental && readmarker) { if (nonIncremental && readmarker) {
// Switching channels, scroll to read marker // Switching channels, scroll to read marker
@ -656,8 +655,9 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$rootScope.createHighlight = function(buffer, message) { $rootScope.createHighlight = function(buffer, message) {
var messages = ""; var messages = "";
message.content.forEach(function(part) { message.content.forEach(function(part) {
if (part.text !== undefined) if (part.text !== undefined) {
messages += part.text + " "; messages += part.text + " ";
}
}); });
var title = buffer.fullName; var title = buffer.fullName;
@ -781,7 +781,7 @@ weechat.directive('plugin', function() {
$scope.hideContent = function() { $scope.hideContent = function() {
$scope.plugin.visible = false; $scope.plugin.visible = false;
} };
$scope.showContent = function() { $scope.showContent = function() {
/* /*
@ -792,11 +792,11 @@ weechat.directive('plugin', function() {
*/ */
$scope.displayedContent = $scope.plugin.content; $scope.displayedContent = $scope.plugin.content;
$scope.plugin.visible = true; $scope.plugin.visible = true;
} };
} }
} };
}); });