PageRenderTime 70ms CodeModel.GetById 29ms RepoModel.GetById 1ms app.codeStats 0ms

/static/scripts/mvc/tags.js

https://bitbucket.org/jmchilton/galaxy-central-reports-config-enhancements
JavaScript | 66 lines | 29 code | 12 blank | 25 comment | 0 complexity | 188d3336ead0ee9f7f9a7afd37ced2d8 MD5 | raw file
  1. /*==============================================================================
  2. Backbone MV for Tags
  3. TODO:
  4. move rendering from tagging_common.py
  5. move functionality from controllers/tag.py
  6. ?? - polymorph on class or simply class as attr?
  7. ==============================================================================*/
  8. /** Single Tag model
  9. */
  10. var Tag = BaseModel.extend( LoggableMixin ).extend({
  11. // uncomment this out see log messages
  12. logger : console,
  13. defaults : {
  14. id : null,
  15. itemClass : null
  16. },
  17. toString : function(){
  18. return 'Tag()';
  19. }
  20. });
  21. //------------------------------------------------------------------------------
  22. /** Single Tag view
  23. */
  24. var TagView = BaseView.extend( LoggableMixin ).extend({
  25. // uncomment this out see log messages
  26. logger : console,
  27. toString : function(){
  28. return 'TagView()';
  29. }
  30. });
  31. //==============================================================================
  32. /** A collection of Tags
  33. */
  34. var TagCollection = Backbone.Collection.extend( LoggableMixin ).extend({
  35. model : Tag,
  36. // uncomment this out see log messages
  37. logger : console,
  38. toString : function(){
  39. return 'TagCollection()';
  40. }
  41. });
  42. //------------------------------------------------------------------------------
  43. /** View for a TagCollection (and it's controls) - as per an hda's tag controls on the history panel
  44. */
  45. var TagList = BaseView.extend( LoggableMixin ).extend({
  46. // uncomment this out see log messages
  47. logger : console,
  48. toString : function(){
  49. return 'TagList()';
  50. }
  51. });