Added a raw getter to be able to extract images correctly
This commit is contained in:
parent
51e6abf477
commit
2435d1cf93
|
@ -59,6 +59,30 @@ function SearchEntry(options) {
|
|||
});
|
||||
return obj;
|
||||
});
|
||||
|
||||
this.__defineGetter__('raw', function () {
|
||||
var obj = {
|
||||
dn: self.dn.toString(),
|
||||
controls: []
|
||||
};
|
||||
|
||||
self.attributes.forEach(function (a) {
|
||||
if (a.buffers && a.buffers.length) {
|
||||
if (a.buffers.length > 1) {
|
||||
obj[a.type] = a.buffers.slice();
|
||||
} else {
|
||||
obj[a.type] = a.buffers[0];
|
||||
}
|
||||
} else {
|
||||
obj[a.type] = [];
|
||||
}
|
||||
});
|
||||
self.controls.forEach(function (element, index, array) {
|
||||
obj.controls.push(element.json);
|
||||
});
|
||||
return obj;
|
||||
});
|
||||
|
||||
this.__defineGetter__('_dn', function () {
|
||||
return self.objectName;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue