mirror of https://github.com/zulip/zulip.git
list-widget: Rename settings_list_widget => dropdown_list_widget.
We want to use this widget outside of the settings panels as well.
This commit is contained in:
parent
587b5473c2
commit
e2b0a4cba1
|
@ -255,6 +255,7 @@
|
|||
"csrf_token": false,
|
||||
"current_msg_list": true,
|
||||
"drafts": false,
|
||||
"dropdown_list_widget": false,
|
||||
"echo": false,
|
||||
"emoji": false,
|
||||
"emoji_picker": false,
|
||||
|
@ -348,7 +349,6 @@
|
|||
"settings_display": false,
|
||||
"settings_emoji": false,
|
||||
"settings_exports": false,
|
||||
"settings_list_widget": false,
|
||||
"settings_linkifiers": false,
|
||||
"settings_invites": false,
|
||||
"settings_muting": false,
|
||||
|
|
|
@ -80,7 +80,7 @@ zrequire('stream_data');
|
|||
zrequire('settings_account');
|
||||
zrequire('settings_org');
|
||||
zrequire('settings_ui');
|
||||
zrequire('settings_list_widget');
|
||||
zrequire('dropdown_list_widget');
|
||||
|
||||
run_test('unloaded', () => {
|
||||
// This test mostly gets us line coverage, and makes
|
||||
|
@ -795,8 +795,8 @@ run_test('set_up', () => {
|
|||
upload_realm_icon = f;
|
||||
};
|
||||
|
||||
const settings_list_widget_backup = settings_list_widget;
|
||||
settings_list_widget = () => { // eslint-disable-line no-native-reassign
|
||||
const dropdown_list_widget_backup = dropdown_list_widget;
|
||||
dropdown_list_widget = () => { // eslint-disable-line no-native-reassign
|
||||
return {
|
||||
render: noop,
|
||||
update: noop,
|
||||
|
@ -840,7 +840,7 @@ run_test('set_up', () => {
|
|||
test_parse_time_limit();
|
||||
test_discard_changes_button(discard_changes);
|
||||
|
||||
settings_list_widget = settings_list_widget_backup; // eslint-disable-line no-native-reassign
|
||||
dropdown_list_widget = dropdown_list_widget_backup; // eslint-disable-line no-native-reassign
|
||||
});
|
||||
|
||||
run_test('test get_organization_settings_options', () => {
|
||||
|
@ -1022,7 +1022,7 @@ run_test('misc', () => {
|
|||
return arr;
|
||||
};
|
||||
|
||||
// Set stubs for settings_list_widget:
|
||||
// Set stubs for dropdown_list_widget:
|
||||
const widget_settings = ['realm_notifications_stream_id',
|
||||
'realm_signup_notifications_stream_id',
|
||||
'realm_default_code_block_language'];
|
||||
|
|
|
@ -163,7 +163,7 @@ import "../realm_icon.js";
|
|||
import "../realm_logo.js";
|
||||
import "../reminder.js";
|
||||
import "../confirm_dialog.js";
|
||||
import "../settings_list_widget.js";
|
||||
import "../dropdown_list_widget.js";
|
||||
import "../settings_account.js";
|
||||
import "../settings_display.js";
|
||||
import "../settings_notifications.js";
|
||||
|
|
|
@ -120,4 +120,4 @@ const DropdownListWidget = function (opts) {
|
|||
};
|
||||
};
|
||||
|
||||
window.settings_list_widget = DropdownListWidget;
|
||||
window.dropdown_list_widget = DropdownListWidget;
|
|
@ -556,13 +556,13 @@ exports.init_dropdown_widgets = () => {
|
|||
render_text: (x) => {return `#${x}`;},
|
||||
null_value: -1,
|
||||
};
|
||||
exports.notifications_stream_widget = settings_list_widget(
|
||||
exports.notifications_stream_widget = dropdown_list_widget(
|
||||
Object.assign({setting_name: 'realm_notifications_stream_id'},
|
||||
notification_stream_options));
|
||||
exports.signup_notifications_stream_widget = settings_list_widget(
|
||||
exports.signup_notifications_stream_widget = dropdown_list_widget(
|
||||
Object.assign({setting_name: 'realm_signup_notifications_stream_id'},
|
||||
notification_stream_options));
|
||||
exports.default_code_language_widget = settings_list_widget({
|
||||
exports.default_code_language_widget = dropdown_list_widget({
|
||||
setting_name: 'realm_default_code_block_language',
|
||||
data: Object.keys(pygments_data.langs).map(x => {
|
||||
return {
|
||||
|
|
|
@ -107,7 +107,7 @@ EXEMPT_FILES = {
|
|||
'static/js/search_pill_widget.js',
|
||||
'static/js/sent_messages.js',
|
||||
'static/js/server_events.js',
|
||||
'static/js/settings_list_widget.js',
|
||||
'static/js/dropdown_list_widget.js',
|
||||
'static/js/settings_account.js',
|
||||
'static/js/settings_bots.js',
|
||||
'static/js/settings_config.js',
|
||||
|
|
Loading…
Reference in New Issue