[Jifty-commit] jifty branch, master, updated. 240bbde147b7a19f6a8aef3dbb36e8c800538b77

Jifty commits jifty-commit at lists.jifty.org
Tue Jan 12 17:16:10 EST 2010


The branch, master has been updated
       via  240bbde147b7a19f6a8aef3dbb36e8c800538b77 (commit)
      from  240c8f6e65e1defb47d34ef349a73780391974df (commit)

Summary of changes:
 lib/Jifty/View/Declare/CRUD.pm |    6 +++---
 share/web/static/js/jifty.js   |    4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 240bbde147b7a19f6a8aef3dbb36e8c800538b77
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Jan 12 17:15:32 2010 -0500

    Jifty.closeLightbox
    
        Which can be later extended to run hooks or whatever. Also
        forward-compat in case we move away from facebox.

diff --git a/lib/Jifty/View/Declare/CRUD.pm b/lib/Jifty/View/Declare/CRUD.pm
index cf96503..72ff9b3 100644
--- a/lib/Jifty/View/Declare/CRUD.pm
+++ b/lib/Jifty/View/Declare/CRUD.pm
@@ -418,7 +418,7 @@ template 'search' => sub {
             label   => _('Search'),
             onclick => [
                 { submit => $search },
-                "jQuery(document).trigger('close.facebox');",
+                "Jifty.closeLightbox();",
                 {
                     refresh => Jifty->web->current_region->parent,
                     args    => { page => 1 },
@@ -533,7 +533,7 @@ private template edit_item_controls => sub {
             label   => _("Save"),
             onclick => [
                 { submit => $update },
-                "jQuery(document).trigger('close.facebox');",
+                "Jifty.closeLightbox();",
                 { refresh => $view_region },
             ],
         );
@@ -545,7 +545,7 @@ private template edit_item_controls => sub {
                         submit  => $delete,
                         confirm => _('Really delete?'),
                     },
-                    "jQuery(document).trigger('close.facebox');",
+                    "Jifty.closeLightbox();",
                     {
                         region => $view_region,
                         replace_with => '/__jifty/empty',
diff --git a/share/web/static/js/jifty.js b/share/web/static/js/jifty.js
index d14a4f3..b00a139 100644
--- a/share/web/static/js/jifty.js
+++ b/share/web/static/js/jifty.js
@@ -1938,6 +1938,10 @@ Jifty.Effect = function(el, name, args, options) {
     }
 };
 
+Jifty.closeLightbox = function () {
+    jQuery(document).trigger('close.facebox');
+};
+
 /*
  * Provide an alias in Global namespace for backward compatibility.
  * Also Jifty.Form will still work even if prototype.js is loaded

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list