Skip to content

Commit 594fff7

Browse files
committed
checking
1 parent 3702de0 commit 594fff7

File tree

2 files changed

+2
-39
lines changed

2 files changed

+2
-39
lines changed

app/assets/javascripts/course_offerings.js

+1-39
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(function () {
2-
var check_completeness, form_alert, handle_submit, handle_generate_textbook, init, reset_alert_area, valid_token;
2+
var check_completeness, form_alert, handle_submit, init, reset_alert_area, valid_token;
33

44
$(document).ready(function () {
55

@@ -22,11 +22,6 @@
2222
return handle_submit();
2323
});
2424

25-
$('#btn-gen-textbook').click(function () {
26-
$(this).prop('disabled', true);
27-
return handle_generate_textbook();
28-
});
29-
3025
$('#display').click(function () {
3126
return handle_select_student();
3227
//return handle_display();
@@ -185,39 +180,6 @@
185180
});
186181
};
187182

188-
handle_generate_textbook = function () {
189-
var organization_id, course_id, term_id, label, inst_book_id, fd, messages, url;
190-
messages = check_completeness(true);
191-
if (messages.length !== 0) {
192-
form_alert(messages);
193-
$('#btn-submit-co').prop('disabled', false);
194-
return;
195-
}
196-
organization_id = $('#organization-select').val();
197-
course_id = $('#course-select').val();
198-
term_id = $('#term-select').val();
199-
label = $('#label').val();
200-
inst_book_id = $('#inst-book-select').val();
201-
fd = new FormData;
202-
fd.append('organization_id', organization_id);
203-
fd.append('course_id', course_id);
204-
fd.append('term_id', term_id);
205-
fd.append('label', label);
206-
fd.append('inst_book_id', inst_book_id);
207-
url = '/textbooks'
208-
return $.ajax({
209-
url: url,
210-
type: 'post',
211-
data: fd,
212-
processData: false,
213-
contentType: false,
214-
success: function (data) {
215-
return window.location.href = data['url'];
216-
}
217-
});
218-
};
219-
220-
221183
handle_submit = function () {
222184
var lms_instance_id, lms_course_num, lms_course_code, organization_id, course_id, term_id, label, late_policy_id, inst_book_id, fd, messages, url;
223185
messages = check_completeness(false);

app/assets/javascripts/textbooks.js

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
});
2424

2525
$('#btn-gen-textbook').click(function () {
26+
console.log("here")
2627
$(this).prop('disabled', true);
2728
return handle_generate_textbook();
2829
});

0 commit comments

Comments
 (0)