Rewrite external task view component in vanilla javascript
This commit is contained in:
2
assets/js/app.min.js
vendored
2
assets/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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>');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user