javascript bootstrap_table EventOperate

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript bootstrap_table EventOperate相关的知识,希望对你有一定的参考价值。

'click .js-delete': function(e, value, row, index) {
	var keyId = row.ClassRoomId;
	$.jAlert({
		'type': 'confirm',
		'title': "确认",
		'confirmQuestion': "确认删除?",
		'theme': 'red',
		'size': 'md',
		'closeOnClick': true,
		'showAnimation': 'fadeInUp',
		'hideAnimation': 'fadeOutDown',
		'btns': [{ 'text': '关闭', 'theme': 'green' }],
		'onConfirm': function(e, btn) {
			e.preventDefault();
			$.post('delete',
				{
					Id: keyId
				},
				function(data) {
					var json = $.parseJSON(data);
					if (json.status === "1")
						refreshTable();
					else
						alertResultFail(json.msg);
				});
			return false;
		},
		'onDeny': '',
		'confirmAutofocus': 'denyBtn',
		'confirmBtnText': '    删除    ',
		'denyBtnText': '    取消    '
	});
},
'click .js-undelete': function(e, value, row, index) {
	var keyId = row.ClassRoomId;
	$.jAlert({
		'type': 'confirm',
		'title': "确认",
		'confirmQuestion': "确认恢复?",
		'theme': 'green',
		'size': 'md',
		'closeOnClick': true,
		'showAnimation': 'fadeInUp',
		'hideAnimation': 'fadeOutDown',
		'btns': [{ 'text': '关闭', 'theme': 'green' }],
		'onConfirm': function(e, btn) {
			e.preventDefault();
			$.post('undelete',
				{
					Id: keyId
				},
				function(data) {
					var json = $.parseJSON(data);
					if (json.status === "1")
						refreshTable();
					else
						alertResultFail(json.msg);
				});
			return false;
		},
		'onDeny': '',
		'confirmAutofocus': 'denyBtn',
		'confirmBtnText': '    恢复    ',
		'denyBtnText': '    取消    '
	});
},
'click .js-edit': function(e, value, row, index) {
	var keyId = row.ClassRoomId;
	window.open(`Edit?id=${keyId}`);
},
window.Events = {
			'click .js-details': function(e, value, row, index) {
				var keyId = row.LeadsId;
				window.open(`../Leads/Details?id=${keyId}`);
			},
			'click .js-receipt': function(e, value, row, index) {
				var keyId = row.LeadsId;
				window.open(`../Receipt/ManageLeads?leadsId=${keyId}`);
			},
			'click .js-leadsassign': function (e, value, row, index) {
				$("#LeadsIdModal_LeadsAssign").val(row.LeadsId);
				$('input:radio[name=LeadsSchoolNoValidReason]:checked').prop('checked', '');

				$("#myModalLeadsAssignLabel").html(row.LeadsStudentName);

				$('#myModalLeadsAssign').modal('show');
				pymChild.onMessage('viewport-iframe-position', function (parentInfo) {
					var info = parentInfo.split(' ');
					$('.body-content').css("padding-bottom", info[1] - 800 + "px");

				});
				getCClist();
				pymChild.getParentPositionInfo();
			},
		};

以上是关于javascript bootstrap_table EventOperate的主要内容,如果未能解决你的问题,请参考以下文章

javascript JavaScript isset()等效: - JavaScript

JavaScript 使用JavaScript更改CSS(JavaScript)

JavaScript之基础-1 JavaScript(概述基础语法)

前端基础-JavaScript的基本概述和语法

JavaScript

JavaScript