Merge pull request #335 from kramerc/seconds-in-timestamps

Add option to show seconds in timestamps.
This commit is contained in:
Lorenz Hübschle-Schneider 2014-06-23 17:39:13 +01:00
commit ce15fd706e
3 changed files with 23 additions and 2 deletions

View file

@ -345,6 +345,10 @@ table.notimestamp td.time {
display: none !important; display: none !important;
} }
table.notimestampseconds td.time span.seconds {
display: none !important;
}
.modal ul { .modal ul {
list-style: none; list-style: none;
padding-left: 15px; padding-left: 15px;
@ -353,6 +357,9 @@ table.notimestamp td.time {
font-size: larger; font-size: larger;
margin-bottom: 10px; margin-bottom: 10px;
} }
.modal li li {
font-size: medium;
}
.modal-header { .modal-header {
border-bottom: 0; border-bottom: 0;
} }

View file

@ -231,7 +231,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
</li> </li>
</ul> </ul>
</div> </div>
<table ng-class="{'notimestamp':!showtimestamp}"> <table ng-class="{'notimestamp':!showtimestamp,'notimestampseconds':!showtimestampSeconds}">
<tbody> <tbody>
<tr class="bufferline"> <tr class="bufferline">
<td ng-hide="activeBuffer().allLinesFetched" colspan="3"> <td ng-hide="activeBuffer().allLinesFetched" colspan="3">
@ -244,7 +244,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
<tr class="bufferline"> <tr class="bufferline">
<td class="time"> <td 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'"></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 class="seconds"><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:'ss'"></span></span>
</span> </span>
</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>
@ -295,6 +295,18 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
</label> </label>
</div> </div>
</form> </form>
<ul ng-show="showtimestamp">
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="showtimestampSeconds">
Show seconds
</label>
</div>
</form>
</li>
</ul>
</li> </li>
<li> <li>
<form class="form-inline" role="form"> <form class="form-inline" role="form">

View file

@ -831,6 +831,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$store.bind($scope, "useFavico", true); $store.bind($scope, "useFavico", true);
// Save setting for showtimestamp // Save setting for showtimestamp
$store.bind($scope, "showtimestamp", showtimestamp); $store.bind($scope, "showtimestamp", showtimestamp);
// Save setting for showing seconds on timestamps
$store.bind($scope, "showtimestampSeconds", false);
// Save setting for playing sound on notification // Save setting for playing sound on notification
$store.bind($scope, "soundnotification", false); $store.bind($scope, "soundnotification", false);