Skip to content

Commit f001a4b

Browse files
committed
Calendar: Fix line length violations
1 parent 800307b commit f001a4b

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

ui/widgets/calendar.js

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ return $.widget( "ui.calendar", {
128128
_select: function( event ) {
129129
var oldValue = this.options.value ? this.options.value.getTime() : "";
130130

131-
this._setOption( "value", new Date( $( event.currentTarget ).data( "ui-calendar-timestamp" ) ) );
131+
this._setOption(
132+
"value", new Date( $( event.currentTarget ).data( "ui-calendar-timestamp" ) )
133+
);
132134
this._updateDayElement( "ui-state-active" );
133135

134136
// Allow datepicker to handle focus
@@ -200,7 +202,9 @@ return $.widget( "ui.calendar", {
200202
},
201203

202204
_needsRefresh: function() {
203-
if ( this.date.month() !== this.viewDate.month() || this.date.year() !== this.viewDate.year() ) {
205+
if ( this.date.month() !== this.viewDate.month() ||
206+
this.date.year() !== this.viewDate.year()
207+
) {
204208

205209
// Check if the needed day is already present in our grid due
206210
// to eachDay option changes (eg. other-months demo)
@@ -265,7 +269,9 @@ return $.widget( "ui.calendar", {
265269
this._buildMultiplePicker();
266270
}
267271

268-
this._addClass( this.element, "ui-calendar", "ui-widget ui-widget-content ui-helper-clearfix" );
272+
this._addClass(
273+
this.element, "ui-calendar", "ui-widget ui-widget-content ui-helper-clearfix"
274+
);
269275

270276
this._refreshHeaderButtons();
271277
this._createButtonPane();
@@ -293,7 +299,8 @@ return $.widget( "ui.calendar", {
293299

294300
for ( ; i < months.length; i++ ) {
295301

296-
// TODO: Shouldn't we pass date as a parameter to build* fns instead of setting this.date?
302+
// TODO: Shouldn't we pass date as a parameter to build* fns
303+
// instead of setting this.date?
297304
this.viewDate = months[ i ];
298305
this.gridId = this.id + "-" + i;
299306
labelledBy.push( this.gridId + "-title" );
@@ -408,7 +415,8 @@ return $.widget( "ui.calendar", {
408415
},
409416

410417
_buildGridHeaderCell: function( day ) {
411-
return $( "<th role='columnheader' abbr='" + day.fullname + "' aria-label='" + day.fullname + "'>" +
418+
return $( "<th role='columnheader' abbr='" + day.fullname +
419+
"' aria-label='" + day.fullname + "'>" +
412420
"<span title='" + day.fullname + "'>" + day.shortname + "</span>" +
413421
"</th>" );
414422
},
@@ -453,7 +461,9 @@ return $.widget( "ui.calendar", {
453461
selectable = ( day.selectable && this._isValid( dateObject ) );
454462

455463
if ( day.render ) {
456-
attributes.push( "id='" + this.id + "-" + day.year + "-" + day.month + "-" + day.date + "'" );
464+
attributes.push(
465+
"id='" + this.id + "-" + day.year + "-" + day.month + "-" + day.date + "'"
466+
);
457467

458468
if ( !selectable ) {
459469
attributes.push( "aria-disabled='true'" );
@@ -496,7 +506,8 @@ return $.widget( "ui.calendar", {
496506
content = "<button" + attributes + ">" + day.date + "</button>";
497507

498508
if ( day.today ) {
499-
content += "<span class='ui-helper-hidden-accessible'>, " + this._getTranslation( "currentText" ) + "</span>";
509+
content += "<span class='ui-helper-hidden-accessible'>, " +
510+
this._getTranslation( "currentText" ) + "</span>";
500511
}
501512

502513
return content;
@@ -510,7 +521,9 @@ return $.widget( "ui.calendar", {
510521
this.buttonPane = $( "<div>" );
511522
this.buttonSet = $( "<div>" ).appendTo( this.buttonPane );
512523

513-
this._addClass( this.buttonPane, "ui-calendar-buttonpane", "ui-widget-content ui-helper-clearfix" )
524+
this._addClass(
525+
this.buttonPane, "ui-calendar-buttonpane", "ui-widget-content ui-helper-clearfix"
526+
)
514527
._addClass( this.buttonSet, "ui-calendar-buttonset" );
515528

516529
this._createButtons();

0 commit comments

Comments
 (0)