1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-17 18:21:11 +01:00

Use better variable names

Summary:
Use `p` and `c` instead of (reusing) `k`. This silences the following JSHint warning:

```
>>> Lint for webroot/rsrc/js/application/projects/behavior-project-boards.js:

   Warning  (W004) JSHintW004
    'k' is already defined.

              57       'phui-tag-shade-blue': (sum > 0 && !over_limit),
              58       'phui-tag-shade-red': (over_limit)
              59     };
    >>>       60     for (var k in color_map) {
              61       JX.DOM.alterClass(data.countTagNode, k, !!color_map[k]);
              62     }
              63   }
```

Test Plan: `arc lint`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11066
This commit is contained in:
Joshua Spence 2014-12-30 02:56:11 -08:00 committed by epriestley
parent 5251f08fb4
commit 02b2883555
2 changed files with 15 additions and 15 deletions

View file

@ -403,7 +403,7 @@ return array(
'rsrc/js/application/policy/behavior-policy-rule-editor.js' => 'fe9a552f',
'rsrc/js/application/ponder/behavior-votebox.js' => '4e9b766b',
'rsrc/js/application/projects/behavior-boards-dropdown.js' => '0ec56e1d',
'rsrc/js/application/projects/behavior-project-boards.js' => '0676345e',
'rsrc/js/application/projects/behavior-project-boards.js' => '8c2ab1e0',
'rsrc/js/application/projects/behavior-project-create.js' => '065227cc',
'rsrc/js/application/projects/behavior-reorder-columns.js' => 'e1d25dfb',
'rsrc/js/application/releeph/releeph-preview-branch.js' => 'b2b4fbaf',
@ -629,7 +629,7 @@ return array(
'javelin-behavior-policy-control' => 'f3fef818',
'javelin-behavior-policy-rule-editor' => 'fe9a552f',
'javelin-behavior-ponder-votebox' => '4e9b766b',
'javelin-behavior-project-boards' => '0676345e',
'javelin-behavior-project-boards' => '8c2ab1e0',
'javelin-behavior-project-create' => '065227cc',
'javelin-behavior-refresh-csrf' => '7814b593',
'javelin-behavior-releeph-preview-branch' => 'b2b4fbaf',
@ -848,15 +848,6 @@ return array(
'javelin-stratcom',
'javelin-workflow',
),
'0676345e' => array(
'javelin-behavior',
'javelin-dom',
'javelin-util',
'javelin-vector',
'javelin-stratcom',
'javelin-workflow',
'phabricator-draggable-list',
),
'7319e029' => array(
'javelin-behavior',
'javelin-dom',
@ -1368,6 +1359,15 @@ return array(
'javelin-request',
'javelin-typeahead-source',
),
'8c2ab1e0' => array(
'javelin-behavior',
'javelin-dom',
'javelin-util',
'javelin-vector',
'javelin-stratcom',
'javelin-workflow',
'phabricator-draggable-list',
),
'8c49f386' => array(
'javelin-install',
'javelin-util',

View file

@ -48,8 +48,8 @@ JX.behavior('project-boards', function(config) {
'project-panel-over-limit': over_limit
};
var panel = JX.DOM.findAbove(col, 'div', 'workpanel');
for (var k in panel_map) {
JX.DOM.alterClass(panel, k, !!panel_map[k]);
for (var p in panel_map) {
JX.DOM.alterClass(panel, p, !!panel_map[p]);
}
var color_map = {
@ -57,8 +57,8 @@ JX.behavior('project-boards', function(config) {
'phui-tag-shade-blue': (sum > 0 && !over_limit),
'phui-tag-shade-red': (over_limit)
};
for (var k in color_map) {
JX.DOM.alterClass(data.countTagNode, k, !!color_map[k]);
for (var c in color_map) {
JX.DOM.alterClass(data.countTagNode, c, !!color_map[c]);
}
}