rademade_admin 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/rademade_admin/app/common/location.coffee.erb +5 -1
  3. data/app/assets/javascripts/rademade_admin/app/common/status-toggler.coffee +25 -0
  4. data/app/assets/javascripts/rademade_admin/app/common/turboform.coffee +8 -0
  5. data/app/assets/javascripts/rademade_admin/app/form-popup/view.coffee +3 -3
  6. data/app/assets/javascripts/rademade_admin/app/gallery/image/collection-view.coffee +35 -0
  7. data/app/assets/javascripts/rademade_admin/app/gallery/image/collection.coffee +19 -0
  8. data/app/assets/javascripts/rademade_admin/app/gallery/image/model.coffee +25 -0
  9. data/app/assets/javascripts/rademade_admin/app/gallery/image/view.coffee +58 -0
  10. data/app/assets/javascripts/rademade_admin/app/gallery/view.coffee +40 -0
  11. data/app/assets/javascripts/rademade_admin/app/select2/related/view.coffee +1 -1
  12. data/app/assets/javascripts/rademade_admin/app/select2/view.coffee +11 -2
  13. data/app/assets/javascripts/rademade_admin/app/templates/crop.jst.ejs +2 -2
  14. data/app/assets/javascripts/rademade_admin/app/templates/related-item.jst.ejs +2 -2
  15. data/app/assets/javascripts/rademade_admin/form/form.coffee +4 -1
  16. data/app/assets/stylesheets/rademade_admin.sass.erb +2 -1
  17. data/app/assets/stylesheets/rademade_admin/blocks/form/input.sass +56 -27
  18. data/app/assets/stylesheets/rademade_admin/blocks/gallery/_main.sass +67 -0
  19. data/app/assets/stylesheets/rademade_admin/modules/pagination/main.sass +19 -2
  20. data/app/cells/menu/item.slim +2 -0
  21. data/app/cells/menu_cell.rb +8 -2
  22. data/app/controllers/rademade_admin/abstract_controller.rb +6 -2
  23. data/app/controllers/rademade_admin/dashboard_controller.rb +1 -1
  24. data/app/controllers/rademade_admin/file_controller.rb +14 -5
  25. data/app/controllers/rademade_admin/gallery_controller.rb +48 -0
  26. data/app/controllers/rademade_admin/model_controller.rb +37 -29
  27. data/app/controllers/rademade_admin/sessions_controller.rb +7 -6
  28. data/app/controllers/rademade_admin/status_controller.rb +16 -0
  29. data/app/helpers/rademade_admin/field_helper.rb +3 -4
  30. data/app/helpers/rademade_admin/form_helper.rb +35 -25
  31. data/app/helpers/rademade_admin/uri_helper.rb +6 -14
  32. data/app/inputs/rademade_admin/file_input.rb +24 -8
  33. data/app/inputs/rademade_admin/gallery_input.rb +77 -0
  34. data/app/inputs/rademade_admin/related_select_input.rb +13 -4
  35. data/app/serializers/autocomplete/base_serializer.rb +1 -1
  36. data/app/services/gallery/manager.rb +81 -0
  37. data/app/services/login.rb +3 -3
  38. data/app/services/menu_service.rb +1 -1
  39. data/app/services/menu_service/menu_item.rb +4 -0
  40. data/app/services/model_controller/model_options.rb +1 -0
  41. data/app/services/model_controller/notifier.rb +24 -10
  42. data/app/services/search/conditions/autocomplete.rb +4 -11
  43. data/app/services/search/conditions/list.rb +22 -10
  44. data/app/services/search/conditions/related_list.rb +8 -4
  45. data/app/services/search/where.rb +20 -0
  46. data/app/services/sortable_service.rb +1 -4
  47. data/app/services/status/toggler.rb +27 -0
  48. data/app/services/template_service.rb +33 -1
  49. data/app/services/upload/gallery_preview_service.rb +64 -0
  50. data/app/views/layouts/rademade_admin.html.erb +1 -22
  51. data/app/views/rademade_admin/_blocks/_form.html.erb +10 -0
  52. data/app/views/rademade_admin/_blocks/_header.html.erb +0 -12
  53. data/app/views/rademade_admin/_blocks/_search.html.erb +11 -0
  54. data/app/views/rademade_admin/_blocks/_sort_reset.html.erb +5 -0
  55. data/app/views/rademade_admin/_blocks/button/_cancel.html.erb +7 -0
  56. data/app/views/rademade_admin/_blocks/button/_destroy.html.erb +12 -0
  57. data/app/views/rademade_admin/_blocks/button/_edit.html.erb +4 -2
  58. data/app/views/rademade_admin/_blocks/button/_hide.html.erb +13 -0
  59. data/app/views/rademade_admin/_blocks/button/_preview.html.erb +3 -0
  60. data/app/views/rademade_admin/_blocks/form/_control.html.erb +9 -3
  61. data/app/views/rademade_admin/_blocks/form/_separator.html.erb +1 -0
  62. data/app/views/rademade_admin/_blocks/table/_head.html.erb +8 -2
  63. data/app/views/rademade_admin/_layouts/inner/index_table.html.erb +1 -3
  64. data/app/views/rademade_admin/_layouts/main.html.erb +26 -0
  65. data/app/views/rademade_admin/abstract/_form.html.erb +1 -7
  66. data/app/views/rademade_admin/abstract/index.html.erb +7 -13
  67. data/config/locales/rademade_admin.en.yml +16 -1
  68. data/config/locales/rademade_admin.ru.yml +22 -2
  69. data/config/routes.rb +9 -1
  70. data/lib/rademade_admin.rb +5 -0
  71. data/lib/rademade_admin/configuration.rb +6 -1
  72. data/lib/rademade_admin/engine.rb +4 -0
  73. data/lib/rademade_admin/gallery.rb +13 -0
  74. data/lib/rademade_admin/hideable.rb +37 -0
  75. data/lib/rademade_admin/input/related_select_input/related_list.rb +2 -2
  76. data/lib/rademade_admin/model/adapter/data.rb +8 -0
  77. data/lib/rademade_admin/model/adapter/data/active_record.rb +12 -2
  78. data/lib/rademade_admin/model/adapter/data/mongoid.rb +10 -8
  79. data/lib/rademade_admin/model/adapter/query/active_record.rb +8 -3
  80. data/lib/rademade_admin/model/configuration.rb +10 -8
  81. data/lib/rademade_admin/model/info.rb +13 -2
  82. data/lib/rademade_admin/model/info/data_item.rb +8 -3
  83. data/lib/rademade_admin/model/info/fields.rb +12 -2
  84. data/lib/rademade_admin/model/info/relation.rb +5 -0
  85. data/lib/rademade_admin/model/info/relation/gallery.rb +12 -0
  86. data/lib/rademade_admin/model/reflection.rb +4 -0
  87. data/lib/rademade_admin/routing/mapper.rb +1 -1
  88. data/lib/rademade_admin/routing/resource.rb +4 -0
  89. data/lib/rademade_admin/uploader/crop_photo.rb +3 -2
  90. data/lib/rademade_admin/version.rb +1 -1
  91. metadata +83 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b5a2cb3531638de5873ab10f39c9d89b5628d6e
