Commit 1c4104e08db36f8c3937ef530e173ce97ca24972

  • avatar
  • arvind
  • Sat Aug 30 14:22:48 IST 2014
Fix: TagCloudView was getting initialized every time a user comes to the
linked-data page. Check if the view has already been initialized and
then initialize a new one if needed.
  • Diff rendering mode:
  • inline
  • side by side

swtr/static/js/main.js

695 swtr.LDs.getAll({what: 'img-anno',695 swtr.LDs.getAll({what: 'img-anno',
696 success: function(data) {696 success: function(data) {
697 swtr.LDs.add(data);697 swtr.LDs.add(data);
698 this.tagCloudView = new TagCloudView({collection: swtr.LDs});
698 if(!swtr.tagCloudView) {
699 swtr.tagCloudView = new TagCloudView({collection: swtr.LDs});
700 }
699 }});701 }});
700 },702 },
701 destroy: function() {703 destroy: function() {
702 this.remove();704 this.remove();
703705
704 // $('#user-tag-cloud').html('');
705 // $('#tags-tag-cloud').html('');
706 }706 }
707 });707 });
708708