| @@ 278-292 (lines=15) @@ | ||
| 275 | });"); |
|
| 276 | } |
|
| 277 | ||
| 278 | protected function registerScriptButtonRepeatOrder() |
|
| 279 | {
|
|
| 280 | $url = Yii::app()->controller->createUrl('basket/repeatOrder');
|
|
| 281 | ||
| 282 | $this->registerScript("$('body, .{$this->classRepeatOrderButton}').on('click', '.{$this->classRepeatOrderButton}', function(e){
|
|
| 283 | e.preventDefault(); |
|
| 284 | ||
| 285 | var collection = $.fn.collection('{$this->keyCollection}');
|
|
| 286 | ||
| 287 | collection.send({
|
|
| 288 | 'url' : '{$url}',
|
|
| 289 | 'data' : {'order-id' : $(this).data('order-id')}
|
|
| 290 | }); |
|
| 291 | });"); |
|
| 292 | } |
|
| 293 | } |
|
| @@ 20-34 (lines=15) @@ | ||
| 17 | return CHtml::link($text, '#', $htmlOptions); |
|
| 18 | } |
|
| 19 | ||
| 20 | protected function registerScriptButtonMergeWithBasket() |
|
| 21 | {
|
|
| 22 | $url = Yii::app()->controller->createUrl('favorite/mergeWithBasket');
|
|
| 23 | ||
| 24 | $this->registerScript("$('body, .{$this->classMergeWithBasket}').on('click', '.{$this->classMergeWithBasket}', function(e){
|
|
| 25 | e.preventDefault(); |
|
| 26 | ||
| 27 | var collection = $.fn.collection('{$this->keyCollection}');
|
|
| 28 | ||
| 29 | collection.send({
|
|
| 30 | 'url' : '{$url}',
|
|
| 31 | 'action' : 'mergeWithBasket', |
|
| 32 | }); |
|
| 33 | });"); |
|
| 34 | } |
|
| 35 | ||
| 36 | ||
| 37 | protected function registerScripts() |
|