From dd81268a8e4f48ffb65cb14514a93a259925735c Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Thu, 29 Jan 2015 07:42:05 +1100 Subject: [PATCH] Use dot notation in some places Summary: Use `x.y` in favor of `x['y']` in //some// JavaScript callsites. Note that there are a bunch of places where the latter is explicitly used to trick `PhabricatorJavelinLinter`. Test Plan: `arc lint` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11442 --- resources/celerity/map.php | 42 +++++++++---------- .../rsrc/externals/javelin/core/Stratcom.js | 2 +- webroot/rsrc/externals/javelin/core/init.js | 2 +- .../differential/behavior-show-more.js | 4 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 7442ca2abd..1f65266b3d 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -8,10 +8,10 @@ return array( 'names' => array( 'core.pkg.css' => '8815f87d', - 'core.pkg.js' => 'efa12ecc', + 'core.pkg.js' => 'a27c1b62', 'darkconsole.pkg.js' => '8ab24e01', 'differential.pkg.css' => '8af45893', - 'differential.pkg.js' => '5c1f3896', + 'differential.pkg.js' => '7b5a4aa4', 'diffusion.pkg.css' => '591664fa', 'diffusion.pkg.js' => 'bfc0737b', 'maniphest.pkg.css' => '68d4dd3d', @@ -160,12 +160,12 @@ return array( 'rsrc/externals/font/sourcesans/SourceSansPro.woff' => '3614608c', 'rsrc/externals/font/sourcesans/SourceSansProBold.woff' => 'cbf46566', 'rsrc/externals/javelin/core/Event.js' => '85ea0626', - 'rsrc/externals/javelin/core/Stratcom.js' => '8b0ad945', + 'rsrc/externals/javelin/core/Stratcom.js' => '6c53634d', 'rsrc/externals/javelin/core/__tests__/event-stop-and-kill.js' => '717554e4', 'rsrc/externals/javelin/core/__tests__/install.js' => 'c432ee85', 'rsrc/externals/javelin/core/__tests__/stratcom.js' => '88bf7313', 'rsrc/externals/javelin/core/__tests__/util.js' => 'e251703d', - 'rsrc/externals/javelin/core/init.js' => '4df97779', + 'rsrc/externals/javelin/core/init.js' => '2bd3c675', 'rsrc/externals/javelin/core/init_node.js' => 'c234aded', 'rsrc/externals/javelin/core/install.js' => '05270951', 'rsrc/externals/javelin/core/util.js' => '93cc50d6', @@ -364,7 +364,7 @@ return array( 'rsrc/js/application/differential/behavior-keyboard-nav.js' => '2c426492', 'rsrc/js/application/differential/behavior-populate.js' => 'bdb3e4d0', 'rsrc/js/application/differential/behavior-show-field-details.js' => 'bba9eedf', - 'rsrc/js/application/differential/behavior-show-more.js' => 'dd7e8ef5', + 'rsrc/js/application/differential/behavior-show-more.js' => '954d2de0', 'rsrc/js/application/differential/behavior-toggle-files.js' => 'ca3f91eb', 'rsrc/js/application/differential/behavior-user-select.js' => 'a8d8459d', 'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'b42eddc7', @@ -569,7 +569,7 @@ return array( 'javelin-behavior-differential-keyboard-navigation' => '2c426492', 'javelin-behavior-differential-populate' => 'bdb3e4d0', 'javelin-behavior-differential-show-field-details' => 'bba9eedf', - 'javelin-behavior-differential-show-more' => 'dd7e8ef5', + 'javelin-behavior-differential-show-more' => '954d2de0', 'javelin-behavior-differential-toggle-files' => 'ca3f91eb', 'javelin-behavior-differential-user-select' => 'a8d8459d', 'javelin-behavior-diffusion-commit-branches' => 'bdaf4d04', @@ -661,7 +661,7 @@ return array( 'javelin-install' => '05270951', 'javelin-json' => '69adf288', 'javelin-leader' => '331b1611', - 'javelin-magical-init' => '4df97779', + 'javelin-magical-init' => '2bd3c675', 'javelin-mask' => '8a41885b', 'javelin-quicksand' => 'f960d43d', 'javelin-reactor' => '2b8de964', @@ -673,7 +673,7 @@ return array( 'javelin-routable' => 'b3e7d692', 'javelin-router' => '29274e2b', 'javelin-scrollbar' => 'ef2ec0c6', - 'javelin-stratcom' => '8b0ad945', + 'javelin-stratcom' => '6c53634d', 'javelin-tokenizer' => '7644823e', 'javelin-typeahead' => '70baed2f', 'javelin-typeahead-composite-source' => '503e17fd', @@ -1273,6 +1273,12 @@ return array( 'javelin-install', 'javelin-util', ), + '6c53634d' => array( + 'javelin-install', + 'javelin-event', + 'javelin-util', + 'javelin-magical-init', + ), '6d3e1947' => array( 'javelin-behavior', 'javelin-diffusion-locate-file-source', @@ -1461,12 +1467,6 @@ return array( 'javelin-install', 'javelin-dom', ), - '8b0ad945' => array( - 'javelin-install', - 'javelin-event', - 'javelin-util', - 'javelin-magical-init', - ), '8b3fd187' => array( 'javelin-install', 'javelin-util', @@ -1519,6 +1519,13 @@ return array( 'javelin-resource', 'javelin-routable', ), + '954d2de0' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-workflow', + 'javelin-util', + 'javelin-stratcom', + ), '965cab65' => array( 'javelin-behavior', 'javelin-vector', @@ -1761,13 +1768,6 @@ return array( 'javelin-dom', 'phabricator-busy', ), - 'dd7e8ef5' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-workflow', - 'javelin-util', - 'javelin-stratcom', - ), 'de2e896f' => array( 'javelin-behavior', 'javelin-dom', diff --git a/webroot/rsrc/externals/javelin/core/Stratcom.js b/webroot/rsrc/externals/javelin/core/Stratcom.js index 28eff44c12..e7319843d1 100644 --- a/webroot/rsrc/externals/javelin/core/Stratcom.js +++ b/webroot/rsrc/externals/javelin/core/Stratcom.js @@ -223,7 +223,7 @@ JX.install('Stratcom', { } // Add a remove function to the listener - listener['remove'] = function() { + listener.remove = function() { if (listener._callback) { delete listener._callback; for (var ii = 0; ii < ids.length; ii++) { diff --git a/webroot/rsrc/externals/javelin/core/init.js b/webroot/rsrc/externals/javelin/core/init.js index 019bfcc91b..429239cc7f 100644 --- a/webroot/rsrc/externals/javelin/core/init.js +++ b/webroot/rsrc/externals/javelin/core/init.js @@ -46,7 +46,7 @@ makeHoldingQueue('behavior'); makeHoldingQueue('install-init'); - window['__DEV__'] = window['__DEV__'] || 0; + window.__DEV__ = window.__DEV__ || 0; var loaded = false; var onload = []; diff --git a/webroot/rsrc/js/application/differential/behavior-show-more.js b/webroot/rsrc/js/application/differential/behavior-show-more.js index 14e0d9feb1..3d85674542 100644 --- a/webroot/rsrc/js/application/differential/behavior-show-more.js +++ b/webroot/rsrc/js/application/differential/behavior-show-more.js @@ -40,8 +40,8 @@ JX.behavior('differential-show-more', function(config) { JX.DOM.setContent(container, 'Loading...'); JX.DOM.alterClass(context, 'differential-show-more-loading', true); - if (!data['whitespace']) { - data['whitespace'] = config.whitespace; + if (!data.whitespace) { + data.whitespace = config.whitespace; } new JX.Workflow(config.uri, data)