Skip to content

Commit 657ef05

Browse files
committed
[spalenque] - #13191 * add html editor for rsvp report email sender
1 parent 5bd7241 commit 657ef05

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

summit/code/controllers/SummitAppAdminController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ public function reports(SS_HTTPRequest $request)
618618
Requirements::javascript('themes/openstack/javascript/bootstrap-paginator/src/bootstrap-paginator.js');
619619
Requirements::javascript('themes/openstack/javascript/jquery-ajax-loader.js');
620620
Requirements::javascript('summit/javascript/jquery.tabletoCSV.js');
621+
Requirements::javascript('//tinymce.cachefly.net/4.3/tinymce.min.js');
621622

622623
//JS libraries for feedback form and list
623624
Requirements::javascript('marketplace/code/ui/frontend/js/star-rating.min.js');

summit/ui/source/js/admin/reports/reports-admin-container.tag

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@
9191
this.show_email = false;
9292
var self = this;
9393

94+
tinymce.init({
95+
selector: "#email-message",
96+
width: '99%',
97+
height: 150,
98+
plugins: [ "anchor link" ],
99+
toolbar: "bold, italic, underline, bullist, numlist, outdent, indent, removeformat, link",
100+
statusbar: false,
101+
menubar: false,
102+
});
103+
94104
this.on('mount', function() {
95105
self.toggleFilters();
96106
$("#search-term").val('');
@@ -128,8 +138,11 @@
128138
}
129139

130140
sendEmail(e) {
141+
var text_editor = tinyMCE.get('email-message');
142+
if (text_editor)
143+
$('#email-message').val(text_editor.getContent());
144+
131145
if (confirm("Are you sure you want to send an email to these attendees?")) {
132-
$('#emailModal').modal('toggle');
133146
self.dispatcher.sendEmail(self.report);
134147
}
135148
}

summit/ui/source/js/admin/reports/reports-admin-rsvp-report.tag

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
dataType: "json"
181181
}).done(function(data) {
182182
$('body').ajax_loader('stop');
183+
$('#emailModal').modal('toggle');
183184
swal({
184185
title: "Done!",
185186
text: "email sent successfully",

0 commit comments

Comments
 (0)