mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Added Boostrap Password Reveal Library and clipboardJS library added copy to clipboard to client logins
This commit is contained in:
45
js/app.js
45
js/app.js
@@ -3,12 +3,12 @@ if(window.history.replaceState){
|
||||
window.history.replaceState(null, null, window.location.href);
|
||||
}
|
||||
|
||||
//Slide alert up after 2 secs
|
||||
// Slide alert up after 2 secs
|
||||
$("#alert").fadeTo(2000, 500).slideUp(500, function(){
|
||||
$("#alert").slideUp(500);
|
||||
});
|
||||
|
||||
//Initialize Select2 Elements
|
||||
// Initialize Select2 Elements
|
||||
$('.select2').select2({
|
||||
theme: 'bootstrap4'
|
||||
});
|
||||
@@ -18,9 +18,46 @@ $('.summernote').summernote({
|
||||
height: 300
|
||||
});
|
||||
|
||||
//DateTime
|
||||
// DateTime
|
||||
$('.datetimepicker').datetimepicker({
|
||||
});
|
||||
|
||||
//Data Input Mask
|
||||
// Data Input Mask
|
||||
$('[data-mask]').inputmask();
|
||||
|
||||
// Tooltip ClipboardJS
|
||||
|
||||
$('.clipboardjs').tooltip({
|
||||
trigger: 'click',
|
||||
placement: 'bottom'
|
||||
});
|
||||
|
||||
function setTooltip(message) {
|
||||
$('.clipboardjs').tooltip('hide')
|
||||
.attr('data-original-title', message)
|
||||
.tooltip('show');
|
||||
}
|
||||
|
||||
function hideTooltip() {
|
||||
setTimeout(function() {
|
||||
$('.clipboardjs').tooltip('hide');
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
// ClipboardJS
|
||||
|
||||
//Fix to allow Clipboard Copying within Bootstrap Modals
|
||||
//For use in Bootstrap Modals or with any other library that changes the focus you'll want to set the focused element as the container value.
|
||||
$.fn.modal.Constructor.prototype._enforceFocus = function() {};
|
||||
|
||||
var clipboard = new ClipboardJS('.clipboardjs');
|
||||
|
||||
clipboard.on('success', function(e) {
|
||||
setTooltip('Copied!');
|
||||
hideTooltip();
|
||||
});
|
||||
|
||||
clipboard.on('error', function(e) {
|
||||
setTooltip('Failed!');
|
||||
hideTooltip();
|
||||
});
|
||||
Reference in New Issue
Block a user