mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Remove unused JavaScript variables.
Summary: There are a bunch of unused variables in JavaScript files. These were identified with JSHint. Test Plan: It's pretty hard to test this thoroughly... on inspection, it seems that everything //should// be okay (unless we are doing weird things with the JavaScript). Reviewers: chad, #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D9676
This commit is contained in:
parent
294f2bf118
commit
a0d63322b1
71 changed files with 663 additions and 691 deletions
File diff suppressed because it is too large
Load diff
|
@ -101,7 +101,7 @@ JX.behavior('aphlict-listen', function(config) {
|
|||
.setContent('Page updated, click to reload.')
|
||||
.alterClassName('jx-notification-alert', true)
|
||||
.setDuration(0);
|
||||
reload.listen('activate', function(e) { JX.$U().go(); });
|
||||
reload.listen('activate', function() { JX.$U().go(); });
|
||||
reload.show();
|
||||
|
||||
showing_reload = true;
|
||||
|
|
|
@ -17,7 +17,7 @@ JX.behavior('config-reorder-fields', function(config) {
|
|||
return JX.DOM.scry(root, 'li', 'field-spec');
|
||||
});
|
||||
|
||||
list.listen('didDrop', function(node, after) {
|
||||
list.listen('didDrop', function() {
|
||||
write_state_to_form();
|
||||
});
|
||||
|
||||
|
|
|
@ -288,7 +288,7 @@ JX.behavior('conpherence-menu', function(config) {
|
|||
JX.Stratcom.listen(
|
||||
'conpherence-redraw-thread',
|
||||
null,
|
||||
function (e) {
|
||||
function () {
|
||||
_scrollMessageWindow();
|
||||
}
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* javelin-stratcom
|
||||
*/
|
||||
|
||||
JX.behavior('conpherence-pontificate', function(config) {
|
||||
JX.behavior('conpherence-pontificate', function() {
|
||||
|
||||
JX.Stratcom.listen('aphlict-receive-message', null, function(e) {
|
||||
var message = e.getData();
|
||||
|
@ -61,7 +61,6 @@ JX.behavior('conpherence-pontificate', function(config) {
|
|||
|
||||
var root = e.getNode('conpherence-layout');
|
||||
var messages_root = JX.DOM.find(root, 'div', 'conpherence-message-pane');
|
||||
var header_root = JX.DOM.find(root, 'div', 'conpherence-header-pane');
|
||||
var form_root = JX.DOM.find(root, 'div', 'conpherence-form');
|
||||
var messages = JX.DOM.find(messages_root, 'div', 'conpherence-messages');
|
||||
var fileWidget = null;
|
||||
|
|
|
@ -29,7 +29,7 @@ JX.behavior('dashboard-move-panels', function(config) {
|
|||
JX.DOM.alterClass(item, 'drag-sending', false);
|
||||
}
|
||||
|
||||
function ondrop(list, item, after, from) {
|
||||
function ondrop(list, item, after) {
|
||||
list.lock();
|
||||
JX.DOM.alterClass(item, 'drag-sending', true);
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ JX.behavior('dashboard-query-panel-select', function(config) {
|
|||
query_control.value = new_value;
|
||||
}
|
||||
|
||||
JX.DOM.listen(app_control, 'change', null, function(e) { update(); });
|
||||
JX.DOM.listen(app_control, 'change', null, function() { update(); });
|
||||
update();
|
||||
|
||||
});
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* javelin-stratcom
|
||||
*/
|
||||
|
||||
JX.behavior('dashboard-tab-panel', function(config) {
|
||||
JX.behavior('dashboard-tab-panel', function() {
|
||||
|
||||
JX.Stratcom.listen('click', 'dashboard-tab-panel-tab', function(e) {
|
||||
e.kill();
|
||||
|
|
|
@ -118,8 +118,6 @@ JX.install('ChangesetViewManager', {
|
|||
this._loaded = true;
|
||||
this._sequence++;
|
||||
|
||||
var data = this._getNodeData();
|
||||
|
||||
var params = {
|
||||
ref: this._ref,
|
||||
whitespace: this._whitespace || '',
|
||||
|
|
|
@ -27,7 +27,7 @@ JX.behavior('differential-add-reviewers-and-ccs', function(config) {
|
|||
JX.$(config.select),
|
||||
'change',
|
||||
null,
|
||||
function(e) {
|
||||
function() {
|
||||
var v = JX.$(config.select).value;
|
||||
for (var k in dynamic) {
|
||||
if (dynamic[k].actions[v]) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* javelin-dom
|
||||
*/
|
||||
|
||||
JX.behavior('differential-comment-jump', function(config) {
|
||||
JX.behavior('differential-comment-jump', function() {
|
||||
function handle_jump(offset) {
|
||||
return (function(e) {
|
||||
var parent = JX.$('differential-review-stage');
|
||||
|
|
|
@ -230,7 +230,7 @@ JX.behavior('differential-keyboard-navigation', function(config) {
|
|||
new JX.KeyboardShortcut(
|
||||
'h',
|
||||
'Collapse or expand the file display (after jump).')
|
||||
.setHandler(function(manager) {
|
||||
.setHandler(function() {
|
||||
if (!changesets || !changesets[cursor]) {
|
||||
return;
|
||||
}
|
||||
|
@ -256,13 +256,13 @@ JX.behavior('differential-keyboard-navigation', function(config) {
|
|||
}
|
||||
|
||||
new JX.KeyboardShortcut('r', 'Reply to selected inline comment.')
|
||||
.setHandler(function(manager) {
|
||||
.setHandler(function() {
|
||||
inline_op(selection_begin, 'reply');
|
||||
})
|
||||
.register();
|
||||
|
||||
new JX.KeyboardShortcut('e', 'Edit selected inline comment.')
|
||||
.setHandler(function(manager) {
|
||||
.setHandler(function() {
|
||||
inline_op(selection_begin, 'edit');
|
||||
})
|
||||
.register();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* javelin-dom
|
||||
*/
|
||||
|
||||
JX.behavior('differential-show-field-details', function(config) {
|
||||
JX.behavior('differential-show-field-details', function() {
|
||||
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
|
|
|
@ -159,7 +159,6 @@ JX.install('DiffusionLocateFileSource', {
|
|||
*/
|
||||
matchTree: function(tree, value, pos) {
|
||||
var matches = null;
|
||||
var count = 0;
|
||||
for (var k in tree) {
|
||||
var p = pos;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
JX.behavior('audit-preview', function(config) {
|
||||
|
||||
var preview = JX.$(config.preview);
|
||||
var content = JX.$(config.content);
|
||||
var action = JX.$(config.action);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ JX.behavior('harbormaster-reorder-steps', function(config) {
|
|||
return JX.DOM.scry(root, 'li', 'build-step');
|
||||
});
|
||||
|
||||
list.listen('didDrop', function(node, after) {
|
||||
list.listen('didDrop', function(node) {
|
||||
var nodes = list.findItems();
|
||||
var order = [];
|
||||
var key;
|
||||
|
@ -31,7 +31,7 @@ JX.behavior('harbormaster-reorder-steps', function(config) {
|
|||
JX.DOM.alterClass(node, 'drag-sending', true);
|
||||
|
||||
new JX.Workflow(config.orderURI, {order: order.join()})
|
||||
.setHandler(function(e) {
|
||||
.setHandler(function() {
|
||||
JX.DOM.alterClass(node, 'drag-sending', false);
|
||||
list.unlock();
|
||||
})
|
||||
|
|
|
@ -99,7 +99,7 @@ JX.install('HeraldRuleEditor', {
|
|||
this._onactionchange(row);
|
||||
}
|
||||
},
|
||||
_onsubmit : function(e) {
|
||||
_onsubmit : function() {
|
||||
var rule = JX.DOM.find(this._root, 'input', 'rule');
|
||||
|
||||
var k;
|
||||
|
@ -108,7 +108,6 @@ JX.install('HeraldRuleEditor', {
|
|||
this._config.conditions[k][2] = this._getConditionValue(k);
|
||||
}
|
||||
|
||||
var acts = this._config.actions;
|
||||
for (k in this._config.actions) {
|
||||
this._config.actions[k][1] = this._getActionTarget(k);
|
||||
}
|
||||
|
@ -274,7 +273,7 @@ JX.install('HeraldRuleEditor', {
|
|||
return node;
|
||||
},
|
||||
|
||||
_newTokenizer : function(type, limit) {
|
||||
_newTokenizer : function(type) {
|
||||
var template = JX.$N(
|
||||
'div',
|
||||
JX.$H(this._config.template.markup));
|
||||
|
|
|
@ -17,7 +17,7 @@ JX.behavior('maniphest-batch-editor', function(config) {
|
|||
|
||||
addRow({});
|
||||
|
||||
function renderRow(data) {
|
||||
function renderRow() {
|
||||
|
||||
var action_select = JX.Prefab.renderSelect(
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ JX.behavior('maniphest-batch-editor', function(config) {
|
|||
action_rows[id] = data.dataCallback;
|
||||
}
|
||||
|
||||
function onsubmit(e) {
|
||||
function onsubmit() {
|
||||
var input = JX.$(config.input);
|
||||
|
||||
var actions = [];
|
||||
|
|
|
@ -156,7 +156,7 @@ JX.behavior('maniphest-batch-selector', function(config) {
|
|||
JX.$(config.formID),
|
||||
'submit',
|
||||
null,
|
||||
function(e) {
|
||||
function() {
|
||||
var inputs = [];
|
||||
for (var k in selected) {
|
||||
inputs.push(
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* javelin-util
|
||||
*/
|
||||
|
||||
JX.behavior('maniphest-list-editor', function(config) {
|
||||
JX.behavior('maniphest-list-editor', function() {
|
||||
|
||||
var onedit = function(task, r) {
|
||||
var nodes = JX.$H(r.tasks).getFragment().firstChild;
|
||||
|
|
|
@ -19,7 +19,7 @@ JX.behavior('maniphest-transaction-controls', function(config) {
|
|||
JX.$(config.select),
|
||||
'change',
|
||||
null,
|
||||
function(e) {
|
||||
function() {
|
||||
for (var k in config.controlMap) {
|
||||
if (k == JX.$(config.select).value) {
|
||||
JX.DOM.show(JX.$(config.controlMap[k]));
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
* When the user clicks "show details" in a Maniphest transaction, replace the
|
||||
* summary rendering with a detailed rendering.
|
||||
*/
|
||||
JX.behavior('maniphest-transaction-expand', function(config) {
|
||||
JX.behavior('maniphest-transaction-expand', function() {
|
||||
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
|
|
|
@ -101,7 +101,7 @@ JX.install('OwnersPathEditor', {
|
|||
};
|
||||
var repo_select = JX.$N('select', attrs, options);
|
||||
|
||||
JX.DOM.listen(repo_select, 'change', null, JX.bind(this, function(e) {
|
||||
JX.DOM.listen(repo_select, 'change', null, JX.bind(this, function() {
|
||||
this._lastRepositoryChoice = repo_select.value;
|
||||
}));
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* @javelin
|
||||
*/
|
||||
|
||||
JX.behavior('passphrase-credential-control', function(config) {
|
||||
JX.behavior('passphrase-credential-control', function() {
|
||||
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
|
||||
JX.behavior('phame-post-preview', function(config) {
|
||||
|
||||
var preview = JX.$(config.preview);
|
||||
var body = JX.$(config.body);
|
||||
var title = JX.$(config.title);
|
||||
var phame_title = JX.$(config.phame_title);
|
||||
var sync_titles = true;
|
||||
|
||||
var titleCallback = function(e) {
|
||||
var titleCallback = function() {
|
||||
if (!sync_titles) {
|
||||
return;
|
||||
}
|
||||
|
@ -22,7 +21,7 @@ JX.behavior('phame-post-preview', function(config) {
|
|||
phame_title.value = normalizeSlug(title_string);
|
||||
};
|
||||
|
||||
var phameTitleKeyupCallback = function (e) {
|
||||
var phameTitleKeyupCallback = function () {
|
||||
// stop sync'ing once user edits phame_title directly
|
||||
sync_titles = false;
|
||||
var normalized = normalizeSlug(phame_title.value, true);
|
||||
|
@ -40,7 +39,7 @@ JX.behavior('phame-post-preview', function(config) {
|
|||
}
|
||||
};
|
||||
|
||||
var phameTitleBlurCallback = function (e) {
|
||||
var phameTitleBlurCallback = function () {
|
||||
phame_title.value = normalizeSlug(phame_title.value);
|
||||
};
|
||||
|
||||
|
|
|
@ -80,11 +80,11 @@ JX.behavior('pholio-mock-edit', function(config) {
|
|||
var drop = new JX.PhabricatorDragAndDropFileUpload(node)
|
||||
.setURI(config.uploadURI);
|
||||
|
||||
drop.listen('didBeginDrag', function(e) {
|
||||
drop.listen('didBeginDrag', function() {
|
||||
JX.DOM.alterClass(node, 'pholio-drop-active', true);
|
||||
});
|
||||
|
||||
drop.listen('didEndDrag', function(e) {
|
||||
drop.listen('didEndDrag', function() {
|
||||
JX.DOM.alterClass(node, 'pholio-drop-active', false);
|
||||
});
|
||||
|
||||
|
@ -136,7 +136,7 @@ JX.behavior('pholio-mock-edit', function(config) {
|
|||
var build_update_control = function(node) {
|
||||
var drop = build_drop_upload(node);
|
||||
|
||||
drop.listen('willUpload', function(file) {
|
||||
drop.listen('willUpload', function() {
|
||||
JX.DOM.alterClass(node, 'pholio-replacing', true);
|
||||
});
|
||||
|
||||
|
|
|
@ -330,7 +330,6 @@ JX.behavior('pholio-mock-view', function(config) {
|
|||
}
|
||||
|
||||
drag_end = get_image_xy(JX.$V(e));
|
||||
var scale = get_image_scale();
|
||||
|
||||
resize_selection(16);
|
||||
|
||||
|
@ -729,7 +728,7 @@ JX.behavior('pholio-mock-view', function(config) {
|
|||
lightbox = null;
|
||||
}
|
||||
|
||||
function lightbox_resize(e) {
|
||||
function lightbox_resize() {
|
||||
if (!lightbox) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
JX.behavior('test-payment-form', function(config) {
|
||||
var ccform = new JX.PhortuneCreditCardForm(JX.$(config.formID), onsubmit);
|
||||
|
||||
function onsubmit(card_data) {
|
||||
function onsubmit() {
|
||||
onresponse();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* javelin-request
|
||||
*/
|
||||
|
||||
JX.behavior('ponder-votebox', function(config) {
|
||||
JX.behavior('ponder-votebox', function() {
|
||||
|
||||
function handle_vote(e, vote) {
|
||||
e.kill();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* phuix-dropdown-menu
|
||||
*/
|
||||
|
||||
JX.behavior('boards-filter', function(config) {
|
||||
JX.behavior('boards-filter', function() {
|
||||
|
||||
JX.Stratcom.listen('click', 'boards-filter-menu', function(e) {
|
||||
var data = e.getNodeData('boards-filter-menu');
|
||||
|
|
|
@ -24,7 +24,7 @@ JX.behavior('project-boards', function(config) {
|
|||
JX.DOM.replace(item, JX.$H(response.task));
|
||||
}
|
||||
|
||||
function ondrop(list, item, after, from) {
|
||||
function ondrop(list, item, after) {
|
||||
list.lock();
|
||||
JX.DOM.alterClass(item, 'drag-sending', true);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ JX.behavior('releeph-preview-branch', function(config) {
|
|||
input,
|
||||
['keyup', 'click', 'change'],
|
||||
null,
|
||||
function(e) {
|
||||
function() {
|
||||
renderPreview();
|
||||
}
|
||||
);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* phabricator-keyboard-shortcut
|
||||
*/
|
||||
|
||||
JX.behavior('releeph-request-state-change', function(config) {
|
||||
JX.behavior('releeph-request-state-change', function() {
|
||||
function getRequestHeaderNodes() {
|
||||
return JX.DOM.scry(document.body, 'div', 'releeph-request-box');
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ JX.behavior('releeph-request-state-change', function(config) {
|
|||
new JX.KeyboardShortcut(
|
||||
['g', 'return'],
|
||||
"Open selected request's page in a new tab.")
|
||||
.setHandler(function(manager) {
|
||||
.setHandler(function() {
|
||||
keynavNavigateToRequestPage();
|
||||
})
|
||||
.register();
|
||||
|
|
|
@ -54,7 +54,7 @@ JX.behavior('repository-crossreference', function(config) {
|
|||
});
|
||||
}
|
||||
|
||||
function linkAll(section) {
|
||||
function linkAll() {
|
||||
var blocks = JX.DOM.scry(document.body, 'div', 'remarkup-code-block');
|
||||
for (var i = 0; i < blocks.length; ++i) {
|
||||
if (blocks[i].hasAttribute('data-code-lang')) {
|
||||
|
|
|
@ -16,7 +16,7 @@ JX.behavior('search-reorder-queries', function(config) {
|
|||
return JX.DOM.scry(root, 'li', 'named-query');
|
||||
});
|
||||
|
||||
list.listen('didDrop', function(node, after) {
|
||||
list.listen('didDrop', function(node) {
|
||||
var nodes = list.findItems();
|
||||
var order = [];
|
||||
var key;
|
||||
|
@ -31,7 +31,7 @@ JX.behavior('search-reorder-queries', function(config) {
|
|||
JX.DOM.alterClass(node, 'drag-sending', true);
|
||||
|
||||
new JX.Workflow(config.orderURI, {order: order.join()})
|
||||
.setHandler(function(e) {
|
||||
.setHandler(function() {
|
||||
JX.DOM.alterClass(node, 'drag-sending', false);
|
||||
list.unlock();
|
||||
})
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* javelin-stratcom
|
||||
* javelin-dom
|
||||
*/
|
||||
JX.behavior('slowvote-embed', function(config) {
|
||||
JX.behavior('slowvote-embed', function() {
|
||||
JX.Stratcom.listen(
|
||||
['click'],
|
||||
'slowvote-option',
|
||||
|
|
|
@ -8,11 +8,7 @@
|
|||
* phabricator-textareautils
|
||||
*/
|
||||
|
||||
JX.behavior('phabricator-transaction-list', function(config) {
|
||||
|
||||
var list = JX.$(config.listID);
|
||||
var xaction_nodes = null;
|
||||
var next_anchor = config.nextAnchor;
|
||||
JX.behavior('phabricator-transaction-list', function() {
|
||||
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
JX.install('ReactorButtonExample', {
|
||||
extend: 'View',
|
||||
members: {
|
||||
render: function(rendered_children) {
|
||||
render: function() {
|
||||
var button = JX.$N('button', {}, "Fun");
|
||||
var clicks = JX.RDOM.clickPulses(button);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
JX.install('ReactorCheckboxExample', {
|
||||
extend: 'View',
|
||||
members: {
|
||||
render: function(rendered_children) {
|
||||
render: function() {
|
||||
var checkbox = JX.$N('input', {type: 'checkbox'});
|
||||
|
||||
return [checkbox, JX.RDOM.$DT(JX.RDOM.checkbox(checkbox))];
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
JX.install('ReactorFocusExample', {
|
||||
extend: 'View',
|
||||
members: {
|
||||
render: function(rendered_children) {
|
||||
render: function() {
|
||||
var input = JX.$N('input');
|
||||
return [input, JX.RDOM.$DT(JX.RDOM.hasFocus(input))];
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
JX.install('ReactorInputExample', {
|
||||
extend: 'View',
|
||||
members: {
|
||||
render: function(rendered_children) {
|
||||
render: function() {
|
||||
var html = JX.HTMLView.registerToInterpreter(new JX.ViewInterpreter());
|
||||
|
||||
var raw_input = JX.ViewRenderer.render(
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
JX.install('ReactorMouseoverExample', {
|
||||
extend: 'View',
|
||||
members: {
|
||||
render: function(rendered_children) {
|
||||
render: function() {
|
||||
var target = JX.$N("span", "mouseover me ");
|
||||
return [target, JX.RDOM.$DT(JX.RDOM.isMouseOver(target))];
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
JX.install('ReactorRadioExample', {
|
||||
extend: 'View',
|
||||
members: {
|
||||
render: function(rendered_children) {
|
||||
render: function() {
|
||||
var radio_one = JX.$N('input', {type: 'radio', name: 'n', value: 'one'});
|
||||
var radio_two = JX.$N('input', {type: 'radio', name: 'n', value: 'two'});
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
JX.install('ReactorSelectExample', {
|
||||
extend: 'View',
|
||||
members: {
|
||||
render: function(rendered_children) {
|
||||
render: function() {
|
||||
var select = JX.$N('select', {}, [
|
||||
JX.$N('option', { value: 'goat' }, 'Goat'),
|
||||
JX.$N('option', { value: 'bat' }, 'Bat'),
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
JX.install('ReactorSendClassExample', {
|
||||
extend: 'View',
|
||||
members: {
|
||||
render: function(rendered_children) {
|
||||
render: function() {
|
||||
var input = JX.$N('input', { type: 'checkbox' });
|
||||
var span = JX.$N('a', 'Hey');
|
||||
JX.RDOM.sendClass(JX.RDOM.checkbox(input), span, 'disabled');
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
JX.install('ReactorSendPropertiesExample', {
|
||||
extend: 'View',
|
||||
members: {
|
||||
render: function(rendered_children) {
|
||||
render: function() {
|
||||
var color = JX.$N('input', {value: '#fff000'});
|
||||
var title = JX.$N('input', {value: 'seen on hover'});
|
||||
var target = JX.$N('span', 'Change my color and title');
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
* javelin-behavior
|
||||
*/
|
||||
|
||||
JX.behavior('phabricator-busy-example', function(config) {
|
||||
JX.behavior('phabricator-busy-example', function() {
|
||||
JX.Busy.start();
|
||||
});
|
||||
|
|
|
@ -42,7 +42,7 @@ JX.behavior('phabricator-gesture-example', function(config) {
|
|||
JX.Stratcom.listen(
|
||||
'gesture.swipe.cancel',
|
||||
null,
|
||||
function(e) {
|
||||
function() {
|
||||
current = [];
|
||||
redraw();
|
||||
});
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @provides javelin-behavior-phabricator-notification-example
|
||||
*/
|
||||
|
||||
JX.behavior('phabricator-notification-example', function(config) {
|
||||
JX.behavior('phabricator-notification-example', function() {
|
||||
|
||||
var sequence = 0;
|
||||
|
||||
|
|
|
@ -260,7 +260,6 @@ JX.install('DraggableList', {
|
|||
|
||||
_getCurrentTarget : function(p) {
|
||||
var ghost = this.getGhostNode();
|
||||
var target = this._target;
|
||||
var targets = this._targets;
|
||||
var dragging = this._dragging;
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ JX.install('MultirowRowManager', {
|
|||
this.invoke('row-removed', row_id);
|
||||
},
|
||||
|
||||
_oncountchanged : function(e) {
|
||||
_oncountchanged : function() {
|
||||
var buttons = JX.DOM.scry(
|
||||
this._root,
|
||||
'a',
|
||||
|
|
|
@ -76,7 +76,7 @@ JX.behavior('phabricator-active-nav', function(config) {
|
|||
};
|
||||
|
||||
var pending = null;
|
||||
var onviewportchange = function(e) {
|
||||
var onviewportchange = function() {
|
||||
pending && clearTimeout(pending);
|
||||
pending = setTimeout(updateposition, 100);
|
||||
};
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
var dragging = false;
|
||||
var startX, startY;
|
||||
var finalX, finalY;
|
||||
var dScale = config.scale;
|
||||
|
||||
var cropBox = JX.$(config.cropBoxID);
|
||||
var basePos = JX.$V(cropBox);
|
||||
|
@ -29,17 +28,6 @@
|
|||
var minLeft = baseD.x - imageD.x;
|
||||
var minTop = baseD.y - imageD.y;
|
||||
|
||||
var minScale = Math.min(
|
||||
config.width / config.imageW,
|
||||
config.height / config.imageH,
|
||||
1
|
||||
);
|
||||
var maxScale = Math.max(
|
||||
config.imageW / config.width,
|
||||
config.imageH / config.height,
|
||||
2
|
||||
);
|
||||
|
||||
var ondrag = function(e) {
|
||||
e.kill();
|
||||
dragging = true;
|
||||
|
@ -76,7 +64,7 @@
|
|||
JX.DOM.find(cropBox, 'input', 'crop-y').value = finalY;
|
||||
};
|
||||
|
||||
var ondrop = function(e) {
|
||||
var ondrop = function() {
|
||||
if (!dragging) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ JX.behavior('dark-console', function(config, statics) {
|
|||
function install_shortcut() {
|
||||
var desc = 'Toggle visibility of DarkConsole.';
|
||||
new JX.KeyboardShortcut('`', desc)
|
||||
.setHandler(function(manager) {
|
||||
.setHandler(function() {
|
||||
statics.visible = !statics.visible;
|
||||
|
||||
if (statics.visible) {
|
||||
|
|
|
@ -28,10 +28,10 @@ JX.behavior('aphront-drag-and-drop-textarea', function(config) {
|
|||
if (JX.PhabricatorDragAndDropFileUpload.isSupported()) {
|
||||
var drop = new JX.PhabricatorDragAndDropFileUpload(target)
|
||||
.setURI(config.uri);
|
||||
drop.listen('didBeginDrag', function(e) {
|
||||
drop.listen('didBeginDrag', function() {
|
||||
JX.DOM.alterClass(target, config.activatedClass, true);
|
||||
});
|
||||
drop.listen('didEndDrag', function(e) {
|
||||
drop.listen('didEndDrag', function() {
|
||||
JX.DOM.alterClass(target, config.activatedClass, false);
|
||||
});
|
||||
drop.listen('didUpload', onupload);
|
||||
|
|
|
@ -7,10 +7,9 @@
|
|||
* javelin-vector
|
||||
*/
|
||||
|
||||
JX.behavior('fancy-datepicker', function(config) {
|
||||
JX.behavior('fancy-datepicker', function() {
|
||||
|
||||
var picker;
|
||||
var button;
|
||||
var root;
|
||||
|
||||
var value_y;
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
* javelin-stratcom
|
||||
*/
|
||||
|
||||
JX.behavior('phabricator-file-tree', function(config) {
|
||||
JX.behavior('phabricator-file-tree', function() {
|
||||
|
||||
new JX.KeyboardShortcut('f', 'Toggle file tree.')
|
||||
.setHandler(function(manager) {
|
||||
.setHandler(function() {
|
||||
JX.Stratcom.invoke('differential-filetree-toggle');
|
||||
})
|
||||
.register();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @provides javelin-behavior-aphront-form-disable-on-submit
|
||||
*/
|
||||
|
||||
JX.behavior('aphront-form-disable-on-submit', function(config) {
|
||||
JX.behavior('aphront-form-disable-on-submit', function() {
|
||||
|
||||
var restore = [];
|
||||
var root = null;
|
||||
|
@ -84,7 +84,7 @@ JX.behavior('aphront-form-disable-on-submit', function(config) {
|
|||
will_submit(root);
|
||||
});
|
||||
|
||||
JX.Stratcom.listen('unload', null, function(e) {
|
||||
JX.Stratcom.listen('unload', null, function() {
|
||||
// Reenable everything on page unload so we don't bfcache back to a page
|
||||
// that has disabled forms.
|
||||
for (var ii = 0; ii < restore.length; ii++) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
/**
|
||||
* Basic gesture recognition. Unstable. Only supports swipes.
|
||||
*/
|
||||
JX.behavior('phabricator-gesture', function(config) {
|
||||
JX.behavior('phabricator-gesture', function() {
|
||||
|
||||
var target = null;
|
||||
var swiping = false;
|
||||
|
@ -89,7 +89,7 @@ JX.behavior('phabricator-gesture', function(config) {
|
|||
JX.Stratcom.listen(
|
||||
['touchend', 'mouseup'],
|
||||
null,
|
||||
function(e) {
|
||||
function() {
|
||||
if (!target) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -23,17 +23,17 @@ JX.behavior('global-drag-and-drop', function(config) {
|
|||
var drop = new JX.PhabricatorDragAndDropFileUpload(document.documentElement)
|
||||
.setURI(config.uploadURI);
|
||||
|
||||
drop.listen('didBeginDrag', function(f) {
|
||||
drop.listen('didBeginDrag', function() {
|
||||
JX.Mask.show();
|
||||
JX.DOM.show(JX.$(config.instructions));
|
||||
});
|
||||
|
||||
drop.listen('didEndDrag', function(f) {
|
||||
drop.listen('didEndDrag', function() {
|
||||
JX.Mask.hide();
|
||||
JX.DOM.hide(JX.$(config.instructions));
|
||||
});
|
||||
|
||||
drop.listen('willUpload', function(f) {
|
||||
drop.listen('willUpload', function() {
|
||||
pending++;
|
||||
});
|
||||
|
||||
|
@ -58,7 +58,7 @@ JX.behavior('global-drag-and-drop', function(config) {
|
|||
}
|
||||
});
|
||||
|
||||
drop.listen('didError', function(f) {
|
||||
drop.listen('didError', function() {
|
||||
pending--;
|
||||
errors = true;
|
||||
});
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* @javelin
|
||||
*/
|
||||
|
||||
JX.behavior('phabricator-hovercards', function(config) {
|
||||
JX.behavior('phabricator-hovercards', function() {
|
||||
|
||||
// We listen for mousemove instead of mouseover to handle the case when user
|
||||
// scrolls with keyboard. We don't want to display hovercard if node gets
|
||||
|
@ -78,7 +78,7 @@ JX.behavior('phabricator-hovercards', function(config) {
|
|||
JX.Stratcom.listen(
|
||||
['unload', 'onresize'],
|
||||
null,
|
||||
function(e) {
|
||||
function() {
|
||||
JX.Hovercard.hide();
|
||||
});
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
JX.behavior('phabricator-keyboard-pager', function(config) {
|
||||
|
||||
new JX.KeyboardShortcut('[', 'Prev Page')
|
||||
.setHandler(function(manager) {
|
||||
.setHandler(function() {
|
||||
if (config.prev) {
|
||||
JX.$U(config.prev).go();
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ JX.behavior('phabricator-keyboard-pager', function(config) {
|
|||
.register();
|
||||
|
||||
new JX.KeyboardShortcut(']', 'Next Page')
|
||||
.setHandler(function(manager) {
|
||||
.setHandler(function() {
|
||||
if (config.next) {
|
||||
JX.$U(config.next).go();
|
||||
}
|
||||
|
|
|
@ -13,8 +13,6 @@ JX.behavior('lightbox-attachments', function (config) {
|
|||
var lightbox = null;
|
||||
var prev = null;
|
||||
var next = null;
|
||||
var x_margin = 40;
|
||||
var y_margin = 100;
|
||||
var downloadForm = JX.$H(config.downloadForm).getFragment().firstChild;
|
||||
|
||||
function loadLightBox(e) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @javelin
|
||||
*/
|
||||
|
||||
JX.behavior('aphront-more', function(config) {
|
||||
JX.behavior('aphront-more', function() {
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
'aphront-more-view-show-more',
|
||||
|
|
|
@ -182,7 +182,7 @@ JX.behavior('phabricator-object-selector', function(config) {
|
|||
JX.$(config.query),
|
||||
['change', 'keydown', 'keyup', 'keypress'],
|
||||
null,
|
||||
function(e) {
|
||||
function() {
|
||||
var cur_value = JX.$(config.query).value;
|
||||
if (last_value == cur_value) {
|
||||
return;
|
||||
|
|
|
@ -95,7 +95,7 @@ JX.behavior('phabricator-nav', function(config) {
|
|||
}
|
||||
});
|
||||
|
||||
JX.Stratcom.listen('mouseup', null, function(e) {
|
||||
JX.Stratcom.listen('mouseup', null, function() {
|
||||
if (!dragging) {
|
||||
return;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ JX.behavior('phabricator-nav', function(config) {
|
|||
}
|
||||
|
||||
var collapsed = config.collapsed;
|
||||
JX.Stratcom.listen('differential-filetree-toggle', null, function(e) {
|
||||
JX.Stratcom.listen('differential-filetree-toggle', null, function() {
|
||||
collapsed = !collapsed;
|
||||
JX.DOM.alterClass(main, 'has-local-nav', !collapsed);
|
||||
JX.DOM.alterClass(main, 'has-drag-nav', !collapsed);
|
||||
|
@ -128,7 +128,7 @@ JX.behavior('phabricator-nav', function(config) {
|
|||
// When the user scrolls or resizes the window, anchor the menu to to the top
|
||||
// of the navigation bar.
|
||||
|
||||
function onresize(e) {
|
||||
function onresize() {
|
||||
if (JX.Device.getDevice() != 'desktop') {
|
||||
return;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ JX.behavior('phabricator-nav', function(config) {
|
|||
|
||||
// - Navigation Reset ----------------------------------------------------------
|
||||
|
||||
JX.Stratcom.listen('phabricator-device-change', null, function(event) {
|
||||
JX.Stratcom.listen('phabricator-device-change', null, function() {
|
||||
resetdrag();
|
||||
onresize();
|
||||
});
|
||||
|
|
|
@ -16,7 +16,7 @@ JX.behavior('reorder-applications', function(config) {
|
|||
return JX.DOM.scry(root, 'li', 'pinned-application');
|
||||
});
|
||||
|
||||
list.listen('didDrop', function(node, after) {
|
||||
list.listen('didDrop', function(node) {
|
||||
var nodes = list.findItems();
|
||||
var order = [];
|
||||
var key;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @javelin
|
||||
*/
|
||||
|
||||
JX.behavior('phabricator-reveal-content', function(config) {
|
||||
JX.behavior('phabricator-reveal-content', function() {
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
'reveal-content',
|
||||
|
|
|
@ -133,7 +133,7 @@ JX.behavior('phabricator-search-typeahead', function(config) {
|
|||
|
||||
typeahead.start();
|
||||
|
||||
JX.DOM.listen(JX.$(config.button), 'click', null, function (e) {
|
||||
JX.DOM.listen(JX.$(config.button), 'click', null, function () {
|
||||
typeahead.setPlaceholder('');
|
||||
typeahead.updatePlaceHolder();
|
||||
});
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @javelin
|
||||
*/
|
||||
|
||||
JX.behavior('select-on-click', function(config) {
|
||||
JX.behavior('select-on-click', function() {
|
||||
JX.Stratcom.listen(
|
||||
'click',
|
||||
'select-on-click',
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* @javelin
|
||||
*/
|
||||
|
||||
JX.behavior('phabricator-tooltips', function(config) {
|
||||
JX.behavior('phabricator-tooltips', function() {
|
||||
|
||||
JX.Stratcom.listen(
|
||||
['mouseover', 'mouseout'],
|
||||
|
@ -31,7 +31,7 @@ JX.behavior('phabricator-tooltips', function(config) {
|
|||
data.tip);
|
||||
});
|
||||
|
||||
function wipe(e) {
|
||||
function wipe() {
|
||||
JX.Tooltip.hide();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue