Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Klinarr committed Dec 20, 2024
1 parent 14b7b4e commit dd54062
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/presenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class Presenter {
document.removeEventListener('keydown', this.escKeyDownHandler);
});

eventEdit.setResetButtonClickHandler(() => {
eventEdit.setRollupButtonClickHandler(() => {
replace(eventItem, eventEdit);
remove(eventEdit);
document.removeEventListener('keydown', this.escKeyDownHandler);
Expand Down
9 changes: 6 additions & 3 deletions src/view/events-edit-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ function createEventsEditTemplate(point, destination, offers , allDestinations)
</div>
<button class="event__save-btn btn btn--blue" type="submit">Save</button>
<button class="event__reset-btn" type="reset">Cancel</button>
<button class="event__reset-btn" type="reset">Delete</button>
<button class="event__rollup-btn" type="button">
<span class="visually-hidden">Open event</span>
</button>
</header>
<section class="event__details">
<section class="event__section event__section--offers">
Expand Down Expand Up @@ -148,7 +151,7 @@ export default class EventsEditView extends AbstractView {
this.element.querySelector('.event--edit')?.addEventListener('submit', callback);
}

setResetButtonClickHandler(callback) {
this.element.querySelector('.event__reset-btn')?.addEventListener('click', callback);
setRollupButtonClickHandler(callback) {
this.element.querySelector('.event__rollup-btn')?.addEventListener('click', callback);
}
}

0 comments on commit dd54062

Please sign in to comment.