From b20e4b532deba3bfa68edd236a3f376d2efaf67a Mon Sep 17 00:00:00 2001 From: icemate Date: Wed, 10 Feb 2016 13:53:23 +0200 Subject: [PATCH] tokar commit --- common/widgets/views/image_sizer.php | 3 +++ frontend/views/accounts/_blog_form.php | 39 ++++++++++++++++++++++++++++++--------- frontend/views/accounts/_portfolio_form.php | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------- frontend/web/css/style.css | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 188 insertions(+), 39 deletions(-) diff --git a/common/widgets/views/image_sizer.php b/common/widgets/views/image_sizer.php index 6c0f63f..6d3ed26 100755 --- a/common/widgets/views/image_sizer.php +++ b/common/widgets/views/image_sizer.php @@ -53,6 +53,7 @@ $id = $model::tableName().'_id'; var block = $("#_img_block .admin-avatar-pattern"); block.find('img').remove(); block.append(img); + block.parents('.file-uploader-block').parent().addClass('success_download'); $("#_picture_link").val(data.result.link); $("#_new_img").val(data.result.link); } @@ -70,6 +71,8 @@ $id = $model::tableName().'_id'; }); $('body').on('click', '#_remove_img',function(){ + $("#_img_block").parent().parent().parent().removeClass('success_download') + $("#_buttons_block").remove(); var old_url = $('#_old_img').val(); var new_url = $('#_new_img').val(); diff --git a/frontend/views/accounts/_blog_form.php b/frontend/views/accounts/_blog_form.php index 57bda75..157d6c8 100644 --- a/frontend/views/accounts/_blog_form.php +++ b/frontend/views/accounts/_blog_form.php @@ -8,24 +8,40 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; - $this->title = 'Мой профиль'; + $this->title = 'Блог'; $this->params[ 'breadcrumbs' ][] = $this->title; ?> -

title ?>

+
title ?>
-date_add ?> +
+ date_add)? "Дата создания: $blog->date_add" :""?> +
+
+
+
+ field($blog, 'name') + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> +
+
+
+
+ field($blog, 'link') + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> +
+
-field($blog, 'name') - ->textInput() ?> +
+
+ field($blog, 'description')->widget(CKEditor::className()) ?> +
+
-field($blog, 'link') - ->textInput() ?> +
-field($blog, 'description')->widget(CKEditor::className()) ?> */ ?> +
+
+ 'input-blocks-wrapper button']) ?> + ' remove input-blocks-wrapper button']) ?> +
+
- end(); diff --git a/frontend/views/accounts/_portfolio_form.php b/frontend/views/accounts/_portfolio_form.php index f2b1281..ed2f602 100644 --- a/frontend/views/accounts/_portfolio_form.php +++ b/frontend/views/accounts/_portfolio_form.php @@ -9,50 +9,117 @@ use yii\helpers\Html; use yii\widgets\ActiveForm; use \common\widgets\MultiLangForm; +use kartik\select2\Select2; +use yii\web\JsExpression; - $this->title = 'Мой профиль'; + $this->title = 'Портфолио'; $this->params[ 'breadcrumbs' ][] = $this->title; ?> -

title ?>

