rsence 2.1.11 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. data/INSTALL.rdoc +5 -3
  2. data/README.rdoc +23 -22
  3. data/VERSION +1 -1
  4. data/conf/default_conf.yaml +65 -29
  5. data/conf/rsence_command_strings.yaml +101 -71
  6. data/js/comm/autosync/autosync.js +3 -3
  7. data/js/comm/jsloader/jsloader.js +16 -3
  8. data/js/comm/queue/queue.js +1 -1
  9. data/js/comm/transporter/transporter.js +106 -83
  10. data/js/comm/values/values.js +8 -2
  11. data/js/controls/button/button.js +9 -4
  12. data/js/controls/button/themes/default/button.css +1 -1
  13. data/js/controls/checkbox/themes/default/checkbox.css +1 -1
  14. data/js/controls/dialogs/sheet/sheet.js +27 -18
  15. data/js/controls/radiobutton/themes/default/radiobutton.css +1 -1
  16. data/js/controls/searchfield/searchfield.coffee +2 -0
  17. data/js/controls/searchfield/themes/default/searchfield.css +96 -0
  18. data/js/controls/searchfield/themes/default/searchfield.html +12 -0
  19. data/js/controls/searchfield/themes/default/searchfield_parts1-ie6.gif +0 -0
  20. data/js/controls/searchfield/themes/default/searchfield_parts1.png +0 -0
  21. data/js/controls/sliders/slider/slider.js +7 -1
  22. data/js/controls/stepper/stepper.js +6 -1
  23. data/js/controls/stringview/stringview.js +50 -39
  24. data/js/controls/tab/tab.js +103 -7
  25. data/js/controls/tab/themes/default/tab.css +2 -0
  26. data/js/controls/textarea/themes/default/textarea.css +4 -0
  27. data/js/controls/textcontrol/textcontrol.js +32 -2
  28. data/js/controls/textcontrol/themes/default/textcontrol.css +17 -2
  29. data/js/controls/uploader/themes/default/uploader.css +3 -3
  30. data/js/controls/uploader/themes/default/uploader.html +1 -1
  31. data/js/controls/uploader/uploader.coffee +110 -0
  32. data/js/controls/window/themes/default/window.css +28 -5
  33. data/js/controls/window/themes/default/window.html +2 -0
  34. data/js/controls/window/window.js +5 -1
  35. data/js/core/class/class.js +22 -4
  36. data/js/core/elem/elem.coffee +816 -0
  37. data/js/core/event/event.js +2 -2
  38. data/js/core/rsence_ns/rsence_ns.coffee +31 -0
  39. data/js/core/rsence_ns/rsence_ns.js +6 -6
  40. data/js/datetime/calendar/calendar.coffee +307 -0
  41. data/js/datetime/calendar/themes/default/calendar.css +90 -9
  42. data/js/datetime/calendar/themes/default/calendar.html +11 -0
  43. data/js/datetime/calendar/themes/default/calendar_bg-ie6.gif +0 -0
  44. data/js/datetime/calendar/themes/default/calendar_bg.png +0 -0
  45. data/js/datetime/calendar/themes/default/calendar_parts1-ie6.gif +0 -0
  46. data/js/datetime/calendar/themes/default/calendar_parts1.png +0 -0
  47. data/js/datetime/calendar/themes/default/calendar_parts2-ie6.gif +0 -0
  48. data/js/datetime/calendar/themes/default/calendar_parts2.png +0 -0
  49. data/js/datetime/datetimepicker/datetimepicker.js +217 -0
  50. data/js/datetime/datetimevalue/datetimevalue.js +22 -5
  51. data/js/datetime/timesheet/themes/default/timesheet.css +51 -22
  52. data/js/datetime/timesheet/themes/default/timesheet.html +4 -2
  53. data/js/datetime/timesheet/timesheet.js +782 -192
  54. data/js/datetime/timesheet_item/themes/default/timesheet_item.css +42 -11
  55. data/js/datetime/timesheet_item/themes/default/timesheet_item.html +4 -2
  56. data/js/datetime/timesheet_item/themes/default/timesheet_item_icons.png +0 -0
  57. data/js/datetime/timesheet_item/timesheet_item.js +158 -254
  58. data/js/datetime/timesheet_item_edit/timesheet_item_edit.js +0 -274
  59. data/js/foundation/application/application.js +52 -9
  60. data/js/foundation/control/eventresponder/eventresponder.js +7 -4
  61. data/js/foundation/control/valueaction/valueaction.js +71 -0
  62. data/js/foundation/eventmanager/eventmanager.js +71 -33
  63. data/js/foundation/geom/rect/rect.js +39 -7
  64. data/js/foundation/json_renderer/json_renderer.js +278 -62
  65. data/js/foundation/locale_settings/locale_settings.js +131 -0
  66. data/js/foundation/system/system.js +40 -13
  67. data/js/foundation/thememanager/thememanager.js +21 -0
  68. data/js/foundation/view/markupview/markupview.js +12 -12
  69. data/js/foundation/view/view.js +221 -27
  70. data/js/graphics/svgcontrol/svgcontrol.js +400 -0
  71. data/js/lists/checkboxlist/checkboxlist.js +18 -7
  72. data/js/lists/listitems/listitems.js +52 -38
  73. data/js/lists/radiobuttonlist/radiobuttonlist.js +23 -7
  74. data/js/menus/menuitem/menuitem.js +5 -0
  75. data/js/menus/menuitem/themes/default/menuitem.css +45 -0
  76. data/js/menus/menuitem/themes/default/menuitem.html +4 -0
  77. data/js/menus/minimenu/minimenu.js +47 -16
  78. data/js/menus/minimenuitem/minimenuitem.js +62 -0
  79. data/js/menus/{minimenu/minimenuitem → minimenuitem}/themes/default/minimenuitem.css +2 -2
  80. data/js/menus/{minimenu/minimenuitem → minimenuitem}/themes/default/minimenuitem.html +0 -0
  81. data/js/menus/{minimenu/minimenuitem → minimenuitem}/themes/default/minimenuitem_checkmark.png +0 -0
  82. data/js/menus/popupmenu/popupmenu.js +14 -0
  83. data/js/menus/popupmenu/themes/default/popupmenu.css +65 -0
  84. data/js/menus/popupmenu/themes/default/popupmenu.html +7 -0
  85. data/js/menus/popupmenu/themes/default/popupmenu.png +0 -0
  86. data/js/no_pkg/no_pkg.js +2 -0
  87. data/js/util/reloadapp/reloadapp.js +1 -1
  88. data/js/views/scrollview/scrollview.js +6 -0
  89. data/lib/rsence.rb +136 -3
  90. data/lib/rsence/argv.rb +218 -0
  91. data/lib/rsence/argv/argv_util.rb +58 -0
  92. data/lib/rsence/argv/env_check.rb +58 -0
  93. data/lib/rsence/argv/help_argv.rb +15 -0
  94. data/lib/rsence/argv/initenv_argv.rb +218 -0
  95. data/lib/rsence/argv/save_argv.rb +92 -0
  96. data/lib/rsence/argv/startup_argv.rb +118 -0
  97. data/lib/rsence/argv/status_argv.rb +132 -0
  98. data/lib/rsence/argv/test_port.rb +32 -0
  99. data/lib/{daemon → rsence}/daemon.rb +67 -23
  100. data/lib/{conf/default.rb → rsence/default_config.rb} +18 -10
  101. data/lib/{plugins → rsence}/dependencies.rb +0 -0
  102. data/lib/{util → rsence}/gzstring.rb +0 -0
  103. data/lib/rsence/http.rb +3 -0
  104. data/lib/{http → rsence/http}/broker.rb +106 -19
  105. data/lib/{http → rsence/http}/rackup.rb +0 -0
  106. data/lib/{http → rsence/http}/request.rb +0 -4
  107. data/lib/{http → rsence/http}/response.rb +0 -1
  108. data/lib/{session → rsence}/msg.rb +17 -1
  109. data/lib/{plugins → rsence}/pluginmanager.rb +29 -12
  110. data/lib/{plugins → rsence}/plugins.rb +7 -7
  111. data/lib/{plugins → rsence/plugins}/gui_plugin.rb +8 -3
  112. data/lib/{plugins → rsence/plugins}/guiparser.rb +9 -6
  113. data/lib/{plugins → rsence/plugins}/plugin.rb +23 -4
  114. data/lib/{plugins → rsence/plugins}/plugin_base.rb +11 -1
  115. data/lib/{plugins → rsence/plugins}/plugin_plugins.rb +2 -2
  116. data/lib/{plugins → rsence/plugins}/plugin_sqlite_db.rb +0 -0
  117. data/lib/{plugins → rsence/plugins}/servlet.rb +0 -0
  118. data/lib/{session → rsence}/sessionmanager.rb +101 -39
  119. data/lib/{session → rsence}/sessionstorage.rb +30 -16
  120. data/lib/{daemon → rsence}/sigcomm.rb +0 -0
  121. data/lib/{transporter → rsence}/transporter.rb +13 -11
  122. data/lib/{values/hvalue.rb → rsence/value.rb} +6 -1
  123. data/lib/{values → rsence}/valuemanager.rb +1 -1
  124. data/plugins/client_pkg/client_pkg.rb +14 -4
  125. data/plugins/client_pkg/info.yaml +2 -2
  126. data/plugins/client_pkg/lib/client_pkg_build.rb +145 -45
  127. data/plugins/client_pkg/lib/client_pkg_cache.rb +1 -1
  128. data/plugins/client_pkg/lib/client_pkg_serve.rb +1 -1
  129. data/plugins/main/main.rb +43 -3
  130. data/plugins/main/tmpl/index.html +2 -10
  131. data/plugins/main/values.yaml +3 -1
  132. data/plugins/ticket/lib/common.rb +6 -3
  133. data/plugins/ticket/ticket.rb +11 -3
  134. metadata +144 -174
  135. data/js/comm/autosync/js.inc +0 -0
  136. data/js/comm/js.inc +0 -0
  137. data/js/comm/jsloader/js.inc +0 -0
  138. data/js/comm/queue/js.inc +0 -0
  139. data/js/comm/session/js.inc +0 -0
  140. data/js/comm/sessionwatcher/js.inc +0 -0
  141. data/js/comm/transporter/js.inc +0 -0
  142. data/js/comm/urlresponder/js.inc +0 -0
  143. data/js/comm/values/js.inc +0 -0
  144. data/js/controls/button/js.inc +0 -0
  145. data/js/controls/checkbox/js.inc +0 -0
  146. data/js/controls/dialogs/alert_sheet/js.inc +0 -0
  147. data/js/controls/dialogs/confirm_sheet/js.inc +0 -0
  148. data/js/controls/dialogs/sheet/js.inc +0 -0
  149. data/js/controls/imageview/js.inc +0 -0
  150. data/js/controls/passwordcontrol/js.inc +0 -0
  151. data/js/controls/progress/progressbar/js.inc +0 -0
  152. data/js/controls/progress/progressindicator/js.inc +0 -0
  153. data/js/controls/radiobutton/js.inc +0 -0
  154. data/js/controls/sliders/slider/js.inc +0 -0
  155. data/js/controls/sliders/vslider/js.inc +0 -0
  156. data/js/controls/stepper/js.inc +0 -0
  157. data/js/controls/stringview/js.inc +0 -0
  158. data/js/controls/tab/js.inc +0 -0
  159. data/js/controls/textarea/js.inc +0 -0
  160. data/js/controls/textcontrol/js.inc +0 -0
  161. data/js/controls/uploader/js.inc +0 -0
  162. data/js/controls/uploader/uploader.js +0 -154
  163. data/js/controls/validatorview/js.inc +0 -0
  164. data/js/controls/window/js.inc +0 -0
  165. data/js/core/class/js.inc +0 -0
  166. data/js/core/elem/elem.js +0 -1325
  167. data/js/core/elem/js.inc +0 -0
  168. data/js/core/event/js.inc +0 -0
  169. data/js/core/iefix/js.inc +0 -0
  170. data/js/core/rsence_ns/js.inc +0 -0
  171. data/js/datetime/calendar/calendar.js +0 -198
  172. data/js/datetime/calendar/js.inc +0 -0
  173. data/js/datetime/datetimevalue/js.inc +0 -0
  174. data/js/datetime/timesheet/js.inc +0 -0
  175. data/js/datetime/timesheet/old_timesheet.js +0 -292
  176. data/js/datetime/timesheet/themes/default/old_timesheet.css +0 -30
  177. data/js/datetime/timesheet/themes/default/old_timesheet.html +0 -2
  178. data/js/datetime/timesheet_item/js.inc +0 -0
  179. data/js/datetime/timesheet_item/old_timesheet_item.js +0 -308
  180. data/js/datetime/timesheet_item/themes/default/old_timesheet_item.css +0 -42
  181. data/js/datetime/timesheet_item/themes/default/old_timesheet_item.html +0 -8
  182. data/js/datetime/timesheet_item_edit/js.inc +0 -0
  183. data/js/datetime/timesheet_item_edit/old_timesheet_item_edit.js +0 -274
  184. data/js/foundation/application/js.inc +0 -0
  185. data/js/foundation/control/controldefaults/js.inc +0 -0
  186. data/js/foundation/control/dummyvalue/js.inc +0 -0
  187. data/js/foundation/control/dyncontrol/js.inc +0 -0
  188. data/js/foundation/control/eventresponder/js.inc +0 -0
  189. data/js/foundation/control/js.inc +0 -0
  190. data/js/foundation/control/valuematrix/js.inc +0 -0
  191. data/js/foundation/control/valueresponder/js.inc +0 -0
  192. data/js/foundation/eventmanager/js.inc +0 -0
  193. data/js/foundation/geom/point/js.inc +0 -0
  194. data/js/foundation/geom/rect/js.inc +0 -0
  195. data/js/foundation/json_renderer/js.inc +0 -0
  196. data/js/foundation/system/js.inc +0 -0
  197. data/js/foundation/thememanager/js.inc +0 -0
  198. data/js/foundation/value/js.inc +0 -0
  199. data/js/foundation/view/js.inc +0 -0
  200. data/js/foundation/view/markupview/js.inc +0 -0
  201. data/js/foundation/view/morphanimation/js.inc +0 -0
  202. data/js/foundation/view/viewdefaults/js.inc +0 -0
  203. data/js/lists/checkboxlist/js.inc +0 -0
  204. data/js/lists/listitems/js.inc +0 -0
  205. data/js/lists/propertylist/js.inc +0 -0
  206. data/js/lists/propertylist/propertylisteditor/js.inc +0 -0
  207. data/js/lists/radiobuttonlist/js.inc +0 -0
  208. data/js/menus/minimenu/js.inc +0 -0
  209. data/js/menus/minimenu/minimenuitem/js.inc +0 -0
  210. data/js/menus/minimenu/minimenuitem/minimenuitem.js +0 -33
  211. data/js/util/reloadapp/js.inc +0 -0
  212. data/js/util/sha/js.inc +0 -0
  213. data/js/views/centerview/js.inc +0 -0
  214. data/js/views/inlineview/js.inc +0 -0
  215. data/js/views/scrollview/js.inc +0 -0
  216. data/lib/conf/argv.rb +0 -880
