Skip to content

Commit

Permalink
Bump version 1.11.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
doabit committed Mar 8, 2015
1 parent ba3acee commit 262e89b
Show file tree
Hide file tree
Showing 74 changed files with 2,975 additions and 1,888 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.11.4.0

* Update Semantic UI to 1.11.4

## 1.8.1.0

* Update Semantic UI to 1.8.1
Expand Down
Binary file modified app/assets/fonts/semantic-ui/icons.eot
Binary file not shown.
Binary file modified app/assets/fonts/semantic-ui/icons.otf
Binary file not shown.
991 changes: 526 additions & 465 deletions app/assets/fonts/semantic-ui/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/fonts/semantic-ui/icons.ttf
Binary file not shown.
Binary file modified app/assets/fonts/semantic-ui/icons.woff
Binary file not shown.
106 changes: 63 additions & 43 deletions app/assets/javascripts/semantic-ui/accordion.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* # Semantic - Accordion
/*!
* # Semantic UI - Accordion
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2014 Contributor
* Copyright 2014 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
Expand Down Expand Up @@ -61,10 +61,8 @@ $.fn.accordion = function(parameters) {
module = {

initialize: function() {
module.debug('Initializing accordion with bound events', $module);
$module
.on('click' + eventNamespace, selector.title, module.event.click)
;
module.debug('Initializing', $module);
module.bind.events();
module.observeChanges();
module.instantiate();
},
Expand All @@ -77,12 +75,10 @@ $.fn.accordion = function(parameters) {
},

destroy: function() {
module.debug('Destroying previous accordion for', $module);
module.debug('Destroying previous instance', $module);
$module
.removeData(moduleNamespace)
;
$title
.off(eventNamespace)
.removeData(moduleNamespace)
;
},

Expand All @@ -105,6 +101,14 @@ $.fn.accordion = function(parameters) {
}
},

bind: {
events: function() {
module.debug('Binding delegated events');
$module
.on('click' + eventNamespace, selector.trigger, module.event.click)
;
}
},

event: {
click: function() {
Expand All @@ -117,13 +121,16 @@ $.fn.accordion = function(parameters) {
$activeTitle = (query !== undefined)
? (typeof query === 'number')
? $title.eq(query)
: $(query)
: $(this),
: $(query).closest(selector.title)
: $(this).closest(selector.title),
$activeContent = $activeTitle.next($content),
contentIsOpen = $activeContent.is(':visible')
isAnimating = $activeContent.hasClass(className.animating),
isActive = $activeContent.hasClass(className.active),
isOpen = (isActive && !isAnimating),
isOpening = (!isActive && isAnimating)
;
module.debug('Toggling visibility of content', $activeTitle);
if(contentIsOpen) {
if(isOpen || isOpening) {
if(settings.collapsible) {
module.close.call($activeTitle);
}
Expand All @@ -132,7 +139,7 @@ $.fn.accordion = function(parameters) {
}
}
else {
module.open.call($activeTitle);
module.open.call($activeTitle);
}
},

Expand All @@ -141,47 +148,51 @@ $.fn.accordion = function(parameters) {
$activeTitle = (query !== undefined)
? (typeof query === 'number')
? $title.eq(query)
: $(query)
: $(this),
$activeContent = $activeTitle.next($content),
currentlyAnimating = $activeContent.is(':animated'),
currentlyActive = $activeContent.hasClass(className.active)
: $(query).closest(selector.title)
: $(this).closest(selector.title),
$activeContent = $activeTitle.next($content),
isAnimating = $activeContent.hasClass(className.animating),
isActive = $activeContent.hasClass(className.active),
isUnopen = (!isActive && !isAnimating)
;
if(!currentlyAnimating && !currentlyActive) {
if(isUnopen) {
module.debug('Opening accordion content', $activeTitle);
if(settings.exclusive) {
module.closeOthers.call($activeTitle);
}
$activeTitle
.addClass(className.active)
;
$activeContent.addClass(className.animating);
if(settings.animateChildren) {
if($.fn.transition !== undefined && $module.transition('is supported')) {
$activeContent
.children()
.transition({
animation : 'fade in',
animation : 'fade in',
queue : false,
useFailSafe : true,
debug : settings.debug,
verbose : settings.verbose,
duration : settings.duration
debug : settings.debug,
verbose : settings.verbose,
duration : settings.duration
})
;
}
else {
$activeContent
.children()
.stop()
.stop(true)
.animate({
opacity: 1
}, settings.duration, module.resetOpacity)
;
}
}
$activeContent
.stop()
.stop(true)
.slideDown(settings.duration, settings.easing, function() {
$activeContent
.removeClass(className.animating)
.addClass(className.active)
;
module.reset.display.call(this);
Expand All @@ -197,26 +208,29 @@ $.fn.accordion = function(parameters) {
$activeTitle = (query !== undefined)
? (typeof query === 'number')
? $title.eq(query)
: $(query)
: $(this),
: $(query).closest(selector.title)
: $(this).closest(selector.title),
$activeContent = $activeTitle.next($content),
isActive = $activeContent.hasClass(className.active)
isAnimating = $activeContent.hasClass(className.animating),
isActive = $activeContent.hasClass(className.active),
isOpening = (!isActive && isAnimating),
isClosing = (isActive && isAnimating)
;
if(isActive) {
if((isActive || isOpening) && !isClosing) {
module.debug('Closing accordion content', $activeContent);
$activeTitle
.removeClass(className.active)
;
$activeContent
.removeClass(className.active)
.show()
.addClass(className.animating)
;
if(settings.animateChildren) {
if($.fn.transition !== undefined && $module.transition('is supported')) {
$activeContent
.children()
.transition({
animation : 'fade out',
queue : false,
useFailSafe : true,
debug : settings.debug,
verbose : settings.verbose,
Expand All @@ -227,16 +241,20 @@ $.fn.accordion = function(parameters) {
else {
$activeContent
.children()
.stop()
.stop(true)
.animate({
opacity: 0
}, settings.duration, module.resetOpacity)
;
}
}
$activeContent
.stop()
.stop(true)
.slideUp(settings.duration, settings.easing, function() {
$activeContent
.removeClass(className.animating)
.removeClass(className.active)
;
module.reset.display.call(this);
settings.onClose.call(this);
settings.onChange.call(this);
Expand All @@ -249,7 +267,7 @@ $.fn.accordion = function(parameters) {
var
$activeTitle = (index !== undefined)
? $title.eq(index)
: $(this),
: $(this).closest(selector.title),
$parentTitles = $activeTitle.parents(selector.content).prev(selector.title),
$activeAccordion = $activeTitle.closest(selector.accordion),
activeSelector = selector.title + '.' + className.active + ':visible',
Expand Down Expand Up @@ -498,7 +516,7 @@ $.fn.accordion = function(parameters) {
}
else {
if(instance !== undefined) {
module.destroy();
instance.invoke('destroy');
}
module.initialize();
}
Expand All @@ -524,8 +542,8 @@ $.fn.accordion.settings = {
closeNested : false,
animateChildren : true,

duration : 500,
easing : 'easeOutQuint',
duration : 350,
easing : 'easeOutQuad',

onOpen : function(){},
onClose : function(){},
Expand All @@ -536,21 +554,23 @@ $.fn.accordion.settings = {
},

className : {
active : 'active'
active : 'active',
animating : 'animating'
},

selector : {
accordion : '.accordion',
title : '.title',
trigger : '.title',
content : '.content'
}

};

// Adds easing
$.extend( $.easing, {
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
}
});

Expand Down
Loading

0 comments on commit 262e89b

Please sign in to comment.