locomotivecms 3.0.0.rc4 → 3.0.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/app/api/locomotive/api/resources/content_type_resource.rb +16 -1
  4. data/app/api/locomotive/api/resources/page_resource.rb +9 -4
  5. data/app/api/locomotive/api/resources/snippet_resource.rb +17 -2
  6. data/app/api/locomotive/api/resources/theme_asset_resource.rb +11 -0
  7. data/app/api/locomotive/api/resources/translation_resource.rb +16 -1
  8. data/app/assets/javascripts/locomotive.js +1 -0
  9. data/app/assets/javascripts/locomotive/{not_logged_in.js.coffee → account.js.coffee} +1 -0
  10. data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +2 -2
  11. data/app/assets/stylesheets/locomotive/{unauthorized.scss → account.scss} +7 -8
  12. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_forms.scss +19 -0
  13. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_keyframes.scss +0 -0
  14. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_notify.scss +3 -1
  15. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_public.scss +98 -10
  16. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_type.scss +0 -0
  17. data/app/assets/stylesheets/locomotive/{unauthorized → account}/_variables.scss +1 -1
  18. data/app/assets/stylesheets/locomotive/application.scss +1 -1
  19. data/app/assets/stylesheets/locomotive/base/_form.scss +1 -0
  20. data/app/assets/stylesheets/locomotive/base/form/_tags.scss +17 -0
  21. data/app/assets/stylesheets/locomotive/error.scss +1 -1
  22. data/app/assets/stylesheets/locomotive/layouts/_error.scss +33 -0
  23. data/app/controllers/locomotive/concerns/site_dispatcher_controller.rb +1 -2
  24. data/app/controllers/locomotive/passwords_controller.rb +1 -1
  25. data/app/controllers/locomotive/registrations_controller.rb +1 -1
  26. data/app/controllers/locomotive/sessions_controller.rb +1 -1
  27. data/app/controllers/locomotive/sites_controller.rb +1 -1
  28. data/app/helpers/locomotive/custom_fields_helper.rb +8 -2
  29. data/app/models/locomotive/editable_element.rb +2 -2
  30. data/app/policies/locomotive/application_policy.rb +4 -0
  31. data/app/policies/locomotive/content_type_policy.rb +4 -0
  32. data/app/policies/locomotive/site_policy.rb +1 -1
  33. data/app/policies/locomotive/snippet_policy.rb +4 -0
  34. data/app/policies/locomotive/theme_asset_policy.rb +4 -0
  35. data/app/policies/locomotive/translation_policy.rb +4 -0
  36. data/app/views/locomotive/current_site/_membership.html.slim +20 -19
  37. data/app/views/locomotive/layouts/{not_logged_in.html.slim → account.html.slim} +8 -3
  38. data/app/views/locomotive/passwords/edit.html.slim +2 -2
  39. data/app/views/locomotive/passwords/new.html.slim +2 -4
  40. data/app/views/locomotive/registrations/new.html.slim +2 -2
  41. data/app/views/locomotive/sessions/new.html.slim +2 -2
  42. data/app/views/locomotive/shared/header/_site.html.slim +1 -1
  43. data/app/views/locomotive/sites/_navigation.slim +5 -0
  44. data/app/views/locomotive/sites/_site.html.slim +6 -16
  45. data/app/views/locomotive/sites/index.html.slim +12 -19
  46. data/app/views/locomotive/sites/new.html.slim +13 -8
  47. data/config/locales/en.yml +8 -4
  48. data/lib/locomotive/engine.rb +2 -2
  49. data/lib/locomotive/version.rb +1 -1
  50. data/spec/lib/locomotive/steam/services/liquid_parser_with_cache_service_spec.rb +1 -1
  51. data/spec/models/locomotive/content_entry_spec.rb +1 -1
  52. data/spec/models/locomotive/editable_element_spec.rb +26 -0
  53. data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
  54. data/spec/support/capybara.rb +3 -3
  55. data/spec/support/features/session_helpers.rb +2 -3
  56. data/vendor/assets/{stylesheets/locomotive → components/locomotive/bootstrap-tagsinput}/bootstrap-tagsinput.css +16 -7
  57. data/vendor/assets/components/locomotive/bootstrap-tagsinput/bootstrap-tagsinput.js +663 -0
  58. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/Gruntfile.js +82 -0
  59. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/LICENSE +20 -0
  60. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/README.md +92 -0
  61. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/bootstrap-tagsinput.jquery.json +27 -0
  62. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/bower.json +42 -0
  63. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.js +87 -0
  64. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.min.js +7 -0
  65. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.min.js.map +1 -0
  66. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-typeahead.css +49 -0
  67. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.css +55 -0
  68. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.js +663 -0
  69. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.less +50 -0
  70. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js +7 -0
  71. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js.map +1 -0
  72. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.zip +0 -0
  73. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app.css +67 -0
  74. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app.js +15 -0
  75. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app_bs2.js +74 -0
  76. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app_bs3.js +95 -0
  77. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/cities.json +16 -0
  78. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/citynames.json +16 -0
  79. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/bootstrap-2.3.2.html +666 -0
  80. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/index.html +742 -0
  81. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/karma.conf.js +20 -0
  82. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/package.json +47 -0
  83. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput-angular.js +87 -0
  84. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput-typeahead.css +49 -0
  85. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput.css +55 -0
  86. data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput.js +663 -0
  87. data/vendor/assets/components/locomotive_sources/jquery/MIT-LICENSE.txt +21 -0
  88. data/vendor/assets/components/locomotive_sources/jquery/bower.json +28 -0
  89. data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.js +9210 -0
  90. data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.min.js +5 -0
  91. data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.min.map +1 -0
  92. data/vendor/assets/components/locomotive_sources/jquery/src/ajax.js +786 -0
  93. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/jsonp.js +89 -0
  94. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/load.js +75 -0
  95. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/parseJSON.js +13 -0
  96. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/parseXML.js +28 -0
  97. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/script.js +64 -0
  98. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/var/nonce.js +5 -0
  99. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/var/rquery.js +3 -0
  100. data/vendor/assets/components/locomotive_sources/jquery/src/ajax/xhr.js +136 -0
  101. data/vendor/assets/components/locomotive_sources/jquery/src/attributes.js +11 -0
  102. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/attr.js +141 -0
  103. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/classes.js +158 -0
  104. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/prop.js +94 -0
  105. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/support.js +35 -0
  106. data/vendor/assets/components/locomotive_sources/jquery/src/attributes/val.js +161 -0
  107. data/vendor/assets/components/locomotive_sources/jquery/src/callbacks.js +205 -0
  108. data/vendor/assets/components/locomotive_sources/jquery/src/core.js +502 -0
  109. data/vendor/assets/components/locomotive_sources/jquery/src/core/access.js +60 -0
  110. data/vendor/assets/components/locomotive_sources/jquery/src/core/init.js +123 -0
  111. data/vendor/assets/components/locomotive_sources/jquery/src/core/parseHTML.js +39 -0
  112. data/vendor/assets/components/locomotive_sources/jquery/src/core/ready.js +97 -0
  113. data/vendor/assets/components/locomotive_sources/jquery/src/core/var/rsingleTag.js +4 -0
  114. data/vendor/assets/components/locomotive_sources/jquery/src/css.js +450 -0
  115. data/vendor/assets/components/locomotive_sources/jquery/src/css/addGetHookIf.js +22 -0
  116. data/vendor/assets/components/locomotive_sources/jquery/src/css/curCSS.js +57 -0
  117. data/vendor/assets/components/locomotive_sources/jquery/src/css/defaultDisplay.js +70 -0
  118. data/vendor/assets/components/locomotive_sources/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  119. data/vendor/assets/components/locomotive_sources/jquery/src/css/support.js +96 -0
  120. data/vendor/assets/components/locomotive_sources/jquery/src/css/swap.js +28 -0
  121. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/cssExpand.js +3 -0
  122. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/getStyles.js +12 -0
  123. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/isHidden.js +13 -0
  124. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/rmargin.js +3 -0
  125. data/vendor/assets/components/locomotive_sources/jquery/src/css/var/rnumnonpx.js +5 -0
  126. data/vendor/assets/components/locomotive_sources/jquery/src/data.js +178 -0
  127. data/vendor/assets/components/locomotive_sources/jquery/src/data/Data.js +181 -0
  128. data/vendor/assets/components/locomotive_sources/jquery/src/data/accepts.js +20 -0
  129. data/vendor/assets/components/locomotive_sources/jquery/src/data/var/data_priv.js +5 -0
  130. data/vendor/assets/components/locomotive_sources/jquery/src/data/var/data_user.js +5 -0
  131. data/vendor/assets/components/locomotive_sources/jquery/src/deferred.js +149 -0
  132. data/vendor/assets/components/locomotive_sources/jquery/src/deprecated.js +13 -0
  133. data/vendor/assets/components/locomotive_sources/jquery/src/dimensions.js +50 -0
  134. data/vendor/assets/components/locomotive_sources/jquery/src/effects.js +648 -0
  135. data/vendor/assets/components/locomotive_sources/jquery/src/effects/Tween.js +114 -0
  136. data/vendor/assets/components/locomotive_sources/jquery/src/effects/animatedSelector.js +13 -0
  137. data/vendor/assets/components/locomotive_sources/jquery/src/event.js +868 -0
  138. data/vendor/assets/components/locomotive_sources/jquery/src/event/ajax.js +13 -0
  139. data/vendor/assets/components/locomotive_sources/jquery/src/event/alias.js +39 -0
  140. data/vendor/assets/components/locomotive_sources/jquery/src/event/support.js +9 -0
  141. data/vendor/assets/components/locomotive_sources/jquery/src/exports/amd.js +24 -0
  142. data/vendor/assets/components/locomotive_sources/jquery/src/exports/global.js +32 -0
  143. data/vendor/assets/components/locomotive_sources/jquery/src/intro.js +44 -0
  144. data/vendor/assets/components/locomotive_sources/jquery/src/jquery.js +37 -0
  145. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation.js +580 -0
  146. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/_evalUrl.js +18 -0
  147. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/support.js +32 -0
  148. data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/var/rcheckableType.js +3 -0
  149. data/vendor/assets/components/locomotive_sources/jquery/src/offset.js +207 -0
  150. data/vendor/assets/components/locomotive_sources/jquery/src/outro.js +1 -0
  151. data/vendor/assets/components/locomotive_sources/jquery/src/queue.js +142 -0
  152. data/vendor/assets/components/locomotive_sources/jquery/src/queue/delay.js +22 -0
  153. data/vendor/assets/components/locomotive_sources/jquery/src/selector-native.js +172 -0
  154. data/vendor/assets/components/locomotive_sources/jquery/src/selector-sizzle.js +14 -0
  155. data/vendor/assets/components/locomotive_sources/jquery/src/selector.js +1 -0
  156. data/vendor/assets/components/locomotive_sources/jquery/src/serialize.js +111 -0
  157. data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.js +2067 -0
  158. data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  159. data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  160. data/vendor/assets/components/locomotive_sources/jquery/src/traversing.js +199 -0
  161. data/vendor/assets/components/locomotive_sources/jquery/src/traversing/findFilter.js +100 -0
  162. data/vendor/assets/components/locomotive_sources/jquery/src/traversing/var/rneedsContext.js +6 -0
  163. data/vendor/assets/components/locomotive_sources/jquery/src/var/arr.js +3 -0
  164. data/vendor/assets/components/locomotive_sources/jquery/src/var/class2type.js +4 -0
  165. data/vendor/assets/components/locomotive_sources/jquery/src/var/concat.js +5 -0
  166. data/vendor/assets/components/locomotive_sources/jquery/src/var/hasOwn.js +5 -0
  167. data/vendor/assets/components/locomotive_sources/jquery/src/var/indexOf.js +5 -0
  168. data/vendor/assets/components/locomotive_sources/jquery/src/var/pnum.js +3 -0
  169. data/vendor/assets/components/locomotive_sources/jquery/src/var/push.js +5 -0
  170. data/vendor/assets/components/locomotive_sources/jquery/src/var/rnotwhite.js +3 -0
  171. data/vendor/assets/components/locomotive_sources/jquery/src/var/slice.js +5 -0
  172. data/vendor/assets/components/locomotive_sources/jquery/src/var/strundefined.js +3 -0
  173. data/vendor/assets/components/locomotive_sources/jquery/src/var/support.js +4 -0
  174. data/vendor/assets/components/locomotive_sources/jquery/src/var/toString.js +5 -0
  175. data/vendor/assets/components/locomotive_sources/jquery/src/wrap.js +79 -0
  176. metadata +138 -23
  177. data/app/assets/stylesheets/locomotive/base/not_logged_in/_all.scss +0 -4
  178. data/app/assets/stylesheets/locomotive/base/not_logged_in/_buttons.scss +0 -10
  179. data/app/assets/stylesheets/locomotive/base/not_logged_in/_form.scss +0 -72
  180. data/app/assets/stylesheets/locomotive/base/not_logged_in/_messages.scss +0 -4
  181. data/app/assets/stylesheets/locomotive/base/not_logged_in/_typography.scss +0 -12
  182. data/app/assets/stylesheets/locomotive/components/not_logged_in/_passwords.scss +0 -9
  183. data/app/assets/stylesheets/locomotive/components/not_logged_in/_sign_in_and_up.scss +0 -34
  184. data/app/models/locomotive/concerns/page/render.rb +0 -99
  185. data/vendor/assets/javascripts/locomotive/bootstrap-tagsinput.min.js +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b022aa4b532f3b4ab72f8e7218af9f6eb77f834
