Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Commit 35c3341

Browse files
release 3.15.4
1 parent bb0fdb3 commit 35c3341

File tree

9 files changed

+52
-75
lines changed

9 files changed

+52
-75
lines changed

DETAILS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Additional details to supplement the brief nature of the README file.
2929

3030
Cloning the repository ensures you can apply future updates to Fuel UX easily, but requires to you manage its [dependencies](#dependencies) on your own.
3131

32-
* Download a .zip archive of the [latest release](http://www.fuelcdn.com/fuelux/3.15.2/fuelux.zip).
32+
* Download a .zip archive of the [latest release](http://www.fuelcdn.com/fuelux/3.15.3/fuelux.zip).
3333

3434
## AMD support
3535

@@ -39,7 +39,7 @@ If using AMD (such as [RequireJS](http://requirejs.org)), reference the FuelUX d
3939
```javascript
4040
require.config({
4141
paths: {
42-
'fuelux': 'http://www.fuelcdn.com/fuelux/3.15.2/'
42+
'fuelux': 'http://www.fuelcdn.com/fuelux/3.15.3/'
4343
//...
4444
}
4545
});

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ Add `fuelux` class to the portion of the page using Fuel UX as seen [here](https
3434
Ensure all the dependencies are included on the page (eg, such as using the CDN as shown below).
3535
```
3636
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
37-
<link href="//www.fuelcdn.com/fuelux/3.15.2/css/fuelux.min.css" rel="stylesheet">
37+
<link href="//www.fuelcdn.com/fuelux/3.15.3/css/fuelux.min.css" rel="stylesheet">
3838
3939
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.js"></script>
4040
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.1/js/bootstrap.min.js"></script>
41-
<script src="//www.fuelcdn.com/fuelux/3.15.2/js/fuelux.min.js"></script>
41+
<script src="//www.fuelcdn.com/fuelux/3.15.3/js/fuelux.min.js"></script>
4242
4343
```
4444

4545
#### The code you want is in `dist`
4646
A few ways available to install.
4747

48-
- Request files from [the Fuel UX CDN](http://www.fuelcdn.com/fuelux/3.15.2/)
48+
- Request files from [the Fuel UX CDN](http://www.fuelcdn.com/fuelux/3.15.3/)
4949
- Install with [NPM](https://www.npmjs.com/package/fuelux): `npm install fuelux`.
5050
- [Download the latest release](https://github.com/exacttarget/fuelux/archive/3.4.0.zip).
5151
- Clone the repo: `git clone https://github.com/exacttarget/fuelux.git`.

dist/css/fuelux.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/fuelux.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/fuelux.zip

-433 Bytes
Binary file not shown.

dist/js/fuelux.js

Lines changed: 36 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Fuel UX v3.15.3
2+
* Fuel UX v3.15.4
33
* Copyright 2012-2016 ExactTarget
44
* Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE)
55
*/
@@ -298,12 +298,22 @@
298298
},
299299

300300
doSelect: function( $item ) {
301+
301302
if ( typeof $item[ 0 ] !== 'undefined' ) {
302-
$item.addClass( 'selected' );
303+
// remove selection from old item, may result in remove and
304+
// re-addition of class if item is the same
305+
this.$element.find( 'li.selected:first' ).removeClass( 'selected' );
306+
307+
// add selection to new item
303308
this.$selectedItem = $item;
309+
this.$selectedItem.addClass( 'selected' );
310+
311+
// update input
304312
this.$input.val( this.$selectedItem.text().trim() );
305313
} else {
314+
// this is a custom input, not in the menu
306315
this.$selectedItem = null;
316+
this.$element.find( 'li.selected:first' ).removeClass( 'selected' );
307317
}
308318
},
309319

@@ -335,7 +345,8 @@
335345
}, this.$selectedItem.data() );
336346
} else {
337347
data = {
338-
text: this.$input.val().trim()
348+
text: this.$input.val().trim(),
349+
notFound: true
339350
};
340351
}
341352

@@ -447,7 +458,6 @@
447458
}
448459

