Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     this.someOtherFunction = funciton (key) {
  2.         dao.deleteNote(key,
  3.             this.webNoteDeleted.bind(this, key));
  4.     };
  5.  
  6.     this.webNoteDeleted = function (note, response) {
  7.         //Mojo.Log.info("Web Note Deleted %j %j", note, response); 
  8.         if (note === response) {
  9.             this.finishTransactions('notes');
  10.         }  
  11.     };
  12.  
  13.  
  14. DAO:
  15.  
  16.     this.deleteNote = function (inNote, inCallback) {
  17.         //Mojo.Log.info("Entering db deleteNote()");
  18.         // Delete Folder with value inNote
  19.         this.db.transaction((function (inTransaction) {
  20.             inTransaction.executeSql(sqlDeleteNote,
  21.                 [inNote],
  22.                 function(){
  23.                     //Mojo.Log.info("Deleted Note", inNote);
  24.                     inCallback(inNote);
  25.                 },
  26.                 this.errorHandler.bind(this));
  27.         }).bind(this));
  28.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement