netzke-core 0.12.0.beta → 0.12.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/javascripts/base.js +1 -0
- data/javascripts/ext.js +6 -23
- data/lib/netzke/core/configuration.rb +1 -1
- data/lib/netzke/core/dynamic_assets.rb +1 -1
- data/lib/netzke/core/railz/controller_extensions.rb +1 -1
- data/lib/netzke/core/services.rb +1 -1
- data/lib/netzke/core/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: 81d97b53ee053cd6e51cd1c6357cef5a1da6e38a
|
4
|
+
data.tar.gz: f57dceaa5c506811e9a08a3525069bf10e48df0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1daaf66a1fd8018749f8f49251d06f48ef6fdde1c59002eb388c3e98f4bb9ac31600999d8ade81bc92a85d6f6ed0fda9562e300960b26432eb173796ff663dfc
|
7
|
+
data.tar.gz: ee974614db16d80c6f671fce8d9138f92c97b4c9e8034c832080db9f9ee7161d11b93cb9fb9223cd33f7ba819b676cce2218c2679af0ab280acbe9b60bebec7f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[RDocs](http://rdoc.info/projects/netzke/netzke-core)
|
4
4
|
|
5
|
-
Netzke Core is the bare bones of the [Netzke framework](http://netzke.org). For pre-built full-featured components (like grids, forms, tab/accordion panels, etc), see [netzke-basepack](http://github.com/netzke/netzke-basepack)
|
5
|
+
Netzke Core is the bare bones of the [Netzke framework](http://netzke.org). For pre-built full-featured components (like grids, forms, tab/accordion panels, etc), see [netzke-basepack](http://github.com/netzke/netzke-basepack).
|
6
6
|
|
7
7
|
Some knowledge of Sencha Ext JS will be needed in order to fully understand this overview.
|
8
8
|
|
data/javascripts/base.js
CHANGED
@@ -185,6 +185,7 @@ Ext.define("Netzke.classes.Core.Mixin", {
|
|
185
185
|
cmpName = cfg.netzkeComponent;
|
186
186
|
cmpCfg = this.netzkeComponents[cmpName.camelize(true)];
|
187
187
|
if (!cmpCfg) throw "Netzke: unknown component " + cmpName;
|
188
|
+
cmpCfg.netzkeParent = this;
|
188
189
|
items[i] = Ext.apply(cmpCfg, cfg);
|
189
190
|
delete(item);
|
190
191
|
|
data/javascripts/ext.js
CHANGED
@@ -56,20 +56,6 @@ Ext.define('Netzke.FeedbackGhost', {
|
|
56
56
|
Ext.define('Netzke.classes.NetzkeRemotingProvider', {
|
57
57
|
extend: 'Ext.direct.RemotingProvider',
|
58
58
|
|
59
|
-
initComponent: function() {
|
60
|
-
this.callParent();
|
61
|
-
this.addEvent('serverexception'); // because 'exception' is reserved by Ext JS (but never used!)
|
62
|
-
},
|
63
|
-
|
64
|
-
listeners: {
|
65
|
-
// work-around the fact that 'exception' is never thrown by Ext JS
|
66
|
-
data: function(self, e) {
|
67
|
-
if (Ext.getClass(e) == Ext.direct.ExceptionEvent) {
|
68
|
-
this.fireEvent('serverexception', e);
|
69
|
-
}
|
70
|
-
}
|
71
|
-
},
|
72
|
-
|
73
59
|
getPayload: function(t){
|
74
60
|
return {
|
75
61
|
path: t.action,
|
@@ -195,6 +181,7 @@ Ext.define(null, {
|
|
195
181
|
var cfgs = this.buildParentClientConfigs();
|
196
182
|
var remotingArgs = {args: args, configs: cfgs};
|
197
183
|
|
184
|
+
// Calling Ext.Direct's function
|
198
185
|
Netzke.providers[config.id][methodName].call(scope, remotingArgs, function(result, e) {
|
199
186
|
var callbackParam = e;
|
200
187
|
|
@@ -363,8 +350,10 @@ Ext.define(null, {
|
|
363
350
|
var storedConfig = this.netzkeUndoLoadingComponent(config.itemId),
|
364
351
|
callbackParam;
|
365
352
|
|
353
|
+
config.netzkeParent = this;
|
354
|
+
|
366
355
|
if (storedConfig.configOnly) {
|
367
|
-
callbackParam = config;
|
356
|
+
callbackParam = Ext.apply(config, storedConfig);
|
368
357
|
} else {
|
369
358
|
var currentCmp = Ext.ComponentManager.get(config.id);
|
370
359
|
if (currentCmp) currentCmp.destroy();
|
@@ -388,7 +377,7 @@ Ext.define(null, {
|
|
388
377
|
}
|
389
378
|
|
390
379
|
if (storedConfig.callback) {
|
391
|
-
storedConfig.callback.call(storedConfig.scope || this, callbackParam);
|
380
|
+
storedConfig.callback.call(storedConfig.scope || this, callbackParam, storedConfig);
|
392
381
|
}
|
393
382
|
},
|
394
383
|
|
@@ -427,13 +416,7 @@ Ext.define(null, {
|
|
427
416
|
* Returns parent Netzke component
|
428
417
|
*/
|
429
418
|
netzkeGetParentComponent: function(){
|
430
|
-
|
431
|
-
var idSplit = this.id.split("__");
|
432
|
-
idSplit.pop();
|
433
|
-
var parentId = idSplit.join("__");
|
434
|
-
|
435
|
-
var res = parentId === "" ? null : Ext.getCmp(parentId);
|
436
|
-
return res;
|
419
|
+
return this.netzkeParent;
|
437
420
|
},
|
438
421
|
|
439
422
|
/**
|
@@ -40,7 +40,7 @@ module Netzke
|
|
40
40
|
# Generates initial javascript code that is dependent on Rails settings
|
41
41
|
def initial_dynamic_javascript(form_authenticity_token)
|
42
42
|
res = []
|
43
|
-
res << %(Ext.Ajax.
|
43
|
+
res << %(Ext.Ajax.setExtraParams({authenticity_token: '#{form_authenticity_token}'}); // Rails' forgery protection)
|
44
44
|
res << %{Ext.ns('Netzke');}
|
45
45
|
res << %{Ext.ns('Netzke.core');}
|
46
46
|
res << %{Netzke.RelativeUrlRoot = '#{ActionController::Base.config.relative_url_root}';}
|
@@ -18,7 +18,7 @@ module Netzke
|
|
18
18
|
def args
|
19
19
|
# for backward compatibility, fall back to old data structure (with the endpoint params being in the root of
|
20
20
|
# 'data')
|
21
|
-
remoting_args
|
21
|
+
remoting_args.has_key?("args") ? remoting_args["args"] : remoting_args.reject{|k,v| k == 'configs' }
|
22
22
|
end
|
23
23
|
|
24
24
|
def client_configs
|
data/lib/netzke/core/services.rb
CHANGED
@@ -137,7 +137,7 @@ module Netzke::Core
|
|
137
137
|
# Called when the method_missing tries to processes a non-existing component. Override when needed.
|
138
138
|
# Note: this should actually never happen unless you mess up with Netzke component loading mechanisms.
|
139
139
|
def component_missing(missing_component, params, this)
|
140
|
-
this.netzke_feedback "Unknown component #{missing_component}
|
140
|
+
this.netzke_feedback "Unknown component '#{missing_component}' in '#{name}'"
|
141
141
|
end
|
142
142
|
|
143
143
|
end
|
data/lib/netzke/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.0.
|
4
|
+
version: 0.12.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Gorin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uglifier
|