Rewrite external task view component in vanilla javascript

This commit is contained in:
Frederic Guillot
2016-11-21 23:01:17 -05:00
parent 8976f4d15c
commit d3cb436eb5
3 changed files with 9 additions and 14 deletions

View File

@@ -1,18 +1,11 @@
Vue.component('external-task-view', {
props: ['url'],
template: '<div id="external-task-view" v-show="content">{{{ content }}}</div>',
data: function () {
return {
content: ''
};
},
ready: function () {
var self = this;
KB.component('external-task-view', function (containerElement, options) {
this.render = function () {
$.ajax({
cache: false,
url: this.url,
url: options.url,
success: function(data) {
self.content = data;
KB.el(containerElement).html('<div id="external-task-view">' + data + '</div>');
}
});
}