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
|
(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-grid-parallax', ['uikit'], function(){
|
12
12
|
return component || addon(UIkit);
|
13
13
|
});
|
14
14
|
}
|
@@ -28,16 +28,16 @@
|
|
28
28
|
UI.component('gridparallax', {
|
29
29
|
|
30
30
|
defaults: {
|
31
|
-
target
|
32
|
-
smooth
|
33
|
-
translate
|
31
|
+
target : false,
|
32
|
+
smooth : 150,
|
33
|
+
translate : 150
|
34
34
|
},
|
35
35
|
|
36
36
|
boot: function() {
|
37
37
|
|
38
38
|
// listen to scroll and resize
|
39
|
-
UI.$doc.on(
|
40
|
-
UI.$win.on(
|
39
|
+
UI.$doc.on('scrolling.uk.document', checkParallaxes);
|
40
|
+
UI.$win.on('load resize orientationchange', UI.Utils.debounce(function(){
|
41
41
|
checkParallaxes();
|
42
42
|
}, 50));
|
43
43
|
|
@@ -48,8 +48,8 @@
|
|
48
48
|
|
49
49
|
var parallax = UI.$(this);
|
50
50
|
|
51
|
-
if (!parallax.data(
|
52
|
-
UI.gridparallax(parallax, UI.Utils.options(parallax.attr(
|
51
|
+
if (!parallax.data('gridparallax')) {
|
52
|
+
UI.gridparallax(parallax, UI.Utils.options(parallax.attr('data-uk-grid-parallax')));
|
53
53
|
}
|
54
54
|
});
|
55
55
|
});
|
@@ -107,7 +107,7 @@
|
|
107
107
|
}
|
108
108
|
|
109
109
|
while(mods.length < columns) {
|
110
|
-
if(!(mods[mods.length-1] - 2)) break;
|
110
|
+
if (!(mods[mods.length-1] - 2)) break;
|
111
111
|
mods.push(mods[mods.length-1] - 2);
|
112
112
|
}
|
113
113
|
|
@@ -165,4 +165,4 @@
|
|
165
165
|
|
166
166
|
return percent > 1 ? 1:percent;
|
167
167
|
}
|
168
|
-
});
|
168
|
+
});
|
@@ -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-grid', ['uikit'], function(){
|
12
12
|
return component || addon(UIkit);
|
13
13
|
});
|
14
14
|
}
|
@@ -25,7 +25,8 @@
|
|
25
25
|
duration : 300,
|
26
26
|
gutter : 0,
|
27
27
|
controls : false,
|
28
|
-
filter : false
|
28
|
+
filter : false,
|
29
|
+
origin : UI.langdirection
|
29
30
|
},
|
30
31
|
|
31
32
|
boot: function() {
|
@@ -37,7 +38,7 @@
|
|
37
38
|
|
38
39
|
var ele = UI.$(this);
|
39
40
|
|
40
|
-
if(!ele.data(
|
41
|
+
if(!ele.data('grid')) {
|
41
42
|
UI.grid(ele, UI.Utils.options(ele.attr('data-uk-grid')));
|
42
43
|
}
|
43
44
|
});
|
@@ -55,6 +56,7 @@
|
|
55
56
|
this.element.css({'position': 'relative'});
|
56
57
|
|
57
58
|
this.controls = null;
|
59
|
+
this.origin = this.options.origin;
|
58
60
|
|
59
61
|
if (this.options.controls) {
|
60
62
|
|
@@ -79,23 +81,23 @@
|
|
79
81
|
if ($this.currentfilter) {
|
80
82
|
$this.filter($this.currentfilter);
|
81
83
|
} else {
|
82
|
-
this.
|
84
|
+
this.update();
|
83
85
|
}
|
84
86
|
|
85
87
|
}.bind(this), 100));
|
86
88
|
|
87
89
|
this.on('display.uk.check', function(){
|
88
|
-
if ($this.element.is(
|
90
|
+
if ($this.element.is(':visible')) $this.update();
|
89
91
|
});
|
90
92
|
|
91
93
|
UI.domObserve(this.element, function(e) {
|
92
|
-
$this.
|
94
|
+
$this.update();
|
93
95
|
});
|
94
96
|
|
95
97
|
if (this.options.filter !== false) {
|
96
98
|
this.filter(this.options.filter);
|
97
99
|
} else {
|
98
|
-
this.
|
100
|
+
this.update();
|
99
101
|
}
|
100
102
|
},
|
101
103
|
|
@@ -109,23 +111,25 @@
|
|
109
111
|
}
|
110
112
|
|
111
113
|
css = {
|
112
|
-
|
113
|
-
|
114
|
-
|
114
|
+
position : 'absolute',
|
115
|
+
boxSizing : 'border-box',
|
116
|
+
width : this.options.colwidth == 'auto' ? '' : this.options.colwidth
|
115
117
|
};
|
116
118
|
|
117
119
|
if (this.options.gutter) {
|
118
120
|
|
119
|
-
css['padding-
|
121
|
+
css['padding-'+this.origin] = this.gutterh;
|
120
122
|
css['padding-bottom'] = this.gutterv;
|
121
123
|
|
122
|
-
this.element.css('margin-
|
124
|
+
this.element.css('margin-'+this.origin, this.gutterh * -1);
|
123
125
|
}
|
124
126
|
|
125
127
|
children.attr('data-grid-prepared', 'true').css(css);
|
126
128
|
},
|
127
129
|
|
128
|
-
|
130
|
+
update: function(elements) {
|
131
|
+
|
132
|
+
var $this = this;
|
129
133
|
|
130
134
|
this._prepareElements();
|
131
135
|
|
@@ -137,7 +141,7 @@
|
|
137
141
|
top = 0,
|
138
142
|
positions = [],
|
139
143
|
|
140
|
-
item, width, height, pos, i, z, max, size;
|
144
|
+
item, width, height, pos, posi, i, z, max, size;
|
141
145
|
|
142
146
|
this.trigger('beforeupdate.uk.grid', [children]);
|
143
147
|
|
@@ -160,18 +164,21 @@
|
|
160
164
|
if (top <= pos.aY) { top = pos.aY; }
|
161
165
|
}
|
162
166
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
167
|
+
posi = {
|
168
|
+
ele : item,
|
169
|
+
top : top,
|
170
|
+
width : width,
|
171
|
+
height : height,
|
172
|
+
aY : (top + height),
|
173
|
+
aX : (left + width)
|
174
|
+
};
|
175
|
+
|
176
|
+
posi[$this.origin] = left;
|
177
|
+
|
178
|
+
positions.push(posi);
|
172
179
|
});
|
173
180
|
|
174
|
-
var posPrev, maxHeight = 0;
|
181
|
+
var posPrev, maxHeight = 0, positionto;
|
175
182
|
|
176
183
|
// fix top
|
177
184
|
for (i=0,max=positions.length;i<max;i++) {
|
@@ -184,7 +191,7 @@
|
|
184
191
|
posPrev = positions[z];
|
185
192
|
|
186
193
|
// (posPrev.left + 1) fixex 1px bug when using % based widths
|
187
|
-
if (pos.
|
194
|
+
if (pos[this.origin] < posPrev.aX && (posPrev[this.origin] +1) < pos.aX) {
|
188
195
|
top = posPrev.aY;
|
189
196
|
}
|
190
197
|
}
|
@@ -202,7 +209,11 @@
|
|
202
209
|
this.element.stop().animate({'height': maxHeight}, 100);
|
203
210
|
|
204
211
|
positions.forEach(function(pos){
|
205
|
-
|
212
|
+
|
213
|
+
positionto = {"top": pos.top, opacity: 1};
|
214
|
+
positionto[$this.origin] = pos[$this.origin];
|
215
|
+
|
216
|
+
pos.ele.stop().animate(positionto, this.options.duration);
|
206
217
|
}.bind(this));
|
207
218
|
|
208
219
|
} else {
|
@@ -210,7 +221,9 @@
|
|
210
221
|
this.element.css('height', maxHeight);
|
211
222
|
|
212
223
|
positions.forEach(function(pos){
|
213
|
-
|
224
|
+
positionto = {"top": pos.top, opacity: 1};
|
225
|
+
positionto[$this.origin] = pos[$this.origin];
|
226
|
+
pos.ele.css(positionto);
|
214
227
|
}.bind(this));
|
215
228
|
}
|
216
229
|
|
@@ -261,7 +274,7 @@
|
|
261
274
|
elements.hidden.attr('aria-hidden', 'true').filter(':visible').fadeOut(this.options.duration);
|
262
275
|
elements.visible.attr('aria-hidden', 'false').filter(':hidden').css('opacity', 0).show();
|
263
276
|
|
264
|
-
$this.
|
277
|
+
$this.update(elements.visible);
|
265
278
|
|
266
279
|
if (this.controls && this.controls.length) {
|
267
280
|
this.controls.find('[data-uk-filter]').removeClass('uk-active').filter('[data-uk-filter="'+filter+'"]').addClass('uk-active');
|
@@ -288,7 +301,7 @@
|
|
288
301
|
|
289
302
|
}).appendTo(this.element);
|
290
303
|
|
291
|
-
this.
|
304
|
+
this.update(elements.filter(':visible'));
|
292
305
|
|
293
306
|
if (this.controls && this.controls.length) {
|
294
307
|
this.controls.find('[data-uk-sort]').removeClass('uk-active').filter('[data-uk-sort="'+by+':'+(order == -1 ? 'desc':'asc')+'"]').addClass('uk-active');
|
@@ -303,7 +316,7 @@
|
|
303
316
|
* MIT license
|
304
317
|
* https://github.com/desandro/get-size
|
305
318
|
*/
|
306
|
-
|
319
|
+
function _getSize() {
|
307
320
|
|
308
321
|
var prefixes = 'Webkit Moz ms Ms O'.split(' ');
|
309
322
|
var docElemStyle = document.documentElement.style;
|
@@ -519,9 +532,9 @@
|
|
519
532
|
|
520
533
|
return getSize;
|
521
534
|
|
522
|
-
}
|
535
|
+
}
|
523
536
|
|
524
537
|
function getElementSize(ele) {
|
525
|
-
return _getSize(ele);
|
538
|
+
return _getSize()(ele);
|
526
539
|
}
|
527
540
|
});
|
@@ -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-htmleditor', ['uikit'], function(){
|
12
12
|
return component || addon(UIkit);
|
13
13
|
});
|
14
14
|
}
|
@@ -26,6 +26,7 @@
|
|
26
26
|
mode : 'split',
|
27
27
|
markdown : false,
|
28
28
|
autocomplete : true,
|
29
|
+
enablescripts: false,
|
29
30
|
height : 500,
|
30
31
|
maxsplitsize : 1000,
|
31
32
|
codemirror : { mode: 'htmlmixed', lineWrapping: true, dragDrop: false, autoCloseTags: true, matchTags: true, autoCloseBrackets: true, matchBrackets: true, indentUnit: 4, indentWithTabs: false, tabSize: 4, hintOptions: {completionSingle:false} },
|
@@ -290,6 +291,10 @@
|
|
290
291
|
|
291
292
|
this.currentvalue = this.editor.getValue();
|
292
293
|
|
294
|
+
if (!this.options.enablescripts) {
|
295
|
+
this.currentvalue = this.currentvalue.replace(/<(script|style)\b[^<]*(?:(?!<\/(script|style)>)<[^<]*)*<\/(script|style)>/img, '');
|
296
|
+
}
|
297
|
+
|
293
298
|
// empty code
|
294
299
|
if (!this.currentvalue) {
|
295
300
|
|
@@ -480,12 +485,45 @@
|
|
480
485
|
});
|
481
486
|
|
482
487
|
editor.htmleditor.on('click', 'a[data-htmleditor-button="fullscreen"]', function() {
|
488
|
+
|
483
489
|
editor.htmleditor.toggleClass('uk-htmleditor-fullscreen');
|
484
490
|
|
485
491
|
var wrap = editor.editor.getWrapperElement();
|
486
492
|
|
487
493
|
if (editor.htmleditor.hasClass('uk-htmleditor-fullscreen')) {
|
488
494
|
|
495
|
+
var fixedParent = false, parents = editor.htmleditor.parents().each(function(){
|
496
|
+
if (UI.$(this).css('position')=='fixed' && !UI.$(this).is('html')) {
|
497
|
+
fixedParent = UI.$(this);
|
498
|
+
}
|
499
|
+
});
|
500
|
+
|
501
|
+
editor.htmleditor.data('fixedParents', false);
|
502
|
+
|
503
|
+
if (fixedParent) {
|
504
|
+
|
505
|
+
var transformed = [];
|
506
|
+
|
507
|
+
fixedParent = fixedParent.parent().find(parents).each(function(){
|
508
|
+
|
509
|
+
if (UI.$(this).css('transform') != 'none') {
|
510
|
+
transformed.push(UI.$(this).data('transform-reset', {
|
511
|
+
'transform': this.style.transform,
|
512
|
+
'-webkit-transform': this.style.webkitTransform,
|
513
|
+
'-webkit-transition':this.style.webkitTransition,
|
514
|
+
'transition':this.style.transition
|
515
|
+
}).css({
|
516
|
+
'transform': 'none',
|
517
|
+
'-webkit-transform': 'none',
|
518
|
+
'-webkit-transition':'none',
|
519
|
+
'transition':'none'
|
520
|
+
}));
|
521
|
+
}
|
522
|
+
});
|
523
|
+
|
524
|
+
editor.htmleditor.data('fixedParents', transformed);
|
525
|
+
}
|
526
|
+
|
489
527
|
editor.editor.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, width: wrap.style.width, height: wrap.style.height};
|
490
528
|
wrap.style.width = '';
|
491
529
|
wrap.style.height = editor.content.height()+'px';
|
@@ -497,6 +535,12 @@
|
|
497
535
|
var info = editor.editor.state.fullScreenRestore;
|
498
536
|
wrap.style.width = info.width; wrap.style.height = info.height;
|
499
537
|
window.scrollTo(info.scrollLeft, info.scrollTop);
|
538
|
+
|
539
|
+
if (editor.htmleditor.data('fixedParents')) {
|
540
|
+
editor.htmleditor.data('fixedParents').forEach(function(parent){
|
541
|
+
parent.css(parent.data('transform-reset'));
|
542
|
+
});
|
543
|
+
}
|
500
544
|
}
|
501
545
|
|
502
546
|
setTimeout(function() {
|
@@ -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) { // AMD
|
11
|
+
define('uikit-lightbox', ['uikit'], function(){
|
12
12
|
return component || addon(UIkit);
|
13
13
|
});
|
14
14
|
}
|
@@ -22,9 +22,10 @@
|
|
22
22
|
UI.component('lightbox', {
|
23
23
|
|
24
24
|
defaults: {
|
25
|
-
|
26
|
-
|
27
|
-
|
25
|
+
allowfullscreen : true,
|
26
|
+
duration : 400,
|
27
|
+
group : false,
|
28
|
+
keyboard : true
|
28
29
|
},
|
29
30
|
|
30
31
|
index : 0,
|
@@ -38,12 +39,12 @@
|
|
38
39
|
|
39
40
|
var link = UI.$(this);
|
40
41
|
|
41
|
-
if (!link.data(
|
42
|
+
if (!link.data('lightbox')) {
|
42
43
|
|
43
|
-
UI.lightbox(link, UI.Utils.options(link.attr(
|
44
|
+
UI.lightbox(link, UI.Utils.options(link.attr('data-uk-lightbox')));
|
44
45
|
}
|
45
46
|
|
46
|
-
link.data(
|
47
|
+
link.data('lightbox').show(link);
|
47
48
|
});
|
48
49
|
|
49
50
|
// keyboard navigation
|
@@ -74,20 +75,17 @@
|
|
74
75
|
|
75
76
|
if (this.element && this.element.length) {
|
76
77
|
|
77
|
-
var domSiblings = this.options.group ? UI.$([
|
78
|
-
'[data-uk-lightbox*="'+this.options.group+'"]',
|
79
|
-
"[data-uk-lightbox*='"+this.options.group+"']"
|
80
|
-
].join(',')) : this.element;
|
78
|
+
var domSiblings = this.options.group ? UI.$('[data-uk-lightbox*="'+this.options.group+'"]') : this.element;
|
81
79
|
|
82
80
|
domSiblings.each(function() {
|
83
81
|
|
84
82
|
var ele = UI.$(this);
|
85
83
|
|
86
84
|
siblings.push({
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
85
|
+
source : ele.attr('href'),
|
86
|
+
title : ele.attr('data-title') || ele.attr('title'),
|
87
|
+
type : ele.attr("data-lightbox-type") || 'auto',
|
88
|
+
link : ele
|
91
89
|
});
|
92
90
|
});
|
93
91
|
|
@@ -134,17 +132,17 @@
|
|
134
132
|
item = this.siblings[index];
|
135
133
|
|
136
134
|
data = {
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
135
|
+
lightbox : $this,
|
136
|
+
source : item.source,
|
137
|
+
type : item.type,
|
138
|
+
index : index,
|
139
|
+
promise : promise,
|
140
|
+
title : item.title,
|
141
|
+
item : item,
|
142
|
+
meta : {
|
143
|
+
content : '',
|
144
|
+
width : null,
|
145
|
+
height : null
|
148
146
|
}
|
149
147
|
};
|
150
148
|
|
@@ -199,14 +197,14 @@
|
|
199
197
|
|
200
198
|
// calculate width
|
201
199
|
var tmp = UI.$('<div> </div>').css({
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
200
|
+
opacity : 0,
|
201
|
+
position : 'absolute',
|
202
|
+
top : 0,
|
203
|
+
left : 0,
|
204
|
+
width : '100%',
|
205
|
+
maxWidth : $this.modal.dialog.css('max-width'),
|
206
|
+
padding : $this.modal.dialog.css('padding'),
|
207
|
+
margin : $this.modal.dialog.css('margin')
|
210
208
|
}), maxwidth, maxheight, w = data.meta.width, h = data.meta.height;
|
211
209
|
|
212
210
|
tmp.appendTo('body').width();
|
@@ -254,11 +252,11 @@
|
|
254
252
|
|
255
253
|
this.modal.dialog.animate({width: w + pad, height: h + pad, top: t }, duration, 'swing', function() {
|
256
254
|
$this.modal.loader.addClass('uk-hidden');
|
257
|
-
$this.modal.content.css({width:''}).animate({
|
255
|
+
$this.modal.content.css({width:''}).animate({opacity: 1}, function() {
|
258
256
|
$this.modal.closer.removeClass('uk-hidden');
|
259
257
|
});
|
260
258
|
|
261
|
-
$this.modal.data({
|
259
|
+
$this.modal.data({mwidth: w, mheight: h});
|
262
260
|
});
|
263
261
|
},
|
264
262
|
|
@@ -278,16 +276,16 @@
|
|
278
276
|
|
279
277
|
init: function(lightbox) {
|
280
278
|
|
281
|
-
lightbox.on(
|
279
|
+
lightbox.on('showitem.uk.lightbox', function(e, data){
|
282
280
|
|
283
281
|
if (data.type == 'image' || data.source && data.source.match(/\.(jpg|jpeg|png|gif|svg)$/i)) {
|
284
282
|
|
285
283
|
var resolve = function(source, width, height) {
|
286
284
|
|
287
285
|
data.meta = {
|
288
|
-
|
289
|
-
|
290
|
-
|
286
|
+
content : '<img class="uk-responsive-width" width="'+width+'" height="'+height+'" src ="'+source+'">',
|
287
|
+
width : width,
|
288
|
+
height : height
|
291
289
|
};
|
292
290
|
|
293
291
|
data.type = 'image';
|
@@ -318,7 +316,7 @@
|
|
318
316
|
}
|
319
317
|
});
|
320
318
|
|
321
|
-
UI.plugin(
|
319
|
+
UI.plugin('lightbox', 'youtube', {
|
322
320
|
|
323
321
|
init: function(lightbox) {
|
324
322
|
|
@@ -326,14 +324,14 @@
|
|
326
324
|
youtubeRegExpShort = /youtu\.be\/(.*)/;
|
327
325
|
|
328
326
|
|
329
|
-
lightbox.on(
|
327
|
+
lightbox.on('showitem.uk.lightbox', function(e, data){
|
330
328
|
|
331
329
|
var id, matches, resolve = function(id, width, height) {
|
332
330
|
|
333
331
|
data.meta = {
|
334
|
-
|
335
|
-
|
336
|
-
|
332
|
+
content: '<iframe src="//www.youtube.com/embed/'+id+'" width="'+width+'" height="'+height+'" style="max-width:100%;"'+(modal.lightbox.options.allowfullscreen?' allowfullscreen':'')+'></iframe>',
|
333
|
+
width: width,
|
334
|
+
height: height
|
337
335
|
};
|
338
336
|
|
339
337
|
data.type = 'iframe';
|
@@ -389,21 +387,21 @@
|
|
389
387
|
});
|
390
388
|
|
391
389
|
|
392
|
-
UI.plugin(
|
390
|
+
UI.plugin('lightbox', 'vimeo', {
|
393
391
|
|
394
392
|
init: function(lightbox) {
|
395
393
|
|
396
394
|
var regex = /(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/, matches;
|
397
395
|
|
398
396
|
|
399
|
-
lightbox.on(
|
397
|
+
lightbox.on('showitem.uk.lightbox', function(e, data){
|
400
398
|
|
401
399
|
var id, resolve = function(id, width, height) {
|
402
400
|
|
403
401
|
data.meta = {
|
404
|
-
|
405
|
-
|
406
|
-
|
402
|
+
content: '<iframe src="//player.vimeo.com/video/'+id+'" width="'+width+'" height="'+height+'" style="width:100%;box-sizing:border-box;"'+(modal.lightbox.options.allowfullscreen?' allowfullscreen':'')+'></iframe>',
|
403
|
+
width: width,
|
404
|
+
height: height
|
407
405
|
};
|
408
406
|
|
409
407
|
data.type = 'iframe';
|
@@ -419,7 +417,7 @@
|
|
419
417
|
|
420
418
|
UI.$.ajax({
|
421
419
|
type : 'GET',
|
422
|
-
url : '
|
420
|
+
url : '//vimeo.com/api/oembed.json?url=' + encodeURI(data.source),
|
423
421
|
jsonp : 'callback',
|
424
422
|
dataType : 'jsonp',
|
425
423
|
success : function(data) {
|
@@ -438,19 +436,19 @@
|
|
438
436
|
}
|
439
437
|
});
|
440
438
|
|
441
|
-
UI.plugin(
|
439
|
+
UI.plugin('lightbox', 'video', {
|
442
440
|
|
443
441
|
init: function(lightbox) {
|
444
442
|
|
445
|
-
lightbox.on(
|
443
|
+
lightbox.on('showitem.uk.lightbox', function(e, data){
|
446
444
|
|
447
445
|
|
448
446
|
var resolve = function(source, width, height) {
|
449
447
|
|
450
448
|
data.meta = {
|
451
|
-
|
452
|
-
|
453
|
-
|
449
|
+
content: '<video class="uk-responsive-width" src="'+source+'" width="'+width+'" height="'+height+'" controls></video>',
|
450
|
+
width: width,
|
451
|
+
height: height
|
454
452
|
};
|
455
453
|
|
456
454
|
data.type = 'video';
|
@@ -484,18 +482,18 @@
|
|
484
482
|
});
|
485
483
|
|
486
484
|
|
487
|
-
UIkit.plugin(
|
485
|
+
UIkit.plugin('lightbox', 'iframe', {
|
488
486
|
|
489
487
|
init: function (lightbox) {
|
490
488
|
|
491
|
-
lightbox.on(
|
489
|
+
lightbox.on('showitem.uk.lightbox', function (e, data) {
|
492
490
|
|
493
491
|
var resolve = function (source, width, height) {
|
494
492
|
|
495
493
|
data.meta = {
|
496
|
-
|
497
|
-
|
498
|
-
|
494
|
+
content: '<iframe class="uk-responsive-width" src="' + source + '" width="' + width + '" height="' + height + '"'+(modal.lightbox.options.allowfullscreen?' allowfullscreen':'')+'></iframe>',
|
495
|
+
width: width,
|
496
|
+
height: height
|
499
497
|
};
|
500
498
|
|
501
499
|
data.type = 'iframe';
|
@@ -536,15 +534,15 @@
|
|
536
534
|
modal.modal = UI.modal(modal, {modal:false});
|
537
535
|
|
538
536
|
// next / previous
|
539
|
-
modal.on(
|
537
|
+
modal.on('swipeRight swipeLeft', function(e) {
|
540
538
|
modal.lightbox[e.type=='swipeLeft' ? 'next':'previous']();
|
541
|
-
}).on(
|
539
|
+
}).on('click', '[data-lightbox-previous], [data-lightbox-next]', function(e){
|
542
540
|
e.preventDefault();
|
543
541
|
modal.lightbox[UI.$(this).is('[data-lightbox-next]') ? 'next':'previous']();
|
544
542
|
});
|
545
543
|
|
546
544
|
// destroy content on modal hide
|
547
|
-
modal.on(
|
545
|
+
modal.on('hide.uk.modal', function(e) {
|
548
546
|
modal.content.html('');
|
549
547
|
});
|
550
548
|
|
@@ -574,10 +572,10 @@
|
|
574
572
|
items.forEach(function(item) {
|
575
573
|
|
576
574
|
group.push(UI.$.extend({
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
575
|
+
source : '',
|
576
|
+
title : '',
|
577
|
+
type : 'auto',
|
578
|
+
link : false
|
581
579
|
}, (typeof(item) == 'string' ? {'source': item} : item)));
|
582
580
|
});
|
583
581
|
|