4
- data.tar.gz: 377c15c9e31e321d6fac8e2994c2b88acfebe8c3
3
+ metadata.gz: ccaea2ae3050d33085373d84cb715b1cb037ad85
4
+ data.tar.gz: c8510ac4aae7b02c5afcb3c56e57e815dbeac39f
5
5
  SHA512:
6
- metadata.gz: 3fbfa9b7ec35b66ea9df3a88bfff40ce06ad34940d935b2768ef33e08b5317292eb702c71ac93085b9bb0be8446dd6cf3a6841cfc4f229fcea40b3541fc3cf67
7
- data.tar.gz: 57d1a457a2b782f2626e9fd4f0378cc0d018655b8ebfba0df2fbef067b9b8d1abd3d78eea98f2d57bfcd9a1dae26c3dbbed801690038c59616432f884f9311b0
6
+ metadata.gz: 842600c6b68c316e3aee92811e46523dd632262599691dfb51bd1d8a775a8044ed8d58713a798973af6c0b0adacc2670b6c2a541495bc9e485568b25af2c365e
7
+ data.tar.gz: c7164d86d919e0c207a71c7c0ab7ce367b7f7d5a4897cf8923f06c110ab2d8487727d464992183d3b638c2798d18f4222b1027e66b2ebe9471c5cff7f5594ac5
@@ -19,7 +19,7 @@ class @Location extends Backbone.View
19
19
 
