jquery-benignware-rails 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjRiYjQ2MWFkNmM4ZThhNzQwMDQ0MmFlZjA3MTE0MTJiODY1NDlkZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTE4MzA3Yzc1MzliZGI5YTIyYTFmM2ZhN2IxZjg0OTNlODVjZTAzYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDkzNDlmOGMwN2E1OTI5Mzg0NWM5NjBhYTY5Mzg5ODdkYjk2YWYzMmJkOTA0
|
10
|
+
MDNiOTM1NDQ3Nzk3ZGM0MjViYzFlYjRkNWU5NDk1YWYzMDJhMzg0YTQwYmM1
|
11
|
+
ZGMyYzhmOWFlYTdkMzJhMzMzMzAzOGNkZWQ3NzcxMzZhZGIzMWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjY2YjI5NjVjMDU4ZWI4NDlkZWQ2ZTkxZDEyNDc2Zjc5NGRhZWVmYWY0YmFi
|
14
|
+
NWE3MTA3MjM3ZGM3YTg1NTAwNWE5ZDg4YjgxYmY5YzcxNmU5NThkNjMyODA1
|
15
|
+
MTljZDgxM2JiNWM3OTk0ZDZiNzZmNmU0MjhkNzg3MzhlZDNhMGE=
|
@@ -48,6 +48,7 @@
|
|
48
48
|
var scrollingTimeoutId = null;
|
49
49
|
|
50
50
|
$element.bind('touchstart', function(event) {
|
51
|
+
|
51
52
|
touchStartScrollPos = null;
|
52
53
|
overflowContainer = getOverflowContainer(event.target);
|
53
54
|
if (overflowContainer) {
|
@@ -63,10 +64,13 @@
|
|
63
64
|
scrolling = false;
|
64
65
|
touchStartElement = event.target;
|
65
66
|
|
67
|
+
$(event.target).unbind('scroll', scrollHandler);
|
66
68
|
if (overflowContainer && (overflowContainer.scrollHeight > 0 || overflowContainer.scrollWidth > 0)) {
|
67
69
|
$(overflowContainer).bind('scroll', scrollHandler);
|
68
70
|
}
|
69
71
|
|
72
|
+
$(event.target).unbind('click', preventClickHandler);
|
73
|
+
|
70
74
|
});
|
71
75
|
|
72
76
|
$element.bind('touchmove', function(event) {
|
@@ -86,17 +90,19 @@
|
|
86
90
|
|
87
91
|
function preventClickHandler(event, custom) {
|
88
92
|
|
93
|
+
|
94
|
+
|
89
95
|
if (!custom) {
|
90
96
|
// prevent original event
|
91
|
-
event.preventDefault();
|
97
|
+
//event.preventDefault();
|
98
|
+
// prevent propagation
|
92
99
|
event.stopImmediatePropagation();
|
93
|
-
// remove listener
|
94
100
|
$(this).unbind('click', preventClickHandler);
|
101
|
+
|
95
102
|
} else {
|
96
103
|
// custom click actions
|
97
104
|
|
98
|
-
|
99
|
-
$(event.target).focus();
|
105
|
+
//$(event.target).focus();
|
100
106
|
|
101
107
|
// open links
|
102
108
|
window.setTimeout(function() {
|
@@ -112,9 +118,10 @@
|
|
112
118
|
|
113
119
|
$element.bind('touchend', function(event) {
|
114
120
|
|
121
|
+
$(event.target).unbind('click', preventClickHandler);
|
122
|
+
|
115
123
|
if (!scrolling && !dragging && event.target == touchStartElement) {
|
116
124
|
|
117
|
-
$(event.target).unbind('click', preventClickHandler);
|
118
125
|
$(event.target).bind('click', preventClickHandler);
|
119
126
|
|
120
127
|
var events = jQuery._data(event.target).events;
|
@@ -123,13 +130,13 @@
|
|
123
130
|
onClickHandlers.splice(0, 0, onClickHandlers.pop());
|
124
131
|
}
|
125
132
|
|
126
|
-
// $(event.target).focus();
|
127
|
-
|
128
133
|
$(event.target).trigger({
|
129
134
|
type: 'click',
|
130
135
|
bubbles: true
|
131
136
|
}, [true]);
|
132
|
-
|
137
|
+
|
138
|
+
$(event.target).focus();
|
139
|
+
|
133
140
|
event.preventDefault();
|
134
141
|
event.stopImmediatePropagation();
|
135
142
|
}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
|
2
|
-
+function(f,c){c.console=c.console||{log:function(){},info:function(){}};var e="touchclick";var g={draggingTimeout:100,scrollingTimeout:750,preventClickTimeout:500};function b(h){while(h&&h.nodeType==1){if(h.nodeName.toLowerCase()=="body"||h.nodeName.toLowerCase()=="html"){break}var i=f(h).css("overflow");if(i=="auto"||i=="scroll"){return h}h=h.parentNode}return c}var a=function d(m,v){var h=this;var u=f(m);var j=f(c);var t=false;var s=null;var q=false;var k=null;var r=null;var n=false;var p=null;var o=null;u.bind("touchstart",function(w){p=null;r=b(w.target);if(r){var x={x:r.scrollLeft,y:r.scrollTop};p=x}c.clearTimeout(s);c.clearTimeout(o);t=false;n=false;k=w.target;if(r&&(r.scrollHeight>0||r.scrollWidth>0)){f(r).bind("scroll",i)}});u.bind("touchmove",function(w){t=true;if(r){var x={x:r.scrollLeft,y:r.scrollTop};if(p){if(p.x!=x.x||p.y!=x.y){n=true}}}});function l(w,x){if(!x){w.
|
2
|
+
+function(f,c){c.console=c.console||{log:function(){},info:function(){}};var e="touchclick";var g={draggingTimeout:100,scrollingTimeout:750,preventClickTimeout:500};function b(h){while(h&&h.nodeType==1){if(h.nodeName.toLowerCase()=="body"||h.nodeName.toLowerCase()=="html"){break}var i=f(h).css("overflow");if(i=="auto"||i=="scroll"){return h}h=h.parentNode}return c}var a=function d(m,v){var h=this;var u=f(m);var j=f(c);var t=false;var s=null;var q=false;var k=null;var r=null;var n=false;var p=null;var o=null;u.bind("touchstart",function(w){p=null;r=b(w.target);if(r){var x={x:r.scrollLeft,y:r.scrollTop};p=x}c.clearTimeout(s);c.clearTimeout(o);t=false;n=false;k=w.target;f(w.target).unbind("scroll",i);if(r&&(r.scrollHeight>0||r.scrollWidth>0)){f(r).bind("scroll",i)}f(w.target).unbind("click",l)});u.bind("touchmove",function(w){t=true;if(r){var x={x:r.scrollLeft,y:r.scrollTop};if(p){if(p.x!=x.x||p.y!=x.y){n=true}}}});function l(w,x){if(!x){w.stopImmediatePropagation();f(this).unbind("click",l)}else{c.setTimeout(function(){if(x&&!w.isDefaultPrevented()){var y=f(w.target).is("a[href]")?w.target:f(w.target).parents("a[href]")[0];if(y&&y.href){c.location.href=y.href}}},1)}}u.bind("touchend",function(y){f(y.target).unbind("click",l);if(!n&&!t&&y.target==k){f(y.target).bind("click",l);var x=jQuery._data(y.target).events;if(x&&x.click&&x.click.length>1){var w=x.click;w.splice(0,0,w.pop())}f(y.target).trigger({type:"click",bubbles:true},[true]);f(y.target).focus();y.preventDefault();y.stopImmediatePropagation()}c.clearTimeout(s);s=c.setTimeout(function(){t=false},v.draggingTimeout)});function i(w){n=true;c.clearTimeout(s);s=c.setTimeout(function(){n=false;f(this).unbind("scroll",i)},v.scrollingTimeout)}};f.fn[e]=function(h){h=f.extend({},g,h);return this.each(function(){if(!f(this).data(e)){f(this).data(e,new a(this,h))}return f(this)})}}(jQuery,window);
|