Permalink
Browse files

Further Javelin fixes for static analysis and form pair lists

Summary:
Some stuff I missed and some stuff to support static analysis. Pretty
straightforward.

Test Plan:
Phabricator appears to analyze cleanly and work properly with these changes.

Reviewed By: tomo
Reviewers: tomo, mroch, aran
CC: aran, epriestley, tomo
Differential Revision: 222
  • Loading branch information...
1 parent 099162f commit d5cd365d042ad7997e01f0cca5214c5deadfd126 @epriestley epriestley committed May 3, 2011
Showing with 31 additions and 9 deletions.
  1. +1 −0 .gitignore
  2. +4 −0 pkg/javelin.dev.js
  3. +5 −4 pkg/workflow.dev.js
  4. +1 −1 pkg/workflow.min.js
  5. +11 −0 scripts/build.sh
  6. +1 −0 src/lib/DOM.js
  7. +3 −0 src/lib/Vector.js
  8. +5 −4 src/lib/Workflow.js
View
@@ -22,3 +22,4 @@
# Mac OSX build artifacts
/support/jsast/jsast.dSYM/
/support/jsxmin/jsxmin.dSYM/
+/support/javelinsymbols/javelinsymbols.dSYM/
View
@@ -1929,6 +1929,9 @@ JX.install('Request', {
/**
* @requires javelin-install javelin-event
* @provides javelin-vector
+ *
+ * @javelin-installs JX.$V
+ *
* @javelin
*/
@@ -2264,6 +2267,7 @@ JX.install('Vector', {
*
* @javelin-installs JX.$
* @javelin-installs JX.$N
+ * @javelin-installs JX.$H
*
* @javelin
*/
View
@@ -116,22 +116,23 @@ JX.install('Workflow', {
if (JX.Workflow._disabled) {
return;
}
+
var t = event.getTarget();
if (t.name == '__cancel__' || t.name == '__close__') {
JX.Workflow._pop();
} else {
var form = event.getNode('jx-dialog');
- var data = JX.DOM.serialize(form);
- data[t.name] = true;
+ var data = JX.DOM.convertFormToListOfPairs(form);
+ data.push([t.name, true]);
var active = JX.Workflow._stack[JX.Workflow._stack.length - 1];
var e = active.invoke('submit', {form: form, data: data});
if (!e.getStopped()) {
active._destroy();
active
.setURI(form.getAttribute('action') || active.getURI())
- .setData(data)
+ .setDataWithListOfPairs(data)
.start();
}
}
@@ -157,7 +158,7 @@ JX.install('Workflow', {
JX.DOM.listen(
this._root,
'click',
- 'tag:button',
+ [['jx-workflow-button'], ['tag:button']],
JX.Workflow._onbutton);
document.body.appendChild(this._root);
var d = JX.Vector.getDim(this._root);
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -x
+set -e
+
+ROOT=`dirname $0`"/../"
+(cd ${ROOT}externals/libfbjs && make)
+(cd ${ROOT}support/javelinsymbols && make)
+(cd ${ROOT}support/jsast && make)
+(cd ${ROOT}support/jsxmin && make)
+
+
View
@@ -4,6 +4,7 @@
*
* @javelin-installs JX.$
* @javelin-installs JX.$N
+ * @javelin-installs JX.$H
*
* @javelin
*/
View
@@ -1,6 +1,9 @@
/**
* @requires javelin-install javelin-event
* @provides javelin-vector
+ *
+ * @javelin-installs JX.$V
+ *
* @javelin
*/
View
@@ -83,22 +83,23 @@ JX.install('Workflow', {
if (JX.Workflow._disabled) {
return;
}
+
var t = event.getTarget();
if (t.name == '__cancel__' || t.name == '__close__') {
JX.Workflow._pop();
} else {
var form = event.getNode('jx-dialog');
- var data = JX.DOM.serialize(form);
- data[t.name] = true;
+ var data = JX.DOM.convertFormToListOfPairs(form);
+ data.push([t.name, true]);
var active = JX.Workflow._stack[JX.Workflow._stack.length - 1];
var e = active.invoke('submit', {form: form, data: data});
if (!e.getStopped()) {
active._destroy();
active
.setURI(form.getAttribute('action') || active.getURI())
- .setData(data)
+ .setDataWithListOfPairs(data)
.start();
}
}
@@ -124,7 +125,7 @@ JX.install('Workflow', {
JX.DOM.listen(
this._root,
'click',
- 'tag:button',
+ [['jx-workflow-button'], ['tag:button']],
JX.Workflow._onbutton);
document.body.appendChild(this._root);
var d = JX.Vector.getDim(this._root);

0 comments on commit d5cd365

Please sign in to comment.