Skip to content

Commit

Permalink
Merge branch 'MDL-65564-master' of git://github.com/marinaglancy/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed May 13, 2019
2 parents 30e66a2 + c508bed commit 146d2f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion customfield/amd/build/form.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions customfield/amd/src/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
* @copyright 2018 Toni Barbera
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['jquery', 'core/str', 'core/notification', 'core/ajax', 'core/templates', 'core/sortable_list'], function(
define(['jquery', 'core/str', 'core/notification', 'core/ajax', 'core/templates', 'core/sortable_list', 'core/inplace_editable'],
function(
$, Str, Notification, Ajax, Templates, SortableList) {

/**
Expand All @@ -48,7 +49,7 @@ define(['jquery', 'core/str', 'core/notification', 'core/ajax', 'core/templates'
])[1].then(function(response) {
return Templates.render('core_customfield/list', response);
}).then(function(html, js) {
Templates.replaceNodeContents($('[data-region="list-page"]'), html, js);
Templates.replaceNode($('[data-region="list-page"]'), html, js);
return null;
}).fail(Notification.exception);
});
Expand Down Expand Up @@ -77,7 +78,7 @@ define(['jquery', 'core/str', 'core/notification', 'core/ajax', 'core/templates'
promises[1].then(function(response) {
return Templates.render('core_customfield/list', response);
}).then(function(html, js) {
Templates.replaceNodeContents($('[data-region="list-page"]'), html, js);
Templates.replaceNode($('[data-region="list-page"]'), html, js);
window.location.href = '#category-' + categoryid;
return null;
}).fail(Notification.exception);
Expand Down Expand Up @@ -113,7 +114,7 @@ define(['jquery', 'core/str', 'core/notification', 'core/ajax', 'core/templates'

// Sort category.
var sortCat = new SortableList(
'#customfield_catlist .categorieslist',
$('#customfield_catlist .categorieslist'),
{moveHandlerSelector: '.movecategory [data-drag-type=move]'}
);

Expand All @@ -140,7 +141,7 @@ define(['jquery', 'core/str', 'core/notification', 'core/ajax', 'core/templates'

// Sort fields.
var sort = new SortableList(
'#customfield_catlist .fieldslist tbody',
$('#customfield_catlist .fieldslist tbody'),
{moveHandlerSelector: '.movefield [data-drag-type=move]'}
);

Expand Down

0 comments on commit 146d2f6

Please sign in to comment.