Commit 6cdc9859c38e55748bc20ac9fab7f4d2a3c14d9c
- Diff rendering mode:
- inline
- side by side
swtr/static/js/main.js
(17 / 12)
  | |||
678 | 678 | id: 'linked-data-container', | |
679 | 679 | initialize: function() { | |
680 | 680 | var self = this; | |
681 | this.loader_template = _.template($("#loader-template").html()); | ||
682 | $("#linked-data-page").prepend(this.loader_template()); | ||
683 | swtr.LDs = new LDSwts(); | ||
684 | swtr.LDs.getAll({ | ||
685 | what: 'img-anno', | ||
686 | success: function(data) { | ||
687 | swtr.LDs.add(data); | ||
688 | if(!swtr.tagCloudView) { | ||
689 | $("#spinner").remove(); | ||
690 | swtr.tagCloudView = new TagCloudView({collection: swtr.LDs}); | ||
681 | if(!swtr.LDs) { | ||
682 | swtr.LDs = new LDSwts(); | ||
683 | } | ||
684 | if(!swtr.LDs.length) { | ||
685 | console.log(swtr.LDs); | ||
686 | this.loader_template = _.template($("#loader-template").html()); | ||
687 | $("#linked-data-page").prepend(this.loader_template()); | ||
688 | swtr.LDs.getAll({ | ||
689 | what: 'img-anno', | ||
690 | success: function(data) { | ||
691 | swtr.LDs.add(data); | ||
692 | if(!swtr.tagCloudView) { | ||
693 | $("#spinner").remove(); | ||
694 | swtr.tagCloudView = new TagCloudView({collection: swtr.LDs}); | ||
695 | } | ||
691 | 696 | } | |
692 | } | ||
693 | }); | ||
697 | }); | ||
698 | } | ||
694 | 699 | }, | |
695 | 700 | destroy: function() { | |
696 | 701 | this.cleanUp(); |