20
20
  _initLayer : () ->
21
21
  L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
22
- attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
22
+ attribution : '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
23
23
  }).addTo(@map)
24
24
 
25
25
  _initMarker : () ->
@@ -27,6 +27,10 @@ class @Location extends Backbone.View
27
27
  icon : L.icon
28
28
  iconUrl : '<%= asset_path('rademade_admin/leaflet/marker-icon.png') %>'
29
29
  shadowUrl : '<%= asset_path('rademade_admin/leaflet/marker-shadow.png') %>'
30
+ iconSize : [25, 41]
31
+ shadowSize : [41, 41]
32
+ iconAnchor : [12, 41]
33
+ shadowAnchor: [12, 41]
30
34
  draggable : true
31
35
  marker.on 'dragend', (event) =>
32
36
  @_updateLatLng event.target.getLatLng()
@@ -0,0 +1,25 @@
1
+ class @StatusToggler
2
+
3
+ bindToggle : () ->
4
+ $('[data-toggle-url]').click (e) =>
5
+ @_toggleStatus $(e.currentTarget)
6
+
7
+ _toggleStatus : ($button) ->
8
+ unless @sending
9
+ @sending = true
10
+ $.ajax
11
+ type : 'post'
12
+ url : $button.data('toggleUrl')
13
+ dataType : 'json'
14
+ success : (data) =>
15
+ notifier.notify data.message
16
+ .always () =>
17
+ @sending = false
18
+
19
+ @init : () ->
20
+ statusToggler = new StatusToggler
21
+ statusToggler.bindToggle()
22
+ statusToggler
23
+
24
+ $ ->
25
+ $(document).on 'ready page:load init-plugins', StatusToggler.init
@@ -0,0 +1,8 @@
1
+ initTurboform = () ->
2
+ $('form[data-turboform]').on 'submit', () ->
3
+ separator = if @action.indexOf('?') is -1 then '?' else '&'
4
+ Turbolinks.visit @action + separator + $(this).serialize()
5
+ return false
6
+
7
+ $ ->
8
+ $(document).on 'ready page:load', initTurboform
@@ -29,10 +29,10 @@ class @FormPopup.View extends Backbone.View
29
29
  @$el.load url, =>
30
30
  @delegateEvents()
31
31
  @_init()
32
- @show();
32
+ @show()
33
33
 
34
34
  render : () ->
35
- @renderFromUrl @model.get('edit_url')
35
+ @renderFromUrl @model.get('editurl')
36
36
 
37
37
  _init : () ->
38
38
  $form = @$el.find 'form'
@@ -50,7 +50,7 @@ class @FormPopup.View extends Backbone.View
50
50
 
51
51
  _bindButton : () ->
52
52
  @$el.find('button').click (e) =>
53
- @model.set 'edit_url', $(e.currentTarget).data('new')
53
+ @model.set 'editurl', $(e.currentTarget).data('new')
54
54
  @render()
55
55
 
56
56
  _updatePosition : () ->
