mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
This reverts commit ba27ee1637.
We found some issues with handling of cmd/ctrl/shift + click on `<a` elements
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* global Pikaday:true */
|
||||
import computed, { observes } from "discourse-common/utils/decorators";
|
||||
import Component from "@ember/component";
|
||||
import EmberObject, { action } from "@ember/object";
|
||||
import EmberObject from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
import { INPUT_DELAY } from "discourse-common/config/environment";
|
||||
import { Promise } from "rsvp";
|
||||
@@ -306,12 +306,6 @@ export default Component.extend({
|
||||
return dateTime.isValid() ? dateTime.format("LLLL") : emptyText;
|
||||
},
|
||||
|
||||
@action
|
||||
updateFormat(format, event) {
|
||||
event?.preventDefault();
|
||||
this.format = format;
|
||||
},
|
||||
|
||||
actions: {
|
||||
setTime(event) {
|
||||
this._setTimeIfValid(event.target.value, "time");
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
<ul class="formats">
|
||||
{{#each this.previewedFormats as |previewedFormat|}}
|
||||
<li class="format">
|
||||
<a class="moment-format" href {{on "click" (fn this.updateFormat previewedFormat.format)}}>
|
||||
<a class="moment-format" href {{action (mut this.format) previewedFormat.format}}>
|
||||
{{previewedFormat.format}}
|
||||
</a>
|
||||
<span class="previewed-format">
|
||||
|
||||
@@ -398,10 +398,4 @@ export default Controller.extend(ModalFunctionality, {
|
||||
removeOption(option) {
|
||||
this.pollOptions.removeObject(option);
|
||||
},
|
||||
|
||||
@action
|
||||
updatePollType(pollType, event) {
|
||||
event?.preventDefault();
|
||||
this.pollType = pollType;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<DModalBody @title="poll.ui_builder.title" @class="poll-ui-builder">
|
||||
<div class="input-group poll-type">
|
||||
<a href {{on "click" (fn this.updatePollType "regular")}} class="poll-type-value {{if this.isRegular "active"}}">
|
||||
<a href {{action (mut this.pollType) "regular"}} class="poll-type-value {{if this.isRegular "active"}}">
|
||||
{{i18n "poll.ui_builder.poll_type.regular"}}
|
||||
</a>
|
||||
|
||||
<a href {{on "click" (fn this.updatePollType "multiple")}} class="poll-type-value {{if this.isMultiple "active"}}">
|
||||
<a href {{action (mut this.pollType) "multiple"}} class="poll-type-value {{if this.isMultiple "active"}}">
|
||||
{{i18n "poll.ui_builder.poll_type.multiple"}}
|
||||
</a>
|
||||
|
||||
{{#if this.showNumber}}
|
||||
<a href {{on "click" (fn this.updatePollType "number")}} class="poll-type-value {{if this.isNumber "active"}}">
|
||||
<a href {{action (mut this.pollType) "number"}} class="poll-type-value {{if this.isNumber "active"}}">
|
||||
{{i18n "poll.ui_builder.poll_type.number"}}
|
||||
</a>
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user