Browse Source

Rebuild for jsfiddle

pull/1785/head
jlukic 10 years ago
parent
commit
9d1f70f8b7
37 changed files with 314 additions and 167 deletions
  1. 7
      dist/components/api.js
  2. 2
      dist/components/api.min.js
  3. 7
      dist/components/button.css
  4. 2
      dist/components/button.min.css
  5. 20
      dist/components/dimmer.js
  6. 2
      dist/components/dimmer.min.js
  7. 4
      dist/components/divider.css
  8. 16
      dist/components/dropdown.css
  9. 27
      dist/components/dropdown.js
  10. 2
      dist/components/dropdown.min.css
  11. 2
      dist/components/dropdown.min.js
  12. 8
      dist/components/flag.css
  13. 1
      dist/components/grid.css
  14. 2
      dist/components/grid.min.css
  15. 34
      dist/components/header.css
  16. 2
      dist/components/header.min.css
  17. 4
      dist/components/icon.css
  18. 2
      dist/components/icon.min.css
  19. 9
      dist/components/menu.css
  20. 2
      dist/components/menu.min.css
  21. 8
      dist/components/modal.js
  22. 15
      dist/components/sidebar.css
  23. 8
      dist/components/sidebar.js
  24. 2
      dist/components/sidebar.min.css
  25. 2
      dist/components/sidebar.min.js
  26. 2
      dist/components/step.css
  27. 2
      dist/components/step.min.css
  28. 22
      dist/components/tab.js
  29. 2
      dist/components/tab.min.js
  30. 6
      dist/components/transition.css
  31. 20
      dist/components/transition.js
  32. 2
      dist/components/transition.min.js
  33. 109
      dist/semantic.css
  34. 112
      dist/semantic.js
  35. 2
      dist/semantic.min.css
  36. 12
      dist/semantic.min.js
  37. BIN
      dist/themes/default/assets/images/flags.png

7
dist/components/api.js

