forked from LiveCarta/LiveCartaWP
93
htdocs/wp-content/themes/lawcarta/assets/js/customPopups.js
Normal file
93
htdocs/wp-content/themes/lawcarta/assets/js/customPopups.js
Normal file
@@ -0,0 +1,93 @@
|
||||
|
||||
window.customConfirm = function(msg, okCallback, cancelCallback) {
|
||||
|
||||
var confirmHtml = '<div class="modal confirm fade" id="modal-confirm" tabindex="-1" role="dialog" aria-hidden="false">' +
|
||||
'<div class="modal-dialog">' +
|
||||
'<div class="modal-body">' +
|
||||
'<div class="cont">' + msg +'</div>' +
|
||||
'</div>' +
|
||||
'<div class="modal-footer">' +
|
||||
'<div class="cont">' +
|
||||
'<a href="#" class="cancel" id="modal-confirm-cancel">CANCEL</a>' +
|
||||
'<input type="submit" value="Ok" class="button" id="modal-confirm-ok">' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
var okCallbackWrap = function(e){
|
||||
e.preventDefault();
|
||||
if (okCallback) okCallback();
|
||||
$('#modal-confirm').modal('hide');
|
||||
};
|
||||
|
||||
var cancelCallbackWrap = function(e){
|
||||
e.preventDefault();
|
||||
if (cancelCallback) cancelCallback();
|
||||
$('#modal-confirm').modal('hide');
|
||||
};
|
||||
|
||||
var removeCallback = function(){
|
||||
document.getElementById('modal-confirm-ok').removeEventListener("click", okCallbackWrap , false);
|
||||
document.getElementById('modal-confirm-cancel').removeEventListener("click", cancelCallbackWrap , false);
|
||||
};
|
||||
|
||||
document.body.insertAdjacentHTML('beforeEnd', confirmHtml);
|
||||
removeCallback();
|
||||
document.getElementById('modal-confirm-ok').addEventListener("click", okCallbackWrap , false);
|
||||
document.getElementById('modal-confirm-cancel').addEventListener("click", cancelCallbackWrap , false);
|
||||
|
||||
$('#modal-confirm').on('hidden.bs.modal', function(){
|
||||
removeCallback();
|
||||
document.body.removeChild(document.getElementById('modal-confirm'));
|
||||
});
|
||||
|
||||
$('#modal-confirm').modal();
|
||||
|
||||
};
|
||||
|
||||
window.customAlert = function(msg) {
|
||||
|
||||
var confirmHtml = '<div class="modal confirm fade" id="modal-alert" tabindex="-1" role="dialog" aria-hidden="false">' +
|
||||
'<div class="modal-dialog">' +
|
||||
'<div class="modal-body">' +
|
||||
'<div class="cont">' + msg +'</div>' +
|
||||
'</div>' +
|
||||
'<div class="modal-footer">' +
|
||||
'<div class="cont">' +
|
||||
'<input type="submit" value="Ok" class="button" data-dismiss="modal">' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
document.body.insertAdjacentHTML('beforeEnd', confirmHtml);
|
||||
|
||||
$('#modal-alert').on('hidden.bs.modal', function(){
|
||||
document.body.removeChild(document.getElementById('modal-alert'));
|
||||
});
|
||||
|
||||
$('#modal-alert').modal();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
window.customCopyLink = function(copylink) {
|
||||
|
||||
|
||||
var copyToClipboard = function(str) {
|
||||
var el = document.createElement('textarea');
|
||||
el.classList.add('can-copy');
|
||||
el.value = str;
|
||||
document.body.appendChild(el);
|
||||
el.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(el);
|
||||
$('#modal-copylink').modal('hide');
|
||||
window.customAlert('Link is copied to the clipboard');
|
||||
};
|
||||
|
||||
copyToClipboard(copylink);
|
||||
|
||||
};
|
||||
@@ -18,16 +18,7 @@
|
||||
<div class="fb-text">
|
||||
<p>With one-on-one support from our team, you can focus on writing and we'll get your book e-ready and print-ready in no time. Personalize your book settings to control how your book is used and publish new editions and revisions instantly. A fully flexible publishing solution from start to finish.</p>
|
||||
<div class="sub-input">
|
||||
<div id="mc_embed_signup">
|
||||
<form action="https://lawcarta.us12.list-manage.com/subscribe/post?u=f1055fdbaf5889ec432f2821f&id=a6bf932f34" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate="">
|
||||
<div id="mc_embed_signup_scroll">
|
||||
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Enter your Email" required="">
|
||||
|
||||
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_f1055fdbaf5889ec432f2821f_a6bf932f34" tabindex="-1" value=""></div>
|
||||
<input type="submit" value="Request a demo" name="subscribe" id="mc-embedded-subscribe" class="button mp-top-right">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php the_widget( 'SubscribeToLc_Widget', [], ['code' => 'a6bf932f34'] ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -58,15 +58,7 @@ get_header();
|
||||
<div class="sb-line2">You can unsubscribe at any time.</div>
|
||||
</div>
|
||||
<div class="sub-input">
|
||||
<div id="mc_embed_signup">
|
||||
<form action="https://lawcarta.us12.list-manage.com/subscribe/post?u=f1055fdbaf5889ec432f2821f&id=a6bf932f34" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate="">
|
||||
<div id="mc_embed_signup_scroll">
|
||||
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Enter your Email" required="">
|
||||
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_f1055fdbaf5889ec432f2821f_a6bf932f34" tabindex="-1" value=""></div>
|
||||
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button xxl mp-top-right">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php the_widget( 'SubscribeToLc_Widget', [], ['code' => 'a6bf932f34'] ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -78,15 +78,7 @@
|
||||
<div class="sb-line2">You can unsubscribe at any time.</div>
|
||||
</div>
|
||||
<div class="sub-input">
|
||||
<div id="mc_embed_signup">
|
||||
<form action="https://livecarta.us12.list-manage.com/subscribe/post?u=f1055fdbaf5889ec432f2821f&id=a0685621c3" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate="">
|
||||
<div id="mc_embed_signup_scroll">
|
||||
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Enter your Email" required="">
|
||||
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_f1055fdbaf5889ec432f2821f_a0685621c3" tabindex="-1" value=""></div>
|
||||
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button xxl mp-top-right">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php the_widget( 'SubscribeToLc_Widget', [], ['code' => 'a0685621c3'] ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
<script src="<?= get_theme_file_uri('/assets/js/promoImage.js'); ?>"></script>
|
||||
<script src="<?= get_theme_file_uri('/assets/js/sliderScript.js'); ?>"></script>
|
||||
<script src="<?= get_theme_file_uri('/assets/js/promoPopup.js'); ?>"></script>
|
||||
<script src="<?= get_theme_file_uri('/assets/js/customPopups.js'); ?>"></script>
|
||||
<?php if(0):?>
|
||||
<!-- Twitter universal website tag code -->
|
||||
<script>
|
||||
|
||||
@@ -58,16 +58,9 @@ get_header();
|
||||
<div class="sb-line2">You can unsubscribe at any time.</div>
|
||||
</div>
|
||||
<div class="sub-input">
|
||||
<div id="mc_embed_signup">
|
||||
<form action="https://lawcarta.us12.list-manage.com/subscribe/post?u=f1055fdbaf5889ec432f2821f&id=a0685621c3" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate="">
|
||||
<div id="mc_embed_signup_scroll">
|
||||
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Enter your Email" required>
|
||||
|
||||
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_f1055fdbaf5889ec432f2821f_a0685621c3" tabindex="-1" value=""></div>
|
||||
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button xxl mp-top-right">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
the_widget( 'SubscribeToLc_Widget', [], ['code' => 'a0685621c3'] );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user