Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #13673 from KevinGrandon/revert_bug_935307
Browse files Browse the repository at this point in the history
Revert "Bug 935307 - [B2G][Contacts] A user is able to retrieve a contact information from Settings screen"
  • Loading branch information
KevinGrandon committed Nov 13, 2013
2 parents 370cfa4 + 74d7398 commit 02c078d
Showing 1 changed file with 10 additions and 28 deletions.
38 changes: 10 additions & 28 deletions apps/communications/contacts/js/navigation.js
Expand Up @@ -100,27 +100,20 @@ function navigationStack(currentView) {
currentClassList.remove('hide');
} else {
current = document.getElementById(_currentView);
currentClassList = current.classList;
}

var forwardsClasses = this.transitions[transition].forwards;
var backwardsClasses = this.transitions[transition].backwards;

// Add forwards class to current view.
currentClassList.add('block-item');
if (forwardsClasses.current) {
currentClassList.add(forwardsClasses.current);
}

var next = document.getElementById(nextView);
// Add forwards class to next view.
if (forwardsClasses.next) {
next.classList.add('block-item');
next.classList.add(forwardsClasses.next);
next.addEventListener('animationend', function ng_onNextBackwards(ev) {
next.removeEventListener('animationend', ng_onNextBackwards);
next.classList.remove('block-item');
});
}

var zIndex = this.stack[this.stack.length - 1].zIndex + 1;
Expand All @@ -147,17 +140,6 @@ function navigationStack(currentView) {
var nextView = this.stack[this.stack.length - 1];
var transition = currentView.transition;

var next = document.getElementById(nextView.view);
var nextClassList;
// Performance is very bad when there are too many contacts so we use
// -moz-element and animate this 'screenshot" element.
if (transition.indexOf('go-deeper') === 0) {
next = document.getElementById(screenshotViewId);
} else {
next = document.getElementById(nextView.view);
}
nextClassList = next.classList;

var forwardsClasses = this.transitions[transition].forwards;
var backwardsClasses = this.transitions[transition].backwards;

Expand All @@ -167,7 +149,6 @@ function navigationStack(currentView) {

// Add backwards class to current view.
if (backwardsClasses.current) {
currentClassList.add('block-item');
currentClassList.add(backwardsClasses.current);
current.addEventListener('animationend',
function ng_onCurrentBackwards() {
Expand All @@ -177,21 +158,23 @@ function navigationStack(currentView) {
currentClassList.remove(forwardsClasses.next);
currentClassList.remove(backwardsClasses.current);
current.style.zIndex = null;
currentClassList.remove('block-item');
if (!backwardsClasses.next) {
nextClassList.remove('block-item');
}
}
);
} else {
current.style.zIndex = null;
currentClassList.remove('block-item');
if (!backwardsClasses.next) {
nextClassList.remove('block-item');
}
}
var next = document.getElementById(nextView.view);
var nextClassList;

next.style.zIndex = nextView.zIndex;
// Performance is very bad when there are too many contacts so we use
// -moz-element and animate this 'screenshot" element.
if (transition.indexOf('go-deeper') === 0) {
next = document.getElementById(screenshotViewId);
} else {
next = document.getElementById(nextView.view);
}
nextClassList = next.classList;

// Add backwards class to next view.
if (backwardsClasses.next) {
Expand All @@ -208,7 +191,6 @@ function navigationStack(currentView) {
nextClassList.remove('search');
nextClassList.remove('contact-list');
}
nextClassList.remove('block-item');
});
}

Expand Down

0 comments on commit 02c078d

Please sign in to comment.