4
- data.tar.gz: 7fa421098346655a1eb58290defc5ffe2d2b1e0f
3
+ metadata.gz: b2a2386aa3db8dd77dc0413f8e0c24eb8710f2e1
4
+ data.tar.gz: 587e0c476cdc25aac793826eead3d5b81e1ae5ee
5
5
  SHA512:
6
- metadata.gz: 4dcd634a7df28ca685eb12c1cd2634d259db84a82a77336bd0abcc600d3e91e685129701ff10503367069c36aa3f2e3cb616bfd0b2f9174fcc11ef18ffb17f8d
7
- data.tar.gz: 514754acae872d4b2ea2c0721990885136f0ba305d4e42b84ad0721ff289d0d4ae9d781b0ddff9053ac97d86553c2d1bcd914b4cebca1f72462e2723bfccf963
6
+ metadata.gz: 707774e1c999222c310e6443c70d0613eecd3ad41a059666e66f3f94169772b7785aa30b0e5d04cbebdd889cb59822c984746e755b79d162692138a4a2185f86
7
+ data.tar.gz: b2023115a565d4b551437631a636cb649e6b875cc73069de060e9e0d2d2f888b73e4750451be768e65c439fbe76e61277ec617e44b527e90dd5dea8a30d68b53
data/Gemfile CHANGED
@@ -55,8 +55,8 @@ group :test do
55
55
  # gem 'cucumber-rails', require: false
