From f001a4b9a644c1034e4f7e718dcad4b9ad4b8db9 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Sun, 11 Dec 2016 17:54:16 +0100 Subject: [PATCH] Calendar: Fix line length violations --- ui/widgets/calendar.js | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/ui/widgets/calendar.js b/ui/widgets/calendar.js index 7e40313e7..538230bb6 100644 --- a/ui/widgets/calendar.js +++ b/ui/widgets/calendar.js @@ -128,7 +128,9 @@ return $.widget( "ui.calendar", { _select: function( event ) { var oldValue = this.options.value ? this.options.value.getTime() : ""; - this._setOption( "value", new Date( $( event.currentTarget ).data( "ui-calendar-timestamp" ) ) ); + this._setOption( + "value", new Date( $( event.currentTarget ).data( "ui-calendar-timestamp" ) ) + ); this._updateDayElement( "ui-state-active" ); // Allow datepicker to handle focus @@ -200,7 +202,9 @@ return $.widget( "ui.calendar", { }, _needsRefresh: function() { - if ( this.date.month() !== this.viewDate.month() || this.date.year() !== this.viewDate.year() ) { + if ( this.date.month() !== this.viewDate.month() || + this.date.year() !== this.viewDate.year() + ) { // Check if the needed day is already present in our grid due // to eachDay option changes (eg. other-months demo) @@ -265,7 +269,9 @@ return $.widget( "ui.calendar", { this._buildMultiplePicker(); } - this._addClass( this.element, "ui-calendar", "ui-widget ui-widget-content ui-helper-clearfix" ); + this._addClass( + this.element, "ui-calendar", "ui-widget ui-widget-content ui-helper-clearfix" + ); this._refreshHeaderButtons(); this._createButtonPane(); @@ -293,7 +299,8 @@ return $.widget( "ui.calendar", { for ( ; i < months.length; i++ ) { - // TODO: Shouldn't we pass date as a parameter to build* fns instead of setting this.date? + // TODO: Shouldn't we pass date as a parameter to build* fns + // instead of setting this.date? this.viewDate = months[ i ]; this.gridId = this.id + "-" + i; labelledBy.push( this.gridId + "-title" ); @@ -408,7 +415,8 @@ return $.widget( "ui.calendar", { }, _buildGridHeaderCell: function( day ) { - return $( "" + + return $( "" + "" + day.shortname + "" + "" ); }, @@ -453,7 +461,9 @@ return $.widget( "ui.calendar", { selectable = ( day.selectable && this._isValid( dateObject ) ); if ( day.render ) { - attributes.push( "id='" + this.id + "-" + day.year + "-" + day.month + "-" + day.date + "'" ); + attributes.push( + "id='" + this.id + "-" + day.year + "-" + day.month + "-" + day.date + "'" + ); if ( !selectable ) { attributes.push( "aria-disabled='true'" ); @@ -496,7 +506,8 @@ return $.widget( "ui.calendar", { content = "" + day.date + ""; if ( day.today ) { - content += ", " + this._getTranslation( "currentText" ) + ""; + content += ", " + + this._getTranslation( "currentText" ) + ""; } return content; @@ -510,7 +521,9 @@ return $.widget( "ui.calendar", { this.buttonPane = $( "
" ); this.buttonSet = $( "
" ).appendTo( this.buttonPane ); - this._addClass( this.buttonPane, "ui-calendar-buttonpane", "ui-widget-content ui-helper-clearfix" ) + this._addClass( + this.buttonPane, "ui-calendar-buttonpane", "ui-widget-content ui-helper-clearfix" + ) ._addClass( this.buttonSet, "ui-calendar-buttonset" ); this._createButtons(); -- 2.39.5