Commit 78e5a357d6e60f1e3e3c9d6a729c8e2e482da13f
Merge remote-tracking branch 'origin/master'
# Conflicts: # frontend/views/performer/portfolio-view.php
Showing
10 changed files
with
277 additions
and
317 deletions
Show diff stats
common/behaviors/ShowImage.php
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | namespace common\behaviors; |
4 | 4 | |
5 | +use common\modules\file\components\UploaderComponent; | |
5 | 6 | use yii; |
6 | 7 | use yii\base\Behavior; |
7 | 8 | |
... | ... | @@ -24,6 +25,21 @@ class ShowImage extends Behavior |
24 | 25 | preg_match('/\.(.[^.]*)$/', $dir, $type); |
25 | 26 | if(isset($type[1])){ |
26 | 27 | $dir = preg_replace( $preg, '/'.$width.'x'.$height.'.'.$type[1], $dir); |
28 | + $storage = dirname(yii\helpers\Url::to('@storage')); | |
29 | + $filename = $storage.$dir; | |
30 | + if (!file_exists($filename)) { | |
31 | + | |
32 | + $original = $storage.dirname($dir).'/original.'.$type[1]; | |
33 | + if (file_exists($original)) { | |
34 | + $resizer = new UploaderComponent(); | |
35 | + $resizer->resizeImg($width,$height, $original,$filename); | |
36 | + | |
37 | + } else { | |
38 | + throw new \Exception("Файл $original не существует"); | |
39 | + } | |
40 | + | |
41 | + } | |
42 | + | |
27 | 43 | } |
28 | 44 | |
29 | 45 | } | ... | ... |
common/modules/comment/resources/comment.js
... | ... | @@ -2,7 +2,7 @@ $(function() { |
2 | 2 | |
3 | 3 | $(document).on('click', '.artbox_comment_container .removeable', function(e) { |
4 | 4 | e.preventDefault(); |
5 | - $(this).remove(); | |
5 | + $(this).parent().remove(); | |
6 | 6 | // var container = $(this).parents('.artbox_comment_container'); |
7 | 7 | // $(container).remove(); |
8 | 8 | }); |
... | ... | @@ -172,8 +172,41 @@ $(function() { |
172 | 172 | { |
173 | 173 | if(!data.error) |
174 | 174 | { |
175 | - $(container).empty(); | |
176 | - $(container).append('<p class="removeable">' + data.text + '</p>'); | |
175 | + $(container).remove(); | |
176 | + addRemoveBlocks() | |
177 | + function addRemoveBlocks() | |
178 | + { | |
179 | + $('#overlay, .succses_comm').remove(); | |
180 | + $('body').append('<div id="overlay" style="top:0; left:0;"></div>').append('<div class="succses_comm"><div class="closed-form"></div><div class="succses_comm-txt">'+data.text+'</div></div>'); | |
181 | + $('#overlay').fadeIn( | |
182 | + 400, function() | |
183 | + { | |
184 | + $('.succses_comm').css({display : 'block'}).animate({opacity : 1, top : '50%'}, 200); | |
185 | + } | |
186 | + ); | |
187 | + function closeSuccsescomm() { | |
188 | + $('.succses_comm') | |
189 | + .animate( | |
190 | + {opacity : 0, top : '30%'}, 200, function() | |
191 | + { | |
192 | + $(this).css('display', 'none') | |
193 | + $('#overlay').fadeOut( | |
194 | + 400, function() | |
195 | + { | |
196 | + $('#overlay, .succses_comm').remove() | |
197 | + } | |
198 | + ) | |
199 | + } | |
200 | + ) | |
201 | + } | |
202 | + $('body').on('click', '.closed-form, #overlay', function() { | |
203 | + closeSuccsescomm() | |
204 | + } | |
205 | + ); | |
206 | + | |
207 | + setTimeout(closeSuccsescomm, 4000) | |
208 | + } | |
209 | + // $(container).append('<p class="removeable">' + data.text + '</p>'); | |
177 | 210 | } else |
178 | 211 | { |
179 | 212 | $(container).prepend('<p class="removeable error_message">' + data.error + '</p>') | ... | ... |
common/modules/file/components/UploaderComponent.php
0 → 100644
1 | +<?php | |
2 | + | |
3 | +namespace common\modules\file\components; | |
4 | +use Yii; | |
5 | +use yii\base\Component; | |
6 | +use Imagine\Gd\Imagine; | |
7 | +use Imagine\Image\Box; | |
8 | +use yii\imagine\Image; | |
9 | + | |
10 | +class UploaderComponent extends Component { | |
11 | + | |
12 | + public function isBigger($width,$height,$w,$h) | |
13 | + { | |
14 | + if($width>$w){ | |
15 | + return true; | |
16 | + }else if($height >$h) { | |
17 | + return true; | |
18 | + } | |
19 | + return false; | |
20 | + } | |
21 | + | |
22 | + public function resizeImg($w, $h, $imageAlias,$imageAliasSave){ | |
23 | + $img = Image::getImagine()->open(Yii::getAlias($imageAlias)); | |
24 | + | |
25 | + $size = $img->getSize(); | |
26 | + | |
27 | + $width = $size->getWidth(); | |
28 | + $height = $size->getHeight(); | |
29 | + | |
30 | + $e_width = $w/$h; | |
31 | + $e_height = $h/$w; | |
32 | + | |
33 | + $e1_width = $width/$height; | |
34 | + $e1_height = $height/$width; | |
35 | + | |
36 | + | |
37 | + | |
38 | + if($e_width<$e1_width){ | |
39 | + | |
40 | + $new_width = $width*($e_width/$e1_width); | |
41 | + | |
42 | + $y = 0; | |
43 | + $x = $width/ 2-($new_width/2); | |
44 | + $width = $new_width; | |
45 | + | |
46 | + }else { | |
47 | + | |
48 | + $new_height = $height*($e_height/$e1_height); | |
49 | + $x = 0; | |
50 | + $y = $height/2-($new_height/2); | |
51 | + $height = $new_height; | |
52 | + } | |
53 | + | |
54 | + | |
55 | + | |
56 | + | |
57 | + Image::crop($imageAlias, $width, $height,[$x,$y]) | |
58 | + ->save(Yii::getAlias($imageAliasSave), ['quality' => | |
59 | + 100]); | |
60 | + | |
61 | + | |
62 | + $imagine = new Imagine(); | |
63 | + $imagine->open($imageAliasSave) | |
64 | + ->resize(new Box($w, $h)) | |
65 | + ->save($imageAliasSave, array('flatten' => false)); | |
66 | + | |
67 | + | |
68 | + } | |
69 | + | |
70 | + | |
71 | +} | |
0 | 72 | \ No newline at end of file | ... | ... |
common/modules/file/controllers/UploaderController.php
... | ... | @@ -6,26 +6,15 @@ |
6 | 6 | * Time: 9:58 |
7 | 7 | */ |
8 | 8 | namespace common\modules\file\controllers; |
9 | +use common\modules\file\components\UploaderComponent; | |
9 | 10 | use Yii; |
10 | 11 | use yii\helpers\ArrayHelper; |
11 | 12 | use yii\web\UploadedFile; |
12 | 13 | use common\modules\file\models\ImageSizerForm; |
13 | 14 | use yii\web\Controller; |
14 | -use Imagine\Gd\Imagine; | |
15 | -use Imagine\Image\Box; | |
16 | -use yii\imagine\Image; | |
17 | 15 | |
18 | 16 | class UploaderController extends Controller { |
19 | 17 | |
20 | - public function isBigger($width,$height,$w,$h) | |
21 | - { | |
22 | - if($width>$w){ | |
23 | - return true; | |
24 | - }else if($height >$h) { | |
25 | - return true; | |
26 | - } | |
27 | - return false; | |
28 | - } | |
29 | 18 | |
30 | 19 | |
31 | 20 | private function getUserPath(){ |
... | ... | @@ -36,55 +25,8 @@ class UploaderController extends Controller { |
36 | 25 | } |
37 | 26 | } |
38 | 27 | |
39 | - private function resizeImg($w, $h, $imageAlias,$imageAliasSave){ | |
40 | - $img = Image::getImagine()->open(Yii::getAlias($imageAlias)); | |
41 | - | |
42 | - $size = $img->getSize(); | |
43 | - | |
44 | - $width = $size->getWidth(); | |
45 | - $height = $size->getHeight(); | |
46 | - | |
47 | - $e_width = $w/$h; | |
48 | - $e_height = $h/$w; | |
49 | - | |
50 | - $e1_width = $width/$height; | |
51 | - $e1_height = $height/$width; | |
52 | 28 | |
53 | 29 | |
54 | - | |
55 | - if($e_width<$e1_width){ | |
56 | - | |
57 | - $new_width = $width*($e_width/$e1_width); | |
58 | - | |
59 | - $y = 0; | |
60 | - $x = $width/ 2-($new_width/2); | |
61 | - $width = $new_width; | |
62 | - | |
63 | - }else { | |
64 | - | |
65 | - $new_height = $height*($e_height/$e1_height); | |
66 | - $x = 0; | |
67 | - $y = $height/2-($new_height/2); | |
68 | - $height = $new_height; | |
69 | - } | |
70 | - | |
71 | - | |
72 | - | |
73 | - | |
74 | - Image::crop($imageAlias, $width, $height,[$x,$y]) | |
75 | - ->save(Yii::getAlias($imageAliasSave), ['quality' => | |
76 | - 100]); | |
77 | - | |
78 | - | |
79 | - $imagine = new Imagine(); | |
80 | - $imagine->open($imageAliasSave) | |
81 | - ->resize(new Box($w, $h)) | |
82 | - ->save($imageAliasSave, array('flatten' => false)); | |
83 | - | |
84 | - | |
85 | - | |
86 | - } | |
87 | - | |
88 | 30 | private function deleteImages($old_img){ |
89 | 31 | |
90 | 32 | if(!empty($old_img) && file_exists($_SERVER['DOCUMENT_ROOT'].$old_img)){ |
... | ... | @@ -162,7 +104,9 @@ class UploaderController extends Controller { |
162 | 104 | |
163 | 105 | $imageLink = '/storage/'.$this->getUserPath().'/'.$md5_file.'/'.$size['width'].'x'.$size['height'].'.'.$model->file->extension; |
164 | 106 | |
165 | - $this->resizeImg($size['width'], $size['height'], $imageOrigAlias,$imageAlias); | |
107 | + $resizer = new UploaderComponent(); | |
108 | + | |
109 | + $resizer->resizeImg($size['width'], $size['height'], $imageOrigAlias,$imageAlias); | |
166 | 110 | |
167 | 111 | } |
168 | 112 | } | ... | ... |
composer.lock
... | ... | @@ -429,8 +429,7 @@ |
429 | 429 | }, |
430 | 430 | "license": [ |
431 | 431 | "MIT" |
432 | - ], | |
433 | - "time": "2015-12-31 08:33:51" | |
432 | + ] | |
434 | 433 | }, |
435 | 434 | { |
436 | 435 | "name": "cebe/markdown", |
... | ... | @@ -541,12 +540,12 @@ |
541 | 540 | "source": { |
542 | 541 | "type": "git", |
543 | 542 | "url": "https://github.com/Codeception/Codeception.git", |
544 | - "reference": "061cd3b6bece7cdd32456079b5217734342aeda9" | |
543 | + "reference": "099d101299e8ab43413b4787189d5da1927ec6a2" | |
545 | 544 | }, |
546 | 545 | "dist": { |
547 | 546 | "type": "zip", |
548 | - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/061cd3b6bece7cdd32456079b5217734342aeda9", | |
549 | - "reference": "061cd3b6bece7cdd32456079b5217734342aeda9", | |
547 | + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/099d101299e8ab43413b4787189d5da1927ec6a2", | |
548 | + "reference": "099d101299e8ab43413b4787189d5da1927ec6a2", | |
550 | 549 | "shasum": "" |
551 | 550 | }, |
552 | 551 | "require": { |
... | ... | @@ -618,7 +617,7 @@ |
618 | 617 | "functional testing", |
619 | 618 | "unit testing" |
620 | 619 | ], |
621 | - "time": "2016-04-20 22:27:36" | |
620 | + "time": "2016-04-26 21:38:53" | |
622 | 621 | }, |
623 | 622 | { |
624 | 623 | "name": "developeruz/yii2-db-rbac", |
... | ... | @@ -1134,12 +1133,12 @@ |
1134 | 1133 | "source": { |
1135 | 1134 | "type": "git", |
1136 | 1135 | "url": "https://github.com/kartik-v/yii2-krajee-base.git", |
1137 | - "reference": "a46d88d937f914b71bee85d181687b8f2098e6fa" | |
1136 | + "reference": "314f3b31990870856dbdf5f9bf5192ee683a386a" | |
1138 | 1137 | }, |
1139 | 1138 | "dist": { |
1140 | 1139 | "type": "zip", |
1141 | - "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/a46d88d937f914b71bee85d181687b8f2098e6fa", | |
1142 | - "reference": "a46d88d937f914b71bee85d181687b8f2098e6fa", | |
1140 | + "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/314f3b31990870856dbdf5f9bf5192ee683a386a", | |
1141 | + "reference": "314f3b31990870856dbdf5f9bf5192ee683a386a", | |
1143 | 1142 | "shasum": "" |
1144 | 1143 | }, |
1145 | 1144 | "require": { |
... | ... | @@ -1177,7 +1176,7 @@ |
1177 | 1176 | "widget", |
1178 | 1177 | "yii2" |
1179 | 1178 | ], |
1180 | - "time": "2016-04-21 17:23:21" | |
1179 | + "time": "2016-04-28 03:01:32" | |
1181 | 1180 | }, |
1182 | 1181 | { |
1183 | 1182 | "name": "kartik-v/yii2-widget-colorinput", |
... | ... | @@ -1239,12 +1238,12 @@ |
1239 | 1238 | "source": { |
1240 | 1239 | "type": "git", |
1241 | 1240 | "url": "https://github.com/kartik-v/yii2-widget-rating.git", |
1242 | - "reference": "69b192bc2b26a435618e17eed7c56294ef805fab" | |
1241 | + "reference": "e3110576b60ecb6098bc8389efb5ef3a402b6e61" | |
1243 | 1242 | }, |
1244 | 1243 | "dist": { |
1245 | 1244 | "type": "zip", |
1246 | - "url": "https://api.github.com/repos/kartik-v/yii2-widget-rating/zipball/69b192bc2b26a435618e17eed7c56294ef805fab", | |
1247 | - "reference": "69b192bc2b26a435618e17eed7c56294ef805fab", | |
1245 | + "url": "https://api.github.com/repos/kartik-v/yii2-widget-rating/zipball/e3110576b60ecb6098bc8389efb5ef3a402b6e61", | |
1246 | + "reference": "e3110576b60ecb6098bc8389efb5ef3a402b6e61", | |
1248 | 1247 | "shasum": "" |
1249 | 1248 | }, |
1250 | 1249 | "require": { |
... | ... | @@ -1287,7 +1286,7 @@ |
1287 | 1286 | "widget", |
1288 | 1287 | "yii2" |
1289 | 1288 | ], |
1290 | - "time": "2016-02-17 19:13:26" | |
1289 | + "time": "2016-04-27 19:26:00" | |
1291 | 1290 | }, |
1292 | 1291 | { |
1293 | 1292 | "name": "kartik-v/yii2-widget-select2", |
... | ... | @@ -1506,48 +1505,6 @@ |
1506 | 1505 | "time": "2015-07-03 07:08:52" |
1507 | 1506 | }, |
1508 | 1507 | { |
1509 | - "name": "myclabs/deep-copy", | |
1510 | - "version": "1.5.0", | |
1511 | - "source": { | |
1512 | - "type": "git", | |
1513 | - "url": "https://github.com/myclabs/DeepCopy.git", | |
1514 | - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc" | |
1515 | - }, | |
1516 | - "dist": { | |
1517 | - "type": "zip", | |
1518 | - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc", | |
1519 | - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc", | |
1520 | - "shasum": "" | |
1521 | - }, | |
1522 | - "require": { | |
1523 | - "php": ">=5.4.0" | |
1524 | - }, | |
1525 | - "require-dev": { | |
1526 | - "doctrine/collections": "1.*", | |
1527 | - "phpunit/phpunit": "~4.1" | |
1528 | - }, | |
1529 | - "type": "library", | |
1530 | - "autoload": { | |
1531 | - "psr-4": { | |
1532 | - "DeepCopy\\": "src/DeepCopy/" | |
1533 | - } | |
1534 | - }, | |
1535 | - "notification-url": "https://packagist.org/downloads/", | |
1536 | - "license": [ | |
1537 | - "MIT" | |
1538 | - ], | |
1539 | - "description": "Create deep copies (clones) of your objects", | |
1540 | - "homepage": "https://github.com/myclabs/DeepCopy", | |
1541 | - "keywords": [ | |
1542 | - "clone", | |
1543 | - "copy", | |
1544 | - "duplicate", | |
1545 | - "object", | |
1546 | - "object graph" | |
1547 | - ], | |
1548 | - "time": "2015-11-07 22:20:37" | |
1549 | - }, | |
1550 | - { | |
1551 | 1508 | "name": "nodge/lightopenid", |
1552 | 1509 | "version": "1.1.2", |
1553 | 1510 | "source": { |
... | ... | @@ -1759,40 +1716,39 @@ |
1759 | 1716 | }, |
1760 | 1717 | { |
1761 | 1718 | "name": "phpunit/php-code-coverage", |
1762 | - "version": "dev-master", | |
1719 | + "version": "2.2.x-dev", | |
1763 | 1720 | "source": { |
1764 | 1721 | "type": "git", |
1765 | 1722 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", |
1766 | - "reference": "6d3b505cb3a6143adcd58375870eb0b4b98636bc" | |
1723 | + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" | |
1767 | 1724 | }, |
1768 | 1725 | "dist": { |
1769 | 1726 | "type": "zip", |
1770 | - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6d3b505cb3a6143adcd58375870eb0b4b98636bc", | |
1771 | - "reference": "6d3b505cb3a6143adcd58375870eb0b4b98636bc", | |
1727 | + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", | |
1728 | + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", | |
1772 | 1729 | "shasum": "" |
1773 | 1730 | }, |
1774 | 1731 | "require": { |
1775 | - "php": "^5.6 || ^7.0", | |
1732 | + "php": ">=5.3.3", | |
1776 | 1733 | "phpunit/php-file-iterator": "~1.3", |
1777 | 1734 | "phpunit/php-text-template": "~1.2", |
1778 | - "phpunit/php-token-stream": "^1.4.2", | |
1779 | - "sebastian/code-unit-reverse-lookup": "~1.0", | |
1735 | + "phpunit/php-token-stream": "~1.3", | |
1780 | 1736 | "sebastian/environment": "^1.3.2", |
1781 | - "sebastian/version": "~1.0|~2.0" | |
1737 | + "sebastian/version": "~1.0" | |
1782 | 1738 | }, |
1783 | 1739 | "require-dev": { |
1784 | 1740 | "ext-xdebug": ">=2.1.4", |
1785 | - "phpunit/phpunit": "^5.4" | |
1741 | + "phpunit/phpunit": "~4" | |
1786 | 1742 | }, |
1787 | 1743 | "suggest": { |
1788 | 1744 | "ext-dom": "*", |
1789 | - "ext-xdebug": ">=2.4.0", | |
1745 | + "ext-xdebug": ">=2.2.1", | |
1790 | 1746 | "ext-xmlwriter": "*" |
1791 | 1747 | }, |
1792 | 1748 | "type": "library", |
1793 | 1749 | "extra": { |
1794 | 1750 | "branch-alias": { |
1795 | - "dev-master": "4.0.x-dev" | |
1751 | + "dev-master": "2.2.x-dev" | |
1796 | 1752 | } |
1797 | 1753 | }, |
1798 | 1754 | "autoload": { |
... | ... | @@ -1818,7 +1774,7 @@ |
1818 | 1774 | "testing", |
1819 | 1775 | "xunit" |
1820 | 1776 | ], |
1821 | - "time": "2016-04-21 05:23:34" | |
1777 | + "time": "2015-10-06 15:47:00" | |
1822 | 1778 | }, |
1823 | 1779 | { |
1824 | 1780 | "name": "phpunit/php-file-iterator", |
... | ... | @@ -2000,16 +1956,16 @@ |
2000 | 1956 | }, |
2001 | 1957 | { |
2002 | 1958 | "name": "phpunit/phpunit", |
2003 | - "version": "dev-master", | |
1959 | + "version": "4.8.x-dev", | |
2004 | 1960 | "source": { |
2005 | 1961 | "type": "git", |
2006 | 1962 | "url": "https://github.com/sebastianbergmann/phpunit.git", |
2007 | - "reference": "9b5b99b3da70e3eea5294712bc5843910ad2bad6" | |
1963 | + "reference": "3c4becbce99732549949904c47b76ffe602a7595" | |
2008 | 1964 | }, |
2009 | 1965 | "dist": { |
2010 | 1966 | "type": "zip", |
2011 | - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9b5b99b3da70e3eea5294712bc5843910ad2bad6", | |
2012 | - "reference": "9b5b99b3da70e3eea5294712bc5843910ad2bad6", | |
1967 | + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3c4becbce99732549949904c47b76ffe602a7595", | |
1968 | + "reference": "3c4becbce99732549949904c47b76ffe602a7595", | |
2013 | 1969 | "shasum": "" |
2014 | 1970 | }, |
2015 | 1971 | "require": { |
... | ... | @@ -2018,22 +1974,19 @@ |
2018 | 1974 | "ext-pcre": "*", |
2019 | 1975 | "ext-reflection": "*", |
2020 | 1976 | "ext-spl": "*", |
2021 | - "myclabs/deep-copy": "~1.3", | |
2022 | - "php": "^5.6 || ^7.0", | |
1977 | + "php": ">=5.3.3", | |
2023 | 1978 | "phpspec/prophecy": "^1.3.1", |
2024 | - "phpunit/php-code-coverage": "^4.0", | |
1979 | + "phpunit/php-code-coverage": "~2.1", | |
2025 | 1980 | "phpunit/php-file-iterator": "~1.4", |
2026 | 1981 | "phpunit/php-text-template": "~1.2", |
2027 | 1982 | "phpunit/php-timer": "^1.0.6", |
2028 | - "phpunit/phpunit-mock-objects": "^3.2", | |
1983 | + "phpunit/phpunit-mock-objects": "~2.3", | |
2029 | 1984 | "sebastian/comparator": "~1.1", |
2030 | 1985 | "sebastian/diff": "~1.2", |
2031 | 1986 | "sebastian/environment": "~1.3", |
2032 | 1987 | "sebastian/exporter": "~1.2", |
2033 | 1988 | "sebastian/global-state": "~1.0", |
2034 | - "sebastian/object-enumerator": "~1.0", | |
2035 | - "sebastian/resource-operations": "~1.0", | |
2036 | - "sebastian/version": "~1.0|~2.0", | |
1989 | + "sebastian/version": "~1.0", | |
2037 | 1990 | "symfony/yaml": "~2.1|~3.0" |
2038 | 1991 | }, |
2039 | 1992 | "suggest": { |
... | ... | @@ -2045,7 +1998,7 @@ |
2045 | 1998 | "type": "library", |
2046 | 1999 | "extra": { |
2047 | 2000 | "branch-alias": { |
2048 | - "dev-master": "5.4.x-dev" | |
2001 | + "dev-master": "4.8.x-dev" | |
2049 | 2002 | } |
2050 | 2003 | }, |
2051 | 2004 | "autoload": { |
... | ... | @@ -2071,30 +2024,30 @@ |
2071 | 2024 | "testing", |
2072 | 2025 | "xunit" |
2073 | 2026 | ], |
2074 | - "time": "2016-04-19 17:48:13" | |
2027 | + "time": "2016-04-25 09:17:33" | |
2075 | 2028 | }, |
2076 | 2029 | { |
2077 | 2030 | "name": "phpunit/phpunit-mock-objects", |
2078 | - "version": "dev-master", | |
2031 | + "version": "2.3.x-dev", | |
2079 | 2032 | "source": { |
2080 | 2033 | "type": "git", |
2081 | 2034 | "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", |
2082 | - "reference": "5d8c2a839d2c77757b7499eb135f34f9f5f07e6f" | |
2035 | + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" | |
2083 | 2036 | }, |
2084 | 2037 | "dist": { |
2085 | 2038 | "type": "zip", |
2086 | - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5d8c2a839d2c77757b7499eb135f34f9f5f07e6f", | |
2087 | - "reference": "5d8c2a839d2c77757b7499eb135f34f9f5f07e6f", | |
2039 | + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", | |
2040 | + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", | |
2088 | 2041 | "shasum": "" |
2089 | 2042 | }, |
2090 | 2043 | "require": { |
2091 | 2044 | "doctrine/instantiator": "^1.0.2", |
2092 | - "php": ">=5.6", | |
2045 | + "php": ">=5.3.3", | |
2093 | 2046 | "phpunit/php-text-template": "~1.2", |
2094 | 2047 | "sebastian/exporter": "~1.2" |
2095 | 2048 | }, |
2096 | 2049 | "require-dev": { |
2097 | - "phpunit/phpunit": "^5.4" | |
2050 | + "phpunit/phpunit": "~4.4" | |
2098 | 2051 | }, |
2099 | 2052 | "suggest": { |
2100 | 2053 | "ext-soap": "*" |
... | ... | @@ -2102,7 +2055,7 @@ |
2102 | 2055 | "type": "library", |
2103 | 2056 | "extra": { |
2104 | 2057 | "branch-alias": { |
2105 | - "dev-master": "3.2.x-dev" | |
2058 | + "dev-master": "2.3.x-dev" | |
2106 | 2059 | } |
2107 | 2060 | }, |
2108 | 2061 | "autoload": { |
... | ... | @@ -2127,7 +2080,7 @@ |
2127 | 2080 | "mock", |
2128 | 2081 | "xunit" |
2129 | 2082 | ], |
2130 | - "time": "2016-04-20 14:39:30" | |
2083 | + "time": "2015-10-02 06:51:40" | |
2131 | 2084 | }, |
2132 | 2085 | { |
2133 | 2086 | "name": "psr/http-message", |
... | ... | @@ -2282,51 +2235,6 @@ |
2282 | 2235 | "time": "2016-04-21 11:55:25" |
2283 | 2236 | }, |
2284 | 2237 | { |
2285 | - "name": "sebastian/code-unit-reverse-lookup", | |
2286 | - "version": "dev-master", | |
2287 | - "source": { | |
2288 | - "type": "git", | |
2289 | - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", | |
2290 | - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" | |
2291 | - }, | |
2292 | - "dist": { | |
2293 | - "type": "zip", | |
2294 | - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", | |
2295 | - "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", | |
2296 | - "shasum": "" | |
2297 | - }, | |
2298 | - "require": { | |
2299 | - "php": ">=5.6" | |
2300 | - }, | |
2301 | - "require-dev": { | |
2302 | - "phpunit/phpunit": "~5" | |
2303 | - }, | |
2304 | - "type": "library", | |
2305 | - "extra": { | |
2306 | - "branch-alias": { | |
2307 | - "dev-master": "1.0.x-dev" | |
2308 | - } | |
2309 | - }, | |
2310 | - "autoload": { | |
2311 | - "classmap": [ | |
2312 | - "src/" | |
2313 | - ] | |
2314 | - }, | |
2315 | - "notification-url": "https://packagist.org/downloads/", | |
2316 | - "license": [ | |
2317 | - "BSD-3-Clause" | |
2318 | - ], | |
2319 | - "authors": [ | |
2320 | - { | |
2321 | - "name": "Sebastian Bergmann", | |
2322 | - "email": "sebastian@phpunit.de" | |
2323 | - } | |
2324 | - ], | |
2325 | - "description": "Looks up which function or method a line of code belongs to", | |
2326 | - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", | |
2327 | - "time": "2016-02-13 06:45:14" | |
2328 | - }, | |
2329 | - { | |
2330 | 2238 | "name": "sebastian/comparator", |
2331 | 2239 | "version": "dev-master", |
2332 | 2240 | "source": { |
... | ... | @@ -2611,52 +2519,6 @@ |
2611 | 2519 | "time": "2015-10-12 03:26:01" |
2612 | 2520 | }, |
2613 | 2521 | { |
2614 | - "name": "sebastian/object-enumerator", | |
2615 | - "version": "dev-master", | |
2616 | - "source": { | |
2617 | - "type": "git", | |
2618 | - "url": "https://github.com/sebastianbergmann/object-enumerator.git", | |
2619 | - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26" | |
2620 | - }, | |
2621 | - "dist": { | |
2622 | - "type": "zip", | |
2623 | - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/d4ca2fb70344987502567bc50081c03e6192fb26", | |
2624 | - "reference": "d4ca2fb70344987502567bc50081c03e6192fb26", | |
2625 | - "shasum": "" | |
2626 | - }, | |
2627 | - "require": { | |
2628 | - "php": ">=5.6", | |
2629 | - "sebastian/recursion-context": "~1.0" | |
2630 | - }, | |
2631 | - "require-dev": { | |
2632 | - "phpunit/phpunit": "~5" | |
2633 | - }, | |
2634 | - "type": "library", | |
2635 | - "extra": { | |
2636 | - "branch-alias": { | |
2637 | - "dev-master": "1.0.x-dev" | |
2638 | - } | |
2639 | - }, | |
2640 | - "autoload": { | |
2641 | - "classmap": [ | |
2642 | - "src/" | |
2643 | - ] | |
2644 | - }, | |
2645 | - "notification-url": "https://packagist.org/downloads/", | |
2646 | - "license": [ | |
2647 | - "BSD-3-Clause" | |
2648 | - ], | |
2649 | - "authors": [ | |
2650 | - { | |
2651 | - "name": "Sebastian Bergmann", | |
2652 | - "email": "sebastian@phpunit.de" | |
2653 | - } | |
2654 | - ], | |
2655 | - "description": "Traverses array structures and object graphs to enumerate all referenced objects", | |
2656 | - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", | |
2657 | - "time": "2016-01-28 13:25:10" | |
2658 | - }, | |
2659 | - { | |
2660 | 2522 | "name": "sebastian/recursion-context", |
2661 | 2523 | "version": "dev-master", |
2662 | 2524 | "source": { |
... | ... | @@ -2710,70 +2572,20 @@ |
2710 | 2572 | "time": "2016-01-28 05:39:29" |
2711 | 2573 | }, |
2712 | 2574 | { |
2713 | - "name": "sebastian/resource-operations", | |
2714 | - "version": "dev-master", | |
2715 | - "source": { | |
2716 | - "type": "git", | |
2717 | - "url": "https://github.com/sebastianbergmann/resource-operations.git", | |
2718 | - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" | |
2719 | - }, | |
2720 | - "dist": { | |
2721 | - "type": "zip", | |
2722 | - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", | |
2723 | - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", | |
2724 | - "shasum": "" | |
2725 | - }, | |
2726 | - "require": { | |
2727 | - "php": ">=5.6.0" | |
2728 | - }, | |
2729 | - "type": "library", | |
2730 | - "extra": { | |
2731 | - "branch-alias": { | |
2732 | - "dev-master": "1.0.x-dev" | |
2733 | - } | |
2734 | - }, | |
2735 | - "autoload": { | |
2736 | - "classmap": [ | |
2737 | - "src/" | |
2738 | - ] | |
2739 | - }, | |
2740 | - "notification-url": "https://packagist.org/downloads/", | |
2741 | - "license": [ | |
2742 | - "BSD-3-Clause" | |
2743 | - ], | |
2744 | - "authors": [ | |
2745 | - { | |
2746 | - "name": "Sebastian Bergmann", | |
2747 | - "email": "sebastian@phpunit.de" | |
2748 | - } | |
2749 | - ], | |
2750 | - "description": "Provides a list of PHP built-in functions that operate on resources", | |
2751 | - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", | |
2752 | - "time": "2015-07-28 20:34:47" | |
2753 | - }, | |
2754 | - { | |
2755 | 2575 | "name": "sebastian/version", |
2756 | - "version": "dev-master", | |
2576 | + "version": "1.0.6", | |
2757 | 2577 | "source": { |
2758 | 2578 | "type": "git", |
2759 | 2579 | "url": "https://github.com/sebastianbergmann/version.git", |
2760 | - "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" | |
2580 | + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" | |
2761 | 2581 | }, |
2762 | 2582 | "dist": { |
2763 | 2583 | "type": "zip", |
2764 | - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", | |
2765 | - "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", | |
2584 | + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", | |
2585 | + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", | |
2766 | 2586 | "shasum": "" |
2767 | 2587 | }, |
2768 | - "require": { | |
2769 | - "php": ">=5.6" | |
2770 | - }, | |
2771 | 2588 | "type": "library", |
2772 | - "extra": { | |
2773 | - "branch-alias": { | |
2774 | - "dev-master": "2.0.x-dev" | |
2775 | - } | |
2776 | - }, | |
2777 | 2589 | "autoload": { |
2778 | 2590 | "classmap": [ |
2779 | 2591 | "src/" |
... | ... | @@ -2792,7 +2604,7 @@ |
2792 | 2604 | ], |
2793 | 2605 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", |
2794 | 2606 | "homepage": "https://github.com/sebastianbergmann/version", |
2795 | - "time": "2016-02-04 12:56:52" | |
2607 | + "time": "2015-06-21 13:59:46" | |
2796 | 2608 | }, |
2797 | 2609 | { |
2798 | 2610 | "name": "swiftmailer/swiftmailer", |
... | ... | @@ -3296,12 +3108,12 @@ |
3296 | 3108 | "source": { |
3297 | 3109 | "type": "git", |
3298 | 3110 | "url": "https://github.com/yiisoft/yii2-framework.git", |
3299 | - "reference": "10db2b4a2c361fc0e5824640f48781d24e304358" | |
3111 | + "reference": "a1bd20682516fa5a6f2f0518f15197cf6437998a" | |
3300 | 3112 | }, |
3301 | 3113 | "dist": { |
3302 | 3114 | "type": "zip", |
3303 | - "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/10db2b4a2c361fc0e5824640f48781d24e304358", | |
3304 | - "reference": "10db2b4a2c361fc0e5824640f48781d24e304358", | |
3115 | + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/a1bd20682516fa5a6f2f0518f15197cf6437998a", | |
3116 | + "reference": "a1bd20682516fa5a6f2f0518f15197cf6437998a", | |
3305 | 3117 | "shasum": "" |
3306 | 3118 | }, |
3307 | 3119 | "require": { |
... | ... | @@ -3382,7 +3194,7 @@ |
3382 | 3194 | "framework", |
3383 | 3195 | "yii2" |
3384 | 3196 | ], |
3385 | - "time": "2016-04-21 20:58:36" | |
3197 | + "time": "2016-04-28 01:02:17" | |
3386 | 3198 | }, |
3387 | 3199 | { |
3388 | 3200 | "name": "yiisoft/yii2-bootstrap", |
... | ... | @@ -3709,12 +3521,12 @@ |
3709 | 3521 | "source": { |
3710 | 3522 | "type": "git", |
3711 | 3523 | "url": "https://github.com/fzaninotto/Faker.git", |
3712 | - "reference": "1c33e894fbbad6cf65bd42871719cd33227ed6a7" | |
3524 | + "reference": "6abfc0cec5648e6ccc6a8053533383ecaf4dbdb4" | |
3713 | 3525 | }, |
3714 | 3526 | "dist": { |
3715 | 3527 | "type": "zip", |
3716 | - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/1c33e894fbbad6cf65bd42871719cd33227ed6a7", | |
3717 | - "reference": "1c33e894fbbad6cf65bd42871719cd33227ed6a7", | |
3528 | + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/6abfc0cec5648e6ccc6a8053533383ecaf4dbdb4", | |
3529 | + "reference": "6abfc0cec5648e6ccc6a8053533383ecaf4dbdb4", | |
3718 | 3530 | "shasum": "" |
3719 | 3531 | }, |
3720 | 3532 | "require": { |
... | ... | @@ -3751,7 +3563,7 @@ |
3751 | 3563 | "faker", |
3752 | 3564 | "fixtures" |
3753 | 3565 | ], |
3754 | - "time": "2016-04-13 06:45:05" | |
3566 | + "time": "2016-04-28 06:53:57" | |
3755 | 3567 | }, |
3756 | 3568 | { |
3757 | 3569 | "name": "phpspec/php-diff", | ... | ... |
frontend/views/performer/_portfolio_list_view.php
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | <div class="portfolio-project-blocks-wr"> |
14 | 14 | <div class="portfolio-project-blocks-img-title"> |
15 | 15 | <div class="portfolio-project-blocks-img"> |
16 | - <?= Html::a(Html::img($model->cover), Url::toRoute([ | |
16 | + <?= Html::a(Html::img($model->minImg($model->cover,'210','150')), Url::toRoute([ | |
17 | 17 | 'performer/portfolio-view', |
18 | 18 | 'performer_id' => $model->user_id, |
19 | 19 | 'portfolio_id' => $model->portfolio_id, | ... | ... |
frontend/views/performer/portfolio-view.php
... | ... | @@ -21,11 +21,9 @@ |
21 | 21 | <div class="portfolio-new-page-wrapper style"> |
22 | 22 | <div class="new-portfolio-bg style "> |
23 | 23 | <?php |
24 | - /** | |
25 | - * @todo Спросить Виталика почему фотки не отображаются нормально | |
26 | - */ | |
27 | - // echo Html::img($portfolio->minImg($portfolio->cover, '720', '280')) | |
28 | - echo Html::img($portfolio->cover); | |
24 | + | |
25 | + echo Html::img($portfolio->minImg($portfolio->cover, '720', '280')) | |
26 | + | |
29 | 27 | ?> |
30 | 28 | </div> |
31 | 29 | <div class="new-portfolio-icons-rating-wr style"> | ... | ... |
frontend/views/search/_customer_list_view.php
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | ?> |
31 | 31 | </div> |
32 | 32 | <div class="search_perform-stars-wr"> |
33 | - <div> | |
33 | + | |
34 | 34 | <?php |
35 | 35 | if($rating = $model->userInfo->rating) { |
36 | 36 | echo StarRating::widget([ |
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | ]); |
53 | 53 | } |
54 | 54 | ?> |
55 | - </div> | |
55 | + | |
56 | 56 | <div class="search_perform-stars-txt"> |
57 | 57 | <?= count($model->comments) ?> отзывов |
58 | 58 | <?php | ... | ... |
frontend/views/tender/view.php
... | ... | @@ -307,7 +307,43 @@ |
307 | 307 | ], |
308 | 308 | 'success_options' => [ |
309 | 309 | 'tag' => 'div', |
310 | - 'content' => 'Вопрос успешно создан и появится как только будет получен ответ', | |
310 | +// 'content' => 'Вопрос успешно создан и появится как только будет получен ответ', | |
311 | + 'content' => function(){ | |
312 | + return "<script> | |
313 | + addRemoveBlocks() | |
314 | + function addRemoveBlocks() | |
315 | + { | |
316 | + $('#overlay, .succses_comm').remove(); | |
317 | + $('body').append('<div id=\"overlay\" style=\"top:0; left:0;\"></div>').append('<div class=\"succses_comm\"><div class=\"closed-form\"></div><div class=\"succses_comm-txt\">Вопрос успешно создан и появится как только будет получен ответ</div></div>'); | |
318 | + $('#overlay').fadeIn( | |
319 | + 400, function() | |
320 | + { | |
321 | + $('.succses_comm').css({display : 'block'}).animate({opacity : 1, top : '50%'}, 200); | |
322 | + } | |
323 | + ); | |
324 | + function closeSuccsescomm() { | |
325 | + $('.succses_comm') | |
326 | + .animate( | |
327 | + {opacity : 0, top : '30%'}, 200, function() | |
328 | + { | |
329 | + $(this).css('display', 'none') | |
330 | + $('#overlay').fadeOut( | |
331 | + 400, function() | |
332 | + { | |
333 | + $('#overlay, .succses_comm').remove() | |
334 | + } | |
335 | + ) | |
336 | + } | |
337 | + ) | |
338 | + } | |
339 | + $('body').on('click', '.closed-form, #overlay', function() { | |
340 | + closeSuccsescomm() | |
341 | + } | |
342 | + ); | |
343 | + setTimeout(closeSuccsescomm, 4000) | |
344 | + } | |
345 | + </script>"; | |
346 | + }, | |
311 | 347 | 'class' => 'test-class-success', |
312 | 348 | ], |
313 | 349 | 'list_options' => [ |
... | ... | @@ -339,6 +375,7 @@ |
339 | 375 | tabs_(); |
340 | 376 | inputNumber(); |
341 | 377 | tenderMark(); |
378 | + | |
342 | 379 | function inputNumber() |
343 | 380 | { |
344 | 381 | $("#commentproject-budget_from, #commentproject-budget_to, #commentproject-term_from, #commentproject-term_to") |
... | ... | @@ -404,6 +441,18 @@ |
404 | 441 | } |
405 | 442 | } |
406 | 443 | ) |
444 | +// submitForm(); | |
445 | + function submitForm() { | |
446 | + $('.input-blocks-comm-button button').click(function () { | |
447 | + setInterval(function () { | |
448 | + var length = ($('.test-class-success').length) | |
449 | + if(length>0){ | |
450 | + console.log('has') | |
451 | + } | |
452 | + },100) | |
453 | + | |
454 | + }) | |
455 | + } | |
407 | 456 | |
408 | 457 | } |
409 | 458 | ... | ... |
frontend/web/css/style.css
... | ... | @@ -6760,6 +6760,13 @@ input[disabled], select[disabled] { |
6760 | 6760 | width: 480px;float: left; |
6761 | 6761 | } |
6762 | 6762 | .search_perform_title {line-height: 15px} |
6763 | +.search_perform_title a { | |
6764 | + text-decoration: none; | |
6765 | + color: inherit; | |
6766 | +} | |
6767 | +.search_perform_title a:hover { | |
6768 | + text-decoration: underline; | |
6769 | +} | |
6763 | 6770 | .search_perform_title, .search_perform_leng { |
6764 | 6771 | font-size: 18px; |
6765 | 6772 | } |
... | ... | @@ -6772,7 +6779,7 @@ input[disabled], select[disabled] { |
6772 | 6779 | .search_perform_visit, .search_perform_projets_nam a { |
6773 | 6780 | font-size: 13px; |
6774 | 6781 | } |
6775 | -.search_perform_visit span, .search_perform_projets_nam a {font-weight: 700} | |
6782 | +.search_perform_visit span {font-weight: 700} | |
6776 | 6783 | .search_perform-stars-txt {line-height: 34px; float: left; margin-left: 10px} |
6777 | 6784 | .search_perform_projets_nam {margin-top: 15px;} |
6778 | 6785 | .rating_search_performer {float: left} |
... | ... | @@ -8139,4 +8146,34 @@ li.active-menu-admin:hover a .ico_num { |
8139 | 8146 | text-align: right; |
8140 | 8147 | width: 180px; |
8141 | 8148 | } |
8142 | -.left-search-work .select-after {display: none} | |
8143 | 8149 | \ No newline at end of file |
8150 | +.left-search-work .select-after {display: none} | |
8151 | +.search_perform-stars-wr .rating-container { | |
8152 | + width: 90px; | |
8153 | + float: left; | |
8154 | + height: 34px; | |
8155 | + box-sizing: border-box; | |
8156 | + padding-top: 8px; | |
8157 | +} | |
8158 | +.succses_comm { | |
8159 | + position: fixed; | |
8160 | + width: 460px; | |
8161 | + height: 177px; | |
8162 | + background: #fff; | |
8163 | + border-radius: 4px; | |
8164 | + z-index: 9992; | |
8165 | + top: -177px; | |
8166 | + left: 50%; | |
8167 | + margin-left: -230px; | |
8168 | + margin-top: -88px; | |
8169 | + box-shadow: 0px 0px 5px 0px rgba(149, 149, 149, 0.75); | |
8170 | +} | |
8171 | +.succses_comm-txt { | |
8172 | + font-size: 18px; | |
8173 | + color: #494949; | |
8174 | + display: table-cell; | |
8175 | + vertical-align: middle; | |
8176 | + text-align: center; | |
8177 | + width: 460px; | |
8178 | + height: 177px; | |
8179 | + padding: 0 70px; | |
8180 | +} | |
8144 | 8181 | \ No newline at end of file | ... | ... |