56
56
  gem 'simplecov'
57
57
 
58
- gem 'capybara', '~> 2.4.4'
59
- gem 'poltergeist'
58
+ gem 'capybara', '~> 2.5.0'
59
+ gem 'poltergeist', '~> 1.8.1'
60
60
 
61
61
  gem 'grape-entity-matchers'
62
62
  gem 'shoulda-matchers', '2.7.0'
@@ -127,9 +127,13 @@ module Locomotive
127
127
 
128
128
  desc "Delete a content_type"
129
129
  params do
130
- requires :id, type: String, desc: 'ContentType ID'
130
+ requires :id, type: String, desc: 'ContentType ID or SLUG'
131
131
  end
132
132
  delete ':id' do
133
+ content_type = current_site.content_types.by_id_or_slug(params[:id]).first
134
+
135
+ raise ::Mongoid::Errors::DocumentNotFound.new(current_site.content_types, params) if content_type.nil?
136
+
133
137
  authorize content_type, :destroy?
134
138
 
135
139
  content_type.destroy
@@ -137,6 +141,17 @@ module Locomotive
137
141
  present content_type, with: entity_klass
138
142
  end
139
143
 
144
+ desc 'Delete all content types'
145
+ delete '/' do
146
+ auth :destroy_all?
147
+
148
+ number = current_site.content_types.count
149
+
150
+ current_site.content_types.destroy_all
151
+
152
+ present({ deletions: number })
153
+ end
154
+
140
155
  end
