angular-cached-resource
Version:
An AngularJS module to interact with RESTful resources, even when browser is offline
63 lines (62 loc) • 2.54 kB
HTML
<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto;">
<table height="100%">
<thead>
<tr class="text-center">
<th>
<button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 0)">
<i class="glyphicon glyphicon-chevron-up"></i>
</button>
</th>
<th>
</th>
<th>
<button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(-1, 1)">
<i class="glyphicon glyphicon-chevron-up"></i>
</button>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(i, row) in rows">
<td class="text-center">
<button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{'btn-primary': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled">
<span ng-class="{'text-muted': row[0].muted}" ng-bind="row[0].label"></span>
</button>
</td>
<td>
<span ng-bind="i == midIndex ? ':' : ' '"></span>
</td>
<td class="text-center">
<button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{'btn-primary': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled">
<span ng-class="{'text-muted': row[1].muted}" ng-bind="row[1].label"></span>
</button>
</td>
<td ng-if="showAM">
</td>
<td ng-if="showAM">
<button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{'btn-primary': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button>
<button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{'btn-primary': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button>
</td>
</tr>
</tbody>
<tfoot>
<tr class="text-center">
<th>
<button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 0)">
<i class="glyphicon glyphicon-chevron-down"></i>
</button>
</th>
<th>
</th>
<th>
<button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$moveIndex(1, 1)">
<i class="glyphicon glyphicon-chevron-down"></i>
</button>
</th>
</tr>
</tfoot>
</table>
</div>