You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
843 B
25 lines
843 B
$(document).on('turbolinks:load', function() {
|
|
if ($('.weapp-banner-setting-container').length > 0) {
|
|
var $form = $('#course_form');
|
|
|
|
$('.course.banner-item-bottom').on("change", 'input[type="file"]', function() {
|
|
var $fileInput = $(this);
|
|
var file = this.files[0];
|
|
var imageType = /image.*/;
|
|
if (file && file.type.match(imageType)) {
|
|
$form.ajaxSubmit()
|
|
}
|
|
});
|
|
|
|
var $shixunform = $('#shixun_form');
|
|
|
|
$('.shixun.banner-item-bottom').on("change", 'input[type="file"]', function() {
|
|
var $fileInput = $(this);
|
|
var file = this.files[0];
|
|
var imageType = /image.*/;
|
|
if (file && file.type.match(imageType)) {
|
|
$shixunform.ajaxSubmit()
|
|
}
|
|
});
|
|
}
|
|
}) |