141
156
 
142
157
  end
@@ -107,12 +107,17 @@ module Locomotive
107
107
  present page, with: entity_klass, site: current_site
108
108
  end
109
109
 
110
- desc "Delete a page"
110
+ desc 'Delete a page'
111
111
  params do
112
- requires :id, type: String, desc: 'Page ID'
112
+ requires :id, type: String, desc: 'Page ID or PATH'
113
113
  end
114
- delete ':id' do
115
- authorize page, :destroy?
114
+ delete '*id' do
115
+ page_id_or_fullpath = params[:id].split('.json').first
116
+ @page = current_site.pages.by_id_or_fullpath(page_id_or_fullpath).first
117
+
118
+ raise ::Mongoid::Errors::DocumentNotFound.new(current_site.pages, { id: page_id_or_fullpath }) if page.nil?
119
+
120
+ object_auth :destroy?
116
121
 
117
122
  page.destroy
118
123
 
@@ -74,16 +74,31 @@ module Locomotive
74
74
 
75
75
  desc "Delete a snippet"
76
76
  params do
77
- requires :id, type: String, desc: 'Snippet ID'
77
+ requires :id, type: String, desc: 'Snippet ID or SLUG'
78
78
  end
79
79
  delete ':id' do
80
- authorize snippet, :destroy?
80
+ @snippet = current_site.snippets.by_id_or_slug(params[:id]).first
81
+
82
+ raise ::Mongoid::Errors::DocumentNotFound.new(current_site.snippets, params) if snippet.nil?
83
+
84
+ object_auth :destroy?
81
85
 
