uikit2-rails 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/uikit2/rails/version.rb +1 -1
- data/vendor/assets/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/javascripts/uikit.js +512 -425
- data/vendor/assets/javascripts/uikit/components/accordion.js +19 -13
- data/vendor/assets/javascripts/uikit/components/autocomplete.js +23 -17
- data/vendor/assets/javascripts/uikit/components/datepicker.js +25 -24
- data/vendor/assets/javascripts/uikit/components/form-password.js +16 -16
- data/vendor/assets/javascripts/uikit/components/form-select.js +33 -25
- data/vendor/assets/javascripts/uikit/components/grid-parallax.js +12 -12
- data/vendor/assets/javascripts/uikit/components/grid.js +47 -34
- data/vendor/assets/javascripts/uikit/components/htmleditor.js +47 -3
- data/vendor/assets/javascripts/uikit/components/lightbox.js +68 -70
- data/vendor/assets/javascripts/uikit/components/nestable.js +6 -6
- data/vendor/assets/javascripts/uikit/components/notify.js +9 -9
- data/vendor/assets/javascripts/uikit/components/pagination.js +8 -8
- data/vendor/assets/javascripts/uikit/components/parallax.js +13 -13
- data/vendor/assets/javascripts/uikit/components/search.js +11 -11
- data/vendor/assets/javascripts/uikit/components/slider.js +27 -15
- data/vendor/assets/javascripts/uikit/components/slideset.js +21 -12
- data/vendor/assets/javascripts/uikit/components/slideshow-fx.js +35 -28
- data/vendor/assets/javascripts/uikit/components/slideshow.js +129 -95
- data/vendor/assets/javascripts/uikit/components/sortable.js +45 -36
- data/vendor/assets/javascripts/uikit/components/sticky.js +19 -13
- data/vendor/assets/javascripts/uikit/components/timepicker.js +6 -6
- data/vendor/assets/javascripts/uikit/components/tooltip.js +47 -46
- data/vendor/assets/javascripts/uikit/components/upload.js +46 -44
- data/vendor/assets/javascripts/uikit/core/alert.js +17 -17
- data/vendor/assets/javascripts/uikit/core/button.js +25 -26
- data/vendor/assets/javascripts/uikit/core/core.js +58 -23
- data/vendor/assets/javascripts/uikit/core/cover.js +9 -17
- data/vendor/assets/javascripts/uikit/core/dropdown.js +108 -99
- data/vendor/assets/javascripts/uikit/core/grid.js +16 -16
- data/vendor/assets/javascripts/uikit/core/modal.js +35 -41
- data/vendor/assets/javascripts/uikit/core/nav.js +35 -18
- data/vendor/assets/javascripts/uikit/core/offcanvas.js +50 -33
- data/vendor/assets/javascripts/uikit/core/scrollspy.js +33 -33
- data/vendor/assets/javascripts/uikit/core/smooth-scroll.js +8 -8
- data/vendor/assets/javascripts/uikit/core/switcher.js +54 -52
- data/vendor/assets/javascripts/uikit/core/tab.js +27 -25
- data/vendor/assets/javascripts/uikit/core/toggle.js +12 -8
- data/vendor/assets/javascripts/uikit/core/touch.js +3 -3
- data/vendor/assets/javascripts/uikit/core/utility.js +35 -19
- data/vendor/assets/stylesheets/uikit.almost-flat.css +299 -242
- data/vendor/assets/stylesheets/uikit.css +280 -223
- data/vendor/assets/stylesheets/uikit.gradient.css +309 -252
- data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/accordion.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/accordion.gradient.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/autocomplete.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.css +10 -10
- data/vendor/assets/stylesheets/uikit/components/datepicker.css +10 -10
- data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.css +9 -9
- data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/dotnav.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/form-advanced.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.css +5 -5
- data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-file.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-file.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/form-password.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/form-password.gradient.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-select.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/form-select.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.css +12 -12
- data/vendor/assets/stylesheets/uikit/components/htmleditor.css +12 -12
- data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.css +13 -13
- data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.css +7 -3
- data/vendor/assets/stylesheets/uikit/components/nestable.css +6 -2
- data/vendor/assets/stylesheets/uikit/components/nestable.gradient.css +9 -5
- data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.css +4 -4
- data/vendor/assets/stylesheets/uikit/components/notify.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/notify.gradient.css +4 -4
- data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/placeholder.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/progress.css +3 -3
- data/vendor/assets/stylesheets/uikit/components/progress.gradient.css +2 -2
- data/vendor/assets/stylesheets/uikit/components/search.almost-flat.css +18 -18
- data/vendor/assets/stylesheets/uikit/components/search.css +17 -17
- data/vendor/assets/stylesheets/uikit/components/search.gradient.css +18 -18
- data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slidenav.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.css +10 -1
- data/vendor/assets/stylesheets/uikit/components/slider.css +10 -1
- data/vendor/assets/stylesheets/uikit/components/slider.gradient.css +10 -1
- data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slideshow.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.css +5 -1
- data/vendor/assets/stylesheets/uikit/components/sortable.css +5 -1
- data/vendor/assets/stylesheets/uikit/components/sortable.gradient.css +5 -1
- data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.css +4 -1
- data/vendor/assets/stylesheets/uikit/components/sticky.css +4 -1
- data/vendor/assets/stylesheets/uikit/components/sticky.gradient.css +4 -1
- data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.css +8 -7
- data/vendor/assets/stylesheets/uikit/components/tooltip.css +8 -7
- data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.css +8 -7
- data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/upload.css +1 -1
- data/vendor/assets/stylesheets/uikit/components/upload.gradient.css +1 -1
- metadata +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! UIkit 2.
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
2
|
/*
|
3
3
|
* Based on nativesortable - Copyright (c) Brian Grinstead - https://github.com/bgrins/nativesortable
|
4
4
|
*/
|
@@ -10,8 +10,8 @@
|
|
10
10
|
component = addon(UIkit);
|
11
11
|
}
|
12
12
|
|
13
|
-
if (typeof define ==
|
14
|
-
define(
|
13
|
+
if (typeof define == 'function' && define.amd) {
|
14
|
+
define('uikit-sortable', ['uikit'], function(){
|
15
15
|
return component || addon(UIkit);
|
16
16
|
});
|
17
17
|
}
|
@@ -21,7 +21,11 @@
|
|
21
21
|
"use strict";
|
22
22
|
|
23
23
|
var supportsTouch = ('ontouchstart' in window || 'MSGesture' in window) || (window.DocumentTouch && document instanceof DocumentTouch),
|
24
|
-
draggingPlaceholder, currentlyDraggingElement, currentlyDraggingTarget, dragging, moving, clickedlink, delayIdle, touchedlists, moved, overElement;
|
24
|
+
draggingPlaceholder, currentlyDraggingElement, currentlyDraggingTarget, dragging, moving, clickedlink, delayIdle, touchedlists, moved, overElement, startEvent;
|
25
|
+
|
26
|
+
var POINTER_DOWN = supportsTouch ? ('MSGesture' in window ? 'pointerdown':'touchstart') : 'mousedown',
|
27
|
+
POINTER_MOVE = supportsTouch ? ('MSGesture' in window ? 'pointermove':'touchmove') : 'mousemove',
|
28
|
+
POINTER_UP = supportsTouch ? ('MSGesture' in window ? 'pointerup':'touchend') : 'mouseup';
|
25
29
|
|
26
30
|
function closestSortable(ele) {
|
27
31
|
|
@@ -66,21 +70,22 @@
|
|
66
70
|
// auto init
|
67
71
|
UI.ready(function(context) {
|
68
72
|
|
69
|
-
UI.$(
|
73
|
+
UI.$('[data-uk-sortable]', context).each(function(){
|
70
74
|
|
71
75
|
var ele = UI.$(this);
|
72
76
|
|
73
|
-
if(!ele.data(
|
74
|
-
UI.sortable(ele, UI.Utils.options(ele.attr(
|
77
|
+
if(!ele.data('sortable')) {
|
78
|
+
UI.sortable(ele, UI.Utils.options(ele.attr('data-uk-sortable')));
|
75
79
|
}
|
76
80
|
});
|
77
81
|
});
|
78
82
|
|
79
|
-
UI.$html.on(
|
83
|
+
UI.$html.on(POINTER_MOVE, function(e) {
|
80
84
|
|
81
85
|
if (delayIdle) {
|
82
86
|
|
83
87
|
var src = e.originalEvent.targetTouches ? e.originalEvent.targetTouches[0] : e;
|
88
|
+
|
84
89
|
if (Math.abs(src.pageX - delayIdle.pos.x) > delayIdle.threshold || Math.abs(src.pageY - delayIdle.pos.y) > delayIdle.threshold) {
|
85
90
|
delayIdle.apply(src);
|
86
91
|
}
|
@@ -99,10 +104,11 @@
|
|
99
104
|
}
|
100
105
|
|
101
106
|
var offset = draggingPlaceholder.data('mouse-offset'),
|
102
|
-
|
103
|
-
|
107
|
+
ev = e.originalEvent.touches && e.originalEvent.touches[0] || e.originalEvent,
|
108
|
+
left = parseInt(ev.pageX, 10) + offset.left,
|
109
|
+
top = parseInt(ev.pageY, 10) + offset.top;
|
104
110
|
|
105
|
-
draggingPlaceholder.css({
|
111
|
+
draggingPlaceholder.css({left: left, top: top });
|
106
112
|
|
107
113
|
// adjust document scrolling
|
108
114
|
|
@@ -118,7 +124,7 @@
|
|
118
124
|
}
|
119
125
|
});
|
120
126
|
|
121
|
-
UI.$html.on(
|
127
|
+
UI.$html.on(POINTER_UP, function(e) {
|
122
128
|
|
123
129
|
delayIdle = clickedlink = false;
|
124
130
|
|
@@ -176,7 +182,7 @@
|
|
176
182
|
|
177
183
|
$link.one('click', function(e){
|
178
184
|
e.preventDefault();
|
179
|
-
}).one(
|
185
|
+
}).one(POINTER_UP, function(){
|
180
186
|
|
181
187
|
if (!moved) {
|
182
188
|
$link.trigger('click');
|
@@ -229,8 +235,9 @@
|
|
229
235
|
|
230
236
|
// Bind/unbind standard mouse/touch events as a polyfill.
|
231
237
|
function addDragHandlers() {
|
232
|
-
|
233
|
-
|
238
|
+
|
239
|
+
if (supportsTouch && startEvent.touches && startEvent.touches.length) {
|
240
|
+
element.addEventListener(POINTER_MOVE, handleTouchMove, false);
|
234
241
|
} else {
|
235
242
|
element.addEventListener('mouseover', handleDragEnter, false);
|
236
243
|
element.addEventListener('mouseout', handleDragLeave, false);
|
@@ -240,8 +247,8 @@
|
|
240
247
|
}
|
241
248
|
|
242
249
|
function removeDragHandlers() {
|
243
|
-
if (supportsTouch) {
|
244
|
-
element.removeEventListener(
|
250
|
+
if (supportsTouch && startEvent.touches && startEvent.touches.length) {
|
251
|
+
element.removeEventListener(POINTER_MOVE, handleTouchMove, false);
|
245
252
|
} else {
|
246
253
|
element.removeEventListener('mouseover', handleDragEnter, false);
|
247
254
|
element.removeEventListener('mouseout', handleDragLeave, false);
|
@@ -268,19 +275,21 @@
|
|
268
275
|
|
269
276
|
var touch, target, context;
|
270
277
|
|
278
|
+
startEvent = e;
|
279
|
+
|
271
280
|
if (e) {
|
272
|
-
touch =
|
281
|
+
touch = e.touches && e.touches[0] || e;
|
273
282
|
target = touch.target || e.target;
|
274
283
|
|
275
284
|
// Fix event.target for a touch event
|
276
285
|
if (supportsTouch && document.elementFromPoint) {
|
277
|
-
target = document.elementFromPoint(
|
286
|
+
target = document.elementFromPoint(touch.pageX - document.body.scrollLeft, touch.pageY - document.body.scrollTop);
|
278
287
|
}
|
279
288
|
|
280
289
|
overElement = UI.$(target);
|
281
290
|
}
|
282
291
|
|
283
|
-
if (UI.$(target).hasClass(
|
292
|
+
if (UI.$(target).hasClass('.'+$this.options.childClass)) {
|
284
293
|
fn.apply(target, [e]);
|
285
294
|
} else if (target !== element) {
|
286
295
|
|
@@ -294,8 +303,8 @@
|
|
294
303
|
};
|
295
304
|
}
|
296
305
|
|
297
|
-
window.addEventListener(
|
298
|
-
element.addEventListener(
|
306
|
+
window.addEventListener(POINTER_MOVE, handleDragMove, false);
|
307
|
+
element.addEventListener(POINTER_DOWN, handleDragStart, false);
|
299
308
|
},
|
300
309
|
|
301
310
|
dragStart: function(e, elem) {
|
@@ -327,11 +336,11 @@
|
|
327
336
|
draggingPlaceholder.remove();
|
328
337
|
}
|
329
338
|
|
330
|
-
var $current = UI.$(currentlyDraggingElement), offset = $current.offset();
|
339
|
+
var $current = UI.$(currentlyDraggingElement), offset = $current.offset(), ev = e.touches && e.touches[0] || e;
|
331
340
|
|
332
341
|
delayIdle = {
|
333
342
|
|
334
|
-
pos : { x:
|
343
|
+
pos : { x:ev.pageX, y:ev.pageY },
|
335
344
|
threshold : $this.options.handleClass ? 1 : $this.options.threshold,
|
336
345
|
apply : function(evt) {
|
337
346
|
|
@@ -344,11 +353,11 @@
|
|
344
353
|
padding : $current.css('padding')
|
345
354
|
}).data({
|
346
355
|
'mouse-offset': {
|
347
|
-
|
348
|
-
|
356
|
+
left : offset.left - parseInt(ev.pageX, 10),
|
357
|
+
top : offset.top - parseInt(ev.pageY, 10)
|
349
358
|
},
|
350
|
-
|
351
|
-
|
359
|
+
origin : $this.element,
|
360
|
+
index : $current.index()
|
352
361
|
}).append($current.html()).appendTo('body');
|
353
362
|
|
354
363
|
draggingPlaceholder.$current = $current;
|
@@ -363,7 +372,7 @@
|
|
363
372
|
$this.addDragHandlers();
|
364
373
|
|
365
374
|
$this.options.start(this, currentlyDraggingElement);
|
366
|
-
$this.trigger('start.uk.sortable', [$this, currentlyDraggingElement]);
|
375
|
+
$this.trigger('start.uk.sortable', [$this, currentlyDraggingElement, draggingPlaceholder]);
|
367
376
|
|
368
377
|
moved = true;
|
369
378
|
delayIdle = false;
|
@@ -376,10 +385,10 @@
|
|
376
385
|
overElement = UI.$(document.elementFromPoint(e.pageX - (document.body.scrollLeft || document.scrollLeft || 0), e.pageY - (document.body.scrollTop || document.documentElement.scrollTop || 0)));
|
377
386
|
|
378
387
|
var overRoot = overElement.closest('.'+this.options.baseClass),
|
379
|
-
groupOver = overRoot.data(
|
388
|
+
groupOver = overRoot.data('sortable-group'),
|
380
389
|
$current = UI.$(currentlyDraggingElement),
|
381
390
|
currentRoot = $current.parent(),
|
382
|
-
groupCurrent = $current.data(
|
391
|
+
groupCurrent = $current.data('sortable-group'),
|
383
392
|
overChild;
|
384
393
|
|
385
394
|
if (overRoot[0] !== currentRoot[0] && groupCurrent !== undefined && groupOver === groupCurrent) {
|
@@ -424,12 +433,12 @@
|
|
424
433
|
if (previousCounter === 0) {
|
425
434
|
|
426
435
|
var currentlist = UI.$(elem).parent(),
|
427
|
-
startlist = UI.$(currentlyDraggingElement).data(
|
436
|
+
startlist = UI.$(currentlyDraggingElement).data('start-list');
|
428
437
|
|
429
438
|
if (currentlist[0] !== startlist[0]) {
|
430
439
|
|
431
440
|
var groupOver = currentlist.data('sortable-group'),
|
432
|
-
groupCurrent = UI.$(currentlyDraggingElement).data(
|
441
|
+
groupCurrent = UI.$(currentlyDraggingElement).data('sortable-group');
|
433
442
|
|
434
443
|
if ((groupOver || groupCurrent) && (groupOver != groupCurrent)) {
|
435
444
|
return false;
|
@@ -503,7 +512,7 @@
|
|
503
512
|
if (!currentlyDraggingElement) return;
|
504
513
|
|
505
514
|
var $current = UI.$(currentlyDraggingElement),
|
506
|
-
oldRoot = draggingPlaceholder.data(
|
515
|
+
oldRoot = draggingPlaceholder.data('origin'),
|
507
516
|
newRoot = $current.closest('.'+this.options.baseClass),
|
508
517
|
triggers = [],
|
509
518
|
el = UI.$(currentlyDraggingElement);
|
@@ -572,7 +581,7 @@
|
|
572
581
|
}).each(function() {
|
573
582
|
var ele = UI.$(this),
|
574
583
|
before = ele.data('offset-before');
|
575
|
-
ele.css({
|
584
|
+
ele.css({position:'absolute', top:before.top, left:before.left, minWidth:before.width });
|
576
585
|
});
|
577
586
|
|
578
587
|
children.each(function(){
|
@@ -585,7 +594,7 @@
|
|
585
594
|
|
586
595
|
setTimeout(function(){
|
587
596
|
ele.animate({'top':offset.top, 'left':offset.left}, $this.options.animation, function() {
|
588
|
-
ele.css({
|
597
|
+
ele.css({position:'',top:'', left:'', minWidth: '', 'pointer-events':''}).removeClass($this.options.overClass).removeData('child-dragenter');
|
589
598
|
count--;
|
590
599
|
if (!count) {
|
591
600
|
list.css('min-height', '');
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! UIkit 2.
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
2
|
(function(addon) {
|
3
3
|
|
4
4
|
var component;
|
@@ -7,8 +7,8 @@
|
|
7
7
|
component = addon(UIkit);
|
8
8
|
}
|
9
9
|
|
10
|
-
if (typeof define ==
|
11
|
-
define(
|
10
|
+
if (typeof define == 'function' && define.amd) {
|
11
|
+
define('uikit-sticky', ['uikit'], function(){
|
12
12
|
return component || addon(UIkit);
|
13
13
|
});
|
14
14
|
}
|
@@ -32,7 +32,7 @@
|
|
32
32
|
clsactive : 'uk-active',
|
33
33
|
clsinactive : '',
|
34
34
|
getWidthFrom : '',
|
35
|
-
showup
|
35
|
+
showup : false,
|
36
36
|
boundary : false,
|
37
37
|
media : false,
|
38
38
|
target : false,
|
@@ -54,7 +54,7 @@
|
|
54
54
|
|
55
55
|
for (var i = 0; i < sticked.length; i++) {
|
56
56
|
sticked[i].reset(true);
|
57
|
-
|
57
|
+
sticked[i].self.computeWrapper();
|
58
58
|
}
|
59
59
|
|
60
60
|
checkscrollposition();
|
@@ -65,11 +65,11 @@
|
|
65
65
|
|
66
66
|
setTimeout(function(){
|
67
67
|
|
68
|
-
UI.$(
|
68
|
+
UI.$('[data-uk-sticky]', context).each(function(){
|
69
69
|
|
70
70
|
var $ele = UI.$(this);
|
71
71
|
|
72
|
-
if(!$ele.data(
|
72
|
+
if (!$ele.data('sticky')) {
|
73
73
|
UI.sticky($ele, UI.Utils.options($ele.attr('data-uk-sticky')));
|
74
74
|
}
|
75
75
|
});
|
@@ -85,6 +85,12 @@
|
|
85
85
|
|
86
86
|
this.wrapper = this.element.wrap('<div class="uk-sticky-placeholder"></div>').parent();
|
87
87
|
this.computeWrapper();
|
88
|
+
this.wrapper.css({
|
89
|
+
'margin-top' : this.element.css('margin-top'),
|
90
|
+
'margin-bottom' : this.element.css('margin-bottom'),
|
91
|
+
'margin-left' : this.element.css('margin-left'),
|
92
|
+
'margin-right' : this.element.css('margin-right')
|
93
|
+
})
|
88
94
|
this.element.css('margin', 0);
|
89
95
|
|
90
96
|
if (boundary) {
|
@@ -140,13 +146,14 @@
|
|
140
146
|
this.calcTop();
|
141
147
|
|
142
148
|
var finalize = function() {
|
143
|
-
this.element.css({
|
149
|
+
this.element.css({position:'', top:'', width:'', left:'', margin:'0'});
|
144
150
|
this.element.removeClass([this.options.animation, 'uk-animation-reverse', this.options.clsactive].join(' '));
|
145
151
|
this.element.addClass(this.options.clsinactive);
|
146
152
|
this.element.trigger('inactive.uk.sticky');
|
147
153
|
|
148
154
|
this.currentTop = null;
|
149
155
|
this.animate = false;
|
156
|
+
|
150
157
|
}.bind(this);
|
151
158
|
|
152
159
|
|
@@ -233,9 +240,8 @@
|
|
233
240
|
computeWrapper: function() {
|
234
241
|
|
235
242
|
this.wrapper.css({
|
236
|
-
'height'
|
237
|
-
'float'
|
238
|
-
'margin' : this.element.css('margin')
|
243
|
+
'height' : ['absolute','fixed'].indexOf(this.element.css('position')) == -1 ? this.element.outerHeight() : '',
|
244
|
+
'float' : this.element.css('float') != 'none' ? this.element.css('float') : ''
|
239
245
|
});
|
240
246
|
|
241
247
|
if (this.element.css('position') == 'fixed') {
|
@@ -263,7 +269,7 @@
|
|
263
269
|
|
264
270
|
sticky = stickies[i];
|
265
271
|
|
266
|
-
if (!sticky.element.is(
|
272
|
+
if (!sticky.element.is(':visible') || sticky.animate) {
|
267
273
|
continue;
|
268
274
|
}
|
269
275
|
|
@@ -300,7 +306,7 @@
|
|
300
306
|
if (sticky.currentTop != newTop) {
|
301
307
|
|
302
308
|
sticky.element.css({
|
303
|
-
position :
|
309
|
+
position : 'fixed',
|
304
310
|
top : newTop,
|
305
311
|
width : sticky.getWidthFrom.length ? sticky.getWidthFrom.width() : sticky.element.width()
|
306
312
|
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! UIkit 2.
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
2
|
(function(addon) {
|
3
3
|
|
4
4
|
var component;
|
@@ -7,8 +7,8 @@
|
|
7
7
|
component = addon(UIkit);
|
8
8
|
}
|
9
9
|
|
10
|
-
if (typeof define ==
|
11
|
-
define(
|
10
|
+
if (typeof define == 'function' && define.amd) {
|
11
|
+
define('uikit-timepicker', ['uikit'], function(){
|
12
12
|
return component || addon(UIkit);
|
13
13
|
});
|
14
14
|
}
|
@@ -30,12 +30,12 @@
|
|
30
30
|
boot: function() {
|
31
31
|
|
32
32
|
// init code
|
33
|
-
UI.$html.on(
|
33
|
+
UI.$html.on('focus.timepicker.uikit', '[data-uk-timepicker]', function(e) {
|
34
34
|
|
35
35
|
var ele = UI.$(this);
|
36
36
|
|
37
|
-
if (!ele.data(
|
38
|
-
var obj = UI.timepicker(ele, UI.Utils.options(ele.attr(
|
37
|
+
if (!ele.data('timepicker')) {
|
38
|
+
var obj = UI.timepicker(ele, UI.Utils.options(ele.attr('data-uk-timepicker')));
|
39
39
|
|
40
40
|
setTimeout(function(){
|
41
41
|
obj.autocomplete.input.focus();
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! UIkit 2.
|
1
|
+
/*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
|
2
2
|
(function(addon) {
|
3
3
|
var component;
|
4
4
|
|
@@ -6,8 +6,8 @@
|
|
6
6
|
component = addon(UIkit);
|
7
7
|
}
|
8
8
|
|
9
|
-
if (typeof define ==
|
10
|
-
define(
|
9
|
+
if (typeof define == 'function' && define.amd) {
|
10
|
+
define('uikit-tooltip', ['uikit'], function(){
|
11
11
|
return component || addon(UIkit);
|
12
12
|
});
|
13
13
|
}
|
@@ -17,18 +17,18 @@
|
|
17
17
|
"use strict";
|
18
18
|
|
19
19
|
var $tooltip, // tooltip container
|
20
|
-
tooltipdelay,
|
20
|
+
tooltipdelay, checkIdle;
|
21
21
|
|
22
22
|
UI.component('tooltip', {
|
23
23
|
|
24
24
|
defaults: {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
25
|
+
offset: 5,
|
26
|
+
pos: 'top',
|
27
|
+
animation: false,
|
28
|
+
delay: 0, // in miliseconds
|
29
|
+
cls: '',
|
30
|
+
activeClass: 'uk-active',
|
31
|
+
src: function(ele) {
|
32
32
|
var title = ele.attr('title');
|
33
33
|
|
34
34
|
if (title !== undefined) {
|
@@ -39,17 +39,17 @@
|
|
39
39
|
}
|
40
40
|
},
|
41
41
|
|
42
|
-
tip:
|
42
|
+
tip: '',
|
43
43
|
|
44
44
|
boot: function() {
|
45
45
|
|
46
46
|
// init code
|
47
|
-
UI.$html.on(
|
47
|
+
UI.$html.on('mouseenter.tooltip.uikit focus.tooltip.uikit', '[data-uk-tooltip]', function(e) {
|
48
48
|
var ele = UI.$(this);
|
49
49
|
|
50
|
-
if (!ele.data(
|
51
|
-
UI.tooltip(ele, UI.Utils.options(ele.attr(
|
52
|
-
ele.trigger(
|
50
|
+
if (!ele.data('tooltip')) {
|
51
|
+
UI.tooltip(ele, UI.Utils.options(ele.attr('data-uk-tooltip')));
|
52
|
+
ele.trigger('mouseenter');
|
53
53
|
}
|
54
54
|
});
|
55
55
|
},
|
@@ -72,14 +72,14 @@
|
|
72
72
|
|
73
73
|
show: function() {
|
74
74
|
|
75
|
-
this.tip = typeof(this.options.src) ===
|
75
|
+
this.tip = typeof(this.options.src) === 'function' ? this.options.src(this.element) : this.options.src;
|
76
76
|
|
77
|
-
if (tooltipdelay)
|
78
|
-
if (
|
77
|
+
if (tooltipdelay) clearTimeout(tooltipdelay);
|
78
|
+
if (checkIdle) clearInterval(checkIdle);
|
79
79
|
|
80
80
|
if (typeof(this.tip) === 'string' ? !this.tip.length:true) return;
|
81
81
|
|
82
|
-
$tooltip.stop().css({
|
82
|
+
$tooltip.stop().css({top: -2000, visibility: 'hidden'}).removeClass(this.options.activeClass).show();
|
83
83
|
$tooltip.html('<div class="uk-tooltip-inner">' + this.tip + '</div>');
|
84
84
|
|
85
85
|
var $this = this,
|
@@ -90,10 +90,10 @@
|
|
90
90
|
position = typeof(this.options.pos) === "function" ? this.options.pos.call(this.element) : this.options.pos,
|
91
91
|
tmppos = position.split("-"),
|
92
92
|
tcss = {
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
display : 'none',
|
94
|
+
visibility : 'visible',
|
95
|
+
top : (pos.top + pos.height + height),
|
96
|
+
left : pos.left
|
97
97
|
};
|
98
98
|
|
99
99
|
|
@@ -102,22 +102,22 @@
|
|
102
102
|
if (UI.$html.css('position')=='fixed' || UI.$body.css('position')=='fixed'){
|
103
103
|
var bodyoffset = UI.$('body').offset(),
|
104
104
|
htmloffset = UI.$('html').offset(),
|
105
|
-
docoffset = {
|
105
|
+
docoffset = {top: (htmloffset.top + bodyoffset.top), left: (htmloffset.left + bodyoffset.left)};
|
106
106
|
|
107
107
|
pos.left -= docoffset.left;
|
108
108
|
pos.top -= docoffset.top;
|
109
109
|
}
|
110
110
|
|
111
111
|
|
112
|
-
if ((tmppos[0] ==
|
113
|
-
tmppos[0] = tmppos[0] ==
|
112
|
+
if ((tmppos[0] == 'left' || tmppos[0] == 'right') && UI.langdirection == 'right') {
|
113
|
+
tmppos[0] = tmppos[0] == 'left' ? 'right' : 'left';
|
114
114
|
}
|
115
115
|
|
116
116
|
var variants = {
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
117
|
+
bottom : {top: pos.top + pos.height + offset, left: pos.left + pos.width / 2 - width / 2},
|
118
|
+
top : {top: pos.top - height - offset, left: pos.left + pos.width / 2 - width / 2},
|
119
|
+
left : {top: pos.top + pos.height / 2 - height / 2, left: pos.left - width - offset},
|
120
|
+
right : {top: pos.top + pos.height / 2 - height / 2, left: pos.left + pos.width + offset}
|
121
121
|
};
|
122
122
|
|
123
123
|
UI.$.extend(tcss, variants[tmppos[0]]);
|
@@ -129,37 +129,37 @@
|
|
129
129
|
if(boundary) {
|
130
130
|
|
131
131
|
switch(boundary) {
|
132
|
-
case
|
132
|
+
case 'x':
|
133
133
|
|
134
134
|
if (tmppos.length == 2) {
|
135
|
-
position = tmppos[0]+"-"+(tcss.left < 0 ?
|
135
|
+
position = tmppos[0]+"-"+(tcss.left < 0 ? 'left': 'right');
|
136
136
|
} else {
|
137
|
-
position = tcss.left < 0 ?
|
137
|
+
position = tcss.left < 0 ? 'right': 'left';
|
138
138
|
}
|
139
139
|
|
140
140
|
break;
|
141
141
|
|
142
|
-
case
|
142
|
+
case 'y':
|
143
143
|
if (tmppos.length == 2) {
|
144
|
-
position = (tcss.top < 0 ?
|
144
|
+
position = (tcss.top < 0 ? 'bottom': 'top')+'-'+tmppos[1];
|
145
145
|
} else {
|
146
|
-
position = (tcss.top < 0 ?
|
146
|
+
position = (tcss.top < 0 ? 'bottom': 'top');
|
147
147
|
}
|
148
148
|
|
149
149
|
break;
|
150
150
|
|
151
|
-
case
|
151
|
+
case 'xy':
|
152
152
|
if (tmppos.length == 2) {
|
153
|
-
position = (tcss.top < 0 ?
|
153
|
+
position = (tcss.top < 0 ? 'bottom': 'top')+'-'+(tcss.left < 0 ? 'left': 'right');
|
154
154
|
} else {
|
155
|
-
position = tcss.left < 0 ?
|
155
|
+
position = tcss.left < 0 ? 'right': 'left';
|
156
156
|
}
|
157
157
|
|
158
158
|
break;
|
159
159
|
|
160
160
|
}
|
161
161
|
|
162
|
-
tmppos = position.split(
|
162
|
+
tmppos = position.split('-');
|
163
163
|
|
164
164
|
UI.$.extend(tcss, variants[tmppos[0]]);
|
165
165
|
|
@@ -171,7 +171,7 @@
|
|
171
171
|
|
172
172
|
tooltipdelay = setTimeout(function(){
|
173
173
|
|
174
|
-
$tooltip.css(tcss).attr(
|
174
|
+
$tooltip.css(tcss).attr('class', ['uk-tooltip', 'uk-tooltip-'+position, $this.options.cls].join(' '));
|
175
175
|
|
176
176
|
if ($this.options.animation) {
|
177
177
|
$tooltip.css({opacity: 0, display: 'block'}).addClass($this.options.activeClass).animate({opacity: 1}, parseInt($this.options.animation, 10) || 400);
|
@@ -182,7 +182,7 @@
|
|
182
182
|
tooltipdelay = false;
|
183
183
|
|
184
184
|
// close tooltip if element was removed or hidden
|
185
|
-
|
185
|
+
checkIdle = setInterval(function(){
|
186
186
|
if(!$this.element.is(':visible')) $this.hide();
|
187
187
|
}, 150);
|
188
188
|
|
@@ -190,10 +190,11 @@
|
|
190
190
|
},
|
191
191
|
|
192
192
|
hide: function() {
|
193
|
-
if(this.element.is("input") && this.element[0]===document.activeElement) return;
|
194
193
|
|
195
|
-
if(
|
196
|
-
|
194
|
+
if (this.element.is('input') && this.element[0]===document.activeElement) return;
|
195
|
+
|
196
|
+
if (tooltipdelay) clearTimeout(tooltipdelay);
|
197
|
+
if (checkIdle) clearInterval(checkIdle);
|
197
198
|
|
198
199
|
$tooltip.stop();
|
199
200
|
|