rsence-pre 2.3.0.6 → 2.3.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.0.6.pre
1
+ 2.3.0.7.pre
@@ -23,6 +23,9 @@ var HStringView, HLabel;
23
23
  var _HStringViewInterface = {
24
24
 
25
25
  componentName: "stringview",
26
+
27
+ // allows text selection
28
+ textSelectable: true,
26
29
 
27
30
  /** = Description
28
31
  * The setStyle method of HStringView applies only to the value
@@ -20,6 +20,9 @@ var//RSence.Controls
20
20
  HTextControl = HControl.extend({
21
21
 
22
22
  componentName: "textcontrol",
23
+
24
+ // allows text selection
25
+ textSelectable: true,
23
26
 
24
27
  defaultEvents: {
25
28
  textEnter: true,
@@ -1,12 +1,34 @@
1
1
 
2
2
  # The RSence namespace
3
3
  RSence =
4
+
5
+ # Adds text selection prevention class
6
+ loadUnselectable: ->
7
+ HThemeManager.useCSS('''
8
+ .textunselectable {
9
+ -webkit-user-select: none;
10
+ -khtml-user-select: none;
11
+ -moz-user-select: -moz-none;
12
+ -ms-user-select: none;
13
+ -o-user-select: none;
14
+ user-select: none;
15
+ }
16
+ .textselectable {
17
+ -webkit-user-select: text;
18
+ -khtml-user-select: text;
19
+ -moz-user-select: text;
20
+ -ms-user-select: text;
21
+ -o-user-select: text;
22
+ user-select: text;
23
+ }
24
+ ''')
4
25
 
5
26
  # Call this method from the index page for
6
27
  # client-only features
7
28
  clientConf: (_clientPrefix)->
8
29
  HThemeManager.themePath = _clientPrefix+'/themes'
9
30
  HThemeManager._start()
31
+ @loadUnselectable()
10
32
 
11
33
  # Call this method from the index page to
12
34
  # setup the environment variables and to
@@ -582,6 +582,26 @@ HView = HClass.extend({
582
582
  }
583
583
  return 0;
584
584
  },
585
+
586
+ /** = Description
587
+ * The selectable state defines whe
588
+ *
589
+ **/
590
+ textSelectable: false,
591
+ updateTextSelectable: function(){
592
+ if( this.textSelectable ){
593
+ ELEM.delClassName( this.elemId, 'textunselectable' );
594
+ ELEM.addClassName( this.elemId, 'textselectable' );
595
+ }
596
+ else {
597
+ ELEM.delClassName( this.elemId, 'textselectable' );
598
+ ELEM.addClassName( this.elemId, 'textunselectable' );
599
+ }
600
+ },
601
+ setTextSelectable: function(_flag){
602
+ this.textSelectable = !!_flag;
603
+ this.updateSelectable();
604
+ },
585
605
 
586
606
  /** --
587
607
  * = Description
@@ -602,6 +622,10 @@ HView = HClass.extend({
602
622
  else {
603
623
  ELEM.addClassName( this.elemId, HThemeManager.currentTheme );
604
624
  }
625
+ if( this.options.textSelectable !== undefined ){
626
+ this.textSelectable = this.options.textSelectable;
627
+ }
628
+ this.updateTextSelectable();
605
629
  }
606
630
  },
607
631
 
@@ -21,6 +21,6 @@ HViewDefaults = HClass.extend({
21
21
  /** The default initial visibility of the component.
22
22
  **/
23
23
  visible: true
24
-
24
+
25
25
  });
26
26
 
@@ -44,7 +44,8 @@ HMiniMenuItem = HRadioButton.extend({
44
44
  if( _now - this._parentLastActivation > 200 ){
45
45
  this.base();
46
46
  this._parentLastActivation = _now;
47
- this._activateParentParent();
47
+ EVENT.changeActiveControl(null);
48
+ // this._activateParentParent();
48
49
  }
49
50
  return true;
50
51
  },
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsence-pre
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0.6
4
+ version: 2.3.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-19 00:00:00.000000000 Z
13
+ date: 2012-10-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsence-deps