Improved path support
This commit is contained in:
parent
704eab9104
commit
64525b55eb
2 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
w3component.components['w3component/post-list'] = function (element, template) {
|
||||
w3component.components['post-list'] = function (element, template) {
|
||||
var self = this;
|
||||
var url = '../api.php/posts';
|
||||
self.edit = function() {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ var w3component = $(function(){
|
|||
$.ajax({dataType:'text', url: name+'.html',success:function(template){
|
||||
$('<script>').attr('src',name+'.js').appendTo('body').on('load',function(){
|
||||
$(['div.w3component[w3component="'+name+'"]']).each(function(){
|
||||
self.components[name]($(this),template);
|
||||
self.components[name.split('/').pop()]($(this),template);
|
||||
});
|
||||
});
|
||||
}});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue