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