Fix close button bug
This commit is contained in:
parent
b30a0c3cf0
commit
81ba6a184e
@ -204,24 +204,24 @@ var documentsMain = {
|
|||||||
|
|
||||||
var frame = '<iframe id="loleafletframe" allowfullscreen style="width:100%;height:100%;position:absolute;" src="' + viewer + '" sandbox="allow-scripts allow-same-origin allow-popups allow-modals"/>';
|
var frame = '<iframe id="loleafletframe" allowfullscreen style="width:100%;height:100%;position:absolute;" src="' + viewer + '" sandbox="allow-scripts allow-same-origin allow-popups allow-modals"/>';
|
||||||
$('#mainContainer').append(frame);
|
$('#mainContainer').append(frame);
|
||||||
});
|
|
||||||
|
|
||||||
documentsMain.overlay.documentOverlay('hide');
|
$('#loleafletframe').load(function(){
|
||||||
$('#loleafletframe').load(function(){
|
documentsMain.overlay.documentOverlay('hide');
|
||||||
var iframe = $('#loleafletframe').contents();
|
var iframe = $('#loleafletframe').contents();
|
||||||
iframe.find('#tb_toolbar-up_item_close').click(function() {
|
iframe.find('#tb_toolbar-up_item_close').click(function() {
|
||||||
documentsMain.onClose();
|
documentsMain.onClose();
|
||||||
|
});
|
||||||
|
var frameWindow = $('#loleafletframe')[0].contentWindow;
|
||||||
|
(function() {
|
||||||
|
cloudSuiteOnClick = frameWindow.onClick;
|
||||||
|
frameWindow.onClick = function() {
|
||||||
|
fileName = encodeURIComponent(title.substr(0, title.lastIndexOf('.')) || title);
|
||||||
|
frameWindow.map.options.doc = fileName;
|
||||||
|
cloudSuiteOnClick.apply(this, arguments);
|
||||||
|
frameWindow.map.options.doc = documentsMain.url;
|
||||||
|
};
|
||||||
|
})();
|
||||||
});
|
});
|
||||||
var frameWindow = $('#loleafletframe')[0].contentWindow;
|
|
||||||
(function() {
|
|
||||||
cloudSuiteOnClick = frameWindow.onClick;
|
|
||||||
frameWindow.onClick = function() {
|
|
||||||
fileName = encodeURIComponent(title.substr(0, title.lastIndexOf('.')) || title);
|
|
||||||
frameWindow.map.options.doc = fileName;
|
|
||||||
cloudSuiteOnClick.apply(this, arguments);
|
|
||||||
frameWindow.map.options.doc = documentsMain.url;
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user