rbbt-rest 1.2.19 → 1.2.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDg4YjY0Mjk2NDU0OTJiZWE1NGNkY2Y4ZWEwZjdiZTk1M2RlNTQ3Mg==
4
+ ZWQwMzQxOGYyM2FlNDNkNDVhMTAxZWVhMWNmNWZhZWU1OWJhOGQ4ZQ==
5
5
  data.tar.gz: !binary |-
6
- YTIzNzAyZjQyMTEzOTZmMDU3OTkwNmNhZWFjN2E0YTFmZjZjMjhkZA==
6
+ YzAyNTQwOTZlODQyZjZkNmRiZWRlMzE3OTBlYzNhZTM3MDZmMWNlZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZjkzZDVjMWViOTRiYzc1ZGJmNTk2ODU0NDIxYmFjMzk3MjhmODc3YTJmOGZh
10
- MjA0NGRiODUyNDFlYTRkNTg1NmUwZmRjZjIzYmI2NjE4MTcwMzc4N2VhOTA1
11
- MmJkMWI5NWQ4ODM3MzI1MjRjNDA0M2YyZjQxMjgzOWI3NGQ4NTg=
9
+ ZTQ0NDcwMzZmZmU1MTU3YzRjMmEzY2I1MjAzNTRjYTBhZmY5Mzg3YmJlZWU2
10
+ YWM5MTk3NjZkYTY3NDQ4MmE0M2YyZTM2M2EyMTE4MjhlMTI5ODU3ODRmZTNk
11
+ NGM1MTFkOTE4ZGI4NGFlOTUzNWUxZmQ5N2Y4YTI4OWEyZTNlOTU=
12
12
  data.tar.gz: !binary |-
13
- YWVjZDRhYzIzY2ViMTc5OTFjZWViNjJiM2E2ZDRjOWM2MGRmYjgyMTNkYjk0
14
- MGY3NGY0OWYwNzI5NTU1NGZiOGM0ZjQxYTY2OTFhYTA4NWY2MzQxY2MwYWYy
15
- MTQxMjY0YTFlOWU2OGIxMmQyMzVhOTJmNDljYzAxMmI2OTczMmI=
13
+ MWZmMzE4M2I2ZWFmZTAxZjFjMzRkMjFjNWQ3YjM1ZmYwNTNhNzU3OTIwOWI2
14
+ NzY1OWU3M2RjOWU0OWM4MGQ4MWU2MmE3YmRhYWZmMDI2MDFjZTUyZTk1NWM2
15
+ NDJkNzVjYWZkNGFhNmUxMGE4NzhiMzI3OTU4NTBmN2NjNTI3MmE=
@@ -24,6 +24,8 @@ module RbbtRESTHelpers
24
24
  def form_input(name, type, default = nil, current = nil, description = nil, id = nil, extra = {})
25
25
  html_options = consume_parameter(:html_options, extra) || {}
26
26
 
27
+ no_file = extra[:no_file] if extra
28
+
27
29
  case type
28
30
  when :multiple
29
31
  choices = consume_parameter(:choices, extra)
@@ -47,10 +49,6 @@ module RbbtRESTHelpers
47
49
  true_id = nil
48
50
  end
49
51
 
50
- #choice_html = html_tag("input", nil, :type => :hidden, :name => choice_name + "_checkbox_false", :value => "false") +
51
- # html_tag("input", nil, :type => :checkbox, :checked => check_true, :name => choice_name, :value => "true", :id => choice_id) +
52
- # input_label(choice_id, choice, nil, nil, extra.merge({:class => :inline}))
53
-
54
52
  choice_html = html_tag("input", nil, :type => :checkbox, :checked => check_true, :name => choice_name, :value => "true", :id => choice_id) +
55
53
  input_label(choice_id, choice, choice, nil, extra.merge({:class => :inline}))
56
54
 
@@ -98,17 +96,20 @@ module RbbtRESTHelpers
98
96
  value = current.nil? ? default : current
99
97
  value = value * "\n" if Array === value
100
98
 
101
- input_label(id, name, description, default, extra) +
102
- file_or_text_area(id, name, value)
99
+ if no_file
100
+ input_label(id, name, description, default, extra) +
101
+ html_tag("textarea", value || "" , :name => name, :id => id )
102
+ else
103
+ input_label(id, name, description, default, extra) +
104
+ file_or_text_area(id, name, value)
105
+ end
103
106
 
104
107
  when :select
105
108
  value = current.nil? ? default : current
106
109
 
107
-
108
110
  allow_empty = consume_parameter :allow_empty, extra
109
111
  select_options = consume_parameter :select_options, extra
110
112
 
111
-
112
113
  if select_options
113
114
  options = select_options.collect do |option|
114
115
  option, option_name = option if Array === option
@@ -118,10 +118,11 @@ $.widget("rbbt.table", {
118
118
  return false
119
119
  })
120
120
 
121
- table.on('click', 'tfoot > tr > th > ul.table_pagination > li.arrow > a.next', function(link){
122
- var stat = tool._status()
121
+ table.on('click', 'tfoot > tr > th > ul.table_pagination > li.arrow > a.next', function(evt){
122
+ var stat = tool._status();
123
+ var last = parseInt($(this).parents('ul.table_pagination').first().find('li.num').last().find('a').html())
123
124
 
124
- if (stat.num < stat.total + 1){ stat.num = stat.num + 1 }
125
+ if (stat.num < last){ stat.num = stat.num + 1 }
125
126
 
126
127
  tool._update(stat.url, stat.num, stat.size, stat.field, stat.filter)
127
128
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.19
4
+ version: 1.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez