4 lines
1.1 KiB
JavaScript
4 lines
1.1 KiB
JavaScript
function inputPhoneSubject(a,b,c,d,e){this.number=a;this.username=b;this.firstname=c;this.lastname=d;this.store_button=e}inputPhoneSubject.prototype={store_button:this.store_button,number:this.number,username:this.username,firstname:this.firstname,lastname:this.lastname};
|
|
inputPhoneSubject.prototype.fieldsToStorage=function(){console.log("SUBJECT: FIELDS TO STORAGE");var a=0<this.number.value.length,a=a&&0<this.username.value.length+this.firstname.value.length+this.lastname.value.length;if(!a)return!1;lsi.set("subject",0,{number:this.number.value,username:this.username.value,firstname:this.firstname.value,lastname:this.lastname.value})};
|
|
inputPhoneSubject.prototype.storageToFields=function(){console.log("SUBJECT: STORAGE TO FIELDS");var a=lsi.get("subject",0);null!=a&&(this.number.value=a.number,this.username.value=a.username,this.firstname.value=a.firstname,this.lastname.value=a.lastname)};inputPhoneSubject.prototype.attach=function(){console.log("SUBJECT: ATTACH");lsi.createDataset("subject");var a=this;this.store_button.addEventListener("click",function(b){a.fieldsToStorage()},!1);this.storageToFields()};
|