mode/bootstrapplugin/jquery-bootsform.js

(开头部分) 12KB

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

/**
*	bootstable 表单录入插件
*	caratename:雨中磐石(rainrock)
*	caratetime:2014-04-06 21:40:00
*	email:admin@rockoa.com
*	homepage:www.rockoa.com
*/


(function ($) {
	
	function bootsform(element, options){
		var obj		= element;
		var can		= options;
		var rand	= can.rand; 
		var me		= this;
		this.form	= null;
		this.editdata = {};
		this.itemsdata = {};
		
		this.init	= function(){
			if(rand=='')rand=js.getrand();
			if(!can.window)return;
			can.windowid = 'window_'+rand+'';
			var s = this._create();
			js.tanbody(can.windowid, can.title, can.width, can.height,{bbar:'none',html:s,titlecls:can.saveCls});
			can.render	= ''+can.windowid+'_body';
			obj = $('#'+can.render+'');
			this.createafter();
			$('#cancel_'+rand+'').focus();
		};
		this.forminit = function(){
			this.createafter();
		};
		this.createafter	 = function(){
			this.form	= document['form_'+rand+''];
			var saveid = can.saveid;
			if(saveid=='')saveid = 'save_'+rand+'';
			$('#'+saveid+'').click(function(){
				me._save(this, 0);
			});
			$('#cancel_'+rand+'').click(function(){
				me._cancel(this);
			});
			var a = can.items,b=[],i;
			if(can.requiredfields!='')b = can.requiredfields.split(',');
			for(i=0; i<a.length; i++){
				if(a[i].required)b.push(a[i].name);
			}
			for(i=0; i<b.length; i++){
				$(this.form[b[i]]).change(function(){
					me.isValid();
				});
				$(this.form[b[i]]).blur(function(){
					me.isValid();
				});
			}		
			if(obj){
				obj.find("button[changeuser]").click(function(){
					me._changeuser($(this));
后面还有 373 行代码,购买后查看完整代码

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

AI 解读 AI

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

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