I have this inline JS code which I use for drag and drop functionality within table. It works fine when the table is on the main page but now I am trying to execute this within a popup. Any tips?
(function(skuid){var $ = skuid.$;
$(document.body).one(‘pageload’,function(){
var component = skuid.$C(‘sk-3MxwBj-240’),
listContents = component && component.element.find(‘.nx-list-contents’);
listContents.sortable({
placeholder: “ui-state-highlight”,
stop: function( event, ui ) {
var data = ui.item.data(‘object’),
model = data.list.model,
movedRow = data.row,
target = $(event.target);
target.children().each(function(index,tr){
var row = $(tr).data(‘object’).row,
order = row.Order__c;
if (index + 1 !== order) {
model.updateRow(row,‘Order__c’,index+1,{initiatorId:component._GUID});
}
});
}
});
});
})(skuid);
Question
Inline JS within Popup

Translate
This topic has been closed for comments
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.