@ -186,13 +186,15 @@ $.api = $.fn.api = function(parameters) {
// throttle additional requests
module.timer = setTimeout(function() {
module.request = module.create.request();
module.xhr = module.create.xhr();
module.xhr = module.create.xhr();
settings.onRequest.call(context, module.request, module.xhr);
}, settings.throttle);
}
else {
// immediately on first request
module.request = module.create.request();
module.xhr = module.create.xhr();
module.xhr = module.create.xhr();
settings.onRequest.call(context, module.request, module.xhr);
}
},
@ -799,6 +801,7 @@ $.api.settings = {
beforeSend : function(settings) { return settings; },
beforeXHR : function(xhr) {},
onRequest : function(promise, xhr) {},
onSuccess : function(response, $module) {},
onComplete : function(response, $module) {},
onFailure : function(errorMessage, $module) {},

2
dist/components/api.min.js
File diff suppressed because it is too large
View File

7
dist/components/button.css

@ -122,11 +122,12 @@
.ui.loading.loading.loading.loading.loading.loading.button {
position: relative;
cursor: default;
point-events: none;
text-shadow: none !important;
color: transparent !important;
-webkit-transition: all 0s linear;
transition: all 0s linear;
opacity: 1;
pointer-events: none;
-webkit-transition: all 0s linear, opacity 0.2s ease;
transition: all 0s linear, opacity 0.2s ease;
}
.ui.loading.button:before {
position: absolute;

2
dist/components/button.min.css
File diff suppressed because it is too large
View File

20
dist/components/dimmer.js

@ -215,13 +215,14 @@ $.fn.dimmer = function(parameters) {
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
$dimmer
.transition({
animation : settings.transition + ' in',
animation : settings.transition + ' in',
queue : false,
duration : module.get.duration(),
onStart : function() {
duration : module.get.duration(),
useFailSafe : true,
onStart : function() {
module.set.dimmed();
},
onComplete : function() {
onComplete : function() {
module.set.active();
callback();
}
@ -255,13 +256,14 @@ $.fn.dimmer = function(parameters) {
module.verbose('Hiding dimmer with css');
$dimmer
.transition({
animation : settings.transition + ' out',
queue : false,
duration : module.get.duration(),
onStart : function() {
animation : settings.transition + ' out',
queue : false,
duration : module.get.duration(),
useFailSafe : true,
onStart : function() {
module.remove.dimmed();
},
onComplete : function() {
onComplete : function() {
module.remove.active();
callback();
}

2
dist/components/dimmer.min.js
File diff suppressed because it is too large
View File

4
dist/components/divider.css

@ -182,9 +182,7 @@
Inverted
---------------*/
.ui.divider.inverted {
color: #ffffff;
}
.ui.divider.inverted,
.ui.vertical.inverted.divider,
.ui.horizontal.inverted.divider {
color: #ffffff;

16
dist/components/dropdown.css

@ -64,7 +64,7 @@
Hidden Input
---------------*/
.ui.dropdown > input[type="hidden"],
.ui.dropdown > input:not(.search):first-child,
.ui.dropdown > select {
display: none !important;
}
@ -344,10 +344,12 @@ select.ui.dropdown {
.ui.selection.dropdown > .search.icon,
.ui.selection.dropdown > .delete.icon,
.ui.selection.dropdown > .dropdown.icon {
cursor: pointer;
position: absolute;
top: auto;
margin: 0em;
width: auto;
margin: -0.8em;
padding: 0.8em;
right: 1.1em;
opacity: 0.8;
-webkit-transition: opacity 0.2s ease;
@ -444,9 +446,6 @@ select.ui.dropdown {
border-color: rgba(39, 41, 43, 0.15);
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
}
.ui.visible.selection.dropdown > .dropdown.icon {
opacity: 1;
}
/* Active Item */
.ui.selection.active.dropdown > .text:not(.default),
@ -455,6 +454,13 @@ select.ui.dropdown {
color: rgba(0, 0, 0, 0.8);
}
/* Dropdown Icon */
.ui.active.selection.dropdown > .dropdown.icon,
.ui.visible.selection.dropdown > .dropdown.icon {
opacity: 1;
z-index: 3;
}
/* Connecting Border */
.ui.active.selection.dropdown,
.ui.visible.selection.dropdown {

27
dist/components/dropdown.js

@ -445,6 +445,20 @@ $.fn.dropdown = function(parameters) {
}
},
forceSelection: function() {
var
$currentlySelected = $item.not(className.filtered).filter('.' + className.selected).eq(0),
$activeItem = $item.filter('.' + className.active).eq(0),
$selectedItem = ($currentlySelected.length > 0)
? $currentlySelected
: $activeItem,
hasSelected = ($selectedItem.size() > 0)
;
if(hasSelected) {
module.event.item.click.call($selectedItem);
}
},
event: {
// prevents focus callback from occuring on mousedown
mousedown: function() {
@ -475,7 +489,12 @@ $.fn.dropdown = function(parameters) {
pageLostFocus = (document.activeElement === this)
;
if(!itemActivated && !pageLostFocus) {
module.hide();
if(settings.forceSelection) {
module.forceSelection();
}
else {
module.hide();
}
}
},
searchTextFocus: function(event) {
@ -687,7 +706,9 @@ $.fn.dropdown = function(parameters) {
click: function (event) {
var
$choice = $(this),
$target = $(event.target),
$target = (event)
? $(event.target)
: $(''),
$subMenu = $choice.find(selector.menu),
text = module.get.choiceText($choice),
value = module.get.choiceValue($choice, text),
@ -1653,6 +1674,8 @@ $.fn.dropdown.settings = {
touch : 50
},
forceSelection: true,
transition : 'auto',
duration : 250,

2
dist/components/dropdown.min.css
File diff suppressed because it is too large
View File

2
dist/components/dropdown.min.js
File diff suppressed because it is too large
View File

8
dist/components/flag.css

@ -9,6 +9,12 @@
*
*/
/*******************************
Flag
*******************************/
i.flag:not(.icon) {
display: inline-block;
width: 16px;
@ -22,6 +28,8 @@ i.flag:not(.icon) {
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
/* Sprite */
i.flag:not(.icon):before {
display: inline-block;
content: '';

1
dist/components/grid.css

@ -1708,6 +1708,7 @@
width: auto !important;
margin: 0em 0em !important;
box-shadow: none !important;
float: none !important;
padding: 1rem 1rem !important;
}
.ui.stackable.grid > .row {

2
dist/components/grid.min.css
File diff suppressed because it is too large
View File

34
dist/components/header.css

@ -58,15 +58,30 @@
font-size: 1.5em;
padding-top: 0.165em;
vertical-align: middle;
padding-right: 0.5rem;
}
/* Only One */
/* With Text Node */
.ui.header .icon:only-child {
display: inline-block;
padding: 0em;
margin-right: 0.5rem;
vertical-align: baseline;
margin-right: 0.75rem;
}
/*-------------------
Image
--------------------*/
.ui.header > .image,
.ui.header > img {
display: inline-block;
margin-top: 0.165em;
width: 2.5em;
height: auto;
vertical-align: middle;
}
.ui.header > .image:only-child,
.ui.header > img:only-child {
margin-right: 0.75rem;
}
/*--------------
@ -77,8 +92,17 @@
display: inline-block;
vertical-align: top;
}
/* After Image */
.ui.header > img + .content,
.ui.header > .image + .content {
padding-left: 0.75rem;
vertical-align: middle;
}
/* After Icon */
.ui.header > .icon + .content {
padding-left: 0.5rem;
padding-left: 0.75rem;
display: table-cell;
vertical-align: middle;
}

2
dist/components/header.min.css
File diff suppressed because it is too large
View File

4
dist/components/icon.css

@ -390,7 +390,7 @@ i.icon.search:before {
i.icon.mail.outline:before {
content: "\f003";
}
i.icon.external.link:before {
i.icon.external:before {
content: "\f08e";
}
i.icon.signal:before {
@ -483,7 +483,7 @@ i.icon.calendar.outline:before {
i.icon.ticket:before {
content: "\f145";
}
i.icon.external.link.square:before {
i.icon.external.square:before {
content: "\f14c";
}
i.icon.map:before {

2
dist/components/icon.min.css
File diff suppressed because it is too large
View File

9
dist/components/menu.css

@ -42,9 +42,11 @@
margin-bottom: 0rem;
}
.ui.menu .menu {
font-size: 0em;
margin: 0em;
}
.ui.menu:not(.vertical) .menu {
font-size: 0em;
}
/*--------------
Colors
@ -623,13 +625,14 @@
/* Active */
.ui.tabular.menu .active.item {
position: relative;
border-bottom: none;
vertical-align: bottom;
background-color: #ffffff;
color: rgba(0, 0, 0, 0.8);
border-color: #d4d4d5;
font-weight: bold;
margin-bottom: -1px;
border-bottom: none;
box-shadow: 0px 2px 0px -1px #ffffff;
box-shadow: none;
border-radius: 5px 5px 0px 0px;
}

2
dist/components/menu.min.css
File diff suppressed because it is too large
View File

8
dist/components/modal.js

@ -186,12 +186,8 @@ $.fn.modal = function(parameters) {
bind: {
events: function() {
$close
.on('click' + eventNamespace, module.event.close)
;
$window
.on('resize' + elementNamespace, module.event.resize)
;
$close.on('click' + eventNamespace, module.event.close);
$window.on('resize' + elementNamespace, module.event.resize);
}
},

15
dist/components/sidebar.css

@ -90,15 +90,20 @@
padding: 0em !important;
}
/* Inside Page */
/* Whole Page */
body.pushable {
background: #333333 !important;
}
/* Page Context */
.pushable:not(body) {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
/* Whole Page */
body.pushable {
background: #333333 !important;
.pushable:not(body) > .ui.sidebar,
.pushable:not(body) > .fixed,
.pushable:not(body) > .pusher:after {
position: absolute;
}
/*--------------

8
dist/components/sidebar.js

@ -253,7 +253,7 @@ $.fn.sidebar = function(parameters) {
if(direction === 'left' || direction === 'right') {
module.debug('Adding CSS rules for animation distance', width);
style += ''
+ ' .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);'
+ ' transform: translate3d('+ distance[direction] + 'px, 0, 0);'
+ ' }'
@ -261,7 +261,7 @@ $.fn.sidebar = function(parameters) {
}
else if(direction === 'top' || direction == 'bottom') {
style += ''
+ ' .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'
+ ' transform: translate3d(0, ' + distance[direction] + 'px, 0);'
+ ' }'
@ -269,8 +269,8 @@ $.fn.sidebar = function(parameters) {
}
/* opposite sides visible forces content overlay */
style += ''
+ ' .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'
+ ' .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'
+ ' body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'
+ ' body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'
+ ' -webkit-transform: translate3d(0px, 0, 0);'
+ ' transform: translate3d(0px, 0, 0);'
+ ' }'

2
dist/components/sidebar.min.css
File diff suppressed because it is too large
View File

2
dist/components/sidebar.min.js
File diff suppressed because it is too large
View File

2
dist/components/step.css

@ -365,7 +365,7 @@
.ui.six.steps,
.ui.seven.steps,
.ui.eight.steps {
display: block;
width: 100%;
}
.ui.one.steps > .step {
width: 100%;

2
dist/components/step.min.css
File diff suppressed because it is too large
View File

22
dist/components/tab.js

@ -77,7 +77,7 @@ $.fn.tab = function(parameters) {
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
url: (settings.path || '') + '/{$tab}'
};
}
@ -270,10 +270,10 @@ $.fn.tab = function(parameters) {
;
module.verbose('Looking for tab', tab);
if(isTab) {
module.verbose('Tab was found', tab);
module.verbose('Tab was found', tab);
// scope up
activeTabPath = currentPath;
activeTabPath = currentPath;
parameterArray = module.utilities.filterArray(pathArray, currentPathArray);
if(isLastIndex) {
@ -341,11 +341,11 @@ $.fn.tab = function(parameters) {
fetch: function(tabPath, fullTabPath) {
var
$tab = module.get.tabElement(tabPath),
apiSettings = {
dataType : 'html',
stateContext : $tab,
onSuccess : function(response) {
$tab = module.get.tabElement(tabPath),
apiSettings = {
dataType : 'html',
on : 'now',
onSuccess : function(response) {
module.cache.add(fullTabPath, response);
module.content.update(tabPath, response);
if(tabPath == activeTabPath) {
@ -360,7 +360,7 @@ $.fn.tab = function(parameters) {
},
urlData: { tab: fullTabPath }
},
request = $tab.data(metadata.promise) || false,
request = $tab.api('get request') || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
@ -369,6 +369,7 @@ $.fn.tab = function(parameters) {
fullTabPath = fullTabPath || tabPath;
cachedContent = module.cache.read(fullTabPath);
if(settings.cache && cachedContent) {
module.debug('Showing existing content', fullTabPath);
module.content.update(tabPath, cachedContent);
@ -384,7 +385,8 @@ $.fn.tab = function(parameters) {
else if($.api !== undefined) {
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
console.log(existingRequest, requestSettings, cachedContent);
$tab.api( requestSettings );
}
else {
module.error(error.api);

2
dist/components/tab.min.js
File diff suppressed because it is too large
View File

6
dist/components/transition.css

@ -81,12 +81,6 @@
}
/*******************************
Types
*******************************/
/*******************************
Transitions
*******************************/

20
dist/components/transition.js

@ -62,23 +62,28 @@ $.fn.transition = function() {
initialize: function() {
// get full settings
moduleNamespace = 'module-' + namespace;
settings = module.get.settings.apply(element, moduleArguments);
// shorthand
className = settings.className;
error = settings.error;
metadata = settings.metadata;
animationStart = module.get.animationStartEvent();
animationEnd = module.get.animationEndEvent();
animationName = module.get.animationName();
error = settings.error;
namespace = settings.namespace;
// define namespace
eventNamespace = '.' + settings.namespace;
moduleNamespace = 'module-' + settings.namespace;
instance = $module.data(moduleNamespace) || module;
// get vendor specific events
animationEnd = module.get.animationEndEvent();
animationName = module.get.animationName();
animationStart = module.get.animationStartEvent();
if(methodInvoked) {
methodInvoked = module.invoke(query);
}
// no internal method was found matching query or query not made
// method not invoked, lets run an animation
if(methodInvoked === false) {
module.verbose('Converted arguments into settings object', settings);
module.animate();
@ -88,6 +93,7 @@ $.fn.transition = function() {
instantiate: function() {
module.verbose('Storing instance of module', module);
instance = module;
$module
.data(moduleNamespace, instance)
;

2
dist/components/transition.min.js
File diff suppressed because it is too large
View File

109
dist/semantic.css

@ -765,11 +765,12 @@ input::selection {
.ui.loading.loading.loading.loading.loading.loading.button {
position: relative;
cursor: default;
point-events: none;
text-shadow: none !important;
color: transparent !important;
-webkit-transition: all 0s linear;
transition: all 0s linear;
opacity: 1;
pointer-events: none;
-webkit-transition: all 0s linear, opacity 0.2s ease;
transition: all 0s linear, opacity 0.2s ease;
}
.ui.loading.button:before {
@ -3549,10 +3550,7 @@ input::selection {
Inverted
---------------*/
.ui.divider.inverted {
color: #ffffff;
}
.ui.divider.inverted,
.ui.vertical.inverted.divider,
.ui.horizontal.inverted.divider {
color: #ffffff;
@ -3618,6 +3616,10 @@ input::selection {
*
*/
/*******************************
Flag
*******************************/
i.flag:not(.icon) {
display: inline-block;
width: 16px;
@ -3632,6 +3634,8 @@ i.flag:not(.icon) {
backface-visibility: hidden;
}
/* Sprite */
i.flag:not(.icon):before {
display: inline-block;
content: '';
@ -4923,16 +4927,32 @@ i.flag.zimbabwe:before {
font-size: 1.5em;
padding-top: 0.165em;
vertical-align: middle;
padding-right: 0.5rem;
}
/* Only One */
/* With Text Node */
.ui.header .icon:only-child {
display: inline-block;
padding: 0em;
margin-right: 0.5rem;
vertical-align: baseline;
margin-right: 0.75rem;
}
/*-------------------
Image
--------------------*/
.ui.header > .image,
.ui.header > img {
display: inline-block;
margin-top: 0.165em;
width: 2.5em;
height: auto;
vertical-align: middle;
}
.ui.header > .image:only-child,
.ui.header > img:only-child {
margin-right: 0.75rem;
}
/*--------------
@ -4944,8 +4964,18 @@ i.flag.zimbabwe:before {
vertical-align: top;
}
/* After Image */
.ui.header > img + .content,
.ui.header > .image + .content {
padding-left: 0.75rem;
vertical-align: middle;
}
/* After Icon */
.ui.header > .icon + .content {
padding-left: 0.5rem;
padding-left: 0.75rem;
display: table-cell;
vertical-align: middle;
}
@ -5957,7 +5987,7 @@ i.icon.mail.outline:before {
content: "\f003";
}
i.icon.external.link:before {
i.icon.external:before {
content: "\f08e";
}
@ -6081,7 +6111,7 @@ i.icon.ticket:before {
content: "\f145";
}
i.icon.external.link.square:before {
i.icon.external.square:before {
content: "\f14c";
}
@ -13290,7 +13320,7 @@ ol.ui.horizontal.list li:before,
.ui.six.steps,
.ui.seven.steps,
.ui.eight.steps {
display: block;
width: 100%;
}
.ui.one.steps > .step {
@ -16401,6 +16431,7 @@ ol.ui.horizontal.list li:before,
width: auto !important;
margin: 0em 0em !important;
box-shadow: none !important;
float: none !important;
padding: 1rem 1rem !important;
}
@ -16559,10 +16590,13 @@ ol.ui.horizontal.list li:before,
}
.ui.menu .menu {
font-size: 0em;
margin: 0em;
}
.ui.menu:not(.vertical) .menu {
font-size: 0em;
}
/*--------------
Colors
---------------*/
@ -17200,13 +17234,14 @@ ol.ui.horizontal.list li:before,
.ui.tabular.menu .active.item {
position: relative;
border-bottom: none;
vertical-align: bottom;
background-color: #ffffff;
color: rgba(0, 0, 0, 0.8);
border-color: #d4d4d5;
font-weight: bold;
margin-bottom: -1px;
border-bottom: none;
box-shadow: 0px 2px 0px -1px #ffffff;
box-shadow: none;
border-radius: 5px 5px 0px 0px;
}
@ -23601,7 +23636,7 @@ body.dimmed.dimmable > :not(.dimmer) {
Hidden Input
---------------*/
.ui.dropdown > input[type="hidden"],
.ui.dropdown > input:not(.search):first-child,
.ui.dropdown > select {
display: none !important;
}
@ -23897,10 +23932,12 @@ select.ui.dropdown {
.ui.selection.dropdown > .search.icon,
.ui.selection.dropdown > .delete.icon,
.ui.selection.dropdown > .dropdown.icon {
cursor: pointer;
position: absolute;
top: auto;
margin: 0em;
width: auto;
margin: -0.8em;
padding: 0.8em;
right: 1.1em;
opacity: 0.8;
-webkit-transition: opacity 0.2s ease;
@ -24010,10 +24047,6 @@ select.ui.dropdown {
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.08);
}
.ui.visible.selection.dropdown > .dropdown.icon {
opacity: 1;
}
/* Active Item */
.ui.selection.active.dropdown > .text:not(.default),
@ -24022,6 +24055,14 @@ select.ui.dropdown {
color: rgba(0, 0, 0, 0.8);
}
/* Dropdown Icon */
.ui.active.selection.dropdown > .dropdown.icon,
.ui.visible.selection.dropdown > .dropdown.icon {
opacity: 1;
z-index: 3;
}
/* Connecting Border */
.ui.active.selection.dropdown,
@ -27013,17 +27054,23 @@ a.ui.nag {
padding: 0em !important;
}
/* Inside Page */
/* Whole Page */
body.pushable {
background: #333333 !important;
}
/* Page Context */
.pushable:not(body) {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
/* Whole Page */
body.pushable {
background: #333333 !important;
.pushable:not(body) > .ui.sidebar,
.pushable:not(body) > .fixed,
.pushable:not(body) > .pusher:after {
position: absolute;
}
/*--------------
@ -28980,10 +29027,6 @@ html.ios {
animation-iteration-count: infinite;
}
/*******************************
Types
*******************************/
/*******************************
Transitions
*******************************/

112
dist/semantic.js

@ -2819,13 +2819,14 @@ $.fn.dimmer = function(parameters) {
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
$dimmer
.transition({
animation : settings.transition + ' in',
animation : settings.transition + ' in',
queue : false,
duration : module.get.duration(),
onStart : function() {
duration : module.get.duration(),
useFailSafe : true,
onStart : function() {
module.set.dimmed();
},
onComplete : function() {
onComplete : function() {
module.set.active();
callback();
}
@ -2859,13 +2860,14 @@ $.fn.dimmer = function(parameters) {
module.verbose('Hiding dimmer with css');
$dimmer
.transition({
animation : settings.transition + ' out',
queue : false,
duration : module.get.duration(),
onStart : function() {
animation : settings.transition + ' out',
queue : false,
duration : module.get.duration(),
useFailSafe : true,
onStart : function() {
module.remove.dimmed();
},
onComplete : function() {
onComplete : function() {
module.remove.active();
callback();
}
@ -3676,6 +3678,20 @@ $.fn.dropdown = function(parameters) {
}
},
forceSelection: function() {
var
$currentlySelected = $item.not(className.filtered).filter('.' + className.selected).eq(0),
$activeItem = $item.filter('.' + className.active).eq(0),
$selectedItem = ($currentlySelected.length > 0)
? $currentlySelected
: $activeItem,
hasSelected = ($selectedItem.size() > 0)
;
if(hasSelected) {
module.event.item.click.call($selectedItem);
}
},
event: {
// prevents focus callback from occuring on mousedown
mousedown: function() {
@ -3706,7 +3722,12 @@ $.fn.dropdown = function(parameters) {
pageLostFocus = (document.activeElement === this)
;
if(!itemActivated && !pageLostFocus) {
module.hide();
if(settings.forceSelection) {
module.forceSelection();
}
else {
module.hide();
}
}
},
searchTextFocus: function(event) {
@ -3918,7 +3939,9 @@ $.fn.dropdown = function(parameters) {
click: function (event) {
var
$choice = $(this),
$target = $(event.target),
$target = (event)
? $(event.target)
: $(''),
$subMenu = $choice.find(selector.menu),
text = module.get.choiceText($choice),
value = module.get.choiceValue($choice, text),
@ -4884,6 +4907,8 @@ $.fn.dropdown.settings = {
touch : 50
},
forceSelection: true,
transition : 'auto',
duration : 250,
@ -5175,12 +5200,8 @@ $.fn.modal = function(parameters) {
bind: {
events: function() {
$close
.on('click' + eventNamespace, module.event.close)
;
$window
.on('resize' + elementNamespace, module.event.resize)
;
$close.on('click' + eventNamespace, module.event.close);
$window.on('resize' + elementNamespace, module.event.resize);
}
},
@ -10892,7 +10913,7 @@ $.fn.sidebar = function(parameters) {
if(direction === 'left' || direction === 'right') {
module.debug('Adding CSS rules for animation distance', width);
style += ''
+ ' .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' -webkit-transform: translate3d('+ distance[direction] + 'px, 0, 0);'
+ ' transform: translate3d('+ distance[direction] + 'px, 0, 0);'
+ ' }'
@ -10900,7 +10921,7 @@ $.fn.sidebar = function(parameters) {
}
else if(direction === 'top' || direction == 'bottom') {
style += ''
+ ' .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher:after {'
+ ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'
+ ' transform: translate3d(0, ' + distance[direction] + 'px, 0);'
+ ' }'
@ -10908,8 +10929,8 @@ $.fn.sidebar = function(parameters) {
}
/* opposite sides visible forces content overlay */
style += ''
+ ' .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'
+ ' .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'
+ ' body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after,'
+ ' body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {'
+ ' -webkit-transform: translate3d(0px, 0, 0);'
+ ' transform: translate3d(0px, 0, 0);'
+ ' }'
@ -12577,7 +12598,7 @@ $.fn.tab = function(parameters) {
if(settings.auto) {
module.verbose('Setting up automatic tab retrieval from server');
settings.apiSettings = {
url: settings.path + '/{$tab}'
url: (settings.path || '') + '/{$tab}'
};
}
@ -12770,10 +12791,10 @@ $.fn.tab = function(parameters) {
;
module.verbose('Looking for tab', tab);
if(isTab) {
module.verbose('Tab was found', tab);
module.verbose('Tab was found', tab);
// scope up
activeTabPath = currentPath;
activeTabPath = currentPath;
parameterArray = module.utilities.filterArray(pathArray, currentPathArray);
if(isLastIndex) {
@ -12841,11 +12862,11 @@ $.fn.tab = function(parameters) {
fetch: function(tabPath, fullTabPath) {
var
$tab = module.get.tabElement(tabPath),
apiSettings = {
dataType : 'html',
stateContext : $tab,
onSuccess : function(response) {
$tab = module.get.tabElement(tabPath),
apiSettings = {
dataType : 'html',
on : 'now',
onSuccess : function(response) {
module.cache.add(fullTabPath, response);
module.content.update(tabPath, response);
if(tabPath == activeTabPath) {
@ -12860,7 +12881,7 @@ $.fn.tab = function(parameters) {
},
urlData: { tab: fullTabPath }
},
request = $tab.data(metadata.promise) || false,
request = $tab.api('get request') || false,
existingRequest = ( request && request.state() === 'pending' ),
requestSettings,
cachedContent
@ -12869,6 +12890,7 @@ $.fn.tab = function(parameters) {
fullTabPath = fullTabPath || tabPath;
cachedContent = module.cache.read(fullTabPath);
if(settings.cache && cachedContent) {
module.debug('Showing existing content', fullTabPath);
module.content.update(tabPath, cachedContent);
@ -12884,7 +12906,8 @@ $.fn.tab = function(parameters) {
else if($.api !== undefined) {
requestSettings = $.extend(true, { headers: { 'X-Remote': true } }, settings.apiSettings, apiSettings);
module.debug('Retrieving remote content', fullTabPath, requestSettings);
$.api( requestSettings );
console.log(existingRequest, requestSettings, cachedContent);
$tab.api( requestSettings );
}
else {
module.error(error.api);
@ -13349,23 +13372,28 @@ $.fn.transition = function() {
initialize: function() {
// get full settings
moduleNamespace = 'module-' + namespace;
settings = module.get.settings.apply(element, moduleArguments);
// shorthand
className = settings.className;
error = settings.error;
metadata = settings.metadata;
animationStart = module.get.animationStartEvent();
animationEnd = module.get.animationEndEvent();
animationName = module.get.animationName();
error = settings.error;
namespace = settings.namespace;
// define namespace
eventNamespace = '.' + settings.namespace;
moduleNamespace = 'module-' + settings.namespace;
instance = $module.data(moduleNamespace) || module;
// get vendor specific events
animationEnd = module.get.animationEndEvent();
animationName = module.get.animationName();
animationStart = module.get.animationStartEvent();
if(methodInvoked) {
methodInvoked = module.invoke(query);
}
// no internal method was found matching query or query not made
// method not invoked, lets run an animation
if(methodInvoked === false) {
module.verbose('Converted arguments into settings object', settings);
module.animate();
@ -13375,6 +13403,7 @@ $.fn.transition = function() {
instantiate: function() {
module.verbose('Storing instance of module', module);
instance = module;
$module
.data(moduleNamespace, instance)
;
@ -14951,13 +14980,15 @@ $.api = $.fn.api = function(parameters) {
// throttle additional requests
module.timer = setTimeout(function() {
module.request = module.create.request();
module.xhr = module.create.xhr();
module.xhr = module.create.xhr();
settings.onRequest.call(context, module.request, module.xhr);
}, settings.throttle);
}
else {
// immediately on first request
module.request = module.create.request();
module.xhr = module.create.xhr();
module.xhr = module.create.xhr();
settings.onRequest.call(context, module.request, module.xhr);
}
},
@ -15564,6 +15595,7 @@ $.api.settings = {
beforeSend : function(settings) { return settings; },
beforeXHR : function(xhr) {},
onRequest : function(promise, xhr) {},
onSuccess : function(response, $module) {},
onComplete : function(response, $module) {},
onFailure : function(errorMessage, $module) {},

2
dist/semantic.min.css
File diff suppressed because it is too large
View File

12
dist/semantic.min.js
File diff suppressed because it is too large
View File

BIN
dist/themes/default/assets/images/flags.png

Before After
Width: 124  |  Height: 2014  |  Size: 142 KiB Width: 124  |  Height: 2014  |  Size: 28 KiB
Loading…
Cancel
Save