rsence 2.1.10 → 2.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/js/controls/textarea/themes/default/textarea.css +2 -2
- data/js/controls/textcontrol/themes/default/textcontrol.css +1 -1
- data/js/core/elem/elem.js +145 -221
- data/js/core/event/event.js +2 -2
- 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_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_edit/old_timesheet_item_edit.js +274 -0
- data/js/foundation/eventmanager/eventmanager.js +3 -3
- data/js/foundation/view/view.js +5 -4
- data/js/menus/minimenu/minimenu.js +1 -1
- metadata +12 -5
@@ -0,0 +1,42 @@
|
|
1
|
+
.timesheet_item,
|
2
|
+
.timesheet_item_middle,
|
3
|
+
.timesheet_item_label,
|
4
|
+
.timesheet_item_resize_top,
|
5
|
+
.timesheet_item_move,
|
6
|
+
.timesheet_item_resize_bottom {
|
7
|
+
position: absolute;
|
8
|
+
left: 0px; right: 0px;
|
9
|
+
}
|
10
|
+
.timesheet_item {
|
11
|
+
top: 0px; bottom: 0px;
|
12
|
+
border: 1px solid #c00;
|
13
|
+
background-color: #c66;
|
14
|
+
opacity: 0.75;
|
15
|
+
}
|
16
|
+
.active .timesheet_item {
|
17
|
+
opacity: 1.0;
|
18
|
+
}
|
19
|
+
.timesheet_item_middle {
|
20
|
+
top: 50%; height: 0px;
|
21
|
+
overflow: visible;
|
22
|
+
}
|
23
|
+
.timesheet_item_label {
|
24
|
+
top: -6px; height: 12px;
|
25
|
+
font-size: 12px;
|
26
|
+
text-align: center;
|
27
|
+
color: #333;
|
28
|
+
opacity: 1;
|
29
|
+
font-family: Arial, sans-serif;
|
30
|
+
}
|
31
|
+
.timesheet_item_resize_top {
|
32
|
+
top: 0px; height: 3px;
|
33
|
+
cursor: n-resize;
|
34
|
+
}
|
35
|
+
.timesheet_item_move {
|
36
|
+
top: 3px; bottom: 3px;
|
37
|
+
cursor: move;
|
38
|
+
}
|
39
|
+
.timesheet_item_resize_bottom {
|
40
|
+
bottom: 0px; height: 3px;
|
41
|
+
cursor: s-resize;
|
42
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<div class="timesheet_item">
|
2
|
+
<div class="timesheet_item_middle">
|
3
|
+
<div class="timesheet_item_label" id="label#{_ID}">#{this.label}</div>
|
4
|
+
</div>
|
5
|
+
<div class="timesheet_item_resize_top"></div>
|
6
|
+
<div class="timesheet_item_resize_bottom"></div>
|
7
|
+
<div class="timesheet_item_move" id="subview#{_ID}"></div>
|
8
|
+
</div>
|
@@ -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
|
+
|
@@ -141,7 +141,7 @@ EVENT = {
|
|
141
141
|
/** Starts event listening.
|
142
142
|
**/
|
143
143
|
start: function() {
|
144
|
-
var _globalEventTargetElement = BROWSER_TYPE.ie?document:window,
|
144
|
+
var _globalEventTargetElement = (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9)?document:window,
|
145
145
|
_this = EVENT;
|
146
146
|
// _eventMap = [
|
147
147
|
Event.observe( _globalEventTargetElement, 'mousemove', _this.mouseMove );
|
@@ -221,7 +221,7 @@ EVENT = {
|
|
221
221
|
_this = EVENT,
|
222
222
|
_propIn,
|
223
223
|
_init = ( _this.listeners[_elemId] === undefined || _this.listeners[_elemId] === false );
|
224
|
-
if (BROWSER_TYPE.ie) {
|
224
|
+
if (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9) {
|
225
225
|
_elem.setAttribute('ctrl', _ctrl);
|
226
226
|
}
|
227
227
|
else {
|
@@ -694,7 +694,7 @@ EVENT = {
|
|
694
694
|
if (_isLeftButton === undefined) {
|
695
695
|
_isLeftButton = Event.isLeftClick(e);
|
696
696
|
}
|
697
|
-
if (BROWSER_TYPE.ie) {
|
697
|
+
if (BROWSER_TYPE.ie && !BROWSER_TYPE.ie9) {
|
698
698
|
_isLeftButton = true; // IE only supports click on left button
|
699
699
|
}
|
700
700
|
// Prevent right-click event from triggering click.
|
data/js/foundation/view/view.js
CHANGED
@@ -1286,11 +1286,12 @@ HView = HClass.extend({
|
|
1286
1286
|
// Remove this object's bindings, except the DOM element.
|
1287
1287
|
this.remove();
|
1288
1288
|
// Remove the DOM element bindings.
|
1289
|
-
|
1290
|
-
|
1289
|
+
if( this._domElementBindings ){
|
1290
|
+
for ( i = 0; i < this._domElementBindings.length; i++) {
|
1291
|
+
ELEM.del(this._domElementBindings.pop());
|
1292
|
+
}
|
1293
|
+
// this._domElementBindings = [];
|
1291
1294
|
}
|
1292
|
-
this._domElementBindings = [];
|
1293
|
-
|
1294
1295
|
|
1295
1296
|
// Remove the DOM object itself
|
1296
1297
|
ELEM.del(this.elemId);
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsence
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 2.1.
|
9
|
+
- 11
|
10
|
+
version: 2.1.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Riassence Inc.
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-29 00:00:00 +03:00
|
19
19
|
default_executable: rsence
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -280,14 +280,21 @@ files:
|
|
280
280
|
- js/datetime/datetimevalue/datetimevalue.js
|
281
281
|
- js/datetime/datetimevalue/js.inc
|
282
282
|
- js/datetime/timesheet/js.inc
|
283
|
+
- js/datetime/timesheet/old_timesheet.js
|
284
|
+
- js/datetime/timesheet/themes/default/old_timesheet.css
|
285
|
+
- js/datetime/timesheet/themes/default/old_timesheet.html
|
283
286
|
- js/datetime/timesheet/themes/default/timesheet.css
|
284
287
|
- js/datetime/timesheet/themes/default/timesheet.html
|
285
288
|
- js/datetime/timesheet/timesheet.js
|
286
289
|
- js/datetime/timesheet_item/js.inc
|
290
|
+
- js/datetime/timesheet_item/old_timesheet_item.js
|
291
|
+
- js/datetime/timesheet_item/themes/default/old_timesheet_item.css
|
292
|
+
- js/datetime/timesheet_item/themes/default/old_timesheet_item.html
|
287
293
|
- js/datetime/timesheet_item/themes/default/timesheet_item.css
|
288
294
|
- js/datetime/timesheet_item/themes/default/timesheet_item.html
|
289
295
|
- js/datetime/timesheet_item/timesheet_item.js
|
290
296
|
- js/datetime/timesheet_item_edit/js.inc
|
297
|
+
- js/datetime/timesheet_item_edit/old_timesheet_item_edit.js
|
291
298
|
- js/datetime/timesheet_item_edit/timesheet_item_edit.js
|
292
299
|
- js/foundation/application/application.js
|
293
300
|
- js/foundation/application/js.inc
|
@@ -403,7 +410,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
403
410
|
requirements: []
|
404
411
|
|
405
412
|
rubyforge_project: rsence-
|
406
|
-
rubygems_version: 1.
|
413
|
+
rubygems_version: 1.6.2
|
407
414
|
signing_key:
|
408
415
|
specification_version: 3
|
409
416
|
summary: Release 2.1 version of the RSence framework.
|