@@ -7,11 +7,11 @@
7
7
  */
8
8
 
9
9
  // Starts the synchronization upon page load.
10
- LOAD(
11
- function(){
10
+ COMM.AutoSyncStarter = {
11
+ start: function(){
12
12
  COMM.urlResponder=COMM.URLResponder.nu();
13
13
  COMM.Transporter.url=COMM.Transporter.HelloUrl;
14
14
  COMM.Transporter.stop=false;
15
15
  COMM.Transporter.sync();
16
16
  }
17
- );
17
+ };
@@ -35,6 +35,18 @@ COMM.JSLoader = HClass.extend({
35
35
  console.log("failed to load js: "+_resp.url);
36
36
  },
37
37
 
38
+ _formatUrl: function( _jsName ){
39
+ var
40
+ _this = this,
41
+ _isFullUrl = _jsName.slice(0,7) === 'http://' || _jsName.slice(0,8) === 'https://',
42
+ _url = _isFullUrl?_jsName:_this.uri+_jsName+'.js';
43
+ return _url;
44
+ },
45
+ loaded: function(_jsName){
46
+ var _url = this._formatUrl( _jsName );
47
+ this._loadedJS.push( _url );
48
+ },
49
+
38
50
  /** = Description
39
51
  * Loads a js package using the name.
40
52
  *
@@ -51,12 +63,13 @@ COMM.JSLoader = HClass.extend({
51
63
  *
52
64
  **/
53
65
  load: function(_jsName){
54
- var _this = this,
55
- _isFullUrl = _jsName.slice(0,7) === 'http://' || _jsName.slice(0,8) === 'https://',
56
- _url = _isFullUrl?_jsName:_this.uri+_jsName+'.js';
66
+ var
67
+ _this = this,
68
+ _url = _this._formatUrl( _jsName );
57
69
  if((_this._loadedJS.indexOf(_url)!==-1)) {
58
70
  return;
59
71
  }
72
+ // console.log('jsLoader load:',_url);
60
73
  COMM.Queue.pause();
61
74
  _this._loadedJS.push(_url);
62
75
  if(BROWSER_TYPE.symbian && _isFullUrl){
@@ -118,7 +118,7 @@ COMM.Queue = HApplication.extend({
118
118
  _strs.JS_EXEC_FAIL,
119
119
  _item,
120
120
  _strs.REASON,
121
- e.description
121
+ e
122
122
  ].join(''));
123
123
  }
124
124
  }
@@ -161,7 +161,7 @@ COMM.Transporter = HApplication.extend({
161
161
  _this._clientEvalError = e+" - "+e.description+' - '+_responseArray[i];
162
162
  }
163
163
  }
164
- if(_this._serverInterruptView){
164
+ if(_this._serverInterruptView && _sesKey !== '' ){
165
165
  _this._serverInterruptView.die();
166
166
  _this._serverInterruptView = false;
167
167
  }
@@ -187,6 +187,110 @@ COMM.Transporter = HApplication.extend({
187
187
  _queue.push(function(){jsLoader.load('servermessage');});
188
188
  _queue.push(function(){ReloadApp.nu(_title,_message);});
189
189
  },
190
+
191
+ setInterruptAnim: function(_customMessage,_customColor){
192
+ var _this = COMM.Transporter;
193
+ if(!_this._serverInterruptView){
194
+ _this._serverInterruptView = HView.extend({
195
+ _setCustomMessage: function(_text){
196
+ ELEM.setHTML(this._messageDiv,_text);
197
+ },
198
+ _setCustomColor: function(_color){
199
+ this.setStyle('background-color',_color);
200
+ },
201
+ _setFailedResp: function(_resp){
202
+ if( _resp !== undefined && typeof _resp !== 'string' ){
203
+ this._failedResp = _resp;
204
+ }
205
+ this._errorIndex++;
206
+ return this;
207
+ },
208
+ _retry: function(){
209
+ this._retryIndex++;
210
+ var _resp = this._failedResp;
211
+ COMM.request(
212
+ _resp.url,
213
+ _resp.options
214
+ );
215
+ },
216
+ onIdle: function(){
217
+ var _currentDate = new Date().getTime();
218
+ this.bringToFront();
219
+ if( this._errorIndex > 0 &&
220
+ (this._retryIndex !== this._errorIndex) &&
221
+ (this._lastError + 2000 < _currentDate) &&
222
+ this._failedResp ){
223
+ this._lastError = _currentDate;
224
+ this._retry();
225
+ }
226
+ this.base();
227
+ },
228
+ _errorIndex: 0,
229
+ _retryIndex: 0,
230
+ _lastError: new Date().getTime(),
231
+ die: function(){
232
+ var _app = this.app;
233
+ HSystem.reniceApp(_app.appId,this._origPriority);
234
+ this.base();
235
+ _app.sync();
236
+ },
237
+ drawSubviews: function(){
238
+ var _style = [
239
+ ['padding-left', '8px'],
240
+ ['background-color', '#600'],
241
+ ['text-align','center'],
242
+ ['color', '#fff'],
243
+ ['font-size', '16px'],
244
+ ['opacity', 0.85]
245
+ ], i = 0;
246
+ for( ; i<_style.length; i++ ){
247
+ this.setStyle( _style[i][0], _style[i][1] );
248
+ }
249
+ this._messageDiv = ELEM.make(this.elemId);
250
+ ELEM.setHTML(this._messageDiv,this.app.serverLostMessage);
251
+ this._origPriority = HSystem.appPriorities[this.appId];
252
+ if(HSystem.appPriorities[this.appId]<10){
253
+ HSystem.reniceApp(this.appId,10);
254
+ }
255
+ this._anim = HView.extend({
256
+ _animIndex: 0,
257
+ _anim: function(){
258
+ var _targetRect,
259
+ _width = ELEM.getSize(this.parent.elemId)[0];
260
+ this._animIndex++;
261
+ if(this._animIndex%2===0){
262
+ _targetRect = HRect.nu(0,0,80,20);
263
+ }
264
+ else {
265
+ _targetRect = HRect.nu(_width-80,0,_width,20);
266
+ }
267
+ this.animateTo(_targetRect,2000);
268
+ },
269
+ onAnimationEnd: function(){
270
+ if(this.drawn){
271
+ this._anim();
272
+ }
273
+ }
274
+ }
275
+ ).nu( [0,0,80,20], this ).setStyle('background-color','#fff').setStyle('opacity',0.8)._anim();
276
+ }
277
+ }).nu([0,0,200,20,0,null],_this);
278
+ if( typeof _customMessage !== 'string' ){
279
+ _this._serverInterruptView._setFailedResp(_customMessage);
280
+ }
281
+ }
282
+ if( _customMessage !== undefined ) {
283
+ if( typeof _customMessage === 'string' ){
284
+ _this._serverInterruptView._setCustomMessage(_customMessage);
285
+ }
286
+ }
287
+ if( !_this.stop ){
288
+ _this._serverInterruptView._setFailedResp();
289
+ }
290
+ if( _customColor !== undefined ){
291
+ _this._serverInterruptView._setCustomColor(_customColor);
292
+ }
293
+ },
190
294
 
191
295
  /** Called by the XMLHttpRequest, when there was a failure in communication.
192
296
  **/
@@ -195,88 +299,7 @@ COMM.Transporter = HApplication.extend({
195
299
  // server didn't respond, likely network issue.. retry.
196
300
  if(_resp.X.status===0){
197
301
  console.log(_this.serverLostMessage);
198
- if(!_this._serverInterruptView){
199
- _this._serverInterruptView = HView.extend({
200
- _setFailedResp: function(_resp){
201
- if(_resp!==undefined){
202
- this._failedResp = _resp;
203
- }
204
- this._errorIndex++;
205
- return this;
206
- },
207
- _retry: function(){
208
- this._retryIndex++;
209
- var _resp = this._failedResp;
210
- COMM.request(
211
- _resp.url,
212
- _resp.options
213
- );
214
- },
215
- onIdle: function(){
216
- var _currentDate = new Date().getTime();
217
- this.bringToFront();
218
- if( this._errorIndex > 0 &&
219
- (this._retryIndex !== this._errorIndex) &&
220
- (this._lastError + 2000 < _currentDate) &&
221
- this._failedResp ){
222
- this._lastError = _currentDate;
223
- this._retry();
224
- }
225
- this.base();
226
- },
227
- _errorIndex: 0,
228
- _retryIndex: 0,
229
- _lastError: new Date().getTime(),
230
- die: function(){
231
- var _app = this.app;
232
- HSystem.reniceApp(_app.appId,this._origPriority);
233
- this.base();
234
- _app.sync();
235
- },
236
- drawSubviews: function(){
237
- var _style = [
238
- ['padding-left', '8px'],
239
- ['background-color', '#600'],
240
- ['text-align','center'],
241
- ['color', '#fff'],
242
- ['font-size', '16px'],
243
- ['opacity', 0.85]
244
- ], i = 0;
245
- for( ; i<_style.length; i++ ){
246
- this.setStyle( _style[i][0], _style[i][1] );
247
- }
248
- this.setHTML(this.app.serverLostMessage);
249
- this._origPriority = HSystem.appPriorities[this.appId];
250
- if(HSystem.appPriorities[this.appId]<10){
251
- HSystem.reniceApp(this.appId,10);
252
- }
253
- this._anim = HView.extend({
254
- _animIndex: 0,
255
- _anim: function(){
256
- var _targetRect,
257
- _width = ELEM.getSize(this.parent.elemId)[0];
258
- this._animIndex++;
259
- if(this._animIndex%2===0){
260
- _targetRect = HRect.nu(0,0,80,20);
261
- }
262
- else {
263
- _targetRect = HRect.nu(_width-80,0,_width,20);
264
- }
265
- this.animateTo(_targetRect,2000);
266
- },
267
- onAnimationEnd: function(){
268
- if(this.drawn){
269
- this._anim();
270
- }
271
- }
272
- }
273
- ).nu( [0,0,80,20], this ).setStyle('background-color','#fff').setStyle('opacity',0.8)._anim();
274
- }
275
- }).nu([0,0,200,20,0,null],_this)._setFailedResp(_resp);
276
- }
277
- else {
278
- _this._serverInterruptView._setFailedResp();
279
- }
302
+ _this.setInterruptAnim(_resp);
280
303
  }
281
304
  else {
282
305
  _this.failMessage('Transporter Error','Transporter was unable to complete the synchronization request.');
@@ -66,7 +66,7 @@ COMM.Values = HClass.extend({
66
66
  },
67
67
 
68
68
  /** = Description
69
- * Sets and decodes the +_data+. Main value setter interface
69
+ * Sets and decodes the +_data+. Main value setter interface
70
70
  * for the server representation of +HValue+.
71
71
  *
72
72
  * = Parameters
@@ -323,7 +323,13 @@ COMM.Values = HClass.extend({
323
323
  },
324
324
 
325
325
  _nativeEncode: function(_obj){
326
- return JSON.stringify( _obj );
326
+ try{
327
+ return JSON.stringify( _obj );
328
+ }
329
+ catch(e){
330
+ console.log('invalid json:',_obj);
331
+ return "{}";
332
+ }
327
333
  },
328
334
 
329
335
 
@@ -48,16 +48,21 @@ HClickButton = HButton.extend({
48
48
  click: true
49
49
  },
50
50
 
51
+ controlDefaults: HControlDefaults.extend({
52
+ clickOnValue: 1,
53
+ clickOffValue: 0
54
+ }),
55
+
51
56
  /** = Description
52
57
  * Sets the button enabled if this.value is 0.
53
58
  *
54
59
  **/
55
60
  refreshValue: function(){
56
61
  if( this.options.inverseValue ){
57
- this.setEnabled( this.value === 1 );
62
+ this.setEnabled( this.value === this.options.clickOnValue );
58
63
  }
59
64
  else {
60
- this.setEnabled( this.value === 0 );
65
+ this.setEnabled( this.value === this.options.clickOffValue );
61
66
  }
62
67
  },
63
68
  /** = Description
@@ -67,10 +72,10 @@ HClickButton = HButton.extend({
67
72
  click: function(){
68
73
  if(this.enabled){
69
74
  if( this.options.inverseValue ){
70
- this.setValue(0);
75
+ this.setValue( this.options.clickOffValue );
71
76
  }
72
77
  else {
73
- this.setValue(1);
78
+ this.setValue( this.options.clickOnValue );
74
79
  }
75
80
  }
76
81
  }
@@ -68,7 +68,7 @@
68
68
 
69
69
  .button_label {
70
70
  left: 6px; right: 6px; top: 2px;
71
- height: 20px; line-height: 21px;
71
+ height: 20px; line-height: 20px;
72
72
  text-align: center; vertical-align: middle;
73
73
  font-family: Arial, sans-serif;
74
74
  font-size: 12px; font-weight: bold;
@@ -47,7 +47,7 @@
47
47
 
48
48
  .checkbox_label {
49
49
  left: 24px; right: 0px; top: 2px;
50
- height: 20px; line-height: 21px;
50
+ height: 20px; line-height: 20px;
51
51
  text-align: left; vertical-align: middle;
52
52
  font-family: Arial, sans-serif;
53
53
  font-size: 12px;
@@ -53,35 +53,44 @@ HSheet = HControl.extend({
53
53
  var
54
54
  _this = this,
55
55
  _elemId = _this.elemId,
56
- _styl = ELEM.setStyle,
57
56
  _rect = _this.rect,
58
57
  _width = _rect.width,
59
58
  _top = _rect.top,
60
59
  _left = 0-Math.floor(_rect.width/2)+_rect.left,
61
- _height = _rect.height;
62
-
63
- _styl( _elemId, 'left', '0px');
64
- _styl( _elemId, 'top', '0px');
65
- _styl( _elemId, 'right', '0px');
66
- _styl( _elemId, 'bottom', '0px');
67
- _styl( _elemId, 'width', 'auto');
68
- _styl( _elemId, 'height', 'auto');
69
- _styl( _elemId, 'min-width', _width+'px');
70
- _styl( _elemId, 'min-height', _height+'px');
71
-
60
+ _height = _rect.height,
61
+ _styles = [
62
+ 'left', '0px',
63
+ 'top', '0px',
64
+ 'right', '0px',
65
+ 'bottom', '0px',
66
+ 'width', 'auto',
67
+ 'height', 'auto',
68
+ 'min-width', _width+'px',
69
+ 'min-height', _height+'px'
70
+ ],
71
+ i = 0, _len;
72
+ for( _len = _styles.length; i < _len; i+=2 ){
73
+ ELEM.setStyle( _elemId, _styles[i], _styles[i+1] );
74
+ }
72
75
  if(_this['markupElemIds']){
73
76
  var _stateId = _this.markupElemIds['state'];
74
- _styl( _stateId, 'left', _left+'px' );
75
- _styl( _stateId, 'top', _top+'px' );
76
- _styl( _stateId, 'width', _width+'px' );
77
- _styl( _stateId, 'height', _height+'px' );
77
+ _styles = [
78
+ 'left', _left+'px',
79
+ 'top', _top+'px',
80
+ 'width', _width+'px',
81
+ 'height', _height+'px'
82
+ ];
83
+ i = 0;
84
+ for( _len = _styles.length; i < _len; i+=2 ){
85
+ ELEM.setStyle( _stateId, _styles[i], _styles[i+1] );
86
+ }
78
87
  }
79
88
  //-- Show the rectangle once it gets created, unless visibility was set to++
80
89
  //-- hidden in the constructor.++
81
90
  if(undefined === _this.isHidden || _this.isHidden === false) {
82
- _styl( _elemId, 'visibility', 'inherit');
91
+ ELEM.setStyle( _elemId, 'visibility', 'inherit');
83
92
  }
84
- _styl( _elemId, 'display', 'block');
93
+ ELEM.setStyle( _elemId, 'display', 'block');
85
94
  _this._updateZIndex();
86
95
  _this.drawn = true;
87
96
  }
@@ -47,7 +47,7 @@
47
47
 
48
48
  .radiobutton_label {
49
49
  left: 24px; right: 0px; top: 0px;
50
- height: 20px; line-height: 21px;
50
+ height: 20px; line-height: 24px;
51
51
  text-align: left; vertical-align: middle;
52
52
  font-family: Arial, sans-serif;
53
53
  font-size: 12px;
@@ -0,0 +1,2 @@
1
+ HSearchField = HTextControl.extend
2
+ componentName: 'searchfield'
@@ -0,0 +1,96 @@
1
+
2
+ .default .searchfield_input {
3
+ position: absolute;
4
+ display: block;
5
+ font-family: Arial, sans-serif;
6
+ font-size: 13px;
7
+ color: #000;
8
+ background-color: transparent;
9
+ vertical-align: middle;
10
+ border: 0px;
11
+ left: 18px; top: 0px;
12
+ line-height: 18px;
13
+ text-overflow: ellipsis;
14
+ white-space: nowrap;
15
+ overflow: hidden;
16
+ #{(BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.ie9||BROWSER_TYPE.opera)?'padding-left:2px;width:85% !important;height:90% !important;':BROWSER_TYPE.ie6?'right:3px;height:16px;':'padding:2px;padding-top:4px;right:3px;height:22px;width:auto;'}
17
+ }
18
+
19
+ .default .searchfield_input:focus {
20
+ outline-color: transparent;
21
+ outline-style: none;
22
+ }
23
+
24
+ .default .disabled .searchfield_input {
25
+ color: #ccc;
26
+ }
27
+
28
+ .default .searchfield_input_parent {
29
+ position: absolute;
30
+ #{(BROWSER_TYPE.firefox||BROWSER_TYPE.ie7||BROWSER_TYPE.ie8||BROWSER_TYPE.ie9||BROWSER_TYPE.opera)?'left:0;padding-left:1px;top:0;right:4px;bottom:0;':BROWSER_TYPE.ie6?'left:2px;top:1px;right:1px;height:20px;':'left:-2px;top:-2px;right:-2px;height:24px;'}
31
+ }
32
+
33
+ .default .searchfield_fade,
34
+ .default .searchfield_e,
35
+ .default .searchfield_w,
36
+ .default .searchfield_c {
37
+ position: absolute;
38
+ height: 24px;
39
+ background-repeat: no-repeat;
40
+ background-image: #{this.getCssFilePath('searchfield_parts1.png')};
41
+ #{BROWSER_TYPE.ie6?'font-size:0;line-height:0;':''}
42
+ }
43
+
44
+ .default .searchfield_fade {
45
+ right: 0px; top: 0px; width: 10px;
46
+ background-position: -48px 0px;
47
+ }
48
+
49
+ .default .searchfield_e {
50
+ right: 0px; top: 0px; width: 24px;
51
+ background-position: -24px 0px;
52
+ }
53
+
54
+ .default .searchfield_c {
55
+ left: 24px; right: 24px; top: 0px;
56
+ background-repeat: repeat-x;
57
+ background-position: 0px -24px;
58
+ }
59
+
60
+ .default .searchfield_w {
61
+ left: 0px; top: 0px; width: 24px;
62
+ background-position: 0px 0px;
63
+ }
64
+
65
+ .default .disabled > .searchfield_fade {
66
+ background-position: -48px -96px;
67
+ }
68
+
69
+ .default .disabled > .searchfield_e {
70
+ background-position: -24px -96px;
71
+ }
72
+
73
+ .default .disabled > .searchfield_c {
74
+ background-position: 0px -120px;
75
+ }
76
+
77
+ .default .disabled > .searchfield_w {
78
+ background-position: 0px -96px;
79
+ }
80
+
81
+ .default .active > .searchfield_fade {
82
+ background-position: -48px -48px;
83
+ }
84
+
85
+ .default .active > .searchfield_e {
86
+ background-position: -24px -48px;
87
+ }
88
+
89
+ .default .active > .searchfield_c {
90
+ background-position: 0px -72px;
91
+ }
92
+
93
+ .default .active > .searchfield_w {
94
+ background-position: 0px -48px;
95
+ }
96
+