express_admin 1.7.11 → 1.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/express_admin.js +0 -2
- data/app/assets/stylesheets/express_admin/components/_command_button.sass +1 -6
- data/app/assets/stylesheets/express_admin/shared/_forms.sass +3 -12
- data/app/components/express_admin/command_button.rb +2 -8
- data/app/components/express_admin/flash_messages.rb +5 -7
- data/app/views/devise/sessions/new.html.et +16 -13
- data/app/views/layouts/devise.html.et +1 -1
- data/lib/express_admin/engine.rb +1 -2
- data/lib/express_admin/standard_actions.rb +2 -2
- data/lib/express_admin/version.rb +1 -1
- data/test/dummy/test/components/command_button_test.rb +2 -2
- metadata +2 -18
- data/app/assets/javascripts/express_admin/components/command_button.js.coffee +0 -25
- data/app/assets/javascripts/express_admin/form_validation.js.coffee +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a69e82e8a3cc8b7bf34bc7cf346832361f1b4bd
|
4
|
+
data.tar.gz: 80feed45c4298db113e753cb5db379d7956883da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d14626ed2f47b344e3c769eeaff580783e882fb5f4f3bd57aa3064a5583e078ea465634486eecca72c9637910fb26b71575fa0c9dd2b5b5fe2595aa42383abca
|
7
|
+
data.tar.gz: 578d067b2acfc1035ebfb38970eb5879cfc83d471f3e80503c075b0ffc21349193dd39366488e5e74637f5e464547f5949036eaf5dbeee0d59a3bb53b5925070
|
@@ -10,14 +10,9 @@
|
|
10
10
|
input
|
11
11
|
background-color: $green
|
12
12
|
|
13
|
-
input[disabled]
|
13
|
+
input[disabled="disabled"]
|
14
14
|
background-color: $gray
|
15
15
|
|
16
|
-
input[data-command-button-state="success"]
|
17
|
-
background-color: $green !important
|
18
|
-
|
19
|
-
input[data-command-button-state="failed"]
|
20
|
-
background-color: $red !important
|
21
16
|
|
22
17
|
.command-button-list
|
23
18
|
list-style-type: none
|
@@ -9,18 +9,9 @@
|
|
9
9
|
height: 6rem
|
10
10
|
|
11
11
|
.error
|
12
|
-
border:
|
13
|
-
|
14
|
-
|
15
|
-
span.error
|
16
|
-
display: block
|
17
|
-
border: 0
|
18
|
-
background-color: #f04124
|
19
|
-
color: $light
|
20
|
-
padding: 0.33333rem 0.5rem 0.5rem
|
21
|
-
font:
|
22
|
-
size: 0.85rem
|
23
|
-
margin-bottom: 1rem
|
12
|
+
border: none
|
13
|
+
input, select, textarea, .select2-container
|
14
|
+
border: 1px solid $red
|
24
15
|
|
25
16
|
.help
|
26
17
|
font:
|
@@ -16,7 +16,7 @@ module ExpressAdmin
|
|
16
16
|
}
|
17
17
|
|
18
18
|
contains -> {
|
19
|
-
button_to
|
19
|
+
button_to config[:command].to_s.titleize, action, button_to_options
|
20
20
|
}
|
21
21
|
|
22
22
|
def resource_name
|
@@ -24,7 +24,7 @@ module ExpressAdmin
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def button_to_options
|
27
|
-
{
|
27
|
+
{disabled: config[:disabled], confirm: config[:confirm]}
|
28
28
|
end
|
29
29
|
|
30
30
|
def action
|
@@ -38,12 +38,6 @@ module ExpressAdmin
|
|
38
38
|
end
|
39
39
|
return @parent_button_list
|
40
40
|
end
|
41
|
-
|
42
|
-
private
|
43
|
-
|
44
|
-
def command_title
|
45
|
-
config[:command].to_s.titleize
|
46
|
-
end
|
47
41
|
end
|
48
42
|
end
|
49
43
|
|
@@ -12,13 +12,11 @@ module ExpressAdmin
|
|
12
12
|
content_for(:page_javascript) {
|
13
13
|
script {
|
14
14
|
%Q(
|
15
|
-
|
16
|
-
$(function()
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
})
|
21
|
-
})
|
15
|
+
$(function() {
|
16
|
+
$('a.close').on('click', function(e){
|
17
|
+
e.preventDefault();
|
18
|
+
$(this).parents('.flash-messages').remove();
|
19
|
+
});
|
22
20
|
});
|
23
21
|
).html_safe
|
24
22
|
}
|
@@ -28,28 +28,31 @@ div(class: 'grid-container') {
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
|
31
|
-
|
31
|
+
div(class: 'row') {
|
32
|
+
div(class: 'large-12 columns') {
|
33
|
+
label(class: 'hide', for: "user_remember_me")
|
34
|
+
input name: "user[remember_me]", type: "hidden", value: "0"
|
35
|
+
input checked: "checked", id: "user_remember_me", name: "user[remember_me]", type: "checkbox", value: "1"
|
36
|
+
span " Remember me"
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
32
40
|
br
|
33
|
-
|
41
|
+
input class: "button radius expand small", name: "commit", type: "submit", value: "Sign in"
|
42
|
+
|
43
|
+
div(class: 'row') {
|
34
44
|
div(class: 'large-12 columns') {
|
35
45
|
div(class: 'row') {
|
36
46
|
div(class: 'large-12 columns') {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
span " Remember me"
|
41
|
-
br
|
42
|
-
}
|
43
|
-
}
|
44
|
-
br
|
45
|
-
div(class: 'row') {
|
46
|
-
div(class: 'large-12 columns') {
|
47
|
-
a(class: "gray-link", href: "/users/password/new") { "Forgot password?" }
|
47
|
+
para {
|
48
|
+
link_to 'Forgot Password?', new_user_password_path, class: 'gray-link'
|
49
|
+
}
|
48
50
|
}
|
49
51
|
oauth_sign_in_links(Devise.omniauth_providers)
|
50
52
|
}
|
51
53
|
}
|
52
54
|
}
|
55
|
+
|
53
56
|
}
|
54
57
|
}
|
55
58
|
}
|
data/lib/express_admin/engine.rb
CHANGED
@@ -8,7 +8,6 @@ require 'jquery-ui-rails'
|
|
8
8
|
require 'select2-rails'
|
9
9
|
require 'dropzonejs-rails'
|
10
10
|
require 'sass-rails'
|
11
|
-
require 'jquery-validation-rails'
|
12
11
|
require 'foundation_apps_styles'
|
13
12
|
require 'bourbon'
|
14
13
|
require 'gravatar_image_tag'
|
@@ -60,4 +59,4 @@ module ExpressAdmin
|
|
60
59
|
class Railtie < ::Rails::Railtie
|
61
60
|
config.app_generators.template_engine :et
|
62
61
|
end
|
63
|
-
end
|
62
|
+
end
|
@@ -63,7 +63,7 @@ module ExpressAdmin
|
|
63
63
|
begin
|
64
64
|
resource.send(command)
|
65
65
|
respond_to do |format|
|
66
|
-
format.html { redirect_to :
|
66
|
+
format.html { redirect_to action: show_view }
|
67
67
|
format.js { render status: :ok, body: nil } # maybe we should return enough info
|
68
68
|
#to alter display of available or enabled commands?
|
69
69
|
|
@@ -72,7 +72,7 @@ module ExpressAdmin
|
|
72
72
|
respond_to do |format|
|
73
73
|
format.html {
|
74
74
|
flash[:error] = e.to_s
|
75
|
-
redirect_to :
|
75
|
+
redirect_to action: show_view
|
76
76
|
}
|
77
77
|
format.js { render status: :bad_request, body: e.to_s }
|
78
78
|
end
|
@@ -22,9 +22,9 @@ module Components
|
|
22
22
|
}
|
23
23
|
end
|
24
24
|
|
25
|
-
test "command button creates a form with a submit button having the correct name
|
25
|
+
test "command button creates a form with a submit button having the correct name" do
|
26
26
|
assert_match /form.*action="\/widgets\/\d+\/twiddle"/, command_button(:twiddle, resource_name: :widget)
|
27
|
-
assert_match /input
|
27
|
+
assert_match /input type="submit" value="Twiddle"/, command_button(:twiddle, resource_name: :widget)
|
28
28
|
end
|
29
29
|
|
30
30
|
def command_button_list(*args)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: express_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Talcott Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bourbon
|
@@ -252,20 +252,6 @@ dependencies:
|
|
252
252
|
- - ">="
|
253
253
|
- !ruby/object:Gem::Version
|
254
254
|
version: '0'
|
255
|
-
- !ruby/object:Gem::Dependency
|
256
|
-
name: jquery-validation-rails
|
257
|
-
requirement: !ruby/object:Gem::Requirement
|
258
|
-
requirements:
|
259
|
-
- - ">="
|
260
|
-
- !ruby/object:Gem::Version
|
261
|
-
version: '0'
|
262
|
-
type: :runtime
|
263
|
-
prerelease: false
|
264
|
-
version_requirements: !ruby/object:Gem::Requirement
|
265
|
-
requirements:
|
266
|
-
- - ">="
|
267
|
-
- !ruby/object:Gem::Version
|
268
|
-
version: '0'
|
269
255
|
- !ruby/object:Gem::Dependency
|
270
256
|
name: textacular
|
271
257
|
requirement: !ruby/object:Gem::Requirement
|
@@ -420,10 +406,8 @@ files:
|
|
420
406
|
- app/assets/javascripts/ace/worker-html.js
|
421
407
|
- app/assets/javascripts/express_admin.js
|
422
408
|
- app/assets/javascripts/express_admin/admin.js.coffee
|
423
|
-
- app/assets/javascripts/express_admin/components/command_button.js.coffee
|
424
409
|
- app/assets/javascripts/express_admin/dataTables/dataTables.foundation.js
|
425
410
|
- app/assets/javascripts/express_admin/dataTables/jquery.dataTables.js
|
426
|
-
- app/assets/javascripts/express_admin/form_validation.js.coffee
|
427
411
|
- app/assets/javascripts/express_admin/scrollTableBody.js
|
428
412
|
- app/assets/javascripts/express_admin/sub_menu.js
|
429
413
|
- app/assets/javascripts/express_admin/utility.js
|
@@ -1,25 +0,0 @@
|
|
1
|
-
$ ->
|
2
|
-
$('.js-command-button').on 'ajax:send', ->
|
3
|
-
setButtonState $(this).find('input[type="submit"]'), 'loading'
|
4
|
-
false
|
5
|
-
$('.js-command-button').on 'ajax:success', ->
|
6
|
-
setButtonState $(this).find('input[type="submit"]'), 'success'
|
7
|
-
false
|
8
|
-
$('.js-command-button').on 'ajax:error', ->
|
9
|
-
setButtonState $(this).find('input[type="submit"]'), 'failed'
|
10
|
-
false
|
11
|
-
|
12
|
-
setButtonState = (button, state) ->
|
13
|
-
if state == 'loading'
|
14
|
-
button.val('Processing...').prop 'disabled', true
|
15
|
-
else if state == 'success'
|
16
|
-
button.val('Success!').attr 'data-command-button-state', 'success'
|
17
|
-
restoreButton(button)
|
18
|
-
else if state == 'failed'
|
19
|
-
button.val('Failed!').attr 'data-command-button-state', 'failed'
|
20
|
-
restoreButton(button)
|
21
|
-
|
22
|
-
restoreButton = (button) ->
|
23
|
-
setTimeout ->
|
24
|
-
button.val(button.data('command')).prop('disabled', false).removeAttr('data-command-button-state')
|
25
|
-
,1500
|
@@ -1,23 +0,0 @@
|
|
1
|
-
$ ->
|
2
|
-
$('form.validate').validate
|
3
|
-
errorElement: 'span'
|
4
|
-
|
5
|
-
email = $('[name$="[email]"]')
|
6
|
-
|
7
|
-
if email.size() > 0
|
8
|
-
email.rules 'add',
|
9
|
-
required: true
|
10
|
-
email: true
|
11
|
-
|
12
|
-
password = $('[name$="[password]"]')
|
13
|
-
|
14
|
-
if password.size() > 0
|
15
|
-
password.rules 'add',
|
16
|
-
required: true
|
17
|
-
minlength: 8
|
18
|
-
|
19
|
-
password_confirmation = $('[name$="[password_confirmation]"]')
|
20
|
-
|
21
|
-
if password_confirmation.size() > 0
|
22
|
-
password_confirmation.rules 'add',
|
23
|
-
equalTo: $('[name$="[password]"]')
|