semantic-ui-sass 0.0.3 → 0.8.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -1
  3. data/.rspec +1 -0
  4. data/CHANGELOG.md +8 -0
  5. data/README.md +26 -1
  6. data/app/assets/javascripts/semantic-ui/accordion.js +15 -17
  7. data/app/assets/javascripts/semantic-ui/behavior/api.js +18 -22
  8. data/app/assets/javascripts/semantic-ui/behavior/form.js +18 -24
  9. data/app/assets/javascripts/semantic-ui/behavior/state.js +8 -8
  10. data/app/assets/javascripts/semantic-ui/chatroom.js +18 -14
  11. data/app/assets/javascripts/semantic-ui/checkbox.js +26 -24
  12. data/app/assets/javascripts/semantic-ui/dimmer.js +74 -47
  13. data/app/assets/javascripts/semantic-ui/dropdown.js +226 -153
  14. data/app/assets/javascripts/semantic-ui/modal.js +73 -46
  15. data/app/assets/javascripts/semantic-ui/nag.js +13 -16
  16. data/app/assets/javascripts/semantic-ui/popup.js +352 -263
  17. data/app/assets/javascripts/semantic-ui/rating.js +29 -26
  18. data/app/assets/javascripts/semantic-ui/search.js +18 -24
  19. data/app/assets/javascripts/semantic-ui/shape.js +182 -173
  20. data/app/assets/javascripts/semantic-ui/sidebar.js +66 -43
  21. data/app/assets/javascripts/semantic-ui/tab.js +49 -31
  22. data/app/assets/javascripts/semantic-ui/transition.js +24 -24
  23. data/app/assets/javascripts/semantic-ui/video.js +26 -24
  24. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +1 -1
  25. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +85 -37
  26. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +6 -7
  27. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +76 -23
  28. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +415 -241
  29. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +1 -1
  30. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +26 -24
  31. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +8 -13
  32. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +87 -5
  33. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +7 -9
  34. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +1 -2
  35. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +17 -21
  36. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +4 -27
  37. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +44 -30
  38. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +68 -9
  39. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +26 -26
  40. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +1 -1
  41. data/app/assets/stylesheets/semantic-ui/modules/_reveal.scss +1 -1
  42. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +81 -7
  43. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +129 -28
  44. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +12 -10
  45. data/app/assets/stylesheets/semantic-ui/views/_item.scss +0 -10
  46. data/app/assets/stylesheets/semantic-ui/views/_list.scss +6 -6
  47. data/app/helpers/semantic_flash_helper.rb +22 -0
  48. data/app/helpers/semantic_icon_helper.rb +5 -0
  49. data/lib/semantic/ui/sass/version.rb +2 -2
  50. data/semantic-ui-sass.gemspec +3 -0
  51. data/spec/dummy/README.rdoc +28 -0
  52. data/spec/dummy/Rakefile +6 -0
  53. data/spec/dummy/app/assets/images/.keep +0 -0
  54. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  55. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  56. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  57. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  58. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  59. data/spec/dummy/app/mailers/.keep +0 -0
  60. data/spec/dummy/app/models/.keep +0 -0
  61. data/spec/dummy/app/models/concerns/.keep +0 -0
  62. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  63. data/spec/dummy/bin/bundle +3 -0
  64. data/spec/dummy/bin/rails +4 -0
  65. data/spec/dummy/bin/rake +4 -0
  66. data/spec/dummy/config.ru +4 -0
  67. data/spec/dummy/config/application.rb +28 -0
  68. data/spec/dummy/config/boot.rb +5 -0
  69. data/spec/dummy/config/database.yml +25 -0
  70. data/spec/dummy/config/environment.rb +5 -0
  71. data/spec/dummy/config/environments/development.rb +29 -0
  72. data/spec/dummy/config/environments/production.rb +80 -0
  73. data/spec/dummy/config/environments/test.rb +36 -0
  74. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  75. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  76. data/spec/dummy/config/initializers/inflections.rb +16 -0
  77. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  78. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  79. data/spec/dummy/config/initializers/session_store.rb +3 -0
  80. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  81. data/spec/dummy/config/locales/en.yml +23 -0
  82. data/spec/dummy/config/routes.rb +2 -0
  83. data/spec/dummy/lib/assets/.keep +0 -0
  84. data/spec/dummy/log/.keep +0 -0
  85. data/spec/dummy/public/404.html +58 -0
  86. data/spec/dummy/public/422.html +58 -0
  87. data/spec/dummy/public/500.html +57 -0
  88. data/spec/dummy/public/favicon.ico +0 -0
  89. data/spec/helpers/semantic_flash_helper_spec.rb +33 -0
  90. data/spec/helpers/semantic_icon_helper_spec.rb +20 -0
  91. data/spec/spec_helper.rb +8 -0
  92. metadata +132 -4