82
86
  snippet.destroy
83
87
 
84
88
  present snippet, with: entity_klass
85
89
  end
86
90
 
91
+ desc 'Delete all snippets'
92
+ delete '/' do
93
+ auth :destroy_all?
94
+
95
+ number = current_site.snippets.count
96
+
97
+ current_site.snippets.destroy_all
98
+
99
+ present({ deletions: number })
100
+ end
101
+
87
102
  end
88
103
 
89
104
  end
@@ -87,6 +87,17 @@ module Locomotive
87
87
  present theme_asset, with: entity_klass
88
88
  end
89
89
 
90
+ desc 'Delete all theme assets'
91
+ delete '/' do
92
+ auth :destroy_all?
93
+
94
+ number = current_site.theme_assets.count
95
+
96
+ current_site.theme_assets.destroy_all
97
+
98
+ present({ deletions: number })
99
+ end
100
+
90
101
  end
91
102
 
92
103
  end
@@ -76,9 +76,13 @@ module Locomotive
76
76
 
77
77
  desc "Delete a translation"
78
78
  params do
79
- requires :id, type: String, desc: 'Translation ID'
79
+ requires :id, type: String, desc: 'Translation ID or KEY'
80
80
  end
81
81
  delete ':id' do
82
+ @translation = current_site.translations.by_id_or_key(params[:id]).first
83
+
84
+ raise ::Mongoid::Errors::DocumentNotFound.new(current_site.translations, params) if translation.nil?
85
+
82
86
  object_auth :destroy?
83
87
 
84
88
  translation.destroy
@@ -86,6 +90,17 @@ module Locomotive
86
90
  present translation, with: entity_klass
87
91
  end
88
92
 
93
+ desc 'Delete all translations'
94
+ delete '/' do
95
+ auth :destroy_all?
96
+
97
+ number = current_site.translations.count
98
+
99
+ current_site.translations.destroy_all
100
+
101
+ present({ deletions: number })
102
+ end
103
+
89
104
  end
90
105
 
91
106
  end
@@ -10,6 +10,7 @@
10
10
  //= require bootstrap-sprockets
11
11
  //= require underscore/underscore
12
12
  //= require backbone/backbone
13
+ //= require bootstrap-tagsinput/bootstrap-tagsinput
13
14
  //= require codemirror
14
15
  //= require codemirror/modes/markdown
15
16
  //= require select2
@@ -1,4 +1,5 @@
1
1
  #= require jquery