449460
this.$inputGroupBtn.removeClass( 'open' );
450-
this.inputchanged( e );
451461
} else if ( e.which === ESC ) {
452462
e.preventDefault();
453463
this.clearSelection();
@@ -471,8 +481,7 @@
471481
$selected = this.$dropMenu.find( 'li:not(.hidden):last' );
472482
}
473483
}
474-
this.$dropMenu.find( 'li' ).removeClass( 'selected' );
475-
$selected.addClass( 'selected' );
484+
this.doSelect( $selected );
476485
}
477486
}
478487

@@ -485,10 +494,13 @@
485494
},
486495

487496
inputchanged: function( e, extra ) {
497+
var val = $( e.target ).val();
488498
// skip processing for internally-generated synthetic event
489499
// to avoid double processing
490-
if ( extra && extra.synthetic ) return;
491-
var val = $( e.target ).val();
500+
if ( extra && extra.synthetic ) {
501+
this.selectByText( val );
502+
return;
503+
}
492504
this.selectByText( val );
493505

494506
// find match based on input
@@ -2761,9 +2773,6 @@
27612773
this.$element.on( 'keydown.fu.spinbox', this.$input, $.proxy( this.keydown, this ) );
27622774
this.$element.on( 'keyup.fu.spinbox', this.$input, $.proxy( this.keyup, this ) );
27632775

2764-
this.bindMousewheelListeners();
2765-
this.mousewheelTimeout = {};
2766-
27672776
if ( this.options.hold ) {
27682777
this.$element.on( 'mousedown.fu.spinbox', '.spinbox-up', $.proxy( function() {
27692778
this.startSpin( true );
@@ -3068,47 +3077,8 @@
30683077
if ( keyCode === 38 || keyCode === 40 ) {
30693078
this.triggerChangedEvent();
30703079
}
3071-
},
3072-
3073-
bindMousewheelListeners: function bindMousewheelListeners() {
3074-
var inputEl = this.$input.get( 0 );
3075-
if ( inputEl.addEventListener ) {
3076-
//IE 9, Chrome, Safari, Opera
3077-
inputEl.addEventListener( 'mousewheel', $.proxy( this.mousewheelHandler, this ), false );
3078-
// Firefox
3079-
inputEl.addEventListener( 'DOMMouseScroll', $.proxy( this.mousewheelHandler, this ), false );
3080-
} else {
3081-
// IE <9
3082-
inputEl.attachEvent( 'onmousewheel', $.proxy( this.mousewheelHandler, this ) );
3083-
}
3084-
},
3085-
3086-
mousewheelHandler: function mousewheelHandler( event ) {
3087-
if ( !this.options.disabled ) {
3088-
var e = window.event || event; // old IE support
3089-
var delta = Math.max( -1, Math.min( 1, ( e.wheelDelta || -e.detail ) ) );
3090-
var self = this;
3091-
3092-
clearTimeout( this.mousewheelTimeout );
3093-
this.mousewheelTimeout = setTimeout( function() {
3094-
self.triggerChangedEvent();
3095-
}, 300 );
3096-
3097-
if ( delta < 0 ) {
3098-
this.step( true );
3099-
} else {
3100-
this.step( false );
3101-
}
3102-
3103-
if ( e.preventDefault ) {
3104-
e.preventDefault();
3105-
} else {
3106-
e.returnValue = false;
3107-
}
3108-
3109-
return false;
3110-
}
31113080
}
3081+
31123082
};
31133083

31143084

@@ -5251,8 +5221,7 @@
52515221
} );
52525222
this.$prevBtn.on( 'click.fu.repeater', $.proxy( this.previous, this ) );
52535223
this.$primaryPaging.find( '.combobox' ).on( 'changed.fu.combobox', function( evt, data ) {
5254-
self.$element.trigger( 'pageChanged.fu.repeater', [ data.text, data ] );
5255-
self.pageInputChange( data.text );
5224+
self.pageInputChange( data.text, data );
52565225
} );
52575226
this.$search.on( 'searched.fu.search cleared.fu.search', function( e, value ) {
52585227
self.$element.trigger( 'searchChanged.fu.repeater', value );
@@ -5628,13 +5597,15 @@
56285597
} );
56295598
},
56305599