@@ -0,0 +1,35 @@
1
+ class @GalleryImageCollectionView extends Backbone.View
2
+
3
+ initImages : (className) ->
4
+ @images = new GalleryImageCollection()
5
+ @images.setClassName(className)
6
+ @$el.find('.gallery-image').each (index, image) =>
7
+ @_initImage $(image)
8
+
9
+ initSort : () ->
10
+ sortUrl = @$el.data('sortable-url')
11
+ if sortUrl
12
+ @images.setSortUrl sortUrl
13
+ @$el.sortable
14
+ stop : () =>
15
+ @images.sort @_getSortedImages()
16
+
17
+ addImage : ($image) ->
18
+ @_initImage $image
19
+ @$el.append $image
20
+
21
+ _getSortedImages : () =>
22
+ images = []
23
+ @$el.find('.gallery-image').each (index, el) ->
24
+ images.push $(el).data('id')
25
+ images
26
+
27
+ _initImage : ($image) ->
28
+ @images.add GalleryImageView.init($image)
29
+
30
+ @init : ($el, className) ->
31
+ collectionView = new this
32
+ el : $el
33
+ collectionView.initImages className
34
+ collectionView.initSort()
35
+ collectionView
@@ -0,0 +1,19 @@
1
+ class @GalleryImageCollection extends Backbone.Collection
2
+
3
+ setClassName : (className) ->
4
+ @className = className
5
+
6
+ getClassName : () ->
7
+ @className
8
+
9
+ setSortUrl : (sortUrl) ->
10
+ @sortUrl = sortUrl
11
+
12
+ sort : (images) ->
13
+ $.ajax
14
+ type : 'patch'
15
+ url : @sortUrl
16
+ data :
17
+ class_name : @className
18
+ images : images
19
+ dataType : 'json'
@@ -0,0 +1,25 @@
1
+ class @GalleryImageModel extends Backbone.Model
2
+
3
+ remove : () ->
4
+ $.ajax
5
+ type : 'delete'
6
+ url : @get 'removeUrl'
7
+ data :
8
+ class_name : @collection.getClassName()
9
+ dataType : 'json'
10
+ success : () =>
11
+ @trigger 'image-removed'
12
+ error : (data) =>
13
+ window.notifier.notify data.error
14
+
15
+ crop : (url, cropData, cb) ->
16
+ data =
17
+ id : @get('imageId')
18
+ class_name : @collection.getClassName()
19
+ data.crop = cropData
20
+ $.ajax
21
+ type : 'post'
22
+ url : url
23
+ data : data
24
+ dataType : 'json'
25
+ success : cb
@@ -0,0 +1,58 @@
1
+ class @GalleryImageView extends Backbone.View
2
+
3
+ events :
4
+ 'click .remove-ico' : 'remove'
5
+ 'click [data-crop]' : 'crop'
6
+
7
+ initialize : () ->
8
+ @model.on 'image-removed', @_onImageRemove
9
+ @_initCrop()
10
+
11
+ remove : () ->
12
+ @model.remove() if confirm I18n.t('rademade_admin.image_remove_confirm')
13
+
14
+ crop : () ->
15
+ @cropper.setOriginalDimensions @model.get('originalDimensions')
16
+ @cropper.show @model.get('fullUrl')
17
+ @$el.closest('.input-holder').append @cropper.$el
18
+
19
+ _initCrop : () ->
20
+ @_findCrop()
21
+ if @$crop.length > 0
22
+ @_updateModelCropData()
23
+ @cropper = new Cropper()
24
+ @cropper.on 'crop-image', @_cropImage
25
+
26
+ _cropImage : (cropData) =>
27
+ @model.crop @$crop.data('url'), cropData, (data) =>
28
+ @$el.find('img').attr('src', data.gallery_image_url)
29
+ @_updateCropHtml(data.crop_button_html)
30
+ @_updateModelCropData()
31
+
32
+ _updateModelCropData : () ->
33
+ @model.set
34
+ fullUrl : @$crop.data('fullUrl')
35
+ originalDimensions : @$crop.data('originalDimensions').split(',')
36
+
37
+ _updateCropHtml : (html) ->
38
+ @$crop.replaceWith(html)
39
+ @_findCrop()
40
+
41
+ _findCrop : () ->
42
+ @$crop = @$el.find('[data-crop]')
43
+
44
+ _onImageRemove : () =>
45
+ fadeTime = 300
46
+ @$el.fadeOut fadeTime
47
+ setTimeout () =>
48
+ @$el.remove()
49
+ , fadeTime
50
+
51
+ @init : ($el) ->
52
+ model = new GalleryImageModel
53
+ imageId : $el.data('id')
54
+ removeUrl : $el.find('.remove-ico').data('url')
55
+ new GalleryImageView
56
+ model : model
57
+ el : $el
58
+ model
@@ -0,0 +1,40 @@
1
+ class @Gallery extends Backbone.View
2
+
3
+ initUploadButton : () ->
4
+ @$uploadButton = @$el.find('.gallery-image-upload')
5
+ @galleryId = @$el.find('[type="hidden"]').val()
6
+ @galleryClassName = @$uploadButton.data('class-name')
7
+
8
+ initCollectionView : () ->
9
+ @collectionView = GalleryImageCollectionView.init @$el.find('.gallery-images-container'), @galleryClassName
10
+
11
+ bindUpload : () ->
12
+ @$uploadButton.fileupload
13
+ dataType : 'json'
14
+ url : @$uploadButton.data('url')
15
+ formData :
16
+ gallery_id : @galleryId
17
+ class_name : @galleryClassName
18
+ add : (e, $form) =>
19
+ $form.submit().done @_appendUploadResult
20
+
21
+ _appendUploadResult : (result) =>
22
+ $.each result.gallery_images_html, (index, image_html) =>
23
+ @collectionView.addImage $(image_html)
24
+
25
+ @init : ($el) ->
26
+ gallery = new this
27
+ el : $el
28
+ gallery.initUploadButton()
29
+ gallery.initCollectionView()
30
+ gallery.bindUpload()
31
+
32
+ @initAll : () ->
33
+ $('.gallery').each () ->
34
+ $gallery = $(this)
35
+ unless $gallery.data('initialized')
36
+ Gallery.init $gallery
37
+ $gallery.data('initialized', true)
38
+
39
+ $ ->
40
+ $(document).on('page:load ready init-plugins', Gallery.initAll)
@@ -30,7 +30,7 @@ class @Select2Input.RelatedView extends Backbone.View
30
30
  model = new Select2Input.RelatedModel
