Merge pull request #113 from lorenzhs/reduceWatchers
Reduce number of watchers
This commit is contained in:
commit
222419cdcc
2 changed files with 9 additions and 9 deletions
|
@ -262,7 +262,7 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
|
||||||
<a href="#" ng-click="setActiveBuffer(content.id)" title="{{ content.fullName }}">
|
<a href="#" ng-click="setActiveBuffer(content.id)" title="{{ content.fullName }}">
|
||||||
<span class="badge pull-right" ng-hide="content.notification" ng-if="content.unread" ng-bind="content.unread"></span>
|
<span class="badge pull-right" ng-hide="content.notification" ng-if="content.unread" ng-bind="content.unread"></span>
|
||||||
<span class="badge pull-right danger" ng-show="content.notification" ng-bind="content.notification"></span>
|
<span class="badge pull-right danger" ng-show="content.notification" ng-bind="content.notification"></span>
|
||||||
{{ content.indent(predicate) }}{{ content.shortName }}<span ng-hide="content.shortName">{{ content.fullName }}</span>
|
{{ content.indentedName(predicate) }}<span ng-hide="content.shortName">{{ content.fullName }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -270,8 +270,8 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
|
||||||
<div id="bufferlines" class="monospace" ng-class="{'withnicklist': showNicklist}">
|
<div id="bufferlines" class="monospace" ng-class="{'withnicklist': showNicklist}">
|
||||||
<div id="nicklist" ng-show="showNicklist" class="vertical-line-left">
|
<div id="nicklist" ng-show="showNicklist" class="vertical-line-left">
|
||||||
<ul class="nicklistgroup list-unstyled" ng-repeat="group in activeBuffer().nicklist">
|
<ul class="nicklistgroup list-unstyled" ng-repeat="group in activeBuffer().nicklist">
|
||||||
<li class="" ng-repeat="nick in group.nicks|orderBy:'name'" ng-click="openQuery(nick.name)">
|
<li bindonce class="" ng-repeat="nick in group.nicks|orderBy:'name'" ng-click="openQuery(nick.name)">
|
||||||
<a ng-click="nickAction(nick)"><span ng-class="nick.prefixClasses">{{nick.prefix}}</span><span ng-class="nick.nameClasses">{{nick.name}}</span></a>
|
<a ng-click="nickAction(nick)"><span bo-class="nick.prefixClasses" bo-text="nick.prefix"></span><span bo-class="nick.nameClasses" bo-text="nick.name"></span></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -280,7 +280,7 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
|
||||||
<tr class="bufferline">
|
<tr class="bufferline">
|
||||||
<td bo-hide="notimestamp" class="time">
|
<td bo-hide="notimestamp" class="time">
|
||||||
<span class="date" bo-class="{'repeated-time': bufferline.shortTime==bufferlines[$index-1].shortTime}">
|
<span class="date" bo-class="{'repeated-time': bufferline.shortTime==bufferlines[$index-1].shortTime}">
|
||||||
<span class="cof-chat_time cob-chat_time coa-chat_time" bo-text="bufferline.date|date:'HH'"></span><span class="cof-chat_time_delimiters cob-chat_time_delimiters coa-chat_time_delimiters">:</span><span class="cof-chat_time cob-chat_time coa-chat_time" bo-text="bufferline.date|date:'mm'">{{ bufferline.date | date:'mm' }}</span>
|
<span class="cof-chat_time cob-chat_time coa-chat_time" bo-text="bufferline.date|date:'HH'"></span><span class="cof-chat_time_delimiters cob-chat_time_delimiters coa-chat_time_delimiters">:</span><span class="cof-chat_time cob-chat_time coa-chat_time" bo-text="bufferline.date|date:'mm'"></span>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="prefix"><span bindonce ng-repeat="part in bufferline.prefix" bo-class="part.classes" bo-html="part.text"></span></td>
|
<td class="prefix"><span bindonce ng-repeat="part in bufferline.prefix" bo-class="part.classes" bo-html="part.text"></span></td>
|
||||||
|
|
|
@ -28,12 +28,12 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
var lastSeen = -1;
|
var lastSeen = -1;
|
||||||
var serverSortKey = fullName.replace(/^irc.server.(\w+)/, "irc.$1");
|
var serverSortKey = fullName.replace(/^irc.server.(\w+)/, "irc.$1");
|
||||||
|
|
||||||
var indent = function(predicate) {
|
var indentedName = function(predicate) {
|
||||||
if( predicate == "serverSortKey" && fullName.match(/^irc./) && !fullName.match(/^irc.server./) ) {
|
if( predicate == "serverSortKey" && fullName.match(/^irc./) && !fullName.match(/^irc.server./) ) {
|
||||||
// indent channel
|
// indent channel
|
||||||
return " "; // four protected spaces
|
return " " + shortName; // four protected spaces
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return shortName;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
updateNick: updateNick,
|
updateNick: updateNick,
|
||||||
flatNicklist: flatNicklist,
|
flatNicklist: flatNicklist,
|
||||||
serverSortKey: serverSortKey,
|
serverSortKey: serverSortKey,
|
||||||
indent: indent,
|
indentedName: indentedName,
|
||||||
history: history,
|
history: history,
|
||||||
addToHistory: addToHistory,
|
addToHistory: addToHistory,
|
||||||
getHistoryUp: getHistoryUp,
|
getHistoryUp: getHistoryUp,
|
||||||
|
|
Loading…
Reference in a new issue