|
- $("#cooperator-modals").html("<%= j render(partial: 'admins/topic/cooperators/form_modal', locals: {type: 'update'}) %>")
- $(".cooperator-change-modal").modal('show');
-
- $('.logo-item-left').on("change", 'input[type="file"]', function () {
- var $fileInput = $(this);
- var file = this.files[0];
- var imageType = /image.*/;
- if (file && file.type.match(imageType)) {
- var reader = new FileReader();
- reader.onload = function () {
- var $box = $fileInput.parent();
- $box.find('img').attr('src', reader.result).css('display', 'block');
- $box.addClass('has-img');
- };
- reader.readAsDataURL(file);
- } else {
- }
- });
|