1
0
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:
Thomas Tanghus 2012-12-20 22:58:04 +01:00
parent 7a83eacc21
commit 3235ff3620

View File

@ -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');