[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loleaflet/src

Andras Timar andras.timar at collabora.com
Sun May 29 20:14:50 UTC 2016


 loleaflet/src/control/Control.Menubar.js |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit dab8207bd741edc9e7f9fb25c41a426a90701eb5
Author: Andras Timar <andras.timar at collabora.com>
Date:   Sun May 29 22:10:22 2016 +0200

    loleaflet: bccu#1836 disable View - Full screen menu item in IE11
    
    (cherry picked from commit c0098e5edde1ff0767b35e17f233ca9afcf53296)

diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index d6c63ea..39bed65 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -188,10 +188,20 @@ L.Control.Menubar = L.Control.extend({
 	_beforeShow: function(e, menu) {
 		var self = e.data.self;
 		var items = $(menu).children().children('a').not('.has-submenu');
+		var ua = window.navigator.userAgent;
+		var msie = ua.indexOf('MSIE '); // IE 10 or older
+		var trident = ua.indexOf('Trident/'); // IE 11
 		$(items).each(function() {
 			var aItem = this;
 			var type = $(aItem).data('type');
 			var id = $(aItem).data('id');
+			if (id === 'fullscreen' && (msie > 0 || trident > 0)) { // Full screen works weirdly on IE 11
+				$(aItem).addClass('disabled');
+				var index = self.options.allowedViewModeActions.indexOf('fullscreen');
+				if(index > 0) {
+					self.options.allowedViewModeActions.splice(index, 1);
+				}
+			}
 			if (!map._editlock) {
 				var found = false;
 				for (var i in self.options.allowedViewModeActions) {


More information about the Libreoffice-commits mailing list