extjs-mvc 0.1.20 → 0.1.22
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.
- data/VERSION +1 -1
- data/lib/extjs/data/store.rb +2 -2
- data/lib/helpers/component.rb +7 -6
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.22
|
data/lib/extjs/data/store.rb
CHANGED
@@ -41,9 +41,9 @@ module ExtJS::Data
|
|
41
41
|
# ugly hack for DirectProxy API. Have to add an Ext.onReady() after the Store constructor to set API
|
42
42
|
if @proxy === 'direct'
|
43
43
|
auto_load = @config.delete("autoLoad")
|
44
|
-
cname = @controller.capitalize
|
44
|
+
cname = @controller.controller_name.capitalize
|
45
45
|
script = "Ext.onReady(function() { var s = Ext.StoreMgr.get('#{@config["storeId"]}');"
|
46
|
-
if (@
|
46
|
+
if (@config["directFn"])
|
47
47
|
script += "s.proxy.directFn = #{cname}.#{@config["directFn"]};"
|
48
48
|
else
|
49
49
|
script += "s.proxy.setApi({create:#{cname}.#{@config["api"]["create"]},read:#{cname}.#{@config["api"]["read"]},update:#{cname}.#{@config["api"]["update"]},destroy:#{cname}.#{@config["api"]["destroy"]}});"
|
data/lib/helpers/component.rb
CHANGED
@@ -5,10 +5,8 @@ module ExtJS::Helpers
|
|
5
5
|
module Component
|
6
6
|
##
|
7
7
|
# add class-var @@extjs_on_ready
|
8
|
-
def self.included(
|
9
|
-
|
10
|
-
@@onready_queue = []
|
11
|
-
end
|
8
|
+
def self.included(helper)
|
9
|
+
|
12
10
|
end
|
13
11
|
|
14
12
|
def extjs_component(*params)
|
@@ -22,8 +20,10 @@ module ExtJS::Helpers
|
|
22
20
|
# <script></script> via #extjs_render
|
23
21
|
#
|
24
22
|
def extjs_onready(*params)
|
23
|
+
@onready_queue = [] if @onready_queue.nil?
|
24
|
+
|
25
25
|
params.each do |cmp|
|
26
|
-
|
26
|
+
@onready_queue << cmp
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -31,7 +31,8 @@ module ExtJS::Helpers
|
|
31
31
|
# Empties the on_ready queue. Renders within <script></script> tags
|
32
32
|
#
|
33
33
|
def extjs_render
|
34
|
-
|
34
|
+
@onready_queue = [] if @onready_queue.nil? # <--- ugly, ugh...having trouble with initializing my instance vars.
|
35
|
+
"<script>\nExt.onReady(function() {\n\t#{@onready_queue.collect {|cmp| (cmp.kind_of?(ExtJS::Component)) ? cmp.render : cmp}.join("\n\t")}\n });\n</script>"
|
35
36
|
end
|
36
37
|
end
|
37
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extjs-mvc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Scott
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-07 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|