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.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/app/api/locomotive/api/resources/content_type_resource.rb +16 -1
- data/app/api/locomotive/api/resources/page_resource.rb +9 -4
- data/app/api/locomotive/api/resources/snippet_resource.rb +17 -2
- data/app/api/locomotive/api/resources/theme_asset_resource.rb +11 -0
- data/app/api/locomotive/api/resources/translation_resource.rb +16 -1
- data/app/assets/javascripts/locomotive.js +1 -0
- data/app/assets/javascripts/locomotive/{not_logged_in.js.coffee → account.js.coffee} +1 -0
- data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +2 -2
- data/app/assets/stylesheets/locomotive/{unauthorized.scss → account.scss} +7 -8
- data/app/assets/stylesheets/locomotive/{unauthorized → account}/_forms.scss +19 -0
- data/app/assets/stylesheets/locomotive/{unauthorized → account}/_keyframes.scss +0 -0
- data/app/assets/stylesheets/locomotive/{unauthorized → account}/_notify.scss +3 -1
- data/app/assets/stylesheets/locomotive/{unauthorized → account}/_public.scss +98 -10
- data/app/assets/stylesheets/locomotive/{unauthorized → account}/_type.scss +0 -0
- data/app/assets/stylesheets/locomotive/{unauthorized → account}/_variables.scss +1 -1
- data/app/assets/stylesheets/locomotive/application.scss +1 -1
- data/app/assets/stylesheets/locomotive/base/_form.scss +1 -0
- data/app/assets/stylesheets/locomotive/base/form/_tags.scss +17 -0
- data/app/assets/stylesheets/locomotive/error.scss +1 -1
- data/app/assets/stylesheets/locomotive/layouts/_error.scss +33 -0
- data/app/controllers/locomotive/concerns/site_dispatcher_controller.rb +1 -2
- data/app/controllers/locomotive/passwords_controller.rb +1 -1
- data/app/controllers/locomotive/registrations_controller.rb +1 -1
- data/app/controllers/locomotive/sessions_controller.rb +1 -1
- data/app/controllers/locomotive/sites_controller.rb +1 -1
- data/app/helpers/locomotive/custom_fields_helper.rb +8 -2
- data/app/models/locomotive/editable_element.rb +2 -2
- data/app/policies/locomotive/application_policy.rb +4 -0
- data/app/policies/locomotive/content_type_policy.rb +4 -0
- data/app/policies/locomotive/site_policy.rb +1 -1
- data/app/policies/locomotive/snippet_policy.rb +4 -0
- data/app/policies/locomotive/theme_asset_policy.rb +4 -0
- data/app/policies/locomotive/translation_policy.rb +4 -0
- data/app/views/locomotive/current_site/_membership.html.slim +20 -19
- data/app/views/locomotive/layouts/{not_logged_in.html.slim → account.html.slim} +8 -3
- data/app/views/locomotive/passwords/edit.html.slim +2 -2
- data/app/views/locomotive/passwords/new.html.slim +2 -4
- data/app/views/locomotive/registrations/new.html.slim +2 -2
- data/app/views/locomotive/sessions/new.html.slim +2 -2
- data/app/views/locomotive/shared/header/_site.html.slim +1 -1
- data/app/views/locomotive/sites/_navigation.slim +5 -0
- data/app/views/locomotive/sites/_site.html.slim +6 -16
- data/app/views/locomotive/sites/index.html.slim +12 -19
- data/app/views/locomotive/sites/new.html.slim +13 -8
- data/config/locales/en.yml +8 -4
- data/lib/locomotive/engine.rb +2 -2
- data/lib/locomotive/version.rb +1 -1
- data/spec/lib/locomotive/steam/services/liquid_parser_with_cache_service_spec.rb +1 -1
- data/spec/models/locomotive/content_entry_spec.rb +1 -1
- data/spec/models/locomotive/editable_element_spec.rb +26 -0
- data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
- data/spec/support/capybara.rb +3 -3
- data/spec/support/features/session_helpers.rb +2 -3
- data/vendor/assets/{stylesheets/locomotive → components/locomotive/bootstrap-tagsinput}/bootstrap-tagsinput.css +16 -7
- data/vendor/assets/components/locomotive/bootstrap-tagsinput/bootstrap-tagsinput.js +663 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/Gruntfile.js +82 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/LICENSE +20 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/README.md +92 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/bootstrap-tagsinput.jquery.json +27 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/bower.json +42 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.js +87 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.min.js +7 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-angular.min.js.map +1 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput-typeahead.css +49 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.css +55 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.js +663 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.less +50 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js +7 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.min.js.map +1 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/dist/bootstrap-tagsinput.zip +0 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app.css +67 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app.js +15 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app_bs2.js +74 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/app_bs3.js +95 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/cities.json +16 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/assets/citynames.json +16 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/bootstrap-2.3.2.html +666 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/examples/index.html +742 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/karma.conf.js +20 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/package.json +47 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput-angular.js +87 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput-typeahead.css +49 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput.css +55 -0
- data/vendor/assets/components/locomotive_sources/bootstrap-tagsinput/src/bootstrap-tagsinput.js +663 -0
- data/vendor/assets/components/locomotive_sources/jquery/MIT-LICENSE.txt +21 -0
- data/vendor/assets/components/locomotive_sources/jquery/bower.json +28 -0
- data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.js +9210 -0
- data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.min.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/dist/jquery.min.map +1 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/ajax.js +786 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/ajax/jsonp.js +89 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/ajax/load.js +75 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/ajax/parseJSON.js +13 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/ajax/parseXML.js +28 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/ajax/script.js +64 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/ajax/var/nonce.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/ajax/var/rquery.js +3 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/ajax/xhr.js +136 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/attributes.js +11 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/attributes/attr.js +141 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/attributes/classes.js +158 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/attributes/prop.js +94 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/attributes/support.js +35 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/attributes/val.js +161 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/callbacks.js +205 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/core.js +502 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/core/access.js +60 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/core/init.js +123 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/core/parseHTML.js +39 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/core/ready.js +97 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/core/var/rsingleTag.js +4 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css.js +450 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/addGetHookIf.js +22 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/curCSS.js +57 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/defaultDisplay.js +70 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/support.js +96 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/swap.js +28 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/var/cssExpand.js +3 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/var/getStyles.js +12 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/var/isHidden.js +13 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/var/rmargin.js +3 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/css/var/rnumnonpx.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/data.js +178 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/data/Data.js +181 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/data/accepts.js +20 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/data/var/data_priv.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/data/var/data_user.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/deferred.js +149 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/deprecated.js +13 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/dimensions.js +50 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/effects.js +648 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/effects/Tween.js +114 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/effects/animatedSelector.js +13 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/event.js +868 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/event/ajax.js +13 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/event/alias.js +39 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/event/support.js +9 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/exports/amd.js +24 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/exports/global.js +32 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/intro.js +44 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/jquery.js +37 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/manipulation.js +580 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/_evalUrl.js +18 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/support.js +32 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/offset.js +207 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/outro.js +1 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/queue.js +142 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/queue/delay.js +22 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/selector-native.js +172 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/selector-sizzle.js +14 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/selector.js +1 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/serialize.js +111 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.js +2067 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/traversing.js +199 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/traversing/findFilter.js +100 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/arr.js +3 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/class2type.js +4 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/concat.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/hasOwn.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/indexOf.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/pnum.js +3 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/push.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/rnotwhite.js +3 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/slice.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/strundefined.js +3 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/support.js +4 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/var/toString.js +5 -0
- data/vendor/assets/components/locomotive_sources/jquery/src/wrap.js +79 -0
- metadata +138 -23
- data/app/assets/stylesheets/locomotive/base/not_logged_in/_all.scss +0 -4
- data/app/assets/stylesheets/locomotive/base/not_logged_in/_buttons.scss +0 -10
- data/app/assets/stylesheets/locomotive/base/not_logged_in/_form.scss +0 -72
- data/app/assets/stylesheets/locomotive/base/not_logged_in/_messages.scss +0 -4
- data/app/assets/stylesheets/locomotive/base/not_logged_in/_typography.scss +0 -12
- data/app/assets/stylesheets/locomotive/components/not_logged_in/_passwords.scss +0 -9
- data/app/assets/stylesheets/locomotive/components/not_logged_in/_sign_in_and_up.scss +0 -34
- data/app/models/locomotive/concerns/page/render.rb +0 -99
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2a2386aa3db8dd77dc0413f8e0c24eb8710f2e1
|
4
|
+
data.tar.gz: 587e0c476cdc25aac793826eead3d5b81e1ae5ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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 '
|
115
|
-
|
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
|
-
|
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
|
@@ -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
|
-
//
|
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 "
|
9
|
+
@import "account/variables";
|
10
10
|
@import "bootstrap/mixins";
|
11
|
-
@import "
|
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 "
|
23
|
-
@import "
|
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 "
|
34
|
-
@import "
|
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
|
|
File without changes
|
@@ -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
|
33
|
+
// Wraps and horizontally centers all content of the public boxes.
|
34
34
|
|
35
|
-
.public-
|
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
|
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
|
67
|
-
// height calculated.
|
66
|
+
// Contains the box styling.
|
68
67
|
|
69
|
-
.public-
|
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-
|
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-
|
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-
|
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
|
}
|