rsence-pre 2.2.0.19 → 2.2.0.20
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/js/controls/button/button.js +9 -4
- data/js/controls/textcontrol/textcontrol.js +4 -2
- data/js/core/rsence_ns/rsence_ns.coffee +7 -0
- data/js/foundation/application/application.js +24 -2
- data/js/foundation/control/valueaction/valueaction.js +1 -2
- data/js/foundation/geom/rect/rect.js +4 -0
- data/js/foundation/system/system.js +9 -3
- data/js/foundation/view/view.js +4 -1
- data/lib/plugins/guiparser.rb +2 -5
- data/plugins/client_pkg/lib/client_pkg_serve.rb +1 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.0.
|
1
|
+
2.2.0.20.pre
|
@@ -48,16 +48,21 @@ HClickButton = HButton.extend({
|
|
48
48
|
click: true
|
49
49
|
},
|
50
50
|
|
51
|
+
controlDefaults: HControlDefaults.extend({
|
52
|
+
clickOnValue: 1,
|
53
|
+
clickOffValue: 0
|
54
|
+
}),
|
55
|
+
|
51
56
|
/** = Description
|
52
57
|
* Sets the button enabled if this.value is 0.
|
53
58
|
*
|
54
59
|
**/
|
55
60
|
refreshValue: function(){
|
56
61
|
if( this.options.inverseValue ){
|
57
|
-
this.setEnabled( this.value ===
|
62
|
+
this.setEnabled( this.value === this.options.clickOnValue );
|
58
63
|
}
|
59
64
|
else {
|
60
|
-
this.setEnabled( this.value ===
|
65
|
+
this.setEnabled( this.value === this.options.clickOffValue );
|
61
66
|
}
|
62
67
|
},
|
63
68
|
/** = Description
|
@@ -67,10 +72,10 @@ HClickButton = HButton.extend({
|
|
67
72
|
click: function(){
|
68
73
|
if(this.enabled){
|
69
74
|
if( this.options.inverseValue ){
|
70
|
-
this.setValue(
|
75
|
+
this.setValue( this.options.clickOffValue );
|
71
76
|
}
|
72
77
|
else {
|
73
|
-
this.setValue(
|
78
|
+
this.setValue( this.options.clickOnValue );
|
74
79
|
}
|
75
80
|
}
|
76
81
|
}
|
@@ -64,8 +64,10 @@ HTextControl = HControl.extend({
|
|
64
64
|
},
|
65
65
|
|
66
66
|
lostActiveStatus: function(){
|
67
|
-
|
68
|
-
|
67
|
+
if(this['markupElemIds']!==undefined){
|
68
|
+
ELEM.get( this.markupElemIds.value ).blur();
|
69
|
+
this.textBlur();
|
70
|
+
}
|
69
71
|
},
|
70
72
|
|
71
73
|
setStyle: function(_name, _value, _cacheOverride) {
|
@@ -17,3 +17,10 @@ RSence =
|
|
17
17
|
# JSONRenderer instances by plugin name.
|
18
18
|
guiTrees: {}
|
19
19
|
|
20
|
+
killGuiTree: (_guiName)->
|
21
|
+
_guiTrees = RSence.guiTrees
|
22
|
+
_guiTree = _guiTrees[_guiName]
|
23
|
+
if _guiTree?
|
24
|
+
_guiTree.die()
|
25
|
+
_guiTrees[_guiName] = null
|
26
|
+
delete _guiTrees[_guiName]
|
@@ -129,7 +129,24 @@ HApplication = HClass.extend({
|
|
129
129
|
*
|
130
130
|
**/
|
131
131
|
removeView: function(_viewId){
|
132
|
-
|
132
|
+
if( typeof _viewId === 'object' ){
|
133
|
+
console.log('warning, viewId not a number:',_viewId,', trying to call its remove method directly..');
|
134
|
+
_viewId.remove();
|
135
|
+
return this;
|
136
|
+
}
|
137
|
+
var
|
138
|
+
_view = HSystem.views[_viewId];
|
139
|
+
if( _view ){
|
140
|
+
if( _view['remove'] ){
|
141
|
+
HSystem.views[_viewId].remove();
|
142
|
+
}
|
143
|
+
else {
|
144
|
+
console.log('view does not have method "remove":',_view);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
else {
|
148
|
+
console.log('tried to remove non-existent viewId:'+_viewId);
|
149
|
+
}
|
133
150
|
},
|
134
151
|
|
135
152
|
/** = Description
|
@@ -166,7 +183,12 @@ HApplication = HClass.extend({
|
|
166
183
|
**/
|
167
184
|
destroyAllViews: function(){
|
168
185
|
for(var i = 0; i < this.views.length; i++) {
|
169
|
-
|
186
|
+
try{
|
187
|
+
HSystem.views[this.views[i]].die();
|
188
|
+
}
|
189
|
+
catch(e){
|
190
|
+
console.log('unable to destroy:',this.views[i]);
|
191
|
+
}
|
170
192
|
}
|
171
193
|
},
|
172
194
|
|
@@ -33,14 +33,13 @@ HValueAction = HClass.extend({
|
|
33
33
|
if(_sysUpdateZIndexOfChildrenBufferIndex !== -1){
|
34
34
|
HSystem._updateZIndexOfChildrenBuffer.splice( _sysUpdateZIndexOfChildrenBufferIndex, 1 );
|
35
35
|
}
|
36
|
-
this._updateZIndexAllSiblings();
|
37
36
|
this.parent = null;
|
38
37
|
this.parents = [];
|
39
38
|
}
|
40
39
|
return this;
|
41
40
|
},
|
42
41
|
die: function(){
|
43
|
-
this.parent.removeView( this );
|
42
|
+
this.parent.removeView( this.viewId );
|
44
43
|
if( this.valueObj ){
|
45
44
|
this.valueObj.release( this );
|
46
45
|
}
|
@@ -123,6 +123,10 @@ HRect = HClass.extend({
|
|
123
123
|
_view = HSystem.views[_viewId];
|
124
124
|
if(_view.flexRight || _view.flexBottom){
|
125
125
|
ELEM.flushLoop();
|
126
|
+
if( !_view.parent ){
|
127
|
+
_this.updateSecondaryValues();
|
128
|
+
return;
|
129
|
+
}
|
126
130
|
_parentElemId = _view.parent.elemId;
|
127
131
|
_parentSize = _view.parentSize();
|
128
132
|
_parentWidth = _parentSize[0];
|
@@ -64,15 +64,21 @@ HSystem = {
|
|
64
64
|
/** Calls applications, uses the prority as a prioritizer.
|
65
65
|
**/
|
66
66
|
scheduler: function(){
|
67
|
-
|
67
|
+
var
|
68
|
+
_appId=0,
|
69
|
+
_priority;
|
68
70
|
// Loop through all applications:
|
69
|
-
for(
|
71
|
+
for( ; _appId<this.apps.length; _appId++ ){
|
70
72
|
// Check, if the application exists:
|
71
73
|
if( this.apps[ _appId ] ){
|
72
74
|
// Check, if the application is busy:
|
73
75
|
if( !this.busyApps[ _appId ] ){
|
76
|
+
_priority = this.appPriorities[ _appId ];
|
77
|
+
if( _priority < 0 ){
|
78
|
+
continue;
|
79
|
+
}
|
74
80
|
// Check, if the tick count matches the priority of the app:
|
75
|
-
if(
|
81
|
+
if( this.ticks % _priority === 0 ){
|
76
82
|
// Set the app busy, the app itself should "unbusy" itself, when the idle call is done.
|
77
83
|
// That happens in <HApplication._startIdle>
|
78
84
|
|
data/js/foundation/view/view.js
CHANGED
@@ -874,6 +874,9 @@ HView = HClass.extend({
|
|
874
874
|
/** Gets the size of the parent. If the parent is the document body, uses the browser window size.
|
875
875
|
**/
|
876
876
|
parentSize: function(){
|
877
|
+
if(!this.parent){
|
878
|
+
return [ 0, 0 ];
|
879
|
+
}
|
877
880
|
if(this.parent.elemId === 0){
|
878
881
|
var
|
879
882
|
_winSize = ELEM.windowSize(),
|
@@ -1371,7 +1374,7 @@ HView = HClass.extend({
|
|
1371
1374
|
*
|
1372
1375
|
**/
|
1373
1376
|
removeView: function(_viewId) {
|
1374
|
-
|
1377
|
+
this.app.removeView( _viewId ); // no reason to duplicate this functionality here
|
1375
1378
|
return this;
|
1376
1379
|
},
|
1377
1380
|
|
data/lib/plugins/guiparser.rb
CHANGED
@@ -67,11 +67,8 @@ module RSence
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def kill( msg )
|
70
|
-
gui_name = @parent.name
|
71
|
-
|
72
|
-
msg.reply( "#{gui_ns}.die();", true )
|
73
|
-
msg.reply( "#{gui_ns}=null;", true )
|
74
|
-
msg.reply( "delete #{gui_ns};", true )
|
70
|
+
# gui_name = @parent.name
|
71
|
+
msg.reply( "RSence.killGuiTree(#{@gui_name.to_json});" )
|
75
72
|
end
|
76
73
|
|
77
74
|
# Use this method to extract all the value id's of the +ses+ hash.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsence-pre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 87
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 2.2.0.
|
10
|
+
- 20
|
11
|
+
version: 2.2.0.20
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Riassence Inc.
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-08-
|
20
|
+
date: 2011-08-09 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rsence-deps
|