mirror of https://github.com/zulip/zulip.git
Restyle subscriptions 'undo button' slightly.
Some stylistic tweaking to the solution to Trac #127. (imported from commit 5f9a84c91716e6e57cce2cef1d8ca0915e4b135f)
This commit is contained in:
parent
cdd9c80499
commit
cb0f48b59d
|
@ -1,9 +1,9 @@
|
|||
{{! Client-side Mustache template for rendering subscriptions.}}
|
||||
<tr>
|
||||
<td class="subscription_entry">
|
||||
<td>
|
||||
{{subscription}}
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn pull-right" type="submit" name="subscription" value="{{subscription}}">Unsubscribe</button>
|
||||
<td class="span2">
|
||||
<button class="btn btn-block" type="submit" name="subscription" value="{{subscription}}">Unsubscribe</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -26,7 +26,7 @@ function add_to_stream_list(stream_name) {
|
|||
stream_sub_row = $('#subscriptions_table').find('button[value="' + stream_name + '"]');
|
||||
if (stream_sub_row.length) {
|
||||
stream_sub_row.text("Unsubscribe")
|
||||
.removeClass("btn-link")
|
||||
.removeClass("btn-primary")
|
||||
.unbind('click');
|
||||
} else {
|
||||
$('#subscriptions_table').prepend(templates.subscription({subscription: stream_name}));
|
||||
|
@ -130,8 +130,8 @@ $(function () {
|
|||
dataType: 'json', // This seems to be ignored. We still get back an xhr.
|
||||
success: function (resp, statusText, xhr, form) {
|
||||
var name = $.parseJSON(xhr.responseText).data;
|
||||
$('#subscriptions_table').find('button[value="' + name + '"]').text("Undo")
|
||||
.addClass("btn-link")
|
||||
$('#subscriptions_table').find('button[value="' + name + '"]').text("Subscribe")
|
||||
.addClass("btn-primary")
|
||||
.click(function (e) {
|
||||
e.preventDefault();
|
||||
ajaxSubscribe(name);
|
||||
|
|
|
@ -458,10 +458,6 @@ table.floating_recipient {
|
|||
height: 300px;
|
||||
}
|
||||
|
||||
#subscriptions-status {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#home-error {
|
||||
display: none;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue