Merge pull request #299 from glowing-bear/bugfixesimprovementsandothermiscellanii

Bugfixes, Improvements, and other miscellanii
This commit is contained in:
David Cormier 2014-05-09 15:43:43 -04:00
commit 89c971be72
2 changed files with 19 additions and 8 deletions

View file

@ -218,9 +218,8 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
</li> </li>
<li class="buffer" ng-class="{'active': buffer.active, 'indent': buffer.indent }" ng-repeat="(key, buffer) in (filteredBuffers = (buffers | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate))"> <li class="buffer" ng-class="{'active': buffer.active, 'indent': buffer.indent }" ng-repeat="(key, buffer) in (filteredBuffers = (buffers | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate))">
<a href="#" ng-click="setActiveBuffer(buffer.id)" title="{{ buffer.fullName }}"> <a href="#" ng-click="setActiveBuffer(buffer.id)" title="{{ buffer.fullName }}">
<span class="badge pull-right" ng-if="buffer.unread && !buffer.notification" ng-bind="buffer.unread"></span> <span class="badge pull-right" ng-class="{'danger': buffer.notification}" ng-if="buffer.notification || buffer.unread" ng-bind="buffer.notification || buffer.unread"></span>
<span class="badge pull-right danger" ng-if="buffer.notification" ng-bind="buffer.notification"></span> <span class="buffername">{{ buffer.shortName || buffer.fullName }}</span>
<span class="buffername">{{ buffer.shortName }}</span><span ng-if="!buffer.shortName">{{ buffer.fullName }}</span>
</a> </a>
</li> </li>
</ul> </ul>
@ -228,8 +227,8 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
<div bindonce id="bufferlines" class="monospace" ng-swipe-right="swipeSidebar()" ng-swipe-left="openNick()" ng-class="{'withnicklist': showNicklist, 'withsidebar': showSidebar}"> <div bindonce id="bufferlines" class="monospace" ng-swipe-right="swipeSidebar()" ng-swipe-left="openNick()" ng-class="{'withnicklist': showNicklist, 'withsidebar': showSidebar}">
<div id="nicklist" ng-if="showNicklist" ng-swipe-right="closeNick()" class="vertical-line-left"> <div id="nicklist" ng-if="showNicklist" ng-swipe-right="closeNick()" class="vertical-line-left">
<ul class="nicklistgroup list-unstyled" ng-repeat="group in nicklist"> <ul class="nicklistgroup list-unstyled" ng-repeat="group in nicklist">
<li ng-repeat="nick in group.nicks|orderBy:'name'" ng-click="openBuffer(nick.name)"> <li ng-repeat="nick in group.nicks|orderBy:'name'">
<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> <a ng-click="openBuffer(nick.name)"><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>
@ -251,9 +250,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
</td> </td>
<td class="prefix"><a ng-click="addMention(bufferline.prefix)"><span ng-repeat="part in bufferline.prefix" bo-class="part.classes" bo-html="part.text"></span></a></td> <td class="prefix"><a ng-click="addMention(bufferline.prefix)"><span ng-repeat="part in bufferline.prefix" bo-class="part.classes" bo-html="part.text"></span></a></td>
<td class="message"> <td class="message">
<div ng-repeat="metadata in bufferline.metadata"> <div ng-repeat="metadata in bufferline.metadata" plugin data="metadata"></div>
<div plugin data="metadata"></div>
</div>
<span ng-repeat="part in bufferline.content" class="text" bo-class="part.classes" bo-html="part.text|irclinky:'_blank'"></span> <span ng-repeat="part in bufferline.content" class="text" bo-class="part.classes" bo-html="part.text|irclinky:'_blank'"></span>
</td> </td>
</tr> </tr>

View file

@ -106,6 +106,18 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', function
old.shortName = obj.short_name; old.shortName = obj.short_name;
}; };
var handleBufferLocalvarChanged = function(message) {
var obj = message.objects[0].content[0];
var buffer = obj.pointers[0];
var old = models.getBuffer(buffer);
var localvars = obj.local_variables;
if (old !== undefined && localvars !== undefined) {
// Update indendation status
old.indent = (['channel', 'private'].indexOf(localvars.type) >= 0);
}
};
/* /*
* Handle answers to (lineinfo) messages * Handle answers to (lineinfo) messages
* *
@ -195,6 +207,8 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', function
var eventHandlers = { var eventHandlers = {
_buffer_closing: handleBufferClosing, _buffer_closing: handleBufferClosing,
_buffer_line_added: handleBufferLineAdded, _buffer_line_added: handleBufferLineAdded,
_buffer_localvar_added: handleBufferLocalvarChanged,
_buffer_localvar_removed: handleBufferLocalvarChanged,
_buffer_opened: handleBufferOpened, _buffer_opened: handleBufferOpened,
_buffer_title_changed: handleBufferTitleChanged, _buffer_title_changed: handleBufferTitleChanged,
_buffer_renamed: handleBufferRenamed, _buffer_renamed: handleBufferRenamed,