blob: acac9daffc90686cced44235cff85008aa1e609e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
<div piwik-focus-anywhere-but-here="view.showSitesList=false"
class="siteSelector piwikSelector borderedControl"
ng-class="{'expanded': view.showSitesList}">
<script type="text/ng-template" id="siteselector_allsiteslink.html">
<div ng-click="switchSite({idsite: 'all', name: allSitesText});view.showSitesList=false;"
class="custom_select_all">
<a href="{{ getUrlAllSites() }}"
piwik-ignore-click
ng-bind-html="allSitesText" tabindex="4"></a>
</div>
</script>
<input ng-if="inputName" type="hidden" name="{{ inputName }}" ng-value="selectedSite.id"/>
<a ng-click="view.showSitesList=!view.showSitesList; view.showSitesList && !model.isLoading && model.loadInitialSites();"
piwik-onenter="view.showSitesList=!view.showSitesList; view.showSitesList && !model.isLoading && model.loadInitialSites();"
href="javascript:void(0)"
title="{{ 'CoreHome_ChangeCurrentWebsite'|translate:((selectedSite.name || model.firstSiteName)|htmldecode) }}"
ng-class="{'loading': model.isLoading}"
class="title" tabindex="4">
<span class="icon icon-arrow-bottom"
ng-class="{'iconHidden': model.isLoading, 'collapsed': !view.showSitesList}"></span>
<span>
<span ng-bind-html="selectedSite.name || model.firstSiteName" ng-if="selectedSite.name || !placeholder">?</span>
<span ng-if="!selectedSite.name && placeholder" class="placeholder">{{ placeholder }}</span>
</span>
</a>
<div ng-show="view.showSitesList" class="dropdown">
<div class="custom_select_search" ng-show="autocompleteMinSites <= model.sites.length || view.searchTerm">
<input type="text"
piwik-focus-if="view.showSitesList && (autocompleteMinSites <= model.sites.length || view.searchTerm)"
ng-click="view.searchTerm=''"
ng-model="view.searchTerm"
ng-change="model.searchSite(view.searchTerm)"
placeholder="{{ 'General_Search' | translate }}"
tabindex="4"
class="websiteSearch inp browser-default"/>
<img title="Clear"
ng-show="view.searchTerm"
ng-click="view.searchTerm=''; model.loadInitialSites()"
class="reset"
src="plugins/CoreHome/images/reset_search.png"/>
</div>
<div ng-if="allSitesLocation=='top' && showAllSitesItem"
ng-include="'siteselector_allsiteslink.html'"></div>
<div class="custom_select_container">
<ul class="custom_select_ul_list" ng-click="view.showSitesList=false;">
<li ng-click="switchSite(site)"
ng-repeat="site in model.sites"
ng-hide="!showSelectedSite && activeSiteId==site.idsite">
<a piwik-ignore-click href="{{ getUrlForSiteId(site.idsite) }}"
piwik-autocomplete-matched="view.searchTerm"
title="{{ site.name|htmldecode }}"
ng-bind-html="site.name" tabindex="4"></a>
</li>
</ul>
<ul ng-show="!model.sites.length && view.searchTerm" class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all siteSelect">
<li class="ui-menu-item">
<a class="ui-corner-all" tabindex="-1">{{ ('SitesManager_NotFound' | translate) + ' ' + view.searchTerm }}</a>
</li>
</ul>
</div>
<div ng-if="allSitesLocation=='bottom' && showAllSitesItem"
ng-include="'siteselector_allsiteslink.html'"></div>
</div>
</div>
|