superdesk/superdesk-client-core

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

Summary

Maintainability
Test Coverage
<label class="form-label timezone-label" translate>Time Zone</label>
<div class="control" ng-hide="timezone">
    <ul sd-typeahead
        data-style="style"
        items="matchingTimeZones"
        term="tzSearchTerm"
        search="searchTimeZones(term)"
        select="selectTimeZone(item)"
        always-visible="tzSearchTerm"
        placeholder="ie. Europe/London">
        <li class="typeahead-item--padded" typeahead-item="tz" ng-repeat="tz in matchingTimeZones track by tz">{{ ::getTimezoneLabel(tz)}}</li>
        <li class="typeahead-item--padded" ng-show="tzSearchTerm && matchingTimeZones.length === 0"
            class="no-match"
            translate>(no matches)
        </li>
    </ul>
    <p class="discreet" translate>
        If not set, the UTC+0 time zone is assumed.
    </p>
</div>

<ul class="pills-list {{style}}" ng-show="timezone">
    <li>
        <div id="timezone" class="name right-pad">{{getTimezoneLabel(timezone)}}</div>
        <div class="actions">
            <button title="{{:: 'Clear' | translate }}" ng-click="clearSelectedTimeZone()">
                <i class="icon-remove-sign"></i>
            </button>
        </div>
    </li>
</ul>