5631-
pageInputChange: function( val ) {
5600+
pageInputChange: function( val, dataFromCombobox ) {
5601+
// dataFromCombobox is a proxy for data from combobox's changed event,
5602+
// if no combobox is present data will be undefined
56325603
var pageInc;
56335604
if ( val !== this.lastPageInput ) {
56345605
this.lastPageInput = val;
56355606
val = parseInt( val, 10 ) - 1;
56365607
pageInc = val - this.currentPage;
5637-
this.$element.trigger( 'pageChanged.fu.repeater', val );
5608+
this.$element.trigger( 'pageChanged.fu.repeater', [ val, dataFromCombobox ] );
56385609
this.render( {
56395610
pageIncrement: pageInc
56405611
} );
@@ -6568,6 +6539,13 @@
65686539
var self = this;
65696540
var $table;
65706541

6542+
// this is a patch, it was pulled out of `renderThead`
6543+
if ( helpers.data.count > 0 ) {
6544+
this.list_noItems = false;
6545+
} else {
6546+
this.list_noItems = true;
6547+
}
6548+
65716549
if ( $listContainer.length < 1 ) {
65726550
$listContainer = $( '<div class="repeater-list ' + this.list_specialBrowserClass + '" data-preserve="shallow"><div class="repeater-list-wrapper" data-infinite="true" data-preserve="shallow"><table aria-readonly="true" class="table" data-preserve="shallow" role="grid"></table></div></div>' );
65736551
$listContainer.find( '.repeater-list-wrapper' ).on( 'scroll.fu.repeaterList', function() {
@@ -6896,9 +6874,7 @@
68966874
if ( this.list_firstRender || areDifferentColumns( this.list_columns, columns ) || $thead.length === 0 ) {
68976875
$thead.remove();
68986876

6899-
if ( data.count < 1 ) {
6900-
this.list_noItems = true;
6901-
}
6877+
// list_noItems is set in `before` method
69026878

69036879
if ( this.viewOptions.list_selectable === 'multi' && !this.list_noItems ) {
69046880
var checkboxColumn = {
@@ -6913,7 +6889,8 @@
69136889
this.list_firstRender = false;
69146890
this.$loader.removeClass( 'noHeader' );
69156891

6916-
if ( this.viewOptions.list_actions && !this.list_noItems ) {
6892+
// keep action column header even when empty, you'll need it later....
6893+
if ( this.viewOptions.list_actions ) {
69176894
var actionsColumn = {
69186895
label: this.viewOptions.list_actions.label || '<span class="actions-hidden">a</span>',
69196896
property: '@_ACTIONS_@',

dist/js/fuelux.min.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/templates/handlebars/fuelux/tree.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</div>
1111
<ul class="tree-branch-children" role="group"></ul>
1212
<!-- this loader shows on nested folders and when overflow is triggered -->
13-
{{#if loaderHTML }}{{loaderHTML}}{{else}}<div class="tree-loader hidden" role="alert">Loading...</div>{{/if}}
13+
{{#if loaderHTML }}{{loaderHTML}}{{else}}<div class="tree-loader hidden"><span role="alert">Loading...</span></div>{{/if}}
1414
</li>
1515
<li class="tree-item hidden" data-template="treeitem" role="treeitem">
1616
<button type="button" class="tree-item-name">
@@ -25,5 +25,5 @@
2525
</button>
2626
</li>
2727
<!-- Loader shown at root level and when tree is loading -->
28-
{{#if initialLoaderHTML}}{{initialLoaderHTML}}{{else}}{{#if loaderHTML }}{{loaderHTML}}{{else}}<li class="tree-loader hidden" role="alert">Loading...</li>{{/if}}{{/if}}
28+
{{#if initialLoaderHTML}}{{initialLoaderHTML}}{{else}}{{#if loaderHTML }}{{loaderHTML}}{{else}}<li class="tree-loader hidden"><span role="alert">Loading...</span></li>{{/if}}{{/if}}
2929
</ul>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"postinstall": "node postinstall.js"
8484
},
8585
"title": "Fuel UX",
86-
"version": "3.15.3",
86+
"version": "3.15.4",
8787
"volo": {
8888
"baseDir": "lib",
8989
"dependencies": {

0 commit comments

Comments
 (0)