ultimate-base 0.4.0.0 → 0.4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/app/assets/javascripts/ultimate/backbone/base.js.coffee +1 -1
- data/app/assets/javascripts/ultimate/backbone/views/slider.js.coffee +13 -4
- data/app/assets/javascripts/ultimate/base.js.coffee +1 -1
- data/app/assets/javascripts/ultimate/helpers.js.coffee +1 -1
- data/app/assets/javascripts/ultimate/jquery-plugin-class.js.coffee +0 -2
- data/app/assets/stylesheets/ultimate/mixins/_routines.scss +10 -0
- data/app/assets/stylesheets/ultimate/mixins/microstructures.scss +2 -2
- data/lib/ultimate/base/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
@@ -25,12 +25,12 @@ class Ultimate.Backbone.Views.Slider extends Ultimate.Backbone.View
|
|
25
25
|
interval: 0
|
26
26
|
durationPerPixel: 2
|
27
27
|
moveItems: 0
|
28
|
+
prevItems: 0
|
29
|
+
itemSize: 0
|
28
30
|
|
29
31
|
totalItems: 0
|
30
|
-
itemSize: 0
|
31
32
|
displayItems: 0
|
32
33
|
overItems: 0
|
33
|
-
prevItems: 0 # can as setting
|
34
34
|
|
35
35
|
timeoutId: null # for cycling == true
|
36
36
|
startSide: "left" # set by @vertical
|
@@ -43,7 +43,7 @@ class Ultimate.Backbone.Views.Slider extends Ultimate.Backbone.View
|
|
43
43
|
if @totalItems
|
44
44
|
@jItems.each (index) -> $(@).attr "data-slide-index", index
|
45
45
|
jFirstItem = @jItems.first()
|
46
|
-
@itemSize
|
46
|
+
@itemSize ||= jFirstItem[_.string.camelize("outer-#{@sizeAttr}")](true)
|
47
47
|
needSize = @totalItems * @itemSize
|
48
48
|
@jLine[@sizeAttr](needSize) if @jLine[@sizeAttr]() < needSize
|
49
49
|
@displayItems = Math.round(@jDisplay[@sizeAttr]() / @itemSize)
|
@@ -60,8 +60,17 @@ class Ultimate.Backbone.Views.Slider extends Ultimate.Backbone.View
|
|
60
60
|
@prevItems = 0
|
61
61
|
#@bus().trigger "slider:slide", 0, @prevItems, jItems.eq(@prevItems)
|
62
62
|
|
63
|
+
_getItemByIndex: (index) ->
|
64
|
+
@jItems.filter -> $(@).data('slideIndex') is index
|
65
|
+
|
66
|
+
_getItemByDomIndex: (index) ->
|
67
|
+
@jLine.find(".item:eq(#{index})")
|
68
|
+
|
69
|
+
_getIndexOf: (jItem) ->
|
70
|
+
jItem.data('slideIndex')
|
71
|
+
|
63
72
|
currentIndex: ->
|
64
|
-
@
|
73
|
+
@_getIndexOf @_getItemByDomIndex(@prevItems)
|
65
74
|
|
66
75
|
trySlide: (move = 1, moveItems = move * @moveItems) ->
|
67
76
|
if @totalItems and @overItems
|
@@ -31,8 +31,6 @@ class Ultimate.Plugin
|
|
31
31
|
translations: null
|
32
32
|
|
33
33
|
constructor: (options) ->
|
34
|
-
# TODO
|
35
|
-
throw new Error('Property `el` must be specified at first argument of Ultimate.Plugin.constructor') unless options?.el
|
36
34
|
@cid = _.uniqueId('ultimatePlugin_')
|
37
35
|
@_configure options
|
38
36
|
@$el = $(@el).first()
|
@@ -118,3 +118,13 @@
|
|
118
118
|
@function find-color($list, $default: false) {
|
119
119
|
@return find-typed-item($list, color, $default);
|
120
120
|
}
|
121
|
+
|
122
|
+
@function _dec-size($value, $dec-list...) {
|
123
|
+
$value-unit: unit($value);
|
124
|
+
@each $dec-value in $dec-list {
|
125
|
+
@if unit($dec-value) == $value-unit {
|
126
|
+
$value: $value - $dec-value;
|
127
|
+
}
|
128
|
+
}
|
129
|
+
@return $value;
|
130
|
+
}
|
@@ -51,10 +51,10 @@ $support-ie: true !default;
|
|
51
51
|
@if nth($include-properties, $i) and $property {
|
52
52
|
$complex: complex-list($property);
|
53
53
|
@if isset($width) {
|
54
|
-
$width: $width
|
54
|
+
$width: _dec-size($width, nth($complex, 2), nth($complex, 4));
|
55
55
|
}
|
56
56
|
@if isset($height) {
|
57
|
-
$height: $height
|
57
|
+
$height: _dec-size($height, nth($complex, 1), nth($complex, 3));
|
58
58
|
}
|
59
59
|
}
|
60
60
|
@if $property-name == border-width and length($property) == 1 {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultimate-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.
|
4
|
+
version: 0.4.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|