31
31
  id : $el.data('id')
32
32
  text : $el.find('span').text()
33
- edit_url : $el.find('[data-edit]').data('edit')
33
+ editurl : $el.find('[data-edit]').data('edit')
34
34
  new this
35
35
  el : $el
36
36
  model : model
@@ -2,6 +2,7 @@ class @Select2Input.View extends Backbone.View
2
2
 
3
3
  events :
4
4
  'click [data-new]' : 'addRelation'
5
+ 'click [data-edit-relation]' : 'editRelation'
5
6
 
6
7
  initItem : () ->
7
8
  @$item = @$el.find('.select-wrapper input[type="hidden"]')
@@ -33,7 +34,10 @@ class @Select2Input.View extends Backbone.View
33
34
  data : (term) -> { q : term }
34
35
  results : (data) -> { results : data }
35
36
  ).unbind('change').bind 'change', (e) =>
36
- @model.get('related').update(e.added) if e.added
37
+ if e.added
38
+ @model.get('related').update(e.added)
39
+ else if e.removed
40
+ @model.get('related').clear()
37
41
  @_updateData()
38
42
  @model.get('related').on 'data-change', @_updateData
39
43
 
@@ -42,6 +46,11 @@ class @Select2Input.View extends Backbone.View
42
46
  relatedModel = @_createRelatedModel $(e.currentTarget).data('new')
43
47
  FormPopup.Initializer.getInstance().showPopup relatedModel
44
48
 
49
+ editRelation : (e) ->
50
+ e.preventDefault()
51
+ if @model.get('related').get('editurl')
52
+ FormPopup.Initializer.getInstance().showPopup @model.get('related')
53
+
45
54
  _createRelatedModel : (url) ->
46
55
  relatedModel = @_relatedModel url
47
56
  relatedModel.on 'data-change', () =>
@@ -59,7 +68,7 @@ class @Select2Input.View extends Backbone.View
59
68
  relatedModel = new Select2Input.RelatedModel
60
69
  else
61
70
  relatedModel = @model.get('related')
62
- relatedModel.set 'edit_url', url
71
+ relatedModel.set 'editurl', url
63
72
  relatedModel
64
73
 
65
74
  @init : ($el) ->
@@ -1,8 +1,8 @@
1
1
  <div class="crop">
2
2
  <img class="crop-image" src="<%= imagePath %>">
3
3
  <div class="crop-actions">
4
- <button class="btn blue-btn" data-crop>Crop</button>
5
- <button class="btn red-btn" data-close>Discard</button>
4
+ <button class="btn blue-btn" data-crop><%= I18n.t('rademade_admin.crop') %></button>
5
+ <button class="btn red-btn" data-close><%= I18n.t('rademade_admin.discard') %></button>
6
6
  </div>
