Save button responds to change. Data updated
This commit is contained in:
		| @@ -64,18 +64,16 @@ function getDomain(){ | ||||
| function setDataModified(){ | ||||
|     if(dataModified) return; | ||||
|     dataModified = true; | ||||
|     $('#btn-save').removeClass('btn-inactive'); | ||||
|     $('#btn-save').addClass('btn-action'); | ||||
|     $('#btn-save').addClass('active'); | ||||
|     $('#btn-save').click(getUpdate); | ||||
| } | ||||
|  | ||||
| //Adding change listener to fields | ||||
| $('.field').change(setModified); | ||||
| $('.data-field').change(setModified); | ||||
|  | ||||
| function setDataOrigin(){ | ||||
|     dataModified = false; | ||||
|     $('#btn-save').addClass('btn-inactive'); | ||||
|     $('#btn-save').removeClass('btn-action'); | ||||
|     $('#btn-save').removeClass('active'); | ||||
|     $('#btn-save').off(); | ||||
| } | ||||
|  | ||||
| @@ -306,9 +304,6 @@ function fillMessageList(){ | ||||
|     $('.tile').click(function() { | ||||
|         console.log(this); | ||||
|         loadMessage(parseInt($(this).attr('tileid'))); | ||||
|         // console.log(e.target); | ||||
|         // const id = parseInt(e.target.tileid); | ||||
|         // loadMessage(id); | ||||
|     }); | ||||
|     // $('.btn-tile').click(tileRemoval); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user