From 237765df3d8c9f4bd60473b656b4963d4da7af8d Mon Sep 17 00:00:00 2001 From: jlukic Date: Sat, 12 Oct 2013 17:30:41 -0400 Subject: [PATCH] Fixes bug in popup causing variations to be overriden --- RELEASE NOTES.md | 12 ++++++++---- src/modules/popup.js | 23 +++++++++++------------ src/modules/transition.js | 30 +++++++++++++++--------------- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/RELEASE NOTES.md b/RELEASE NOTES.md index 07b2380ef..48b8cf02c 100755 --- a/RELEASE NOTES.md +++ b/RELEASE NOTES.md @@ -3,15 +3,19 @@ ### Version 0.4.4 - Oct 10, 2013 **Critical Fixes** -- Fixes on all modules where settings were shared across elements initialized at the same time instead of each module. - -**Updates** -- Accordion now comes bundled with proper easing +- Fixes on some modules where settings were shared across elements initialized at the same time instead of each module. +- Fixes regression where popup was overriding variation class name on positioning **Fixes** +- Fixed an issue where popup that was set to inline: false was being removed prematurely - Fixes inheritance issue where grid column may sometimes not appear the correct size - Fixes modal hide/show dependency issue where dimmer would not always hide modal and vice-versa +**Updates** +- Adds an example to popup where inline is set to false +- Accordion now comes bundled with proper easing +- Added onCreate to popup module + ### Version 0.4.3 - Oct 10, 2013 **Fixes** diff --git a/src/modules/popup.js b/src/modules/popup.js index 8d21187f4..bd8d542cd 100755 --- a/src/modules/popup.js +++ b/src/modules/popup.js @@ -155,18 +155,18 @@ $.fn.popup = function(parameters) { .html(html) ; if(settings.inline) { - module.verbose('Inserting popup element inline'); + module.verbose('Inserting popup element inline', $popup); $popup .insertAfter($module) ; } else { - module.verbose('Appending popup element to body'); + module.verbose('Appending popup element to body', $popup); $popup .appendTo( $('body') ) ; } - $.proxy(settings.onInit, $popup)(); + $.proxy(settings.onCreate, $popup)(); } else { module.error(error.content); @@ -361,8 +361,9 @@ $.fn.popup = function(parameters) { }); // tentatively place on stage $popup - .attr('class', position + ' ' + className.popup + ' ' + className.loading) .css(positioning) + .removeClass(className.position) + .addClass(position) ; // check if is offstage offstagePosition = module.get.offstagePosition(); @@ -397,9 +398,6 @@ $.fn.popup = function(parameters) { $module .addClass(className.visible) ; - $popup - .removeClass(className.loading) - ; if(settings.transition && $.fn.transition !== undefined) { $popup .transition(settings.transition + ' in', settings.duration) @@ -451,9 +449,6 @@ $.fn.popup = function(parameters) { ; } $.proxy(settings.onHide, $popup)(); - if(!settings.inline) { - module.remove(); - } }, reset: function() { @@ -462,6 +457,9 @@ $.fn.popup = function(parameters) { .attr('style', '') .removeAttr('style') ; + if(!settings.inline) { + module.remove(); + } }, gracefully: { @@ -660,7 +658,7 @@ $.fn.popup.settings = { performance : true, namespace : 'popup', - onInit : function(){}, + onCreate : function(){}, onShow : function(){}, onHide : function(){}, @@ -702,7 +700,8 @@ $.fn.popup.settings = { className : { popup : 'ui popup', visible : 'visible', - loading : 'loading' + loading : 'loading', + position : 'top left center bottom right' }, selector : { diff --git a/src/modules/transition.js b/src/modules/transition.js index b70d2c5ad..e134c10ba 100755 --- a/src/modules/transition.js +++ b/src/modules/transition.js @@ -606,40 +606,40 @@ $.fn.transition = function() { $.fn.transition.settings = { // module info - name : 'Transition', + name : 'Transition', // debug content outputted to console - debug : false, + debug : false, // verbose debug output - verbose : true, + verbose : true, // performance data output - performance : true, + performance : true, // event namespace - namespace : 'transition', + namespace : 'transition', // animation complete event - complete : function() {}, + complete : function() {}, // animation duration - animation : 'fade', - duration : '700ms', + animation : 'fade', + duration : '700ms', // queue up animations - queue : true, + queue : true, - className : { - transition : 'ui transition', + className : { animating : 'animating', - looping : 'looping', - loading : 'loading', disabled : 'disabled', hidden : 'hidden', - visible : 'visible', inward : 'in', - outward : 'out' + loading : 'loading', + looping : 'looping', + outward : 'out', + transition : 'ui transition', + visible : 'visible' }, // possible errors