Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    if (this.sortProperty == property) {
  2.             if (this.sortDirection == "ASC") this.sortDirection = "DESC";
  3.             else {
  4.                 console.log(this.sortDirection + "heeeehhh");
  5.                 this.sortProperty = this.service.defaultOrderProperty;
  6.                 if (this.service.defaultOrderDirection == "DESC") {
  7.                     console.log("herr");
  8.                     this.sortDirection = "ASC";
  9.                 }
  10.                 else {
  11.                     this.sortDirection = this.service.defaultOrderDirection;
  12.                 }
  13.  
  14.             }
  15.                     this.sortClicked = true;
  16.  
  17.         } else {
  18.             console.log(this.sortDirection);
  19.             console.log(this.sortProperty + "this.property" );
  20.             console.log(property + "property");
  21.             this.sortProperty = property;
  22.             this.sortDirection = "ASC";
  23.         }
  24.  
  25.         this.fetch(this.loadCount, 0, true);
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement