From 56dd02ad122392faa92abe70bf2505c9b469fda6 Mon Sep 17 00:00:00 2001 From: Kishan Rathod Date: Fri, 6 Dec 2013 13:52:55 -0500 Subject: [PATCH 1/2] Update af.accordion.css Plugin was not working with the latest AppFramework branch. Enhancement: If data-height is not specified then set to auto. Also requires af.accordion.js changes. --- af-accordion/af.accordion.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/af-accordion/af.accordion.css b/af-accordion/af.accordion.css index 79817e6..6a53cef 100755 --- a/af-accordion/af.accordion.css +++ b/af-accordion/af.accordion.css @@ -1,8 +1,7 @@ - .accordion li>div { opacity:0; - overflow:hidden; + overflow:auto; height:0px; -webkit-transition: opacity 0.30s linear; transition: opacity 0.30s linear; @@ -21,7 +20,9 @@ height:auto; opacity:1; } - +.accordion li.active>div{ + opacity:1; +} .accordion li { display:block; width:100%; From 6e4379664d75e3c0a498888a6a0b5bdf58509798 Mon Sep 17 00:00:00 2001 From: Kishan Rathod Date: Fri, 6 Dec 2013 14:56:45 -0500 Subject: [PATCH 2/2] Update af.accordion.js Plugin was not working with the latest AppFramework branch. Enhancement: If data-height is not specified then set to auto. There is still "event.returnValue is deprecated." warning which I cannot figure it out. --- af-accordion/af.accordion.js | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/af-accordion/af.accordion.js b/af-accordion/af.accordion.js index 70bace6..a0a33ea 100755 --- a/af-accordion/af.accordion.js +++ b/af-accordion/af.accordion.js @@ -42,17 +42,23 @@ $el.on("click","li",function(e){ - var $e=$(e.target).siblings("div"); - debugger; - $e.parent().addClass("active"); - $el.find("li").not($e.parent().get(0)).removeClass("active"); - var to=$e.height(); - $e.css("height","0px"); - window.setTimeout(function(){ - $e.css("height",to); - }); - e.preventDefault(); ++ var $e = $(e.target).siblings("div"); ++ $e.parent().addClass("active"); ++ $el.find("li").not($e.parent().get(0)).removeClass("active"); ++ $el.find("div").not($e.get(0)).css("height", "0px"); ++ window.setTimeout(function () { ++ if ($e.get(0).clientHeight > 0) ++ $e.css("height", "0"); ++ else { ++ var to = $e.data("height"); ++ if (to == null) ++ to = "auto"; ++ $e.css("height", to); ++ } ++ }); + + e.preventDefault(); }); } -})(af,window); \ No newline at end of file +})(af,window);