API tests, email tests, working notifications
This commit is contained in:
@@ -22,7 +22,6 @@ class SendEmail
|
||||
# attach click handlers
|
||||
|
||||
@$btn_send.click =>
|
||||
|
||||
if @$subject.val() == ""
|
||||
alert gettext("Your message must have a subject.")
|
||||
else if @$emailEditor.save()['data'] == ""
|
||||
@@ -46,8 +45,11 @@ class SendEmail
|
||||
dataType: 'json'
|
||||
url: @$btn_send.data 'endpoint'
|
||||
data: send_data
|
||||
success: (data) => @display_response gettext('Your email was successfully queued for sending.')
|
||||
success: (data) =>
|
||||
@display_response gettext('Your email was successfully queued for sending.')
|
||||
$(".msg-confirm").css({"display":"block"})
|
||||
error: std_ajax_err => @fail_with_error gettext('Error sending email.')
|
||||
$(".msg-confirm").css({"display":"none"})
|
||||
|
||||
fail_with_error: (msg) ->
|
||||
console.warn msg
|
||||
|
||||
@@ -260,19 +260,17 @@ section.instructor-dashboard-content-2 {
|
||||
|
||||
// system feedback - messages
|
||||
.msg {
|
||||
|
||||
|
||||
.copy {
|
||||
font-weight: 600;
|
||||
}
|
||||
border-radius: 1px;
|
||||
padding: 10px 15px;
|
||||
margin-bottom: 20px;
|
||||
font-weight: 600;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.msg-confirm {
|
||||
border-top: 2px solid green;
|
||||
background: tint(green,90%);
|
||||
|
||||
.copy {
|
||||
color: green;
|
||||
}
|
||||
display: none;
|
||||
}
|
||||
|
||||
.list-advice {
|
||||
@@ -289,7 +287,7 @@ section.instructor-dashboard-content-2 {
|
||||
}
|
||||
}
|
||||
}
|
||||
.msg .copy {
|
||||
.copy {
|
||||
font-weight: 600; }
|
||||
.msg-confirm {
|
||||
background: #e5f2e5; }
|
||||
|
||||
Reference in New Issue
Block a user