superdesk/superdesk-client-core

View on GitHub
scripts/core/ui/views/sd-timepicker-popup.html

Summary

Maintainability
Test Coverage
<div class="timepicker-popup" ng-show="open" ng-keydown="keydown({e: $event})" tabindex="0">
    <div class="timepicker-additional">
        <button class="btn btn--mini" ng-click="submit(30)" translate>in 30 min</button>
        <button class="btn btn--mini" ng-click="submit(60)" translate>in 1 h</button>
        <button class="btn btn--mini" ng-click="submit(120)" translate>in 2 h</button>
    </div>
    <div class="timepicker-core">
        <div class="select-area">
            <div class="header" translate>Hours</div>
            <ul>
                <li ng-repeat="h in hours" ng-click="$parent.hour = h" ng-class="{active: hour === h}">{{h | leadingZero}}</li>
            </ul>
        </div>
        <div class="select-area">
            <div class="header" translate>Minutes</div>
            <ul>
                <li ng-repeat="m in minutes" ng-click="$parent.minute = m" ng-class="{active: minute === m}">{{m | leadingZero}}</li>
            </ul>
        </div>
        <div class="select-area" ng-show="seconds">
            <div class="header" translate>Seconds</div>
            <ul>
                <li ng-repeat="s in seconds" ng-click="$parent.second = s" ng-class="{active: second === s}">{{s | leadingZero}}</li>
            </ul>
        </div>
        <div class="timepicker-popup__foter">
            <button class="btn btn--small" ng-click="cancel()" translate>Cancel</button>
            <button class="btn btn--primary btn--small" ng-click="submit()" translate>Confirm</button>
        </div>
    </div>
</div>