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

Unified Diff: ui/webui/resources/js/chromeos/ui_account_tweaks.js

Issue 369643002: Lay groudwork to Closure compile JavaScript (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more compiled Created 6 years, 5 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: ui/webui/resources/js/chromeos/ui_account_tweaks.js
diff --git a/ui/webui/resources/js/chromeos/ui_account_tweaks.js b/ui/webui/resources/js/chromeos/ui_account_tweaks.js
index 9b4b85aef2be1de552a3688bcf88f9a21c2d71b2..eec6d078bd2ba7e38579857f8e3e85e4f6745d11 100644
--- a/ui/webui/resources/js/chromeos/ui_account_tweaks.js
+++ b/ui/webui/resources/js/chromeos/ui_account_tweaks.js
@@ -125,7 +125,8 @@ cr.define('uiAccountTweaks', function() {
var node = walker.nextNode();
while (node) {
- UIAccountTweaks.disableElementForSessionType_(node, sessionType);
+ UIAccountTweaks.disableElementForGuest_(
+ /** @type {Element} */(node), sessionType);
arv (Not doing code reviews) 2014/07/16 18:33:02 Sad :'(
apavlov 2014/07/16 18:56:14 On a side note, {Element} means "Element or null",
Dan Beam 2014/07/19 02:28:39 yep, thanks. I just converted most of the code to
node = walker.nextNode();
}
};
@@ -136,18 +137,18 @@ cr.define('uiAccountTweaks', function() {
* appropriate elements (input/select/button), and removes href attribute from
* <a> element.
*
- * @private
* @param {Element} element Element that should be disabled.
* @param {string} sessionType account session Type specificator.
+ * @private
*/
UIAccountTweaks.disableElementForSessionType_ = function(element,
sessionType) {
element.classList.add(sessionType + '-disabled');
if (element.nodeName == 'INPUT' ||
element.nodeName == 'SELECT' ||
- element.nodeName == 'BUTTON')
+ element.nodeName == 'BUTTON') {
element.disabled = true;
- if (element.nodeName == 'A') {
+ } else if (element.nodeName == 'A') {
element.onclick = function() {
return false;
};

Powered by Google App Engine
This is Rietveld 408576698