NxTIC/js/includes/input-facebook-subject-min.js

3 lines
908 B
JavaScript

function inputFacebookSubject(a,b){this.username=a;this.store_button=b}inputFacebookSubject.prototype={store_button:this.store_button,username:this.username};inputFacebookSubject.prototype.check=function(){return 0<this.username.value.length};inputFacebookSubject.prototype.fieldsToStorage=function(){console.log("SUBJECT: FIELDS TO STORAGE");if(!this.check())return!1;lsi.set("f_subject",0,{username:this.username.value})};
inputFacebookSubject.prototype.storageToFields=function(){console.log("SUBJECT: STORAGE TO FIELDS");var a=lsi.get("f_subject",0);null==a&&(a={username:""});this.username.value=a.username};inputFacebookSubject.prototype.attach=function(){function a(a){b.fieldsToStorage()&&b.storageToFields()}console.log("SUBJECT: ATTACH");lsi.createDataset("f_subject");var b=this;this.store_button.addEventListener("click",a,!1);this.username.addEventListener("blur",a,!1);this.storageToFields()};