locomotive_cms 2.4.1 → 2.5.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.textile +3 -3
- data/app/assets/images/locomotive/icons/flags/sk.png +0 -0
- data/app/assets/javascripts/aloha/plugins/custom/locomotive_media/lib/locomotive_media-plugin.js +1 -1
- data/app/assets/javascripts/locomotive/models/content_asset.js.coffee +7 -1
- data/app/assets/javascripts/locomotive/utils/aloha_settings.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/utils/core_ext.js +1 -1
- data/app/assets/javascripts/locomotive/views/content_assets/picker_item_view.js.coffee +12 -0
- data/app/assets/javascripts/locomotive/views/content_assets/picker_view.js.coffee +149 -15
- data/app/assets/javascripts/locomotive/views/shared/asset_picker_view.js.coffee +16 -4
- data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +1 -1
- data/app/assets/javascripts/locomotive/views/shared/list_item_view.js.coffee +1 -1
- data/app/assets/javascripts/tinymce/plugins/locomotive_media/editor_plugin.js +1 -1
- data/app/assets/stylesheets/locomotive/backoffice/_buttons.css.scss +56 -0
- data/app/assets/stylesheets/locomotive/backoffice/application.css.scss +6 -0
- data/app/assets/stylesheets/locomotive/backoffice/content_assets.css.scss +74 -4
- data/app/assets/stylesheets/locomotive/backoffice/dialog_changes.css.scss +4 -0
- data/app/assets/stylesheets/locomotive/shared/common.css.scss +7 -0
- data/app/controllers/locomotive/api/documentation_controller.rb +8 -2
- data/app/controllers/locomotive/api/pages_controller.rb +1 -1
- data/app/controllers/locomotive/content_assets_controller.rb +4 -0
- data/app/models/locomotive/content_asset.rb +5 -1
- data/app/models/locomotive/content_entry.rb +7 -2
- data/app/models/locomotive/content_type.rb +1 -1
- data/app/models/locomotive/editable_element.rb +1 -0
- data/app/models/locomotive/extensions/asset/types.rb +9 -4
- data/app/models/locomotive/extensions/asset/vignette.rb +2 -0
- data/app/models/locomotive/extensions/content_entry/csv.rb +2 -2
- data/app/models/locomotive/extensions/content_entry/localized.rb +18 -0
- data/app/models/locomotive/page.rb +2 -2
- data/app/models/locomotive/snippet.rb +8 -7
- data/app/models/locomotive/theme_asset.rb +12 -6
- data/app/models/locomotive/translation.rb +1 -1
- data/app/views/locomotive/content_assets/_picker.html.haml +23 -2
- data/app/views/locomotive/pages/_page.html.haml +2 -0
- data/app/views/locomotive/shared/_header.html.haml +3 -1
- data/app/views/locomotive/shared/_main_app_header.html.haml +1 -0
- data/app/views/locomotive/translations/index.html.haml +1 -1
- data/config/locales/admin_ui.bg.yml +1 -0
- data/config/locales/admin_ui.cs.yml +1 -0
- data/config/locales/admin_ui.de.yml +1 -0
- data/config/locales/admin_ui.en.yml +7 -0
- data/config/locales/admin_ui.es.yml +1 -0
- data/config/locales/admin_ui.et.yml +1 -0
- data/config/locales/admin_ui.fr.yml +12 -2
- data/config/locales/admin_ui.it.yml +1 -0
- data/config/locales/admin_ui.ja.yml +1 -0
- data/config/locales/admin_ui.nb.yml +1 -0
- data/config/locales/admin_ui.nl.yml +1 -0
- data/config/locales/admin_ui.pl.yml +1 -0
- data/config/locales/admin_ui.pt-BR.yml +1 -0
- data/config/locales/admin_ui.ru.yml +8 -4
- data/config/locales/admin_ui.sk.yml +360 -0
- data/config/locales/admin_ui.zh-CN.yml +1 -0
- data/config/locales/carrierwave.sk.yml +4 -0
- data/config/locales/default.fr.yml +3 -0
- data/config/locales/default.ru.yml +18 -7
- data/config/locales/default.sk.yml +249 -0
- data/config/locales/devise.sk.yml +64 -0
- data/config/locales/flash.sk.yml +115 -0
- data/config/locales/formtastic.fr.yml +7 -1
- data/config/locales/formtastic.sk.yml +125 -0
- data/config/routes.rb +2 -0
- data/lib/generators/locomotive/install/install_generator.rb +6 -0
- data/lib/generators/locomotive/install/templates/dragonfly.rb +16 -13
- data/lib/generators/locomotive/install/templates/locomotive.rb +7 -2
- data/lib/locomotive.rb +3 -15
- data/lib/locomotive/action_controller/responder.rb +8 -1
- data/lib/locomotive/carrierwave/asset.rb +0 -4
- data/lib/locomotive/configuration.rb +4 -3
- data/lib/locomotive/dragonfly.rb +20 -5
- data/lib/locomotive/liquid/drops/content_entry.rb +1 -1
- data/lib/locomotive/liquid/filters/base.rb +4 -0
- data/lib/locomotive/liquid/filters/translate.rb +4 -0
- data/lib/locomotive/liquid/tags/path_helper.rb +5 -2
- data/lib/locomotive/middlewares.rb +2 -1
- data/lib/locomotive/misc/api_documentation.rb +3 -1
- data/lib/locomotive/render.rb +7 -6
- data/lib/locomotive/version.rb +1 -1
- data/lib/tasks/development.rake +21 -0
- data/spec/dummy/config/initializers/dragonfly.rb +16 -13
- data/spec/dummy/config/initializers/locomotive.rb +9 -5
- data/spec/fixtures/assets/specs.pdf +0 -0
- data/spec/lib/locomotive/liquid/filters/html_spec.rb +22 -13
- data/spec/models/locomotive/content_asset_spec.rb +9 -0
- data/spec/models/locomotive/content_entry_spec.rb +57 -6
- data/spec/models/locomotive/extensions/content_entry/csv_spec.rb +30 -0
- data/spec/support/locomotive.rb +2 -1
- data/vendor/assets/javascripts/locomotive/ICanHandlebarz.js +1 -1
- data/vendor/assets/javascripts/locomotive/backbone.sync.js +14 -1
- metadata +34 -9
- data/lib/locomotive/middlewares/cache.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6b5fd84b77a2c1027f2f3a0ef2ff655bc31f775
|
4
|
+
data.tar.gz: 884301132a77dc7822611d9291582d7688f3afc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd423925ab81601ff850d0d784d7b34ac48cf70509c8a9b2b2fbb19ef45721c0ba35b30673d37c914586c73fa8d7b66877067f5034aac529370e7c91e11634fa
|
7
|
+
data.tar.gz: 3bdfce2c8125d5e1690ebe4f266bc50a0a1603de461692c61299f920ee2ecdd82c44a86b1ac602283ee670569a3b7a62b34161ec8cefdbf591d3670dd2e83df5
|
data/Gemfile
CHANGED
data/README.textile
CHANGED
@@ -27,9 +27,9 @@ h2. Gems
|
|
27
27
|
|
28
28
|
Here is a short list of main gems / technologies used in the application.
|
29
29
|
|
30
|
-
* Ruby 2.
|
31
|
-
* Rails 3.2.
|
32
|
-
* Mongoid 3.1.
|
30
|
+
* Ruby 2.x
|
31
|
+
* Rails 3.2.17 (Rails 4.0 planned for the beginning of 2014)
|
32
|
+
* Mongoid 3.1.5 (with MongoDB 2.x)
|
33
33
|
* Liquid
|
34
34
|
* Devise
|
35
35
|
* Carrierwave
|
Binary file
|
@@ -8,11 +8,17 @@ class Locomotive.Models.ContentAsset extends Backbone.Model
|
|
8
8
|
@prepare()
|
9
9
|
|
10
10
|
prepare: ->
|
11
|
+
@set(filename: @get('source').name.truncate(15)) if @get('uploading')
|
12
|
+
|
11
13
|
@set
|
12
|
-
image:
|
14
|
+
image: @get('content_type') == 'image'
|
15
|
+
with_thumbnail: @get('content_type') == 'image' || @get('content_type') == 'pdf'
|
13
16
|
|
14
17
|
return @
|
15
18
|
|
19
|
+
toJSONForSave: ->
|
20
|
+
{ source: @get('source') }
|
21
|
+
|
16
22
|
class Locomotive.Models.ContentAssetsCollection extends Backbone.Collection
|
17
23
|
|
18
24
|
model: Locomotive.Models.ContentAsset
|
@@ -39,7 +39,7 @@ window.Aloha.settings =
|
|
39
39
|
crop: false
|
40
40
|
|
41
41
|
i18n:
|
42
|
-
available: ['en', 'fr', 'pl', 'pt-BR', 'es', 'de', 'no', 'ru', 'nl', 'ja', 'cs', 'bg']
|
42
|
+
available: ['en', 'fr', 'pl', 'pt-BR', 'es', 'de', 'no', 'ru', 'nl', 'ja', 'cs', 'bg', 'sk']
|
43
43
|
|
44
44
|
sidebar:
|
45
45
|
disabled: true
|
@@ -15,6 +15,18 @@ class Locomotive.Views.ContentAssets.PickerItemView extends Backbone.View
|
|
15
15
|
|
16
16
|
return @
|
17
17
|
|
18
|
+
refresh: ->
|
19
|
+
$(@el).html(ich.content_asset(@model.toJSON()))
|
20
|
+
|
21
|
+
uploaded_at: (loaded, total) ->
|
22
|
+
percentage = (loaded / total) * 100
|
23
|
+
|
24
|
+
# for UI reasons, it's better to have it begin at 20%.
|
25
|
+
percentage = 20 if percentage < 20
|
26
|
+
|
27
|
+
# update the progress bar
|
28
|
+
@$('.uploading .progress-bar').css('width', "#{percentage}%")
|
29
|
+
|
18
30
|
select_asset: (event) ->
|
19
31
|
event.stopPropagation() & event.preventDefault()
|
20
32
|
@on_select(@model)
|
@@ -6,45 +6,166 @@ class Locomotive.Views.ContentAssets.PickerView extends Locomotive.Views.Shared.
|
|
6
6
|
|
7
7
|
number_items_per_row: 4
|
8
8
|
|
9
|
-
|
9
|
+
page: 1
|
10
|
+
|
11
|
+
per_page: 12
|
12
|
+
|
13
|
+
total_pages: null
|
14
|
+
|
15
|
+
uploading: false
|
16
|
+
|
17
|
+
_item_views: []
|
18
|
+
|
19
|
+
events:
|
20
|
+
'click .btn': 'toggle_filter_by_type'
|
21
|
+
'change input[name=query]': 'fetch_assets'
|
22
|
+
|
23
|
+
render: ->
|
24
|
+
super
|
25
|
+
|
26
|
+
@enable_dropzone()
|
27
|
+
|
28
|
+
@enable_infinite_scroll()
|
29
|
+
|
30
|
+
@
|
10
31
|
|
11
32
|
template: ->
|
12
33
|
ich.content_asset_picker
|
13
34
|
|
14
|
-
fetch_assets: ->
|
35
|
+
fetch_assets: (event) ->
|
15
36
|
@_reset()
|
16
|
-
@collection.fetch
|
17
|
-
|
18
|
-
|
37
|
+
xhr = @collection.fetch
|
38
|
+
data: @_fetch_options()
|
39
|
+
reset: true
|
40
|
+
success: => @open()
|
41
|
+
|
42
|
+
xhr.done => @_get_pagination_info(xhr)
|
43
|
+
|
44
|
+
toggle_filter_by_type: (event) ->
|
45
|
+
$(event.target).toggleClass('on')
|
46
|
+
@fetch_assets()
|
19
47
|
|
20
48
|
build_uploader: (el, link) ->
|
21
49
|
link.bind 'click', (event) ->
|
22
50
|
event.stopPropagation() & event.preventDefault()
|
23
51
|
el.click()
|
24
52
|
|
25
|
-
el.bind 'change', (event) =>
|
26
|
-
_.each event.target.files, (file) =>
|
27
|
-
asset = new Locomotive.Models.ContentAsset(source: file)
|
28
|
-
asset.save {},
|
29
|
-
headers: { 'X-Flash': true }
|
30
|
-
success: (model, response) => @collection.add(model.prepare())
|
31
|
-
error: => @shake()
|
53
|
+
el.bind 'change', (event) => @_persist_files(event)
|
32
54
|
|
33
55
|
add_asset: (asset, first) ->
|
34
56
|
view = new Locomotive.Views.ContentAssets.PickerItemView model: asset, parent: @
|
35
57
|
|
36
58
|
(@_item_views ||= []).push(view)
|
37
|
-
@$('ul.list .clear').before(view.render().el)
|
38
59
|
|
39
|
-
@
|
60
|
+
if @uploading
|
61
|
+
@$('ul.list').prepend(view.render().el)
|
62
|
+
@_refresh()
|
63
|
+
else
|
64
|
+
@$('ul.list .clear').before(view.render().el)
|
65
|
+
@_refresh()
|
66
|
+
@_move_to_last_asset() unless first == true
|
67
|
+
|
68
|
+
|
69
|
+
enable_dropzone: ->
|
70
|
+
# make sure it works for the browser
|
71
|
+
return unless window.File && window.FileList && window.FileReader
|
72
|
+
|
73
|
+
dropzone = @$('ul.list').parent()
|
74
|
+
|
75
|
+
dropzone.on 'dragover', (event) => @_stop_event(event); dropzone.addClass('hovered')
|
76
|
+
dropzone.on 'dragleave', (event) => @_stop_event(event); dropzone.removeClass('hovered')
|
77
|
+
dropzone.on 'dragenter', (event) => @_stop_event(event)
|
78
|
+
dropzone.on 'drop', (event) =>
|
79
|
+
@_stop_event(event)
|
80
|
+
dropzone.removeClass('hovered')
|
81
|
+
@_persist_files(event)
|
82
|
+
|
83
|
+
enable_infinite_scroll: ->
|
84
|
+
$list = @$('ul.list')
|
85
|
+
|
86
|
+
$list.on 'scroll', (event) =>
|
87
|
+
clearTimeout(@throttle_timer) if @throttle_timer?
|
88
|
+
|
89
|
+
@throttle_timer = setTimeout =>
|
90
|
+
height = $list[0].scrollHeight - $list.innerHeight()
|
91
|
+
scroll = $list.scrollTop()
|
92
|
+
|
93
|
+
isScrolledToEnd = (scroll >= height)
|
40
94
|
|
41
|
-
|
95
|
+
if isScrolledToEnd && @page < @total_pages
|
96
|
+
@page += 1
|
97
|
+
xhr = @collection.fetch
|
98
|
+
data: { page: @page, per_page: @per_page }
|
99
|
+
success: () =>
|
100
|
+
@_refresh()
|
101
|
+
$list.scrollTop(scroll)
|
102
|
+
xhr.done => @_get_pagination_info(xhr)
|
103
|
+
, 100
|
42
104
|
|
43
105
|
remove_asset: (asset) ->
|
44
106
|
view = _.find @_item_views, (tmp) -> tmp.model == asset
|
45
107
|
view.remove() if view?
|
46
108
|
@_refresh()
|
47
109
|
|
110
|
+
dialog_class: ->
|
111
|
+
'content-asset-picker-dialog'
|
112
|
+
|
113
|
+
_fetch_options: ->
|
114
|
+
_.tap { per_page: @per_page }, (options) =>
|
115
|
+
options.types = []
|
116
|
+
|
117
|
+
@$('.asset-types .btn.on').each ->
|
118
|
+
options.types.push $(this).data('type')
|
119
|
+
|
120
|
+
options.query = @$('input[name=query]').val()
|
121
|
+
|
122
|
+
_persist_files: (event) ->
|
123
|
+
files = event.target.files || event.originalEvent.dataTransfer.files
|
124
|
+
|
125
|
+
@_move_to_top()
|
126
|
+
@uploading = true
|
127
|
+
|
128
|
+
_.each files, (file) =>
|
129
|
+
# create a new asset
|
130
|
+
asset = new Locomotive.Models.ContentAsset(uploading: true, source: file)
|
131
|
+
@collection.add(asset.prepare(), at: 0)
|
132
|
+
|
133
|
+
# create the view at first
|
134
|
+
view = @_find_view_by_asset(asset)
|
135
|
+
|
136
|
+
# async save
|
137
|
+
asset.save {},
|
138
|
+
headers: { 'X-Flash': true }
|
139
|
+
success: (model, response) =>
|
140
|
+
asset.set(uploading: false)
|
141
|
+
asset.prepare()
|
142
|
+
view.refresh()
|
143
|
+
error: => @shake()
|
144
|
+
progress: (loaded, total) => view.uploaded_at(loaded, total)
|
145
|
+
|
146
|
+
@uploading = false
|
147
|
+
|
148
|
+
# what's the total pages now ?
|
149
|
+
@_recalculate_pagination(_.size(files))
|
150
|
+
|
151
|
+
_recalculate_pagination: (number_assets_added) ->
|
152
|
+
previous_total_pages = @total_pages
|
153
|
+
|
154
|
+
# not on the last page ?
|
155
|
+
if @page < @total_pages
|
156
|
+
number_assets_to_delete = number_assets_added % @per_page
|
157
|
+
|
158
|
+
while number_assets_to_delete -= 1
|
159
|
+
@collection.pop()
|
160
|
+
|
161
|
+
# not a problem if the total pages is not super accurate because it will
|
162
|
+
# be recalculated at the next scroll
|
163
|
+
@total_entries += number_assets_added
|
164
|
+
@total_pages = Math.ceil(@total_entries / @per_page)
|
165
|
+
|
166
|
+
# move the current page to the new last one if we already were at the last page
|
167
|
+
@page = @total_pages if @page == previous_total_pages || previous_total_pages == 0
|
168
|
+
|
48
169
|
_on_refresh: ->
|
49
170
|
self = @
|
50
171
|
@$('ul.list li.asset').each (index) ->
|
@@ -53,6 +174,19 @@ class Locomotive.Views.ContentAssets.PickerView extends Locomotive.Views.Shared.
|
|
53
174
|
else
|
54
175
|
$(@).removeClass('last')
|
55
176
|
|
177
|
+
_find_view_by_asset: (asset) ->
|
178
|
+
_.find @_item_views || [], (view) -> view.model.cid == asset.cid
|
179
|
+
|
180
|
+
_stop_event: (event) ->
|
181
|
+
event.stopPropagation() & event.preventDefault()
|
182
|
+
|
183
|
+
_get_pagination_info: (xhr) ->
|
184
|
+
@total_pages = parseInt(xhr.getResponseHeader('X-Total-Pages'))
|
185
|
+
@per_page = parseInt(xhr.getResponseHeader('X-Per-Page'))
|
186
|
+
@total_entries = parseInt(xhr.getResponseHeader('X-Total-Entries'))
|
187
|
+
|
56
188
|
_reset: ->
|
189
|
+
@page = 1
|
190
|
+
@total_pages = null
|
57
191
|
_.each @_item_views || [], (view) -> view.remove()
|
58
192
|
super()
|
@@ -28,10 +28,12 @@ class Locomotive.Views.Shared.AssetPickerView extends Backbone.View
|
|
28
28
|
|
29
29
|
create_dialog: ->
|
30
30
|
@dialog ||= $(@el).dialog
|
31
|
-
autoOpen:
|
32
|
-
modal:
|
33
|
-
zIndex:
|
34
|
-
|
31
|
+
autoOpen: false
|
32
|
+
modal: true
|
33
|
+
zIndex: window.application_view.unique_dialog_zindex()
|
34
|
+
dialogClass: @dialog_class()
|
35
|
+
width: 615
|
36
|
+
minHeight: 520
|
35
37
|
create: (event, ui) =>
|
36
38
|
$(@el).prev().find('.ui-dialog-title').html(@$('h2').html())
|
37
39
|
@$('h2').remove()
|
@@ -46,6 +48,10 @@ class Locomotive.Views.Shared.AssetPickerView extends Backbone.View
|
|
46
48
|
|
47
49
|
open: (event, ui, extra) =>
|
48
50
|
$(@el).dialog('overlayEl').bind 'click', => @close()
|
51
|
+
$(document.body).addClass('stop-scrolling')
|
52
|
+
|
53
|
+
close: (event, ui, extra) =>
|
54
|
+
$(document.body).removeClass('stop-scrolling')
|
49
55
|
|
50
56
|
open: ->
|
51
57
|
$(@el).dialog('open')
|
@@ -73,10 +79,16 @@ class Locomotive.Views.Shared.AssetPickerView extends Backbone.View
|
|
73
79
|
remove_asset: (asset) ->
|
74
80
|
# please overide remove_asset
|
75
81
|
|
82
|
+
dialog_class: ->
|
83
|
+
'asset-picker-dialog'
|
84
|
+
|
76
85
|
_move_to_last_asset: ->
|
77
86
|
limit = @$('ul.list li.clear').position()
|
78
87
|
@$('ul.list').animate(scrollTop: limit.top, 100) if limit?
|
79
88
|
|
89
|
+
_move_to_top: ->
|
90
|
+
@$('ul.list').animate(scrollTop: 0, 100)
|
91
|
+
|
80
92
|
_refresh: ->
|
81
93
|
if @collection.length == 0
|
82
94
|
@$('ul.list').hide() & @$('p.no-items').show()
|
@@ -89,7 +89,7 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
89
89
|
|
90
90
|
trigger_change_event_on_focused_inputs: ->
|
91
91
|
# make sure that the current text field gets saved too
|
92
|
-
input = @$('form input[type=text]:focus, form input[type=password]:focus, form textarea:focus')
|
92
|
+
input = @$('form input[type=text]:focus, form input[type=password]:focus, form input[type=number]:focus, form textarea:focus')
|
93
93
|
input.trigger('change') if input.size() > 0
|
94
94
|
|
95
95
|
enable_save_with_keys_combination: ->
|
@@ -18,5 +18,5 @@ class Locomotive.Views.Shared.ListItemView extends Backbone.View
|
|
18
18
|
remove_item: (event) ->
|
19
19
|
event.stopPropagation() & event.preventDefault()
|
20
20
|
|
21
|
-
if confirm $(event.target).data('confirm')
|
21
|
+
if confirm $(event.target).closest('a').data('confirm')
|
22
22
|
@model.destroy()
|
@@ -28,7 +28,7 @@
|
|
28
28
|
} else {
|
29
29
|
var html = ed.selection.getContent();
|
30
30
|
if (html == '') {
|
31
|
-
html = asset.get('
|
31
|
+
html = asset.get('full_filename');
|
32
32
|
ed.execCommand('mceInsertContent', false, '<a id="__mce_tmp" href="#">' + html + '</a>', { skip_undo: 1 });
|
33
33
|
} else {
|
34
34
|
ed.execCommand('mceReplaceContent', false, ' <a id="__mce_tmp" href="#">' + html + '</a>', { skip_undo: 1 });
|
@@ -175,4 +175,60 @@
|
|
175
175
|
&:active {
|
176
176
|
top: 1px;
|
177
177
|
}
|
178
|
+
}
|
179
|
+
|
180
|
+
.button-groups {
|
181
|
+
position: relative;
|
182
|
+
display: inline-block;
|
183
|
+
vertical-align: middle;
|
184
|
+
|
185
|
+
.btn {
|
186
|
+
display: inline-block;
|
187
|
+
position: relative;
|
188
|
+
float: left;
|
189
|
+
white-space: nowrap;
|
190
|
+
text-align: center;
|
191
|
+
vertical-align: middle;
|
192
|
+
cursor: pointer;
|
193
|
+
outline: none;
|
194
|
+
padding: 0px 5px;
|
195
|
+
margin: 0px;
|
196
|
+
margin-left: -1px;
|
197
|
+
border: 1px solid transparent;
|
198
|
+
color: #fff;
|
199
|
+
|
200
|
+
&:first-child {
|
201
|
+
@include border-top-left-radius(16px);
|
202
|
+
@include border-bottom-left-radius(16px);
|
203
|
+
}
|
204
|
+
|
205
|
+
&:last-child {
|
206
|
+
@include border-top-right-radius(16px);
|
207
|
+
@include border-bottom-right-radius(16px);
|
208
|
+
}
|
209
|
+
|
210
|
+
padding: 0px 12px 0px 12px;
|
211
|
+
line-height: 26px;
|
212
|
+
outline: none;
|
213
|
+
text-decoration: none;
|
214
|
+
|
215
|
+
color: #fff;
|
216
|
+
font-size: 12px;
|
217
|
+
font-weight: normal;
|
218
|
+
@include single-text-shadow(rgba(0, 0, 0, 1), 1px, 1px, 1px);
|
219
|
+
|
220
|
+
border: 1px solid rgba(0, 0, 0, 0.2);
|
221
|
+
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
222
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.6);
|
223
|
+
@include box-shadow(rgba(255, 255, 255, 0.1) 0 1px 0 0 inset, rgba(255, 255, 255, 0.1) 0 1px 0 0);
|
224
|
+
@include background-image(linear-gradient(#303138, #1e1e24));
|
225
|
+
|
226
|
+
&.on, &:active {
|
227
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
228
|
+
border-top: 1px solid rgba(0, 0, 0, 0.6);
|
229
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
230
|
+
@include background-image(linear-gradient(#1e1e24, #212229));
|
231
|
+
@include box-shadow(rgba(0, 0, 0, 0) 0 1px 0 0 inset, rgba(255, 255, 255, 0.1) 0 1px 0 0);
|
232
|
+
}
|
233
|
+
}
|
178
234
|
}
|