htmlgrid 1.0.9 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +7 -0
- data/lib/htmlgrid/dojotoolkit.rb +13 -23
- data/lib/htmlgrid/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: 5ff89d7ef9b327cfe5f71794afc0e08acabe92ae
|
4
|
+
data.tar.gz: 6669995c93c30107c4b20b207950fa3f7229ec0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a659474980dc94623435c3ede8307cf0249888ccb644187de53a29333936823780a4c3ae8a44a425d9bc15dc8b47865ca633a47ec1d31628ec7e7bffb44f6de
|
7
|
+
data.tar.gz: fd7d0cd908342a8fc1c48ee087f985dad3bd33ef5ca86cbcc43bde20b6213baff3290cdbdf2db86fe872a32c00f832bb0ee31540474863fc6d031640f47342b2
|
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
=== 1.1.0 / 06.07.2016
|
2
|
+
|
3
|
+
* Rename djConfig to dojoConfig
|
4
|
+
* Rename dojoType to data-dojo-type
|
5
|
+
* Remove duplicated dojoConfig (use only data-dojo-config)
|
6
|
+
* Add package support for onload script
|
7
|
+
|
1
8
|
=== 1.0.9 / 05.07.2016
|
2
9
|
|
3
10
|
* Made tooltip work with dojo 1.11
|
data/lib/htmlgrid/dojotoolkit.rb
CHANGED
@@ -14,11 +14,10 @@ module HtmlGrid
|
|
14
14
|
# DOJO_VERSION >= 1.7.0 only (removed old version support)
|
15
15
|
def dojo_tag(widget, args={}, inner_html='')
|
16
16
|
div = HtmlGrid::Div.new(@model, @session, self)
|
17
|
-
div.set_attribute('
|
18
|
-
lim = ","
|
17
|
+
div.set_attribute('data-dojo-type', widget)
|
19
18
|
args.each { |key, value|
|
20
|
-
if
|
21
|
-
value = value.join(
|
19
|
+
if value.is_a?(Array)
|
20
|
+
value = value.join(',')
|
22
21
|
end
|
23
22
|
div.set_attribute(key, value)
|
24
23
|
}
|
@@ -61,7 +60,7 @@ module HtmlGrid
|
|
61
60
|
end
|
62
61
|
unless(html.empty? || dojo_parse_widgets)
|
63
62
|
html << context.script('type' => 'text/javascript') {
|
64
|
-
"
|
63
|
+
"dojoConfig.searchIds.push('#{css_id}')"
|
65
64
|
}
|
66
65
|
end
|
67
66
|
dojo_dynamic_html(context) << html
|
@@ -83,16 +82,6 @@ module HtmlGrid
|
|
83
82
|
dojo_path = @lookandfeel.resource_global(:dojo_js)
|
84
83
|
dojo_path ||= '/resources/dojo/dojo/dojo.js'
|
85
84
|
args = { 'type' => 'text/javascript'}
|
86
|
-
headers << context.script(args.dup) {
|
87
|
-
"djConfig = {
|
88
|
-
isDebug: #{self.class::DOJO_DEBUG},
|
89
|
-
parseWidgets: #{dojo_parse_widgets},
|
90
|
-
preventBackButtonFix: #{!self.class::DOJO_BACK_BUTTON},
|
91
|
-
bindEncoding: '#{encoding}',
|
92
|
-
searchIds: [],
|
93
|
-
urchin: ''
|
94
|
-
};"
|
95
|
-
}
|
96
85
|
packages = ""
|
97
86
|
unless(self.class::DOJO_PREFIX.empty?)
|
98
87
|
packages = self.class::DOJO_PREFIX.collect { |prefix, path|
|
@@ -115,27 +104,28 @@ module HtmlGrid
|
|
115
104
|
].join(',')
|
116
105
|
args.store('data-dojo-config', config)
|
117
106
|
args.store('src', dojo_path)
|
118
|
-
|
119
107
|
headers << context.script(args)
|
120
108
|
args = { 'type' => 'text/javascript' }
|
121
109
|
headers << context.script(args) {
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
110
|
+
package_paths = self.class::DOJO_REQUIRE.map { |req|
|
111
|
+
"'#{req}'"
|
112
|
+
}.join(',')
|
113
|
+
package_names = self.class::DOJO_REQUIRE.map { |req|
|
114
|
+
req.split('/').last
|
115
|
+
}.join(',')
|
116
|
+
if @dojo_onloads
|
127
117
|
onloads = ''
|
128
118
|
@dojo_onloads.each { |onload|
|
129
119
|
onloads << "#{onload}\n"
|
130
120
|
}
|
131
121
|
script =
|
132
|
-
"require([#{
|
122
|
+
"require([#{package_paths}], function(#{package_names}) {" \
|
133
123
|
"ready(function() {" \
|
134
124
|
"#{onloads}" \
|
135
125
|
"});" \
|
136
126
|
"});"
|
137
127
|
else
|
138
|
-
script = "require([#{
|
128
|
+
script = "require([#{package_paths}]);"
|
139
129
|
end
|
140
130
|
script
|
141
131
|
}
|
data/lib/htmlgrid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htmlgrid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sbsm
|