mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
Add shim.js w/narrow_state global.
This commit is contained in:
@@ -71,6 +71,7 @@
|
|||||||
"stream_list": false,
|
"stream_list": false,
|
||||||
"stream_popover": false,
|
"stream_popover": false,
|
||||||
"narrow": false,
|
"narrow": false,
|
||||||
|
"narrow_state": false,
|
||||||
"admin": false,
|
"admin": false,
|
||||||
"stream_data": false,
|
"stream_data": false,
|
||||||
"muting": false,
|
"muting": false,
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ function fill_in_opts_from_current_narrowed_view(msg_type, opts) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Set default parameters based on the current narrowed view.
|
// Set default parameters based on the current narrowed view.
|
||||||
narrow.set_compose_defaults(default_opts);
|
narrow_state.set_compose_defaults(default_opts);
|
||||||
opts = _.extend(default_opts, opts);
|
opts = _.extend(default_opts, opts);
|
||||||
return opts;
|
return opts;
|
||||||
}
|
}
|
||||||
|
|||||||
10
static/js/shim.js
Normal file
10
static/js/shim.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
This module has shims to help us break circular dependencies.
|
||||||
|
We eventually want to to move the actual implementations into
|
||||||
|
new modules. When we do this, you may need to fix node tests
|
||||||
|
that still refer to the old name.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var narrow_state = {}; // global, should be made into module
|
||||||
|
narrow_state.set_compose_defaults = narrow.set_compose_defaults;
|
||||||
@@ -893,6 +893,7 @@ JS_SPECS = {
|
|||||||
'js/bot_data.js',
|
'js/bot_data.js',
|
||||||
'js/reactions.js',
|
'js/reactions.js',
|
||||||
'js/typing.js',
|
'js/typing.js',
|
||||||
|
'js/shim.js',
|
||||||
# JS bundled by webpack is also included here if PIPELINE_ENABLED setting is true
|
# JS bundled by webpack is also included here if PIPELINE_ENABLED setting is true
|
||||||
],
|
],
|
||||||
'output_filename': 'min/app.js'
|
'output_filename': 'min/app.js'
|
||||||
|
|||||||
Reference in New Issue
Block a user