rsence-pre 2.2.0.0 → 2.2.0.1
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/conf/default_conf.yaml +1 -0
- data/js/datetime/datetimepicker/datetimepicker.js +215 -0
- data/js/datetime/datetimepicker/js.inc +0 -0
- data/js/datetime/timesheet/timesheet.js +8 -13
- data/js/datetime/timesheet_item/timesheet_item.js +6 -6
- data/lib/session/msg.rb +1 -0
- metadata +51 -62
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.0.
|
1
|
+
2.2.0.1.pre
|
data/conf/default_conf.yaml
CHANGED
@@ -0,0 +1,215 @@
|
|
1
|
+
/* RSence
|
2
|
+
* Copyright 2010 Riassence Inc.
|
3
|
+
* http://riassence.com/
|
4
|
+
*
|
5
|
+
* You should have received a copy of the GNU General Public License along
|
6
|
+
* with this software package. If not, contact licensing@riassence.com
|
7
|
+
*/
|
8
|
+
|
9
|
+
var
|
10
|
+
HDateTimePicker = HControl.extend({
|
11
|
+
setLocked: function(_lockedState){
|
12
|
+
var
|
13
|
+
_enabledState = !_lockedState;
|
14
|
+
this.yyyy.setEnabled(_enabledState);
|
15
|
+
this.mm.setEnabled(_enabledState);
|
16
|
+
this.dd.setEnabled(_enabledState);
|
17
|
+
this.h.setEnabled(_enabledState);
|
18
|
+
this.m.setEnabled(_enabledState);
|
19
|
+
},
|
20
|
+
refreshValue: function(_readMode){
|
21
|
+
if(!this.drawn){
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
if(!this.m){
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
this.setLocked( HVM.values[ this.options.lockedId ].value );
|
28
|
+
var
|
29
|
+
date = new Date( this.value*1000 ),
|
30
|
+
yyyy = date.getUTCFullYear(),
|
31
|
+
mm = date.getUTCMonth()+1,
|
32
|
+
dd = date.getUTCDate(),
|
33
|
+
h = date.getUTCHours(),
|
34
|
+
m = date.getUTCMinutes();
|
35
|
+
if(_readMode){
|
36
|
+
var
|
37
|
+
nuDate = new Date( this.value*1000 ),
|
38
|
+
doSet = false;
|
39
|
+
if(this.yyyyValue.value !== yyyy){
|
40
|
+
nuDate.setUTCFullYear( this.yyyyValue.value ); doSet = true;
|
41
|
+
}
|
42
|
+
if(this.mmValue.value !== mm){
|
43
|
+
nuDate.setUTCMonth( this.mmValue.value-1 ); doSet = true;
|
44
|
+
}
|
45
|
+
if(this.ddValue.value !== dd){
|
46
|
+
nuDate.setUTCDate( this.ddValue.value ); doSet = true;
|
47
|
+
}
|
48
|
+
if(this.hValue.value !== h){
|
49
|
+
nuDate.setUTCHours( this.hValue.value ); doSet = true;
|
50
|
+
}
|
51
|
+
if(this.mValue.value !== m){
|
52
|
+
nuDate.setUTCMinutes( this.mValue.value ); doSet = true;
|
53
|
+
}
|
54
|
+
if(doSet){
|
55
|
+
this.setValue( nuDate.getTime()/1000 );
|
56
|
+
this.setMonthMax( nuDate );
|
57
|
+
}
|
58
|
+
}
|
59
|
+
else{
|
60
|
+
this.yyyyValue.set( yyyy );
|
61
|
+
this.mmValue.set( mm );
|
62
|
+
this.ddValue.set( dd );
|
63
|
+
this.hValue.set( h );
|
64
|
+
this.mValue.set( m );
|
65
|
+
}
|
66
|
+
},
|
67
|
+
setMonthMax: function( nuDate ){
|
68
|
+
nuDate.setUTCSeconds( 0 );
|
69
|
+
nuDate.setUTCMinutes( 0 );
|
70
|
+
nuDate.setUTCHours( 0 );
|
71
|
+
nuDate.setUTCDate( 1 );
|
72
|
+
var
|
73
|
+
mm = nuDate.getUTCMonth();
|
74
|
+
if(mm === 11){
|
75
|
+
nuDate.setUTCMonth( 0 );
|
76
|
+
nuDate.setUTCFullYear( nuDate.getUTCFullYear()+1 );
|
77
|
+
}
|
78
|
+
else {
|
79
|
+
nuDate.setUTCMonth( mm+1 );
|
80
|
+
}
|
81
|
+
var
|
82
|
+
ms = nuDate.getTime() - 1000,
|
83
|
+
maxDaysDate = new Date(ms),
|
84
|
+
maxDays = maxDaysDate.getUTCDate();
|
85
|
+
// console.log('maxDaysDate:',maxDaysDate.getUTCFullYear(),'-',maxDaysDate.getUTCMonth(),'-',maxDaysDate.getUTCDate());
|
86
|
+
// console.log('maxDays:',maxDays);
|
87
|
+
if(maxDays !== this.dd.numField.options.maxValue){
|
88
|
+
// console.log('reset maxValue..');
|
89
|
+
this.dd.numField.options.maxValue = maxDays;
|
90
|
+
(this.dd.numField.options.maxValue < this.dd.numField.value) && this.ddValue.set( maxDays );
|
91
|
+
this.dd.stepper.options.maxValue = maxDays;
|
92
|
+
}
|
93
|
+
},
|
94
|
+
die: function(){
|
95
|
+
this.yyyyValue.die();
|
96
|
+
this.yyyy.die();
|
97
|
+
this.mmValue.die();
|
98
|
+
this.mm.die();
|
99
|
+
this.ddValue.die();
|
100
|
+
this.dd.die();
|
101
|
+
this.hValue.die();
|
102
|
+
this.h.die();
|
103
|
+
this.mValue.die();
|
104
|
+
this.m.die();
|
105
|
+
this.base();
|
106
|
+
},
|
107
|
+
drawSubviews: function(){
|
108
|
+
var
|
109
|
+
_NumStepperField = HView.extend({
|
110
|
+
setEnabled: function(_state){
|
111
|
+
this.numField.setEnabled(_state);
|
112
|
+
this.stepper.setEnabled(_state);
|
113
|
+
if(_state){
|
114
|
+
this.stepper.show();
|
115
|
+
}
|
116
|
+
else{
|
117
|
+
this.stepper.hide();
|
118
|
+
}
|
119
|
+
},
|
120
|
+
drawSubviews: function(){
|
121
|
+
this.numField = HNumericTextControl.extend({
|
122
|
+
refreshValue: function(){
|
123
|
+
this.base();
|
124
|
+
this.parent.parent.refreshValue(true);
|
125
|
+
},
|
126
|
+
textBlur: function(){
|
127
|
+
this.setValue(
|
128
|
+
this.validateText(
|
129
|
+
this.getTextFieldValue()
|
130
|
+
)
|
131
|
+
);
|
132
|
+
}
|
133
|
+
}).nu(
|
134
|
+
[ 0, 0, this.rect.width-10, 21 ],
|
135
|
+
this, {
|
136
|
+
events: {
|
137
|
+
textEnter: false
|
138
|
+
},
|
139
|
+
minValue: this.options.minValue,
|
140
|
+
maxValue: this.options.maxValue,
|
141
|
+
valueObj: this.options.valueObj
|
142
|
+
}
|
143
|
+
);
|
144
|
+
this.stepper = HStepper.nu(
|
145
|
+
[ this.rect.width-15, 0, 15, 21 ],
|
146
|
+
this, {
|
147
|
+
minValue: this.options.minValue,
|
148
|
+
maxValue: this.options.maxValue,
|
149
|
+
valueObj: this.options.valueObj
|
150
|
+
}
|
151
|
+
);
|
152
|
+
}
|
153
|
+
}),
|
154
|
+
_numStepperRect = HRect.nu( 0, 0, 50, 21 );
|
155
|
+
this.yyyyValue = HValue.nu( false, 2010 );
|
156
|
+
this.yyyy = _NumStepperField.nu(
|
157
|
+
HRect.nu( _numStepperRect ),
|
158
|
+
this, {
|
159
|
+
minValue: 2010,
|
160
|
+
maxValue: 2020,
|
161
|
+
valueObj: this.yyyyValue
|
162
|
+
}
|
163
|
+
);
|
164
|
+
_numStepperRect.setWidth( 35 );
|
165
|
+
_numStepperRect.offsetBy( 55, 0 );
|
166
|
+
this.mmValue = HValue.nu( false, 12 );
|
167
|
+
this.mm = _NumStepperField.nu(
|
168
|
+
HRect.nu( _numStepperRect ),
|
169
|
+
this, {
|
170
|
+
minValue: 1,
|
171
|
+
maxValue: 12,
|
172
|
+
valueObj: this.mmValue
|
173
|
+
}
|
174
|
+
);
|
175
|
+
_numStepperRect.offsetBy( 40, 0 );
|
176
|
+
this.ddValue = HValue.nu( false, 24 );
|
177
|
+
this.dd = _NumStepperField.nu(
|
178
|
+
HRect.nu( _numStepperRect ),
|
179
|
+
this, {
|
180
|
+
minValue: 1,
|
181
|
+
maxValue: 31,
|
182
|
+
valueObj: this.ddValue
|
183
|
+
}
|
184
|
+
);
|
185
|
+
_numStepperRect.offsetBy( 50, 0 );
|
186
|
+
this.hValue = HValue.nu( false, 22 );
|
187
|
+
this.h = _NumStepperField.nu(
|
188
|
+
HRect.nu( _numStepperRect ),
|
189
|
+
this, {
|
190
|
+
minValue: 0,
|
191
|
+
maxValue: 23,
|
192
|
+
valueObj: this.hValue
|
193
|
+
}
|
194
|
+
);
|
195
|
+
_numStepperRect.offsetBy( 40, 0 );
|
196
|
+
this.mValue = HValue.nu( false, 45 );
|
197
|
+
this.m = _NumStepperField.nu(
|
198
|
+
HRect.nu( _numStepperRect ),
|
199
|
+
this, {
|
200
|
+
minValue: 0,
|
201
|
+
maxValue: 59,
|
202
|
+
valueObj: this.mValue
|
203
|
+
}
|
204
|
+
);
|
205
|
+
_numStepperRect.offsetBy( 37, 2 );
|
206
|
+
_numStepperRect.setWidth( 60 );
|
207
|
+
HStringView.nu(
|
208
|
+
HRect.nu( _numStepperRect ),
|
209
|
+
this, {
|
210
|
+
valueObj: HVM.values[this.options.tzValueId]
|
211
|
+
}
|
212
|
+
);
|
213
|
+
this.refreshValue();
|
214
|
+
}
|
215
|
+
});
|
File without changes
|
@@ -236,7 +236,6 @@ HTimeSheet = HControl.extend({
|
|
236
236
|
},
|
237
237
|
|
238
238
|
click: function( x, y, b ){
|
239
|
-
// console.log('click');
|
240
239
|
if( !this.startDragTime ){
|
241
240
|
this.clickCreate( x,y );
|
242
241
|
this.clickCreated = true;
|
@@ -245,26 +244,22 @@ HTimeSheet = HControl.extend({
|
|
245
244
|
},
|
246
245
|
|
247
246
|
clickCreate: function(x,y){
|
248
|
-
// console.log('clickCreate');
|
249
|
-
y -= this.pageY();
|
250
247
|
var
|
251
|
-
_startTime = this.pxToTime( y ),
|
248
|
+
_startTime = this.pxToTime( y-this.pageY() ),
|
252
249
|
_endTime = _startTime + this.minDuration;
|
250
|
+
console.log('start:',(new Date(_startTime*1000)).toUTCString(),', end:',(new Date(_endTime*1000)).toUTCString());
|
253
251
|
this.refreshDragPreview( _startTime, _endTime );
|
254
252
|
this.dragPreview.bringToFront();
|
255
253
|
this.dragPreview.show();
|
256
254
|
if( this.activateEditor( this.dragPreview ) ){
|
257
|
-
// console.log('create!');
|
258
255
|
this.editor.createItem( HVM.clone( this.dragPreview.value ) );
|
259
256
|
}
|
260
257
|
else {
|
261
|
-
// console.log('no create');
|
262
258
|
this.dragPreview.hide();
|
263
259
|
}
|
264
260
|
},
|
265
261
|
|
266
262
|
doubleClick: function(x,y){
|
267
|
-
// console.log('doubleClick');
|
268
263
|
if( !this.clickCreated ){
|
269
264
|
this.click(x,y);
|
270
265
|
}
|
@@ -284,8 +279,8 @@ HTimeSheet = HControl.extend({
|
|
284
279
|
},
|
285
280
|
|
286
281
|
startDrag: function( x, y, b ){
|
287
|
-
|
288
|
-
|
282
|
+
this.startDragTime = this.pxToTime( y-this.pageY() );
|
283
|
+
// y -= this.pageY();
|
289
284
|
this.refreshDragPreview( this.startDragTime, this.startDragTime + this.minDuration );
|
290
285
|
this.dragPreview.bringToFront();
|
291
286
|
this.dragPreview.show();
|
@@ -293,9 +288,8 @@ HTimeSheet = HControl.extend({
|
|
293
288
|
},
|
294
289
|
|
295
290
|
drag: function( x, y, b ){
|
296
|
-
y -= this.pageY();
|
297
291
|
var
|
298
|
-
_dragTime = this.pxToTime( y ),
|
292
|
+
_dragTime = this.pxToTime( y-this.pageY() ),
|
299
293
|
_startTime,
|
300
294
|
_endTime;
|
301
295
|
if( _dragTime < this.startDragTime ){
|
@@ -311,8 +305,8 @@ HTimeSheet = HControl.extend({
|
|
311
305
|
},
|
312
306
|
|
313
307
|
endDrag: function( x, y, b ){
|
314
|
-
|
315
|
-
|
308
|
+
var
|
309
|
+
_dragTime = this.pxToTime( y-this.pageY() );
|
316
310
|
if( _dragTime !== this.startDragTime ){
|
317
311
|
if( this.activateEditor( this.dragPreview ) ){
|
318
312
|
this.editor.createItem( HVM.clone( this.dragPreview.value ) );
|
@@ -322,6 +316,7 @@ HTimeSheet = HControl.extend({
|
|
322
316
|
this.clickCreated = false;
|
323
317
|
this.dragPreview.hide();
|
324
318
|
this.startDragTime = false;
|
319
|
+
this.click( x, y, b );
|
325
320
|
return false;
|
326
321
|
},
|
327
322
|
|
@@ -85,15 +85,15 @@ HTimeSheetItem = HControl.extend({
|
|
85
85
|
this.bringToFront();
|
86
86
|
var _time = this.parent.pxToTime( y-this.parent.pageY() );
|
87
87
|
this.parent.activateEditor( this );
|
88
|
-
// if( this.parent.activateEditor( this ) ){
|
89
|
-
// // console.log('editor start');
|
90
|
-
// }
|
91
88
|
},
|
92
89
|
|
93
90
|
dragMode: 0, // none
|
91
|
+
_isValueValidForDrag: function(){
|
92
|
+
return (this.value instanceof Object) && (!this.value.locked);
|
93
|
+
},
|
94
94
|
startDrag: function( x, y ){
|
95
95
|
this.bringToFront();
|
96
|
-
if(
|
96
|
+
if( this._isValueValidForDrag() ){
|
97
97
|
var
|
98
98
|
_topY = y-this.pageY(),
|
99
99
|
_bottomY = this.rect.height - _topY,
|
@@ -134,7 +134,7 @@ HTimeSheetItem = HControl.extend({
|
|
134
134
|
},
|
135
135
|
|
136
136
|
drag: function( x, y ){
|
137
|
-
if(
|
137
|
+
if( this._isValueValidForDrag() && (this.dragMode !== 0) ){
|
138
138
|
y -= this.parent.pageY();
|
139
139
|
var
|
140
140
|
_movePx = y - this.originY,
|
@@ -189,7 +189,7 @@ HTimeSheetItem = HControl.extend({
|
|
189
189
|
},
|
190
190
|
|
191
191
|
endDrag: function( x, y ){
|
192
|
-
if(
|
192
|
+
if( this._isValueValidForDrag() && (this.dragMode !== 0) ){
|
193
193
|
var
|
194
194
|
_startChanged = ( this.dragTimeStart !== this.originTimeStart ) && ( this.dragTimeStart !== this.value.start ),
|
195
195
|
_durationChanged = ( this.dragDuration !== this.originDuration ) && ( this.dragDuration !== this.value.duration );
|
data/lib/session/msg.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,58 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsence-pre
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.2.0.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 2
|
9
|
-
- 0
|
10
|
-
- 0
|
11
|
-
version: 2.2.0.0
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Riassence Inc.
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
date: 2011-03-05 00:00:00 +02:00
|
12
|
+
date: 2011-03-11 00:00:00.000000000 +02:00
|
20
13
|
default_executable: rsence-pre
|
21
|
-
dependencies:
|
22
|
-
- !ruby/object:Gem::Dependency
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
23
16
|
name: rsence-deps
|
24
|
-
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: &2161100580 !ruby/object:Gem::Requirement
|
26
18
|
none: false
|
27
|
-
requirements:
|
28
|
-
- -
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
|
31
|
-
segments:
|
32
|
-
- 963
|
33
|
-
version: "963"
|
19
|
+
requirements:
|
20
|
+
- - =
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '963'
|
34
23
|
type: :runtime
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
RSence
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *2161100580
|
26
|
+
description: ! 'RSence is a RIA ("HTML5" or "Ajax" if you like those terms better)
|
27
|
+
framework designed for responsive GUI applications on the web.
|
28
|
+
|
29
|
+
|
30
|
+
RSence is a flexible and high-performance RIA framework aimed on building responsive,
|
31
|
+
scalable and over-all as high-performance GUI Applications as possible with the
|
32
|
+
chosen technologies.
|
33
|
+
|
34
|
+
|
35
|
+
RSence includes a server for backend tasks and client suppert as well as a Javascript
|
36
|
+
GUI framework to provide responsive user interfaces.
|
37
|
+
|
38
|
+
|
39
|
+
The purpose of the server is to provide a highly optimized yet easy to use Ruby
|
40
|
+
framework for writing applications containing all their assets needed as self-contained
|
41
|
+
plugins bundles. The bundles enable easy distribution and maintenance of RSence
|
42
|
+
projects.
|
46
43
|
|
44
|
+
|
45
|
+
RSence is not primarily targeted as an engine for plain old html web sites, there
|
46
|
+
are plenty of other tools for that purpose and some of them are easily integrated
|
47
|
+
into RSence.
|
48
|
+
|
49
|
+
'
|
47
50
|
email: info@rsence.org
|
48
|
-
executables:
|
51
|
+
executables:
|
49
52
|
- rsence-pre
|
50
53
|
extensions: []
|
51
|
-
|
52
54
|
extra_rdoc_files: []
|
53
|
-
|
54
|
-
files:
|
55
|
+
files:
|
55
56
|
- bin/rsence
|
56
57
|
- lib/conf/argv.rb
|
57
58
|
- lib/conf/default.rb
|
@@ -278,6 +279,8 @@ files:
|
|
278
279
|
- js/datetime/calendar/themes/default/calendar.html
|
279
280
|
- js/datetime/calendar/themes/default/calendar_arrows-ie6.gif
|
280
281
|
- js/datetime/calendar/themes/default/calendar_arrows.png
|
282
|
+
- js/datetime/datetimepicker/datetimepicker.js
|
283
|
+
- js/datetime/datetimepicker/js.inc
|
281
284
|
- js/datetime/datetimevalue/datetimevalue.js
|
282
285
|
- js/datetime/datetimevalue/js.inc
|
283
286
|
- js/datetime/timesheet/js.inc
|
@@ -385,43 +388,29 @@ files:
|
|
385
388
|
- VERSION
|
386
389
|
- .yardopts
|
387
390
|
- bin/rsence-pre
|
388
|
-
has_rdoc:
|
391
|
+
has_rdoc: true
|
389
392
|
homepage: http://www.rsence.org/
|
390
393
|
licenses: []
|
391
|
-
|
392
394
|
post_install_message:
|
393
395
|
rdoc_options: []
|
394
|
-
|
395
|
-
require_paths:
|
396
|
+
require_paths:
|
396
397
|
- lib
|
397
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
398
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
398
399
|
none: false
|
399
|
-
requirements:
|
400
|
-
- -
|
401
|
-
- !ruby/object:Gem::Version
|
402
|
-
hash: 57
|
403
|
-
segments:
|
404
|
-
- 1
|
405
|
-
- 8
|
406
|
-
- 7
|
400
|
+
requirements:
|
401
|
+
- - ! '>='
|
402
|
+
- !ruby/object:Gem::Version
|
407
403
|
version: 1.8.7
|
408
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
404
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
409
405
|
none: false
|
410
|
-
requirements:
|
411
|
-
- -
|
412
|
-
- !ruby/object:Gem::Version
|
413
|
-
hash: 25
|
414
|
-
segments:
|
415
|
-
- 1
|
416
|
-
- 3
|
417
|
-
- 1
|
406
|
+
requirements:
|
407
|
+
- - ! '>'
|
408
|
+
- !ruby/object:Gem::Version
|
418
409
|
version: 1.3.1
|
419
410
|
requirements: []
|
420
|
-
|
421
411
|
rubyforge_project: rsence-
|
422
412
|
rubygems_version: 1.6.0
|
423
413
|
signing_key:
|
424
414
|
specification_version: 3
|
425
415
|
summary: Pre-Release 2.2 version of the RSence framework.
|
426
416
|
test_files: []
|
427
|
-
|