rsence-pre 2.1.8.1 → 2.2.0.0
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/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,274 @@
|
|
1
|
+
/* RSence
|
2
|
+
* Copyright 2009 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
|
+
/*** = Description
|
10
|
+
** Editor control for HTimeSheet. Editor can access the HTimeSheetItems
|
11
|
+
** on HTimeSheet.
|
12
|
+
***/
|
13
|
+
var//RSence.DateTime
|
14
|
+
HTimeSheetEditor = HControl.extend({
|
15
|
+
timeSheetItem: false,
|
16
|
+
createId: 0,
|
17
|
+
|
18
|
+
/** = Description
|
19
|
+
* Selects a HTimeSheetItem to edit.
|
20
|
+
*
|
21
|
+
* = Parameters
|
22
|
+
* +_timeSheetItem+:: A HTimeSheetItem to edit.
|
23
|
+
*
|
24
|
+
**/
|
25
|
+
setTimeSheetItem: function(_timeSheetItem){
|
26
|
+
this.timeSheetItem = _timeSheetItem;
|
27
|
+
this.textField.setValue( _timeSheetItem.label );
|
28
|
+
},
|
29
|
+
|
30
|
+
/** = Description
|
31
|
+
* Opens HTimeSheetEditor for the selected HTimeSheetItem.
|
32
|
+
*
|
33
|
+
**/
|
34
|
+
show: function(){
|
35
|
+
if(this.timeSheetItem!==false){
|
36
|
+
var _newRect = HRect.nu(this.timeSheetItem.rect);
|
37
|
+
if(_newRect.height < 40){
|
38
|
+
_newRect.setHeight( 40 );
|
39
|
+
}
|
40
|
+
if(_newRect.width < 200){
|
41
|
+
_newRect.setWidth( 200 );
|
42
|
+
}
|
43
|
+
var _timeSheetItemParentRect = this.timeSheetItem.parent.rect;
|
44
|
+
_newRect.offsetBy( _timeSheetItemParentRect.left, _timeSheetItemParentRect.top );
|
45
|
+
this.setRect( _newRect );
|
46
|
+
this.drawRect();
|
47
|
+
}
|
48
|
+
this.base();
|
49
|
+
},
|
50
|
+
|
51
|
+
/** = Description
|
52
|
+
* Hides the HTimeSheetEditor.
|
53
|
+
*
|
54
|
+
**/
|
55
|
+
hide: function(){
|
56
|
+
this.base();
|
57
|
+
},
|
58
|
+
origParent: null,
|
59
|
+
|
60
|
+
/** = Description
|
61
|
+
* Creates a new item.
|
62
|
+
*
|
63
|
+
* = Parameters
|
64
|
+
* +_properties+:: Properties for the new item.
|
65
|
+
*
|
66
|
+
**/
|
67
|
+
createItem: function( _properties ){
|
68
|
+
if(_properties['id'] === undefined){
|
69
|
+
this.createId--;
|
70
|
+
_properties['id'] = this.createId;
|
71
|
+
}
|
72
|
+
var _value = COMM.Values.clone( this.value ),
|
73
|
+
_create = _value['create'],
|
74
|
+
i = 0,
|
75
|
+
_item = false;
|
76
|
+
for(;i<_create.length;i++){
|
77
|
+
if(_create[i]['id'] === _properties['id']){
|
78
|
+
_item = _create[i];
|
79
|
+
break;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
if(!_item){
|
83
|
+
_create.push( _properties );
|
84
|
+
}
|
85
|
+
else {
|
86
|
+
for( var _key in _properties ){
|
87
|
+
_item[_key] = _properties[_key];
|
88
|
+
}
|
89
|
+
}
|
90
|
+
this.setValue( _value );
|
91
|
+
},
|
92
|
+
|
93
|
+
/** = Description
|
94
|
+
* Modifies an item.
|
95
|
+
*
|
96
|
+
* = Parameters
|
97
|
+
* +_properties+:: Properties to change.
|
98
|
+
*
|
99
|
+
**/
|
100
|
+
modifyItem: function( _properties ){
|
101
|
+
if(_properties['id'] < 0){
|
102
|
+
this.createItem( _properties );
|
103
|
+
}
|
104
|
+
else {
|
105
|
+
var _value = COMM.Values.clone( this.value ),
|
106
|
+
_modify = _value['modify'],
|
107
|
+
i = 0,
|
108
|
+
_item = false;
|
109
|
+
for(;i<_modify.length;i++){
|
110
|
+
if(_modify[i]['id'] === _properties['id']){
|
111
|
+
_item = _modify[i];
|
112
|
+
break;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
if(!_item){
|
116
|
+
_modify.push( _properties );
|
117
|
+
}
|
118
|
+
else {
|
119
|
+
for( var _key in _properties ){
|
120
|
+
_item[_key] = _properties[_key];
|
121
|
+
}
|
122
|
+
}
|
123
|
+
this.setValue( _value );
|
124
|
+
}
|
125
|
+
},
|
126
|
+
|
127
|
+
/** = Description
|
128
|
+
* Deletes an item with id given as parameter.
|
129
|
+
*
|
130
|
+
* = Parameters
|
131
|
+
* +_itemId+:: Id of an item to be deleted.
|
132
|
+
*
|
133
|
+
**/
|
134
|
+
deleteItem: function( _itemId ){
|
135
|
+
var _value = COMM.Values.clone( this.value );
|
136
|
+
if(_value['delete'].indexOf( _itemId ) === -1){
|
137
|
+
_value['delete'].push( _itemId );
|
138
|
+
this.setValue( _value );
|
139
|
+
}
|
140
|
+
},
|
141
|
+
|
142
|
+
/** = Description
|
143
|
+
* Refreshes the values by iterating through value['response'] and checking
|
144
|
+
* the new values from the response array.
|
145
|
+
*
|
146
|
+
**/
|
147
|
+
refreshValue: function(){
|
148
|
+
var _value = COMM.Values.clone( this.value ),
|
149
|
+
i = 0,
|
150
|
+
_parent = this.origParent?this.origParent:this.parent,
|
151
|
+
_listItemViews = _parent.listItemViews,
|
152
|
+
_response = _value['response'],
|
153
|
+
_item,
|
154
|
+
_itemValue,
|
155
|
+
_responseItem,
|
156
|
+
j, k;
|
157
|
+
for( ; i < _response.length; i++ ){
|
158
|
+
for( j = 0; j < _listItemViews.length; j++ ){
|
159
|
+
_responseItem = _response[i];
|
160
|
+
_item = _listItemViews[j];
|
161
|
+
if( _item.value['id'] === _responseItem['id'] ){
|
162
|
+
_itemValue = COMM.Values.clone( _item.value );
|
163
|
+
if(_responseItem['modify'] !== undefined){
|
164
|
+
for( k in _responseItem['modify'] ){
|
165
|
+
_itemValue[k] = _responseItem['modify'][k];
|
166
|
+
}
|
167
|
+
_item.setValue( _itemValue );
|
168
|
+
}
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
172
|
+
_value['response'] = [];
|
173
|
+
this.setValue( _value );
|
174
|
+
},
|
175
|
+
|
176
|
+
/** = Description
|
177
|
+
* Draws ok, delete and cancel buttons.
|
178
|
+
*
|
179
|
+
**/
|
180
|
+
drawSubviews: function(){
|
181
|
+
this.origParent = this.parent;
|
182
|
+
this.remove();
|
183
|
+
this.origParent.parent.addView( this );
|
184
|
+
ELEM.append( this.elemId, this.parent.elemId );
|
185
|
+
this.textField = HTextArea.nu(
|
186
|
+
[0,0,null,20,0,26],
|
187
|
+
this, {
|
188
|
+
value: ''
|
189
|
+
}
|
190
|
+
);
|
191
|
+
this.delButton = HButton.extend({
|
192
|
+
|
193
|
+
/** = Description
|
194
|
+
* Click function for delete button. Will call delete function on click
|
195
|
+
* for the current item.
|
196
|
+
*
|
197
|
+
**/
|
198
|
+
click: function(){
|
199
|
+
this.parent.hide();
|
200
|
+
var _sheetItem = this.parent.timeSheetItem;
|
201
|
+
if(_sheetItem!==false){
|
202
|
+
this.parent.deleteItem( _sheetItem.value['id'] );
|
203
|
+
_sheetItem.die();
|
204
|
+
var _parent = this.parent.origParent?this.parent.origParent:this.parent.parent;
|
205
|
+
var _sheetIdx = _parent.listItemViews.indexOf( _sheetItem );
|
206
|
+
_parent.listItemViews.splice( _sheetIdx, 1 );
|
207
|
+
this.parent.timeSheetItem = false;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
}).nu(
|
211
|
+
[2,null,60,24,null,0],
|
212
|
+
this, {
|
213
|
+
label: 'Delete',
|
214
|
+
events: {
|
215
|
+
click: true
|
216
|
+
}
|
217
|
+
}
|
218
|
+
);
|
219
|
+
this.okButton = HButton.extend({
|
220
|
+
|
221
|
+
/** = Description
|
222
|
+
* Click function for okButton will ok the modifications for the current item.
|
223
|
+
*
|
224
|
+
**/
|
225
|
+
click: function(){
|
226
|
+
this.parent.hide();
|
227
|
+
if(this.parent.timeSheetItem!==false){
|
228
|
+
var _label = this.parent.textField.getTextFieldValue(),
|
229
|
+
_id = this.parent.timeSheetItem.value['id'],
|
230
|
+
_data = this.parent.timeSheetItem.value;
|
231
|
+
_data['label'] = _label;
|
232
|
+
this.parent.modifyItem( _data );
|
233
|
+
this.parent.timeSheetItem.setTimeSheetItemLabel( _label );
|
234
|
+
this.parent.timeSheetItem = false;
|
235
|
+
}
|
236
|
+
}
|
237
|
+
}).nu(
|
238
|
+
[null,null,60,24,2,0],
|
239
|
+
this, {
|
240
|
+
label: 'Save',
|
241
|
+
events: {
|
242
|
+
click: true
|
243
|
+
}
|
244
|
+
}
|
245
|
+
);
|
246
|
+
this.cancelButton = HButton.extend({
|
247
|
+
/** = Description
|
248
|
+
* Click function for cancel button will cancel
|
249
|
+
* the modifications for the current item.
|
250
|
+
*
|
251
|
+
**/
|
252
|
+
click: function(){
|
253
|
+
this.parent.hide();
|
254
|
+
if(this.timeSheetItem!==false){
|
255
|
+
this.parent.timeSheetItem = false;
|
256
|
+
}
|
257
|
+
}
|
258
|
+
}).nu(
|
259
|
+
[null,null,60,24,66,0],
|
260
|
+
this, {
|
261
|
+
label: 'Cancel',
|
262
|
+
events: {
|
263
|
+
click: true
|
264
|
+
}
|
265
|
+
}
|
266
|
+
);
|
267
|
+
this.textField.setStyle('text-align','center');
|
268
|
+
this.textField.setStyle('line-height','12px');
|
269
|
+
this.textField.setStyle('font-size','12px');
|
270
|
+
this.textField.setStyle('font-family','Arial, sans-serif');
|
271
|
+
this.origParent.setEditor( this );
|
272
|
+
}
|
273
|
+
});
|
274
|
+
|
@@ -1,274 +0,0 @@
|
|
1
|
-
/* RSence
|
2
|
-
* Copyright 2009 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
|
-
/*** = Description
|
10
|
-
** Editor control for HTimeSheet. Editor can access the HTimeSheetItems
|
11
|
-
** on HTimeSheet.
|
12
|
-
***/
|
13
|
-
var//RSence.DateTime
|
14
|
-
HTimeSheetEditor = HControl.extend({
|
15
|
-
timeSheetItem: false,
|
16
|
-
createId: 0,
|
17
|
-
|
18
|
-
/** = Description
|
19
|
-
* Selects a HTimeSheetItem to edit.
|
20
|
-
*
|
21
|
-
* = Parameters
|
22
|
-
* +_timeSheetItem+:: A HTimeSheetItem to edit.
|
23
|
-
*
|
24
|
-
**/
|
25
|
-
setTimeSheetItem: function(_timeSheetItem){
|
26
|
-
this.timeSheetItem = _timeSheetItem;
|
27
|
-
this.textField.setValue( _timeSheetItem.label );
|
28
|
-
},
|
29
|
-
|
30
|
-
/** = Description
|
31
|
-
* Opens HTimeSheetEditor for the selected HTimeSheetItem.
|
32
|
-
*
|
33
|
-
**/
|
34
|
-
show: function(){
|
35
|
-
if(this.timeSheetItem!==false){
|
36
|
-
var _newRect = HRect.nu(this.timeSheetItem.rect);
|
37
|
-
if(_newRect.height < 40){
|
38
|
-
_newRect.setHeight( 40 );
|
39
|
-
}
|
40
|
-
if(_newRect.width < 200){
|
41
|
-
_newRect.setWidth( 200 );
|
42
|
-
}
|
43
|
-
var _timeSheetItemParentRect = this.timeSheetItem.parent.rect;
|
44
|
-
_newRect.offsetBy( _timeSheetItemParentRect.left, _timeSheetItemParentRect.top );
|
45
|
-
this.setRect( _newRect );
|
46
|
-
this.drawRect();
|
47
|
-
}
|
48
|
-
this.base();
|
49
|
-
},
|
50
|
-
|
51
|
-
/** = Description
|
52
|
-
* Hides the HTimeSheetEditor.
|
53
|
-
*
|
54
|
-
**/
|
55
|
-
hide: function(){
|
56
|
-
this.base();
|
57
|
-
},
|
58
|
-
origParent: null,
|
59
|
-
|
60
|
-
/** = Description
|
61
|
-
* Creates a new item.
|
62
|
-
*
|
63
|
-
* = Parameters
|
64
|
-
* +_properties+:: Properties for the new item.
|
65
|
-
*
|
66
|
-
**/
|
67
|
-
createItem: function( _properties ){
|
68
|
-
if(_properties['id'] === undefined){
|
69
|
-
this.createId--;
|
70
|
-
_properties['id'] = this.createId;
|
71
|
-
}
|
72
|
-
var _value = COMM.Values.clone( this.value ),
|
73
|
-
_create = _value['create'],
|
74
|
-
i = 0,
|
75
|
-
_item = false;
|
76
|
-
for(;i<_create.length;i++){
|
77
|
-
if(_create[i]['id'] === _properties['id']){
|
78
|
-
_item = _create[i];
|
79
|
-
break;
|
80
|
-
}
|
81
|
-
}
|
82
|
-
if(!_item){
|
83
|
-
_create.push( _properties );
|
84
|
-
}
|
85
|
-
else {
|
86
|
-
for( var _key in _properties ){
|
87
|
-
_item[_key] = _properties[_key];
|
88
|
-
}
|
89
|
-
}
|
90
|
-
this.setValue( _value );
|
91
|
-
},
|
92
|
-
|
93
|
-
/** = Description
|
94
|
-
* Modifies an item.
|
95
|
-
*
|
96
|
-
* = Parameters
|
97
|
-
* +_properties+:: Properties to change.
|
98
|
-
*
|
99
|
-
**/
|
100
|
-
modifyItem: function( _properties ){
|
101
|
-
if(_properties['id'] < 0){
|
102
|
-
this.createItem( _properties );
|
103
|
-
}
|
104
|
-
else {
|
105
|
-
var _value = COMM.Values.clone( this.value ),
|
106
|
-
_modify = _value['modify'],
|
107
|
-
i = 0,
|
108
|
-
_item = false;
|
109
|
-
for(;i<_modify.length;i++){
|
110
|
-
if(_modify[i]['id'] === _properties['id']){
|
111
|
-
_item = _modify[i];
|
112
|
-
break;
|
113
|
-
}
|
114
|
-
}
|
115
|
-
if(!_item){
|
116
|
-
_modify.push( _properties );
|
117
|
-
}
|
118
|
-
else {
|
119
|
-
for( var _key in _properties ){
|
120
|
-
_item[_key] = _properties[_key];
|
121
|
-
}
|
122
|
-
}
|
123
|
-
this.setValue( _value );
|
124
|
-
}
|
125
|
-
},
|
126
|
-
|
127
|
-
/** = Description
|
128
|
-
* Deletes an item with id given as parameter.
|
129
|
-
*
|
130
|
-
* = Parameters
|
131
|
-
* +_itemId+:: Id of an item to be deleted.
|
132
|
-
*
|
133
|
-
**/
|
134
|
-
deleteItem: function( _itemId ){
|
135
|
-
var _value = COMM.Values.clone( this.value );
|
136
|
-
if(_value['delete'].indexOf( _itemId ) === -1){
|
137
|
-
_value['delete'].push( _itemId );
|
138
|
-
this.setValue( _value );
|
139
|
-
}
|
140
|
-
},
|
141
|
-
|
142
|
-
/** = Description
|
143
|
-
* Refreshes the values by iterating through value['response'] and checking
|
144
|
-
* the new values from the response array.
|
145
|
-
*
|
146
|
-
**/
|
147
|
-
refreshValue: function(){
|
148
|
-
var _value = COMM.Values.clone( this.value ),
|
149
|
-
i = 0,
|
150
|
-
_parent = this.origParent?this.origParent:this.parent,
|
151
|
-
_listItemViews = _parent.listItemViews,
|
152
|
-
_response = _value['response'],
|
153
|
-
_item,
|
154
|
-
_itemValue,
|
155
|
-
_responseItem,
|
156
|
-
j, k;
|
157
|
-
for( ; i < _response.length; i++ ){
|
158
|
-
for( j = 0; j < _listItemViews.length; j++ ){
|
159
|
-
_responseItem = _response[i];
|
160
|
-
_item = _listItemViews[j];
|
161
|
-
if( _item.value['id'] === _responseItem['id'] ){
|
162
|
-
_itemValue = COMM.Values.clone( _item.value );
|
163
|
-
if(_responseItem['modify'] !== undefined){
|
164
|
-
for( k in _responseItem['modify'] ){
|
165
|
-
_itemValue[k] = _responseItem['modify'][k];
|
166
|
-
}
|
167
|
-
_item.setValue( _itemValue );
|
168
|
-
}
|
169
|
-
}
|
170
|
-
}
|
171
|
-
}
|
172
|
-
_value['response'] = [];
|
173
|
-
this.setValue( _value );
|
174
|
-
},
|
175
|
-
|
176
|
-
/** = Description
|
177
|
-
* Draws ok, delete and cancel buttons.
|
178
|
-
*
|
179
|
-
**/
|
180
|
-
drawSubviews: function(){
|
181
|
-
this.origParent = this.parent;
|
182
|
-
this.remove();
|
183
|
-
this.origParent.parent.addView( this );
|
184
|
-
ELEM.append( this.elemId, this.parent.elemId );
|
185
|
-
this.textField = HTextArea.nu(
|
186
|
-
[0,0,null,20,0,26],
|
187
|
-
this, {
|
188
|
-
value: ''
|
189
|
-
}
|
190
|
-
);
|
191
|
-
this.delButton = HButton.extend({
|
192
|
-
|
193
|
-
/** = Description
|
194
|
-
* Click function for delete button. Will call delete function on click
|
195
|
-
* for the current item.
|
196
|
-
*
|
197
|
-
**/
|
198
|
-
click: function(){
|
199
|
-
this.parent.hide();
|
200
|
-
var _sheetItem = this.parent.timeSheetItem;
|
201
|
-
if(_sheetItem!==false){
|
202
|
-
this.parent.deleteItem( _sheetItem.value['id'] );
|
203
|
-
_sheetItem.die();
|
204
|
-
var _parent = this.parent.origParent?this.parent.origParent:this.parent.parent;
|
205
|
-
var _sheetIdx = _parent.listItemViews.indexOf( _sheetItem );
|
206
|
-
_parent.listItemViews.splice( _sheetIdx, 1 );
|
207
|
-
this.parent.timeSheetItem = false;
|
208
|
-
}
|
209
|
-
}
|
210
|
-
}).nu(
|
211
|
-
[2,null,60,24,null,0],
|
212
|
-
this, {
|
213
|
-
label: 'Delete',
|
214
|
-
events: {
|
215
|
-
click: true
|
216
|
-
}
|
217
|
-
}
|
218
|
-
);
|
219
|
-
this.okButton = HButton.extend({
|
220
|
-
|
221
|
-
/** = Description
|
222
|
-
* Click function for okButton will ok the modifications for the current item.
|
223
|
-
*
|
224
|
-
**/
|
225
|
-
click: function(){
|
226
|
-
this.parent.hide();
|
227
|
-
if(this.parent.timeSheetItem!==false){
|
228
|
-
var _label = this.parent.textField.getTextFieldValue(),
|
229
|
-
_id = this.parent.timeSheetItem.value['id'],
|
230
|
-
_data = this.parent.timeSheetItem.value;
|
231
|
-
_data['label'] = _label;
|
232
|
-
this.parent.modifyItem( _data );
|
233
|
-
this.parent.timeSheetItem.setTimeSheetItemLabel( _label );
|
234
|
-
this.parent.timeSheetItem = false;
|
235
|
-
}
|
236
|
-
}
|
237
|
-
}).nu(
|
238
|
-
[null,null,60,24,2,0],
|
239
|
-
this, {
|
240
|
-
label: 'Save',
|
241
|
-
events: {
|
242
|
-
click: true
|
243
|
-
}
|
244
|
-
}
|
245
|
-
);
|
246
|
-
this.cancelButton = HButton.extend({
|
247
|
-
/** = Description
|
248
|
-
* Click function for cancel button will cancel
|
249
|
-
* the modifications for the current item.
|
250
|
-
*
|
251
|
-
**/
|
252
|
-
click: function(){
|
253
|
-
this.parent.hide();
|
254
|
-
if(this.timeSheetItem!==false){
|
255
|
-
this.parent.timeSheetItem = false;
|
256
|
-
}
|
257
|
-
}
|
258
|
-
}).nu(
|
259
|
-
[null,null,60,24,66,0],
|
260
|
-
this, {
|
261
|
-
label: 'Cancel',
|
262
|
-
events: {
|
263
|
-
click: true
|
264
|
-
}
|
265
|
-
}
|
266
|
-
);
|
267
|
-
this.textField.setStyle('text-align','center');
|
268
|
-
this.textField.setStyle('line-height','12px');
|
269
|
-
this.textField.setStyle('font-size','12px');
|
270
|
-
this.textField.setStyle('font-family','Arial, sans-serif');
|
271
|
-
this.origParent.setEditor( this );
|
272
|
-
}
|
273
|
-
});
|
274
|
-
|
File without changes
|
@@ -0,0 +1,72 @@
|
|
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
|
+
HValueAction = HClass.extend({
|
11
|
+
constructor: function( _rect, _parent, _options ){
|
12
|
+
this.parent = _parent;
|
13
|
+
this.options = _options;
|
14
|
+
if( _options.value ){
|
15
|
+
this.value = _options.value;
|
16
|
+
}
|
17
|
+
if( _options.valueObj ){
|
18
|
+
_options.valueObj.bind( this );
|
19
|
+
}
|
20
|
+
if( this.parent['addView'] instanceof Function ){
|
21
|
+
this.viewId = this.parent.addView( this );
|
22
|
+
}
|
23
|
+
this.refresh();
|
24
|
+
},
|
25
|
+
remove: function(){
|
26
|
+
if( this.parent ) {
|
27
|
+
var _viewZIdx = this.parent.viewsZOrder.indexOf(this.viewId),
|
28
|
+
_viewPIdx = this.parent.views.indexOf(this.viewId);
|
29
|
+
this.parent.views.splice(_viewPIdx,1);
|
30
|
+
HSystem.delView(this.viewId);
|
31
|
+
this.parent.viewsZOrder.splice( _viewZIdx, 1 );
|
32
|
+
var _sysUpdateZIndexOfChildrenBufferIndex = HSystem._updateZIndexOfChildrenBuffer.indexOf( this.viewId );
|
33
|
+
if(_sysUpdateZIndexOfChildrenBufferIndex !== -1){
|
34
|
+
HSystem._updateZIndexOfChildrenBuffer.splice( _sysUpdateZIndexOfChildrenBufferIndex, 1 );
|
35
|
+
}
|
36
|
+
this._updateZIndexAllSiblings();
|
37
|
+
this.parent = null;
|
38
|
+
this.parents = [];
|
39
|
+
}
|
40
|
+
return this;
|
41
|
+
},
|
42
|
+
die: function(){
|
43
|
+
this.parent.removeView( this );
|
44
|
+
if( this.valueObj ){
|
45
|
+
this.valueObj.release( this );
|
46
|
+
}
|
47
|
+
this.value = null;
|
48
|
+
this.viewId = null;
|
49
|
+
},
|
50
|
+
refresh: function(){
|
51
|
+
if( this.options[ 'refreshAction' ] ){
|
52
|
+
var
|
53
|
+
_refreshAction = this.options.refreshAction;
|
54
|
+
if( this.parent ){
|
55
|
+
if( this.parent[_refreshAction] ){
|
56
|
+
if( (this.parent[_refreshAction] instanceof Function) ){
|
57
|
+
this.parent[_refreshAction]( this.value );
|
58
|
+
}
|
59
|
+
else {
|
60
|
+
this.parent[_refreshAction] = this.value;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
},
|
66
|
+
onIdle: function(){
|
67
|
+
|
68
|
+
}
|
69
|
+
});
|
70
|
+
|
71
|
+
HValueAction.implement( HValueResponder );
|
72
|
+
|
File without changes
|