Skip to content

Commit

Permalink
Merge pull request #181 from roman3x/patch-16
Browse files Browse the repository at this point in the history
Tlacitko pre skopirovanie adresy bydliska do adresy kde poslat
  • Loading branch information
scholtz committed Feb 12, 2016
2 parents 27a923e + 914bc99 commit a9984f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ <h3 class="as-title-with-padding digitalRed">
<h3 id="foreign-header" class="as-title-with-padding digitalRed preukaz-tp">
Adresa pre odoslanie hlasovacieho preukazu
</h3>
<div class="preukaz-tp">
Pre skopírovanie adresy trvalého pobytu <button id="copyadress" class="btn btn-default btn-xs">kliknite tu</button>.
</div>
<h3 id="foreign-header" class="as-title-with-padding digitalRed nemam-tp posta-tp">
Adresa miesta pobytu v cudzine
</h3>
Expand Down
9 changes: 8 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,14 @@ $(document).ready(function ()
$("html, body").animate({ scrollTop: $(document).height() }, 1000);
});
$(".help").hide();


$("#copyadress").on("click",function(){
if ($('#addressslovakia-street').val()) $('#addressforeign-street').val($('#addressslovakia-street').val());
if ($('#addressslovakia-streetno').val()) $('#addressforeign-streetno').val($('#addressslovakia-streetno').val());
if ($('#addressslovakia-city').val()) $('#addressforeign-city').val($('#select2-addressslovakia-city-container').html());
if ($('#addressslovakia-zip').val()) $('#addressforeign-zip').val($('#addressslovakia-zip').val());
$("html, body").animate({ scrollTop: $(document).height() }, 100);
});

var clipboard = new Clipboard('.copy-btn');
clipboard.on('success', function(e) {
Expand Down

0 comments on commit a9984f5

Please sign in to comment.