mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
18 lines
627 B
JavaScript
Executable File
18 lines
627 B
JavaScript
Executable File
//Hide the navigator when we're in the CMS
|
|
//ToDo - should be easier to use afterIframeAdjustedForPreview() but I couldn't work out how to do this
|
|
(function($) {
|
|
$('.cms-preview').entwine({
|
|
onadd: function() {
|
|
var iframe = this.find('iframe');
|
|
if (iframe){
|
|
iframe.bind('load', function() {
|
|
var doc = this.contentDocument;
|
|
if(!doc) {return;}
|
|
var navi = doc.getElementById('BetterNavigator');
|
|
if(navi) {navi.style.display = 'none';}
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}(jQuery));
|