collapsible: Add collapse/expand animation (VI)
[platform/framework/web/web-ui-fw.git] / libs / patch / 0022-JQM-Run-custom-event-handler-on-collapsible-list.patch
1 From 16a62b49eb87d912f070eb6844ba670b252ac895 Mon Sep 17 00:00:00 2001
2 From: Youmin Ha <youmin.ha@samsung.com>
3 Date: Thu, 27 Dec 2012 19:18:06 +0900
4 Subject: [PATCH] JQM: Run custom event handler on collapsible list
5
6 The collapsible list runs options.customEventHandler(isCollapse)
7 function with this patch.
8 This patch is for animating collapsing/expanding effect of collapsed
9 content.
10
11 Change-Id: Ic4f776db06224c15c0a8b10b108f56e26e298d6d
12 ---
13  .../jquery-mobile-1.2.0/js/widgets/collapsible.js  |    3 +++
14  1 file changed, 3 insertions(+)
15
16 diff --git a/libs/js/jquery-mobile-1.2.0/js/widgets/collapsible.js b/libs/js/jquery-mobile-1.2.0/js/widgets/collapsible.js
17 index 97bfacb..d56a24f 100644
18 --- a/libs/js/jquery-mobile-1.2.0/js/widgets/collapsible.js
19 +++ b/libs/js/jquery-mobile-1.2.0/js/widgets/collapsible.js
20 @@ -121,6 +121,9 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
21  
22                                         event.preventDefault();
23  
24 +                                       // Custom event callback
25 +                                       if ( o.customEventHandler ) { o.customEventHandler.call( this, isCollapse ) };
26 +
27                                         collapsibleHeading
28                                                 .toggleClass( "ui-collapsible-heading-collapsed", isCollapse )
29                                                 .find( ".ui-collapsible-heading-status" )
30 -- 
31 1.7.9.5
32