Commit 3041a8f22c08df96ce5870e099349794df901d9f

Add loading of plugin without callback

  Previously, one had to load plugin providing a callback. Make it optional at
backend. Front end has no input for callback. Have to fix that.
  • Diff rendering mode:
  • inline
  • side by side

mouchak/static/js/models.js

76 var callback = this.get('callback');76 var callback = this.get('callback');
77 script.src = this.get('src');77 script.src = this.get('src');
78 document.body.appendChild(script);78 document.body.appendChild(script);
79 script.onload = function() {
80 eval(callback);
81 };
79 if(callback) {
80 script.onload = function() {
81 eval(callback);
82 };
83 }
82 }84 }
83 else if(this.get('src').match(/\.css/)) {85 else if(this.get('src').match(/\.css/)) {
84 var link = document.createElement('link');86 var link = document.createElement('link');