X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/133e3be21233547506c2d7342c92ca7fd7b8354a..ccfc4635d72ad33f707109a0f6867ee56418f13d:/SL/ClientJS.pm diff --git a/SL/ClientJS.pm b/SL/ClientJS.pm index 7d1bb383a..ada199efa 100644 --- a/SL/ClientJS.pm +++ b/SL/ClientJS.pm @@ -75,10 +75,10 @@ my %supported_methods = ( off => 3, one => 3, - # ## jqModal plugin ## + # ## jQuery UI dialog plugin ## pattern: $().dialog('') # Closing and removing the popup - jqmClose => 1, # $().jqmClose() + 'dialog:close' => 1, # ## jstree plugin ## pattern: $.jstree._reference($()).() @@ -185,6 +185,12 @@ sub jstree { return $self; } +sub dialog { + my ($self) = @_; + $self->{_prefix} = 'dialog:'; + return $self; +} + sub flash { my ($self, $type, @messages) = @_; @@ -262,6 +268,9 @@ Now some Perl code: $js->jstree->rename_node('#tb-' . $text_block->id, $text_block->title) ->jstree->select_node('#tb-' . $text_block->id); + # Close a popup opened by kivi.popup_dialog(): + $js->dialog->close('#jqueryui_popup_dialog'); + # Finally render the JSON response: $self->render($js); @@ -324,6 +333,14 @@ to the following: $controller->render(\$self->to_json, { type => 'json' }); +=item C + +Tells C<$self> that the next action is to be called on a jQuery UI +dialog instance, e.g. one opened by C. For +example: + + $js->dialog->close('#jqueryui_popup_dialog'); + =item C Tells C<$self> that the next action is to be called on a jstree