Guest User

Untitled

a guest
Dec 13th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. building
  2. floor
  3. office
  4. room
  5.  
  6. id
  7. description
  8. short_description
  9. date_inserted
  10. date_updated
  11. db_primary_key(only upon initialisation)
  12.  
  13. {from:'foo',to:'bar'}
  14.  
  15. var NodeTree = {
  16. collection:{};//all node objects
  17. toCreate:{b:[],f:[],o:[],r:[]},//newly created nodes - use ids or the object itself?
  18. toEdit:{b:[],f:[],o:[],r:[]},//edited attribute of node - use ids or the object itself?
  19. toDelete:{b:[],f:[],o:[],r:[]},//deleted node from tree - use ids or the object itself?
  20. create: function(type,node){
  21. this.toCreate[type].push(node);
  22. }//function to add created node?
  23. }
  24.  
  25. var NodeEdges = {
  26. collection:[];
  27. toCreate:{b:[],f:[],o:[],r:[]},
  28. toEdit:{b:[],f:[],o:[],r:[]},
  29. toDelete:{b:[],f:[],o:[],r:[]},
  30. create: function(type,node){
  31. this.toCreate[type].push(node);
  32. }
  33. }
Add Comment
Please, Sign In to add comment