components system
parent
f5b701553c
commit
54cbbe2844
@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
var components = components || {};
|
||||
|
||||
(function() {
|
||||
components.core = {
|
||||
'post/content': function(pid) {
|
||||
var el = $('[data-pid="' + pid + '"]').find('[component="post/content"]');
|
||||
return el.length ? el : $('[data-pid="' + pid + '"]').find('.post-content'); // deprecated after 0.7x
|
||||
}
|
||||
};
|
||||
|
||||
components.get = function() {
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
return components.core[arguments[0]].apply(this, args);
|
||||
};
|
||||
}());
|
Loading…
Reference in New Issue