propagate_topic_edits feature flag: staging and CUSTOMER7

(imported from commit aca356a7c7f98066b13a51ede55c4925b95a476b)
This commit is contained in:
Kevin Mehall 2013-09-04 14:30:33 -04:00
parent 6b820038ad
commit e780502372
3 changed files with 10 additions and 2 deletions

View File

@ -21,6 +21,9 @@ exports.mandatory_topics = _.contains([
exports.collapsible = page_params.staging; exports.collapsible = page_params.staging;
exports.propagate_topic_edits = page_params.staging ||
_.contains(['customer7.invalid'], page_params.domain);
return exports; return exports;
}()); }());

View File

@ -15,7 +15,8 @@ exports.save = function (row) {
if (new_topic !== message.subject && new_topic.trim() !== "") { if (new_topic !== message.subject && new_topic.trim() !== "") {
request.subject = new_topic; request.subject = new_topic;
if (row.find(".message_edit_topic_propagate>input").is(":checked")) { if (feature_flags.propagate_topic_edits &&
row.find(".message_edit_topic_propagate>input").is(":checked")) {
request.propagate_subject = true; request.propagate_subject = true;
} }
changed = true; changed = true;
@ -95,6 +96,10 @@ function edit_message (row, raw_content) {
var scroll_by = edit_top - content_top + 5 /* border and padding */; var scroll_by = edit_top - content_top + 5 /* border and padding */;
edit_obj.scrolled_by = scroll_by; edit_obj.scrolled_by = scroll_by;
viewport.scrollTop(viewport.scrollTop() + scroll_by); viewport.scrollTop(viewport.scrollTop() + scroll_by);
if (feature_flags.propagate_topic_edits) {
row.find('.message_edit_topic_propagate').show();
}
} }
exports.start = function (row) { exports.start = function (row) {

View File

@ -6,7 +6,7 @@
<label class="control-label edit-control-label" for="message_edit_topic">Topic</label> <label class="control-label edit-control-label" for="message_edit_topic">Topic</label>
<div class="controls edit-controls"> <div class="controls edit-controls">
<input type="text" value="{{topic}}" class="message_edit_topic" id="message_edit_topic"> <input type="text" value="{{topic}}" class="message_edit_topic" id="message_edit_topic">
<label class='message_edit_topic_propagate'> <label class='message_edit_topic_propagate' style='display:none;'>
<input type="checkbox"> Change all later messages on this topic <input type="checkbox"> Change all later messages on this topic
</label> </label>
</div> </div>