mirror of
https://github.com/zulip/zulip.git
synced 2026-06-21 21:32:29 +08:00
topic_stream_edit_popover: Add stream color bar before selet tag.
* The implementation is similar to message stream edit color bar.
This commit is contained in:
parent
7c502acb4c
commit
d537ceef5a
@ -278,6 +278,15 @@ function build_move_topic_to_stream_popover(e, current_stream_id, topic_name) {
|
||||
exports.hide_topic_popover();
|
||||
|
||||
$("#move-a-topic-modal-holder").html(render_move_topic_to_stream(args));
|
||||
|
||||
const stream_header_colorblock = $(".topic_stream_edit_header").find(".stream_header_colorblock");
|
||||
const stream_name = stream_data.maybe_get_stream_name(current_stream_id);
|
||||
ui_util.decorate_stream_bar(stream_name, stream_header_colorblock, false);
|
||||
$("#select_stream_id").change(function () {
|
||||
const stream_name = stream_data.maybe_get_stream_name(parseInt(this.value, 10));
|
||||
ui_util.decorate_stream_bar(stream_name, stream_header_colorblock, false);
|
||||
});
|
||||
|
||||
$('#move_topic_modal').modal('show');
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
@ -362,3 +362,19 @@ ul {
|
||||
background-color: hsla(0, 70%, 87%, 0.7);
|
||||
color: hsl(0, 100%, 50%);
|
||||
}
|
||||
|
||||
.topic_stream_edit_header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
#select_stream_id {
|
||||
margin-bottom: 5px !important;
|
||||
border-left: 0px;
|
||||
padding-left: 0px;
|
||||
border-radius: 0px 3px 3px 0px;
|
||||
// Extra 1px for post-selection boundry
|
||||
margin: 0 5px 0 -11px;
|
||||
text-indent: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,15 +10,18 @@
|
||||
<span class="send-status-close">×</span>
|
||||
<span class="error-msg"></span>
|
||||
</div>
|
||||
<select name="select_stream_id" class="inline_select_topic_edit" id="select_stream_id">
|
||||
<option value="">{{t "Select a stream" }}</option>
|
||||
{{#each available_streams}}
|
||||
<option value="{{ this.stream_id }}">#{{this.name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<input name="new_topic_name" type="text" class="inline_topic_edit" value="{{topic_name}}">
|
||||
<input name="old_topic_name" type="hidden" class="inline_topic_edit" value="{{topic_name}}">
|
||||
<input name="current_stream_id" type="hidden" value="{{current_stream_id}}">
|
||||
<div class="topic_stream_edit_header">
|
||||
<div class="stream_header_colorblock"></div>
|
||||
<select name="select_stream_id" class="inline_select_topic_edit" id="select_stream_id">
|
||||
<option value="">{{t "Select a stream" }}</option>
|
||||
{{#each available_streams}}
|
||||
<option value="{{ this.stream_id }}">#{{this.name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<input name="new_topic_name" type="text" class="inline_topic_edit" value="{{topic_name}}">
|
||||
<input name="old_topic_name" type="hidden" class="inline_topic_edit" value="{{topic_name}}">
|
||||
<input name="current_stream_id" type="hidden" value="{{current_stream_id}}">
|
||||
</div>
|
||||
</form>
|
||||
<div class="topic_edit_spinner"></div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user