Commit d74564096a701c38c91d0fb3a0e25369e465a161
Merge remote-tracking branch 'origin/master'
Showing
6 changed files
with
339 additions
and
5 deletions
Show diff stats
frontend/views/search/customer.php
... | ... | @@ -4,4 +4,273 @@ |
4 | 4 | * User: vitaliy |
5 | 5 | * Date: 09.03.16 |
6 | 6 | * Time: 10:21 |
7 | - */ | |
8 | 7 | \ No newline at end of file |
8 | + */ | |
9 | +?> | |
10 | +<div class="section-box-22 section-box-customer"> | |
11 | + <div class="box-wr"> | |
12 | + <div class="box-all"> | |
13 | + <div class="left-search-work"> | |
14 | + <form action="" class="search-work-form"> | |
15 | + <div class="blocks-check-list-wrapp"> | |
16 | + <div class="blocks-check-title"><label for="theme-1">Город</label></div> | |
17 | + <select id="theme-1"> | |
18 | + <option selected="" value="">Любой</option> | |
19 | + <option value="">Киев</option> | |
20 | + <option value="">Житомир</option> | |
21 | + <option value="">Львов</option> | |
22 | + <option value="">Киев</option> | |
23 | + <option value="">Житомир</option> | |
24 | + <option value="">Львов</option> | |
25 | + | |
26 | + <option value="">Киев</option> | |
27 | + <option value="">Житомир</option> | |
28 | + <option value="">Львов</option> | |
29 | + <option value="">Киев</option> | |
30 | + <option value="">Житомир</option> | |
31 | + <option value="">Львов</option> | |
32 | + <option value="">Киев</option> | |
33 | + <option value="">Житомир</option> | |
34 | + <option value="">Львов</option> | |
35 | + <option value="">Киев</option> | |
36 | + <option value="">Житомир</option> | |
37 | + <option value="">Львов</option> | |
38 | + <option value="">Киев</option> | |
39 | + <option value="">Житомир</option> | |
40 | + <option value="">Львов</option> | |
41 | + <option value="">Киев</option> | |
42 | + <option value="">Житомир</option> | |
43 | + <option value="">Львов</option> | |
44 | + <option value="">Киев</option> | |
45 | + <option value="">Житомир</option> | |
46 | + <option value="">Львов</option> | |
47 | + <option value="">Киев</option> | |
48 | + <option value="">Житомир</option> | |
49 | + <option value="">Львов</option> | |
50 | + <option value="">Киев</option> | |
51 | + <option value="">Житомир</option> | |
52 | + <option value="">Львов</option> | |
53 | + <option value="">Киев</option> | |
54 | + <option value="">Житомир</option> | |
55 | + <option value="">Львов</option> | |
56 | + <option value="">Киев</option> | |
57 | + <option value="">Житомир</option> | |
58 | + <option value="">Львов</option> | |
59 | + <option value="">Киев</option> | |
60 | + <option value="">Житомир</option> | |
61 | + <option value="">Львов</option> | |
62 | + <option value="">Киев</option> | |
63 | + <option value="">Житомир</option> | |
64 | + <option value="">Львов</option> | |
65 | + <option value="">Киев</option> | |
66 | + <option value="">Житомир</option> | |
67 | + <option value="">Львов</option> | |
68 | + <option value="">Киев</option> | |
69 | + <option value="">Житомир</option> | |
70 | + <option value="">Львов</option> | |
71 | + <option value="">Киев</option> | |
72 | + <option value="">Житомир</option> | |
73 | + <option value="">Львов</option> | |
74 | + <option value="">Киев</option> | |
75 | + <option value="">Житомир</option> | |
76 | + <option value="">Львов</option> | |
77 | + <option value="">Киев</option> | |
78 | + <option value="">Житомир</option> | |
79 | + <option value="">Львов</option> | |
80 | + <option value="">Киев</option> | |
81 | + | |
82 | + </select><div class="select-after"></div> | |
83 | + </div> | |
84 | + | |
85 | + <div class="blocks-check-list-wrapp"> | |
86 | + <div class="blocks-check-title"><label for="theme-3">Тип заказчика</label></div> | |
87 | + <select id="theme-3"> | |
88 | + <option selected="" value="">Любая</option> | |
89 | + <option value="">Киев</option> | |
90 | + <option value="">Житомир</option> | |
91 | + <option value="">Львов</option> | |
92 | + <option value="">Киев</option> | |
93 | + <option value="">Житомир</option> | |
94 | + <option value="">Львов</option> | |
95 | + </select><div class="select-after"></div> | |
96 | + </div> | |
97 | + | |
98 | + <div class="blocks-check-list-wrapp"> | |
99 | + <div class="blocks-check-title">Рейтинг</div> | |
100 | + <div class="rating"> | |
101 | + <!--оценка--> | |
102 | + <input type="hidden" class="val" value="0"> | |
103 | + </div> | |
104 | + </div> | |
105 | + | |
106 | + <div class="blocks-check-list-wrapp"> | |
107 | + <div class="blocks-check-title">Статус</div> | |
108 | + <div class="blocks-check-list"> | |
109 | + <input type="radio" name="group3" class="check-search" id="theme-8"><label for="theme-8"><span></span>Онлайн</label> | |
110 | + </div> | |
111 | + <div class="blocks-check-list"> | |
112 | + <input type="radio" name="group3" class="check-search" id="theme-9" checked=""><label for="theme-9"><span></span>Все</label> | |
113 | + </div> | |
114 | + </div> | |
115 | + | |
116 | + <div class="blocks-check-list-submit"> | |
117 | + <input type="submit" value="Найти"> | |
118 | + </div> | |
119 | + </form> | |
120 | + <script> | |
121 | + $('div.rating').rating({ | |
122 | + fx: 'full', | |
123 | + url: 'rating.php' | |
124 | + }); | |
125 | + </script> | |
126 | + </div> | |
127 | + | |
128 | + <div class="right-search-work"> | |
129 | + <div class="search-worker-title style">Найти заказчика</div> | |
130 | + <div class="search-worker-title-two style">Заказчики готовые приступить к работе <span>145</span></div> | |
131 | + <div class="search-worker-search-wr style"> | |
132 | + <form action="" class="search-worker-form"> | |
133 | + <input id="srch-wrk-text" type="text" placeholder="Любая информация о заказчике" required=""> | |
134 | + <input id="srch-wrk-sub" type="submit" value="Найти"> | |
135 | + </form> | |
136 | + <a href="#" class="add-to-catalog-search-worker">Добавить себя в каталог</a> | |
137 | + <div class="search-worker-sort-wr style"> | |
138 | + <div class="search-worker-sort">Сортировать: </div> | |
139 | + <ul> | |
140 | + <li class="activejob"> | |
141 | + <a href="#">рейтинг</a> | |
142 | + <div class="sidebar-droped-wr style"> | |
143 | + <ul> | |
144 | + <li><a href="#">рейтинг</a></li> | |
145 | + <li><a href="#">1заказчик</a></li> | |
146 | + <li><a href="#">2заказчик</a></li> | |
147 | + <li><a href="#">3заказчик</a></li> | |
148 | + <li><a href="#">4заказчик</a></li> | |
149 | + </ul> | |
150 | + </div> | |
151 | + </li> | |
152 | + </ul> | |
153 | + </div> | |
154 | + </div> | |
155 | + <div class="search-worker-blocks-wr style"> | |
156 | + | |
157 | + <div class="search-worker-blocks"> | |
158 | + <div class="search_perform_txt-wr"> | |
159 | + <div class="search_perform_title">ООО «Ортекс»</div> | |
160 | + <div class="search_perform-stars-wr"> | |
161 | + <div class="rating_search_performer"> | |
162 | + <!--оценка--> | |
163 | + <input type="hidden" class="val" value="4"/> | |
164 | + </div> | |
165 | + <div class="search_perform-stars-txt">30 отзывов, Киев </div> | |
166 | + </div> | |
167 | + <div class="search_perform_leng"> | |
168 | + <div>Сотрудники: более 40</div> | |
169 | + </div> | |
170 | + <div class="search_perform_visit"><span>Послелний визит:</span> 2 дня назад</div> | |
171 | + <div class="search_perform_projets_nam"><a href="#">Заказано проектов: 21</a></div> | |
172 | + </div> | |
173 | + | |
174 | + <div class="right_search_perform_block-wr"> | |
175 | + <div class="right_search_perform_foto-wr"> | |
176 | + <div><img src="/images/search_performer_img-1.jpg" alt=""/></div> | |
177 | + </div> | |
178 | + <a class="get-list" href="#">Добавить в закладки</a> | |
179 | + </div> | |
180 | + </div> | |
181 | + | |
182 | + <div class="search-worker-blocks"> | |
183 | + <div class="search_perform_txt-wr"> | |
184 | + <div class="search_perform_title">Петер Цумтор</div> | |
185 | + <div class="search_perform-stars-wr"> | |
186 | + <div class="rating_search_performer"> | |
187 | + <!--оценка--> | |
188 | + <input type="hidden" class="val" value="2"/> | |
189 | + </div> | |
190 | + <div class="search_perform-stars-txt">30 отзывов, Киев </div> | |
191 | + </div> | |
192 | + <div class="search_perform_leng"> | |
193 | + <!--<div>Сотрудники: более 40</div>--> | |
194 | + </div> | |
195 | + <div class="search_perform_visit"><span>Послелний визит:</span> 2 дня назад</div> | |
196 | + <div class="search_perform_projets_nam"><a href="#">Заказано проектов: 21</a></div> | |
197 | + </div> | |
198 | + | |
199 | + <div class="right_search_perform_block-wr"> | |
200 | + <div class="right_search_perform_foto-wr"> | |
201 | + <div><a href="#"><img src="/images/ded-ico.png" alt=""/></a></div> | |
202 | + </div> | |
203 | + <a class="get-list" href="#">Добавить в закладки</a> | |
204 | + </div> | |
205 | + </div> | |
206 | + | |
207 | + <div class="search-worker-blocks"> | |
208 | + <div class="search_perform_txt-wr"> | |
209 | + <div class="search_perform_title">ООО «Ортекс»</div> | |
210 | + <div class="search_perform-stars-wr"> | |
211 | + <div class="rating_search_performer"> | |
212 | + <!--оценка--> | |
213 | + <input type="hidden" class="val" value="1"/> | |
214 | + </div> | |
215 | + <div class="search_perform-stars-txt">30 отзывов, Киев </div> | |
216 | + </div> | |
217 | + <div class="search_perform_leng"> | |
218 | + <div>Сотрудники: более 40</div> | |
219 | + </div> | |
220 | + <div class="search_perform_visit"><span>Послелний визит:</span> 2 дня назад</div> | |
221 | + <div class="search_perform_projets_nam"><a href="#">Заказано проектов: 21</a></div> | |
222 | + </div> | |
223 | + | |
224 | + <div class="right_search_perform_block-wr"> | |
225 | + <div class="right_search_perform_foto-wr"> | |
226 | + <div><img src="/images/search_performer_img-1.jpg" alt=""/></div> | |
227 | + </div> | |
228 | + <a class="get-list" href="#">Добавить в закладки</a> | |
229 | + </div> | |
230 | + </div> | |
231 | + | |
232 | + <div class="search-worker-blocks"> | |
233 | + <div class="search_perform_txt-wr"> | |
234 | + <div class="search_perform_title">Петер Цумтор</div> | |
235 | + <div class="search_perform-stars-wr"> | |
236 | + <div class="rating_search_performer"> | |
237 | + <!--оценка--> | |
238 | + <input type="hidden" class="val" value="5"/> | |
239 | + </div> | |
240 | + <div class="search_perform-stars-txt">30 отзывов, Киев </div> | |
241 | + </div> | |
242 | + <div class="search_perform_leng"> | |
243 | + <!--<div>Сотрудники: более 40</div>--> | |
244 | + </div> | |
245 | + <div class="search_perform_visit"><span>Послелний визит:</span> 2 дня назад</div> | |
246 | + <div class="search_perform_projets_nam"><a href="#">Заказано проектов: 21</a></div> | |
247 | + </div> | |
248 | + | |
249 | + <div class="right_search_perform_block-wr"> | |
250 | + <div class="right_search_perform_foto-wr"> | |
251 | + <div><img src="/images/ded-ico.png" alt=""/></div> | |
252 | + </div> | |
253 | + <a class="get-list" href="#">Добавить в закладки</a> | |
254 | + </div> | |
255 | + </div> | |
256 | + </div> | |
257 | + | |
258 | + <div class="navi-buttons-wr style"> | |
259 | + <ul class="pagination"> | |
260 | + <li class="prev disabled"><span>«</span></li> | |
261 | + <li class="active"><a href="#">1</a></li> | |
262 | + <li><a href="#">2</a></li> | |
263 | + <li class="next"><a href="#">»</a></li> | |
264 | + </ul> | |
265 | + </div> | |
266 | + | |
267 | + <script> | |
268 | + $('div.rating_search_performer').rating({ | |
269 | + fx: 'full', | |
270 | + readOnly: 'true', | |
271 | + url: 'rating.php' | |
272 | + }); | |
273 | + </script> | |
274 | + </div> | |
275 | + </div> | |
276 | + </div> | |
277 | +</div> | |
9 | 278 | \ No newline at end of file | ... | ... |
frontend/views/search/performer.php
... | ... | @@ -176,11 +176,12 @@ $this->title = 'My Yii Application'; |
176 | 176 | <a href="#">рейтинг</a> |
177 | 177 | <div class="sidebar-droped-wr style"> |
178 | 178 | <ul> |
179 | + <li><a href="#">рейтинг</a></li> | |
179 | 180 | <li><a href="#">1заказчик</a></li> |
180 | 181 | <li><a href="#">2заказчик</a></li> |
181 | 182 | <li><a href="#">3заказчик</a></li> |
182 | 183 | <li><a href="#">4заказчик</a></li> |
183 | - <li style="display: none"><a href="#">рейтинг</a></li> | |
184 | + | |
184 | 185 | </ul> |
185 | 186 | </div> |
186 | 187 | </li> | ... | ... |
frontend/web/css/style.css
... | ... | @@ -2765,7 +2765,7 @@ input[type=file]::-webkit-file-upload-button { |
2765 | 2765 | float: left; |
2766 | 2766 | margin-top: 5px; |
2767 | 2767 | } |
2768 | -.search-worker-blocks-buttons a { | |
2768 | +.search-worker-blocks-buttons a, .right_search_perform_block-wr a { | |
2769 | 2769 | float: right; |
2770 | 2770 | height: 28px; |
2771 | 2771 | color: #fff; |
... | ... | @@ -6596,3 +6596,67 @@ input[disabled], select[disabled] { |
6596 | 6596 | height: 24px; |
6597 | 6597 | background: transparent url('/images/loading-plugin-new.gif') center left no-repeat; |
6598 | 6598 | } |
6599 | + | |
6600 | +/***/ | |
6601 | +.sidebar-droped-wr ul li:first-child {display: none;} | |
6602 | +.right_search_perform_foto-wr {width: 140px;height: 93px;float: left;margin-left: 16px;} | |
6603 | +.right_search_perform_foto-wr>div{width: 140px;height: 93px; display: table-cell; vertical-align: middle; text-align: center} | |
6604 | +.right_search_perform_foto-wr>div{max-width: 140px;max-height: 93px; vertical-align: middle} | |
6605 | +.right_search_perform_block-wr a { | |
6606 | + float: left; | |
6607 | + margin-top: 12px; | |
6608 | + margin-left: 0; | |
6609 | +} | |
6610 | +.right_search_perform_block-wr { | |
6611 | + width: 220px; float: right; | |
6612 | +} | |
6613 | +.search_perform_txt-wr { | |
6614 | + width: 480px;float: left; | |
6615 | +} | |
6616 | +.search_perform_title {line-height: 15px} | |
6617 | +.search_perform_title, .search_perform_leng { | |
6618 | + font-size: 18px; | |
6619 | +} | |
6620 | +.search_perform_leng {margin-top: -1px; margin-bottom: 18px; height: 20px} | |
6621 | +.search_perform_leng div{height: 20px; line-height: 20px} | |
6622 | +.search_perform_title, .search_perform_leng, .search_perform_visit, .search_perform_projets_nam, .search_perform-stars-wr { | |
6623 | + width: 100%; | |
6624 | + float: left; | |
6625 | +} | |
6626 | +.search_perform_visit, .search_perform_projets_nam a { | |
6627 | + font-size: 13px; | |
6628 | +} | |
6629 | +.search_perform_visit span, .search_perform_projets_nam a {font-weight: 700} | |
6630 | +.search_perform-stars-wr { | |
6631 | + height: 34px; | |
6632 | +} | |
6633 | +.search_perform-stars-txt {line-height: 34px; float: left; margin-left: 10px} | |
6634 | +.search_perform_projets_nam {margin-top: 15px;} | |
6635 | +.rating_search_performer {float: left} | |
6636 | +.rating_search_performer .vote-wrap {margin-top: 8px} | |
6637 | +.rating_search_performer .vote-hover { | |
6638 | + padding: 0 0 !important; | |
6639 | +} | |
6640 | +.rating_search_performer div.vote-result {padding-left: 0} | |
6641 | +.rating_search_performer .vote-success, .rating_search_performer .vote-result { | |
6642 | + display: none; | |
6643 | +} | |
6644 | +.rating_search_performer .vote-active { | |
6645 | + background: url("/images/stars.png") 0px 14px !important; | |
6646 | +} | |
6647 | +.rating_search_performer .div.vote-stars, .rating_search_performer div.vote-active { | |
6648 | + cursor: default; | |
6649 | +} | |
6650 | +.blocks-check-title label {font-weight: 700} | |
6651 | +.right_search_perform_foto-wr >div a { | |
6652 | + float: none; | |
6653 | + margin-top: 0; | |
6654 | + margin-left: 0; | |
6655 | + display: table-cell; | |
6656 | + vertical-align: middle; | |
6657 | + width: 140px; | |
6658 | + height: 93px; | |
6659 | + text-align: center; | |
6660 | +} | |
6661 | +.right_search_perform_foto-wr {vertical-align: middle} | |
6662 | +.section-box-customer .search-worker-blocks {margin-top: 20px} | |
6599 | 6663 | \ No newline at end of file | ... | ... |
4.34 KB
frontend/web/js/_jquery.rating.js
1 | -!function(t){t.rating=function(s,i){this.options=t.extend({fx:"float",image:"images/stars.png",width:15,stars:5,minimal:0,titles:["голос","голоса","голосов"],readOnly:!1,url:"",type:"post",loader:"images/ajax-loader.gif",click:function(){}},i||{}),this.el=t(s),this.left=0,this.val=parseFloat(t(".val",s).val())||0,this.val>this.options.stars&&(this.val=this.options.stars),this.val<0&&(this.val=0),this.old=this.val,this.votes=parseInt(t(".votes",s).val())||"",this.voteID=t(".vote-id",s).val()||"",this.vote_wrap=t('<div class="vote-wrap"></div>'),this.vote_block=t('<div class="vote-block"></div>'),this.vote_hover=t('<div class="vote-hover"></div>'),this.vote_stars=t('<div class="vote-stars"></div>'),this.vote_active=t('<div class="vote-active"></div>'),this.vote_result=t('<div class="vote-result"></div>'),this.vote_success=t('<div class="vote-success"></div>'),this.loader=t('<img src="'+this.options.loader+'" alt="load...">'),this.init()};var s=t.rating;s.fn=s.prototype={rating:"0.1"},s.fn.extend=s.extend=t.extend,s.fn.extend({init:function(){if(this.render(),!this.options.readOnly){var s=this,i=0,o=0;this.vote_hover.bind("mousemove mouseover",function(e){if(!s.options.readOnly){var n=t(this),a=0;i=e.clientX>0?e.clientX:e.pageX,o=i-n.offset().left-2;var h=s.options.width*s.options.stars,v=s.options.minimal*s.options.width;o>h&&(o=h),v>o&&(o=v),a=Math.round(o/s.options.width*10)/10,"half"==s.options.fx?o=Math.ceil(o/s.options.width*2)*s.options.width/2:"float"!=s.options.fx&&(o=Math.ceil(o/s.options.width)*s.options.width),a=Math.round(o/s.options.width*10)/10,s.vote_active.css({width:o,"background-position":"0 15px"}),s.vote_success.html("Оценка: "+a+"из 5")}}).bind("mouseout",function(){s.options.readOnly||(s.reset(),s.vote_success.empty())}).bind("click.rating",function(){if(!s.options.readOnly){var t=Math.round(o/s.options.width*10)/10;t>s.options.stars&&(t=s.options.stars),0>t&&(t=0),s.old=s.val,s.val=(s.val*s.votes+t)/(s.votes+1),s.val.toFixed(1),s.vote_success.html("Ваша оценка: "+t),""!=s.options.url&&s.send(t),s.options.readOnly=!0,s.options.click.apply(this,[t])}})}},set:function(){this.vote_active.css({width:this.val*this.options.width,"background-position":"0 15px"})},reset:function(){this.vote_active.css({width:this.old*this.options.width,"background-position":"0 15px"})},setvoters:function(){this.vote_result.html(this.declOfNum(this.votes))},render:function(){this.el.html(this.vote_wrap.append(this.vote_hover.css({padding:"0 4px",height:this.options.width,width:this.options.width*this.options.stars}),this.vote_result.text(this.declOfNum(this.votes)),this.vote_success)),this.vote_block.append(this.vote_stars.css({height:this.options.width,width:this.options.width*this.options.stars,background:"url('"+this.options.image+"') 0 0"}),this.vote_active.css({height:this.options.width,width:this.val*this.options.width,background:"url('"+this.options.image+"') 0 15px"})).appendTo(this.vote_hover)},send:function(s){var i=this;this.vote_result.html(this.loader),t.ajax({url:i.options.url,type:i.options.type,data:{id:this.voteID,score:s},dataType:"json",success:function(t){"OK"==t.status?(i.votes++,i.set()):i.reset(),i.setvoters(),t.msg&&i.vote_success.html(t.msg)}})},declOfNum:function(t){return 0>=t?"":(t=Math.abs(Math.floor(t)),cases=[2,0,1,1,1,2],t+" "+this.options.titles[t%100>4&&20>t%100?2:cases[5>t%10?t%10:5]])}}),t.fn.rating=function(i){if("string"==typeof i){var o=t(this).data("rating"),e=Array.prototype.slice.call(arguments,1);return o[i].apply(o,e)}return this.each(function(){var o=t(this).data("rating");o?(i&&t.extend(o.options,i),o.init()):t(this).data("rating",new s(this,i))})}}(jQuery); | |
2 | 1 | \ No newline at end of file |
2 | +//!function(t){t.rating=function(s,i){this.options=t.extend({fx:"float",image:"images/stars.png",width:15,stars:5,minimal:0,titles:["голос","голоса","голосов"],readOnly:!1,url:"",type:"post",loader:"images/ajax-loader.gif",click:function(){}},i||{}),this.el=t(s),this.left=0,this.val=parseFloat(t(".val",s).val())||0,this.val>this.options.stars&&(this.val=this.options.stars),this.val<0&&(this.val=0),this.old=this.val,this.votes=parseInt(t(".votes",s).val())||"",this.voteID=t(".vote-id",s).val()||"",this.vote_wrap=t('<div class="vote-wrap"></div>'),this.vote_block=t('<div class="vote-block"></div>'),this.vote_hover=t('<div class="vote-hover"></div>'),this.vote_stars=t('<div class="vote-stars"></div>'),this.vote_active=t('<div class="vote-active"></div>'),this.vote_result=t('<div class="vote-result"></div>'),this.vote_success=t('<div class="vote-success"></div>'),this.loader=t('<img src="'+this.options.loader+'" alt="load...">'),this.init()};var s=t.rating;s.fn=s.prototype={rating:"0.1"},s.fn.extend=s.extend=t.extend,s.fn.extend({init:function(){if(this.render(),!this.options.readOnly){var s=this,i=0,o=0;this.vote_hover.bind("mousemove mouseover",function(e){if(!s.options.readOnly){var n=t(this),a=0;i=e.clientX>0?e.clientX:e.pageX,o=i-n.offset().left-2;var h=s.options.width*s.options.stars,v=s.options.minimal*s.options.width;o>h&&(o=h),v>o&&(o=v),a=Math.round(o/s.options.width*10)/10,"half"==s.options.fx?o=Math.ceil(o/s.options.width*2)*s.options.width/2:"float"!=s.options.fx&&(o=Math.ceil(o/s.options.width)*s.options.width),a=Math.round(o/s.options.width*10)/10,s.vote_active.css({width:o,"background-position":"0 15px"}),s.vote_success.html("Оценка: "+a+"из 5")}}).bind("mouseout",function(){s.options.readOnly||(s.reset(),s.vote_success.empty())}).bind("click.rating",function(){if(!s.options.readOnly){var t=Math.round(o/s.options.width*10)/10;t>s.options.stars&&(t=s.options.stars),0>t&&(t=0),s.old=s.val,s.val=(s.val*s.votes+t)/(s.votes+1),s.val.toFixed(1),s.vote_success.html("Ваша оценка: "+t),""!=s.options.url&&s.send(t),s.options.readOnly=!0,s.options.click.apply(this,[t])}})}},set:function(){this.vote_active.css({width:this.val*this.options.width,"background-position":"0 15px"})},reset:function(){this.vote_active.css({width:this.old*this.options.width,"background-position":"0 15px"})},setvoters:function(){this.vote_result.html(this.declOfNum(this.votes))},render:function(){this.el.html(this.vote_wrap.append(this.vote_hover.css({padding:"0 4px",height:this.options.width,width:this.options.width*this.options.stars}),this.vote_result.text(this.declOfNum(this.votes)),this.vote_success)),this.vote_block.append(this.vote_stars.css({height:this.options.width,width:this.options.width*this.options.stars,background:"url('"+this.options.image+"') 0 0"}),this.vote_active.css({height:this.options.width,width:this.val*this.options.width,background:"url('"+this.options.image+"') 0 15px"})).appendTo(this.vote_hover)},send:function(s){var i=this;this.vote_result.html(this.loader),t.ajax({url:i.options.url,type:i.options.type,data:{id:this.voteID,score:s},dataType:"json",success:function(t){"OK"==t.status?(i.votes++,i.set()):i.reset(),i.setvoters(),t.msg&&i.vote_success.html(t.msg)}})},declOfNum:function(t){return 0>=t?"":(t=Math.abs(Math.floor(t)),cases=[2,0,1,1,1,2],t+" "+this.options.titles[t%100>4&&20>t%100?2:cases[5>t%10?t%10:5]])}}),t.fn.rating=function(i){if("string"==typeof i){var o=t(this).data("rating"),e=Array.prototype.slice.call(arguments,1);return o[i].apply(o,e)}return this.each(function(){var o=t(this).data("rating");o?(i&&t.extend(o.options,i),o.init()):t(this).data("rating",new s(this,i))})}}(jQuery); | |
3 | 3 | \ No newline at end of file | ... | ... |