rsence-pre 2.2.0.11 → 2.2.0.12
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/js/controls/window/themes/default/window.css +9 -0
- data/js/datetime/calendar/calendar.js +109 -11
- data/js/datetime/calendar/themes/default/calendar.css +89 -7
- data/js/datetime/calendar/themes/default/calendar.html +11 -0
- data/js/datetime/calendar/themes/default/calendar_bg-ie6.gif +0 -0
- data/js/datetime/calendar/themes/default/calendar_bg.png +0 -0
- data/js/datetime/calendar/themes/default/calendar_parts1-ie6.gif +0 -0
- data/js/datetime/calendar/themes/default/calendar_parts1.png +0 -0
- data/js/datetime/calendar/themes/default/calendar_parts2-ie6.gif +0 -0
- data/js/datetime/calendar/themes/default/calendar_parts2.png +0 -0
- data/js/datetime/datetimevalue/datetimevalue.js +22 -5
- data/js/foundation/eventmanager/eventmanager.js +8 -6
- data/js/foundation/locale_settings/locale_settings.js +7 -0
- data/js/lists/radiobuttonlist/radiobuttonlist.js +4 -2
- data/js/menus/minimenu/minimenu.js +7 -2
- data/lib/conf/argv.rb +1 -130
- data/lib/conf/default.rb +5 -5
- data/lib/plugins/gui_plugin.rb +2 -0
- data/lib/plugins/plugin_plugins.rb +1 -1
- data/lib/rsence.rb +134 -3
- data/plugins/client_pkg/client_pkg.rb +7 -3
- data/plugins/client_pkg/lib/client_pkg_build.rb +2 -1
- metadata +11 -12
- data/js/datetime/timesheet/old_timesheet.js +0 -292
- data/js/datetime/timesheet/themes/default/old_timesheet.css +0 -30
- data/js/datetime/timesheet/themes/default/old_timesheet.html +0 -2
- data/js/datetime/timesheet_item/old_timesheet_item.js +0 -308
- data/js/datetime/timesheet_item/themes/default/old_timesheet_item.css +0 -42
- data/js/datetime/timesheet_item/themes/default/old_timesheet_item.html +0 -8
- data/js/datetime/timesheet_item_edit/old_timesheet_item_edit.js +0 -274
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.0.
|
1
|
+
2.2.0.12.pre
|
@@ -23,6 +23,15 @@
|
|
23
23
|
cursor: inherit;
|
24
24
|
background-repeat: no-repeat;
|
25
25
|
}
|
26
|
+
.window_bg, .window_body {
|
27
|
+
opacity: 0.95;
|
28
|
+
}
|
29
|
+
.window_titlebar {
|
30
|
+
opacity: 0.97;
|
31
|
+
}
|
32
|
+
.inactive .window_titlebar {
|
33
|
+
opacity: 0.95;
|
34
|
+
}
|
26
35
|
|
27
36
|
.window_shadow {
|
28
37
|
left: 4px; right: 4px; top: 4px; bottom: 4px;
|
@@ -41,7 +41,8 @@ HCalendar = HControl.extend({
|
|
41
41
|
},
|
42
42
|
|
43
43
|
/** = Description
|
44
|
-
* Simple
|
44
|
+
* Simple clickthrough
|
45
|
+
**/
|
45
46
|
click: function(){
|
46
47
|
return false;
|
47
48
|
},
|
@@ -55,14 +56,16 @@ HCalendar = HControl.extend({
|
|
55
56
|
return;
|
56
57
|
}
|
57
58
|
var _weekdays_localized = this.weekdaysLocalized(),
|
58
|
-
|
59
|
+
_availWidth = this.rect.width-2,
|
60
|
+
_weekdays_width = Math.floor(_availWidth/8),
|
61
|
+
_leftPlus = (_availWidth % 8)-1,
|
59
62
|
_weekdays_html = [],
|
60
63
|
i = 0,
|
61
64
|
_weekdays_html_pre = ['<div style="width:'+_weekdays_width+'px;left:','px">'],
|
62
65
|
_weekdays_html_suf = '</div>';
|
63
66
|
for(;i<_weekdays_localized.length;i++){
|
64
67
|
_weekdays_html.push([
|
65
|
-
_weekdays_html_pre.join(i*_weekdays_width),
|
68
|
+
_weekdays_html_pre.join(i*_weekdays_width+_leftPlus),
|
66
69
|
_weekdays_localized[i],
|
67
70
|
_weekdays_html_suf
|
68
71
|
].join('') );
|
@@ -132,6 +135,86 @@ HCalendar = HControl.extend({
|
|
132
135
|
},
|
133
136
|
viewMonth: [1970,0],
|
134
137
|
|
138
|
+
monthMenu: function(){
|
139
|
+
if(!HPopupMenu){
|
140
|
+
console.log('HPopupMenu not included; cannot continue');
|
141
|
+
return;
|
142
|
+
}
|
143
|
+
var
|
144
|
+
_calendar = this,
|
145
|
+
_menu = HMiniMenu.extend({
|
146
|
+
refreshValue: function(){
|
147
|
+
this.base();
|
148
|
+
if( this._killAfterRefresh ){
|
149
|
+
this._killAfterRefresh = false;
|
150
|
+
var _menu = this;
|
151
|
+
_calendar.setValue( _calendar.setMonth( this.value ) );
|
152
|
+
if( _calendar.month() !== this.value ){
|
153
|
+
_calendar.setValue( _calendar.setMday( 30 ) );
|
154
|
+
_calendar.setValue( _calendar.setMonth( this.value ) );
|
155
|
+
}
|
156
|
+
if( _calendar.month() !== this.value ){
|
157
|
+
_calendar.setValue( _calendar.setMday( 29 ) );
|
158
|
+
_calendar.setValue( _calendar.setMonth( this.value ) );
|
159
|
+
}
|
160
|
+
if( _calendar.month() !== this.value ){
|
161
|
+
_calendar.setValue( _calendar.setMday( 28 ) );
|
162
|
+
_calendar.setValue( _calendar.setMonth( this.value ) );
|
163
|
+
}
|
164
|
+
COMM.Queue.push( function(){_menu.die();} );
|
165
|
+
}
|
166
|
+
},
|
167
|
+
_killAfterRefresh: false,
|
168
|
+
menuHide: function(){
|
169
|
+
this.base();
|
170
|
+
var _menu = this;
|
171
|
+
_menu._killAfterRefresh = true;
|
172
|
+
COMM.Queue.push( function(){_menu._killAfterRefresh && _menu.refreshValue();} );
|
173
|
+
return true;
|
174
|
+
}
|
175
|
+
}).nu( [24, 0, Math.round(this.rect.width*0.66)-24, 20 ], this, {
|
176
|
+
value: this.month(),
|
177
|
+
initialVisibility: true
|
178
|
+
} ),
|
179
|
+
_monthValues = [],
|
180
|
+
i = 0,
|
181
|
+
_monthNames = HLocale.dateTime.strings.monthsLong;
|
182
|
+
for(;i<_monthNames.length;i++){
|
183
|
+
_monthValues.push( [ i, _monthNames[i] ] );
|
184
|
+
}
|
185
|
+
_menu.setListItems( _monthValues );
|
186
|
+
},
|
187
|
+
|
188
|
+
yearMenu: function(){
|
189
|
+
var
|
190
|
+
_calendar = this,
|
191
|
+
_year = HNumericTextControl.extend({
|
192
|
+
refreshValue: function(){
|
193
|
+
this.base();
|
194
|
+
_calendar.setValue( _calendar.setYear( this.value ) );
|
195
|
+
},
|
196
|
+
textBlur: function(){
|
197
|
+
this.base();
|
198
|
+
COMM.Queue.push( function(){_year.die();} );
|
199
|
+
},
|
200
|
+
textEnter: function(){
|
201
|
+
this.base();
|
202
|
+
if( ( EVENT.status[ EVENT.keysDown ].indexOf( 13 ) !== -1 ) || ( EVENT.status[ EVENT.keysDown ].length === 0 ) ){
|
203
|
+
ELEM.get( this.markupElemIds.value ).blur();
|
204
|
+
}
|
205
|
+
}
|
206
|
+
}).nu(
|
207
|
+
HRect.nu(this.rect.width/2,0,this.rect.width-32,20),
|
208
|
+
this, {
|
209
|
+
value: this.year(),
|
210
|
+
minValue: -38399,
|
211
|
+
maxValue: 38400,
|
212
|
+
focusOnCreate: true,
|
213
|
+
refreshOnInput: false
|
214
|
+
}
|
215
|
+
);
|
216
|
+
},
|
217
|
+
|
135
218
|
/** = Description
|
136
219
|
* Draws the calendar with the date open given as input.
|
137
220
|
*
|
@@ -146,10 +229,13 @@ HCalendar = HControl.extend({
|
|
146
229
|
_monthLast = this.lastDateOfMonth(_date),
|
147
230
|
_firstDate = _calendarDateRange[0],
|
148
231
|
_lastDate = _calendarDateRange[1],
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
232
|
+
_availWidth = this.rect.width-2,
|
233
|
+
_availHeight = this.rect.height-36,
|
234
|
+
_leftPlus = (_availWidth%8)-2,
|
235
|
+
_topPlus = _availHeight%6,
|
236
|
+
_column_width = Math.floor(_availWidth/8),
|
237
|
+
_row_height = Math.floor(_availHeight/6),
|
238
|
+
_week_html_pre = ['<div class="calendar_weeks_week_row" style="width:'+(_availWidth)+'px;height:'+_row_height+'px;top:','px">'],
|
153
239
|
_week_html_suf = '</div>',
|
154
240
|
_col_html_pre = ['<a href="javascript:void(HSystem.views['+this.viewId+'].setValue(','));" class="calendar_weeks_week_col','" style="width:'+_column_width+'px;height:'+_row_height+'px;line-height:'+_row_height+'px;left:','px">'],
|
155
241
|
_col_html_suf = '</a>',
|
@@ -163,6 +249,7 @@ HCalendar = HControl.extend({
|
|
163
249
|
_colMs,
|
164
250
|
_colSecs,
|
165
251
|
_colDate,
|
252
|
+
_monthYearHTML,
|
166
253
|
_extraCssClass;
|
167
254
|
for(; _row<6; _row++){
|
168
255
|
_week_html = [];
|
@@ -190,7 +277,7 @@ HCalendar = HControl.extend({
|
|
190
277
|
_col_html_pre[1],
|
191
278
|
_extraCssClass,
|
192
279
|
_col_html_pre[2],
|
193
|
-
(_col*_column_width),
|
280
|
+
(_col*_column_width+_leftPlus),
|
194
281
|
_col_html_pre[3],
|
195
282
|
this.mday(_colDate),
|
196
283
|
_col_html_suf
|
@@ -199,13 +286,24 @@ HCalendar = HControl.extend({
|
|
199
286
|
_week_html.push(_col_html);
|
200
287
|
}
|
201
288
|
_month_html.push([
|
202
|
-
_week_html_pre.join(_row*_row_height),
|
289
|
+
_week_html_pre.join(_row*_row_height+_topPlus),
|
203
290
|
_week_html.join(''),
|
204
291
|
_week_html_suf
|
205
292
|
].join('') );
|
206
293
|
}
|
207
|
-
ELEM.setHTML(this.markupElemIds.value, _month_html.join(''));
|
208
|
-
|
294
|
+
ELEM.setHTML( this.markupElemIds.value, _month_html.join('') );
|
295
|
+
_monthYearHTML = [
|
296
|
+
'<a href="javascript:void(HSystem.views[',
|
297
|
+
this.viewId,
|
298
|
+
'].monthMenu());">',
|
299
|
+
this.monthName(_date),
|
300
|
+
'</a> <a href="javascript:void(HSystem.views[',
|
301
|
+
this.viewId,
|
302
|
+
'].yearMenu());">',
|
303
|
+
this.year(_date),
|
304
|
+
'</a>'
|
305
|
+
].join('');
|
306
|
+
ELEM.setHTML( this.markupElemIds.state, _monthYearHTML );
|
209
307
|
this.viewMonth = [_monthFirst.getUTCFullYear(),_monthFirst.getUTCMonth()];
|
210
308
|
}
|
211
309
|
});
|
@@ -1,7 +1,6 @@
|
|
1
1
|
.calendar_control {
|
2
2
|
position: absolute;
|
3
|
-
left: 0px; top: 0px; right:
|
4
|
-
border: 1px solid #999;
|
3
|
+
left: 0px; top: 0px; right: 0px; bottom: 0px;
|
5
4
|
}
|
6
5
|
.calendar_head {
|
7
6
|
position: absolute;
|
@@ -85,11 +84,8 @@
|
|
85
84
|
}
|
86
85
|
.calendar_weeks_week_col_no {
|
87
86
|
color: #666;
|
88
|
-
border-left: 1px solid #999;
|
89
|
-
border-top: 1px solid #999;
|
90
87
|
}
|
91
88
|
.calendar_weeks_week_col_no:hover {
|
92
|
-
background-color: #fff;
|
93
89
|
color: #000;
|
94
90
|
}
|
95
91
|
.calendar_weeks_week_col_yes,
|
@@ -97,11 +93,97 @@
|
|
97
93
|
color: #000;
|
98
94
|
background-color: #ddd;
|
99
95
|
font-weight: bold;
|
100
|
-
border
|
101
|
-
border-top: 1px solid #666;
|
96
|
+
border: 1px solid #666;
|
102
97
|
}
|
103
98
|
.calendar_weeks_week_col_sel,
|
104
99
|
.calendar_weeks_week_col_yes:hover {
|
105
100
|
background-color: #fff;
|
106
101
|
}
|
102
|
+
.calendar_bg {
|
103
|
+
position: absolute;
|
104
|
+
left: -1px; right: -1px;
|
105
|
+
top: -1px; bottom: -2px;
|
106
|
+
}
|
107
|
+
.calendar_bg * {
|
108
|
+
position: absolute;
|
109
|
+
font-size: 0; line-height: 0; /* ie bug work-arounds */
|
110
|
+
}
|
111
|
+
.disabled > .calendar_bg {
|
112
|
+
opacity: 0.9;
|
113
|
+
}
|
114
|
+
.calendar_bg .calendar_nw,
|
115
|
+
.calendar_bg .calendar_n,
|
116
|
+
.calendar_bg .calendar_ne,
|
117
|
+
.calendar_bg .calendar_sw,
|
118
|
+
.calendar_bg .calendar_s,
|
119
|
+
.calendar_bg .calendar_se {
|
120
|
+
height: 12px;
|
121
|
+
background-image: #{this.getCssFilePath('calendar_parts1.png')};
|
122
|
+
}
|
123
|
+
.calendar_bg .calendar_c {
|
124
|
+
left: 12px; right: 12px; top: 12px; bottom: 12px;
|
125
|
+
background-color: #fbfafb;
|
126
|
+
/* background-image: #{this.getCssFilePath('calendar_bg.png')};*/
|
127
|
+
}
|
128
|
+
.calendar_bg .calendar_w,
|
129
|
+
.calendar_bg .calendar_e {
|
130
|
+
top: 12px; bottom: 12px;
|
131
|
+
width: 12px;
|
132
|
+
background-image: #{this.getCssFilePath('calendar_parts2.png')};
|
133
|
+
}
|
134
|
+
.calendar_bg .calendar_n,
|
135
|
+
.calendar_bg .calendar_s {
|
136
|
+
left: 12px; right: 12px;
|
137
|
+
}
|
138
|
+
.calendar_bg .calendar_nw,
|
139
|
+
.calendar_bg .calendar_ne,
|
140
|
+
.calendar_bg .calendar_sw,
|
141
|
+
.calendar_bg .calendar_se {
|
142
|
+
width: 12px;
|
143
|
+
}
|
144
|
+
.calendar_bg .calendar_nw,
|
145
|
+
.calendar_bg .calendar_n,
|
146
|
+
.calendar_bg .calendar_ne {
|
147
|
+
top: 0px;
|
148
|
+
}
|
149
|
+
.calendar_bg .calendar_sw,
|
150
|
+
.calendar_bg .calendar_s,
|
151
|
+
.calendar_bg .calendar_se {
|
152
|
+
bottom: 0px;
|
153
|
+
}
|
154
|
+
.calendar_bg .calendar_nw,
|
155
|
+
.calendar_bg .calendar_w,
|
156
|
+
.calendar_bg .calendar_sw {
|
157
|
+
left: 0px;
|
158
|
+
}
|
159
|
+
.calendar_bg .calendar_ne,
|
160
|
+
.calendar_bg .calendar_e,
|
161
|
+
.calendar_bg .calendar_se {
|
162
|
+
right: 0px;
|
163
|
+
}
|
164
|
+
.calendar_bg .calendar_nw {
|
165
|
+
background-position: 0px 0px;
|
166
|
+
}
|
167
|
+
.calendar_bg .calendar_n {
|
168
|
+
background-position: 0px -24px;
|
169
|
+
}
|
170
|
+
.calendar_bg .calendar_ne {
|
171
|
+
background-position: -12px 0px;
|
172
|
+
}
|
173
|
+
.calendar_bg .calendar_sw {
|
174
|
+
background-position: 0px -12px;
|
175
|
+
}
|
176
|
+
.calendar_bg .calendar_s {
|
177
|
+
background-position: 0px -36px;
|
178
|
+
}
|
179
|
+
.calendar_bg .calendar_se {
|
180
|
+
background-position: -12px -12px;
|
181
|
+
}
|
182
|
+
.calendar_bg .calendar_w {
|
183
|
+
background-position: 0px 0px;
|
184
|
+
}
|
185
|
+
.calendar_bg .calendar_e {
|
186
|
+
background-position: -12px 0px;
|
187
|
+
}
|
188
|
+
|
107
189
|
|
@@ -1,3 +1,14 @@
|
|
1
|
+
<div class="calendar_bg">
|
2
|
+
<div class="calendar_nw"></div>
|
3
|
+
<div class="calendar_n"></div>
|
4
|
+
<div class="calendar_ne"></div>
|
5
|
+
<div class="calendar_w"></div>
|
6
|
+
<div class="calendar_c"></div>
|
7
|
+
<div class="calendar_e"></div>
|
8
|
+
<div class="calendar_sw"></div>
|
9
|
+
<div class="calendar_s"></div>
|
10
|
+
<div class="calendar_se"></div>
|
11
|
+
</div>
|
1
12
|
<div class="calendar_control" id="control#{_ID}">
|
2
13
|
<div class="calendar_head">
|
3
14
|
<div class="calendar_head_prev_month" onclick="HSystem.views[#{this.viewId}].prevMonth();"></div>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -16,10 +16,6 @@ HDateTime = HClass.extend({
|
|
16
16
|
msDay: 86400000,
|
17
17
|
msHour: 3600000,
|
18
18
|
msMinute: 60000,
|
19
|
-
months_localized: [
|
20
|
-
'January', 'February', 'March', 'April', 'May', 'June', 'July',
|
21
|
-
'August', 'September', 'October', 'November', 'December'
|
22
|
-
],
|
23
19
|
|
24
20
|
/** = Description
|
25
21
|
* Returns month name of the given date.
|
@@ -33,7 +29,7 @@ HDateTime = HClass.extend({
|
|
33
29
|
**/
|
34
30
|
monthName: function(_date){
|
35
31
|
_date = (_date instanceof Date)?_date:this.date();
|
36
|
-
return
|
32
|
+
return HLocale.dateTime.strings.monthsLong[_date.getUTCMonth()];
|
37
33
|
},
|
38
34
|
|
39
35
|
/** = Description
|
@@ -77,6 +73,13 @@ HDateTime = HClass.extend({
|
|
77
73
|
return _date.getUTCDate();
|
78
74
|
},
|
79
75
|
|
76
|
+
setMday: function( _mday ){
|
77
|
+
var
|
78
|
+
_date = this.date();
|
79
|
+
_date.setUTCDate( _mday );
|
80
|
+
return Math.round( _date.getTime()/1000 );
|
81
|
+
},
|
82
|
+
|
80
83
|
/** = Description
|
81
84
|
* Returns month number for the date given as input.
|
82
85
|
* Note that months are numbered from 0 to 11.
|
@@ -93,6 +96,13 @@ HDateTime = HClass.extend({
|
|
93
96
|
return _date.getUTCMonth();
|
94
97
|
},
|
95
98
|
|
99
|
+
setMonth: function( _month ){
|
100
|
+
var
|
101
|
+
_date = this.date();
|
102
|
+
_date.setUTCMonth( _month );
|
103
|
+
return Math.round( _date.getTime()/1000 );
|
104
|
+
},
|
105
|
+
|
96
106
|
/** = Description
|
97
107
|
* Returns year for given date.
|
98
108
|
*
|
@@ -108,6 +118,13 @@ HDateTime = HClass.extend({
|
|
108
118
|
return _date.getUTCFullYear();
|
109
119
|
},
|
110
120
|
|
121
|
+
setYear: function( _year ){
|
122
|
+
var
|
123
|
+
_date = this.date();
|
124
|
+
_date.setUTCFullYear( _year );
|
125
|
+
return Math.round( _date.getTime()/1000 );
|
126
|
+
},
|
127
|
+
|
111
128
|
/** = Description
|
112
129
|
* Returns the timezone offset in milliseconds.
|
113
130
|
*
|
@@ -750,14 +750,16 @@ EVENT = {
|
|
750
750
|
// if it's no longer the active control.
|
751
751
|
_prevActiveCtrl = _this.activeControl;
|
752
752
|
// Did the active control change?
|
753
|
-
if (_ctrl && (_ctrl !== _prevActiveCtrl) && (_ctrl._gainedActiveStatus || _prevActiveCtrl._lostActiveStatus)) {
|
753
|
+
if (_ctrl && (_ctrl !== _prevActiveCtrl) && (_ctrl._gainedActiveStatus || (_prevActiveCtrl && _prevActiveCtrl._lostActiveStatus))) {
|
754
754
|
if (_prevActiveCtrl && _prevActiveCtrl._lostActiveStatus) {
|
755
755
|
// Previously active control just lost the active status.
|
756
|
-
_prevActiveCtrl
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
756
|
+
if( _prevActiveCtrl ){
|
757
|
+
_prevActiveCtrl.active = false;
|
758
|
+
_prevActiveCtrl._lostActiveStatus(_ctrl);
|
759
|
+
if(_this.focusTrace){
|
760
|
+
_prevActiveCtrl.setStyle('border','2px solid green');
|
761
|
+
_this.prevActiveCtrl && _this.prevActiveCtrl.setStyle('border','2px solid blue');
|
762
|
+
}
|
761
763
|
}
|
762
764
|
_this.prevActiveCtrl = _prevActiveCtrl;
|
763
765
|
}
|
@@ -13,6 +13,13 @@ HLocale = {
|
|
13
13
|
},
|
14
14
|
dateTime: {
|
15
15
|
strings: {
|
16
|
+
monthsLong: [
|
17
|
+
'January', 'February', 'March', 'April', 'May', 'June', 'July',
|
18
|
+
'August', 'September', 'October', 'November', 'December'
|
19
|
+
],
|
20
|
+
monthsShort: [
|
21
|
+
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
|
22
|
+
],
|
16
23
|
weekDaysLong: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
|
17
24
|
weekDaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ],
|
18
25
|
weekLong: 'Week',
|
@@ -83,8 +83,10 @@ HRadioButtonList = HControl.extend({
|
|
83
83
|
}
|
84
84
|
this.radioButtonIndexValue && this.radioButtonIndexValue.die();
|
85
85
|
this.listItems = null;
|
86
|
-
|
87
|
-
this.listItemViews
|
86
|
+
if( this.listItemViews ){
|
87
|
+
for(var i=0;i<this.listItemViews.length;i++){
|
88
|
+
this.listItemViews[i].die();
|
89
|
+
}
|
88
90
|
}
|
89
91
|
this.listItemViews = null;
|
90
92
|
this.radioButtonIndexValue && this.radioButtonIndexValue.die();
|
@@ -21,7 +21,7 @@ HMiniMenu = HRadioButtonList.extend({
|
|
21
21
|
click: true
|
22
22
|
},
|
23
23
|
|
24
|
-
|
24
|
+
subComponentHeight: 15,
|
25
25
|
|
26
26
|
repositionMenuItems: function(){
|
27
27
|
var
|
@@ -108,7 +108,8 @@ HMiniMenu = HRadioButtonList.extend({
|
|
108
108
|
},
|
109
109
|
|
110
110
|
drawSubviews: function(){
|
111
|
-
var
|
111
|
+
var
|
112
|
+
itemStyle = {
|
112
113
|
'background-color': '#f6f6f6',
|
113
114
|
'border': '1px solid #999',
|
114
115
|
'overflow': 'auto',
|
@@ -130,6 +131,10 @@ HMiniMenu = HRadioButtonList.extend({
|
|
130
131
|
this.base(listItems);
|
131
132
|
this.valueMatrix = this.menuItemView.valueMatrix;
|
132
133
|
this.refreshValue();
|
134
|
+
if( this.options.initialVisibility ){
|
135
|
+
EVENT.changeActiveControl(this);
|
136
|
+
this.menuShow();
|
137
|
+
}
|
133
138
|
},
|
134
139
|
|
135
140
|
createComponent: function( i, _label ){
|
data/lib/conf/argv.rb
CHANGED
@@ -6,38 +6,8 @@
|
|
6
6
|
# with this software package. If not, contact licensing@riassence.com
|
7
7
|
##
|
8
8
|
|
9
|
-
# Includes the Signal Communication utility.
|
10
|
-
# Used to respond via special PID files in the run directory of the environment
|
11
|
-
require 'daemon/sigcomm'
|
12
|
-
|
13
|
-
|
14
9
|
module RSence
|
15
|
-
|
16
|
-
# @private Returns true, if platform fully supports POSIX standard signals.
|
17
|
-
def self.pid_support?
|
18
|
-
# true for non-windows
|
19
|
-
return (not ['i386-mingw32','x86-mingw32'].include?(RUBY_PLATFORM))
|
20
|
-
end
|
21
|
-
|
22
|
-
# @private Returns true, if platform is linux
|
23
|
-
def self.linux?
|
24
|
-
return RUBY_PLATFORM.end_with?('-linux')
|
25
|
-
end
|
26
|
-
|
27
|
-
# @private Returns true, if platform is Mac OS X
|
28
|
-
def self.darwin?
|
29
|
-
return RUBY_PLATFORM.include?('-darwin')
|
30
|
-
end
|
31
|
-
|
32
|
-
# @private Returns signal name that resembles INFO or PWR (extra signal to poll for server status)
|
33
|
-
def self.info_signal_name
|
34
|
-
if self.linux?
|
35
|
-
return 'PWR'
|
36
|
-
else
|
37
|
-
return 'INFO'
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
10
|
+
|
41
11
|
# @private ARGVParser is the "user interface" as a command-line argument parser.
|
42
12
|
# It parses the command-line arguments and sets up things accordingly.
|
43
13
|
class ARGVParser
|
@@ -832,105 +802,6 @@ module RSence
|
|
832
802
|
|
833
803
|
end
|
834
804
|
|
835
|
-
# @private This accessor enables RSence.argv method, which returns the ARGVParser instance
|
836
|
-
def self.argv; @@argv_parser; end
|
837
|
-
|
838
|
-
# @private This accessor enables RSence.cmd method, which returns the command the process was started with.
|
839
|
-
def self.cmd; @@argv_parser.cmd; end
|
840
|
-
|
841
|
-
# Command line options parsed
|
842
|
-
# @return [Hash] Parsed command-line options:
|
843
|
-
# *Key* (Symbol):: *Value*
|
844
|
-
# +:env_path+:: (String) The directory of the environment.
|
845
|
-
# +:conf_files+:: (Array of Strings) Additional configuration files given with the +--conf+ command-line option. Default is +[]+.
|
846
|
-
# +:debug+:: (true or false) True, if the +-d+ or +--debug+ command-line option was given. Default is false.
|
847
|
-
# +:verbose+:: (true or false) True, if the +-v+ or +--verbose+ command-line option was given. Default is false.
|
848
|
-
# +:log_fg+:: (true or false) True, if the +-f+ or +--log-fg+ command-line option was given. Default is false.
|
849
|
-
# +:trace_js+:: (true or false) True, if the +--trace-js+ command-line option was given. Default is false.
|
850
|
-
# +:trace_delegate+:: (true or false) True, if the +--trace-delegate+ command-line option was given. Default is false.
|
851
|
-
# +:port+:: (String or nil) The TCP port number given with the +--port+ command-line option. Default is nil.
|
852
|
-
# +:addr+:: (String or nil) The TCP bind address given with the +--addr+ command-line option. Default is nil.
|
853
|
-
# +:server+:: (String or nil) The Rack http server handler given with the +--server+ command-line option. Default is nil.
|
854
|
-
# +:reset_ses+:: (true or false) True, if the +-r+ or +--reset-sessions+ command-line option was given. Default is false.
|
855
|
-
# +:autoupdate+:: (true or false) True, if the +-a+ or +--auto-update+ command-line option was given. Default is false.
|
856
|
-
# +:latency+:: (Number) Amount of milliseconds to sleep in each request given with the +--latency+ command-line option. Default is 0.
|
857
|
-
# +:say+:: (true or false) True, if the +-S+ or +--say+ command-line option was given. Default is false.
|
858
|
-
def self.args; @@argv_parser.args; end
|
859
|
-
|
860
|
-
# @private This accessor enables RSence.startable? method, which returns true if a start-type command was given.
|
861
|
-
def self.startable?; @@argv_parser.startable?; end
|
862
|
-
|
863
|
-
# @return [String] The version of RSence
|
864
|
-
def self.version; @@argv_parser.version; end
|
865
|
-
|
866
|
-
# @private This accessor enables RSence.startup method, which starts RSence.
|
867
|
-
def self.startup
|
868
|
-
puts "Loading configuration..." if self.args[:verbose]
|
869
|
-
# Use the default configuration:
|
870
|
-
require 'conf/default'
|
871
|
-
@@config = Configuration.new(self.args).config
|
872
|
-
|
873
|
-
# RSence runtime configuration data
|
874
|
-
# @return [Hash] the active configuration structure as defined by the {file:default_conf default configuration} and overridden by local configuration files.
|
875
|
-
def self.config
|
876
|
-
@@config
|
877
|
-
end
|
878
|
-
|
879
|
-
def self.transporter
|
880
|
-
@@transporter
|
881
|
-
end
|
882
|
-
def self.transporter=(transporter)
|
883
|
-
if class_variable_defined?(:'@@transporter')
|
884
|
-
warn "WARN: Transporter already set."
|
885
|
-
return
|
886
|
-
else
|
887
|
-
@@transporter = transporter
|
888
|
-
end
|
889
|
-
end
|
890
|
-
|
891
|
-
def self.plugin_manager
|
892
|
-
@@plugin_manager
|
893
|
-
end
|
894
|
-
def self.plugin_manager=(plugin_manager)
|
895
|
-
if class_variable_defined?(:'@@plugin_manager')
|
896
|
-
warn "WARN: @@plugin_manager already set."
|
897
|
-
return
|
898
|
-
else
|
899
|
-
@@plugin_manager = plugin_manager
|
900
|
-
end
|
901
|
-
end
|
902
|
-
|
903
|
-
def self.value_manager
|
904
|
-
@@value_manager
|
905
|
-
end
|
906
|
-
def self.value_manager=(value_manager)
|
907
|
-
if class_variable_defined?(:'@@value_manager')
|
908
|
-
warn "WARN: @@value_manager already set."
|
909
|
-
return
|
910
|
-
else
|
911
|
-
@@value_manager = value_manager
|
912
|
-
end
|
913
|
-
end
|
914
|
-
|
915
|
-
def self.session_manager
|
916
|
-
@@session_manager
|
917
|
-
end
|
918
|
-
def self.session_manager=(session_manager)
|
919
|
-
if class_variable_defined?(:'@@session_manager')
|
920
|
-
warn "WARN: @@session_manager already set."
|
921
|
-
return
|
922
|
-
else
|
923
|
-
@@session_manager = session_manager
|
924
|
-
end
|
925
|
-
end
|
926
|
-
|
927
|
-
## Riassence Daemon controls
|
928
|
-
require 'daemon/daemon'
|
929
|
-
puts "Starting RSence..." if self.args[:verbose]
|
930
|
-
daemon = HTTPDaemon.new
|
931
|
-
daemon.daemonize!
|
932
|
-
end
|
933
|
-
|
934
805
|
# @private The ARGVParser instance and its startup
|
935
806
|
@@argv_parser = ARGVParser.new
|
936
807
|
@@argv_parser.parse( ARGV )
|
data/lib/conf/default.rb
CHANGED
@@ -198,11 +198,11 @@ module RSence
|
|
198
198
|
end
|
199
199
|
end
|
200
200
|
|
201
|
-
if RUBY_VERSION.to_f >= 1.9
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
end
|
201
|
+
# if RUBY_VERSION.to_f >= 1.9
|
202
|
+
# # The encodings mess up compression when using ruby1.9
|
203
|
+
# warn "Disabling gzip support for ruby 1.9" if args[:debug]
|
204
|
+
# config[:no_gzip] = true
|
205
|
+
# end
|
206
206
|
|
207
207
|
# The default address of the index_html plugin
|
208
208
|
unless config[:index_html].has_key?(:respond_address)
|
data/lib/plugins/gui_plugin.rb
CHANGED
@@ -93,6 +93,7 @@ module RSence
|
|
93
93
|
client_pkg.add_src_dir( src_dir )
|
94
94
|
end
|
95
95
|
end
|
96
|
+
sleep 0.1 until client_pkg.ready?
|
96
97
|
client_pkg.add_packages( @client_pkgs[:packages ] ) if @client_pkgs.has_key?(:packages )
|
97
98
|
client_pkg.add_themes( @client_pkgs[:theme_names ] ) if @client_pkgs.has_key?(:theme_names )
|
98
99
|
client_pkg.add_gfx_formats( @client_pkgs[:gfx_formats ] ) if @client_pkgs.has_key?(:gfx_formats )
|
@@ -112,6 +113,7 @@ module RSence
|
|
112
113
|
client_pkg.del_src_dir( src_dir )
|
113
114
|
end
|
114
115
|
end
|
116
|
+
sleep 0.1 until client_pkg.ready?
|
115
117
|
client_pkg.del_reserved_names( @client_pkgs[:reserved_names] ) if @client_pkgs.has_key?(:reserved_names)
|
116
118
|
client_pkg.del_gfx_formats( @client_pkgs[:gfx_formats ] ) if @client_pkgs.has_key?(:gfx_formats )
|
117
119
|
client_pkg.del_themes( @client_pkgs[:theme_names ] ) if @client_pkgs.has_key?(:theme_names )
|
@@ -30,7 +30,7 @@ module RSence
|
|
30
30
|
super
|
31
31
|
@plugin_plugins = RSence::PluginManager.new({
|
32
32
|
:plugin_paths => [ bundle_path('plugins') ],
|
33
|
-
:autoreload =>
|
33
|
+
:autoreload => true,
|
34
34
|
:name_prefix => name_with_manager_s.to_sym,
|
35
35
|
:parent_manager => @plugins,
|
36
36
|
:resolved_deps => [:system]
|