Skip to content
Snippets Groups Projects
Commit f027bd18 authored by gnaegi's avatar gnaegi
Browse files

OO-1068 tests with qr code in social link

parent 4c5451e6
No related branches found
No related tags found
No related merge requests found
...@@ -914,8 +914,7 @@ function o_scrollToElement(elem) { ...@@ -914,8 +914,7 @@ function o_scrollToElement(elem) {
}, 1000); }, 1000);
} }
function o_QRCodePopup(id, text, loc) { function o_QRCodePopup(id, text, loc) {
if(typeof(loc)==='undefined') loc = 'top'; if(typeof(loc)==='undefined') loc = 'top';
jQuery('#' + id).popover({ jQuery('#' + id).popover({
placement : loc, placement : loc,
...@@ -925,14 +924,20 @@ function o_QRCodePopup(id, text, loc) { ...@@ -925,14 +924,20 @@ function o_QRCodePopup(id, text, loc) {
}).on('shown.bs.popover', function () { }).on('shown.bs.popover', function () {
o_info.qr = o_QRCode(id + '_pop', (jQuery.isFunction(text) ? text() : text)); o_info.qr = o_QRCode(id + '_pop', (jQuery.isFunction(text) ? text() : text));
}).on('hidden.bs.popover', function () { }).on('hidden.bs.popover', function () {
o_info.qr.clear(); try {
delete o_info.qr; o_info.qr.clear();
delete o_info.qr;
} catch(e) {}
}); });
} }
function o_QRCode(id, text) { function o_QRCode(id, text) {
// dynamically load qr code library // dynamically load qr code library
BLoader.loadJS(o_info.o_baseURI + "/js/jquery/qrcodejs/qrcode.min.js", 'utf8', true); try {
return new QRCode(document.getElementById(id), text); BLoader.loadJS(o_info.o_baseURI + "/js/jquery/qrcodejs/qrcode.min.js", 'utf8', true);
return new QRCode(document.getElementById(id), text);
} catch(e) {
return null;
}
} }
function b_resizeIframeToMainMaxHeight(iframeId) { function b_resizeIframeToMainMaxHeight(iframeId) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment