From 209179a74a15f6cf296c197817ddc7b37e63607a Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 15 Sep 2011 15:05:50 -0700 Subject: [PATCH] Remove tests for JX.$.NotFound from Phabricator Summary: See D939. Regardless of what we do there, these will break, and they're pretty silly anyway (see the giant caveat comments in the second one). Test Plan: Clicked a direct-jump comment link, did save/cancel for inline comments. Reviewers: phil, cpojer, tomo, mroch Reviewed By: phil CC: aran, phil Differential Revision: 940 --- src/__celerity_resource_map__.php | 7 +++---- .../rsrc/js/application/core/behavior-watch-anchor.js | 9 ++------- .../differential/DifferentialInlineCommentEditor.js | 3 --- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index bcc74a1c74..81b3f9670f 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -181,7 +181,7 @@ celerity_register_resource_map(array( ), 'differential-inline-comment-editor' => array( - 'uri' => '/res/5e4f0aa4/rsrc/js/application/differential/DifferentialInlineCommentEditor.js', + 'uri' => '/res/ff5f42a9/rsrc/js/application/differential/DifferentialInlineCommentEditor.js', 'type' => 'js', 'requires' => array( @@ -703,14 +703,13 @@ celerity_register_resource_map(array( ), 'javelin-behavior-phabricator-watch-anchor' => array( - 'uri' => '/res/46298448/rsrc/js/application/core/behavior-watch-anchor.js', + 'uri' => '/res/96f40736/rsrc/js/application/core/behavior-watch-anchor.js', 'type' => 'js', 'requires' => array( 0 => 'javelin-behavior', 1 => 'javelin-stratcom', - 2 => 'javelin-util', - 3 => 'javelin-dom', + 2 => 'javelin-dom', ), 'disk' => '/rsrc/js/application/core/behavior-watch-anchor.js', ), diff --git a/webroot/rsrc/js/application/core/behavior-watch-anchor.js b/webroot/rsrc/js/application/core/behavior-watch-anchor.js index 8d8c0e5ca1..66cf06dae0 100644 --- a/webroot/rsrc/js/application/core/behavior-watch-anchor.js +++ b/webroot/rsrc/js/application/core/behavior-watch-anchor.js @@ -2,7 +2,6 @@ * @provides javelin-behavior-phabricator-watch-anchor * @requires javelin-behavior * javelin-stratcom - * javelin-util * javelin-dom */ @@ -14,14 +13,10 @@ JX.behavior('phabricator-watch-anchor', function() { highlighted && JX.DOM.alterClass(highlighted, 'anchor-target', false); try { highlighted = JX.$('anchor-' + window.location.hash.replace('#', '')); - JX.DOM.alterClass(highlighted, 'anchor-target', true); } catch (ex) { - if (ex === JX.$.NotFound) { - highlighted = null; - } else { - throw ex; - } + highlighted = null; } + highlighted && JX.DOM.alterClass(highlighted, 'anchor-target', true); } // Defer invocation so other listeners can update the document. diff --git a/webroot/rsrc/js/application/differential/DifferentialInlineCommentEditor.js b/webroot/rsrc/js/application/differential/DifferentialInlineCommentEditor.js index b9fc7c3bd3..122f13d8a1 100644 --- a/webroot/rsrc/js/application/differential/DifferentialInlineCommentEditor.js +++ b/webroot/rsrc/js/application/differential/DifferentialInlineCommentEditor.js @@ -109,9 +109,6 @@ JX.install('DifferentialInlineCommentEditor', { 'textarea', 'differential-inline-comment-edit-textarea'); } catch (ex) { - if (ex !== JX.$.NotFound) { - throw ex; - } // The close handler is called whenever the dialog closes, even if the // user closed it by completing the workflow with "Save". The // JX.Workflow API should probably be refined to allow programmatic