entity.js: get rid of type option
This commit is contained in:
parent
61a281ec32
commit
35087a74a9
1 changed files with 10 additions and 10 deletions
|
@ -3,13 +3,13 @@
|
|||
'use strict';
|
||||
|
||||
pandora.ui.entity = function(options, callback) {
|
||||
// options: {id, type, view}
|
||||
Ox.get(
|
||||
'/static/html/entities.' + options.type + '.' + options.view + '.html',
|
||||
function(html) {
|
||||
// options: {id, view}
|
||||
pandora.api.getEntity({
|
||||
id: options.id
|
||||
}, function(data) {
|
||||
Ox.get(
|
||||
'/static/html/entities.' + data.type + '.' + options.view + '.html',
|
||||
function(html) {
|
||||
html = html.replace(/\{(.+?)\}/g, function() {
|
||||
var parts = arguments[1].split('|'),
|
||||
value = data[parts[0]];
|
||||
|
@ -21,7 +21,7 @@ pandora.ui.entity = function(options, callback) {
|
|||
: value;
|
||||
});
|
||||
callback(html);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
Loading…
Reference in a new issue