From 0a5c58d904d4a8b9fe0c4022a7c075bee8de72bb Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 14 Dec 2016 16:05:09 -0500 Subject: [PATCH] API Explorer: Make return value sortable --- templates/CRM/Admin/Page/APIExplorer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index 1343980621..7c3a4b1894 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -344,6 +344,11 @@ } $('#api-params').prepend($(returnTpl({title: title, required: action == 'getvalue'}))); $('#api-return-value').crmSelect2(params); + $("#api-return-value").select2("container").find("ul.select2-choices").sortable({ + containment: 'parent', + start: function() { $("#api-return-value").select2("onSortStart"); }, + update: function() { $("#api-return-value").select2("onSortEnd"); } + }); } /** -- 2.25.1