extjs-mvc 0.1.20 → 0.1.22

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.20
1
+ 0.1.22
@@ -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 (@options["directFn"])
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"]}});"
@@ -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(controller)
9
- controller.class_eval do
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
- @@onready_queue << cmp
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
- "<script>\nExt.onReady(function() {\n\t#{@@onready_queue.collect {|cmp| (cmp.kind_of?(ExtJS::Component)) ? cmp.render : cmp}.join("\n\t")}\n });\n</script>"
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.20
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-06 00:00:00 -07:00
12
+ date: 2009-09-07 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency