rsence 2.0.0.10.pre → 2.0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. data/.yardopts +10 -0
  2. data/INSTALL.rdoc +52 -86
  3. data/{LICENSE → LICENSE.txt} +0 -0
  4. data/README.rdoc +52 -49
  5. data/VERSION +1 -1
  6. data/bin/rsence +4 -6
  7. data/conf/default_conf.yaml +314 -305
  8. data/conf/default_strings.yaml +70 -71
  9. data/docs/ExampleGuiPlugin.rdoc +193 -0
  10. data/{js/comm/comm/autosync/js.inc → docs/JavascriptBundles.rdoc} +0 -0
  11. data/docs/PluginBundleInfo.rdoc +173 -0
  12. data/docs/PluginBundles.rdoc +96 -0
  13. data/docs/Values.rdoc +163 -0
  14. data/js/comm/{comm/autosync → autosync}/autosync.js +1 -2
  15. data/js/comm/{comm → autosync}/js.inc +0 -0
  16. data/js/comm/{comm/comm.js → comm.js} +1 -0
  17. data/js/comm/{comm/queue/js.inc → js.inc} +0 -0
  18. data/js/comm/jsloader/jsloader.js +2 -4
  19. data/js/comm/{comm/session → queue}/js.inc +0 -0
  20. data/js/comm/{comm/queue → queue}/queue.js +1 -0
  21. data/js/comm/{comm/sessionwatcher → session}/js.inc +0 -0
  22. data/js/comm/{comm/session → session}/session.js +4 -3
  23. data/js/comm/{comm/transporter → sessionwatcher}/js.inc +0 -0
  24. data/js/comm/{comm/sessionwatcher → sessionwatcher}/sessionwatcher.js +1 -0
  25. data/js/comm/{comm/urlresponder → transporter}/js.inc +0 -0
  26. data/js/comm/{comm/transporter → transporter}/transporter.js +1 -0
  27. data/js/comm/{comm/values → urlresponder}/js.inc +0 -0
  28. data/js/comm/{comm/urlresponder → urlresponder}/urlresponder.js +1 -0
  29. data/js/comm/{reloadapp → values}/js.inc +0 -0
  30. data/js/comm/{comm/values → values}/values.js +1 -0
  31. data/js/controls/button/button.js +10 -1
  32. data/js/controls/checkbox/checkbox.js +2 -0
  33. data/js/controls/dialogs/alert_sheet/alert_sheet.js +1 -0
  34. data/js/controls/dialogs/confirm_sheet/confirm_sheet.js +1 -0
  35. data/js/controls/dialogs/sheet/sheet.js +1 -0
  36. data/js/controls/imageview/imageview.js +1 -0
  37. data/js/controls/passwordcontrol/passwordcontrol.js +1 -0
  38. data/js/controls/progress/progressbar/progressbar.js +1 -0
  39. data/js/controls/progress/progressindicator/progressindicator.js +1 -0
  40. data/js/controls/radiobutton/radiobutton.js +3 -1
  41. data/js/controls/sliders/slider/slider.js +1 -0
  42. data/js/controls/sliders/vslider/vslider.js +1 -0
  43. data/js/controls/stepper/stepper.js +1 -0
  44. data/js/controls/stringview/stringview.js +2 -2
  45. data/js/controls/tab/tab.js +7 -5
  46. data/js/controls/textarea/textarea.js +1 -0
  47. data/js/controls/textcontrol/textcontrol.js +3 -1
  48. data/js/controls/uploader/uploader.js +1 -0
  49. data/js/controls/validatorview/validatorview.js +62 -59
  50. data/js/controls/window/window.js +1 -0
  51. data/js/core/class/class.js +2 -1
  52. data/js/core/elem/elem.js +27 -27
  53. data/js/core/event/event.js +3 -874
  54. data/js/{comm/sha → core/rsence_ns}/js.inc +0 -0
  55. data/js/core/rsence_ns/rsence_ns.js +15 -0
  56. data/js/{controls/datetime → datetime}/calendar/calendar.js +1 -0
  57. data/js/{comm/values/value → datetime/calendar}/js.inc +0 -0
  58. data/js/{controls/datetime → datetime}/calendar/themes/default/calendar.css +0 -0
  59. data/js/{controls/datetime → datetime}/calendar/themes/default/calendar.html +0 -0
  60. data/js/{controls/datetime → datetime}/calendar/themes/default/calendar_arrows-ie6.gif +0 -0
  61. data/js/{controls/datetime → datetime}/calendar/themes/default/calendar_arrows.png +0 -0
  62. data/js/{controls/datetime → datetime}/datetimevalue/datetimevalue.js +1 -0
  63. data/js/{comm/values/valuematrix → datetime/datetimevalue}/js.inc +0 -0
  64. data/js/{controls/datetime/calendar → datetime/timesheet}/js.inc +0 -0
  65. data/js/{controls/datetime → datetime}/timesheet/themes/default/timesheet.css +0 -0
  66. data/js/{controls/datetime → datetime}/timesheet/themes/default/timesheet.html +0 -0
  67. data/js/{controls/datetime → datetime}/timesheet/timesheet.js +1 -0
  68. data/js/{controls/datetime/datetimevalue → datetime/timesheet_item}/js.inc +0 -0
  69. data/js/{controls/datetime → datetime}/timesheet_item/themes/default/timesheet_item.css +0 -0
  70. data/js/{controls/datetime → datetime}/timesheet_item/themes/default/timesheet_item.html +0 -0
  71. data/js/{controls/datetime → datetime}/timesheet_item/timesheet_item.js +1 -0
  72. data/js/{controls/datetime/timesheet → datetime/timesheet_item_edit}/js.inc +0 -0
  73. data/js/{controls/datetime → datetime}/timesheet_item_edit/timesheet_item_edit.js +1 -1
  74. data/js/foundation/application/application.js +1 -2
  75. data/js/foundation/control/control.js +1 -4
  76. data/js/foundation/control/controldefaults/controldefaults.js +1 -4
  77. data/js/foundation/control/dummyvalue/dummyvalue.js +1 -0
  78. data/js/foundation/control/dyncontrol/dyncontrol.js +1 -2
  79. data/js/foundation/control/eventresponder/eventresponder.js +11 -3
  80. data/js/{controls/datetime/timesheet_item → foundation/control/valuematrix}/js.inc +0 -0
  81. data/js/{comm/values → foundation/control}/valuematrix/valuematrix.js +2 -5
  82. data/js/foundation/control/valueresponder/valueresponder.js +3 -1
  83. data/js/foundation/eventmanager/eventmanager.js +884 -0
  84. data/js/{controls/datetime/timesheet_item_edit → foundation/eventmanager}/js.inc +0 -0
  85. data/js/foundation/geom/point/point.js +2 -2
  86. data/js/foundation/geom/rect/rect.js +1 -0
  87. data/js/foundation/json_renderer/json_renderer.js +2 -0
  88. data/js/foundation/system/system.js +2 -1
  89. data/js/foundation/thememanager/thememanager.js +29 -23
  90. data/js/{controls/lists/checkboxlist → foundation/value}/js.inc +0 -0
  91. data/js/{comm/values → foundation}/value/value.js +1 -0
  92. data/js/foundation/view/markupview/markupview.js +2 -1
  93. data/js/foundation/view/morphanimation/morphanimation.js +1 -0
  94. data/js/foundation/view/view.js +6 -12
  95. data/js/foundation/view/viewdefaults/viewdefaults.js +1 -0
  96. data/js/{controls/lists → lists}/checkboxlist/checkboxlist.js +1 -0
  97. data/js/{controls/lists/listitems → lists/checkboxlist}/js.inc +0 -0
  98. data/js/{controls/lists/radiobuttonlist → lists/listitems}/js.inc +0 -0
  99. data/js/{controls/lists → lists}/listitems/listitems.js +22 -3
  100. data/js/lists/radiobuttonlist/js.inc +0 -0
  101. data/js/{controls/lists → lists}/radiobuttonlist/radiobuttonlist.js +2 -12
  102. data/js/util/reloadapp/js.inc +0 -0
  103. data/js/{comm → util}/reloadapp/reloadapp.js +10 -8
  104. data/js/{comm → util}/reloadapp/themes/default/reloadapp_warning-ie6.gif +0 -0
  105. data/js/{comm → util}/reloadapp/themes/default/reloadapp_warning.png +0 -0
  106. data/js/util/sha/js.inc +0 -0
  107. data/js/{comm → util}/sha/sha.js +27 -33
  108. data/js/views/centerview/centerview.js +33 -3
  109. data/js/views/inlineview/inlineview.js +1 -0
  110. data/js/views/scrollview/scrollview.js +1 -0
  111. data/lib/conf/argv.rb +34 -22
  112. data/lib/conf/default.rb +165 -173
  113. data/lib/daemon/daemon.rb +9 -9
  114. data/lib/daemon/sigcomm.rb +4 -4
  115. data/lib/http/broker.rb +30 -27
  116. data/lib/http/rackup.rb +2 -3
  117. data/lib/http/request.rb +1 -2
  118. data/lib/http/response.rb +10 -10
  119. data/lib/plugins/dependencies.rb +2 -1
  120. data/lib/plugins/gui_plugin.rb +77 -50
  121. data/lib/plugins/guiparser.rb +26 -22
  122. data/lib/plugins/plugin.rb +207 -427
  123. data/lib/plugins/plugin_base.rb +162 -0
  124. data/lib/plugins/plugin_plugins.rb +21 -15
  125. data/lib/plugins/plugin_sqlite_db.rb +45 -20
  126. data/lib/plugins/pluginmanager.rb +10 -5
  127. data/lib/plugins/plugins.rb +65 -31
  128. data/lib/plugins/servlet.rb +74 -26
  129. data/lib/rsence.rb +32 -0
  130. data/lib/session/msg.rb +131 -96
  131. data/lib/session/sessionmanager.rb +5 -4
  132. data/lib/session/sessionstorage.rb +4 -3
  133. data/lib/transporter/transporter.rb +30 -21
  134. data/lib/util/gzstring.rb +4 -2
  135. data/lib/util/ruby19_fixes.rb +18 -0
  136. data/lib/values/hvalue.rb +139 -88
  137. data/lib/values/valuemanager.rb +60 -46
  138. data/plugins/client_pkg/client_pkg.rb +6 -5
  139. data/plugins/client_pkg/lib/client_pkg_build.rb +5 -5
  140. data/plugins/client_pkg/lib/client_pkg_serve.rb +8 -0
  141. data/plugins/index_html/index_html.rb +3 -1
  142. data/plugins/index_html/tmpl/index.html +2 -3
  143. data/plugins/main/js/main.js +84 -0
  144. data/plugins/main/main.rb +54 -27
  145. data/plugins/ticket/lib/common.rb +4 -2
  146. data/plugins/ticket/lib/favicon.rb +3 -2
  147. data/plugins/ticket/lib/file.rb +2 -2
  148. data/plugins/ticket/lib/img.rb +2 -2
  149. data/plugins/ticket/lib/objblob.rb +2 -2
  150. data/plugins/ticket/lib/rsrc.rb +2 -2
  151. data/plugins/ticket/lib/upload.rb +9 -8
  152. data/plugins/ticket/ticket.rb +141 -8
  153. data/setup/welcome/welcome.rb +1 -0
  154. metadata +76 -72
  155. data/lib/plugins/plugin_util.rb +0 -107
  156. data/plugins/index_html/tmpl/startup_index.html +0 -29
  157. data/plugins/main/js/riassence_ns.js +0 -87
  158. data/setup/legacy/info.yaml +0 -18
  159. data/setup/legacy/legacy.rb +0 -17
  160. data/setup/welcome/gui/welcome.yaml +0 -68
  161. data/setup/welcome/text/welcome.html +0 -8
