mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Contacts: Simplify template loading.
This commit is contained in:
parent
7a83eacc21
commit
3235ff3620
@ -786,9 +786,10 @@ OC.Contacts = OC.Contacts || {
|
||||
// The weird double loading is because jquery apparently doesn't
|
||||
// create a searchable object from a script element.
|
||||
$.each($($('#contactDetailsTemplate').html()), function(idx, node) {
|
||||
if(node.nodeType === Node.ELEMENT_NODE && node.nodeName === 'DIV') {
|
||||
var $node = $(node);
|
||||
if($node.is('div')) {
|
||||
var $tmpl = $(node.innerHTML);
|
||||
self.detailTemplates[$tmpl.data('element')] = $(node);
|
||||
self.detailTemplates[$tmpl.data('element')] = $node;
|
||||
}
|
||||
});
|
||||
this.$groupListItemTemplate = $('#groupListItemTemplate');
|
||||
|
Loading…
Reference in New Issue
Block a user