Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug 820778-reopened. Improve Performance in link and import lists of fri... #7084

Merged
merged 1 commit into from

2 participants

@jmcanterafonseca
Collaborator

@crdlc R?

Please check for possible regressions of image loader. My network connection is not good today and I'm not sure if images are loading properly or not

apps/communications/contacts/js/fb/friends_list.js
@@ -27,6 +27,7 @@ fbFriends.List = (function() {
agroups.forEach(function(group) {
// New element appended
var ele = utils.templates.append(groupsList, {group: group}, fragment);
+ var list = ele.firstElementChild.nextElementSibling;
@crdlc Collaborator
crdlc added a note

var list = ele.children[1], is it the same?

@jmcanterafonseca Collaborator

yes, that should work as the children array contains element nodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@crdlc
Collaborator

I need to check the code in my mobile in a couple of hours

@crdlc
Collaborator

The images are loaded perfectly in import section and search

@jmcanterafonseca
Collaborator

changed by children[1] as requested

@crdlc crdlc merged commit ff651e8 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
8 apps/communications/contacts/fb_import.html
@@ -112,7 +112,7 @@ <h1 data-l10n-id="fbFriends">Facebook Friends</h1>
<p>#email1#</p>
</li>
</ol>
- </section> <!-- group template content -->
+ </section> <!-- group template content -->
</section> <!-- groupsList -->
<form role="dialog" data-type="confirm" class="no-overlay">
@@ -125,10 +125,9 @@ <h1 data-l10n-id="fbFriends">Facebook Friends</h1>
</button>
</menu>
</form>
+ </section> <!-- mainContent -->
- </section> <!-- mainContent -->
-
- <section id='fixed-container' class='fixed-title-fb'></section>
+ <section id='fixed-container' class='fixed-title-fb'></section>
</section> <!-- main -->
<section id="search-view" class="view" role="region">
@@ -153,7 +152,6 @@ <h1 data-l10n-id="fbFriends">Facebook Friends</h1>
<progress class="small"></progress>
</p>
</section>
-
</section> <!-- search-view section -->
<section id="statusMsg" role="status">
View
9 apps/communications/contacts/js/fb/friends_list.js
@@ -27,6 +27,8 @@ fbFriends.List = (function() {
agroups.forEach(function(group) {
// New element appended
var ele = utils.templates.append(groupsList, {group: group}, fragment);
+ // This is the <ol> and <header> is children[0]
+ var list = ele.children[1];
// Array of friends
var friends = groups[group];
@@ -48,13 +50,16 @@ fbFriends.List = (function() {
friend.search = utils.text.normalize(searchInfo.join(' '));
// New friend appended
- utils.templates.append(ele, friend);
- // We check wether this friend was in the AB or not before
+ utils.templates.append(list, friend);
});
+
+ // Template is deleted from the list
+ list.removeChild(list.firstElementChild);
});
groupsList.innerHTML = ''; // Deleting template
groupsList.appendChild(fragment);
+
FixedHeader.init('#mainContent', '#fixed-container',
'.fb-import-list header');
if (typeof cb === 'function') {
Something went wrong with that request. Please try again.