web/bundles/topxiaadmin/js/controller/attachment/upload-form.js

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

define(function(require, exports, module) {
  var Notify = require('common/bootstrap-notify');
  exports.run = function() {
    $('.js-attachment-list').on('click', '.js-attachment-delete', function() {
      var $this = $(this);
      var attachment_remove = confirm(Translator.trans('admin.attachment.delete_hint'));
      if (attachment_remove) {
        $.post($this.data('url'), function(result) {

        }).done(function(result) {
          if (result.msg == 'ok') {
            Notify.success(Translator.trans('admin.attachment.delete_success_hint'));
            $this.closest('.js-attachment-list').parent().siblings('[data-role="fileId"]').val('');
            $this.closest('.js-attachment-list').parent().find('.js-upload-file').show();
            $this.closest('.js-attachment-list').children().remove();
          } else {
            Notify.danger(Translator.trans('admin.attachment.delete_failed_hint'));
          }
        }).fail(function(ajaxFailed) {
          Notify.danger(Translator.trans('admin.attachment.delete_failed_hint'));
        })
      }
    })
  }
});

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。