+
title ?>
+
+ date_add) ? "Дата создания: $portfolio->date_add" :""?> -field($portfolio, 'date_add') - ->textInput([ 'disabled' => 'disabled' ]) ?> - -field($portfolio, 'name') - ->textInput() ?> +
+
-field($portfolio, 'link') - ->textInput() ?> +
+
+ field($portfolio, 'name') + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> +
+
-field($portfolio, 'specializationInput') - ->checkboxList($specialization) ?> +
+
+ field($portfolio, 'link') + ->textInput (['class'=> 'custom-input-2 fix-input-2']); ?> +
+
- $portfolio, - 'field'=>'cover', - 'width'=>100, - 'height'=>100, - 'multi'=>false, - 'gallery' =>$portfolio->cover, - 'name' => 'Загрузить главное фото' -]); -?> -
- Адрес: - field($portfolio, 'city', ['template' => "{input}{label}{hint}{error}"])->textInput() ?> - field($portfolio, 'street', ['template' => "{input}{label}{hint}{error}"])->textInput() ?> - field($portfolio, 'house', ['template' => "{input}{label}{hint}{error}"])->textInput() ?> +
+ field($portfolio, 'specializationInput') + ->checkboxList($specialization) ?>
-field($portfolio, 'description')->widget(CKEditor::className()) ?> - +
+
Фото главное
+
Файл не выбран
+ $portfolio, + 'field'=>'cover', + 'width'=>100, + 'height'=>100, + 'multi'=>false, + 'gallery' =>$portfolio->cover, + 'name' => 'Загрузить' + ]); + ?> +
До 3 Мб файл
+
+ + + + +
+
+ field($portfolio, 'city')->widget(Select2::classname(), [ + 'options' => ['placeholder' => 'Выбор города ...'], + 'pluginOptions' => [ + 'allowClear' => true, + 'minimumInputLength' => 3, + 'ajax' => [ + 'url' => \yii\helpers\Url::to(['site/city']), + 'dataType' => 'json', + 'data' => new JsExpression('function(params) { return {q:params.term}; }') + ], + 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), + 'templateResult' => new JsExpression('function(city) { return city.text; }'), + 'templateSelection' => new JsExpression('function (city) { return city.text; }'), + ], + ]); + ?> + +
+ +
+ field ($portfolio, 'street', ['options' => ['class' => 'form-group company_info']]) + ->label ('Улица') + ->textInput (['class'=> 'custom-input-2']); + ?> +
+ +
+ field ($portfolio, 'house', ['options' => ['class' => 'form-group company_info']]) + ->label ('Дом') + ->textInput (['class'=> 'custom-input-2']); + ?> +
+
+ + + +
+
+ field($portfolio, 'description')->widget(CKEditor::className()) ?> +
+
+ +
+ +
+
+ 'input-blocks-wrapper button']) ?> + ' remove input-blocks-wrapper button']) ?> +
+
end(); ?> diff --git a/frontend/web/css/style.css b/frontend/web/css/style.css index 914f6b6..322d4c2 100755 --- a/frontend/web/css/style.css +++ b/frontend/web/css/style.css @@ -4544,6 +4544,8 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m .input-blocks-wrapper { width: 100%;float: left;margin-top: 11px; position: relative; } +.input-blocks-wrapper.full-blocks {} +.input-blocks-wrapper.full-blocks .input-blocks{width: 100%} .input-blocks-wrapper:first-child{margin-top: 0} .input-blocks { width: 300px; @@ -4562,7 +4564,7 @@ ul.download-list-files li:hover .download-link {transition: 0.2s; opacity: 1; -m padding-left: 8px; margin-top: 5px; } - +.custom-input-2.fix-input-2 {width: 100%} .custom-input-2:focus, .selectize-input input:focus {box-shadow: 1px 2px 2px 0px rgba(215, 215, 215, 0.75) inset; transition: 0.1s} .input-blocks label { @@ -4922,6 +4924,11 @@ input.disabled.admin-check:checked + label, input.disabled.admin-check:checked + padding: 15px 0; display: none; } +.input-blocks-wrapper.full-blocks .help-block{ + margin: 25px auto 0 auto; + width: 430px; +} + .input-blocks-wrapper.captcha-wr .help-block {float: left} .has-error .help-block {display: block ;color: inherit} .help-block:before { @@ -5355,4 +5362,55 @@ ul.menu-admin li.logout-li, ul.menu-admin li.logout-li a, ul.menu-admin li:last- .header-cabinet-profile.not-login > div {width: 116px; float: right} .admin-avatar .file-uploader-block {width: 180px; float: left} .admin-pattern.admin-avatar .file-uploader-block {width: 100%} -.file-help-1 {width: 520px; float: right;height: 130px} \ No newline at end of file +.file-help-1 {width: 520px; float: right;height: 130px} +.admin-editor-bl label{ + margin-bottom: 5px; +} +.admin-editor-bl .cke_top { + background-image: none; + background: #dcdcdc !important; + padding-top: 9px; +} +.admin-editor-bl .cke_bottom { + background-image: none; + background: #dcdcdc !important; +} +.remove.input-blocks-wrapper button {margin-left: 10px} +.data-block {font-size: 13px; color: #b7b7b7; text-align: right} +.hidden-foto .file-uploader-block, .hidden-foto .tst, .hidden-foto .admin-avatar-pattern-wr {width: 100%} +.hidden-foto .tst {height: auto} +.hidden-foto .admin-avatar-pattern {width: 100%; height: auto; background: none} +.hidden-foto .tst .admin-ava-wr{display: none} + +.not-file-txt-adm { + width: 100px; + float: left; + height: 29px; + line-height: 29px; + font-size: 13px; + overflow: hidden; + white-space: nowrap; +} + +.foto-portfolio-adm {position: relative} +.foto-portfolio-adm .file-uploader-block { + width: 620px; + height: 29px; +} +.foto-portfolio-adm .btn {margin-top: 0; margin-left: 8px} +.foto-portfolio-adm .tst { + float: right; + width: 452px; + height: 29px; +} +.not-file-mb-adm { + font-size: 13px; + color: #b7b7b7; + float: left; + height: 29px; + line-height: 29px; + position: absolute; + top: 25px; + left: 288px; +} +.success_download .not-file-mb-adm{display: none} \ No newline at end of file -- libgit2 0.21.4