@@ -16,6 +16,7 @@
16
16
  ** +y+:: The Y coordinate of the point
17
17
  **
18
18
  ***/
19
+ var//RSence.Foundation.Geom
19
20
  HPoint = HClass.extend({
20
21
 
21
22
  /** = Description
@@ -195,8 +196,7 @@ HPoint = HClass.extend({
195
196
  equals: function(_point) {
196
197
  return ( this.x === _point.x && this.y === _point.y );
197
198
  }
198
-
199
-
199
+
200
200
  });
201
201
 
202
202
 
@@ -27,6 +27,7 @@
27
27
  ** +width+:: The width of the rect.
28
28
  ** +height+:: The height of the rect.
29
29
  ***/
30
+ var//RSence.Foundation.Geom
30
31
  HRect = HClass.extend({
31
32
  /** = Description
32
33
  * Initializes a Rect as four sides, as two diametrically opposed corners,
@@ -21,6 +21,7 @@
21
21
  ** This class is still in development, so expect more
22
22
  ** features and documentation as it matures.
23
23
  ***/
24
+ //var//RSence.Foundation
24
25
  COMM.JSONRenderer = HClass.extend({
25
26
 
26
27
  version: 0.6,
@@ -239,6 +240,7 @@ COMM.JSONRenderer = HClass.extend({
239
240
  });
240
241
 
241
242
  /** -- Global reference ++ **/
243
+ var//RSence.Foundation
242
244
  JSONRenderer = COMM.JSONRenderer;
243
245
 
244
246
 
@@ -16,6 +16,7 @@
16
16
  ** so there is no real need to access +HSystem+ directly from user-level code.
17
17
  **
18
18
  ***/
19
+ var//RSence.Foundation
19
20
  HSystem = {
20
21
 
21
22
  /** When the focus behaviour is 1, clicking on any subview brings
@@ -24,7 +25,7 @@ HSystem = {
24
25
  * brings the window to front.
25
26
  *
26
27
  **/
27
- windowFocusBehaviour: 1,
28
+ windowFocusMode: 1,
28
29
 
29
30
  /** Singleton class; has no constructor **/
30
31
  // constructor: null,
@@ -6,47 +6,53 @@
6
6
  * with this software package. If not, contact licensing@riassence.com
7
7
  */
8
8
 
9
+ /** The default path where to look for themes.
10
+ **/
11
+ var//RSence.Foundation
12
+ HDefaultThemePath = '/H/themes';
13
+
14
+
15
+ /** Name of the default theme.
16
+ **/
17
+ var//RSence.Foundation
18
+ HDefaultThemeName = 'default';
19
+
20
+ /** List of themes without component-specific theme files.
21
+ **/
22
+ var//RSence.Foundation
23
+ HNoComponentCSS = [];
24
+
25
+ /** List of themes without a common.css file to load.
26
+ **/
27
+ var//RSence.Foundation
28
+ HNoCommonCSS = [];
29
+
30
+ /** List of IE6-savvy themes.
31
+ **/
32
+ var//RSence.Foundation
33
+ HThemeHasIE6GifsInsteadOfPng = ['default'];
34
+
9
35
  /*** = Description
10
36
  ** A single instance class.
11
37
  ** The theme manager knows the name of the currently loaded theme and handles
12
38
  ** the loading of theme specific markup snippets and style declarations.
13
39
  **
14
40
  ** = Instance variables
15
- ** +themePath+:: Relative path to the components' top directory.
41
+ ** +themePath+:: Default root path of the themes path, should contain
42
+ ** at least the default theme.
16
43
  ** +currentTheme+:: The name of the theme currently in use. Initially the
17
44
  ** default unnamed theme is used.
18
- ** +usesComponentDir+:: True when the components are separated in their own
19
- ** directories, usually when using the
20
- ** source/development version. False when the components
21
- ** are all in same directory. This is the case in the
22
- ** release build.
23
45
  **
24
46
  ***/
25
-
26
- HDefaultThemePath = '/H/themes';
27
- HDefaultThemeName = 'default';
28
- HNoComponentCSS = [];
29
- HNoCommonCSS = [];
30
- HThemeHasIE6GifsInsteadOfPng = [];
31
-
47
+ var//RSence.Foundation
32
48
  HThemeManager = HClass.extend({
33
49
 
34
50
  constructor: null,
35
51
 
36
52
  init: function(){
37
-
38
- // Default root path of the themes path, should contain at least the default theme.
39
53
  this.themePath = HDefaultThemePath;
40
-
41
- // Hash map of loaded template markup (html templates), by theme.
42
- // componentName is used as the secondary key.
43
54
  this._tmplCache = {};
44
-
45
- // Hash map of loaded css templates, by theme.
46
- // componentName is used as the secondary key.
47
55
  this._cssCache = {};
48
-
49
- // The currently selected default theme name.
50
56
  this.currentTheme = HDefaultThemeName;
51
57
  },
52
58
 
@@ -38,6 +38,7 @@
38
38
  ** +views+:: A list of Components that uses this value.
39
39
  ** Used for automatic value syncronization between responders.
40
40
  ***/
41
+ var//RSence.Foundation
41
42
  HValue = HClass.extend({
42
43
 
43
44
  /** = Description
@@ -13,6 +13,7 @@
13
13
  ** = Instance variables
14
14
  ** +markup+:: The markup from the component's HTML template.
15
15
  ***/
16
+ var//RSence.Foundation
16
17
  HMarkupView = HClass.extend({
17
18
 
18
19
  /** = Description
@@ -105,7 +106,7 @@ HMarkupView = HClass.extend({
105
106
  }
106
107
  return this;
107
108
  }
108
-
109
+
109
110
  },{
110
111
  _variable_match: new RegExp(/#\{([^\}]*)\}/),
111
112
  _assignment_match: new RegExp(/\$\{([^\}]*)\}/)
@@ -13,6 +13,7 @@
13
13
  ** Its methods define the functionality to zoom from the current geometry to a
14
14
  ** target geometry with animated intervals.
15
15
  ***/
16
+ var//RSence.Foundation
16
17
  HMorphAnimation = HClass.extend({
17
18
 
18
19
  /** = Description
@@ -29,7 +29,7 @@
29
29
  ** var mySubView2 = HView.nu( rect3, mySubView1 );
30
30
  **
31
31
  ***/
32
-
32
+ var//RSence.Foundation
33
33
  HView = HClass.extend({
34
34
 
35
35
  /** Component specific theme path.
@@ -109,13 +109,6 @@ HView = HClass.extend({
109
109
  **/
110
110
  flexBottomOffset: 0,
111
111
 
112
- /** The componentBehaviour array tells other classes what to
113
- * expect of the component's API and visual behaviour.
114
- * The first index is 'view' by default for all classes
115
- * inherited from HView.
116
- **/
117
- componentBehaviour: ['view'],
118
-
119
112
  /** The drawn flag is false before the component is visually
120
113
  * drawn, it's true after it's drawn.
121
114
  **/
@@ -1617,13 +1610,14 @@ HView = HClass.extend({
1617
1610
  _extraCss += 'white-space:nowrap;';
1618
1611
  }
1619
1612
 
1620
- var _stringElem = ELEM.make(_elemId);
1621
- ELEM.setCSS(_stringElem, "visibility:hidden;position:absolute;"+_extraCss);
1613
+ var _stringElem = ELEM.make(_elemId,'span');
1614
+ ELEM.setCSS(_stringElem, "visibility:hidden;"+_extraCss);
1622
1615
  ELEM.setHTML(_stringElem, _string);
1623
- ELEM.flushLoop();
1616
+ // ELEM.flushLoop();
1624
1617
  var _visibleSize=ELEM.getVisibleSize(_stringElem);
1618
+ // console.log('visibleSize',_visibleSize);
1625
1619
  ELEM.del(_stringElem);
1626
- return _visibleSize;
1620
+ return [_visibleSize[0]+_visibleSize[0]%2,_visibleSize[1]+_visibleSize[1]%2];
1627
1621
  },
1628
1622
 
1629
1623
  /** Returns the string width
@@ -10,6 +10,7 @@
10
10
  ** Define default HView setting here. Will be used, when no or invalid constructor
11
11
  ** options are supplied.
12
12
  ***/
13
+ var//RSence.Foundation
13
14
  HViewDefaults = HClass.extend({
14
15
 
15
16
  /** The default label. A label is the "visual value" of a component that
@@ -12,6 +12,7 @@
12
12
  ** HCheckboxList is a combined list of HCheckboxes.
13
13
  **
14
14
  ***/
15
+ var//RSence.Lists
15
16
  HCheckboxList = HControl.extend({
16
17
 
17
18
  /** = Description
@@ -9,11 +9,21 @@
9
9
 
10
10
  /*** = Description
11
11
  ** HListItems is uses an array-packed list of hash objects as its value.
12
+ ##
13
+ ## == Value as Array of Hashes:
12
14
  ** Each item in the array should have a 'label' and a 'value' key.
13
15
  ** The 'label' key of each item is used as the label for the HRadiobutton in the list.
14
16
  ** The 'value' key of each item is the value used for the output.
17
+ ##
18
+ ## == Value as Array of strings or numerals
19
+ ## Each Item like with hash, except the item is both label and value. Each item should
20
+ ## be unique.
21
+ ##
22
+ ## == Important
15
23
  ** The parent object of a HListItem needs to be a compatible hash, like HRadiobuttonList.
24
+ ##
16
25
  ***/
26
+ var//RSence.Lists
17
27
  HListItems = HValueResponder.extend({
18
28
 
19
29
  constructor: function( _rect, _parent, _options ){
@@ -40,12 +50,15 @@ HListItems = HValueResponder.extend({
40
50
  refresh: function(){
41
51
  if ( this.value instanceof Array ) {
42
52
  var _listItems = [],
43
- _row,
53
+ _row, _rowType,
44
54
  _label, _value,
45
55
  i = 0;
46
56
  for ( ; i < this.value.length ; i++ ){
47
57
  _row = this.value[i];
48
- if ( _row instanceof Object ) {
58
+ _rowType = COMM.Values.type( _row );
59
+ // console.log('row:',_row,' rowType:',_rowType);
60
+ // hashes
61
+ if ( _rowType === 'h' ) {
49
62
  _label = _row['label'];
50
63
  _value = _row['value'];
51
64
  if ( _label === undefined || _value === undefined ){
@@ -53,8 +66,14 @@ HListItems = HValueResponder.extend({
53
66
  }
54
67
  _listItems.push( [_value, _label] );
55
68
  }
69
+ // strings and integers
70
+ else if ( ['s','n'].indexOf(_rowType) !== -1 ){
71
+ _label = _row.toString();
72
+ _value = _row;
73
+ _listItems.push( [_value, _label] );
74
+ }
56
75
  else {
57
- this._warningMessage( "The row "+_row+" is not an object (ignored)" );
76
+ this._warningMessage( "The row "+_row+" is has unsupported row type: '"+_rowType+"' (ignored)" );
58
77
  }
59
78
  }
60
79
  this.parent.setListItems( _listItems );
File without changes
@@ -10,6 +10,7 @@
10
10
  ** HRadiobuttonList expects the setListItems to be set. See HListItems.
11
11
  ** The value of the instance is the selected key in the listItems.
12
12
  ***/
13
+ var//RSence.Lists
13
14
  HRadioButtonList = HControl.extend({
14
15
  drawSubviews: function(){
15
16
  this.setStyle('border','1px solid #999');
@@ -110,17 +111,6 @@ HRadioButtonList = HControl.extend({
110
111
  }
111
112
  });
112
113
 
114
+ var//RSence.Lists
113
115
  HRadiobuttonList = HRadioButtonList;
114
116
 
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
File without changes
@@ -18,6 +18,7 @@
18
18
  ** ReloadApp.nu( 'Session Timeout', 'Your session has timed out', '/' );
19
19
  **
20
20
  **/
21
+ var//RSence
21
22
  ReloadApp = HApplication.extend({
22
23
 
23
24
  /** Reloads the page using the +_url+ given in the +constructor+.
@@ -43,7 +44,7 @@ ReloadApp = HApplication.extend({
43
44
  **/
44
45
  reset_session: function(){
45
46
  COMM.request(
46
- HCLIENT_HELLO + '/goodbye', {
47
+ COMM.Transporter.HelloUrl + '/goodbye', {
47
48
  method: 'POST',
48
49
  body: ('ses_key='+COMM.Session.ses_key),
49
50
  async: true,
@@ -81,12 +82,12 @@ ReloadApp = HApplication.extend({
81
82
  _halfWidth = parseInt(_winWidth/2,10),
82
83
  _halfHeight = parseInt(_winHeight/2,10),
83
84
  _alertWidth = 400,
84
- _alertHeight = 300,
85
+ _alertHeight = 270,
85
86
  _alertX = _halfWidth - 200,
86
87
  _alertY = _halfHeight - 150;
87
88
  if(_alertX<10){_alertX = 10;}
88
89
  if(_alertY<10){_alertY = 10;}
89
- HWindow.extend({
90
+ HSheet.extend({
90
91
  drawSubviews: function(){
91
92
  var _this = this,
92
93
  _elemId = _this.markupElemIds['subview'],
@@ -129,11 +130,12 @@ ReloadApp = HApplication.extend({
129
130
  HRect.nu( _alertX, _alertY, _alertX+_alertWidth, _alertY+_alertHeight ),
130
131
  _this, {
131
132
  label: _title,
132
- minSize: [_alertWidth,_alertHeight],
133
- maxSize: [_alertWidth,_alertHeight],
134
- enabled: true,
135
- closeButton: true,
136
- noResize: true
133
+ value: 0
134
+ // minSize: [_alertWidth,_alertHeight],
135
+ // maxSize: [_alertWidth,_alertHeight],
136
+ // enabled: true,
137
+ // closeButton: true,
138
+ // noResize: true
137
139
  }
138
140
  );
139
141
 
File without changes
@@ -19,10 +19,11 @@
19
19
  ** See http://pajhome.org.uk/crypt/md5 for details.
20
20
  **
21
21
  ***/
22
- SHAClass = HClass.extend({
22
+ var//RSence.Util
23
+ SHA = HClass.extend({
23
24
 
24
25
  /** = Description
25
- * Constructs an instance of SHAClass.
26
+ * Constructs an instance of SHA
26
27
  *
27
28
  * = Parameters
28
29
  * +_chrsz+:: The input character size, in bits. Optional.
@@ -233,17 +234,16 @@ SHAClass = HClass.extend({
233
234
  test: function(){
234
235
  return this.hexSHA1("abc") === "a9993e364706816aba3e25717850c26c9cd0d89d";
235
236
  },
236
-
237
- /*
238
- * Calculate the SHA-1 of an array of big-endian words, and a bit length
239
- */
237
+
238
+ /** Calculate the SHA-1 of an array of big-endian words, and a bit length
239
+ **/
240
240
  _coreSHA1: function(_x, _len){
241
- var _this=this;
242
- /* append padding */
241
+
243
242
  _x[_len >> 5] |= 0x80 << (24 - _len % 32);
244
243
  _x[((_len + 64 >> 9) << 4) + 15] = _len;
245
-
246
- var _w = new Array(80),
244
+
245
+ var _this=this,
246
+ _w = new Array(80),
247
247
  _a = 1732584193,
248
248
  _b = -271733879,
249
249
  _c = -1732584194,
@@ -251,14 +251,14 @@ SHAClass = HClass.extend({
251
251
  _e = -1009589776,
252
252
  i, _olda, _oldb, _oldc, _oldd, _olde,
253
253
  j, _t;
254
-
254
+
255
255
  for(i = 0; i < _x.length; i += 16){
256
256
  _olda = _a;
257
257
  _oldb = _b;
258
258
  _oldc = _c;
259
259
  _oldd = _d;
260
260
  _olde = _e;
261
-
261
+
262
262
  for(j = 0; j < 80; j++){
263
263
  if(j < 16){
264
264
  _w[j] = _x[i + j];
@@ -274,21 +274,19 @@ SHAClass = HClass.extend({
274
274
  _b = _a;
275
275
  _a = _t;
276
276
  }
277
-
277
+
278
278
  _a = _this._safeAdd(_a, _olda);
279
279
  _b = _this._safeAdd(_b, _oldb);
280
280
  _c = _this._safeAdd(_c, _oldc);
281
281
  _d = _this._safeAdd(_d, _oldd);
282
282
  _e = _this._safeAdd(_e, _olde);
283
283
  }
284
- return [_a, _b, _c, _d, _e];
285
-
284
+ return [ _a, _b, _c, _d, _e ];
286
285
  },
287
-
288
- /*
289
- * Perform the appropriate triplet combination function for the current
290
- * iteration
291
- */
286
+
287
+ /** Perform the appropriate triplet combination function for the current
288
+ * iteration
289
+ **/
292
290
  _sha1FT: function(_t, _b, _c, _d) {
293
291
  if(_t < 20){
294
292
  return (_b & _c) | ((~_b) & _d);
@@ -301,15 +299,14 @@ SHAClass = HClass.extend({
301
299
  }
302
300
  return _b ^ _c ^ _d;
303
301
  },
304
-
305
- /*
306
- * Determine the appropriate additive constant for the current iteration
307
- */
302
+
303
+ /** Determine the appropriate additive constant for the current iteration
304
+ **/
308
305
  _sha1KT: function(_t){
309
306
  return (_t < 20) ? 1518500249 : (_t < 40) ? 1859775393 :
310
307
  (_t < 60) ? -1894007588 : -899497514;
311
308
  },
312
-
309
+
313
310
  /*
314
311
  * Calculate the HMAC-SHA1 of a key and some data
315
312
  */
@@ -330,7 +327,7 @@ SHAClass = HClass.extend({
330
327
  _hash = _this._coreSHA1(_ipad.concat(_this._str2binb(_data)), 512 + _data.length * _this._chrsz);
331
328
  return _this._coreSHA1(_opad.concat(_hash), 512 + 160);
332
329
  },
333
-
330
+
334
331
  /*
335
332
  * Add integers, wrapping at 2^32. This uses 16-bit operations internally
336
333
  * to work around bugs in some JS interpreters.
@@ -340,7 +337,7 @@ SHAClass = HClass.extend({
340
337
  _msw = (_x >> 16) + (_y >> 16) + (_lsw >> 16);
341
338
  return (_msw << 16) | (_lsw & 0xFFFF);
342
339
  },
343
-
340
+
344
341
  /*
345
342
  * Bitwise rotate a 32-bit number to the left.
346
343
  */
@@ -363,7 +360,7 @@ SHAClass = HClass.extend({
363
360
  }
364
361
  return _bin;
365
362
  },
366
-
363
+
367
364
  /*
368
365
  * Convert an array of big-endian words to a string
369
366
  */
@@ -379,7 +376,7 @@ SHAClass = HClass.extend({
379
376
  }
380
377
  return _str;
381
378
  },
382
-
379
+
383
380
  /*
384
381
  * Convert an array of big-endian words to a hex string.
385
382
  */
@@ -395,7 +392,7 @@ SHAClass = HClass.extend({
395
392
  }
396
393
  return _str;
397
394
  },
398
-
395
+
399
396
  /*
400
397
  * Convert an array of big-endian words to a base-64 string
401
398
  */
@@ -427,6 +424,3 @@ SHAClass = HClass.extend({
427
424
  }
428
425
  });
429
426
 
430
- // Assigns SHA as a SHAClass instance that uses unicode input.
431
- SHA = SHAClass.nu(16);
432
-