mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Hide client portal footer if shown in iframe
This commit is contained in:
parent
dab4b2a48b
commit
18ce61c6ef
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -465,6 +465,15 @@ function comboboxHighlighter(item) {
|
||||
return result.replace(new RegExp("\n", 'g'), '<br/>');
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/a/326076/497368
|
||||
function inIframe () {
|
||||
try {
|
||||
return window.self !== window.top;
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function comboboxMatcher(item) {
|
||||
return ~stripHtmlTags(item).toLowerCase().indexOf(this.query.toLowerCase());
|
||||
}
|
||||
|
@ -51,8 +51,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
positionFooter();
|
||||
$(window).resize(positionFooter);
|
||||
if (inIframe()) {
|
||||
$('#footer').hide();
|
||||
} else {
|
||||
positionFooter();
|
||||
$(window).resize(positionFooter);
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user