[Libreoffice-commits] online.git: loleaflet/src
Andras Timar
andras.timar at collabora.com
Mon Jan 18 10:57:29 PST 2016
loleaflet/src/scrollbar/jquery.mCustomScrollbar.css | 4 +-
loleaflet/src/scrollbar/jquery.mCustomScrollbar.js | 32 ++++++++++----------
2 files changed, 19 insertions(+), 17 deletions(-)
New commits:
commit 84bb9a298951eb14422e9a11ac37e11acc9d4186
Author: Andras Timar <andras.timar at collabora.com>
Date: Mon Jan 18 19:54:50 2016 +0100
loleaflet: replaced the scrollbars with with version 3.1.3
This solves issues regarding cross-domain iframes.
diff --git a/loleaflet/src/scrollbar/jquery.mCustomScrollbar.css b/loleaflet/src/scrollbar/jquery.mCustomScrollbar.css
index 9488310..23b909e 100644
--- a/loleaflet/src/scrollbar/jquery.mCustomScrollbar.css
+++ b/loleaflet/src/scrollbar/jquery.mCustomScrollbar.css
@@ -51,7 +51,7 @@ y-axis
------------------------------------------------------------------------------------------------------------------------
*/
- .mCSB_inside > .mCSB_container{ margin-right: 15px; }
+ .mCSB_inside > .mCSB_container{ margin-right: 30px; }
.mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden{ margin-right: 0; } /* non-visible scrollbar */
@@ -230,7 +230,7 @@ yx-axis
left: 0;
right: 0;
bottom: 0;
- margin-right: 15px;
+ margin-right: 30px;
margin-bottom: 30px;
}
diff --git a/loleaflet/src/scrollbar/jquery.mCustomScrollbar.js b/loleaflet/src/scrollbar/jquery.mCustomScrollbar.js
index c3c0e9a..dc56bba 100644
--- a/loleaflet/src/scrollbar/jquery.mCustomScrollbar.js
+++ b/loleaflet/src/scrollbar/jquery.mCustomScrollbar.js
@@ -1,6 +1,6 @@
/*
== malihu jquery custom scrollbar plugin ==
-Version: 3.1.2
+Version: 3.1.3
Plugin URI: http://manos.malihu.gr/jquery-custom-content-scroller
Author: malihu
Author URI: http://manos.malihu.gr
@@ -1095,7 +1095,7 @@ and dependencies (minified).
if(o.advanced.extraDraggableSelectors){sel.add($(o.advanced.extraDraggableSelectors));}
if(d.bindEvents){ /* check if events are bound */
/* unbind namespaced events from document/selectors */
- $(document).add($(top.document)).unbind("."+namespace);
+ $(document).add($(!_canAccessIFrame() || top.document)).unbind("."+namespace);
sel.each(function(){
$(this).unbind("."+namespace);
});
@@ -1158,7 +1158,7 @@ and dependencies (minified).
/* returns input coordinates of pointer, touch and mouse events (relative to document) */
_coordinates=function(e){
var t=e.type,o=e.target.ownerDocument!==document ? [$(frameElement).offset().top,$(frameElement).offset().left] : null,
- io=e.target.ownerDocument!==top.document ? [$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left] : [0,0];
+ io=_canAccessIFrame() && e.target.ownerDocument!==top.document ? [$(e.view.frameElement).offset().top,$(e.view.frameElement).offset().left] : [0,0];
switch(t){
case "pointerdown": case "MSPointerDown": case "pointermove": case "MSPointerMove": case "pointerup": case "MSPointerUp":
return o ? [e.originalEvent.pageY-o[0]+io[0],e.originalEvent.pageX-o[1]+io[1],false] : [e.originalEvent.pageY,e.originalEvent.pageX,false];
@@ -1187,7 +1187,7 @@ and dependencies (minified).
mCSB_dragger=$("#"+draggerId[0]+",#"+draggerId[1]),
draggable,dragY,dragX,
rds=o.advanced.releaseDraggableSelectors ? mCSB_dragger.add($(o.advanced.releaseDraggableSelectors)) : mCSB_dragger,
- eds=o.advanced.extraDraggableSelectors ? $(top.document).add($(o.advanced.extraDraggableSelectors)) : $(top.document);
+ eds=o.advanced.extraDraggableSelectors ? $(!_canAccessIFrame() || top.document).add($(o.advanced.extraDraggableSelectors)) : $(!_canAccessIFrame() || top.document);
mCSB_dragger.bind("mousedown."+namespace+" touchstart."+namespace+" pointerdown."+namespace+" MSPointerDown."+namespace,function(e){
e.stopImmediatePropagation();
e.preventDefault();
@@ -1472,9 +1472,6 @@ and dependencies (minified).
mCustomScrollBox.bind("mousewheel."+namespace,function(e,delta){
_onMousewheel(e,delta);
});
- $("#document-container").bind("mousewheel",function(e,delta) {
- _onMousewheel(e,delta);
- });
function _onMousewheel(e,delta){
_stop($this);
if(_disableMousewheel($this,e.target)){return;} /* disables mouse-wheel when hovering specific elements */
@@ -1517,11 +1514,19 @@ and dependencies (minified).
/* checks if iframe can be accessed */
_canAccessIFrame=function(iframe){
var html=null;
- try{
- var doc=iframe.contentDocument || iframe.contentWindow.document;
- html=doc.body.innerHTML;
- }catch(err){/* do nothing */}
- return(html!==null);
+ if(!iframe){
+ try{
+ var doc=top.document;
+ html=doc.body.innerHTML;
+ }catch(err){/* do nothing */}
+ return(html!==null);
+ }else{
+ try{
+ var doc=iframe.contentDocument || iframe.contentWindow.document;
+ html=doc.body.innerHTML;
+ }catch(err){/* do nothing */}
+ return(html!==null);
+ }
},
/* -------------------- */
@@ -1698,9 +1703,6 @@ and dependencies (minified).
mCustomScrollBox.attr("tabindex","0").bind(events[0],function(e){
_onKeyboard(e);
});
- $("#document-container").bind('keydown keyup blur', function(e) {
- _onKeyboard(e);
- });
function _onKeyboard(e){
switch(e.type){
case "blur":
More information about the Libreoffice-commits
mailing list