提交 0c25d5df 编写于 作者: F Félix Queiruga

Extracts call to Behaviour.specify so that it will be applied to elements in page at load time

上级 faa13b28
......@@ -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
*
* 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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册