semantic-ui-sass 1.8.1.0 → 1.11.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/assets/fonts/semantic-ui/icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/icons.otf +0 -0
- data/app/assets/fonts/semantic-ui/icons.svg +526 -465
- data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/icons.woff +0 -0
- data/app/assets/javascripts/semantic-ui/accordion.js +63 -43
- data/app/assets/javascripts/semantic-ui/api.js +38 -18
- data/app/assets/javascripts/semantic-ui/checkbox.js +6 -4
- data/app/assets/javascripts/semantic-ui/colorize.js +3 -3
- data/app/assets/javascripts/semantic-ui/dimmer.js +57 -15
- data/app/assets/javascripts/semantic-ui/dropdown.js +65 -27
- data/app/assets/javascripts/semantic-ui/form.js +108 -29
- data/app/assets/javascripts/semantic-ui/modal.js +31 -31
- data/app/assets/javascripts/semantic-ui/nag.js +4 -4
- data/app/assets/javascripts/semantic-ui/popup.js +74 -37
- data/app/assets/javascripts/semantic-ui/progress.js +4 -4
- data/app/assets/javascripts/semantic-ui/rating.js +4 -4
- data/app/assets/javascripts/semantic-ui/search.js +67 -26
- data/app/assets/javascripts/semantic-ui/shape.js +4 -4
- data/app/assets/javascripts/semantic-ui/sidebar.js +22 -17
- data/app/assets/javascripts/semantic-ui/site.js +3 -3
- data/app/assets/javascripts/semantic-ui/state.js +30 -25
- data/app/assets/javascripts/semantic-ui/sticky.js +89 -72
- data/app/assets/javascripts/semantic-ui/tab.js +37 -22
- data/app/assets/javascripts/semantic-ui/transition.js +163 -61
- data/app/assets/javascripts/semantic-ui/video.js +4 -4
- data/app/assets/javascripts/semantic-ui/visibility.js +186 -124
- data/app/assets/javascripts/semantic-ui/visit.js +6 -4
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +6 -7
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +56 -40
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +100 -45
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +28 -16
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +8 -7
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +11 -11
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +5 -8
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +11 -4
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +34 -10
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +391 -51
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +18 -5
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +33 -49
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +47 -14
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +7 -8
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +10 -5
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +5 -6
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +52 -7
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +5 -6
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +20 -7
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +5 -6
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +31 -13
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +9 -8
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +21 -9
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +6 -17
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +15 -11
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +161 -323
- data/app/assets/stylesheets/semantic-ui/modules/_video.scss +4 -5
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +5 -6
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +202 -51
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +5 -6
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +5 -6
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +10 -12
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +5 -6
- data/lib/semantic/ui/sass/version.rb +2 -2
- metadata +3 -4
Binary file
|
Binary file
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
2
|
-
* # Semantic - Accordion
|
1
|
+
/*!
|
2
|
+
* # Semantic UI - Accordion
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2014
|
6
|
+
* Copyright 2014 Contributors
|
7
7
|
* Released under the MIT license
|
8
8
|
* http://opensource.org/licenses/MIT
|
9
9
|
*
|
@@ -61,10 +61,8 @@ $.fn.accordion = function(parameters) {
|
|
61
61
|
module = {
|
62
62
|
|
63
63
|
initialize: function() {
|
64
|
-
module.debug('Initializing
|
65
|
-
|
66
|
-
.on('click' + eventNamespace, selector.title, module.event.click)
|
67
|
-
;
|
64
|
+
module.debug('Initializing', $module);
|
65
|
+
module.bind.events();
|
68
66
|
module.observeChanges();
|
69
67
|
module.instantiate();
|
70
68
|
},
|
@@ -77,12 +75,10 @@ $.fn.accordion = function(parameters) {
|
|
77
75
|
},
|
78
76
|
|
79
77
|
destroy: function() {
|
80
|
-
module.debug('Destroying previous
|
78
|
+
module.debug('Destroying previous instance', $module);
|
81
79
|
$module
|
82
|
-
.removeData(moduleNamespace)
|
83
|
-
;
|
84
|
-
$title
|
85
80
|
.off(eventNamespace)
|
81
|
+
.removeData(moduleNamespace)
|
86
82
|
;
|
87
83
|
},
|
88
84
|
|
@@ -105,6 +101,14 @@ $.fn.accordion = function(parameters) {
|
|
105
101
|
}
|
106
102
|
},
|
107
103
|
|
104
|
+
bind: {
|
105
|
+
events: function() {
|
106
|
+
module.debug('Binding delegated events');
|
107
|
+
$module
|
108
|
+
.on('click' + eventNamespace, selector.trigger, module.event.click)
|
109
|
+
;
|
110
|
+
}
|
111
|
+
},
|
108
112
|
|
109
113
|
event: {
|
110
114
|
click: function() {
|
@@ -117,13 +121,16 @@ $.fn.accordion = function(parameters) {
|
|
117
121
|
$activeTitle = (query !== undefined)
|
118
122
|
? (typeof query === 'number')
|
119
123
|
? $title.eq(query)
|
120
|
-
: $(query)
|
121
|
-
: $(this),
|
124
|
+
: $(query).closest(selector.title)
|
125
|
+
: $(this).closest(selector.title),
|
122
126
|
$activeContent = $activeTitle.next($content),
|
123
|
-
|
127
|
+
isAnimating = $activeContent.hasClass(className.animating),
|
128
|
+
isActive = $activeContent.hasClass(className.active),
|
129
|
+
isOpen = (isActive && !isAnimating),
|
130
|
+
isOpening = (!isActive && isAnimating)
|
124
131
|
;
|
125
132
|
module.debug('Toggling visibility of content', $activeTitle);
|
126
|
-
if(
|
133
|
+
if(isOpen || isOpening) {
|
127
134
|
if(settings.collapsible) {
|
128
135
|
module.close.call($activeTitle);
|
129
136
|
}
|
@@ -132,7 +139,7 @@ $.fn.accordion = function(parameters) {
|
|
132
139
|
}
|
133
140
|
}
|
134
141
|
else {
|
135
|
-
|
142
|
+
module.open.call($activeTitle);
|
136
143
|
}
|
137
144
|
},
|
138
145
|
|
@@ -141,13 +148,14 @@ $.fn.accordion = function(parameters) {
|
|
141
148
|
$activeTitle = (query !== undefined)
|
142
149
|
? (typeof query === 'number')
|
143
150
|
? $title.eq(query)
|
144
|
-
: $(query)
|
145
|
-
: $(this),
|
146
|
-
$activeContent
|
147
|
-
|
148
|
-
|
151
|
+
: $(query).closest(selector.title)
|
152
|
+
: $(this).closest(selector.title),
|
153
|
+
$activeContent = $activeTitle.next($content),
|
154
|
+
isAnimating = $activeContent.hasClass(className.animating),
|
155
|
+
isActive = $activeContent.hasClass(className.active),
|
156
|
+
isUnopen = (!isActive && !isAnimating)
|
149
157
|
;
|
150
|
-
if(
|
158
|
+
if(isUnopen) {
|
151
159
|
module.debug('Opening accordion content', $activeTitle);
|
152
160
|
if(settings.exclusive) {
|
153
161
|
module.closeOthers.call($activeTitle);
|
@@ -155,23 +163,25 @@ $.fn.accordion = function(parameters) {
|
|
155
163
|
$activeTitle
|
156
164
|
.addClass(className.active)
|
157
165
|
;
|
166
|
+
$activeContent.addClass(className.animating);
|
158
167
|
if(settings.animateChildren) {
|
159
168
|
if($.fn.transition !== undefined && $module.transition('is supported')) {
|
160
169
|
$activeContent
|
161
170
|
.children()
|
162
171
|
.transition({
|
163
|
-
animation
|
172
|
+
animation : 'fade in',
|
173
|
+
queue : false,
|
164
174
|
useFailSafe : true,
|
165
|
-
debug
|
166
|
-
verbose
|
167
|
-
duration
|
175
|
+
debug : settings.debug,
|
176
|
+
verbose : settings.verbose,
|
177
|
+
duration : settings.duration
|
168
178
|
})
|
169
179
|
;
|
170
180
|
}
|
171
181
|
else {
|
172
182
|
$activeContent
|
173
183
|
.children()
|
174
|
-
.stop()
|
184
|
+
.stop(true)
|
175
185
|
.animate({
|
176
186
|
opacity: 1
|
177
187
|
}, settings.duration, module.resetOpacity)
|
@@ -179,9 +189,10 @@ $.fn.accordion = function(parameters) {
|
|
179
189
|
}
|
180
190
|
}
|
181
191
|
$activeContent
|
182
|
-
.stop()
|
192
|
+
.stop(true)
|
183
193
|
.slideDown(settings.duration, settings.easing, function() {
|
184
194
|
$activeContent
|
195
|
+
.removeClass(className.animating)
|
185
196
|
.addClass(className.active)
|
186
197
|
;
|
187
198
|
module.reset.display.call(this);
|
@@ -197,19 +208,21 @@ $.fn.accordion = function(parameters) {
|
|
197
208
|
$activeTitle = (query !== undefined)
|
198
209
|
? (typeof query === 'number')
|
199
210
|
? $title.eq(query)
|
200
|
-
: $(query)
|
201
|
-
: $(this),
|
211
|
+
: $(query).closest(selector.title)
|
212
|
+
: $(this).closest(selector.title),
|
202
213
|
$activeContent = $activeTitle.next($content),
|
203
|
-
|
214
|
+
isAnimating = $activeContent.hasClass(className.animating),
|
215
|
+
isActive = $activeContent.hasClass(className.active),
|
216
|
+
isOpening = (!isActive && isAnimating),
|
217
|
+
isClosing = (isActive && isAnimating)
|
204
218
|
;
|
205
|
-
if(isActive) {
|
219
|
+
if((isActive || isOpening) && !isClosing) {
|
206
220
|
module.debug('Closing accordion content', $activeContent);
|
207
221
|
$activeTitle
|
208
222
|
.removeClass(className.active)
|
209
223
|
;
|
210
224
|
$activeContent
|
211
|
-
.
|
212
|
-
.show()
|
225
|
+
.addClass(className.animating)
|
213
226
|
;
|
214
227
|
if(settings.animateChildren) {
|
215
228
|
if($.fn.transition !== undefined && $module.transition('is supported')) {
|
@@ -217,6 +230,7 @@ $.fn.accordion = function(parameters) {
|
|
217
230
|
.children()
|
218
231
|
.transition({
|
219
232
|
animation : 'fade out',
|
233
|
+
queue : false,
|
220
234
|
useFailSafe : true,
|
221
235
|
debug : settings.debug,
|
222
236
|
verbose : settings.verbose,
|
@@ -227,7 +241,7 @@ $.fn.accordion = function(parameters) {
|
|
227
241
|
else {
|
228
242
|
$activeContent
|
229
243
|
.children()
|
230
|
-
.stop()
|
244
|
+
.stop(true)
|
231
245
|
.animate({
|
232
246
|
opacity: 0
|
233
247
|
}, settings.duration, module.resetOpacity)
|
@@ -235,8 +249,12 @@ $.fn.accordion = function(parameters) {
|
|
235
249
|
}
|
236
250
|
}
|
237
251
|
$activeContent
|
238
|
-
.stop()
|
252
|
+
.stop(true)
|
239
253
|
.slideUp(settings.duration, settings.easing, function() {
|
254
|
+
$activeContent
|
255
|
+
.removeClass(className.animating)
|
256
|
+
.removeClass(className.active)
|
257
|
+
;
|
240
258
|
module.reset.display.call(this);
|
241
259
|
settings.onClose.call(this);
|
242
260
|
settings.onChange.call(this);
|
@@ -249,7 +267,7 @@ $.fn.accordion = function(parameters) {
|
|
249
267
|
var
|
250
268
|
$activeTitle = (index !== undefined)
|
251
269
|
? $title.eq(index)
|
252
|
-
: $(this),
|
270
|
+
: $(this).closest(selector.title),
|
253
271
|
$parentTitles = $activeTitle.parents(selector.content).prev(selector.title),
|
254
272
|
$activeAccordion = $activeTitle.closest(selector.accordion),
|
255
273
|
activeSelector = selector.title + '.' + className.active + ':visible',
|
@@ -498,7 +516,7 @@ $.fn.accordion = function(parameters) {
|
|
498
516
|
}
|
499
517
|
else {
|
500
518
|
if(instance !== undefined) {
|
501
|
-
|
519
|
+
instance.invoke('destroy');
|
502
520
|
}
|
503
521
|
module.initialize();
|
504
522
|
}
|
@@ -524,8 +542,8 @@ $.fn.accordion.settings = {
|
|
524
542
|
closeNested : false,
|
525
543
|
animateChildren : true,
|
526
544
|
|
527
|
-
duration :
|
528
|
-
easing : '
|
545
|
+
duration : 350,
|
546
|
+
easing : 'easeOutQuad',
|
529
547
|
|
530
548
|
onOpen : function(){},
|
531
549
|
onClose : function(){},
|
@@ -536,12 +554,14 @@ $.fn.accordion.settings = {
|
|
536
554
|
},
|
537
555
|
|
538
556
|
className : {
|
539
|
-
active
|
557
|
+
active : 'active',
|
558
|
+
animating : 'animating'
|
540
559
|
},
|
541
560
|
|
542
561
|
selector : {
|
543
562
|
accordion : '.accordion',
|
544
563
|
title : '.title',
|
564
|
+
trigger : '.title',
|
545
565
|
content : '.content'
|
546
566
|
}
|
547
567
|
|
@@ -549,8 +569,8 @@ $.fn.accordion.settings = {
|
|
549
569
|
|
550
570
|
// Adds easing
|
551
571
|
$.extend( $.easing, {
|
552
|
-
|
553
|
-
return c*(
|
572
|
+
easeOutQuad: function (x, t, b, c, d) {
|
573
|
+
return -c *(t/=d)*(t-2) + b;
|
554
574
|
}
|
555
575
|
});
|
556
576
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
2
|
-
* # Semantic - API
|
1
|
+
/*!
|
2
|
+
* # Semantic UI - API
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2014
|
6
|
+
* Copyright 2014 Contributors
|
7
7
|
* Released under the MIT license
|
8
8
|
* http://opensource.org/licenses/MIT
|
9
9
|
*
|
@@ -11,6 +11,8 @@
|
|
11
11
|
|
12
12
|
;(function ( $, window, document, undefined ) {
|
13
13
|
|
14
|
+
"use strict";
|
15
|
+
|
14
16
|
$.api = $.fn.api = function(parameters) {
|
15
17
|
|
16
18
|
var
|
@@ -135,13 +137,17 @@ $.api = $.fn.api = function(parameters) {
|
|
135
137
|
}
|
136
138
|
|
137
139
|
// call beforesend and get any settings changes
|
138
|
-
requestSettings
|
140
|
+
requestSettings = module.get.settings();
|
139
141
|
|
140
|
-
// check if
|
142
|
+
// check if before send cancelled request
|
141
143
|
if(requestSettings === false) {
|
144
|
+
module.cancelled = true;
|
142
145
|
module.error(error.beforeSend);
|
143
146
|
return;
|
144
147
|
}
|
148
|
+
else {
|
149
|
+
module.cancelled = false;
|
150
|
+
}
|
145
151
|
|
146
152
|
if(settings.url) {
|
147
153
|
// override with url if specified
|
@@ -156,9 +162,9 @@ $.api = $.fn.api = function(parameters) {
|
|
156
162
|
|
157
163
|
// exit conditions reached, missing url parameters
|
158
164
|
if( !url ) {
|
159
|
-
if(
|
160
|
-
module.
|
161
|
-
|
165
|
+
if( module.is.form() ) {
|
166
|
+
url = $module.attr('action') || '';
|
167
|
+
module.debug('No url or action specified, defaulting to form action', url);
|
162
168
|
}
|
163
169
|
else {
|
164
170
|
module.error(error.missingURL, settings.action);
|
@@ -180,19 +186,23 @@ $.api = $.fn.api = function(parameters) {
|
|
180
186
|
complete : function() {}
|
181
187
|
});
|
182
188
|
|
183
|
-
module.
|
189
|
+
module.debug('Querying URL', ajaxSettings.url);
|
190
|
+
module.debug('Sending data', data, ajaxSettings.method);
|
191
|
+
module.verbose('Using AJAX settings', ajaxSettings);
|
184
192
|
|
185
193
|
if( module.is.loading() ) {
|
186
194
|
// throttle additional requests
|
187
195
|
module.timer = setTimeout(function() {
|
188
196
|
module.request = module.create.request();
|
189
|
-
module.xhr
|
197
|
+
module.xhr = module.create.xhr();
|
198
|
+
settings.onRequest.call(context, module.request, module.xhr);
|
190
199
|
}, settings.throttle);
|
191
200
|
}
|
192
201
|
else {
|
193
202
|
// immediately on first request
|
194
203
|
module.request = module.create.request();
|
195
|
-
module.xhr
|
204
|
+
module.xhr = module.create.xhr();
|
205
|
+
settings.onRequest.call(context, module.request, module.xhr);
|
196
206
|
}
|
197
207
|
|
198
208
|
},
|
@@ -202,12 +212,21 @@ $.api = $.fn.api = function(parameters) {
|
|
202
212
|
disabled: function() {
|
203
213
|
return ($module.filter(settings.filter).length > 0);
|
204
214
|
},
|
215
|
+
form: function() {
|
216
|
+
return $module.is('form');
|
217
|
+
},
|
218
|
+
input: function() {
|
219
|
+
return $module.is('input');
|
220
|
+
},
|
205
221
|
loading: function() {
|
206
222
|
return (module.request && module.request.state() == 'pending');
|
207
223
|
}
|
208
224
|
},
|
209
225
|
|
210
226
|
was: {
|
227
|
+
cancelled: function() {
|
228
|
+
return (module.cancelled || false);
|
229
|
+
},
|
211
230
|
succesful: function() {
|
212
231
|
return (module.request && module.request.state() == 'resolved');
|
213
232
|
},
|
@@ -381,7 +400,7 @@ $.api = $.fn.api = function(parameters) {
|
|
381
400
|
|
382
401
|
// if http status code returned and json returned error, look for it
|
383
402
|
if( xhr.status != 200 && httpMessage !== undefined && httpMessage !== '') {
|
384
|
-
module.error(error.statusMessage + httpMessage);
|
403
|
+
module.error(error.statusMessage + httpMessage, ajaxSettings.url);
|
385
404
|
}
|
386
405
|
else {
|
387
406
|
if(status == 'error' && settings.dataType == 'json') {
|
@@ -495,10 +514,10 @@ $.api = $.fn.api = function(parameters) {
|
|
495
514
|
data = {}
|
496
515
|
;
|
497
516
|
if( !$.isWindow(element) ) {
|
498
|
-
if(
|
517
|
+
if( module.is.input() ) {
|
499
518
|
data.value = $module.val();
|
500
519
|
}
|
501
|
-
else if(
|
520
|
+
else if( !module.is.form() ) {
|
502
521
|
|
503
522
|
}
|
504
523
|
else {
|
@@ -536,7 +555,7 @@ $.api = $.fn.api = function(parameters) {
|
|
536
555
|
var
|
537
556
|
formData
|
538
557
|
;
|
539
|
-
if($
|
558
|
+
if($module.serializeObject !== undefined) {
|
540
559
|
formData = $form.serializeObject();
|
541
560
|
}
|
542
561
|
else {
|
@@ -557,7 +576,7 @@ $.api = $.fn.api = function(parameters) {
|
|
557
576
|
url = settings.api[action];
|
558
577
|
module.debug('Found template url', url);
|
559
578
|
}
|
560
|
-
else {
|
579
|
+
else if( !module.is.form() ) {
|
561
580
|
module.error(error.missingAction, settings.action, settings.api);
|
562
581
|
}
|
563
582
|
}
|
@@ -746,7 +765,7 @@ $.api = $.fn.api = function(parameters) {
|
|
746
765
|
}
|
747
766
|
else {
|
748
767
|
if(instance !== undefined) {
|
749
|
-
|
768
|
+
instance.invoke('destroy');
|
750
769
|
}
|
751
770
|
module.initialize();
|
752
771
|
}
|
@@ -765,7 +784,7 @@ $.api.settings = {
|
|
765
784
|
namespace : 'api',
|
766
785
|
|
767
786
|
debug : true,
|
768
|
-
verbose :
|
787
|
+
verbose : false,
|
769
788
|
performance : true,
|
770
789
|
|
771
790
|
// event binding
|
@@ -799,6 +818,7 @@ $.api.settings = {
|
|
799
818
|
beforeSend : function(settings) { return settings; },
|
800
819
|
beforeXHR : function(xhr) {},
|
801
820
|
|
821
|
+
onRequest : function(promise, xhr) {},
|
802
822
|
onSuccess : function(response, $module) {},
|
803
823
|
onComplete : function(response, $module) {},
|
804
824
|
onFailure : function(errorMessage, $module) {},
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
2
|
-
* # Semantic - Checkbox
|
1
|
+
/*!
|
2
|
+
* # Semantic UI - Checkbox
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2014
|
6
|
+
* Copyright 2014 Contributors
|
7
7
|
* Released under the MIT license
|
8
8
|
* http://opensource.org/licenses/MIT
|
9
9
|
*
|
@@ -261,6 +261,7 @@ $.fn.checkbox = function(parameters) {
|
|
261
261
|
.trigger('change')
|
262
262
|
;
|
263
263
|
module.set.checked();
|
264
|
+
$input.trigger('blur');
|
264
265
|
settings.onChange.call($input.get());
|
265
266
|
settings.onChecked.call($input.get());
|
266
267
|
},
|
@@ -272,6 +273,7 @@ $.fn.checkbox = function(parameters) {
|
|
272
273
|
.trigger('change')
|
273
274
|
;
|
274
275
|
module.remove.checked();
|
276
|
+
$input.trigger('blur');
|
275
277
|
settings.onChange.call($input.get());
|
276
278
|
settings.onUnchecked.call($input.get());
|
277
279
|
},
|
@@ -454,7 +456,7 @@ $.fn.checkbox = function(parameters) {
|
|
454
456
|
}
|
455
457
|
else {
|
456
458
|
if(instance !== undefined) {
|
457
|
-
|
459
|
+
instance.invoke('destroy');
|
458
460
|
}
|
459
461
|
module.initialize();
|
460
462
|
}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
2
|
-
* # Semantic - Colorize
|
1
|
+
/*!
|
2
|
+
* # Semantic UI - Colorize
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2014
|
6
|
+
* Copyright 2014 Contributors
|
7
7
|
* Released under the MIT license
|
8
8
|
* http://opensource.org/licenses/MIT
|
9
9
|
*
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
2
|
-
* # Semantic - Dimmer
|
1
|
+
/*!
|
2
|
+
* # Semantic UI - Dimmer
|
3
3
|
* http://github.com/semantic-org/semantic-ui/
|
4
4
|
*
|
5
5
|
*
|
6
|
-
* Copyright 2014
|
6
|
+
* Copyright 2014 Contributors
|
7
7
|
* Released under the MIT license
|
8
8
|
* http://opensource.org/licenses/MIT
|
9
9
|
*
|
@@ -11,6 +11,8 @@
|
|
11
11
|
|
12
12
|
;(function ( $, window, document, undefined ) {
|
13
13
|
|
14
|
+
"use strict";
|
15
|
+
|
14
16
|
$.fn.dimmer = function(parameters) {
|
15
17
|
var
|
16
18
|
$allModules = $(this),
|
@@ -213,15 +215,19 @@ $.fn.dimmer = function(parameters) {
|
|
213
215
|
: function(){}
|
214
216
|
;
|
215
217
|
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
|
218
|
+
if(settings.opacity !== 'auto') {
|
219
|
+
module.set.opacity();
|
220
|
+
}
|
216
221
|
$dimmer
|
217
222
|
.transition({
|
218
|
-
animation
|
223
|
+
animation : settings.transition + ' in',
|
219
224
|
queue : false,
|
220
|
-
duration
|
221
|
-
|
225
|
+
duration : module.get.duration(),
|
226
|
+
useFailSafe : true,
|
227
|
+
onStart : function() {
|
222
228
|
module.set.dimmed();
|
223
229
|
},
|
224
|
-
onComplete
|
230
|
+
onComplete : function() {
|
225
231
|
module.set.active();
|
226
232
|
callback();
|
227
233
|
}
|
@@ -231,6 +237,9 @@ $.fn.dimmer = function(parameters) {
|
|
231
237
|
else {
|
232
238
|
module.verbose('Showing dimmer animation with javascript');
|
233
239
|
module.set.dimmed();
|
240
|
+
if(settings.opacity == 'auto') {
|
241
|
+
settings.opacity = 0.8;
|
242
|
+
}
|
234
243
|
$dimmer
|
235
244
|
.stop()
|
236
245
|
.css({
|
@@ -238,7 +247,7 @@ $.fn.dimmer = function(parameters) {
|
|
238
247
|
width : '100%',
|
239
248
|
height : '100%'
|
240
249
|
})
|
241
|
-
.fadeTo(module.get.duration(),
|
250
|
+
.fadeTo(module.get.duration(), settings.opacity, function() {
|
242
251
|
$dimmer.removeAttr('style');
|
243
252
|
module.set.active();
|
244
253
|
callback();
|
@@ -255,13 +264,14 @@ $.fn.dimmer = function(parameters) {
|
|
255
264
|
module.verbose('Hiding dimmer with css');
|
256
265
|
$dimmer
|
257
266
|
.transition({
|
258
|
-
animation
|
259
|
-
queue
|
260
|
-
duration
|
261
|
-
|
267
|
+
animation : settings.transition + ' out',
|
268
|
+
queue : false,
|
269
|
+
duration : module.get.duration(),
|
270
|
+
useFailSafe : true,
|
271
|
+
onStart : function() {
|
262
272
|
module.remove.dimmed();
|
263
273
|
},
|
264
|
-
onComplete
|
274
|
+
onComplete : function() {
|
265
275
|
module.remove.active();
|
266
276
|
callback();
|
267
277
|
}
|
@@ -357,6 +367,23 @@ $.fn.dimmer = function(parameters) {
|
|
357
367
|
},
|
358
368
|
|
359
369
|
set: {
|
370
|
+
opacity: function(opacity) {
|
371
|
+
var
|
372
|
+
opacity = settings.opacity || opacity,
|
373
|
+
color = $dimmer.css('background-color'),
|
374
|
+
colorArray = color.split(','),
|
375
|
+
isRGBA = (colorArray && colorArray.length == 4)
|
376
|
+
;
|
377
|
+
if(isRGBA) {
|
378
|
+
colorArray[3] = opacity + ')';
|
379
|
+
color = colorArray.join(',');
|
380
|
+
}
|
381
|
+
else {
|
382
|
+
color = 'rgba(0, 0, 0, ' + opacity + ')';
|
383
|
+
}
|
384
|
+
module.debug('Setting opacity to', opacity);
|
385
|
+
$dimmer.css('background-color', color);
|
386
|
+
},
|
360
387
|
active: function() {
|
361
388
|
$dimmer.addClass(className.active);
|
362
389
|
},
|
@@ -557,7 +584,7 @@ $.fn.dimmer = function(parameters) {
|
|
557
584
|
}
|
558
585
|
else {
|
559
586
|
if(instance !== undefined) {
|
560
|
-
|
587
|
+
instance.invoke('destroy');
|
561
588
|
}
|
562
589
|
module.initialize();
|
563
590
|
}
|
@@ -579,13 +606,28 @@ $.fn.dimmer.settings = {
|
|
579
606
|
verbose : true,
|
580
607
|
performance : true,
|
581
608
|
|
609
|
+
// name to distinguish between multiple dimmers in context
|
582
610
|
dimmerName : false,
|
611
|
+
|
612
|
+
// whether to add a variation type
|
583
613
|
variation : false,
|
614
|
+
|
615
|
+
// whether to bind close events
|
584
616
|
closable : 'auto',
|
585
|
-
|
617
|
+
|
618
|
+
// whether to use css animations
|
586
619
|
useCSS : true,
|
620
|
+
|
621
|
+
// css animation to use
|
622
|
+
transition : 'fade',
|
623
|
+
|
624
|
+
// event to bind to
|
587
625
|
on : false,
|
588
626
|
|
627
|
+
// overriding opacity value
|
628
|
+
opacity : 'auto',
|
629
|
+
|
630
|
+
// transition durations
|
589
631
|
duration : {
|
590
632
|
show : 500,
|
591
633
|
hide : 500
|