summaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-09-10 21:13:13 +0200
committerFrédéric Guillot <fred@kanboard.net>2014-09-10 21:13:13 +0200
commit917e6cab7469c408babebde18848824765d551fa (patch)
treecedfcca40863b6ea14fd6b83dbc5e71199d517fb /assets/js
parentbb1a9f52caa4e6e072d61d97629ce17dc3261100 (diff)
Improve user interface for tablets
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/app.js4
-rw-r--r--assets/js/jquery.ui.touch-punch.min.js14
2 files changed, 6 insertions, 12 deletions
diff --git a/assets/js/app.js b/assets/js/app.js
index 8c66a764..812cd034 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -82,6 +82,8 @@ Kanboard.Board = (function() {
{
// Drag and drop
$(".column").sortable({
+ delay: 300,
+ distance: 5,
connectWith: ".column",
placeholder: "draggable-placeholder",
stop: function(event, ui) {
@@ -273,7 +275,7 @@ Kanboard.Project = (function() {
// Initialization
$(function() {
-
+//alert($(window).width());
if ($("#board").length) {
Kanboard.Board.Init();
}
diff --git a/assets/js/jquery.ui.touch-punch.min.js b/assets/js/jquery.ui.touch-punch.min.js
index 31272ce6..d538812f 100644
--- a/assets/js/jquery.ui.touch-punch.min.js
+++ b/assets/js/jquery.ui.touch-punch.min.js
@@ -1,11 +1,3 @@
-/*!
- * jQuery UI Touch Punch 0.2.3
- *
- * Copyright 2011–2014, Dave Furfero
- * Dual licensed under the MIT or GPL Version 2 licenses.
- *
- * Depends:
- * jquery.ui.widget.js
- * jquery.ui.mouse.js
- */
-!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); \ No newline at end of file
+(function(b){function c(a,b){if(!(1<a.originalEvent.touches.length)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null);a.target.dispatchEvent(d)}}var f=!1,g,h;b.support.touch="ontouchend"in document;b.support.mspointer=window.navigator.msPointerEnabled;if(b.support.touch||b.support.mspointer){var d=b.ui.mouse.prototype,k=d._mouseInit,l=d._mouseDestroy,e;d._touchStart=
+function(a){!e&&this._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,f=!1,g=+new Date,c(a,"mouseover"),c(a,"mousemove"),c(a,"mousedown"))};d._touchMove=function(a){e&&(f=!0,c(a,"mousemove"))};d._touchEnd=function(a){e&&(h=+new Date,c(a,"mouseup"),c(a,"mouseout"),(!f||300>h-g)&&c(a,"click"),e=!1)};d._mouseInit=function(){b.support.mspointer&&(this.element[0].style.msTouchAction="none");this.element.bind({touchstart:b.proxy(this,"_touchStart"),touchmove:b.proxy(this,"_touchMove"),touchend:b.proxy(this,
+"_touchEnd")});k.call(this)};d._mouseDestroy=function(){this.element.unbind({touchstart:b.proxy(this,"_touchStart"),touchmove:b.proxy(this,"_touchMove"),touchend:b.proxy(this,"_touchEnd")});l.call(this)}}})(jQuery);