mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/IZYIM-Prototype.git
synced 2026-08-21 05:33:57 +00:00
Importer chat download example
This commit is contained in:
+8
-2
@@ -923,6 +923,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<a id="download" href="" download hidden></a>
|
||||
<!-- END CONTENT -->
|
||||
<!-- BEGIN QUICK SIDEBAR -->
|
||||
<a href="javascript:;" class="page-quick-sidebar-toggler">
|
||||
@@ -1136,7 +1137,7 @@
|
||||
}
|
||||
return returnElements;
|
||||
}
|
||||
$('[data-toggle="popover"]').popover({trigger: 'focus'})
|
||||
$('[data-toggle="popover"]').popover({trigger: 'focus'})
|
||||
|
||||
</script>
|
||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js" integrity="sha384-Plbmg8JY28KFelvJVai01l8WyZzrYWG825m+cZ0eDDS1f7d/js6ikvy1+X+guPIB" crossorigin="anonymous"></script>
|
||||
@@ -1146,6 +1147,7 @@
|
||||
$(document).ready(function ($) {
|
||||
// delegate calls to data-toggle="lightbox"
|
||||
$(document).on('click', '[data-toggle="lightbox"]:not([data-gallery="navigateTo"]):not([data-gallery="example-gallery-11"])', function(event) {
|
||||
|
||||
event.preventDefault();
|
||||
return $(this).ekkoLightbox({
|
||||
onShown: function() {
|
||||
@@ -1160,7 +1162,11 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '.fa-download', function(event) {
|
||||
var url = $( ".ekko-lightbox-item.show" ).children("img").attr('src');
|
||||
$("a#download").attr("href", url);
|
||||
document.getElementById('download').click();
|
||||
});
|
||||
// disable wrapping
|
||||
$(document).on('click', '[data-toggle="lightbox"][data-gallery="example-gallery-11"]', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
+3
-3
@@ -89,7 +89,7 @@ var Lightbox = (function ($) {
|
||||
this._wantedWidth = 0;
|
||||
this._wantedHeight = 0;
|
||||
this._touchstartX = 0;
|
||||
this._touchendX = 0;
|
||||
this._touchendX = 0;
|
||||
|
||||
this._modalId = 'ekkoLightbox-' + Math.floor(Math.random() * 1000 + 1);
|
||||
this._$element = $element instanceof jQuery ? $element : $($element);
|
||||
@@ -100,7 +100,7 @@ var Lightbox = (function ($) {
|
||||
var btn = '<button type="button" class="close" data-dismiss="modal" aria-label="' + this._config.strings.close + '"><span aria-hidden="true">×</span></button>';
|
||||
|
||||
var header = '<div class="modal-header' + (this._config.title || this._config.alwaysShowClose ? '' : ' hide') + '">' + (this._isBootstrap3 ? btn + h4 : h4 + btn) + '</div>';
|
||||
var footer = '<div class="modal-footer' + (this._config.footer ? '' : ' hide') + '">' + (this._config.footer || " ") + '</div>';
|
||||
var footer = '<div class="modal-footer"><center><i class="fa fa-download" aria-hidden="true"></i></center></div>';
|
||||
var body = '<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show"></div><div class="ekko-lightbox-item fade"></div></div></div>';
|
||||
var dialog = '<div class="modal-dialog" role="document"><div class="modal-content">' + header + body + footer + '</div></div>';
|
||||
$(this._config.doc.body).append('<div id="' + this._modalId + '" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">' + dialog + '</div>');
|
||||
@@ -401,7 +401,7 @@ var Lightbox = (function ($) {
|
||||
if (caption) {
|
||||
this._footerIsShown = true;
|
||||
this._$modalFooter.css('display', '').html(caption);
|
||||
} else this._$modalFooter.css('display', 'none');
|
||||
} else this._$modalFooter.css('display', '');
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user