[Libreoffice-commits] online.git: loleaflet/src

Andras Timar andras.timar at collabora.com
Sun May 29 20:11:42 UTC 2016


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

New commits:
commit c0098e5edde1ff0767b35e17f233ca9afcf53296
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

diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index c1459a0..18cd0ab 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