2
+ #= require jquery_ujs
2
3
  #= require_self
3
4
  #= require underscore/underscore
4
5
  #= require locomotive/bootstrap-notify
@@ -44,10 +44,10 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
44
44
  @$('#active_tab').val(tab_name)
45
45
 
46
46
  change_state: ->
47
- @$('form button[type=submit]').button('loading')
47
+ @$('form button[type=submit], form input[type=submit]').button('loading')
48
48
 
49
49
  reset_state: ->
50
- @$('form button[type=submit]').button('reset')
50
+ @$('form button[type=submit], form input[type=submit]').button('reset')
51
51
 
52
52
  save: (event) ->
53
53
  @change_state()
@@ -1,14 +1,14 @@
1
1
  // =============================================================================
2
- // Unauthorized
2
+ // Account
3
3
  // =============================================================================
4
4
 
5
5
  // Stylesheet for all un-authorized pages like register, sign in, ...
6
6
 
7
7
  // Core variables and mixins
8
8
 
9
- @import "unauthorized/variables";
9
+ @import "account/variables";
10
10
  @import "bootstrap/mixins";
11
- @import "unauthorized/keyframes";
11
+ @import "account/keyframes";
12
12
 
13
13
  // Reset and dependencies
14
14
 
@@ -19,9 +19,8 @@
19
19
  // Core CSS
20
20
 
21
21
  @import "bootstrap/scaffolding";
22
- @import "unauthorized/type";
23
- @import "bootstrap/grid";
24
- @import "unauthorized/forms";
22
+ @import "account/type";
23
+ @import "account/forms";
25
24
  @import "bootstrap/buttons";
26
25
 
27
26
  // Components
@@ -30,5 +29,5 @@
30
29
 
31
30
  // Custom components
32
31
 
33
- @import "unauthorized/notify";
34
- @import "unauthorized/public";
32
+ @import "account/notify";
33
+ @import "account/public";
@@ -33,6 +33,25 @@ label {
33
33
  }
34
34
  }
35
35
 
36
+ // Link next to a button in forms.
37
+
38
+ .form-link {
39
+ display: inline-block;
40
+ margin-top: 17px;
41
+ margin-right: 20px;
42
+ color: $gray;
43
+ vertical-align: middle;
44
+ &:hover {
45
+ color: $gray-dark;
46
+ text-decoration: none;
47
+ }
48
+ &:focus,
49
+ &:active {
50
+ color: $gray-darker;
51
+ text-decoration: none;
52
+ }
53
+ }
54
+
36
55
  // Inline validations
37
56
  // =============================================================================
38
57
 
@@ -30,8 +30,10 @@
30
30
 
31
31
  [data-notify="container"] {
32
32
  position: relative;
33
+ width: 100%;
34
+ max-width: 350px;
33
35
  font-size: 0;
34
- border: none;
36
+ border: 0;
35
37
  box-shadow: 0 1px 10px rgba($black, .2);
36
38
  animation: fade-left .5s ease-out;
37
39
  .close {
@@ -15,7 +15,7 @@
15
15
  background: linear-gradient(to bottom, $brand-primary 60px, $brand-primary 20%, $brand-primary-alt);
16
16
  }
17
17
 
18
- // Centers the content of a public page.
18
+ // Centers the content vertically of a public page.
19
19
 
20
20
  .public-container {
21
21
  width: 100%;
@@ -30,16 +30,16 @@
30
30
  }
31
31
  }
32
32
 
33
- // Wraps and centers all content of the public forms.
33
+ // Wraps and horizontally centers all content of the public boxes.
34
34
 
35
- .public-form-wrapper {
35
+ .public-wrapper {
36
36
  display: inline-block;
37
37
  width: 480px;
38
38
  margin: 25px 0;
39
39
  vertical-align: middle;
40
40
  }
41
41
 
42
- // Adds a logo above the public form.
42
+ // Adds a logo above the public box.
43
43
 
44
44
  .public-logo {
45
45
  display: inline-block;
@@ -63,10 +63,9 @@
63
63
  }
64
64
  }
65
65
 
66
- // Contains the form styling. Note that each form should have a different
67
- // height calculated.
66
+ // Contains the box styling.
68
67
 
