caboose-cms 0.6.31 → 0.6.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/assets/javascripts/caboose/model/index_table.js +25 -1
- data/app/controllers/caboose/login_controller.rb +3 -3
- data/app/controllers/caboose/orders_controller.rb +6 -2
- data/app/models/caboose/caboose_plugin.rb +4 -0
- data/app/views/caboose/orders/admin_invalid_order.html.erb +3 -0
- data/lib/caboose/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2JlODk5YTY0MzRkMzVmNjJjOWU5ZTkxYjVhZGQyY2RiMDA2OTI5Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGYxMTViOWU5NmVlN2NhNDllMTgwNDU0MjhiMzdmNzdhODc4YzIwOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTIzMWU2ZDFkNTU0ZGI2YjlmZDU3NmUwMmRmMDUyZDMyYzVlODc2OWYwYTE0
|
10
|
+
ZDU0MDRiZDBjYzBiMDI0YzY1NjE4MDhiYWUyYWU3M2U5ZWQzOWZiYWNlZWZj
|
11
|
+
NjBhMjdhOGM1OGJhZGVlZmRhNmE5OWMxZjZiZWUxZmYxNjI5YjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWViMGY4MTQzOGQzMGVhNzU4ZWY0ZGFkMWU1NjI4MjQ2NWIzNDhlNDYwZGE0
|
14
|
+
MDM3ZWI3MmU0NjRjZTZiM2IyOGU4Y2RkYTk0ZDc5YWM5OTczNjNkYTRiNjU5
|
15
|
+
MDZhYmFkNWVlNDI3YWMyZDY0Y2UxZTU0OWE3ZGU3NGE5NjUzNzY=
|
@@ -832,13 +832,37 @@ IndexTable.prototype = {
|
|
832
832
|
|
833
833
|
new_form: function()
|
834
834
|
{
|
835
|
-
var that = this;
|
835
|
+
var that = this;
|
836
|
+
|
837
|
+
$.each(this.new_model_fields, function(i, f) {
|
838
|
+
if (f.options_url && !f.options)
|
839
|
+
{
|
840
|
+
$.ajax({
|
841
|
+
url: f.options_url,
|
842
|
+
type: 'get',
|
843
|
+
success: function(resp) { f.options = resp },
|
844
|
+
async: false
|
845
|
+
});
|
846
|
+
}
|
847
|
+
});
|
848
|
+
|
836
849
|
var form = $('<form/>').attr('id', 'new_form')
|
837
850
|
.append($('<input/>').attr('type', 'hidden').attr('name', 'authenticity_token').val(that.form_authenticity_token));
|
838
851
|
var focus_field = false;
|
839
852
|
$.each(this.new_model_fields, function(i, f) {
|
840
853
|
if (f.type == 'hidden')
|
841
854
|
form.append($('<input/>').attr('type', 'hidden').attr('name', f.name).val(f.value));
|
855
|
+
else if (f.type == 'select')
|
856
|
+
{
|
857
|
+
var select = $('<select/>').attr('name', f.name);
|
858
|
+
$.each(f.options, function(i, option) {
|
859
|
+
var opt = $('<option/>').val(option.value).html(option.text);
|
860
|
+
if (f.value && f.value == option.value)
|
861
|
+
opt.attr('selected', 'true');
|
862
|
+
select.append(opt);
|
863
|
+
});
|
864
|
+
form.append(select);
|
865
|
+
}
|
842
866
|
else
|
843
867
|
{
|
844
868
|
form.append($('<p/>').append($('<input/>').attr('type', 'text').attr('name', f.name).attr('placeholder', f.nice_name).css('width', '' + f.width + 'px')));
|
@@ -38,9 +38,9 @@ module Caboose
|
|
38
38
|
else
|
39
39
|
remember = params[:remember] && (params[:remember] == 1 || params[:remember] == "1")
|
40
40
|
login_user(login_resp.user, remember)
|
41
|
-
resp.redirect = return_url
|
42
|
-
resp.
|
43
|
-
|
41
|
+
#resp.redirect = return_url
|
42
|
+
resp.redirect = Caboose.plugin_hook('login_success', return_url, login_resp.user)
|
43
|
+
resp.modal = false
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
@@ -55,8 +55,12 @@ module Caboose
|
|
55
55
|
# GET /admin/orders/:id
|
56
56
|
def admin_edit
|
57
57
|
return if !user_is_allowed('orders', 'edit')
|
58
|
-
@order = Order.
|
59
|
-
|
58
|
+
@order = Order.where(:id => params[:id]).first
|
59
|
+
|
60
|
+
if params[:id].nil? || @order.nil?
|
61
|
+
render :file => 'caboose/orders/admin_invalid_order', :layout => 'caboose/admin'
|
62
|
+
return
|
63
|
+
end
|
60
64
|
render :layout => 'caboose/admin'
|
61
65
|
end
|
62
66
|
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -914,6 +914,7 @@ files:
|
|
914
914
|
- app/views/caboose/orders/admin_delete_form.html.erb
|
915
915
|
- app/views/caboose/orders/admin_edit.html.erb
|
916
916
|
- app/views/caboose/orders/admin_index.html.erb
|
917
|
+
- app/views/caboose/orders/admin_invalid_order.html.erb
|
917
918
|
- app/views/caboose/orders/admin_new.html.erb
|
918
919
|
- app/views/caboose/orders/admin_print.html.erb
|
919
920
|
- app/views/caboose/orders/admin_summary_report.html.erb
|