less-rails-semantic_ui 1.8.1.0 → 1.9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/assets/fonts/semantic_ui/themes/default/assets/fonts/icons.eot +0 -0
- data/assets/fonts/semantic_ui/themes/default/assets/fonts/icons.otf +0 -0
- data/assets/fonts/semantic_ui/themes/default/assets/fonts/icons.svg +526 -465
- data/assets/fonts/semantic_ui/themes/default/assets/fonts/icons.ttf +0 -0
- data/assets/fonts/semantic_ui/themes/default/assets/fonts/icons.woff +0 -0
- data/assets/fonts/semantic_ui/themes/default/assets/fonts/icons.woff2 +0 -0
- data/assets/images/semantic_ui/themes/default/assets/images/flags.png +0 -0
- data/assets/javascripts/semantic_ui/definitions/behaviors/api.js +6 -3
- data/assets/javascripts/semantic_ui/definitions/behaviors/form.js +65 -22
- data/assets/javascripts/semantic_ui/definitions/behaviors/state.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/behaviors/visibility.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/behaviors/visit.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/modules/accordion.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/modules/checkbox.js +3 -1
- data/assets/javascripts/semantic_ui/definitions/modules/dimmer.js +12 -10
- data/assets/javascripts/semantic_ui/definitions/modules/dropdown.js +28 -3
- data/assets/javascripts/semantic_ui/definitions/modules/modal.js +10 -14
- data/assets/javascripts/semantic_ui/definitions/modules/nag.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/modules/popup.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/modules/progress.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/modules/rating.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/modules/search.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/modules/shape.js +1 -1
- data/assets/javascripts/semantic_ui/definitions/modules/sidebar.js +4 -4
- data/assets/javascripts/semantic_ui/definitions/modules/sticky.js +4 -2
- data/assets/javascripts/semantic_ui/definitions/modules/tab.js +13 -11
- data/assets/javascripts/semantic_ui/definitions/modules/transition.js +13 -7
- data/assets/javascripts/semantic_ui/definitions/modules/video.js +1 -1
- data/assets/stylesheets/semantic_ui/definitions/collections/breadcrumb.less +7 -2
- data/assets/stylesheets/semantic_ui/definitions/collections/form.less +40 -30
- data/assets/stylesheets/semantic_ui/definitions/collections/grid.less +6 -2
- data/assets/stylesheets/semantic_ui/definitions/collections/menu.less +18 -11
- data/assets/stylesheets/semantic_ui/definitions/collections/message.less +6 -2
- data/assets/stylesheets/semantic_ui/definitions/collections/table.less +6 -1
- data/assets/stylesheets/semantic_ui/definitions/elements/button.less +8 -3
- data/assets/stylesheets/semantic_ui/definitions/elements/divider.less +7 -4
- data/assets/stylesheets/semantic_ui/definitions/elements/flag.less +13 -1
- data/assets/stylesheets/semantic_ui/definitions/elements/header.less +36 -9
- data/assets/stylesheets/semantic_ui/definitions/elements/icon.less +11 -4
- data/assets/stylesheets/semantic_ui/definitions/elements/image.less +7 -2
- data/assets/stylesheets/semantic_ui/definitions/elements/input.less +17 -46
- data/assets/stylesheets/semantic_ui/definitions/elements/label.less +39 -7
- data/assets/stylesheets/semantic_ui/definitions/elements/list.less +5 -1
- data/assets/stylesheets/semantic_ui/definitions/elements/loader.less +4 -2
- data/assets/stylesheets/semantic_ui/definitions/elements/rail.less +8 -4
- data/assets/stylesheets/semantic_ui/definitions/elements/reveal.less +5 -1
- data/assets/stylesheets/semantic_ui/definitions/elements/segment.less +45 -1
- data/assets/stylesheets/semantic_ui/definitions/elements/step.less +13 -5
- data/assets/stylesheets/semantic_ui/definitions/globals/reset.less +6 -2
- data/assets/stylesheets/semantic_ui/definitions/globals/site.less +8 -3
- data/assets/stylesheets/semantic_ui/definitions/modules/accordion.less +5 -2
- data/assets/stylesheets/semantic_ui/definitions/modules/checkbox.less +5 -2
- data/assets/stylesheets/semantic_ui/definitions/modules/dimmer.less +5 -2
- data/assets/stylesheets/semantic_ui/definitions/modules/dropdown.less +17 -8
- data/assets/stylesheets/semantic_ui/definitions/modules/modal.less +7 -2
- data/assets/stylesheets/semantic_ui/definitions/modules/nag.less +6 -1
- data/assets/stylesheets/semantic_ui/definitions/modules/popup.less +7 -1
- data/assets/stylesheets/semantic_ui/definitions/modules/progress.less +20 -2
- data/assets/stylesheets/semantic_ui/definitions/modules/rating.less +10 -15
- data/assets/stylesheets/semantic_ui/definitions/modules/search.less +7 -2
- data/assets/stylesheets/semantic_ui/definitions/modules/shape.less +6 -1
- data/assets/stylesheets/semantic_ui/definitions/modules/sidebar.less +16 -6
- data/assets/stylesheets/semantic_ui/definitions/modules/sticky.less +7 -1
- data/assets/stylesheets/semantic_ui/definitions/modules/tab.less +7 -1
- data/assets/stylesheets/semantic_ui/definitions/modules/transition.less +6 -5
- data/assets/stylesheets/semantic_ui/definitions/modules/video.less +6 -1
- data/assets/stylesheets/semantic_ui/definitions/views/ad.less +6 -1
- data/assets/stylesheets/semantic_ui/definitions/views/card.less +182 -7
- data/assets/stylesheets/semantic_ui/definitions/views/comment.less +6 -1
- data/assets/stylesheets/semantic_ui/definitions/views/feed.less +6 -2
- data/assets/stylesheets/semantic_ui/definitions/views/item.less +6 -2
- data/assets/stylesheets/semantic_ui/definitions/views/statistic.less +5 -2
- data/assets/stylesheets/semantic_ui/themes/basic/views/card.variables +1 -2
- data/assets/stylesheets/semantic_ui/themes/default/collections/breadcrumb.variables +2 -2
- data/assets/stylesheets/semantic_ui/themes/default/collections/form.variables +1 -1
- data/assets/stylesheets/semantic_ui/themes/default/collections/menu.variables +1 -0
- data/assets/stylesheets/semantic_ui/themes/default/elements/button.variables +6 -1
- data/assets/stylesheets/semantic_ui/themes/default/elements/header.variables +11 -1
- data/assets/stylesheets/semantic_ui/themes/default/elements/icon.overrides +139 -24
- data/assets/stylesheets/semantic_ui/themes/default/elements/label.variables +8 -1
- data/assets/stylesheets/semantic_ui/themes/default/elements/rail.variables +3 -1
- data/assets/stylesheets/semantic_ui/themes/default/modules/dropdown.overrides +5 -0
- data/assets/stylesheets/semantic_ui/themes/default/modules/dropdown.variables +8 -0
- data/assets/stylesheets/semantic_ui/themes/default/modules/progress.variables +1 -1
- data/assets/stylesheets/semantic_ui/themes/default/modules/rating.overrides +0 -1
- data/assets/stylesheets/semantic_ui/themes/default/modules/rating.variables +6 -6
- data/assets/stylesheets/semantic_ui/themes/default/modules/transition.overrides +54 -56
- data/assets/stylesheets/semantic_ui/themes/default/views/card.variables +18 -15
- data/lib/generators/semantic_ui/install/templates/theme.config +21 -13
- data/lib/less/rails/semantic_ui/engine.rb +1 -1
- data/lib/less/rails/semantic_ui/version.rb +1 -1
- data/tasks/update.rake +2 -2
- metadata +4 -3
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -186,13 +186,15 @@ $.api = $.fn.api = function(parameters) {
|
|
186
186
|
// throttle additional requests
|
187
187
|
module.timer = setTimeout(function() {
|
188
188
|
module.request = module.create.request();
|
189
|
-
module.xhr
|
189
|
+
module.xhr = module.create.xhr();
|
190
|
+
settings.onRequest.call(context, module.request, module.xhr);
|
190
191
|
}, settings.throttle);
|
191
192
|
}
|
192
193
|
else {
|
193
194
|
// immediately on first request
|
194
195
|
module.request = module.create.request();
|
195
|
-
module.xhr
|
196
|
+
module.xhr = module.create.xhr();
|
197
|
+
settings.onRequest.call(context, module.request, module.xhr);
|
196
198
|
}
|
197
199
|
|
198
200
|
},
|
@@ -746,7 +748,7 @@ $.api = $.fn.api = function(parameters) {
|
|
746
748
|
}
|
747
749
|
else {
|
748
750
|
if(instance !== undefined) {
|
749
|
-
|
751
|
+
instance.invoke('destroy');
|
750
752
|
}
|
751
753
|
module.initialize();
|
752
754
|
}
|
@@ -799,6 +801,7 @@ $.api.settings = {
|
|
799
801
|
beforeSend : function(settings) { return settings; },
|
800
802
|
beforeXHR : function(xhr) {},
|
801
803
|
|
804
|
+
onRequest : function(promise, xhr) {},
|
802
805
|
onSuccess : function(response, $module) {},
|
803
806
|
onComplete : function(response, $module) {},
|
804
807
|
onFailure : function(errorMessage, $module) {},
|
@@ -313,11 +313,23 @@ $.fn.form = function(fields, parameters) {
|
|
313
313
|
else if( $field.filter('[name="' + identifier +'"]').length > 0 ) {
|
314
314
|
return $field.filter('[name="' + identifier +'"]');
|
315
315
|
}
|
316
|
+
else if( $field.filter('[name="' + identifier +'[]"]').length > 0 ) {
|
317
|
+
return $field.filter('[name="' + identifier +'[]"]');
|
318
|
+
}
|
316
319
|
else if( $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]').length > 0 ) {
|
317
320
|
return $field.filter('[data-' + metadata.validate + '="'+ identifier +'"]');
|
318
321
|
}
|
319
322
|
return $('<input/>');
|
320
323
|
},
|
324
|
+
fields: function(fields) {
|
325
|
+
var
|
326
|
+
$fields = $()
|
327
|
+
;
|
328
|
+
$.each(fields, function(index, name) {
|
329
|
+
$fields = $fields.add( module.get.field(name) );
|
330
|
+
});
|
331
|
+
return $fields;
|
332
|
+
},
|
321
333
|
validation: function($field) {
|
322
334
|
var
|
323
335
|
rules
|
@@ -340,43 +352,61 @@ $.fn.form = function(fields, parameters) {
|
|
340
352
|
},
|
341
353
|
values: function (fields) {
|
342
354
|
var
|
355
|
+
$fields = $.isArray(fields)
|
356
|
+
? module.get.fields(fields)
|
357
|
+
: $field,
|
343
358
|
values = {}
|
344
359
|
;
|
345
|
-
|
346
|
-
if(!$.isArray(fields)) {
|
347
|
-
fields = $field;
|
348
|
-
}
|
349
|
-
$.each(fields, function(index, field) {
|
360
|
+
$fields.each(function(index, field) {
|
350
361
|
var
|
351
|
-
$field = (
|
352
|
-
? module.get.field(field)
|
353
|
-
: $(field),
|
362
|
+
$field = $(field),
|
354
363
|
type = $field.prop('type'),
|
355
364
|
name = $field.prop('name'),
|
356
365
|
value = $field.val(),
|
357
366
|
isCheckbox = $field.is(selector.checkbox),
|
358
367
|
isRadio = $field.is(selector.radio),
|
368
|
+
isMultiple = (name.indexOf('[]') !== -1),
|
359
369
|
isChecked = (isCheckbox)
|
360
370
|
? $field.is(':checked')
|
361
371
|
: false
|
362
372
|
;
|
363
373
|
if(name) {
|
364
|
-
if(
|
365
|
-
|
366
|
-
|
374
|
+
if(isMultiple) {
|
375
|
+
name = name.replace('[]', '');
|
376
|
+
if(!values[name]) {
|
377
|
+
values[name] = [];
|
367
378
|
}
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
379
|
+
if(isCheckbox) {
|
380
|
+
if(isChecked) {
|
381
|
+
values[name].push(value)
|
382
|
+
}
|
383
|
+
else {
|
384
|
+
module.debug('Omitted unchecked checkbox', $field);
|
385
|
+
return true;
|
386
|
+
}
|
372
387
|
}
|
373
388
|
else {
|
374
|
-
|
375
|
-
return true;
|
389
|
+
values[name].push(value);
|
376
390
|
}
|
377
391
|
}
|
378
392
|
else {
|
379
|
-
|
393
|
+
if(isRadio) {
|
394
|
+
if(isChecked) {
|
395
|
+
values[name] = value;
|
396
|
+
}
|
397
|
+
}
|
398
|
+
else if(isCheckbox) {
|
399
|
+
if(isChecked) {
|
400
|
+
values[name] = true;
|
401
|
+
}
|
402
|
+
else {
|
403
|
+
module.debug('Omitted unchecked checkbox', $field);
|
404
|
+
return true;
|
405
|
+
}
|
406
|
+
}
|
407
|
+
else {
|
408
|
+
values[name] = value;
|
409
|
+
}
|
380
410
|
}
|
381
411
|
}
|
382
412
|
});
|
@@ -523,13 +553,26 @@ $.fn.form = function(fields, parameters) {
|
|
523
553
|
var
|
524
554
|
$field = module.get.field(key),
|
525
555
|
$element = $field.parent(),
|
556
|
+
isMultiple = $.isArray(value),
|
526
557
|
isCheckbox = $element.is(selector.uiCheckbox),
|
527
558
|
isDropdown = $element.is(selector.uiDropdown),
|
528
|
-
isRadio = $field.is(selector.radio),
|
529
|
-
fieldExists = ($field.length > 0)
|
559
|
+
isRadio = ($field.is(selector.radio) && isCheckbox),
|
560
|
+
fieldExists = ($field.length > 0),
|
561
|
+
$multipleField
|
530
562
|
;
|
531
563
|
if(fieldExists) {
|
532
|
-
if(
|
564
|
+
if(isMultiple && isCheckbox) {
|
565
|
+
module.verbose('Selecting multiple', value, $field);
|
566
|
+
$element.checkbox('uncheck');
|
567
|
+
$.each(value, function(index, value) {
|
568
|
+
$multipleField = $field.filter('[value="' + value + '"]');
|
569
|
+
$element = $multipleField.parent();
|
570
|
+
if($multipleField.length > 0) {
|
571
|
+
$element.checkbox('check');
|
572
|
+
}
|
573
|
+
});
|
574
|
+
}
|
575
|
+
else if(isRadio) {
|
533
576
|
module.verbose('Selecting radio value', value, $field);
|
534
577
|
$field.filter('[value="' + value + '"]')
|
535
578
|
.parent(selector.uiCheckbox)
|
@@ -826,7 +869,7 @@ $.fn.form = function(fields, parameters) {
|
|
826
869
|
}
|
827
870
|
else {
|
828
871
|
if(instance !== undefined) {
|
829
|
-
|
872
|
+
instance.invoke('destroy');
|
830
873
|
}
|
831
874
|
module.initialize();
|
832
875
|
}
|
@@ -261,6 +261,7 @@ $.fn.checkbox = function(parameters) {
|
|
261
261
|
.trigger('change')
|
262
262
|
;
|
263
263
|
module.set.checked();
|
264
|
+
$input.trigger('blur');
|
264
265
|
settings.onChange.call($input.get());
|
265
266
|
settings.onChecked.call($input.get());
|
266
267
|
},
|
@@ -272,6 +273,7 @@ $.fn.checkbox = function(parameters) {
|
|
272
273
|
.trigger('change')
|
273
274
|
;
|
274
275
|
module.remove.checked();
|
276
|
+
$input.trigger('blur');
|
275
277
|
settings.onChange.call($input.get());
|
276
278
|
settings.onUnchecked.call($input.get());
|
277
279
|
},
|
@@ -454,7 +456,7 @@ $.fn.checkbox = function(parameters) {
|
|
454
456
|
}
|
455
457
|
else {
|
456
458
|
if(instance !== undefined) {
|
457
|
-
|
459
|
+
instance.invoke('destroy');
|
458
460
|
}
|
459
461
|
module.initialize();
|
460
462
|
}
|
@@ -215,13 +215,14 @@ $.fn.dimmer = function(parameters) {
|
|
215
215
|
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
|
216
216
|
$dimmer
|
217
217
|
.transition({
|
218
|
-
animation
|
218
|
+
animation : settings.transition + ' in',
|
219
219
|
queue : false,
|
220
|
-
duration
|
221
|
-
|
220
|
+
duration : module.get.duration(),
|
221
|
+
useFailSafe : true,
|
222
|
+
onStart : function() {
|
222
223
|
module.set.dimmed();
|
223
224
|
},
|
224
|
-
onComplete
|
225
|
+
onComplete : function() {
|
225
226
|
module.set.active();
|
226
227
|
callback();
|
227
228
|
}
|
@@ -255,13 +256,14 @@ $.fn.dimmer = function(parameters) {
|
|
255
256
|
module.verbose('Hiding dimmer with css');
|
256
257
|
$dimmer
|
257
258
|
.transition({
|
258
|
-
animation
|
259
|
-
queue
|
260
|
-
duration
|
261
|
-
|
259
|
+
animation : settings.transition + ' out',
|
260
|
+
queue : false,
|
261
|
+
duration : module.get.duration(),
|
262
|
+
useFailSafe : true,
|
263
|
+
onStart : function() {
|
262
264
|
module.remove.dimmed();
|
263
265
|
},
|
264
|
-
onComplete
|
266
|
+
onComplete : function() {
|
265
267
|
module.remove.active();
|
266
268
|
callback();
|
267
269
|
}
|
@@ -557,7 +559,7 @@ $.fn.dimmer = function(parameters) {
|
|
557
559
|
}
|
558
560
|
else {
|
559
561
|
if(instance !== undefined) {
|
560
|
-
|
562
|
+
instance.invoke('destroy');
|
561
563
|
}
|
562
564
|
module.initialize();
|
563
565
|
}
|
@@ -445,6 +445,20 @@ $.fn.dropdown = function(parameters) {
|
|
445
445
|
}
|
446
446
|
},
|
447
447
|
|
448
|
+
forceSelection: function() {
|
449
|
+
var
|
450
|
+
$currentlySelected = $item.not(className.filtered).filter('.' + className.selected).eq(0),
|
451
|
+
$activeItem = $item.filter('.' + className.active).eq(0),
|
452
|
+
$selectedItem = ($currentlySelected.length > 0)
|
453
|
+
? $currentlySelected
|
454
|
+
: $activeItem,
|
455
|
+
hasSelected = ($selectedItem.size() > 0)
|
456
|
+
;
|
457
|
+
if(hasSelected) {
|
458
|
+
module.event.item.click.call($selectedItem);
|
459
|
+
}
|
460
|
+
},
|
461
|
+
|
448
462
|
event: {
|
449
463
|
// prevents focus callback from occuring on mousedown
|
450
464
|
mousedown: function() {
|
@@ -475,7 +489,12 @@ $.fn.dropdown = function(parameters) {
|
|
475
489
|
pageLostFocus = (document.activeElement === this)
|
476
490
|
;
|
477
491
|
if(!itemActivated && !pageLostFocus) {
|
478
|
-
|
492
|
+
if(settings.forceSelection) {
|
493
|
+
module.forceSelection();
|
494
|
+
}
|
495
|
+
else {
|
496
|
+
module.hide();
|
497
|
+
}
|
479
498
|
}
|
480
499
|
},
|
481
500
|
searchTextFocus: function(event) {
|
@@ -687,7 +706,9 @@ $.fn.dropdown = function(parameters) {
|
|
687
706
|
click: function (event) {
|
688
707
|
var
|
689
708
|
$choice = $(this),
|
690
|
-
$target =
|
709
|
+
$target = (event)
|
710
|
+
? $(event.target)
|
711
|
+
: $(''),
|
691
712
|
$subMenu = $choice.find(selector.menu),
|
692
713
|
text = module.get.choiceText($choice),
|
693
714
|
value = module.get.choiceValue($choice, text),
|
@@ -1378,6 +1399,8 @@ $.fn.dropdown = function(parameters) {
|
|
1378
1399
|
;
|
1379
1400
|
}
|
1380
1401
|
|
1402
|
+
$input.trigger('blur');
|
1403
|
+
|
1381
1404
|
if(settings.transition == 'none') {
|
1382
1405
|
callback.call(element);
|
1383
1406
|
}
|
@@ -1617,7 +1640,7 @@ $.fn.dropdown = function(parameters) {
|
|
1617
1640
|
}
|
1618
1641
|
else {
|
1619
1642
|
if(instance !== undefined) {
|
1620
|
-
|
1643
|
+
instance.invoke('destroy');
|
1621
1644
|
}
|
1622
1645
|
module.initialize();
|
1623
1646
|
}
|
@@ -1653,6 +1676,8 @@ $.fn.dropdown.settings = {
|
|
1653
1676
|
touch : 50
|
1654
1677
|
},
|
1655
1678
|
|
1679
|
+
forceSelection: true,
|
1680
|
+
|
1656
1681
|
transition : 'auto',
|
1657
1682
|
duration : 250,
|
1658
1683
|
|
@@ -186,12 +186,8 @@ $.fn.modal = function(parameters) {
|
|
186
186
|
|
187
187
|
bind: {
|
188
188
|
events: function() {
|
189
|
-
$close
|
190
|
-
|
191
|
-
;
|
192
|
-
$window
|
193
|
-
.on('resize' + elementNamespace, module.event.resize)
|
194
|
-
;
|
189
|
+
$close.on('click' + eventNamespace, module.event.close);
|
190
|
+
$window.on('resize' + elementNamespace, module.event.resize);
|
195
191
|
}
|
196
192
|
},
|
197
193
|
|
@@ -530,7 +526,7 @@ $.fn.modal = function(parameters) {
|
|
530
526
|
|
531
527
|
can: {
|
532
528
|
fit: function() {
|
533
|
-
return (module.cache.height < module.cache.contextHeight);
|
529
|
+
return ( ( module.cache.height + (settings.padding * 2) ) < module.cache.contextHeight);
|
534
530
|
}
|
535
531
|
},
|
536
532
|
|
@@ -574,15 +570,15 @@ $.fn.modal = function(parameters) {
|
|
574
570
|
}
|
575
571
|
},
|
576
572
|
screenHeight: function() {
|
577
|
-
if(
|
573
|
+
if( module.can.fit() ) {
|
574
|
+
$body.css('height', '');
|
575
|
+
}
|
576
|
+
else {
|
578
577
|
module.debug('Modal is taller than page content, resizing page height');
|
579
578
|
$body
|
580
|
-
.css('height', module.cache.height + settings.padding)
|
579
|
+
.css('height', module.cache.height + (settings.padding / 2) )
|
581
580
|
;
|
582
581
|
}
|
583
|
-
else {
|
584
|
-
$body.css('height', '');
|
585
|
-
}
|
586
582
|
},
|
587
583
|
active: function() {
|
588
584
|
$module.addClass(className.active);
|
@@ -787,7 +783,7 @@ $.fn.modal = function(parameters) {
|
|
787
783
|
}
|
788
784
|
else {
|
789
785
|
if(instance !== undefined) {
|
790
|
-
|
786
|
+
instance.invoke('destroy');
|
791
787
|
}
|
792
788
|
module.initialize();
|
793
789
|
}
|
@@ -827,7 +823,7 @@ $.fn.modal.settings = {
|
|
827
823
|
offset : 0,
|
828
824
|
transition : 'scale',
|
829
825
|
|
830
|
-
padding :
|
826
|
+
padding : 50,
|
831
827
|
|
832
828
|
onShow : function(){},
|
833
829
|
onHide : function(){},
|
@@ -253,7 +253,7 @@ $.fn.sidebar = function(parameters) {
|
|
253
253
|
if(direction === 'left' || direction === 'right') {
|
254
254
|
module.debug('Adding CSS rules for animation distance', width);
|
255
255
|
style += ''
|
256
|
-
+ ' .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
|
256
|
+
+ ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
|
257
257
|
+ ' -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);'
|
258
258
|
+ ' transform: translate3d('+ distance[direction] + 'px, 0, 0);'
|
259
259
|
+ ' }'
|
@@ -261,7 +261,7 @@ $.fn.sidebar = function(parameters) {
|
|
261
261
|
}
|
262
262
|
else if(direction === 'top' || direction == 'bottom') {
|
263
263
|
style += ''
|
264
|
-
+ ' .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
|
264
|
+
+ ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
|
265
265
|
+ ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'
|
266
266
|
+ ' transform: translate3d(0, ' + distance[direction] + 'px, 0);'
|
267
267
|
+ ' }'
|
@@ -269,8 +269,8 @@ $.fn.sidebar = function(parameters) {
|
|
269
269
|
}
|
270
270
|
/* opposite sides visible forces content overlay */
|
271
271
|
style += ''
|
272
|
-
+ ' .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'
|
273
|
-
+ ' .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'
|
272
|
+
+ ' body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'
|
273
|
+
+ ' body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'
|
274
274
|
+ ' -webkit-transform: translate3d(0px, 0, 0);'
|
275
275
|
+ ' transform: translate3d(0px, 0, 0);'
|
276
276
|
+ ' }'
|
@@ -309,7 +309,9 @@ $.fn.sticky = function(parameters) {
|
|
309
309
|
}
|
310
310
|
else {
|
311
311
|
module.debug('Settings container size', module.cache.context.height);
|
312
|
-
$container.height(module.cache.context.height)
|
312
|
+
if( Math.abs($container.height() - module.cache.context.height) > 5) {
|
313
|
+
$container.height(module.cache.context.height);
|
314
|
+
}
|
313
315
|
}
|
314
316
|
},
|
315
317
|
scroll: function(scroll) {
|
@@ -717,7 +719,7 @@ $.fn.sticky = function(parameters) {
|
|
717
719
|
}
|
718
720
|
else {
|
719
721
|
if(instance !== undefined) {
|
720
|
-
|
722
|
+
instance.invoke('destroy');
|
721
723
|
}
|
722
724
|
module.initialize();
|
723
725
|
}
|
@@ -77,7 +77,7 @@ $.fn.tab = function(parameters) {
|
|
77
77
|
if(settings.auto) {
|
78
78
|
module.verbose('Setting up automatic tab retrieval from server');
|
79
79
|
settings.apiSettings = {
|
80
|
-
url: settings.path + '/{$tab}'
|
80
|
+
url: (settings.path || '') + '/{$tab}'
|
81
81
|
};
|
82
82
|
}
|
83
83
|
|
@@ -270,10 +270,10 @@ $.fn.tab = function(parameters) {
|
|
270
270
|
;
|
271
271
|
module.verbose('Looking for tab', tab);
|
272
272
|
if(isTab) {
|
273
|
-
module.verbose('Tab was found', tab);
|
274
273
|
|
274
|
+
module.verbose('Tab was found', tab);
|
275
275
|
// scope up
|
276
|
-
activeTabPath
|
276
|
+
activeTabPath = currentPath;
|
277
277
|
parameterArray = module.utilities.filterArray(pathArray, currentPathArray);
|
278
278
|
|
279
279
|
if(isLastIndex) {
|
@@ -341,11 +341,11 @@ $.fn.tab = function(parameters) {
|
|
341
341
|
|
342
342
|
fetch: function(tabPath, fullTabPath) {
|
343
343
|
var
|
344
|
-
$tab
|
345
|
-
apiSettings
|
346
|
-
dataType
|
347
|
-
|
348
|
-
onSuccess
|
344
|
+
$tab = module.get.tabElement(tabPath),
|
345
|
+
apiSettings = {
|
346
|
+
dataType : 'html',
|
347
|
+
on : 'now',
|
348
|
+
onSuccess : function(response) {
|
349
349
|
module.cache.add(fullTabPath, response);
|
350
350
|
module.content.update(tabPath, response);
|
351
351
|
if(tabPath == activeTabPath) {
|
@@ -360,7 +360,7 @@ $.fn.tab = function(parameters) {
|
|
360
360
|
},
|
361
361
|
urlData: { tab: fullTabPath }
|
362
362
|
},
|
363
|
-
request = $tab.
|
363
|
+
request = $tab.api('get request') || false,
|
364
364
|
existingRequest = ( request && request.state() === 'pending' ),
|
365
365
|
requestSettings,
|
366
366
|
cachedContent
|
@@ -369,6 +369,7 @@ $.fn.tab = function(parameters) {
|
|
369
369
|
fullTabPath = fullTabPath || tabPath;
|
370
370
|
cachedContent = module.cache.read(fullTabPath);
|
371
371
|
|
372
|
+
|
372
373
|
if(settings.cache && cachedContent) {
|
373
374
|
module.debug('Showing existing content', fullTabPath);
|
374
375
|
module.content.update(tabPath, cachedContent);
|
@@ -384,7 +385,8 @@ $.fn.tab = function(parameters) {
|
|
384
385
|
else if($.api !== undefined) {
|
385
386
|
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
|
386
387
|
module.debug('Retrieving remote content', fullTabPath, requestSettings);
|
387
|
-
|
388
|
+
console.log(existingRequest, requestSettings, cachedContent);
|
389
|
+
$tab.api( requestSettings );
|
388
390
|
}
|
389
391
|
else {
|
390
392
|
module.error(error.api);
|
@@ -705,7 +707,7 @@ $.fn.tab = function(parameters) {
|
|
705
707
|
}
|
706
708
|
else {
|
707
709
|
if(instance !== undefined) {
|
708
|
-
|
710
|
+
instance.invoke('destroy');
|
709
711
|
}
|
710
712
|
module.initialize();
|
711
713
|
}
|
@@ -62,23 +62,28 @@ $.fn.transition = function() {
|
|
62
62
|
initialize: function() {
|
63
63
|
|
64
64
|
// get full settings
|
65
|
-
moduleNamespace = 'module-' + namespace;
|
66
65
|
settings = module.get.settings.apply(element, moduleArguments);
|
66
|
+
|
67
|
+
// shorthand
|
67
68
|
className = settings.className;
|
69
|
+
error = settings.error;
|
68
70
|
metadata = settings.metadata;
|
69
71
|
|
70
|
-
|
71
|
-
animationEnd = module.get.animationEndEvent();
|
72
|
-
animationName = module.get.animationName();
|
73
|
-
error = settings.error;
|
74
|
-
namespace = settings.namespace;
|
72
|
+
// define namespace
|
75
73
|
eventNamespace = '.' + settings.namespace;
|
74
|
+
moduleNamespace = 'module-' + settings.namespace;
|
76
75
|
instance = $module.data(moduleNamespace) || module;
|
77
76
|
|
77
|
+
// get vendor specific events
|
78
|
+
animationEnd = module.get.animationEndEvent();
|
79
|
+
animationName = module.get.animationName();
|
80
|
+
animationStart = module.get.animationStartEvent();
|
81
|
+
|
78
82
|
if(methodInvoked) {
|
79
83
|
methodInvoked = module.invoke(query);
|
80
84
|
}
|
81
|
-
|
85
|
+
|
86
|
+
// method not invoked, lets run an animation
|
82
87
|
if(methodInvoked === false) {
|
83
88
|
module.verbose('Converted arguments into settings object', settings);
|
84
89
|
module.animate();
|
@@ -88,6 +93,7 @@ $.fn.transition = function() {
|
|
88
93
|
|
89
94
|
instantiate: function() {
|
90
95
|
module.verbose('Storing instance of module', module);
|
96
|
+
instance = module;
|
91
97
|
$module
|
92
98
|
.data(moduleNamespace, instance)
|
93
99
|
;
|