semantic-ui-less
Advanced tools
Comparing version
@@ -156,2 +156,20 @@ /*! | ||
bind: { | ||
transitionEnd: function(callback) { | ||
var | ||
transitionEnd = module.get.transitionEnd() | ||
; | ||
$bar | ||
.one(transitionEnd + eventNamespace, function(event) { | ||
clearTimeout(module.failSafeTimer); | ||
callback.call(this, event); | ||
}) | ||
; | ||
module.failSafeTimer = setTimeout(function() { | ||
$bar.triggerHandler(transitionEnd); | ||
}, settings.duration + settings.failSafeDelay); | ||
module.verbose('Adding fail safe timer', module.timer); | ||
} | ||
}, | ||
increment: function(incrementValue) { | ||
@@ -453,3 +471,3 @@ var | ||
clearInterval(module.interval); | ||
$bar.one(transitionEnd + eventNamespace, animationCallback); | ||
module.bind.transitionEnd(animationCallback); | ||
animating = true; | ||
@@ -531,3 +549,3 @@ module.interval = setInterval(function() { | ||
} | ||
$bar.one(transitionEnd + eventNamespace, function() { | ||
module.bind.transitionEnd(function() { | ||
settings.onActive.call(element, module.value, module.total); | ||
@@ -552,3 +570,3 @@ }); | ||
} | ||
$bar.one(transitionEnd + eventNamespace, function() { | ||
module.bind.transitionEnd(function() { | ||
settings.onSuccess.call(element, module.total); | ||
@@ -569,3 +587,3 @@ }); | ||
} | ||
$bar.one(transitionEnd + eventNamespace, function() { | ||
module.bind.transitionEnd(function() { | ||
settings.onWarning.call(element, module.value, module.total); | ||
@@ -586,3 +604,3 @@ }); | ||
} | ||
$bar.one(transitionEnd + eventNamespace, function() { | ||
module.bind.transitionEnd(function() { | ||
settings.onError.call(element, module.value, module.total); | ||
@@ -865,2 +883,5 @@ }); | ||
// delay in ms for fail safe animation callback | ||
failSafeDelay : 100, | ||
onLabelUpdate : function(state, text, value, total){ | ||
@@ -867,0 +888,0 @@ return text; |
@@ -241,9 +241,11 @@ /*! | ||
// force selector refresh | ||
$result = $module.find(selector.result), | ||
$category = $module.find(selector.category), | ||
currentIndex = $result.index( $result.filter('.' + className.active) ), | ||
resultSize = $result.length, | ||
$result = $module.find(selector.result), | ||
$category = $module.find(selector.category), | ||
$activeResult = $result.filter('.' + className.active), | ||
currentIndex = $result.index( $activeResult ), | ||
resultSize = $result.length, | ||
hasActiveResult = $activeResult.length > 0, | ||
keyCode = event.which, | ||
keys = { | ||
keyCode = event.which, | ||
keys = { | ||
backspace : 8, | ||
@@ -271,3 +273,3 @@ enter : 13, | ||
} | ||
else if(keyCode == keys.upArrow) { | ||
else if(keyCode == keys.upArrow && hasActiveResult) { | ||
module.verbose('Up key pressed, changing active result'); | ||
@@ -369,3 +371,10 @@ newIndex = (currentIndex - 1 < 0) | ||
inMessage: function(event) { | ||
return (event.target && $(event.target).closest(selector.message).length > 0); | ||
if(!event.target) { | ||
return; | ||
} | ||
var | ||
$target = $(event.target), | ||
isInDOM = $.contains(document.documentElement, event.target) | ||
; | ||
return (isInDOM && $target.closest(selector.message).length > 0); | ||
}, | ||
@@ -372,0 +381,0 @@ empty: function() { |
@@ -138,3 +138,8 @@ /*! | ||
determineContainer: function() { | ||
$container = $module.offsetParent(); | ||
if(settings.container) { | ||
$container = $(settings.container); | ||
} | ||
else { | ||
$container = $module.offsetParent(); | ||
} | ||
}, | ||
@@ -886,2 +891,3 @@ | ||
context : false, | ||
container : false, | ||
@@ -888,0 +894,0 @@ // Context to watch scroll events |
@@ -432,9 +432,17 @@ /*! | ||
; | ||
if(evaluateScripts) { | ||
module.debug('Updating HTML and evaluating inline scripts', tabPath, html); | ||
$tab.html(html); | ||
if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && typeof html !== 'string') { | ||
$tab | ||
.empty() | ||
.append($(html).clone(true)) | ||
; | ||
} | ||
else { | ||
module.debug('Updating HTML', tabPath, html); | ||
tab.innerHTML = html; | ||
if(evaluateScripts) { | ||
module.debug('Updating HTML and evaluating inline scripts', tabPath, html); | ||
$tab.html(html); | ||
} | ||
else { | ||
module.debug('Updating HTML', tabPath, html); | ||
tab.innerHTML = html; | ||
} | ||
} | ||
@@ -471,3 +479,13 @@ } | ||
settings.onLoad.call($tab[0], tabPath, parameterArray, historyEvent); | ||
if(settings.cacheType != 'response') { | ||
if(typeof settings.cacheType == 'string' && settings.cacheType.toLowerCase() == 'dom' && $tab.children().length > 0) { | ||
setTimeout(function() { | ||
var | ||
$clone = $tab.children().clone(true) | ||
; | ||
$clone = $clone.not('script'); | ||
module.cache.add(fullTabPath, $clone); | ||
}, 0); | ||
} | ||
else { | ||
module.cache.add(fullTabPath, $tab.html()); | ||
@@ -474,0 +492,0 @@ } |
@@ -615,7 +615,11 @@ /*! | ||
}, | ||
displayType: function() { | ||
displayType: function(shouldDetermine) { | ||
shouldDetermine = (shouldDetermine !== undefined) | ||
? shouldDetermine | ||
: true | ||
; | ||
if(settings.displayType) { | ||
return settings.displayType; | ||
} | ||
if($module.data(metadata.displayType) === undefined) { | ||
if(shouldDetermine && $module.data(metadata.displayType) === undefined) { | ||
// create fake element to determine display state | ||
@@ -677,2 +681,3 @@ module.can.transition(true); | ||
transitionExists = module.get.transitionExists(animation), | ||
displayType = module.get.displayType(false), | ||
elementClass, | ||
@@ -683,4 +688,3 @@ tagName, | ||
inAnimation, | ||
directionExists, | ||
displayType | ||
directionExists | ||
; | ||
@@ -705,12 +709,14 @@ if( transitionExists === undefined || forced) { | ||
; | ||
displayType = $clone | ||
.attr('class', elementClass) | ||
.removeAttr('style') | ||
.removeClass(className.hidden) | ||
.removeClass(className.visible) | ||
.show() | ||
.css('display') | ||
; | ||
module.verbose('Determining final display state', displayType); | ||
module.save.displayType(displayType); | ||
if(!displayType) { | ||
displayType = $clone | ||
.attr('class', elementClass) | ||
.removeAttr('style') | ||
.removeClass(className.hidden) | ||
.removeClass(className.visible) | ||
.show() | ||
.css('display') | ||
; | ||
module.verbose('Determining final display state', displayType); | ||
module.save.displayType(displayType); | ||
} | ||
@@ -717,0 +723,0 @@ $clone.remove(); |
@@ -8,3 +8,3 @@ var | ||
summary : 'Semantic UI - LESS Release of Semantic UI', | ||
version : '2.2.4', | ||
version : '2.2.7', | ||
git : 'git://github.com/Semantic-Org/Semantic-UI-LESS.git', | ||
@@ -11,0 +11,0 @@ }); |
{ | ||
"name": "semantic-ui-less", | ||
"version": "2.2.4", | ||
"version": "2.2.7", | ||
"title": "Semantic UI", | ||
@@ -5,0 +5,0 @@ "description": "LESS Only distribution of Semantic UI", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3581683
0.07%22003
0.26%