bbmb 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/lib/bbmb/html/state/customers.rb +15 -7
- data/lib/bbmb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67ee64829561f37c9cf3c4eb2346f7add7bb7092
|
4
|
+
data.tar.gz: 34b5e99df58800d3193b7d89328a0828ee9501ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ffe4cd1c37bca62263f89e50277040889f4ea6b5bce32da42b6308b97a5c60a5e36e295ce06afe6042aa3ee635fb8f372ef42f41124269a7879e6dc9dbb3e2d
|
7
|
+
data.tar.gz: 4699bbcbddc0678a2dd359a17bd772bda1f89a48b1d25969cb8f9e325fc008005f46e4374023d074c58ea55ebe7a2770b315a01a4e65bab897d84d80ba1aa12c
|
data/History.txt
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
1
|
# Html::State::Customers -- bbmb.ch -- 18.09.2006 -- hwyss@ywesee.com
|
3
2
|
|
4
3
|
require 'bbmb/html/state/global_predefine'
|
@@ -18,15 +17,24 @@ class Customers < Global
|
|
18
17
|
start = Time.now
|
19
18
|
@model = BBMB.persistence.all(Model::Customer)
|
20
19
|
@sortby = [:organisation]
|
21
|
-
BBMB.logger.debug('State') {
|
22
|
-
sprintf("Customers#init: loaded %i customers in %1.5fs",
|
20
|
+
BBMB.logger.debug('State') {
|
21
|
+
sprintf("Customers#init: loaded %i customers in %1.5fs",
|
23
22
|
@model.size, Time.now - start)
|
24
23
|
}
|
25
24
|
@filter = Proc.new { |model|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
input = @session.event_bound_user_input(:filter)
|
26
|
+
if input
|
27
|
+
pattern = Regexp.new(input.gsub('*', '.*'), 'ui')
|
28
|
+
model = model.select { |customer|
|
29
|
+
FILTER.any? { |key|
|
30
|
+
value = customer.send(key).to_s
|
31
|
+
next if value.empty?
|
32
|
+
begin
|
33
|
+
pattern.match(value)
|
34
|
+
rescue ArgumentError
|
35
|
+
false
|
36
|
+
end
|
37
|
+
}
|
30
38
|
}
|
31
39
|
end
|
32
40
|
get_sortby!
|
data/lib/bbmb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbmb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz, Niklaus Giger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: odba
|