69
- .public-form {
68
+ .public-box {
70
69
  display: block;
71
70
  padding: 50px;
72
71
  margin: 25px 0 20px;
@@ -81,11 +80,14 @@
81
80
  .btn {
82
81
  margin-top: 22px;
83
82
  }
83
+ &.without-padding {
84
+ padding: 0;
85
+ }
84
86
  }
85
87
 
86
88
  // Styles intro title and text above the public form.
87
89
 
88
- .public-form-text {
90
+ .public-intro {
89
91
  display: block;
90
92
  margin-bottom: 20px;
91
93
  text-align: center;
@@ -96,15 +98,21 @@
96
98
  margin-bottom: 30px;
97
99
  color: $gray-light;
98
100
  }
101
+ &.with-padding {
102
+ padding: 50px 50px 0;
103
+ margin-bottom: 0;
104
+ }
99
105
  }
100
106
 
101
107
  // Creates a link below the public form.
102
108
 
103
109
  .public-link {
104
110
  display: inline-block;
111
+ margin: 0 10px;
105
112
  font-size: 14px;
106
113
  font-weight: 400;
107
114
  color: rgba($white, .7);
115
+ vertical-align: middle;
108
116
  transition: color $base-transition-speed linear;
109
117
  &:hover,
110
118
  &:active,
@@ -115,18 +123,98 @@
115
123
  }
116
124
  }
117
125
 
126
+ .public-link-divider {
127
+ display: inline-block;
128
+ color: rgba($white, .7);
129
+ vertical-align: middle;
130
+ }
131
+
132
+ // Public entries collection for applying scrollbar when height is to high.
133
+
134
+ .public-entries {
135
+ display: block;
136
+ max-height: 500px;
137
+ overflow: auto;
138
+ }
139
+
140
+ // Public entries, used in the sites overview.
141
+
142
+ .public-entry {
143
+ position: relative;
144
+ display: block;
145
+ padding: 15px 25px;
146
+ text-align: left;
147
+ background: transparent;
148
+ border-top: 1px solid $border-color-base;
149
+ transition: background $base-transition-speed linear;
150
+ img {
151
+ display: inline-block;
152
+ width: 60px;
153
+ margin-right: 25px;
154
+ vertical-align: middle;
155
+ border-radius: 50%;
156
+ }
157
+ .fa-arrow-right {
158
+ position: absolute;
159
+ top: 50%;
160
+ right: 25px;
161
+ margin-top: -8px;
162
+ font-size: 16px;
163
+ line-height: 1;
164
+ color: $gray-lighter;
165
+ }
166
+ &.is-add {
167
+ padding: 25px;
168
+ text-align: center;
169
+ border-radius: 0 0 $border-radius-base $border-radius-base;
170
+ .fa {
171
+ margin-right: 10px;
172
+ }
173
+ }
174
+ &:hover {
175
+ text-decoration: none;
176
+ background: $gray-lightest;
177
+ }
178
+ &:active,
179
+ &:focus {
180
+ text-decoration: none;
181
+ background: $gray-lighter;
182
+ outline: none;
183
+ }
184
+ }
185
+
186
+ // Public entry information next to the image.
187
+
188
+ .public-entry-info {
189
+ display: inline-block;
190
+ vertical-align: middle;
191
+ h5 {
192
+ color: $gray-darker;
193
+ }
194
+ p {
195
+ margin: 5px 0 0;
196
+ color: $gray-light;
197
+ }
198
+ }
199
+
118
200
  // Responsive
119
201
  // =============================================================================
120
202
 
121
203
  @media (max-width: $screen-xs-min) {
122
- .public-form-wrapper {
204
+ .public-wrapper {
123
205
  left: 0;
124
206
  width: 99%;
125
207
  padding: 20px 10px;
126
208
  margin-left: 0;
127
209
  }
128
- .public-form {
210
+ .public-box {
129
211
  display: inline-block;
130
212
  padding: 50px 20px;
131
213
  }
214
+ .public-intro.with-padding {
215
+ padding: 50px 20px 0;
216
+ }
217
+ .public-entry {
218
+ padding: 15px 20px;
219
+ }
132
220
  }