Page MenuHomePhabricator

D8763.id20783.diff
No OneTemporary

D8763.id20783.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,14 +7,14 @@
return array(
'names' =>
array(
- 'core.pkg.css' => 'ab5dd633',
- 'core.pkg.js' => 'c5b39816',
+ 'core.pkg.css' => 'c3509cae',
+ 'core.pkg.js' => 'b262f921',
'darkconsole.pkg.js' => 'ca8671ce',
'differential.pkg.css' => '12c11318',
'differential.pkg.js' => '11a5b750',
'diffusion.pkg.css' => '3783278d',
'diffusion.pkg.js' => '5b4010f4',
- 'javelin.pkg.js' => '509e3db6',
+ 'javelin.pkg.js' => '0452e69d',
'maniphest.pkg.css' => 'f1887d71',
'maniphest.pkg.js' => '2fe8af22',
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
@@ -113,7 +113,7 @@
'rsrc/css/core/core.css' => 'da26ddb2',
'rsrc/css/core/remarkup.css' => '0923dbd6',
'rsrc/css/core/syntax.css' => '3c18c1cb',
- 'rsrc/css/core/z-index.css' => '0fd29d49',
+ 'rsrc/css/core/z-index.css' => '5e8165ca',
'rsrc/css/diviner/diviner-shared.css' => '38813222',
'rsrc/css/font/font-source-sans-pro.css' => '225851dd',
'rsrc/css/layout/phabricator-action-header-view.css' => 'c14dfc57',
@@ -199,14 +199,14 @@
'rsrc/externals/javelin/ext/view/__tests__/ViewInterpreter.js' => '7a94d6a5',
'rsrc/externals/javelin/ext/view/__tests__/ViewRenderer.js' => '5426001c',
'rsrc/externals/javelin/lib/Cookie.js' => '6b3dcf44',
- 'rsrc/externals/javelin/lib/DOM.js' => '5054855f',
+ 'rsrc/externals/javelin/lib/DOM.js' => '32a4d380',
'rsrc/externals/javelin/lib/History.js' => 'c60f4327',
'rsrc/externals/javelin/lib/JSON.js' => '08e56a4e',
'rsrc/externals/javelin/lib/Mask.js' => 'b9f26029',
'rsrc/externals/javelin/lib/Request.js' => '23f9bb8d',
'rsrc/externals/javelin/lib/Resource.js' => '356de121',
'rsrc/externals/javelin/lib/URI.js' => 'd9a9b862',
- 'rsrc/externals/javelin/lib/Vector.js' => 'efda5fd7',
+ 'rsrc/externals/javelin/lib/Vector.js' => '039fb90d',
'rsrc/externals/javelin/lib/Workflow.js' => 'f28bf201',
'rsrc/externals/javelin/lib/__tests__/Cookie.js' => '5ed109e8',
'rsrc/externals/javelin/lib/__tests__/DOM.js' => 'c984504b',
@@ -440,7 +440,7 @@
'rsrc/js/core/Prefab.js' => '0326e5d0',
'rsrc/js/core/ShapedRequest.js' => 'dfa181a4',
'rsrc/js/core/TextAreaUtils.js' => 'b3ec3cfc',
- 'rsrc/js/core/ToolTip.js' => '0a81ea29',
+ 'rsrc/js/core/ToolTip.js' => 'fec9d836',
'rsrc/js/core/behavior-active-nav.js' => 'c81bc98f',
'rsrc/js/core/behavior-audio-source.js' => '59b251eb',
'rsrc/js/core/behavior-autofocus.js' => '7319e029',
@@ -630,7 +630,7 @@
'javelin-behavior-workflow' => 'fee00761',
'javelin-color' => '7e41274a',
'javelin-cookie' => '6b3dcf44',
- 'javelin-dom' => '5054855f',
+ 'javelin-dom' => '32a4d380',
'javelin-dynval' => 'f6555212',
'javelin-event' => '79473b62',
'javelin-fx' => '54b612ba',
@@ -656,7 +656,7 @@
'javelin-typeahead-static-source' => 'cdde23f1',
'javelin-uri' => 'd9a9b862',
'javelin-util' => '65b0b249',
- 'javelin-vector' => 'efda5fd7',
+ 'javelin-vector' => '039fb90d',
'javelin-view' => '0f764c35',
'javelin-view-html' => 'e5b406f9',
'javelin-view-interpreter' => '0c33c1a0',
@@ -716,7 +716,7 @@
'phabricator-source-code-view-css' => '62a99814',
'phabricator-standard-page-view' => '517cdfb1',
'phabricator-textareautils' => 'b3ec3cfc',
- 'phabricator-tooltip' => '0a81ea29',
+ 'phabricator-tooltip' => 'fec9d836',
'phabricator-transaction-view-css' => 'ce491938',
'phabricator-ui-example-css' => '4741b891',
'phabricator-uiexample-javelin-view' => 'd4a14807',
@@ -729,7 +729,7 @@
'phabricator-uiexample-reactor-select' => '189e4fe3',
'phabricator-uiexample-reactor-sendclass' => 'bf97561d',
'phabricator-uiexample-reactor-sendproperties' => '551add57',
- 'phabricator-zindex-css' => '0fd29d49',
+ 'phabricator-zindex-css' => '5e8165ca',
'phame-css' => '450826e1',
'pholio-css' => '2fa97dbe',
'pholio-edit-css' => 'b9e59b6d',
@@ -833,6 +833,11 @@
8 => 'javelin-stratcom',
9 => 'javelin-util',
),
+ '039fb90d' =>
+ array(
+ 0 => 'javelin-install',
+ 1 => 'javelin-event',
+ ),
'03d6ed07' =>
array(
0 => 'javelin-behavior',
@@ -859,13 +864,6 @@
array(
0 => 'javelin-install',
),
- '0a81ea29' =>
- array(
- 0 => 'javelin-install',
- 1 => 'javelin-util',
- 2 => 'javelin-dom',
- 3 => 'javelin-vector',
- ),
'0c33c1a0' =>
array(
0 => 'javelin-view',
@@ -1020,6 +1018,14 @@
3 => 'javelin-stratcom',
4 => 'javelin-request',
),
+ '32a4d380' =>
+ array(
+ 0 => 'javelin-magical-init',
+ 1 => 'javelin-install',
+ 2 => 'javelin-util',
+ 3 => 'javelin-vector',
+ 4 => 'javelin-stratcom',
+ ),
'356de121' =>
array(
0 => 'javelin-util',
@@ -1117,14 +1123,6 @@
2 => 'javelin-dom',
3 => 'javelin-util',
),
- '5054855f' =>
- array(
- 0 => 'javelin-magical-init',
- 1 => 'javelin-install',
- 2 => 'javelin-util',
- 3 => 'javelin-vector',
- 4 => 'javelin-stratcom',
- ),
'52a92793' =>
array(
0 => 'javelin-util',
@@ -1833,11 +1831,6 @@
2 => 'javelin-stratcom',
3 => 'javelin-util',
),
- 'efda5fd7' =>
- array(
- 0 => 'javelin-install',
- 1 => 'javelin-event',
- ),
'efe49472' =>
array(
0 => 'javelin-install',
@@ -1966,6 +1959,13 @@
4 => 'multirow-row-manager',
5 => 'javelin-json',
),
+ 'fec9d836' =>
+ array(
+ 0 => 'javelin-install',
+ 1 => 'javelin-util',
+ 2 => 'javelin-dom',
+ 3 => 'javelin-vector',
+ ),
'fee00761' =>
array(
0 => 'javelin-behavior',
diff --git a/webroot/rsrc/css/core/z-index.css b/webroot/rsrc/css/core/z-index.css
--- a/webroot/rsrc/css/core/z-index.css
+++ b/webroot/rsrc/css/core/z-index.css
@@ -126,7 +126,7 @@
}
.jx-tooltip-container {
- z-index: 18;
+ z-index: 51;
}
.pholio-device-lightbox {
diff --git a/webroot/rsrc/externals/javelin/lib/DOM.js b/webroot/rsrc/externals/javelin/lib/DOM.js
--- a/webroot/rsrc/externals/javelin/lib/DOM.js
+++ b/webroot/rsrc/externals/javelin/lib/DOM.js
@@ -543,7 +543,7 @@
},
-/* -( Serializing Froms )-------------------------------------------------- */
+/* -( Serializing Forms )-------------------------------------------------- */
/**
diff --git a/webroot/rsrc/js/core/ToolTip.js b/webroot/rsrc/js/core/ToolTip.js
--- a/webroot/rsrc/js/core/ToolTip.js
+++ b/webroot/rsrc/js/core/ToolTip.js
@@ -31,7 +31,7 @@
var node = JX.$N(
'div',
- { className: 'jx-tooltip-container jx-tooltip-align-' + align },
+ { className: 'jx-tooltip-container' },
[
JX.$N('div', { className: 'jx-tooltip' }, content),
JX.$N('div', { className: 'jx-tooltip-anchor' })
@@ -46,30 +46,88 @@
node.style.left = '-10000px';
document.body.appendChild(node);
+ var a = JX.Tooltip.getPosition(align, root, node);
+
+ node.style.left = a.x + 'px';
+ node.style.top = a.y + 'px';
+ },
+
+ getPosition: function (align, root, node) {
+ align = "S";
+ var a = JX.Tooltip.proposePosition(align, root, node);
+
+ // if (!JX.Tooltip.isOnScreen(a)) {
+ // align = JX.Tooltip.getCorrectOrientation(a);
+ // a = JX.Tooltip.proposePosition(align, root, node);
+ // }
+
+ JX.Tooltip._setAnchor(align);
+ return a;
+
+ },
+
+ proposePosition: function (align, root, node) {
var p = JX.$V(root);
var d = JX.Vector.getDim(root);
var n = JX.Vector.getDim(node);
+ var l = 0;
+ var t = 0;
- // Move the tip so it's nicely aligned.
-
+ // Caculate the tip so it's nicely aligned.
switch (align) {
case 'N':
- node.style.left = parseInt(p.x - ((n.x - d.x) / 2), 10) + 'px';
- node.style.top = parseInt(p.y - n.y, 10) + 'px';
+ l = parseInt(p.x - ((n.x - d.x) / 2), 10);
+ t = parseInt(p.y - n.y, 10);
break;
case 'E':
- node.style.left = parseInt(p.x + d.x, 10) + 'px';
- node.style.top = parseInt(p.y - ((n.y - d.y) / 2), 10) + 'px';
+ l = parseInt(p.x + d.x, 10);
+ t = parseInt(p.y - ((n.y - d.y) / 2), 10);
break;
case 'S':
- node.style.left = parseInt(p.x - ((n.x - d.x) / 2), 10) + 'px';
- node.style.top = parseInt(p.y + d.y + 5, 10) + 'px';
+
+ // console.log(p.y + ', ' + d.y);
+ l = parseInt(p.x - ((n.x - d.x) / 2), 10);
+ t = parseInt(p.y + d.y + 5, 10);
break;
case 'W':
- node.style.left = parseInt(p.x - n.x - 5, 10) + 'px';
- node.style.top = parseInt(p.y - ((n.y - d.y) / 2), 10) + 'px';
+ l = parseInt(p.x - n.x - 5, 10);
+ t = parseInt(p.y - ((n.y - d.y) / 2), 10);
break;
}
+
+ return new JX.Vector(l, t);
+ },
+
+ isOnScreen: function (a) {
+ var s = JX.Vector.getViewport();
+
+ if (a.y < s.y || a.x < s.x || a.y > s.y || a.x > s.x) {
+ return false;
+ } else {
+ return true;
+ }
+ },
+
+ getCorrectOrientation: function (a) {
+ var v = JX.Vector.getViewport();
+ if (a.y < 0) {
+ return 'S';
+ } else
+ if (a.x < 0) {
+ return 'E';
+ } else
+ if (a.y > v.y) {
+ return 'N';
+ } else
+ if (a.x > v.x) {
+ return 'W';
+ } else {
+ return 'N';
+ }
+ },
+
+ _setAnchor: function (align) {
+ JX.DOM.alterClass(this._node, 'jx-tooltip-align-' + align, true);
},
hide : function() {

File Metadata

Mime Type
text/plain
Expires
Mar 10 2025, 11:10 PM (6 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7479266
Default Alt Text
D8763.id20783.diff (9 KB)

Event Timeline