[Jifty-commit] r7458 - jifty/trunk/lib/Jifty/View/Declare

Jifty commits jifty-commit at lists.jifty.org
Thu Aug 27 03:59:59 EDT 2009


Author: sartak
Date: Thu Aug 27 03:59:59 2009
New Revision: 7458

Modified:
   jifty/trunk/lib/Jifty/View/Declare/CRUD.pm

Log:
Make saving and deleting the record close the lightbox

Modified: jifty/trunk/lib/Jifty/View/Declare/CRUD.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Declare/CRUD.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Declare/CRUD.pm	Thu Aug 27 03:59:59 2009
@@ -527,19 +527,19 @@
             label   => _("Save"),
             onclick => [
                 { submit => $update },
-                {   replace_with => $self->fragment_for('view'),
-                    args => { object_type => $object_type, id => $id }
-                }
-            ]
+                "jQuery(document).trigger('close.facebox');",
+            ],
         );
         if ( $record->current_user_can('delete') ) {
             $delete->button(
                 label   => _('Delete'),
-                onclick => {
-                    submit  => $delete,
-                    confirm => _('Really delete?'),
-                    replace_with => '/__jifty/empty',
-                },
+                onclick => [
+                    {
+                        submit  => $delete,
+                        confirm => _('Really delete?'),
+                    },
+                    "jQuery(document).trigger('close.facebox');",
+                ],
                 class => 'delete'
             );
         }


More information about the Jifty-commit mailing list