Browse Source

Popup/dropdown now add debug settings to transition

pull/1243/merge
jlukic 10 years ago
parent
commit
bb7ec259dd
2 changed files with 32 additions and 23 deletions
  1. 10
      src/definitions/modules/dropdown.js
  2. 45
      src/definitions/modules/popup.js

10
src/definitions/modules/dropdown.js

@ -272,7 +272,7 @@ $.fn.dropdown = function(parameters) {
.on('touchstart' + eventNamespace, module.event.test.toggle)
;
}
$module
$menu
.on('touchstart' + eventNamespace, selector.item, module.event.item.mouseenter)
;
},
@ -310,7 +310,7 @@ $.fn.dropdown = function(parameters) {
.on('blur' + eventNamespace, module.event.blur)
;
}
$module
$menu
.on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter)
.on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave)
.on('click' + eventNamespace, selector.item, module.event.item.click)
@ -766,7 +766,7 @@ $.fn.dropdown = function(parameters) {
: optionText
;
if(strict) {
module.debug('Ambiguous dropdown value using strict type check', value);
module.verbose('Ambiguous dropdown value using strict type check', $choice, value);
if( optionValue === value ) {
$selectedItem = $(this);
}
@ -1016,6 +1016,8 @@ $.fn.dropdown = function(parameters) {
$currentMenu
.transition({
animation : settings.transition + ' in',
debug : settings.debug,
verbose : settings.verbose,
duration : settings.duration,
queue : true,
onStart : start,
@ -1085,6 +1087,8 @@ $.fn.dropdown = function(parameters) {
.transition({
animation : settings.transition + ' out',
duration : settings.duration,
debug : settings.debug,
verbose : settings.verbose,
queue : true,
onStart : start,
onComplete : function() {

45
src/definitions/modules/popup.js

@ -122,7 +122,7 @@ $.fn.popup = function(parameters) {
destroy: function() {
module.debug('Destroying previous module');
if($popup && !settings.preserve) {
module.remove();
module.removePopup();
}
$module
.off(eventNamespace)
@ -253,9 +253,7 @@ $.fn.popup = function(parameters) {
hide: function(callback) {
callback = $.isFunction(callback) ? callback : function(){};
$module
.removeClass(className.visible)
;
module.remove.visible();
module.unbind.close();
if( module.is.visible() ) {
module.restore.conditions();
@ -293,10 +291,10 @@ $.fn.popup = function(parameters) {
}
},
remove: function() {
removePopup: function() {
module.debug('Removing popup');
$popup
.remove()
.removePopup()
;
},
@ -325,15 +323,15 @@ $.fn.popup = function(parameters) {
show: function(callback) {
callback = $.isFunction(callback) ? callback : function(){};
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
$module
.addClass(className.visible)
;
module.set.visible();
$popup
.transition({
animation : settings.transition + ' in',
queue : false,
duration : settings.duration,
onComplete : function() {
animation : settings.transition + ' in',
queue : false,
debug : settings.debug,
verbose : settings.verbose,
duration : settings.duration,
onComplete : function() {
module.bind.close();
$.proxy(callback, element)();
}
@ -341,9 +339,7 @@ $.fn.popup = function(parameters) {
;
}
else {
$module
.addClass(className.visible)
;
module.set.visible();
$popup
.stop()
.fadeIn(settings.duration, settings.easing, function() {
@ -363,6 +359,8 @@ $.fn.popup = function(parameters) {
animation : settings.transition + ' out',
queue : false,
duration : settings.duration,
debug : settings.debug,
verbose : settings.verbose,
onComplete : function() {
module.reset();
callback();
@ -625,8 +623,17 @@ $.fn.popup = function(parameters) {
$popup.removeClass(className.loading);
return true;
}
},
visible: function() {
$module.addClass(className.visible);
}
},
remove: {
visible: function() {
$module.removeClass(className.visible);
}
},
bind: {
@ -698,9 +705,7 @@ $.fn.popup = function(parameters) {
},
reset: function() {
$popup
.removeClass(className.visible)
;
module.remove.visible();
if(settings.preserve || settings.popup) {
if($.fn.transition !== undefined) {
$popup
@ -709,7 +714,7 @@ $.fn.popup = function(parameters) {
}
}
else {
module.remove();
module.removePopup();
}
},

Loading…
Cancel
Save