rsence 2.0.9.22.pre → 2.0.9.23

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 CHANGED
@@ -1 +1 @@
1
- 2.0.9.22.pre
1
+ 2.0.9.23
@@ -711,13 +711,6 @@ EVENT = {
711
711
  _stopEvent--;
712
712
  }
713
713
  }
714
- // Stop the event only when we are hovering over some control, allows normal DOM events to co-exist.
715
- if (_this.enableDroppableChecks) {
716
- if ((_stopEvent === 0) && (_this.hovered.length !== 0) && _newActiveControl) {
717
- Event.stop(e);
718
- }
719
- }
720
- //if(_this.hovered.length!==0){Event.stop(e);}
721
714
  return true;
722
715
  },
723
716
 
@@ -66,6 +66,10 @@ HListItems = HValueResponder.extend({
66
66
  }
67
67
  _listItems.push( [_value, _label] );
68
68
  }
69
+ // Arrays as-is
70
+ else if ( _rowType == 'a' ){
71
+ _listItems.push( _row );
72
+ }
69
73
  // strings and integers
70
74
  else if ( ['s','n'].indexOf(_rowType) !== -1 ){
71
75
  _label = _row.toString();
@@ -99,7 +99,7 @@ ReloadApp = HApplication.extend({
99
99
  _this.setStyle('color','#000');
100
100
  _this.setStyle('font-size','13px');
101
101
  ELEM.setCSS(_alertIcon,'position:absolute;left:8px;top:8px;width:48px;height:48px;background-image:url('+_iconUrl+');');
102
- ELEM.setCSS(_alertTitle,'position:absolute;left:64px;top:8px;width:300px;height:24px;line-height:24px;vertical-align:middle;text-align:center;font-weight:bold;overflow:hidden;text-overflow:ellipsis;line-wrap:nowrap;');
102
+ ELEM.setCSS(_alertTitle,'position:absolute;left:64px;top:8px;width:300px;height:24px;line-height:24px;vertical-align:middle;text-align:center;font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;');
103
103
  ELEM.setHTML(_alertTitle,_this.app._title);
104
104
  ELEM.setCSS(_alertMessage,'position:absolute;left:64px;top:42px;width:332px;height:186px;border-bottom:1px dotted #999;line-height:17px;vertical-align:middle;overflow:auto;');
105
105
  ELEM.setHTML(_alertMessage,_this.app._message);
@@ -1,19 +1,34 @@
1
+ # RSence user interfaces can be defined as YAML files.
2
+ # The structure is converted to JSON for the client and "special" variables are processed by the server.
3
+ # The server tries to find a match in its gui_params for all values that begin with a colon (they are parsed as symbols on ruby).
4
+
5
+ # Read more about YAML on http://yaml.org/
6
+
7
+ # GUITree is used as the type identifier for user interface definition structures.
1
8
  type: GUITree
9
+ # The version defines what version of the structure is used. New features are added constantly, each incrementing the version by 0.1
2
10
  version: 0.6
3
11
 
12
+ # List of javascript packages the user interface needs. These are automatically loaded once per session.
4
13
  dependencies:
5
- - default_theme
6
- - controls
14
+ - default_theme # The default_theme package contains all the theme resources needed when using the default theme.
15
+ - controls # The controls package contains the basic set of widget components.
7
16
 
17
+ # The root level class for user interfaces must be an instance of HApplication (RSence.GUIApp is extended from the HApplication class).
8
18
  class: RSence.GUIApp
19
+ # Each class takes a number of options for its constructor.
9
20
  options:
10
21
  title: Welcome App
11
- priority: 20
22
+ # The subviews use the class defined above as their parent component.
12
23
  subviews:
24
+ # The sheet is used as the main visual container for the gui in this app.
25
+ # HSheet is an component that dims the background and shows a dialog sheet while its value is 0.
13
26
  - class: HSheet
14
- rect: [ 0, 0, 600, 500 ]
15
- bind: :values.close
16
- extend:
27
+ rect: [ 0, 0, 600, 500 ] # For HSheet, the rect defines the inner dialog size (it's always centered).
28
+ bind: :values.close # Values are bound to their component responders using the bind keyword.
29
+ extend: # The extend keyword takes a dictionary of properties to extend the class with.
30
+ # Extending refreshValue with a javascript function that terminates its application,
31
+ # including all the subviews. It's triggered when the value becomes 1, when the Close button is clicked.
17
32
  refreshValue: |
18
33
  function(){
19
34
  this.base();
@@ -21,20 +36,38 @@ subviews:
21
36
  this.app.die();
22
37
  }
23
38
  }
39
+ # Subviews of the HSheet, nested visual-logical structure.
24
40
  subviews:
41
+ # A button in the lower right corner of the HSheet that triggers destruction of this GUITree (see the extension of HSheet above)
42
+ - class: HClickButton
43
+ rect: [ null, null, 60, 24, 8, 8 ]
44
+ bind: :values.close
45
+ options:
46
+ label: Close
47
+ # A checkbox in the lower right corner of the HSheet that triggers an server action to disable the whole plugin when combined with the close button's value.
48
+ - class: HCheckbox
49
+ rect: [ null, null, 130, 24, 74, 8 ]
50
+ bind: :values.dont_show_again
51
+ options:
52
+ label: Don't show again
53
+ # The HScrollView contains a number of subviews that are inside its scrollbars (if the inner content area is bigger than the outer dimensions of HScrollView itself).
25
54
  - class: HScrollView
26
- rect: [ 0, 0, 550, 300, 0, 42 ]
55
+ rect: [ 0, 0, 550, 300, 0, 42 ] # This rectangle stretches the component to contain all of the parent's space except the bottom-most 42 pixels.
27
56
  options:
28
- scrollX: false
29
- scrollY: auto
30
- style:
57
+ scrollX: false # Disables horizontal scroll bars.
58
+ scrollY: auto # Makes vertical scroll bars appear automatically when needed.
59
+ style: # Custom styling using style properties. There are several ways to display nested arrays. This is one:
31
60
  - [ 'background-color', 'white' ]
32
61
  - [ 'border-bottom', '1px solid black' ]
62
+ # Subviews of the HScrollView; items inside are displayed inside the scrollbars.
33
63
  subviews:
64
+ # The RSence logo image:
34
65
  - class: HImageView
35
66
  rect: [ 18, 10, 559, 110 ]
36
67
  options:
68
+ # Images use the value as the URL of the image.
37
69
  value: http://rsence.org/rsence_org_logo.gif
70
+ # A plain view containing a hyperlink, positioned in the right bottom corner of the logo image.
38
71
  - class: HView
39
72
  rect: [ null, 95, 310, 25, 35, null ]
40
73
  options:
@@ -42,13 +75,14 @@ subviews:
42
75
  <i style="font-family:Helvetica,Arial,sans-serif;font-size:16px;">
43
76
  <a style="color:#28c;font-weight:bold" href="http://rsence.org/">http://www.rsence.org/</a>
44
77
  </i>
45
- style:
78
+ style: # Another way to define nested arrays for the style:
46
79
  - - text-align
47
80
  - right
81
+ # The HInlineView is a simple HTML container, designed to contain "flowing layout" html.
48
82
  - class: HInlineView
49
83
  rect: [ 0, 0, null, null, 0, 0 ]
50
84
  options:
51
- html: :text.welcome
85
+ html: :text.welcome # See the gui_params method of welcome.rb to understand how the contents of the text/welcome.html files is linked like this.
52
86
  style:
53
87
  - - font-family
54
88
  - 'Helvetica, Arial, sans-serif'
@@ -56,13 +90,3 @@ subviews:
56
90
  - 16px
57
91
  - - line-height
58
92
  - 20px
59
- - class: HClickValueButton
60
- rect: [ null, null, 60, 24, 8, 8 ]
61
- bind: :values.close
62
- options:
63
- label: Close
64
- - class: HCheckbox
65
- rect: [ null, null, 130, 24, 74, 8 ]
66
- bind: :values.dont_show_again
67
- options:
68
- label: Don't show again
@@ -3,7 +3,7 @@
3
3
  title: Welcome message
4
4
 
5
5
  # The human-readable version of the package
6
- version: 1.0.0
6
+ version: 1.0.1
7
7
 
8
8
  # A brief description of the package (rdoc formatting supported)
9
9
  description: |
@@ -11,6 +11,3 @@ description: |
11
11
  environments, when the rsence initenv in executed.
12
12
  You may safely remove this plugin bundle.
13
13
 
14
- # System version requirement.
15
- sys_version: '>= 2.0.0'
16
-
@@ -1,3 +1,4 @@
1
+ <!-- This data is included in the gui/welcome.yaml via the gui_params method in the welcome.rb file. -->
1
2
  <div style="margin-left:40px;margin-top:140px;margin-right:20px">
2
3
  <h1>Congratulations!</h1>
3
4
  <p>This message is served to you by RSence running in your new environment.</p>
@@ -5,4 +6,4 @@
5
6
  <p>Use the <code>rsence help</code> command to learn more about the <code>rsence</code> command-line tool and its various commands and options.</p>
6
7
  <p>You may want to install or write some software to run in your new RSence environment next.</p>
7
8
  <p>Go to <a href="http://rsence.org/">rsence.org</a> to learn more about RSence.</p>
8
- </span>
9
+ </span>
@@ -1,6 +1,9 @@
1
+ # Value for the checkbox. When true combined with 1 of the close value, disables the plugin. See welcome.rb
1
2
  :dont_show_again:
2
3
  :value: false
4
+
5
+ # Value for the close button.
3
6
  :close:
4
7
  :value: 0
5
- :responders:
6
- - { :method: close_button }
8
+ :responders: # See the 'close_button' method of welcome.rb to see what a responder is.
9
+ - :method: close_button
@@ -7,12 +7,10 @@
7
7
  ##
8
8
 
9
9
 
10
- # RSence 'Welcome' plugin
10
+ # RSence 'Welcome' plugin.
11
+ # An instance of a class extended from GUIPlugin includes basic functionality
12
+ # to initialize their user interface from YAML files without extra code.
11
13
  class WelcomePlugin < GUIPlugin
12
- def disable_self
13
- file_write( 'disabled', '' )
14
- @plugins.unload_bundle( @name )
15
- end
16
14
 
17
15
  def gui_params( msg )
18
16
  params = super
@@ -22,11 +20,35 @@ class WelcomePlugin < GUIPlugin
22
20
  return params
23
21
  end
24
22
 
23
+ # Responder for the value defined as `:close` in values.yaml
24
+ # A responder is called whenever its value is changed on the client.
25
25
  def close_button( msg, value )
26
+
27
+ # Gets the value of the checkbox
26
28
  dont_show_again = get_ses(msg)[:dont_show_again]
29
+
30
+ # If both the checkbox is checked (true) and the button clicked,
31
+ # calls the disable_self method defined below.
27
32
  if (value.data == 1) and (dont_show_again.data == true)
28
33
  disable_self
29
34
  end
35
+
36
+ # For most uses of HClickButton combined with a value, resetting the data
37
+ # to 0 (to make the button clickable again) is done like this:
38
+ # value.set( msg, 0 )
39
+
40
+ # Responders should always return true, until more specific return
41
+ # values are defined in a future version of RSence.
42
+ # Returning false causes the responder to be called on every request
43
+ # the client makes until the responder returns true.
30
44
  return true
31
45
  end
46
+
47
+ # Called by close_button, when the checkbox is checked (true) and the Close-button is clicked (1).
48
+ def disable_self
49
+ file_write( 'disabled', 'This plugin is disabled. Remove this file to re-enable.' )
50
+ @plugins.unload_bundle( @name )
51
+ end
52
+
32
53
  end
54
+
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsence
3
3
  version: !ruby/object:Gem::Version
4
- hash: 961916132
5
- prerelease: true
4
+ hash: 101
5
+ prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
9
  - 9
10
- - 22
11
- - pre
12
- version: 2.0.9.22.pre
10
+ - 23
11
+ version: 2.0.9.23
13
12
  platform: ruby
14
13
  authors:
15
14
  - Riassence Inc.
@@ -17,7 +16,7 @@ autorequire:
17
16
  bindir: bin
18
17
  cert_chain: []
19
18
 
20
- date: 2010-08-25 00:00:00 +03:00
19
+ date: 2010-08-28 00:00:00 +03:00
21
20
  default_executable: rsence
22
21
  dependencies:
23
22
  - !ruby/object:Gem::Dependency
@@ -385,20 +384,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
385
384
  required_rubygems_version: !ruby/object:Gem::Requirement
386
385
  none: false
387
386
  requirements:
388
- - - ">"
387
+ - - ">="
389
388
  - !ruby/object:Gem::Version
390
- hash: 25
389
+ hash: 3
391
390
  segments:
392
- - 1
393
- - 3
394
- - 1
395
- version: 1.3.1
391
+ - 0
392
+ version: "0"
396
393
  requirements: []
397
394
 
398
- rubyforge_project:
395
+ rubyforge_project: rsence-
399
396
  rubygems_version: 1.3.7
400
397
  signing_key:
401
398
  specification_version: 3
402
- summary: Pre-Release 2.0 version of the RSence framework.
399
+ summary: Release 2.0 version of the RSence framework.
403
400
  test_files: []
404
401