diff --git a/backend/web/js/fieldWidget.js b/backend/web/js/fieldWidget.js index b673819..6423bdf 100755 --- a/backend/web/js/fieldWidget.js +++ b/backend/web/js/fieldWidget.js @@ -1,16 +1,19 @@ -$('body').on('click', '.delete-field-item', function(){ +$(document).ready(function(){ + $('body').on('click', '.delete-field-item', function(){ - $(this).parent('.form-group').remove(); + $(this).parent('.form-group').remove(); -}); + }); -$('.add_field').click(function(){ - var block = $('.fields_video_result'); - var sub_block = '
'+ - ''+ - ''+ - '
'; - block.append(sub_block); + $('.add_field').click(function(){ + var block = $('.fields_video_result'); + var sub_block = '
'+ + ''+ + ''+ + '
'; + block.append(sub_block); + + }); }); \ No newline at end of file diff --git a/common/config/main-local.php b/common/config/main-local.php index 45eebcf..f47e800 100755 --- a/common/config/main-local.php +++ b/common/config/main-local.php @@ -3,9 +3,9 @@ return [ 'components' => [ 'db' => [ 'class' => 'yii\db\Connection', - 'dsn' => 'pgsql:host=localhost;port=5432;dbname=mfp_local', - 'username' => 'postgres', - 'password' => '', + 'dsn' => 'pgsql:host=195.248.225.149;port=5432;dbname=mfp', + 'username' => 'test33', + 'password' => 'E4q2N7i9', 'schemaMap' => [ 'pgsql'=> [ 'class'=>'yii\db\pgsql\Schema', diff --git a/frontend/web/js/fieldWidget.js b/frontend/web/js/fieldWidget.js index b673819..b10e495 100755 --- a/frontend/web/js/fieldWidget.js +++ b/frontend/web/js/fieldWidget.js @@ -1,16 +1,18 @@ -$('body').on('click', '.delete-field-item', function(){ +$(document).ready(function(){ + $('body').on('click', '.delete-field-item', function(){ + console.log('sfddf'); + $(this).parent('.form-group').remove(); - $(this).parent('.form-group').remove(); - -}); + }); -$('.add_field').click(function(){ - var block = $('.fields_video_result'); - var sub_block = '
'+ - ''+ - ''+ - '
'; - block.append(sub_block); + $('.add_field').click(function(){ + var block = $('.fields_video_result'); + var sub_block = '
'+ + ''+ + ''+ + '
'; + block.append(sub_block); -}); \ No newline at end of file + }); +}); -- libgit2 0.21.4