7
7
  <input type="hidden" data-crop-attribute="x"/>
8
8
  <input type="hidden" data-crop-attribute="y"/>
@@ -1,5 +1,5 @@
1
1
  <span><%= text %></span><%
2
- if (edit_url) {
3
- %><button data-edit="<%= edit_url %>"><%= I18n.t('rademade_admin.edit_related_item') %></button><%
2
+ if (editurl) {
3
+ %><button data-edit="<%= editurl %>"><%= I18n.t('rademade_admin.edit_related_item') %></button><%
4
4
  }
5
5
  %><button data-remove><%= I18n.t('rademade_admin.destroy') %></button>
@@ -43,7 +43,10 @@ class @Form extends Backbone.View
43
43
  @sending = true
44
44
 
45
45
  _onAjaxDone : (data) =>
46
- @trigger 'ajax-submit-done', [data]
46
+ if data.redirect_to
47
+ window.location.href = data.redirect_to
48
+ else
49
+ @trigger 'ajax-submit-done', [data]
47
50
 
48
51
  _onAjaxFail : (data) =>
49
52
  @trigger 'ajax-submit-fail', [data]
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  *= require jquery-fileupload/css/jquery.fileupload-ui
3
- *= require select2/select2
3
+ *= require select2
4
4
  *= require magnific-popup/dist/magnific-popup
5
5
  *= require jquery-ui/themes/base/core
6
6
  *= require jquery-ui/themes/base/slider
@@ -78,6 +78,7 @@
78
78
  @import rademade_admin/blocks/form/texarea
79
79
  @import rademade_admin/blocks/form/checkbox
80
80
  @import rademade_admin/blocks/form/map
81
+ @import rademade_admin/blocks/gallery/main
81
82
 
82
83
 
83
84
  /******************/
@@ -1,29 +1,58 @@
1
+ .view-option
2
+ position: relative
3
+ float: left
4
+ cursor: pointer
5
+ input
6
+ position: absolute
7
+ z-index: 10
8
+ top: 0
9
+ left: 0
10
+ +opacity(0)
11
+ &:checked + label
12
+ @extend .glyphicon-eye-open
13
+ label
14
+ cursor: pointer
15
+ @extend .glyphicon-eye-close
16
+
17
+ .content
18
+ .form-box
19
+ &.search
20
+ padding-left: 0
21
+ .input-holder
22
+ width: 400px
23
+ margin-right: 10px
24
+
1
25
  .form-box
2
- .input-holder
3
- float: left
4
- input[type="checkbox"]
5
- margin-top: 10px
6
- width: 20px
7
- height: 20px
26
+ .input-holder
27
+ float: left
28
+ .location
29
+ position: relative
30
+ z-index: 990
31
+
32
+ input[type="checkbox"]
33
+ margin-top: 11px
34
+ width: 20px
35
+ height: 20px
8
36
 
9
- input[type="text"],
10
- input[type="email"],
11
- input[type="password"],
12
- input[type="tel"]
13
- display: block
14
- width: 100%
15
- height: 34px
16
- padding: 6px 12px
17
- font-size: 14px
18
- color: #555
19
- background-color: #fff
20
- background-image: none
21
- border: 1px solid #ccc
22
- +box-sizing(border-box)
23
- +border-radius(4px)
24
- +box-shadow(inset 0 1px 1px rgba(0,0,0,.075))
25
- +transition(border-color ease-in-out .15s,box-shadow ease-in-out .15s)
26
- &:focus
27
- border-color: #66afe9
28
- outline: 0
29
- +box-shadow(inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6))
37
+ input[type="text"],
38
+ input[type="email"],
39
+ input[type="password"],
40
+ input[type="tel"],
41
+ input[type="number"]
42
+ display: block
43
+ width: 100%
44
+ height: 32px
45
+ padding: 6px 12px
46
+ font-size: 14px
47
+ color: #555
48
+ background-color: #fff
49
+ background-image: none
50
+ border: 1px solid #ccc
51
+ +box-sizing(border-box)
52
+ +border-radius(4px)
53
+ +box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075))
54
+ +transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s)
55
+ &:focus
56
+ border-color: #66afe9
57
+ outline: 0
58
+ +box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6))