Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4265)

Unified Diff: chrome/browser/resources/sync_promo/sync_promo.js

Issue 9741001: DOMUI: Remove experimental sync promo layouts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/sync_promo/sync_promo.js
diff --git a/chrome/browser/resources/sync_promo/sync_promo.js b/chrome/browser/resources/sync_promo/sync_promo.js
index 82d690fd810ac344b3c9f54bbedb4c74bbf2a0c1..5ebde1ec02f0cc7f2d09281a1080582a977cc94e 100644
--- a/chrome/browser/resources/sync_promo/sync_promo.js
+++ b/chrome/browser/resources/sync_promo/sync_promo.js
@@ -74,17 +74,12 @@ cr.define('sync_promo', function() {
});
var learnMoreClickedAlready = false;
- $('promo-learn-more-show').addEventListener('click', function() {
- self.showLearnMore_(true);
+ $('promo-learn-more').addEventListener('click', function() {
if (!learnMoreClickedAlready)
chrome.send('SyncPromo:UserFlowAction', [actions.LEARN_MORE_CLICKED]);
learnMoreClickedAlready = true;
});
- $('promo-learn-more-hide').addEventListener('click', function() {
- self.showLearnMore_(false);
- });
-
$('promo-advanced').addEventListener('click', function() {
chrome.send('SyncPromo:ShowAdvancedSettings');
});
@@ -137,14 +132,6 @@ cr.define('sync_promo', function() {
};
$('confirm-everything-cancel').addEventListener('click', cancelFunc);
$('choose-datatypes-cancel').addEventListener('click', cancelFunc);
-
- this.infographic_ = $('promo-infographic');
- this.learnMore_ = $('promo-information');
-
- this.infographic_.addEventListener('webkitTransitionEnd',
- this.toggleHidden_.bind(this));
- this.learnMore_.addEventListener('webkitTransitionEnd',
- this.toggleHidden_.bind(this));
},
/**
@@ -158,37 +145,6 @@ cr.define('sync_promo', function() {
chrome.send('SyncPromo:UserFlowAction', [actions.LEFT_DURING_THROBBER]);
},
- /**
- * Remove the [hidden] attribute from the node that was not previously
- * transitioning.
- * @param {Event} e A -webkit-transition end event.
- * @private
- */
- toggleHidden_: function(e) {
- // Only show the other element if the target of this event was hidden
- // (showing also triggers a transition end).
- if (e.target.hidden) {
- if (e.target === this.infographic_)
- this.learnMore_.hidden = false;
- else
- this.infographic_.hidden = false;
- }
- },
-
- /**
- * Shows or hides the sync information.
- * @param {Boolean} show True if sync information should be shown, false
- * otherwise.
- * @private
- */
- showLearnMore_: function(show) {
- $('promo-learn-more-show').hidden = show;
- $('promo-learn-more-hide').hidden = !show;
- // Setting [hidden] triggers a transition, which (when ended) will trigger
- // this.toggleHidden_.
- (show ? this.infographic_ : this.learnMore_).hidden = true;
- },
-
/** @inheritDoc */
sendConfiguration_: function() {
chrome.send('SyncPromo:UserFlowAction',
@@ -214,16 +170,6 @@ cr.define('sync_promo', function() {
},
/**
- * Shows the given promo version. Each version changes the UI slightly
- * (for example, replacing text with an infographic).
- * @param {Integer} the version of the promo.
- * @private
- */
- showPromoVersion_: function(version) {
- document.documentElement.setAttribute('promo-version', version);
- },
-
- /**
* Number of times a user attempted to sign in to GAIA during this page
* view.
* @private
@@ -274,10 +220,6 @@ cr.define('sync_promo', function() {
SyncPromo.getInstance().populatePromoMessage_(resName);
};
- SyncPromo.showPromoVersion = function(version) {
- SyncPromo.getInstance().showPromoVersion_(version);
- };
-
// Export
return {
SyncPromo: SyncPromo
« no previous file with comments | « chrome/browser/resources/sync_promo/sync_promo.css ('k') | chrome/browser/resources/sync_setup_overlay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698