|
1 | 1 | /*! |
2 | | - * Fuel UX v3.9.0 |
| 2 | + * Fuel UX v3.9.1 |
3 | 3 | * Copyright 2012-2015 ExactTarget |
4 | 4 | * Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE) |
5 | 5 | */ |
|
623 | 623 | if ( |
624 | 624 | ( $.isFunction( window.moment ) || ( typeof moment !== 'undefined' && $.isFunction( moment ) ) ) && |
625 | 625 | $.isPlainObject( this.options.momentConfig ) && |
626 | | - this.options.momentConfig.culture && this.options.momentConfig.format |
| 626 | + ( typeof this.options.momentConfig.culture === 'string' && typeof this.options.momentConfig.format === 'string' ) |
627 | 627 | ) { |
628 | 628 | return true; |
629 | 629 | } else { |
|
5540 | 5540 | var opts = {}; |
5541 | 5541 | var viewName = curView.split( '.' )[ 1 ]; |
5542 | 5542 |
|
5543 | | - if ( viewName && this.options.views ) { |
| 5543 | + if ( this.options.views ) { |
5544 | 5544 | opts = this.options.views[ viewName ] || this.options.views[ curView ] || {}; |
5545 | 5545 | } else { |
5546 | 5546 | opts = {}; |
|
5899 | 5899 | }; |
5900 | 5900 |
|
5901 | 5901 | $.fn.repeater.Constructor.prototype.list_sizeActionsTable = function() { |
5902 | | - var $table = this.$element.find( '.repeater-list table' ); |
5903 | | - $table.find( 'thead th' ).each( function() { |
5904 | | - var $hr = $( this ); |
5905 | | - var $heading = $hr.find( '.repeater-list-heading' ); |
5906 | | - $heading.outerHeight( $hr.outerHeight() ); |
5907 | | - } ); |
| 5902 | + var $table = this.$element.find( '.repeater-list-wrapper > table' ); |
| 5903 | + var $actionsTableHeading = this.$element.find( '.repeater-list-wrapper .actions-column-wrapper thead th .repeater-list-heading' ); |
| 5904 | + $actionsTableHeading.outerHeight( $table.find( 'thead th .repeater-list-heading' ).outerHeight() ); |
5908 | 5905 | }; |
5909 | 5906 |
|
5910 | 5907 | //ADDITIONAL DEFAULT OPTIONS |
|
6210 | 6207 |
|
6211 | 6208 | function renderThead( $table, data ) { |
6212 | 6209 | var columns = data.columns || []; |
6213 | | - var i, j, l, $thead, $tr; |
| 6210 | + var $thead = $table.find( 'thead' ); |
| 6211 | + var i, j, l, $tr; |
6214 | 6212 |
|
6215 | 6213 | function differentColumns( oldCols, newCols ) { |
6216 | 6214 | if ( !newCols ) { |
|
6235 | 6233 | return false; |
6236 | 6234 | } |
6237 | 6235 |
|
6238 | | - if ( this.list_firstRender || differentColumns( this.list_columns, columns ) ) { |
6239 | | - $table.find( 'thead' ).remove(); |
| 6236 | + if ( this.list_firstRender || differentColumns( this.list_columns, columns ) || $thead.length === 0 ) { |
| 6237 | + $thead.remove(); |
6240 | 6238 |
|
6241 | 6239 | this.list_columns = columns; |
6242 | 6240 | this.list_firstRender = false; |
|
6853 | 6851 | day = parseInt( this.$element.find( '.repeat-monthly-date .selectlist' ).selectlist( 'selectedItem' ).text, 10 ); |
6854 | 6852 | pattern += 'BYMONTHDAY=' + day + ';'; |
6855 | 6853 | } else if ( type === 'bysetpos' ) { |
6856 | | - days = this.$element.find( '.month-days' ).selectlist( 'selectedItem' ).value; |
6857 | | - pos = this.$element.find( '.month-day-pos' ).selectlist( 'selectedItem' ).value; |
| 6854 | + days = this.$element.find( '.repeat-monthly-day .month-days' ).selectlist( 'selectedItem' ).value; |
| 6855 | + pos = this.$element.find( '.repeat-monthly-day .month-day-pos' ).selectlist( 'selectedItem' ).value; |
6858 | 6856 | pattern += 'BYDAY=' + days + ';'; |
6859 | 6857 | pattern += 'BYSETPOS=' + pos + ';'; |
6860 | 6858 | } |
|
6864 | 6862 | type = this.$element.find( 'input[name=repeat-yearly]:checked' ).val(); |
6865 | 6863 |
|
6866 | 6864 | if ( type === 'bymonthday' ) { |
| 6865 | + // there are multiple .year-month classed elements in scheduler markup |
6867 | 6866 | month = this.$element.find( '.repeat-yearly-date .year-month' ).selectlist( 'selectedItem' ).value; |
6868 | | - day = this.$element.find( '.year-month-day' ).selectlist( 'selectedItem' ).text; |
| 6867 | + day = this.$element.find( '.repeat-yearly-date .year-month-day' ).selectlist( 'selectedItem' ).text; |
6869 | 6868 | pattern += 'BYMONTH=' + month + ';'; |
6870 | 6869 | pattern += 'BYMONTHDAY=' + day + ';'; |
6871 | 6870 | } else if ( type === 'bysetpos' ) { |
6872 | | - days = this.$element.find( '.year-month-days' ).selectlist( 'selectedItem' ).value; |
6873 | | - pos = this.$element.find( '.year-month-day-pos' ).selectlist( 'selectedItem' ).value; |
| 6871 | + days = this.$element.find( '.repeat-yearly-day .year-month-days' ).selectlist( 'selectedItem' ).value; |
| 6872 | + pos = this.$element.find( '.repeat-yearly-day .year-month-day-pos' ).selectlist( 'selectedItem' ).value; |
| 6873 | + // there are multiple .year-month classed elements in scheduler markup |
6874 | 6874 | month = this.$element.find( '.repeat-yearly-day .year-month' ).selectlist( 'selectedItem' ).value; |
6875 | 6875 |
|
6876 | 6876 | pattern += 'BYDAY=' + days + ';'; |
|
0 commit comments