-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
205 lines (197 loc) · 11.8 KB
/
index.html
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>PipeDrive ChromeEXT</title>
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="libs/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="libs/css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="checkboxes.css">
<link rel="stylesheet" type="text/css" href="main.css">
<script type="text/javascript" src="libs/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="libs/js/angular.min.js"></script>
<script type="text/javascript" src="libs/js/ui-bootstrap-tpls-2.5.0.min.js"></script>
<script type="text/javascript" src="libs/js/airtable.browser.js"></script>
<script type="text/javascript" src="Utils.js"></script>
<script type="text/javascript" src="logic.js"></script>
<script type="text/ng-template" id="tokensModal.html">
<div class="modal-header">
<h3 class="modal-title" id="modal-title">Set Tokens</h3>
</div>
<div class="modal-body" id="modal-body">
<div class="input-group" ng-class="{'has-error': local.pipedriveTokenHasError}">
<span class="input-group-addon" id="addon1">Pipedrive Token</span>
<input type="password" class="form-control" ng-focus="local.pipedriveTokenHasError = false" ng-change="local.setPipedriveToken()" ng-model="local.pipedriveToken" aria-describedby="addon1">
</div>
<br />
<div class="input-group" ng-class="{'has-error': local.airtableTokenHasError}">
<span class="input-group-addon" id="addon2">Airtable Token</span>
<input type="password" class="form-control" ng-focus="local.airtableTokenHasError = false" ng-change="local.setAirtableToken()" ng-model="local.airtableToken" aria-describedby="addon2">
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" ng-click="local.save()">Save</button>
</div>
</script>
<script type="text/ng-template" id="pitchList.html">
<div class="modal-header">
<button type="button" class="close" ng-click="closePitchList()" aria-hidden="true">×</button>
<h3 class="modal-title" id="modal-title">Pitch List ({{pitchList.length}})</h3>
</div>
<div class="modal-body" id="pitchListModalBody">
<h5 class="text-center" ng-if="pitchList.length">Pitching {{search.categoryName}} for {{search.dealTitle}} on {{search.date}} </h5>
<div class="text-right" ng-if="pitchList.length">
<button class="btn btn-sm btn-danger" ng-click="clearPitchList()">× ALL</button>
</div>
<h4 class="text-center" ng-if="!pitchList.length">No artists were selected</h4>
<div id="artistsWrapper">
<div class="artistElm" ng-repeat="artist in pitchList track by artist.id">
<div class="artistDetailsWrapper">
<div class="artistImage">
<i ng-if="!artist.profilewp" class="glyphicon glyphicon-star"></i>
<img ng-if="artist.profilewp" src="{{artist.profilewp}}" style="border-radius: 50%;">
</div>
<div class="artistInfo">
<h4><a href="{{artist.url}}" target="_blank">{{artist.professionalname}}</a></h4>
<div class="artistInfoSpansWrapper">
<div ng-if="subscriptionColors[artist.subscription]" class="subscriptionIndicator" ng-attr-title="{{artist.subscription}} Subscription" ng-style="{backgroundColor: subscriptionColors[artist.subscription]}"></div>
<span class="pitchAndGigCount">(<span title="Pitch Count">{{artist.pitchcount}}</span>, <span title="Gig Count">{{artist.gigcount}}</span>)</span>
</div>
<div class="contactInfo">
<div class="email">{{artist.email}}</div>
<div class="phoneNumber">{{artist.phone}}</div>
<div class="city">{{artist.city}}</div>
</div>
</div><!--
--><div class="updated">{{artist.updated}}</div><!--
--><div class="artistPrice">Rs {{artist[eventName + "_p"]}}<br/>(Rs {{artist.maxprice}})</div><!--
--><div class="artistCheckbox">
<button class="btn btn-sm btn-danger" ng-click="artist.checked = false; artistStateChange(artist)">×</button>
</div>
</div>
</div>
</div>
<div class="submitBtnWrapper text-center" ng-if="pitchList.length">
<div id="includePriceCheckbox" class="checkbox bigCheckbox">
<label>
<input type="checkbox" value="" ng-change="saveState()" ng-model="submit.includePrice">
<span class="cr"><i class="cr-icon glyphicon glyphicon-ok"></i></span>
Include Price
</label>
</div>
<button ng-click="submitArtists()" class="btn btn-lg btn-primary">Pitch Artists</button>
</div>
</div>
</script>
</head>
<body ng-controller="mainController" ng-init="getManifestVersionScope()">
<div uib-alert ng-repeat="alert in alerts" class="text-center" ng-class="{'alert-danger': alert.danger, 'alert-success': alert.success}" close="closeAlert($index)">{{alert.msg}}</div>
<div id="loadingAnimation" ng-if="pagination.loading">
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</div>
<div id="mainWrapper" ng-if="AIRTABLE_TOKEN && PIPEDRIVE_TOKEN">
<div ng-if="dealId || activeDealId" id="processDealBtnWrapper">
<h4 ng-if="activeDealId" style="display: inline-block; margin-left: 180px;">Active Deal: {{activeDealId}}</h4>
<button ng-if="dealId" ng-click="loadDeal(dealId)" class="btn btn-sm btn-danger" style="display: inline; float: right; margin-right: 2px; margin-top: 2px;">Process Deal {{dealId}}</button>
</div>
<div id="searchBar" class="text-center">
<div>
<div class="searchBarComponent">
<input type="text" class="form-control" ng-model="search.name" placeholder="Name" title="Name">
<select ng-model="search.category" ng-change="categoryChange()">
<option ng-repeat="option in categories" ng-value="option.value">{{option.name}}</option>
</select>
<select ng-model="search.event" ng-change="setEventName()">
<option ng-repeat="option in event" ng-value="option.value">{{option.name}}</option>
</select>
<input type="number" class="form-control" ng-model="search.price" placeholder="Price" title="Price" />
<input type="text" class="form-control" ng-model="search.city" placeholder="City" title="City" uib-typeahead="city for city in cities | filter:$viewValue | limitTo:8" typeahead-editable="false"/>
</div>
<br />
<div class="searchBarComponent">
<select ng-model="search.gender">
<option ng-repeat="gender in genders" ng-value="gender">{{gender}}</option>
</select>
<select ng-model="search.subcategory">
<option ng-repeat="subcategory in subcategories" ng-value="subcategory">{{subcategory}}</option>
</select>
<select ng-model="search.subscription">
<option ng-repeat="subscription in subscriptions" ng-value="subscription">{{subscription}}</option>
</select>
<select ng-model="search.language">
<option ng-repeat="language in languages" ng-value="language">{{language}}</option>
</select>
<input placeholder="State" type="text" ng-model="search.state" uib-typeahead="state for state in states | filter:$viewValue | limitTo:8" typeahead-editable="false" class="form-control">
<div>
<button ng-click="loadArtists(); saveState();" class="btn btn-info"><i class="icon glyphicon glyphicon-search"></i>Search</button>
</div>
</div>
</div>
</div>
<div id="sortBtnWrapper" class="text-right">
<div class="sortBtn updatedBtn" ng-click="changeSorting('updated')" ng-style="{color: (sorting.order[0] === 'updated' ? 'lightgreen' : 'black')}">
<span>Updated</span>
<i class="rightIcon glyphicon glyphicon-arrow-up" ng-if="sorting.updated === 'asc'"></i>
<i class="rightIcon glyphicon glyphicon-arrow-down" ng-if="sorting.updated === 'desc'"></i>
</div>
<div class="sortBtn" ng-click="changeSorting('price')" ng-style="{color: (sorting.order[0] === 'price' ? 'lightgreen' : 'black')}">
<span>Price</span>
<i class="rightIcon glyphicon glyphicon-arrow-up" ng-if="sorting.price === 'asc'"></i>
<i class="rightIcon glyphicon glyphicon-arrow-down" ng-if="sorting.price === 'desc'"></i>
</div>
</div>
<div id="artistsWrapper" ng-style="{maxHeight: (355 - (dealId ? 35 : 0) - (alerts && alerts.length ? (alerts.length * 70) : 0)) + 'px'}">
<h3 ng-if="pagination.totalItems === 0 && !pagination.loading" class="text-center">No artists for searched criteria</h3>
<div class="artistElm" ng-repeat="artist in artistsToShow">
<div class="artistDetailsWrapper">
<div class="artistImage">
<i ng-if="!artist.profilewp" class="glyphicon glyphicon-star"></i>
<img ng-if="artist.profilewp" src="{{artist.profilewp}}" style="border-radius: 50%;">
</div>
<div class="artistInfo">
<h4><a href="{{artist.url}}" target="_blank">{{artist.professionalname}}</a></h4>
<button ng-click="test(artist, $event)" class="btn btn-primary" id="contact-button" ng-hide={{hidevalue}}>Contact</button>
<div class="artistInfoSpansWrapper">
<div ng-if="subscriptionColors[artist.subscription]" class="subscriptionIndicator" ng-attr-title="{{artist.subscription}} Subscription" ng-style="{backgroundColor: subscriptionColors[artist.subscription]}"></div>
<span class="pitchAndGigCount">(<span title="Pitch Count">{{artist.pitchcount}}</span>, <span title="Gig Count">{{artist.gigcount}}</span>)</span>
</div>
<div class="contactInfo">
<div class="email">{{artist.email}}</div>
<div class="phoneNumber">{{artist.phone}}</div>
<div class="city">{{artist.city}}</div>
</div>
</div><!--
--><div class="updated">{{artist.updated}}</div><!--
--><div class="artistPrice">Rs {{artist.minprice}}<br/>Rs {{artist.maxprice}}</div><!--
--><div class="artistCheckbox">
<div class="checkbox bigCheckbox">
<label>
<input type="checkbox" value="" ng-change="artistStateChange(artist)" ng-model="artist.checked">
<span class="cr"><i class="cr-icon glyphicon glyphicon-ok"></i></span>
</label>
</div>
</div>
</div>
</div>
</div>
<div ng-if="pagination.totalItems > 10" id="paginationWrapper" class="text-center">
<ul uib-pagination boundary-links="true" max-size="4" force-ellipses="true" ng-change="pagination.onPageChange()" total-items="pagination.totalItems" items-per-page="pagination.itemsPerPage" ng-model="pagination.currentPage" previous-text="‹" next-text="›" first-text="«" last-text="»"></ul>
<ul ng-if="loadMoreArtists" ng-click="loadMoreArtists && loadMoreArtists()" class="ng-pristine ng-untouched ng-valid ng-isolate-scope pagination ng-not-empty">
<li role="menuitem" class="pagination-last ng-scope">
<a href="" class="ng-binding">More</a>
</li>
</ul>
</div>
<div class="submitBtnWrapper text-center">
<button ng-click="openPitchList()" class="btn btn-lg btn-primary">Pitch List ({{pitchList.length}})</button>
</div>
<p class="text-center" style="width: 100%;"></p>
</div>
<div id="changeTokensBtnWrapper" ng-if="AIRTABLE_TOKEN && PIPEDRIVE_TOKEN">
<button ng-click="showTokensModal()" class="btn btn-sm btn-default">Change Tokens</button>
<div class="text-center">Artist Pitch v{{manifestVersion}}<div>
</div>
<div id="tokensNotSet" ng-if="!(AIRTABLE_TOKEN && PIPEDRIVE_TOKEN)" class="text-center">
Tokens are not set, <a href ng-click="showTokensModal()">Set Tokens</a>
</div>
</body>
</html>