@@ -22,12 +22,14 @@ $.fn.rating = function(parameters) {
22
22
  query = arguments[0],
23
23
  methodInvoked = (typeof query == 'string'),
24
24
  queryArguments = [].slice.call(arguments, 1),
25
- invokedResponse
25
+ returnedValue
26
26
  ;
27
27
  $allModules
28
28
  .each(function() {
29
29
  var
30
- settings = $.extend(true, {}, $.fn.rating.settings, parameters),
30
+ settings = ( $.isPlainObject(parameters) )
31
+ ? $.extend(true, {}, $.fn.rating.settings, parameters)
32
+ : $.extend({}, $.fn.rating.settings),
31
33
 
32
34
  namespace = settings.namespace,
33
35
  className = settings.className,
@@ -38,11 +40,12 @@ $.fn.rating = function(parameters) {
38
40
  eventNamespace = '.' + namespace,
39
41
  moduleNamespace = 'module-' + namespace,
40
42
 
43
+ element = this,
44
+ instance = $(this).data(moduleNamespace),
45
+
41
46
  $module = $(this),
42
47
  $icon = $module.find(selector.icon),
43
48
 
44
- element = this,
45
- instance = $module.data(moduleNamespace),
46
49
  module
47
50
  ;
48
51
 
@@ -71,12 +74,14 @@ $.fn.rating = function(parameters) {
71
74
 
72
75
  instantiate: function() {
73
76
  module.verbose('Instantiating module', settings);
77
+ instance = module;
74
78
  $module
75
79
  .data(moduleNamespace, module)
76
80
  ;
77
81
  },
78
82
 
79
83
  destroy: function() {
84
+ module.verbose('Destroying previous instance', instance);
80
85
  $module
81
86
  .removeData(moduleNamespace)
82
87
  ;
@@ -187,26 +192,22 @@ $.fn.rating = function(parameters) {
187
192
  },
188
193
 
189
194
  setting: function(name, value) {
190
- if(value !== undefined) {
191
- if( $.isPlainObject(name) ) {
192
- $.extend(true, settings, name);
193
- }
194
- else {
195
- settings[name] = value;
196
- }
195
+ if( $.isPlainObject(name) ) {
196
+ $.extend(true, settings, name);
197
+ }
198
+ else if(value !== undefined) {
199
+ settings[name] = value;
197
200
  }
198
201
  else {
199
202
  return settings[name];
200
203
  }
201
204
  },
202
205
  internal: function(name, value) {
203
- if(value !== undefined) {
204
- if( $.isPlainObject(name) ) {
205
- $.extend(true, module, name);
206
- }
207
- else {
208
- module[name] = value;
209
- }
206
+ if( $.isPlainObject(name) ) {
207
+ $.extend(true, module, name);
208
+ }
209
+ else if(value !== undefined) {
210
+ module[name] = value;
210
211
  }
211
212
  else {
212
213
  return module[name];
@@ -274,6 +275,9 @@ $.fn.rating = function(parameters) {
274
275
  if(moduleSelector) {
275
276
  title += ' \'' + moduleSelector + '\'';
276
277
  }
278
+ if($allModules.size() > 1) {
279
+ title += ' ' + '(' + $allModules.size() + ')';
280
+ }
277
281
  if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
278
282
  console.groupCollapsed(title);
279
283
  if(console.table) {
@@ -331,19 +335,18 @@ $.fn.rating = function(parameters) {
331
335
  else if(found !== undefined) {
332
336
  response = found;
333
337
  }
334
- if($.isArray(invokedResponse)) {
335
- invokedResponse.push(response);
338
+ if($.isArray(returnedValue)) {
339
+ returnedValue.push(response);
336
340
  }
337
- else if(typeof invokedResponse == 'string') {
338
- invokedResponse = [invokedResponse, response];
341
+ else if(returnedValue !== undefined) {
342
+ returnedValue = [returnedValue, response];
339
343
  }
340
344
  else if(response !== undefined) {
341
- invokedResponse = response;
345
+ returnedValue = response;
342
346
  }
343
347
  return found;
344
348
  }
345
349
  };
346
-
347
350
  if(methodInvoked) {
348
351
  if(instance === undefined) {
349
352
  module.initialize();
@@ -359,8 +362,8 @@ $.fn.rating = function(parameters) {
359
362
  })
360
363
  ;
361
364
 
362
- return (invokedResponse !== undefined)
363
- ? invokedResponse
365
+ return (returnedValue !== undefined)
366
+ ? returnedValue
364
367
  : this
365
368
  ;
366
369
  };
@@ -22,7 +22,7 @@ $.fn.search = function(source, parameters) {
22
22
  query = arguments[0],
23
23
  methodInvoked = (typeof query == 'string'),
24
24
  queryArguments = [].slice.call(arguments, 1),
25
- invokedResponse
25
+ returnedValue
26
26
  ;
27
27
  $(this)
28
28
  .each(function() {
@@ -405,28 +405,22 @@ $.fn.search = function(source, parameters) {
405
405
  },
406
406
 
407
407
  setting: function(name, value) {
408
- module.debug('Changing setting', name, value);
409
- if(value !== undefined) {
410
- if( $.isPlainObject(name) ) {
411
- $.extend(true, settings, name);
412
- }
413
- else {
414
- settings[name] = value;
415
- }
408
+ if( $.isPlainObject(name) ) {
409
+ $.extend(true, settings, name);
410
+ }
411
+ else if(value !== undefined) {
412
+ settings[name] = value;
416
413
  }
417
414
  else {
418
415
  return settings[name];
419
416
  }
420
417
  },
421
418
  internal: function(name, value) {
422
- module.debug('Changing internal', name, value);
423
- if(value !== undefined) {
424
- if( $.isPlainObject(name) ) {
425
- $.extend(true, module, name);
426
- }
427
- else {
428
- module[name] = value;
429
- }
419
+ if( $.isPlainObject(name) ) {
420
+ $.extend(true, module, name);
421
+ }
422
+ else if(value !== undefined) {
423
+ module[name] = value;
430
424
  }
431
425
  else {
432
426
  return module[name];
@@ -554,14 +548,14 @@ $.fn.search = function(source, parameters) {
554
548
  else if(found !== undefined) {
555
549
  response = found;
556
550
  }
557
- if($.isArray(invokedResponse)) {
558
- invokedResponse.push(response);
551
+ if($.isArray(returnedValue)) {
552
+ returnedValue.push(response);
559
553
  }
560
- else if(typeof invokedResponse == 'string') {
561
- invokedResponse = [invokedResponse, response];
554
+ else if(returnedValue !== undefined) {
555
+ returnedValue = [returnedValue, response];
562
556
  }
563
557
  else if(response !== undefined) {
564
- invokedResponse = response;
558
+ returnedValue = response;
565
559
  }
566
560
  return found;
567
561
  }
@@ -582,8 +576,8 @@ $.fn.search = function(source, parameters) {
582
576
  })
583
577
  ;
584
578
 
585
- return (invokedResponse !== undefined)
586
- ? invokedResponse
579
+ return (returnedValue !== undefined)
580
+ ? returnedValue
587
581
  : this
588
582
  ;
589
583
  };
@@ -14,6 +14,7 @@
14
14
  $.fn.shape = function(parameters) {
15
15
  var
16
16
  $allModules = $(this),
17
+ $body = $('body'),
17
18
 
18
19
  time = new Date().getTime(),
19
20
  performance = [],
@@ -21,7 +22,7 @@ $.fn.shape = function(parameters) {
21
22
  query = arguments[0],
22
23
  methodInvoked = (typeof query == 'string'),
23
24
  queryArguments = [].slice.call(arguments, 1),
24
- invokedResponse
25
+ returnedValue
25
26
  ;
26
27
 
27
28
  $allModules
@@ -46,6 +47,7 @@ $.fn.shape = function(parameters) {
46
47
  $side = $module.find(selector.side),
47
48
 
48
49
  // private variables
50
+ nextSelector = false,
49
51
  $activeSide,
50
52
  $nextSide,
51
53
 
@@ -104,46 +106,27 @@ $.fn.shape = function(parameters) {
104
106
  module.reset();
105
107
  module.set.active();
106
108
  };
107
- if(settings.useCSS) {
108
- if(module.get.transitionEvent()) {
109
- module.verbose('Starting CSS animation');
110
- $module
111
- .addClass(className.animating)
112
- ;
113
- module.set.stageSize();
114
- module.repaint();
115
- $module
116
- .addClass(className.css)
117
- ;
118
- $activeSide
119
- .addClass(className.hidden)
120
- ;
121
- $sides
122
- .css(propertyObject)
123
- .one(module.get.transitionEvent(), callback)
124
- ;
125
- }
126
- else {
127
- callback();
128
- }
129
- }
130
- else {
131
- // not yet supported until .animate() is extended to allow RotateX/Y
132
- module.verbose('Starting javascript animation');
109
+ $.proxy(settings.beforeChange, $nextSide[0])();
110
+ if(module.get.transitionEvent()) {
111
+ module.verbose('Starting CSS animation');
133
112
  $module
134
113
  .addClass(className.animating)
135
- .removeClass(className.css)
136
114
  ;
137
- module.set.stageSize();
138
115
  module.repaint();
116
+ $module
117
+ .addClass(className.animating)
118
+ ;
139
119
  $activeSide
140
- .animate({
141
- opacity: 0
142
- }, settings.duration, settings.easing)
120
+ .addClass(className.hidden)
143
121
  ;
144
122
  $sides
145
- .animate(propertyObject, settings.duration, settings.easing, callback)
123
+ .css(propertyObject)
124
+ .one(module.get.transitionEvent(), callback)
146
125
  ;
126
+ module.set.duration(settings.duration);
127
+ }
128
+ else {
129
+ callback();
147
130
  }
148
131
  },
149
132
 
@@ -162,7 +145,6 @@ $.fn.shape = function(parameters) {
162
145
  reset: function() {
163
146
  module.verbose('Animating states reset');
164
147
  $module
165
- .removeClass(className.css)
166
148
  .removeClass(className.animating)
167
149
  .attr('style', '')
168
150
  .removeAttr('style')
@@ -190,107 +172,6 @@ $.fn.shape = function(parameters) {
190
172
  }
191
173
  },
192
174
 
193
- get: {
194
-
195
- transform: {
196
- up: function() {
197
- var
198
- translate = {
199
- y: -(($activeSide.outerHeight() - $nextSide.outerHeight()) / 2),
200
- z: -($activeSide.outerHeight() / 2)
201
- }
202
- ;
203
- return {
204
- transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(-90deg)'
205
- };
206
- },
207
-
208
- down: function() {
209
- var
210
- translate = {
211
- y: -(($activeSide.outerHeight() - $nextSide.outerHeight()) / 2),
212
- z: -($activeSide.outerHeight() / 2)
213
- }
214
- ;
215
- return {
216
- transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(90deg)'
217
- };
218
- },
219
-
220
- left: function() {
221
- var
222
- translate = {
223
- x : -(($activeSide.outerWidth() - $nextSide.outerWidth()) / 2),
224
- z : -($activeSide.outerWidth() / 2)
225
- }
226
- ;
227
- return {
228
- transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(90deg)'
229
- };
230
- },
231
-
232
- right: function() {
233
- var
234
- translate = {
235
- x : -(($activeSide.outerWidth() - $nextSide.outerWidth()) / 2),
236
- z : -($activeSide.outerWidth() / 2)
237
- }
238
- ;
239
- return {
240
- transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(-90deg)'
241
- };
242
- },
243
-
244
- over: function() {
245
- var
246
- translate = {
247
- x : -(($activeSide.outerWidth() - $nextSide.outerWidth()) / 2)
248
- }
249
- ;
250
- return {
251
- transform: 'translateX(' + translate.x + 'px) rotateY(180deg)'
252
- };
253
- },
254
-
255
- back: function() {
256
- var
257
- translate = {
258
- x : -(($activeSide.outerWidth() - $nextSide.outerWidth()) / 2)
259
- }
260
- ;
261
- return {
262
- transform: 'translateX(' + translate.x + 'px) rotateY(-180deg)'
263
- };
264
- }
265
- },
266
-
267
- transitionEvent: function() {
268
- var
269
- element = document.createElement('element'),
270
- transitions = {
271
- 'transition' :'transitionend',
272
- 'OTransition' :'oTransitionEnd',
273
- 'MozTransition' :'transitionend',
274
- 'WebkitTransition' :'webkitTransitionEnd'
275
- },
276
- transition
277
- ;
278
- for(transition in transitions){
279
- if( element.style[transition] !== undefined ){
280
- return transitions[transition];
281
- }
282
- }
283
- },
284
-
285
- nextSide: function() {
286
- return ( $activeSide.next(selector.side).size() > 0 )
287
- ? $activeSide.next(selector.side)
288
- : $module.find(selector.side).first()
289
- ;
290
- }
291
-
292
- },
293
-
294
175
  set: {
295
176
 
296
177
  defaultSide: function() {
@@ -299,27 +180,56 @@ $.fn.shape = function(parameters) {
299
180
  ? $activeSide.next(selector.side)
300
181
  : $module.find(selector.side).first()
301
182
  ;
183
+ nextSelector = false;
302
184
  module.verbose('Active side set to', $activeSide);
303
185
  module.verbose('Next side set to', $nextSide);
304
186
  },
305
187
 
188
+ duration: function(duration) {
189
+ duration = duration || settings.duration;
190
+ duration = (typeof duration == 'number')
191
+ ? duration + 'ms'
192
+ : duration
193
+ ;
194
+ module.verbose('Setting animation duration', duration);
195
+ $sides.add($side)
196
+ .css({
197
+ '-webkit-transition-duration': duration,
198
+ '-moz-transition-duration': duration,
199
+ '-ms-transition-duration': duration,
200
+ '-o-transition-duration': duration,
201
+ 'transition-duration': duration
202
+ })
203
+ ;
204
+ },
205
+
306
206
  stageSize: function() {
307
207
  var
308
- stage = {
309
- width : $nextSide.outerWidth(),
310
- height : $nextSide.outerHeight()
311
- }
208
+ $clone = $module.clone().addClass(className.loading),
209
+ $activeSide = $clone.find('.' + settings.className.active),
210
+ $nextSide = (nextSelector)
211
+ ? $clone.find(nextSelector)
212
+ : ( $activeSide.next(selector.side).size() > 0 )
213
+ ? $activeSide.next(selector.side)
214
+ : $clone.find(selector.side).first(),
215
+ newSize = {}
312
216
  ;
313
- module.verbose('Resizing stage to fit new content', stage);
217
+ $activeSide.removeClass(className.active);
218
+ $nextSide.addClass(className.active);
219
+ $clone.prependTo($body);
220
+ newSize = {
221
+ width : $nextSide.outerWidth(),
222
+ height : $nextSide.outerHeight()
223
+ };
224
+ $clone.remove();
314
225
  $module
315
- .css({
316
- width : stage.width,
317
- height : stage.height
318
- })
226
+ .css(newSize)
319
227
  ;
228
+ module.verbose('Resizing stage to fit new content', newSize);
320
229
  },
321
230
 
322
231
  nextSide: function(selector) {
232
+ nextSelector = selector;
323
233
  $nextSide = $module.find(selector);
324
234
  if($nextSide.size() === 0) {
325
235
  module.error(error.side);
@@ -335,7 +245,7 @@ $.fn.shape = function(parameters) {
335
245
  $nextSide
336
246
  .addClass(className.active)
337
247
  ;
338
- $.proxy(settings.onChange, $nextSide)();
248
+ $.proxy(settings.onChange, $nextSide[0])();
339
249
  module.set.defaultSide();
340
250
  }
341
251
  },
@@ -345,6 +255,7 @@ $.fn.shape = function(parameters) {
345
255
  up: function() {
346
256
  module.debug('Flipping up', $nextSide);
347
257
  if( !module.is.animating() ) {
258
+ module.set.stageSize();
348
259
  module.stage.above();
349
260
  module.animate( module.get.transform.up() );
350
261
  }
@@ -356,6 +267,7 @@ $.fn.shape = function(parameters) {
356
267
  down: function() {
357
268
  module.debug('Flipping down', $nextSide);
358
269
  if( !module.is.animating() ) {
270
+ module.set.stageSize();
359
271
  module.stage.below();
360
272
  module.animate( module.get.transform.down() );
361
273
  }
@@ -367,6 +279,7 @@ $.fn.shape = function(parameters) {
367
279
  left: function() {
368
280
  module.debug('Flipping left', $nextSide);
369
281
  if( !module.is.animating() ) {
282
+ module.set.stageSize();
370
283
  module.stage.left();
371
284
  module.animate(module.get.transform.left() );
372
285
  }
@@ -378,6 +291,7 @@ $.fn.shape = function(parameters) {
378
291
  right: function() {
379
292
  module.debug('Flipping right', $nextSide);
380
293
  if( !module.is.animating() ) {
294
+ module.set.stageSize();
381
295
  module.stage.right();
382
296
  module.animate(module.get.transform.right() );
383
297
  }
@@ -389,6 +303,7 @@ $.fn.shape = function(parameters) {
389
303
  over: function() {
390
304
  module.debug('Flipping over', $nextSide);
391
305
  if( !module.is.animating() ) {
306
+ module.set.stageSize();
392
307
  module.stage.behind();
393
308
  module.animate(module.get.transform.over() );
394
309
  }
@@ -400,6 +315,7 @@ $.fn.shape = function(parameters) {
400
315
  back: function() {
401
316
  module.debug('Flipping back', $nextSide);
402
317
  if( !module.is.animating() ) {
318
+ module.set.stageSize();
403
319
  module.stage.behind();
404
320
  module.animate(module.get.transform.back() );
405
321
  }
@@ -410,6 +326,107 @@ $.fn.shape = function(parameters) {
410
326
 
411
327
  },
412
328
 
329
+ get: {
330
+
331
+ transform: {
332
+ up: function() {
333
+ var
334
+ translate = {
335
+ y: -(($activeSide.outerHeight() - $nextSide.outerHeight()) / 2),
336
+ z: -($activeSide.outerHeight() / 2)
337
+ }
338
+ ;
339
+ return {
340
+ transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(-90deg)'
341
+ };
342
+ },
343
+
344
+ down: function() {
345
+ var
346
+ translate = {
347
+ y: -(($activeSide.outerHeight() - $nextSide.outerHeight()) / 2),
348
+ z: -($activeSide.outerHeight() / 2)
349
+ }
350
+ ;
351
+ return {
352
+ transform: 'translateY(' + translate.y + 'px) translateZ('+ translate.z + 'px) rotateX(90deg)'
353
+ };
354
+ },
355
+
356
+ left: function() {
357
+ var
358
+ translate = {
359
+ x : -(($activeSide.outerWidth() - $nextSide.outerWidth()) / 2),
360
+ z : -($activeSide.outerWidth() / 2)
361
+ }
362
+ ;
363
+ return {
364
+ transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(90deg)'
365
+ };
366
+ },
367
+
368
+ right: function() {
369
+ var
370
+ translate = {
371
+ x : -(($activeSide.outerWidth() - $nextSide.outerWidth()) / 2),
372
+ z : -($activeSide.outerWidth() / 2)
373
+ }
374
+ ;
375
+ return {
376
+ transform: 'translateX(' + translate.x + 'px) translateZ(' + translate.z + 'px) rotateY(-90deg)'
377
+ };
378
+ },
379
+
380
+ over: function() {
381
+ var
382
+ translate = {
383
+ x : -(($activeSide.outerWidth() - $nextSide.outerWidth()) / 2)
384
+ }
385
+ ;
386
+ return {
387
+ transform: 'translateX(' + translate.x + 'px) rotateY(180deg)'
388
+ };
389
+ },
390
+
391
+ back: function() {
392
+ var
393
+ translate = {
394
+ x : -(($activeSide.outerWidth() - $nextSide.outerWidth()) / 2)
395
+ }
396
+ ;
397
+ return {
398
+ transform: 'translateX(' + translate.x + 'px) rotateY(-180deg)'
399
+ };
400
+ }
401
+ },
402
+
403
+ transitionEvent: function() {
404
+ var
405
+ element = document.createElement('element'),
406
+ transitions = {
407
+ 'transition' :'transitionend',
408
+ 'OTransition' :'oTransitionEnd',
409
+ 'MozTransition' :'transitionend',
410
+ 'WebkitTransition' :'webkitTransitionEnd'
411
+ },
412
+ transition
413
+ ;
414
+ for(transition in transitions){
415
+ if( element.style[transition] !== undefined ){
416
+ return transitions[transition];
417
+ }
418
+ }
419
+ },
420
+
421
+ nextSide: function() {
422
+ return ( $activeSide.next(selector.side).size() > 0 )
423
+ ? $activeSide.next(selector.side)
424
+ : $module.find(selector.side).first()
425
+ ;
426
+ }
427
+
428
+ },
429
+
413
430
  stage: {
414
431
 
415
432
  above: function() {
@@ -543,26 +560,22 @@ $.fn.shape = function(parameters) {
543
560
  }
544
561
  },
545
562
  setting: function(name, value) {
546
- if(value !== undefined) {
547
- if( $.isPlainObject(name) ) {
548
- $.extend(true, settings, name);
549
- }
550
- else {
551
- settings[name] = value;
552
- }
563
+ if( $.isPlainObject(name) ) {
564
+ $.extend(true, settings, name);
565
+ }
566
+ else if(value !== undefined) {
567
+ settings[name] = value;
553
568
  }
554
569
  else {
555
570
  return settings[name];
556
571
  }
557
572
  },
558
573
  internal: function(name, value) {
559
- if(value !== undefined) {
560
- if( $.isPlainObject(name) ) {
561
- $.extend(true, module, name);
562
- }
563
- else {
564
- module[name] = value;
565
- }
574
+ if( $.isPlainObject(name) ) {
575
+ $.extend(true, module, name);
576
+ }
577
+ else if(value !== undefined) {
578
+ module[name] = value;
566
579
  }
567
580
  else {
568
581
  return module[name];
@@ -690,14 +703,14 @@ $.fn.shape = function(parameters) {
690
703
  else if(found !== undefined) {
691
704
  response = found;
692
705
  }
693
- if($.isArray(invokedResponse)) {
694
- invokedResponse.push(response);
706
+ if($.isArray(returnedValue)) {
707
+ returnedValue.push(response);
695
708
  }
696
- else if(typeof invokedResponse == 'string') {
697
- invokedResponse = [invokedResponse, response];
709
+ else if(returnedValue !== undefined) {
710
+ returnedValue = [returnedValue, response];
698
711
  }
699
712
  else if(response !== undefined) {
700
- invokedResponse = response;
713
+ returnedValue = response;
701
714
  }
702
715
  return found;
703
716
  }
@@ -718,8 +731,8 @@ $.fn.shape = function(parameters) {
718
731
  })
719
732
  ;
720
733
 
721
- return (invokedResponse !== undefined)
722
- ? invokedResponse
734
+ return (returnedValue !== undefined)
735
+ ? returnedValue
723
736
  : this
724
737
  ;
725
738
  };
@@ -745,12 +758,8 @@ $.fn.shape.settings = {
745
758
  beforeChange : function() {},
746
759
  onChange : function() {},
747
760
 
748
- // use css animation (currently only true is supported)
749
- useCSS : true,
750
-
751
- // animation duration (useful only with future js animations)
752
- duration : 1000,
753
- easing : 'easeInOutQuad',
761
+ // animation duration
762
+ duration : 700,
754
763
 
755
764
  // possible errors
756
765
  error: {
@@ -760,9 +769,9 @@ $.fn.shape.settings = {
760
769
 
761
770
  // classnames used
762
771
  className : {
763
- css : 'css',
764
772
  animating : 'animating',
765
773
  hidden : 'hidden',
774
+ loading : 'loading',
766
775
  active : 'active'
767
776
  },
768
777