Trigger change handler to work with auto-insert in datagrid

Get runtime id instead of fixed id
This commit is contained in:
Franklin Kingma 2012-07-17 16:27:50 +02:00 committed by David Glick
parent 077bcc9d19
commit 620067afaa
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ if(jQuery) (function($){
});
$(this).contentTreeCancel();
input_box.parents('.datagridwidget-cell').triggerHandler('change');
},
contentTreeCancel: function() {
$(".contenttreeWindowBlocker").remove();

View File

@ -180,7 +180,7 @@ class ContentTreeBase(Explicit):
var parent = $(this).parents("*[id$='-autocomplete']")
var window = parent.siblings("*[id$='-contenttree-window']")
window.showDialog('%(url)s', %(expandSpeed)d);
$('#%(id)s-contenttree').contentTree(
$('#' + parent.attr('id').replace('autocomplete', 'contenttree')).contentTree(
{
script: '%(url)s',
folderEvent: '%(folderEvent)s',