Commit 65bb818949c040072928817cece4ccc614690002
Merge remote-tracking branch 'origin/master'
Showing
6 changed files
with
40 additions
and
15 deletions
Show diff stats
backend/assets/AppAsset.php
backend/web/js/fieldWidget.js
1 | -$('body').on('click', '.delete-field-item', function(){ | |
1 | +$(document).ready(function(){ | |
2 | + $('body').on('click', '.delete-field-item', function(){ | |
2 | 3 | |
3 | - $(this).parent('.form-group').remove(); | |
4 | + $(this).parent('.form-group').remove(); | |
4 | 5 | |
5 | -}); | |
6 | + }); | |
6 | 7 | |
7 | 8 | |
8 | -$('.add_field').click(function(){ | |
9 | - var block = $('.fields_video_result'); | |
10 | - var sub_block = '<div class="form-group">'+ | |
11 | - '<input type="text" class="form-control" value="" name="Fields[video]['+ start_i++ +'][value]">'+ | |
12 | - '<span data-id="none" title="удалить" class="glyphicon glyphicon-trash delete-field-item"></span>'+ | |
13 | - '<div>'; | |
14 | - block.append(sub_block); | |
15 | 9 | |
10 | + $('.add_field').click(function(){ | |
11 | + var block = $('.fields_video_result'); | |
12 | + var sub_block = '<div class="form-group">'+ | |
13 | + '<input type="text" class="form-control" value="" name="Fields[video]['+ start_i++ +'][value]">'+ | |
14 | + '<span data-id="none" title="удалить" class="glyphicon glyphicon-trash delete-field-item"></span>'+ | |
15 | + '<div>'; | |
16 | + block.append(sub_block); | |
17 | + | |
18 | + }); | |
16 | 19 | }); |
17 | 20 | \ No newline at end of file | ... | ... |
common/config/main-local.php
... | ... | @@ -3,9 +3,9 @@ return [ |
3 | 3 | 'components' => [ |
4 | 4 | 'db' => [ |
5 | 5 | 'class' => 'yii\db\Connection', |
6 | - 'dsn' => 'pgsql:host=localhost;port=5432;dbname=mfp_local', | |
7 | - 'username' => 'postgres', | |
8 | - 'password' => '', | |
6 | + 'dsn' => 'pgsql:host=195.248.225.149;port=5432;dbname=mfp', | |
7 | + 'username' => 'test33', | |
8 | + 'password' => 'E4q2N7i9', | |
9 | 9 | 'schemaMap' => [ |
10 | 10 | 'pgsql'=> [ |
11 | 11 | 'class'=>'yii\db\pgsql\Schema', | ... | ... |
common/widgets/views/education_field.php
frontend/assets/AppAsset.php
1 | +$(document).ready(function(){ | |
2 | + $('body').on('click', '.delete-field-item', function(){ | |
3 | + console.log('sfddf'); | |
4 | + $(this).parent('.form-group').remove(); | |
5 | + | |
6 | + }); | |
7 | + | |
8 | + | |
9 | + $('.add_field').click(function(){ | |
10 | + var block = $('.fields_video_result'); | |
11 | + var sub_block = '<div class="form-group">'+ | |
12 | + '<input type="text" class="form-control" value="" name="Fields[video]['+ start_i++ +'][value]">'+ | |
13 | + '<span data-id="none" title="удалить" class="glyphicon glyphicon-trash delete-field-item"></span>'+ | |
14 | + '<div>'; | |
15 | + block.append(sub_block); | |
16 | + | |
17 | + }); | |
18 | +}); | ... | ... |