rsence-pre 2.1.8.1 → 2.2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/INSTALL.rdoc +3 -3
- data/README.rdoc +4 -4
- data/VERSION +1 -1
- data/conf/default_conf.yaml +4 -1
- data/js/comm/sessionwatcher/sessionwatcher.js +3 -2
- data/js/controls/textcontrol/textcontrol.js +45 -19
- data/js/core/elem/elem.js +6 -0
- data/js/datetime/timesheet/old_timesheet.js +292 -0
- data/js/datetime/timesheet/themes/default/old_timesheet.css +30 -0
- data/js/datetime/timesheet/themes/default/old_timesheet.html +2 -0
- data/js/datetime/timesheet/themes/default/timesheet.css +50 -22
- data/js/datetime/timesheet/themes/default/timesheet.html +4 -2
- data/js/datetime/timesheet/timesheet.js +448 -159
- data/js/datetime/timesheet_item/old_timesheet_item.js +308 -0
- data/js/datetime/timesheet_item/themes/default/old_timesheet_item.css +42 -0
- data/js/datetime/timesheet_item/themes/default/old_timesheet_item.html +8 -0
- data/js/datetime/timesheet_item/themes/default/timesheet_item.css +42 -11
- data/js/datetime/timesheet_item/themes/default/timesheet_item.html +4 -2
- data/js/datetime/timesheet_item/themes/default/timesheet_item_icons.png +0 -0
- data/js/datetime/timesheet_item/timesheet_item.js +156 -259
- data/js/datetime/timesheet_item_edit/old_timesheet_item_edit.js +274 -0
- data/js/datetime/timesheet_item_edit/timesheet_item_edit.js +0 -274
- data/js/foundation/control/valueaction/js.inc +0 -0
- data/js/foundation/control/valueaction/valueaction.js +72 -0
- data/js/foundation/locale_settings/js.inc +0 -0
- data/js/foundation/locale_settings/locale_settings.js +122 -0
- data/js/foundation/system/system.js +3 -2
- data/js/foundation/view/view.js +27 -0
- data/js/lists/checkboxlist/checkboxlist.js +9 -0
- data/js/lists/listitems/listitems.js +16 -0
- data/js/lists/radiobuttonlist/radiobuttonlist.js +17 -1
- data/js/menus/minimenu/minimenu.js +9 -5
- data/lib/conf/argv.rb +1 -0
- metadata +21 -9
@@ -0,0 +1,122 @@
|
|
1
|
+
/* RSence
|
2
|
+
* Copyright 2011 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
|
+
HLocale = {
|
11
|
+
components: {
|
12
|
+
|
13
|
+
},
|
14
|
+
dateTime: {
|
15
|
+
strings: {
|
16
|
+
weekDaysLong: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
|
17
|
+
weekDaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ],
|
18
|
+
dateDelimitter: '.',
|
19
|
+
timeDelimitter: ':',
|
20
|
+
timeMsDelimitter: '.',
|
21
|
+
rangeDelimitter: ' ... '
|
22
|
+
},
|
23
|
+
settings: {
|
24
|
+
zeroPadTime: true,
|
25
|
+
AMPM: false
|
26
|
+
},
|
27
|
+
defaultOptions: {
|
28
|
+
longWeekDay: false,
|
29
|
+
shortWeekDay: false,
|
30
|
+
shortYear: false,
|
31
|
+
fullYear: true,
|
32
|
+
seconds: false,
|
33
|
+
milliSeconds: false
|
34
|
+
},
|
35
|
+
options: function( _custom ){
|
36
|
+
var
|
37
|
+
_this = HLocale.dateTime,
|
38
|
+
_default = _this.defaultOptions,
|
39
|
+
_options = {},
|
40
|
+
_key;
|
41
|
+
for( _key in _default ){
|
42
|
+
_options[_key] = _default[_key];
|
43
|
+
}
|
44
|
+
if( !_custom ){
|
45
|
+
_custom = {};
|
46
|
+
}
|
47
|
+
for( _key in _custom ){
|
48
|
+
_options[_key] = _custom[_key];
|
49
|
+
}
|
50
|
+
return _options;
|
51
|
+
},
|
52
|
+
zeroPadTime: function( _num ){
|
53
|
+
if( HLocale.dateTime.settings.zeroPadTime && _num < 10 ){
|
54
|
+
return '0'+_num;
|
55
|
+
}
|
56
|
+
return _num.toString();
|
57
|
+
},
|
58
|
+
formatShortWeekDay: function( _dateTimeEpoch ){
|
59
|
+
var
|
60
|
+
_this = HLocale.dateTime,
|
61
|
+
_date = new Date( _dateTimeEpoch * 1000 ),
|
62
|
+
_strings = _this.strings,
|
63
|
+
_wday = _date.getUTCDay();
|
64
|
+
return _strings.weekDaysShort[ _wday ];
|
65
|
+
},
|
66
|
+
formatLongWeekDay: function( _dateTimeEpoch ){
|
67
|
+
var
|
68
|
+
_this = HLocale.dateTime,
|
69
|
+
_date = new Date( _dateTimeEpoch * 1000 ),
|
70
|
+
_strings = _this.strings,
|
71
|
+
_wday = _date.getUTCDay();
|
72
|
+
return _strings.weekDaysLong[ _wday ];
|
73
|
+
},
|
74
|
+
formatDate: function( _dateTimeEpoch, _options ){
|
75
|
+
var
|
76
|
+
_this = HLocale.dateTime,
|
77
|
+
_date = new Date( _dateTimeEpoch * 1000 ),
|
78
|
+
_strings = _this.strings,
|
79
|
+
_wday = _date.getUTCDay(),
|
80
|
+
_dateString = _date.getUTCDate() + _strings.dateDelimitter + (_date.getUTCMonth() + 1) + _strings.dateDelimitter;
|
81
|
+
|
82
|
+
_options = _this.options( _options );
|
83
|
+
|
84
|
+
if( _options.fullYear ){
|
85
|
+
_dateString += _date.getUTCFullYear();
|
86
|
+
}
|
87
|
+
else if( _options.shortYear ){
|
88
|
+
_dateString += date.getUTCYear();
|
89
|
+
}
|
90
|
+
|
91
|
+
if( _options.longWeekDay ){
|
92
|
+
return _strings.weekDaysLong[_wday] + ' ' + _dateString;
|
93
|
+
}
|
94
|
+
else if( _options.shortWeekDay ){
|
95
|
+
return _strings.weekDaysShort[_wday] + ' ' + _dateString;
|
96
|
+
}
|
97
|
+
return _dateString;
|
98
|
+
},
|
99
|
+
formatTime: function( _dateTimeEpoch, _options ){
|
100
|
+
var
|
101
|
+
_this = HLocale.dateTime,
|
102
|
+
_date = new Date( _dateTimeEpoch * 1000 ),
|
103
|
+
_strings = _this.strings,
|
104
|
+
_timeString = _this.zeroPadTime( _date.getUTCHours() ) + _strings.timeDelimitter + _this.zeroPadTime( _date.getUTCMinutes() );
|
105
|
+
|
106
|
+
_options = _this.options( _options );
|
107
|
+
|
108
|
+
if( _options.seconds ){
|
109
|
+
_timeString += _strings.timeDelimitter + _this.zeroPadTime( _date.getUTCSeconds() );
|
110
|
+
if( _options.milliSeconds ){
|
111
|
+
_timeString += _strings.timeMsDelimitter + _date.getUTCMilliseconds();
|
112
|
+
}
|
113
|
+
}
|
114
|
+
return _timeString;
|
115
|
+
},
|
116
|
+
formatDateTime: function( _dateTimeEpoch, _options ){
|
117
|
+
var _this = HLocale.dateTime;
|
118
|
+
return _this.formatDate( _dateTimeEpoch, _options ) + ' ' + _this.formatTime( _dateTimeEpoch, _options );
|
119
|
+
}
|
120
|
+
}
|
121
|
+
};
|
122
|
+
|
@@ -131,9 +131,10 @@ HSystem = {
|
|
131
131
|
addApp: function(_app, _priority){
|
132
132
|
var _appId;
|
133
133
|
if(this.freeAppIds.length !== 0){
|
134
|
-
_appId = this.freeAppIds.
|
134
|
+
_appId = this.freeAppIds.shift();
|
135
135
|
this.apps[_appId] = _app;
|
136
|
-
}
|
136
|
+
}
|
137
|
+
else {
|
137
138
|
this.apps.push(_app);
|
138
139
|
_appId = this.apps.length-1;
|
139
140
|
}
|
data/js/foundation/view/view.js
CHANGED
@@ -1047,6 +1047,20 @@ HView = HClass.extend({
|
|
1047
1047
|
},
|
1048
1048
|
|
1049
1049
|
setStyles: function(_styles){
|
1050
|
+
var _stylesObjType = COMM.Values.type(_styles);
|
1051
|
+
if(_stylesObjType==='a'){
|
1052
|
+
this.setStylesArray(_styles);
|
1053
|
+
}
|
1054
|
+
else if(_stylesObjType==='h'){
|
1055
|
+
this.setStylesHash(_styles);
|
1056
|
+
}
|
1057
|
+
else {
|
1058
|
+
console.log('HView#setStyles: Invalid data, expected array or hash; type: '+h+', data:',_styles);
|
1059
|
+
}
|
1060
|
+
return this;
|
1061
|
+
},
|
1062
|
+
|
1063
|
+
setStylesArray: function(_styles){
|
1050
1064
|
var
|
1051
1065
|
_styleItem, _styleKey, _styleValue, i = 0;
|
1052
1066
|
for(;i<_styles.length;i++){
|
@@ -1058,6 +1072,16 @@ HView = HClass.extend({
|
|
1058
1072
|
return this;
|
1059
1073
|
},
|
1060
1074
|
|
1075
|
+
setStylesHash: function(_styles){
|
1076
|
+
var
|
1077
|
+
_styleKey, _styleValue;
|
1078
|
+
for(_styleKey in _styles){
|
1079
|
+
_styleValue = _styles[_styleKey];
|
1080
|
+
this.setStyle(_styleKey,_styleValue);
|
1081
|
+
}
|
1082
|
+
return this;
|
1083
|
+
},
|
1084
|
+
|
1061
1085
|
/** = Description
|
1062
1086
|
* Returns a style of the main DOM element of the component.
|
1063
1087
|
* Utilizes +ELEM+ cache to perform the action.
|
@@ -1252,6 +1276,9 @@ HView = HClass.extend({
|
|
1252
1276
|
this.stopAnimation();
|
1253
1277
|
// Delete the children first.
|
1254
1278
|
var _childViewId, i;
|
1279
|
+
if(!this.views){
|
1280
|
+
console.log('HView#die: no subviews for component name: ',this.componentName,', self:',this);
|
1281
|
+
}
|
1255
1282
|
while (this.views.length !== 0) {
|
1256
1283
|
_childViewId = this.views[0];
|
1257
1284
|
this.destroyView(_childViewId);
|
@@ -129,12 +129,21 @@ HCheckboxList = HControl.extend({
|
|
129
129
|
this.refreshValue();
|
130
130
|
},
|
131
131
|
|
132
|
+
_listItemResponder: null,
|
133
|
+
setListItemResponder: function(_listItemResponder){
|
134
|
+
this._listItemResponder = _listItemResponder;
|
135
|
+
},
|
136
|
+
|
132
137
|
/** = Description
|
133
138
|
* Sets listItems and ListItemViews to null and calls
|
134
139
|
* the inherited destructor.
|
135
140
|
*
|
136
141
|
**/
|
137
142
|
die: function(){
|
143
|
+
if(this._listItemResponder){
|
144
|
+
this._listItemResponder.die();
|
145
|
+
this._listItemResponder = null;
|
146
|
+
}
|
138
147
|
this.listItems = null;
|
139
148
|
this.listItemViews = null;
|
140
149
|
this.base();
|
@@ -28,6 +28,12 @@ HListItems = HValueResponder.extend({
|
|
28
28
|
|
29
29
|
constructor: function( _rect, _parent, _options ){
|
30
30
|
this.parent = _parent;
|
31
|
+
if ( this.parent.setListItemResponder ){
|
32
|
+
this.parent.setListItemResponder( this );
|
33
|
+
}
|
34
|
+
else {
|
35
|
+
console.log('Warning; parent does not respond to setListItemResponder');
|
36
|
+
}
|
31
37
|
if (_options instanceof Object) {
|
32
38
|
if (_options['valueObj'] !== undefined) {
|
33
39
|
_options.valueObj.bind( this );
|
@@ -38,6 +44,16 @@ HListItems = HValueResponder.extend({
|
|
38
44
|
}
|
39
45
|
}
|
40
46
|
},
|
47
|
+
|
48
|
+
die: function() {
|
49
|
+
var _this = this;
|
50
|
+
if(_this.valueObj){
|
51
|
+
_this.valueObj.unbind(_this);
|
52
|
+
_this.valueObj = null;
|
53
|
+
}
|
54
|
+
_this.value = null;
|
55
|
+
},
|
56
|
+
|
41
57
|
_warningMessage: function(_messageText){
|
42
58
|
console.log("Warning; HListItems: "+_messageText);
|
43
59
|
},
|
@@ -66,13 +66,26 @@ HRadioButtonList = HControl.extend({
|
|
66
66
|
);
|
67
67
|
},
|
68
68
|
|
69
|
+
_listItemResponder: null,
|
70
|
+
setListItemResponder: function(_listItemResponder){
|
71
|
+
this._listItemResponder = _listItemResponder;
|
72
|
+
},
|
73
|
+
|
69
74
|
/** = Description
|
70
75
|
* Destructor. Sets listItems and listItemViews to null and initiates
|
71
76
|
* destructor for radioButtonIndexValue.
|
72
77
|
*
|
73
78
|
**/
|
74
79
|
die: function(){
|
80
|
+
if(this._listItemResponder){
|
81
|
+
this._listItemResponder.die();
|
82
|
+
this._listItemResponder = null;
|
83
|
+
}
|
84
|
+
this.radioButtonIndexValue && this.radioButtonIndexValue.die();
|
75
85
|
this.listItems = null;
|
86
|
+
for(var i=0;i<this.listItemViews.length;i++){
|
87
|
+
this.listItemViews[i].die();
|
88
|
+
}
|
76
89
|
this.listItemViews = null;
|
77
90
|
this.radioButtonIndexValue && this.radioButtonIndexValue.die();
|
78
91
|
this.base();
|
@@ -90,6 +103,9 @@ HRadioButtonList = HControl.extend({
|
|
90
103
|
},
|
91
104
|
refresh: function(){
|
92
105
|
var _listItems = this.parent.listItems;
|
106
|
+
if(_listItems === undefined || _listItems === null){
|
107
|
+
return;
|
108
|
+
}
|
93
109
|
if(_listItems[ this.value ] !== undefined){
|
94
110
|
this.parent.setValue( _listItems[ this.value ][0] );
|
95
111
|
}
|
@@ -100,7 +116,7 @@ HRadioButtonList = HControl.extend({
|
|
100
116
|
|
101
117
|
refreshValue: function(){
|
102
118
|
var _value = this.value;
|
103
|
-
if ( this.listItems.length !== 0 && this['valueMatrix'] !== undefined ) {
|
119
|
+
if ( this.listItems && this.listItems.length !== 0 && this['valueMatrix'] !== undefined ) {
|
104
120
|
if ( this.radioButtonResponder === false ){
|
105
121
|
this.radioButtonIndexValue = HValue.nu( false, 0 );
|
106
122
|
this.radioButtonIndexValue.bind( this.valueMatrix );
|
@@ -56,10 +56,12 @@ HMiniMenu = HRadioButtonList.extend({
|
|
56
56
|
|
57
57
|
refreshValue: function(){
|
58
58
|
this.base();
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
if(this.listItems && this.listItems.length !== 0 && this['valueMatrix'] !== undefined ) {
|
60
|
+
for(var i=0;i<this.listItems.length;i++){
|
61
|
+
if(this.listItems[i][0]===this.value){
|
62
|
+
this.setLabel( this.listItems[i][1] );
|
63
|
+
return;
|
64
|
+
}
|
63
65
|
}
|
64
66
|
}
|
65
67
|
},
|
@@ -97,8 +99,10 @@ HMiniMenu = HRadioButtonList.extend({
|
|
97
99
|
},
|
98
100
|
|
99
101
|
die: function(){
|
100
|
-
this.
|
102
|
+
this.valueMatrix = null;
|
103
|
+
var _menuItemView = this.menuItemView;
|
101
104
|
this.base();
|
105
|
+
_menuItemView.die();
|
102
106
|
},
|
103
107
|
|
104
108
|
drawSubviews: function(){
|
data/lib/conf/argv.rb
CHANGED
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: 127
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
-
|
10
|
-
-
|
11
|
-
version: 2.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
- 0
|
11
|
+
version: 2.2.0.0
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Riassence Inc.
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-03-05 00:00:00 +02:00
|
20
20
|
default_executable: rsence-pre
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -281,14 +281,22 @@ files:
|
|
281
281
|
- js/datetime/datetimevalue/datetimevalue.js
|
282
282
|
- js/datetime/datetimevalue/js.inc
|
283
283
|
- js/datetime/timesheet/js.inc
|
284
|
+
- js/datetime/timesheet/old_timesheet.js
|
285
|
+
- js/datetime/timesheet/themes/default/old_timesheet.css
|
286
|
+
- js/datetime/timesheet/themes/default/old_timesheet.html
|
284
287
|
- js/datetime/timesheet/themes/default/timesheet.css
|
285
288
|
- js/datetime/timesheet/themes/default/timesheet.html
|
286
289
|
- js/datetime/timesheet/timesheet.js
|
287
290
|
- js/datetime/timesheet_item/js.inc
|
291
|
+
- js/datetime/timesheet_item/old_timesheet_item.js
|
292
|
+
- js/datetime/timesheet_item/themes/default/old_timesheet_item.css
|
293
|
+
- js/datetime/timesheet_item/themes/default/old_timesheet_item.html
|
288
294
|
- js/datetime/timesheet_item/themes/default/timesheet_item.css
|
289
295
|
- js/datetime/timesheet_item/themes/default/timesheet_item.html
|
296
|
+
- js/datetime/timesheet_item/themes/default/timesheet_item_icons.png
|
290
297
|
- js/datetime/timesheet_item/timesheet_item.js
|
291
298
|
- js/datetime/timesheet_item_edit/js.inc
|
299
|
+
- js/datetime/timesheet_item_edit/old_timesheet_item_edit.js
|
292
300
|
- js/datetime/timesheet_item_edit/timesheet_item_edit.js
|
293
301
|
- js/foundation/application/application.js
|
294
302
|
- js/foundation/application/js.inc
|
@@ -304,6 +312,8 @@ files:
|
|
304
312
|
- js/foundation/control/eventresponder/eventresponder.js
|
305
313
|
- js/foundation/control/eventresponder/js.inc
|
306
314
|
- js/foundation/control/js.inc
|
315
|
+
- js/foundation/control/valueaction/js.inc
|
316
|
+
- js/foundation/control/valueaction/valueaction.js
|
307
317
|
- js/foundation/control/valuematrix/js.inc
|
308
318
|
- js/foundation/control/valuematrix/valuematrix.js
|
309
319
|
- js/foundation/control/valueresponder/js.inc
|
@@ -316,6 +326,8 @@ files:
|
|
316
326
|
- js/foundation/geom/rect/rect.js
|
317
327
|
- js/foundation/json_renderer/js.inc
|
318
328
|
- js/foundation/json_renderer/json_renderer.js
|
329
|
+
- js/foundation/locale_settings/js.inc
|
330
|
+
- js/foundation/locale_settings/locale_settings.js
|
319
331
|
- js/foundation/system/js.inc
|
320
332
|
- js/foundation/system/system.js
|
321
333
|
- js/foundation/thememanager/js.inc
|
@@ -373,7 +385,7 @@ files:
|
|
373
385
|
- VERSION
|
374
386
|
- .yardopts
|
375
387
|
- bin/rsence-pre
|
376
|
-
has_rdoc:
|
388
|
+
has_rdoc: yard
|
377
389
|
homepage: http://www.rsence.org/
|
378
390
|
licenses: []
|
379
391
|
|
@@ -407,9 +419,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
407
419
|
requirements: []
|
408
420
|
|
409
421
|
rubyforge_project: rsence-
|
410
|
-
rubygems_version: 1.
|
422
|
+
rubygems_version: 1.6.0
|
411
423
|
signing_key:
|
412
424
|
specification_version: 3
|
413
|
-
summary: Pre-Release 2.
|
425
|
+
summary: Pre-Release 2.2 version of the RSence framework.
|
414
426
|
test_files: []
|
415
427
|
|