Skip to content

Commit

Permalink
Contacts: Simplify template loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghus committed Dec 20, 2012
1 parent 808a81f commit 52cdbbc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contacts/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 52cdbbc

Please sign in to comment.