1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-11 01:12:41 +01:00
phorge-phorge/webroot/rsrc/js/core
Benjamin Kausch 89a5d3132c Implements copy button in clone repo modal
Summary:
This diff adds a copy button to every repo uri in the clone repo modal. I have made the button to select the text to a merely structural span before the input - it just shows the type of the repository uri. When you click inside the input, the entire uri will be selected. Also I have uncluttered the HTML structure. A table is not needed here, nothing a flex block can't handle.

| Before    | After     |
|-----------|-----------|
| {F1360344} | {F1368592} |

While at it, I have extended the used javascript copy behavior. First of all: `document.execCommand('copy')` [[ https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand | could stop working every moment in every browser ]]. The [[ https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard | new clipboard API ]] is the way to go, so I have implemented it as the preferred method. The old method is kept as a fallback. And I have added a very nice feature: If defined, the behavior will now issue success or error notifications. See the changed UIExamples for that.

To support the shrinking of JS code with async functions I have patched the JsShrink source.

Test Plan: Go to a repository, hit the clone button and use the new copy button. You will see a shiny notification as a reward.

Reviewers: O1 Blessed Committers, avivey, valerio.bozzolan

Reviewed By: O1 Blessed Committers, avivey, valerio.bozzolan

Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25536
2024-02-15 19:38:39 +01:00
..
darkconsole Make the "Keyboard Shortcuts" dialog in Differential less hideous 2020-04-19 09:01:07 -07:00
behavior-audio-source.js Implement macros as audio sources 2013-09-27 16:02:02 -07:00
behavior-autofocus.js Move js/application/core/ one level up 2013-04-23 10:56:46 -07:00
behavior-badge-view.js Links on badge card should be accessible 2016-04-15 07:55:31 -07:00
behavior-bulk-editor.js Organize bulk edit actions into nice groups 2018-01-19 13:22:25 -08:00
behavior-choose-control.js Allow installs to customize project icons 2016-01-08 14:01:53 -08:00
behavior-copy.js Implements copy button in clone repo modal 2024-02-15 19:38:39 +01:00
behavior-detect-timezone.js When the JS "Intl" API is available, use it to guess the timezone 2016-05-22 09:14:02 -07:00
behavior-device.js Improve commit action item layout on mobile 2020-08-12 09:04:07 -07:00
behavior-drag-and-drop-textarea.js Drag & Drop: fix JavaScript error related to JX.$(undefined) 2023-04-26 09:51:03 +02:00
behavior-fancy-datepicker.js Merge Phacility/master into phorge 2022-07-25 11:50:26 -07:00
behavior-form.js Apply some linter auto-fixes 2014-08-02 19:03:02 +10:00
behavior-gesture.js Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
behavior-global-drag-and-drop.js Allow users to drop .ics files on calendar views to import them 2016-10-18 15:26:44 -07:00
behavior-high-security-warning.js Quicksand - make things work properly with high security mode 2015-04-23 16:37:56 -07:00
behavior-history-install.js Move js/application/core/ one level up 2013-04-23 10:56:46 -07:00
behavior-hovercard.js Render user hovercards with context information about their ability to see the context object 2021-02-13 13:37:37 -08:00
behavior-keyboard-pager.js Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
behavior-keyboard-shortcuts.js Make the "Keyboard Shortcuts" dialog in Differential less hideous 2020-04-19 09:01:07 -07:00
behavior-lightbox-attachments.js Provide default image alt text in more contexts and support custom alt text 2021-03-04 16:51:23 -08:00
behavior-line-linker.js Make "Open in Editor" use the simple line number of the current selected block 2020-05-21 15:31:16 -07:00
behavior-linked-container.js Replace the "Choose Subtype" radio buttons dialog with a simpler "big stuff you click" sort of UI 2018-12-10 14:59:18 -08:00
behavior-more.js Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
behavior-object-selector.js Prevent object titles in the "Object Attacher" dialog from triggering Quicksand "Close Dialog on Navigation" behavior 2019-08-01 12:25:28 -07:00
behavior-oncopy.js Fix a flash of document selection when "oncopy" and "inline on range" behaviors interact 2020-05-14 14:29:46 -07:00
behavior-phabricator-remarkup-assist.js Add and use new RemarkupMetadata class 2023-04-24 01:53:16 +00:00
behavior-read-only-warning.js When Phabricator is in read-only mode, explain why 2016-04-10 12:19:18 -07:00
behavior-redirect.js Perform a client-side redirect after OAuth server authorization 2018-03-06 12:18:27 -08:00
behavior-refresh-csrf.js When logged-out users hit a "Login Required" dialog, try to choose a better "next" URI 2015-12-17 08:30:03 -08:00
behavior-remarkup-load-image.js When proxying an "{image ...}" image fails, show the user an error message 2018-03-08 07:03:26 -08:00
behavior-remarkup-preview.js Support field previews in EditEngine 2015-12-27 08:17:18 -08:00
behavior-reorder-applications.js Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
behavior-reveal-content.js Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
behavior-scrollbar.js Make scrolling happen relative to the main content frame 2015-01-25 08:42:40 -08:00
behavior-search-typeahead.js Add a rough Quick Search datasource for Phriction documents 2018-02-16 09:55:54 -08:00
behavior-select-content.js Implements copy button in clone repo modal 2024-02-15 19:38:39 +01:00
behavior-select-on-click.js Remove unused JavaScript variables. 2014-06-24 03:27:47 +10:00
behavior-setup-check-https.js Add client-side check for protocol mismatch 2016-06-07 15:54:48 +00:00
behavior-time-typeahead.js Time controls should format end date value correctly (not 5:0 PM) 2016-04-15 12:18:12 -07:00
behavior-toggle-class.js Activate "jx-toggle-class" on click to fix broken mobile behavior 2019-03-28 17:29:06 -07:00
behavior-tokenizer.js Move js/application/core/ one level up 2013-04-23 10:56:46 -07:00
behavior-tooltip.js Redesign Home/Profile/Projects side navigation 2017-01-31 08:59:01 -08:00
behavior-user-menu.js Make documentation items in user menu update as you navigate in Quicksand 2017-01-17 15:55:52 -08:00
behavior-watch-anchor.js Fix a JS issue when the anchor element on a page has no container 2020-05-04 15:57:31 -07:00
behavior-workflow.js Provide a global router for Ajax requests 2014-05-05 10:57:42 -07:00
Busy.js Make busy indicator durable column aware 2015-04-01 20:10:32 -07:00
DragAndDropFileUpload.js Provide an <input type="file"> control in Remarkup for mobile and users with esoteric windowing systems 2016-05-20 16:24:22 -07:00
DraggableList.js Prevent workboard cards from being grabbed by the "Txxx" object name text 2019-11-08 08:29:53 -08:00
Favicon.js JX.Favicon for Conpherence 2016-10-20 12:17:50 -07:00
FileUpload.js Drag & Drop: set a link as external 2023-03-17 13:56:18 +01:00
Hovercard.js Render user hovercards with context information about their ability to see the context object 2021-02-13 13:37:37 -08:00
HovercardList.js Render user hovercards with context information about their ability to see the context object 2021-02-13 13:37:37 -08:00
KeyboardShortcut.js Make the "Keyboard Shortcuts" dialog in Differential less hideous 2020-04-19 09:01:07 -07:00
KeyboardShortcutManager.js Roughly style the new "flank" paths UI 2020-04-22 08:31:40 -07:00
MultirowRowManager.js Clean up Multirow Manager UI 2014-11-17 14:06:05 -08:00
Notification.js Correct the behavior of "Desktop Only" in Notifications preferences 2018-03-16 15:17:49 -07:00
phtize.js Use JsShrink if jsxmin is not available 2013-05-18 17:04:22 -07:00
Prefab.js Show user availability dots (red = away, orange = busy) in typeaheads, tokenizer tokens, and autocompletes 2019-02-19 10:57:20 -08:00
RemarkupMetadata.js Add and use new RemarkupMetadata class 2023-04-24 01:53:16 +00:00
ShapedRequest.js Save drafts for inline comments currently being edited 2020-05-04 13:19:42 -07:00
TextAreaUtils.js Provide an <input type="file"> control in Remarkup for mobile and users with esoteric windowing systems 2016-05-20 16:24:22 -07:00
Title.js JX.Favicon for Conpherence 2016-10-20 12:17:50 -07:00
ToolTip.js Make Differential objective markers show a brighter "editing" state 2017-05-20 07:57:38 -07:00