mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 02:26:18 +00:00
Merge pull request #4568 from fqueiruga/jenkins-61429_fix-reorder-steps-in-some-forms
[JENKINS-61429] Fix drag & drop for existing steps in job & folders forms
This commit is contained in:
1 file changed
+16
-4
@@ -5,13 +5,25 @@ import tableMetadata from './model/ConfigTableMetaData';
|
||||
import behaviorShim from '../../util/behavior-shim';
|
||||
import jenkinsLocalStorage from '../../util/jenkinsLocalStorage';
|
||||
|
||||
/**
|
||||
* Extracting this call from outside of the addPageTabs due to a regression
|
||||
* in 2.216/2.217 (see JENKINS-61429)
|
||||
*
|
||||
* The proxied call to Behaviour.specify needs to be called from outside of the
|
||||
* addPageTabs function. Otherwise, it will not apply to existing draggable
|
||||
* elements on the form. It would only only apply to new elements.
|
||||
*
|
||||
* Extracting this Behaviour.specify call to the module level causes it to be executed
|
||||
* on script load, and this seems to set up the event listeners properly.
|
||||
*/
|
||||
behaviorShim.specify(".dd-handle", 'config-drag-start', 1000, function(el) {
|
||||
page.fixDragEvent(el);
|
||||
});
|
||||
|
||||
export var tabBarShowPreferenceKey = 'config:usetabs';
|
||||
|
||||
export var addPageTabs = function(configSelector, onEachConfigTable, options) {
|
||||
$(function() {
|
||||
behaviorShim.specify(".dd-handle", 'config-drag-start', 1000, function(el) {
|
||||
page.fixDragEvent(el);
|
||||
});
|
||||
|
||||
// We need to wait until after radioBlock.js Behaviour.js rules
|
||||
// have been applied, otherwise row-set rows become visible across sections.
|
||||
@@ -147,4 +159,4 @@ export var addFinderToggle = function(configTableMetadata) {
|
||||
if (jenkinsLocalStorage.getGlobalItem(finderShowPreferenceKey, "yes") === 'yes') {
|
||||
findToggle.click();
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user