mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Rename markdown-help to message-formatting.
This just makes the id match the name of the menu item.
This commit is contained in:
@@ -108,7 +108,7 @@ run_test('basics', () => {
|
|||||||
return switcher;
|
return switcher;
|
||||||
case "<div class='ind-tab' data-tab-key='keyboard-shortcuts' data-tab-id='0' tabindex='0'>translated: Keyboard shortcuts</div>":
|
case "<div class='ind-tab' data-tab-key='keyboard-shortcuts' data-tab-id='0' tabindex='0'>translated: Keyboard shortcuts</div>":
|
||||||
return make_tab(0);
|
return make_tab(0);
|
||||||
case "<div class='ind-tab' data-tab-key='markdown-help' data-tab-id='1' tabindex='0'>translated: Message formatting</div>":
|
case "<div class='ind-tab' data-tab-key='message-formatting' data-tab-id='1' tabindex='0'>translated: Message formatting</div>":
|
||||||
return make_tab(1);
|
return make_tab(1);
|
||||||
case "<div class='ind-tab' data-tab-key='search-operators' data-tab-id='2' tabindex='0'>translated: Search operators</div>":
|
case "<div class='ind-tab' data-tab-key='search-operators' data-tab-id='2' tabindex='0'>translated: Search operators</div>":
|
||||||
return make_tab(2);
|
return make_tab(2);
|
||||||
@@ -124,7 +124,7 @@ run_test('basics', () => {
|
|||||||
selected: 0,
|
selected: 0,
|
||||||
values: [
|
values: [
|
||||||
{ label: i18n.t("Keyboard shortcuts"), key: "keyboard-shortcuts" },
|
{ label: i18n.t("Keyboard shortcuts"), key: "keyboard-shortcuts" },
|
||||||
{ label: i18n.t("Message formatting"), key: "markdown-help" },
|
{ label: i18n.t("Message formatting"), key: "message-formatting" },
|
||||||
{ label: i18n.t("Search operators"), key: "search-operators" },
|
{ label: i18n.t("Search operators"), key: "search-operators" },
|
||||||
],
|
],
|
||||||
callback: function (name, key) {
|
callback: function (name, key) {
|
||||||
@@ -152,18 +152,18 @@ run_test('basics', () => {
|
|||||||
|
|
||||||
callback_args = undefined;
|
callback_args = undefined;
|
||||||
|
|
||||||
widget.goto('markdown-help');
|
widget.goto('message-formatting');
|
||||||
assert.equal(focused_tab, 1);
|
assert.equal(focused_tab, 1);
|
||||||
assert.equal(tabs[0].class, 'first');
|
assert.equal(tabs[0].class, 'first');
|
||||||
assert.equal(tabs[1].class, 'middle selected');
|
assert.equal(tabs[1].class, 'middle selected');
|
||||||
assert.equal(tabs[2].class, 'last');
|
assert.equal(tabs[2].class, 'last');
|
||||||
assert.deepEqual(callback_args, ['translated: Message formatting', 'markdown-help']);
|
assert.deepEqual(callback_args, ['translated: Message formatting', 'message-formatting']);
|
||||||
assert.equal(widget.value(), 'translated: Message formatting');
|
assert.equal(widget.value(), 'translated: Message formatting');
|
||||||
|
|
||||||
// Go to same tab twice and make sure we get callback.
|
// Go to same tab twice and make sure we get callback.
|
||||||
callback_args = undefined;
|
callback_args = undefined;
|
||||||
widget.goto('markdown-help');
|
widget.goto('message-formatting');
|
||||||
assert.deepEqual(callback_args, ['translated: Message formatting', 'markdown-help']);
|
assert.deepEqual(callback_args, ['translated: Message formatting', 'message-formatting']);
|
||||||
|
|
||||||
callback_args = undefined;
|
callback_args = undefined;
|
||||||
keydown_f.call(tabs[focused_tab], RIGHT_KEY);
|
keydown_f.call(tabs[focused_tab], RIGHT_KEY);
|
||||||
|
|||||||
@@ -244,14 +244,14 @@ run_test('hash_interactions', () => {
|
|||||||
'info: keyboard-shortcuts',
|
'info: keyboard-shortcuts',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
window.location.hash = '#markdown-help/whatever';
|
window.location.hash = '#message-formatting/whatever';
|
||||||
|
|
||||||
helper.clear_events();
|
helper.clear_events();
|
||||||
window.onhashchange();
|
window.onhashchange();
|
||||||
helper.assert_events([
|
helper.assert_events([
|
||||||
'overlays.close_for_hash_change',
|
'overlays.close_for_hash_change',
|
||||||
'trigger event',
|
'trigger event',
|
||||||
'info: markdown-help',
|
'info: message-formatting',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
window.location.hash = '#search-operators/whatever';
|
window.location.hash = '#search-operators/whatever';
|
||||||
|
|||||||
@@ -138,8 +138,8 @@ function do_hashchange(from_reload) {
|
|||||||
case "#keyboard-shortcuts":
|
case "#keyboard-shortcuts":
|
||||||
info_overlay.show("keyboard-shortcuts");
|
info_overlay.show("keyboard-shortcuts");
|
||||||
break;
|
break;
|
||||||
case "#markdown-help":
|
case "#message-formatting":
|
||||||
info_overlay.show("markdown-help");
|
info_overlay.show("message-formatting");
|
||||||
break;
|
break;
|
||||||
case "#search-operators":
|
case "#search-operators":
|
||||||
info_overlay.show("search-operators");
|
info_overlay.show("search-operators");
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ exports.set_up_toggler = function () {
|
|||||||
child_wants_focus: true,
|
child_wants_focus: true,
|
||||||
values: [
|
values: [
|
||||||
{ label: i18n.t("Keyboard shortcuts"), key: "keyboard-shortcuts" },
|
{ label: i18n.t("Keyboard shortcuts"), key: "keyboard-shortcuts" },
|
||||||
{ label: i18n.t("Message formatting"), key: "markdown-help" },
|
{ label: i18n.t("Message formatting"), key: "message-formatting" },
|
||||||
{ label: i18n.t("Search operators"), key: "search-operators" },
|
{ label: i18n.t("Search operators"), key: "search-operators" },
|
||||||
],
|
],
|
||||||
callback: function (name, key) {
|
callback: function (name, key) {
|
||||||
@@ -46,7 +46,7 @@ exports.set_up_toggler = function () {
|
|||||||
elem.addClass('large');
|
elem.addClass('large');
|
||||||
|
|
||||||
var modals = _.map(opts.values, function (item) {
|
var modals = _.map(opts.values, function (item) {
|
||||||
var key = item.key; // e.g. markdown-help
|
var key = item.key; // e.g. message-formatting
|
||||||
var modal = $('#' + key).find('.modal-body');
|
var modal = $('#' + key).find('.modal-body');
|
||||||
return modal;
|
return modal;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
<span class="message_edit_countdown_timer"></span>
|
<span class="message_edit_countdown_timer"></span>
|
||||||
<div class="message-edit-timer-control-group">
|
<div class="message-edit-timer-control-group">
|
||||||
<input type="file" id="message_edit_file_input_{{message_id}}" class="notvisible pull-left" multiple />
|
<input type="file" id="message_edit_file_input_{{message_id}}" class="notvisible pull-left" multiple />
|
||||||
<a class="message-control-button fa fa-font" aria-hidden="true" title="{{t 'Formatting' }}" data-overlay-trigger="markdown-help" ></a>
|
<a class="message-control-button fa fa-font" aria-hidden="true" title="{{t 'Formatting' }}" data-overlay-trigger="message-formatting" ></a>
|
||||||
<a class="message-control-button fa fa-paperclip notdisplayed" aria-hidden="true" id="attach_files_{{message_id}}" href="#" title="{{t "Attach files" }}"></a>
|
<a class="message-control-button fa fa-paperclip notdisplayed" aria-hidden="true" id="attach_files_{{message_id}}" href="#" title="{{t "Attach files" }}"></a>
|
||||||
</div>
|
</div>
|
||||||
<span><i id="message_edit_tooltip" class="message_edit_tooltip fa fa-question-circle" aria-hidden="true" data-toggle="tooltip"
|
<span><i id="message_edit_tooltip" class="message_edit_tooltip fa fa-question-circle" aria-hidden="true" data-toggle="tooltip"
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
<div id="below-compose-content">
|
<div id="below-compose-content">
|
||||||
<input type="file" id="file_input" class="notvisible pull-left" multiple />
|
<input type="file" id="file_input" class="notvisible pull-left" multiple />
|
||||||
<a class="message-control-button fa fa-smile-o" aria-hidden="true" id="emoji_map" href="#" title="{{ _('Add emoji') }}"></a>
|
<a class="message-control-button fa fa-smile-o" aria-hidden="true" id="emoji_map" href="#" title="{{ _('Add emoji') }}"></a>
|
||||||
<a class="message-control-button fa fa-font" aria-hidden="true" title="{{ _('Formatting') }}" data-overlay-trigger="markdown-help"></a>
|
<a class="message-control-button fa fa-font" aria-hidden="true" title="{{ _('Formatting') }}" data-overlay-trigger="message-formatting"></a>
|
||||||
<a class="message-control-button fa fa-paperclip notdisplayed" aria-hidden="true" id="attach_files" href="#" title="{{ _('Attach files') }}"></a> {% if jitsi_server_url %}
|
<a class="message-control-button fa fa-paperclip notdisplayed" aria-hidden="true" id="attach_files" href="#" title="{{ _('Attach files') }}"></a> {% if jitsi_server_url %}
|
||||||
<a class="message-control-button fa fa-video-camera" aria-hidden="true" id="video_link" href="#" title="{{ _('Add video call') }}"></a> {% endif %}
|
<a class="message-control-button fa fa-video-camera" aria-hidden="true" id="video_link" href="#" title="{{ _('Add video call') }}"></a> {% endif %}
|
||||||
<a id="undo_markdown_preview" class="message-control-button fa fa-edit" aria-hidden="true" style="display:none;" title="{{ _('Write') }}"></a>
|
<a id="undo_markdown_preview" class="message-control-button fa fa-edit" aria-hidden="true" style="display:none;" title="{{ _('Write') }}"></a>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="overlay-modal hide" id="markdown-help" tabindex="-1" role="dialog"
|
<div class="overlay-modal hide" id="message-formatting" tabindex="-1" role="dialog"
|
||||||
aria-label="{{ _('Message formatting') }}">
|
aria-label="{{ _('Message formatting') }}">
|
||||||
<div class="modal-body" tabindex="0">
|
<div class="modal-body" tabindex="0">
|
||||||
<div id="markdown-instructions">
|
<div id="markdown-instructions">
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li role="presentation">
|
<li role="presentation">
|
||||||
<a tabindex="0" role="menuitem" data-overlay-trigger="markdown-help">
|
<a tabindex="0" role="menuitem" data-overlay-trigger="message-formatting">
|
||||||
<i class="fa fa-pencil" aria-hidden="true"></i> {{ _('Message formatting') }}
|
<i class="fa fa-pencil" aria-hidden="true"></i> {{ _('Message formatting') }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user