mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 15:54:31 -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/>');
|
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) {
|
function comboboxMatcher(item) {
|
||||||
return ~stripHtmlTags(item).toLowerCase().indexOf(this.query.toLowerCase());
|
return ~stripHtmlTags(item).toLowerCase().indexOf(this.query.toLowerCase());
|
||||||
}
|
}
|
||||||
|
@ -51,8 +51,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (inIframe()) {
|
||||||
|
$('#footer').hide();
|
||||||
|
} else {
|
||||||
positionFooter();
|
positionFooter();
|
||||||
$(window).resize(positionFooter);
|
$(window).resize(positionFooter);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user