rsence 2.0.4.15 → 2.0.8.19
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 +1 -1
- data/js/comm/transporter/transporter.js +3 -0
- data/js/controls/tab/tab.js +3 -1
- data/js/core/elem/elem.js +12 -8
- data/js/core/event/event.js +5 -2
- data/js/core/rsence_ns/rsence_ns.js +7 -1
- data/js/foundation/control/eventresponder/eventresponder.js +58 -31
- data/js/foundation/eventmanager/eventmanager.js +61 -19
- data/lib/conf/argv.rb +3 -1
- data/lib/plugins/pluginmanager.rb +27 -7
- data/lib/transporter/transporter.rb +19 -13
- data/lib/values/valuemanager.rb +1 -1
- data/plugins/client_pkg/lib/client_pkg_build.rb +12 -1
- data/plugins/index_html/tmpl/index.html +1 -3
- metadata +5 -5
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            2.0. | 
| 1 | 
            +
            2.0.8.19
         | 
| @@ -239,6 +239,9 @@ COMM.Transporter = HApplication.extend({ | |
| 239 239 | 
             
                }
         | 
| 240 240 | 
             
                // console.log('sync.');
         | 
| 241 241 | 
             
                this.busy = true;
         | 
| 242 | 
            +
                if(window['sesWatcher']){
         | 
| 243 | 
            +
                  sesWatcher.sesTimeoutValue.set( new Date().getTime() );
         | 
| 244 | 
            +
                }
         | 
| 242 245 | 
             
                var _this = this,
         | 
| 243 246 | 
             
                    _values = COMM.Values.sync(),
         | 
| 244 247 | 
             
                    _sesKey = 'ses_key='+COMM.Session.ses_key,
         | 
    
        data/js/controls/tab/tab.js
    CHANGED
    
    | @@ -166,10 +166,12 @@ HTab = HControl.extend({ | |
| 166 166 | 
             
                if(this.tabTriggerLink&&this.tabLabelElementTagName==='a'){
         | 
| 167 167 | 
             
                  ELEM.setAttr(_tabLabelElemId,'href','javascript:HSystem.views['+this.viewId+'].selectTab('+_tabIdx+');');
         | 
| 168 168 | 
             
                }
         | 
| 169 | 
            -
                else if (this.tabTriggerLink){
         | 
| 169 | 
            +
                else if (this.tabTriggerLink && !(BROWSER_TYPE.ie7 || BROWSER_TYPE.ie6)){
         | 
| 170 170 | 
             
                  ELEM.setAttr(_tabLabelElemId,'onclick','HSystem.views['+this.viewId+'].selectTab('+_tabIdx+');');
         | 
| 171 171 | 
             
                }
         | 
| 172 172 | 
             
                else {
         | 
| 173 | 
            +
                  this.tabTriggerLink = false;
         | 
| 174 | 
            +
                  this.setClick(true);
         | 
| 173 175 | 
             
                  this.tabLabelBounds.push([this.rightmostPx,this.rightmostPx+_labelWidth]);
         | 
| 174 176 | 
             
                }
         | 
| 175 177 | 
             
                this.rightmostPx+=_labelWidth;
         | 
    
        data/js/core/elem/elem.js
    CHANGED
    
    | @@ -507,18 +507,19 @@ ELEM = { | |
| 507 507 | 
             
              **/
         | 
| 508 508 | 
             
              setOpacity: function(_id, _opacity) {
         | 
| 509 509 | 
             
                var _this = ELEM;
         | 
| 510 | 
            -
                if (_opacity === 1 && BROWSER_TYPE.ie6) {
         | 
| 510 | 
            +
                if (_opacity === 1 && (BROWSER_TYPE.ie6 || BROWSER_TYPE.ie7 || BROWSER_TYPE.ie8)) {
         | 
| 511 511 | 
             
                  _this._elements[_id].style.setAttribute('filter', _this.getStyle(_id, 'filter', true).replace(/alpha([^)]*)/gi, ''));
         | 
| 512 512 | 
             
                }
         | 
| 513 513 | 
             
                else {
         | 
| 514 514 | 
             
                  if (_opacity < 0.01) {
         | 
| 515 515 | 
             
                    _opacity = 0;
         | 
| 516 516 | 
             
                  }
         | 
| 517 | 
            -
                  if (BROWSER_TYPE.ie6) {
         | 
| 518 | 
            -
                     | 
| 517 | 
            +
                  if (BROWSER_TYPE.ie6 || BROWSER_TYPE.ie7 || BROWSER_TYPE.ie8) {
         | 
| 518 | 
            +
                    var _prevAlpha = _this.getStyle(_id, 'filter', true);
         | 
| 519 | 
            +
                    _this._elements[_id].style.setAttribute('filter', _prevAlpha.replace(/alpha([^)]*)/gi, '') + 'alpha(opacity=' + _opacity * 100 + ')');
         | 
| 519 520 | 
             
                  }
         | 
| 520 521 | 
             
                  else if (BROWSER_TYPE.ie) {
         | 
| 521 | 
            -
                     | 
| 522 | 
            +
                    _this._elements[_id].style.setAttribute('opacity', _opacity);
         | 
| 522 523 | 
             
                  }
         | 
| 523 524 | 
             
                  else {
         | 
| 524 525 | 
             
                    _this._elements[_id].style.setProperty('opacity', _opacity, '');
         | 
| @@ -1097,6 +1098,9 @@ ELEM = { | |
| 1097 1098 | 
             
                  if ((_key === 'opacity') && _bypass) {
         | 
| 1098 1099 | 
             
                    _retval = _this.getOpacity(_id);
         | 
| 1099 1100 | 
             
                  }
         | 
| 1101 | 
            +
                  else if (BROWSER_TYPE.ie7 || BROWSER_TYPE.ie8){
         | 
| 1102 | 
            +
                    _retval = _this._elements[_id].style[_key];
         | 
| 1103 | 
            +
                  }
         | 
| 1100 1104 | 
             
                  else {
         | 
| 1101 1105 | 
             
                    _retval = document.defaultView.getComputedStyle(_this._elements[_id], null).getPropertyValue(_key);
         | 
| 1102 1106 | 
             
                  }
         | 
| @@ -1125,7 +1129,7 @@ ELEM = { | |
| 1125 1129 | 
             
                        return $3.toUpperCase() + $4;
         | 
| 1126 1130 | 
             
                      }
         | 
| 1127 1131 | 
             
                    );
         | 
| 1128 | 
            -
                    _this._elements[_id].currentStyle[_camelName];
         | 
| 1132 | 
            +
                    _retval = _this._elements[_id].currentStyle[_camelName];
         | 
| 1129 1133 | 
             
                  }
         | 
| 1130 1134 | 
             
                  _cached[_key] = _retval;
         | 
| 1131 1135 | 
             
                }
         | 
| @@ -1213,10 +1217,10 @@ ELEM = { | |
| 1213 1217 |  | 
| 1214 1218 | 
             
                var _this = ELEM;
         | 
| 1215 1219 |  | 
| 1216 | 
            -
                if (BROWSER_TYPE.ie6) {
         | 
| 1217 | 
            -
                  _this.getStyle = _this._getStyleIE;
         | 
| 1218 | 
            -
                }
         | 
| 1219 1220 | 
             
                if (BROWSER_TYPE.ie) {
         | 
| 1221 | 
            +
                  _this.getStyle = _this._getStyleIE;
         | 
| 1222 | 
            +
                // }
         | 
| 1223 | 
            +
                // if (BROWSER_TYPE.ie) {
         | 
| 1220 1224 | 
             
                  _this._flushStyleCache = _this._flushStyleCacheIE;
         | 
| 1221 1225 | 
             
                }
         | 
| 1222 1226 |  | 
    
        data/js/core/event/event.js
    CHANGED
    
    | @@ -49,7 +49,7 @@ Event = { | |
| 49 49 | 
             
              isLeftClick: function(e) {
         | 
| 50 50 | 
             
                // IE: left 1, middle 4, right 2
         | 
| 51 51 | 
             
                if (BROWSER_TYPE.ie) {
         | 
| 52 | 
            -
                  return (e.button === 1);
         | 
| 52 | 
            +
                  return (e.button === 1 || e.button === 3 || e.button === 5);
         | 
| 53 53 | 
             
                }
         | 
| 54 54 | 
             
                else {
         | 
| 55 55 | 
             
                  return (e.button === 0);
         | 
| @@ -84,7 +84,10 @@ Event = { | |
| 84 84 | 
             
                var i,
         | 
| 85 85 | 
             
                    l = Event.observers.length;
         | 
| 86 86 | 
             
                for (i = 0; i < l; i++) {
         | 
| 87 | 
            -
                   | 
| 87 | 
            +
                  try {
         | 
| 88 | 
            +
                    Event.stopObserving.apply(this, Event.observers[0]);
         | 
| 89 | 
            +
                  }
         | 
| 90 | 
            +
                  catch(e){}
         | 
| 88 91 | 
             
                }
         | 
| 89 92 | 
             
                Event.observers = false;
         | 
| 90 93 | 
             
              },
         | 
| @@ -11,5 +11,11 @@ | |
| 11 11 | 
             
            //   var//RSence
         | 
| 12 12 | 
             
            // ..into this namespace.
         | 
| 13 13 | 
             
            // Additional logic for handling the namespaces will however be required.
         | 
| 14 | 
            -
            var RSence = { | 
| 14 | 
            +
            var RSence = {
         | 
| 15 | 
            +
              serverConf: function(_clientPrefix,_helloUrl){
         | 
| 16 | 
            +
                COMM.ClientPrefix=_clientPrefix;
         | 
| 17 | 
            +
                COMM.Transporter.HelloUrl=_helloUrl;
         | 
| 18 | 
            +
                HThemeManager.themePath=_clientPrefix+'/themes';
         | 
| 19 | 
            +
              }
         | 
| 20 | 
            +
            };
         | 
| 15 21 |  | 
| @@ -140,33 +140,22 @@ HEventResponder = HClass.extend({ | |
| 140 140 | 
             
              setEvents: function(_events) {
         | 
| 141 141 | 
             
                if(!this.events) {
         | 
| 142 142 | 
             
                  this.events = HClass.extend( {
         | 
| 143 | 
            -
                    mouseMove: | 
| 144 | 
            -
                    mouseDown: | 
| 145 | 
            -
                    mouseUp: | 
| 146 | 
            -
                    draggable: | 
| 147 | 
            -
                    droppable: | 
| 148 | 
            -
                    keyDown: | 
| 149 | 
            -
                    keyUp: | 
| 150 | 
            -
                    mouseWheel: | 
| 151 | 
            -
                    textEnter: | 
| 152 | 
            -
                    click: | 
| 153 | 
            -
                    resize: | 
| 154 | 
            -
             | 
| 155 | 
            -
             | 
| 156 | 
            -
                if(_events) {
         | 
| 157 | 
            -
                  this.events = this.events.extend( _events );
         | 
| 143 | 
            +
                    mouseMove:   false,
         | 
| 144 | 
            +
                    mouseDown:   false,
         | 
| 145 | 
            +
                    mouseUp:     false,
         | 
| 146 | 
            +
                    draggable:   false,
         | 
| 147 | 
            +
                    droppable:   false,
         | 
| 148 | 
            +
                    keyDown:     false,
         | 
| 149 | 
            +
                    keyUp:       false,
         | 
| 150 | 
            +
                    mouseWheel:  false,
         | 
| 151 | 
            +
                    textEnter:   false,
         | 
| 152 | 
            +
                    click:       false,
         | 
| 153 | 
            +
                    resize:      false,
         | 
| 154 | 
            +
                    doubleClick: false
         | 
| 155 | 
            +
                  } ).extend( this.defaultEvents ).extend( _events?_events:{} ).nu();
         | 
| 158 156 | 
             
                }
         | 
| 159 157 | 
             
                this.events.ctrl = this;
         | 
| 160 | 
            -
                 | 
| 161 | 
            -
                // var _mmoveStatus = this.events.mouseMove,
         | 
| 162 | 
            -
                //     _mmoveIndex  = EVENT.coordListeners.indexOf(this.elemId);
         | 
| 163 | 
            -
                // if (_mmoveStatus && (_mmoveIndex===-1)){
         | 
| 164 | 
            -
                //   EVENT.coordListeners.push(this.elemId);
         | 
| 165 | 
            -
                // }
         | 
| 166 | 
            -
                // else if ((!_mmoveStatus) && (_mmoveIndex!==-1)){
         | 
| 167 | 
            -
                //   EVENT.coordListeners.splice(_mmoveIndex,1);
         | 
| 168 | 
            -
                // }
         | 
| 169 | 
            -
                EVENT.reg( this, this.events);
         | 
| 158 | 
            +
                EVENT.reg( this, this.events );
         | 
| 170 159 | 
             
                return this;
         | 
| 171 160 | 
             
              },
         | 
| 172 161 |  | 
| @@ -272,6 +261,24 @@ HEventResponder = HClass.extend({ | |
| 272 261 | 
             
                return this;
         | 
| 273 262 | 
             
              },
         | 
| 274 263 |  | 
| 264 | 
            +
            /** = Description
         | 
| 265 | 
            +
              * Registers or releases event listening for doubleClick events depending on 
         | 
| 266 | 
            +
              * the value of the flag argument.
         | 
| 267 | 
            +
              *
         | 
| 268 | 
            +
              * = Parameters
         | 
| 269 | 
            +
              * +_flag+:: Set the doubleClick event listening on/off (true/false) for
         | 
| 270 | 
            +
              *           the component instance.
         | 
| 271 | 
            +
              *
         | 
| 272 | 
            +
              * = Returns
         | 
| 273 | 
            +
              * +self+
         | 
| 274 | 
            +
              *
         | 
| 275 | 
            +
              **/
         | 
| 276 | 
            +
              setDoubleClickable: function(_flag) {
         | 
| 277 | 
            +
                this.events.doubleClick = _flag;
         | 
| 278 | 
            +
                this.setEvents();
         | 
| 279 | 
            +
                return this;
         | 
| 280 | 
            +
              },
         | 
| 281 | 
            +
              
         | 
| 275 282 | 
             
            /** = Description
         | 
| 276 283 | 
             
              * Registers or releases event listening for mouseUp events depending on the 
         | 
| 277 284 | 
             
              * value of the flag argument.
         | 
| @@ -402,6 +409,12 @@ HEventResponder = HClass.extend({ | |
| 402 409 | 
             
                return this.setClickable(_flag);
         | 
| 403 410 | 
             
              },
         | 
| 404 411 |  | 
| 412 | 
            +
            /** Same as +setDoubleClickable+
         | 
| 413 | 
            +
              **/
         | 
| 414 | 
            +
              setDoubleClick: function(_flag) {
         | 
| 415 | 
            +
                return this.setDoubleClickable(_flag);
         | 
| 416 | 
            +
              },
         | 
| 417 | 
            +
              
         | 
| 405 418 | 
             
            /** = Description
         | 
| 406 419 | 
             
              * Default focus event responder method. Does nothing by default.
         | 
| 407 420 | 
             
              * Called when the component gets focus.
         | 
| @@ -498,11 +511,25 @@ HEventResponder = HClass.extend({ | |
| 498 511 | 
             
              *                    mouse cursor position.
         | 
| 499 512 | 
             
              * +y+::              The vertical coordinate units (px) of the 
         | 
| 500 513 | 
             
              *                    mouse cursor position.
         | 
| 501 | 
            -
              * + | 
| 514 | 
            +
              * +_isLeftButton+::  Boolean flag; false if the right(context) mouse
         | 
| 515 | 
            +
              *                    button is pressed.
         | 
| 516 | 
            +
              *
         | 
| 517 | 
            +
              **/
         | 
| 518 | 
            +
              click: function(x,y,_isLeftButton){},
         | 
| 519 | 
            +
              
         | 
| 520 | 
            +
            /** = Description
         | 
| 521 | 
            +
              * Default click event responder method. Does nothing by default.
         | 
| 522 | 
            +
              *
         | 
| 523 | 
            +
              * = Parameters
         | 
| 524 | 
            +
              * +x+::              The horizontal coordinate units (px) of the 
         | 
| 525 | 
            +
              *                    mouse cursor position.
         | 
| 526 | 
            +
              * +y+::              The vertical coordinate units (px) of the 
         | 
| 527 | 
            +
              *                    mouse cursor position.
         | 
| 528 | 
            +
              * +_isLeftButton+::  Boolean flag; false if the right(context) mouse
         | 
| 502 529 | 
             
              *                    button is pressed.
         | 
| 503 530 | 
             
              *
         | 
| 504 531 | 
             
              **/
         | 
| 505 | 
            -
               | 
| 532 | 
            +
              doubleClick: function(x,y,_isLeftButton){},
         | 
| 506 533 |  | 
| 507 534 | 
             
            /** = Description
         | 
| 508 535 | 
             
              * Default mouseDown event responder method. Does nothing by default.
         | 
| @@ -512,11 +539,11 @@ HEventResponder = HClass.extend({ | |
| 512 539 | 
             
              *                    mouse cursor position.
         | 
| 513 540 | 
             
              * +y+::              The vertical coordinate units (px) of the 
         | 
| 514 541 | 
             
              *                    mouse cursor position.
         | 
| 515 | 
            -
              * + | 
| 542 | 
            +
              * +_isLeftButton+::  Boolean flag; false if the right(context) mouse
         | 
| 516 543 | 
             
              *                    button is pressed.
         | 
| 517 544 | 
             
              *
         | 
| 518 545 | 
             
              **/
         | 
| 519 | 
            -
              mouseDown: function(x,y, | 
| 546 | 
            +
              mouseDown: function(x,y,_isLeftButton) {},
         | 
| 520 547 |  | 
| 521 548 |  | 
| 522 549 | 
             
            /** = Description
         | 
| @@ -527,11 +554,11 @@ HEventResponder = HClass.extend({ | |
| 527 554 | 
             
              *                    mouse cursor position.
         | 
| 528 555 | 
             
              * +y+::              The vertical coordinate units (px) of the 
         | 
| 529 556 | 
             
              *                    mouse cursor position.
         | 
| 530 | 
            -
              * + | 
| 557 | 
            +
              * +_isLeftButton+::  Boolean flag; false if the right(context) mouse
         | 
| 531 558 | 
             
              *                    button is pressed.
         | 
| 532 559 | 
             
              *
         | 
| 533 560 | 
             
              **/
         | 
| 534 | 
            -
              mouseUp: function(x,y, | 
| 561 | 
            +
              mouseUp: function(x,y,_isLeftButton) {},
         | 
| 535 562 |  | 
| 536 563 | 
             
            /** = Description
         | 
| 537 564 | 
             
              * Default mouseWheel event responder method. Does nothing by default.
         | 
| @@ -27,7 +27,8 @@ EVENT = { | |
| 27 27 | 
             
                keyUp: false,
         | 
| 28 28 | 
             
                mouseWheel: false,
         | 
| 29 29 | 
             
                resize: false,
         | 
| 30 | 
            -
                textEnter: false
         | 
| 30 | 
            +
                textEnter: false,
         | 
| 31 | 
            +
                doubleClick: false
         | 
| 31 32 | 
             
              },
         | 
| 32 33 |  | 
| 33 34 | 
             
            /** = Description
         | 
| @@ -69,7 +70,7 @@ EVENT = { | |
| 69 70 | 
             
              *                                          Command, Menu or Start modifier keys being held down.
         | 
| 70 71 | 
             
              *
         | 
| 71 72 | 
             
              **/
         | 
| 72 | 
            -
              status: [false, false,  | 
| 73 | 
            +
              status: [false, false, -1, -1, [], false, false, false, false, false],
         | 
| 73 74 |  | 
| 74 75 | 
             
            /** The index in the status array for the left mouse button.
         | 
| 75 76 | 
             
              **/
         | 
| @@ -152,6 +153,7 @@ EVENT = { | |
| 152 153 | 
             
                Event.observe( _globalEventTargetElement, 'contextmenu', _this.contextMenu );
         | 
| 153 154 | 
             
                Event.observe( _globalEventTargetElement, 'resize', _this.resize );
         | 
| 154 155 | 
             
                Event.observe( _globalEventTargetElement, 'mousewheel', _this.mouseWheel );
         | 
| 156 | 
            +
                Event.observe( _globalEventTargetElement, 'dblclick', _this.doubleClick );
         | 
| 155 157 | 
             
                    // ],
         | 
| 156 158 | 
             
                    // i = 0;
         | 
| 157 159 | 
             
                // for (; i !== _eventMap.length; i++) {
         | 
| @@ -263,6 +265,10 @@ EVENT = { | |
| 263 265 | 
             
                  }
         | 
| 264 266 | 
             
                }
         | 
| 265 267 | 
             
                Event.observe(_elem, 'mouseover', _this._mouseOver);
         | 
| 268 | 
            +
                if(_ctrl.drawn){
         | 
| 269 | 
            +
                  _this._updateHoverItems();
         | 
| 270 | 
            +
                  (_this.hovered.length !== 0) && (_this.hovered.indexOf(_ctrl.elemId) === _this.hovered.length-1) && _this.focus(_ctrl);
         | 
| 271 | 
            +
                }
         | 
| 266 272 | 
             
              },
         | 
| 267 273 |  | 
| 268 274 | 
             
            /** Unregisters the  _ctrl object event listeners
         | 
| @@ -275,6 +281,9 @@ EVENT = { | |
| 275 281 | 
             
                  _this.changeActiveControl(null);
         | 
| 276 282 | 
             
                }
         | 
| 277 283 | 
             
                _elemId = _ctrl.elemId;
         | 
| 284 | 
            +
                if (_this.focused[_elemId]){
         | 
| 285 | 
            +
                  _this.blur(_ctrl);
         | 
| 286 | 
            +
                }
         | 
| 278 287 | 
             
                _elem = ELEM.get(_elemId);
         | 
| 279 288 |  | 
| 280 289 | 
             
                _this._coordCache[_elemId] = null;
         | 
| @@ -297,6 +306,7 @@ EVENT = { | |
| 297 306 | 
             
                }
         | 
| 298 307 | 
             
                if (_elem !== undefined) {
         | 
| 299 308 | 
             
                  Event.stopObserving(_elem, 'mouseover', _this._mouseOver);
         | 
| 309 | 
            +
                  Event.stopObserving(_elem, 'mouseout', _this._mouseOut);
         | 
| 300 310 | 
             
                }
         | 
| 301 311 | 
             
              },
         | 
| 302 312 |  | 
| @@ -517,28 +527,33 @@ EVENT = { | |
| 517 527 | 
             
                    _elem,
         | 
| 518 528 | 
             
                    _pos,
         | 
| 519 529 | 
             
                    _size,
         | 
| 520 | 
            -
                    _coords | 
| 521 | 
            -
             | 
| 530 | 
            +
                    _coords,
         | 
| 531 | 
            +
                    _hovered = [];
         | 
| 522 532 | 
             
                for (; i !== _this.listeners.length; i++) {
         | 
| 523 533 | 
             
                  if (!_this.listeners[i] || !_this.focusOptions[i].ctrl) {
         | 
| 524 534 | 
             
                    continue;
         | 
| 525 535 | 
             
                  }
         | 
| 526 536 | 
             
                  _ctrl = _this.focusOptions[i].ctrl;
         | 
| 527 | 
            -
                   | 
| 528 | 
            -
             | 
| 529 | 
            -
                     | 
| 530 | 
            -
             | 
| 531 | 
            -
             | 
| 532 | 
            -
             | 
| 533 | 
            -
             | 
| 534 | 
            -
             | 
| 535 | 
            -
             | 
| 537 | 
            +
                  if(_ctrl.drawn){
         | 
| 538 | 
            +
                    _elem = ELEM.get(i);
         | 
| 539 | 
            +
                    if (!_this._coordCacheFlag || !_this._coordCache[i]) {
         | 
| 540 | 
            +
                      _pos = ELEM.getVisiblePosition(_ctrl.elemId);
         | 
| 541 | 
            +
                      // [x,y]
         | 
| 542 | 
            +
                      _size = ELEM.getVisibleSize(_ctrl.elemId);
         | 
| 543 | 
            +
                      // [w,h]
         | 
| 544 | 
            +
                      _this._coordCache[i] = [_pos[0], _pos[1], _size[0], _size[1]];
         | 
| 545 | 
            +
                    }
         | 
| 546 | 
            +
                    _coords = _this._coordCache[i];
         | 
| 536 547 |  | 
| 537 | 
            -
             | 
| 538 | 
            -
             | 
| 539 | 
            -
             | 
| 548 | 
            +
                    // Is the mouse pointer inside the element's rectangle?
         | 
| 549 | 
            +
                    if (x >= _coords[0] && x <= _coords[0] + _coords[2] && y >= _coords[1] && y <= _coords[1] + _coords[3]) {
         | 
| 550 | 
            +
                      // console.log('coords:',_coords);
         | 
| 551 | 
            +
                      _hovered.push(i);
         | 
| 552 | 
            +
                    }
         | 
| 540 553 | 
             
                  }
         | 
| 541 554 | 
             
                }
         | 
| 555 | 
            +
                // console.log('update hover:',_hovered);
         | 
| 556 | 
            +
                _this.hovered = _hovered;
         | 
| 542 557 | 
             
              },
         | 
| 543 558 |  | 
| 544 559 | 
             
            /** = Description
         | 
| @@ -674,7 +689,6 @@ EVENT = { | |
| 674 689 | 
             
                if(!_isLeftButton){
         | 
| 675 690 | 
             
                  return true;
         | 
| 676 691 | 
             
                }
         | 
| 677 | 
            -
                _this.status[_this.button1] = true;
         | 
| 678 692 | 
             
                for (; i !== _this.focused.length; i++) {
         | 
| 679 693 | 
             
                  if (_this.focused[i] === true) {
         | 
| 680 694 | 
             
                    // Set the active control to the currently focused item.
         | 
| @@ -703,7 +717,6 @@ EVENT = { | |
| 703 717 | 
             
                  }
         | 
| 704 718 | 
             
                }
         | 
| 705 719 | 
             
                //if(_this.hovered.length!==0){Event.stop(e);}
         | 
| 706 | 
            -
                _this.status[_this.button1] = false;
         | 
| 707 720 | 
             
                return true;
         | 
| 708 721 | 
             
              },
         | 
| 709 722 |  | 
| @@ -723,13 +736,15 @@ EVENT = { | |
| 723 736 | 
             
                    _prevActiveCtrl.active = false;
         | 
| 724 737 | 
             
                    _prevActiveCtrl._lostActiveStatus(_ctrl);
         | 
| 725 738 | 
             
                  }
         | 
| 726 | 
            -
                  _this.activeControl = null;
         | 
| 727 739 | 
             
                  if (_ctrl) {
         | 
| 728 740 | 
             
                    // A new control gained the active status.
         | 
| 729 741 | 
             
                    _ctrl.active = true;
         | 
| 730 742 | 
             
                    _this.activeControl = _ctrl;
         | 
| 731 743 | 
             
                    _ctrl._gainedActiveStatus(_prevActiveCtrl);
         | 
| 732 744 | 
             
                  }
         | 
| 745 | 
            +
                  else {
         | 
| 746 | 
            +
                    _this.activeControl = null;
         | 
| 747 | 
            +
                  }
         | 
| 733 748 | 
             
                }
         | 
| 734 749 | 
             
              },
         | 
| 735 750 |  | 
| @@ -797,6 +812,33 @@ EVENT = { | |
| 797 812 | 
             
                return true;
         | 
| 798 813 | 
             
              },
         | 
| 799 814 |  | 
| 815 | 
            +
            /** Mid-level double-click manager.
         | 
| 816 | 
            +
              * Gets called on the onDoubleClick event.
         | 
| 817 | 
            +
              * Delegates the following call to the high-level event receivers of all
         | 
| 818 | 
            +
              * enabled controls registered, depending on the events they registered:
         | 
| 819 | 
            +
              * - doubleClick
         | 
| 820 | 
            +
              *
         | 
| 821 | 
            +
              **/
         | 
| 822 | 
            +
              doubleClick: function(e) {
         | 
| 823 | 
            +
                var _this = EVENT,
         | 
| 824 | 
            +
                    _didEndDrag = false,
         | 
| 825 | 
            +
                    x = _this.status[_this.crsrX],
         | 
| 826 | 
            +
                    y = _this.status[_this.crsrY],
         | 
| 827 | 
            +
                    _elemId,
         | 
| 828 | 
            +
                    _ctrl,
         | 
| 829 | 
            +
                    i = 0;
         | 
| 830 | 
            +
                _this._modifiers(e);
         | 
| 831 | 
            +
                // Check for mouseUp listeners.
         | 
| 832 | 
            +
                for (i = 0; i !== _this.focused.length; i++) {
         | 
| 833 | 
            +
                  if (_this.focused[i] === true) {
         | 
| 834 | 
            +
                    if (_this.focusOptions[i].doubleClick === true) {
         | 
| 835 | 
            +
                      _this.focusOptions[i].ctrl.doubleClick(x, y, true);
         | 
| 836 | 
            +
                    }
         | 
| 837 | 
            +
                  }
         | 
| 838 | 
            +
                }
         | 
| 839 | 
            +
                return true;
         | 
| 840 | 
            +
              },
         | 
| 841 | 
            +
             | 
| 800 842 |  | 
| 801 843 | 
             
            /** Mid-level key press manager.
         | 
| 802 844 | 
             
              * Gets called on the onKeyDown event.
         | 
    
        data/lib/conf/argv.rb
    CHANGED
    
    
| @@ -504,14 +504,20 @@ module RSence | |
| 504 504 | 
             
                  end
         | 
| 505 505 | 
             
                  to_unload.each do |name|
         | 
| 506 506 | 
             
                    next if @deps.category?( name )
         | 
| 507 | 
            -
                     | 
| 507 | 
            +
                    if RSence.args[:verbose]
         | 
| 508 | 
            +
                      print "Unloading #{name.inspect}..."; STDOUT.flush
         | 
| 509 | 
            +
                    end
         | 
| 508 510 | 
             
                    unload_bundle( name )
         | 
| 511 | 
            +
                    puts "done!" if RSence.args[:verbose]
         | 
| 509 512 | 
             
                  end
         | 
| 510 513 | 
             
                  to_reload.each do |name|
         | 
| 511 514 | 
             
                    next if @deps.category?( name )
         | 
| 512 | 
            -
                     | 
| 515 | 
            +
                    if RSence.args[:verbose]
         | 
| 516 | 
            +
                      print "Unloading #{name.inspect}..."; STDOUT.flush
         | 
| 517 | 
            +
                    end
         | 
| 513 518 | 
             
                    unload_order = unload_bundle( name )
         | 
| 514 519 | 
             
                    to_load += unload_order
         | 
| 520 | 
            +
                    puts "done!" if RSence.args[:verbose]
         | 
| 515 521 | 
             
                  end
         | 
| 516 522 | 
             
                  info_map = {}
         | 
| 517 523 | 
             
                  to_load.each do |name|
         | 
| @@ -531,14 +537,18 @@ module RSence | |
| 531 537 | 
             
                    next if @deps.category?( name )
         | 
| 532 538 | 
             
                    next unless to_load.include?( name )
         | 
| 533 539 | 
             
                    info = info_map[name]
         | 
| 534 | 
            -
                    if  | 
| 535 | 
            -
                       | 
| 536 | 
            -
             | 
| 537 | 
            -
                       | 
| 540 | 
            +
                    if RSence.args[:verbose]
         | 
| 541 | 
            +
                      if to_reload.include?( name )
         | 
| 542 | 
            +
                        print "Reloading #{name.inspect}..."
         | 
| 543 | 
            +
                      else
         | 
| 544 | 
            +
                        print "Loading #{name.inspect}..."
         | 
| 545 | 
            +
                      end
         | 
| 546 | 
            +
                      STDOUT.flush
         | 
| 538 547 | 
             
                    end
         | 
| 539 548 | 
             
                    @info[name] = info
         | 
| 540 549 | 
             
                    load_bundle( name )
         | 
| 541 550 | 
             
                    to_open.push( name )
         | 
| 551 | 
            +
                    puts "done!" if RSence.args[:verbose]
         | 
| 542 552 | 
             
                  end
         | 
| 543 553 | 
             
                  unless no_deps.empty?
         | 
| 544 554 | 
             
                    warn "Warning! Unable to load the following bundles; missing dependencies:"
         | 
| @@ -547,8 +557,18 @@ module RSence | |
| 547 557 | 
             
                    end
         | 
| 548 558 | 
             
                  end
         | 
| 549 559 | 
             
                  to_open.each do |name|
         | 
| 550 | 
            -
                     | 
| 560 | 
            +
                    if RSence.args[:verbose]
         | 
| 561 | 
            +
                      print "Opening #{name.inspect}..."; STDOUT.flush
         | 
| 562 | 
            +
                    end
         | 
| 551 563 | 
             
                    call( name, :open )
         | 
| 564 | 
            +
                    puts "done!" if RSence.args[:verbose]
         | 
| 565 | 
            +
                  end
         | 
| 566 | 
            +
                  if not (to_load.empty? and to_unload.empty? and to_reload.empty?)
         | 
| 567 | 
            +
                    puts "Plugin bundles:"
         | 
| 568 | 
            +
                    puts "  loaded: #{to_load.join(', ')}" unless to_load.empty?
         | 
| 569 | 
            +
                    puts "  unloaded: #{to_unload.join(', ')}" unless to_unload.empty?
         | 
| 570 | 
            +
                    puts "  reloaded: #{to_reload.join(', ')}" unless to_reload.empty?
         | 
| 571 | 
            +
                    puts "  opened: #{to_open.join(', ')}" unless to_open.empty?
         | 
| 552 572 | 
             
                  end
         | 
| 553 573 | 
             
                end
         | 
| 554 574 |  | 
| @@ -145,19 +145,26 @@ module RSence | |
| 145 145 |  | 
| 146 146 | 
             
                  # If the session is valid, continue:
         | 
| 147 147 | 
             
                  if msg.ses_valid and response_success
         | 
| 148 | 
            -
             | 
| 148 | 
            +
                    
         | 
| 149 149 | 
             
                    # If cookies are true, it means the url base needs to
         | 
| 150 150 | 
             
                    # be changed from /hello to /x to prevent further cookie juggling.
         | 
| 151 151 | 
             
                    if options[:cookies] and not options[:servlet]
         | 
| 152 | 
            -
                       | 
| 152 | 
            +
                      conf_sync_url = RSence.config[:broker_urls][:x]
         | 
| 153 | 
            +
                    else
         | 
| 154 | 
            +
                      conf_sync_url = RSence.config[:broker_urls][:hello]
         | 
| 153 155 | 
             
                    end
         | 
| 154 | 
            -
             | 
| 156 | 
            +
                    if msg.request.path != conf_sync_url
         | 
| 157 | 
            +
                      msg.reply("COMM.Transporter.url=#{conf_sync_url.to_json};")
         | 
| 158 | 
            +
                    end
         | 
| 159 | 
            +
                    
         | 
| 155 160 | 
             
                    # Appends a 'new session.' message for new sessions in RSence.args[:verbose]:
         | 
| 156 | 
            -
                     | 
| 157 | 
            -
             | 
| 158 | 
            -
             | 
| 159 | 
            -
             | 
| 160 | 
            -
             | 
| 161 | 
            +
                    if RSence.args[:verbose]
         | 
| 162 | 
            +
                      puts "new session." if msg.new_session
         | 
| 163 | 
            +
                      puts "restored session." if msg.restored_session
         | 
| 164 | 
            +
                      puts "clone source." if msg.cloned_targets
         | 
| 165 | 
            +
                      puts "clone target." if msg.cloned_source
         | 
| 166 | 
            +
                    end
         | 
| 167 | 
            +
                    
         | 
| 161 168 | 
             
                    ## Pass the client XML to the value manager
         | 
| 162 169 | 
             
                    if request.query.has_key?( 'values' )
         | 
| 163 170 | 
             
                      syncdata_str = request.query[ 'values' ]
         | 
| @@ -172,7 +179,6 @@ module RSence | |
| 172 179 |  | 
| 173 180 | 
             
                    ## Calls the restore_ses of plugins, when a session is restored (page reload with previously active session)
         | 
| 174 181 | 
             
                    if msg.restored_session
         | 
| 175 | 
            -
                    
         | 
| 176 182 | 
             
                      msg.session[:deps] = []
         | 
| 177 183 |  | 
| 178 184 | 
             
                      if msg.cloned_source
         | 
| @@ -210,7 +216,7 @@ module RSence | |
| 210 216 | 
             
                        xhr_traceback_handler( e, "Transporter::PluginDelegateClonedSourceError: @plugins.delegate 'cloned_source' failed." )
         | 
| 211 217 | 
             
                      end
         | 
| 212 218 | 
             
                    end
         | 
| 213 | 
            -
             | 
| 219 | 
            +
                    
         | 
| 214 220 | 
             
                    ## Calls validators for changed values
         | 
| 215 221 | 
             
                    begin
         | 
| 216 222 | 
             
                      @valuemanager.validate( msg )
         | 
| @@ -219,7 +225,7 @@ module RSence | |
| 219 225 | 
             
                      xhr_error_handler( msg, :valuemanager_validate_error, e.message )
         | 
| 220 226 | 
             
                      xhr_traceback_handler( e, "Transporter::ValueManagerValidateError: @valuemanager.validate failed." )
         | 
| 221 227 | 
             
                    end
         | 
| 222 | 
            -
             | 
| 228 | 
            +
                    
         | 
| 223 229 | 
             
                    ### Allows every plugin to respond to the idle call
         | 
| 224 230 | 
             
                    begin
         | 
| 225 231 | 
             
                      @plugins.delegate( :idle, msg )
         | 
| @@ -228,7 +234,7 @@ module RSence | |
| 228 234 | 
             
                      xhr_error_handler( msg, :plugin_idle_error, e.message )
         | 
| 229 235 | 
             
                      xhr_traceback_handler( e, "Transporter::PluginIdleError: @plugins.idle failed." )
         | 
| 230 236 | 
             
                    end
         | 
| 231 | 
            -
             | 
| 237 | 
            +
                    
         | 
| 232 238 | 
             
                    ### Processes outgoing values to client
         | 
| 233 239 | 
             
                    begin
         | 
| 234 240 | 
             
                      @valuemanager.sync_client( msg )
         | 
| @@ -237,7 +243,7 @@ module RSence | |
| 237 243 | 
             
                      xhr_error_handler( msg, :valuemanager_sync_client_error, e.message )
         | 
| 238 244 | 
             
                      xhr_traceback_handler( e, "Transporter::ValueManagerSyncClientError: @valuemanager.sync_client failed." )
         | 
| 239 245 | 
             
                    end
         | 
| 240 | 
            -
             | 
| 246 | 
            +
                    
         | 
| 241 247 | 
             
                  else
         | 
| 242 248 |  | 
| 243 249 | 
             
                    # session is not valid, the error was set in SessionManager
         | 
    
        data/lib/values/valuemanager.rb
    CHANGED
    
    
| @@ -186,6 +186,9 @@ class ClientPkgBuild | |
| 186 186 |  | 
| 187 187 | 
             
              def minimize_data
         | 
| 188 188 | 
             
                unless @quiet
         | 
| 189 | 
            +
                  @logger.log(  '' )
         | 
| 190 | 
            +
                  @logger.log(  "Client package build report.......................#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}" )
         | 
| 191 | 
            +
                  @logger.log(  '' )
         | 
| 189 192 | 
             
                  @logger.log(  "JS Package....................:  Original |   Minimized |  Compressed" )
         | 
| 190 193 | 
             
                  @logger.log(  "                              :           |             |" )
         | 
| 191 194 | 
             
                end
         | 
| @@ -234,7 +237,7 @@ class ClientPkgBuild | |
| 234 237 |  | 
| 235 238 | 
             
              def build_themes
         | 
| 236 239 | 
             
                unless @quiet
         | 
| 237 | 
            -
                  @logger.log( | 
| 240 | 
            +
                  @logger.log(  '' )
         | 
| 238 241 | 
             
                  @logger.log(  "Theme name and part...........:  Original |   Minimized |  Compressed" )
         | 
| 239 242 | 
             
                  @logger.log(  "                              :           |             |" )
         | 
| 240 243 | 
             
                end
         | 
| @@ -277,11 +280,15 @@ class ClientPkgBuild | |
| 277 280 | 
             
                  unless @quiet
         | 
| 278 281 | 
             
                    print_stat( "#{theme_name}/css", @theme_sizes[theme_name][:css][0], @theme_sizes[theme_name][:css][1], theme_css_template_data_gz.size )
         | 
| 279 282 | 
             
                    print_stat( "#{theme_name}/gfx", @theme_sizes[theme_name][:gfx], -1, -1 )
         | 
| 283 | 
            +
                    @logger.log( '' )
         | 
| 280 284 | 
             
                  end
         | 
| 281 285 | 
             
                end
         | 
| 282 286 | 
             
              end
         | 
| 283 287 |  | 
| 284 288 | 
             
              def run
         | 
| 289 | 
            +
                
         | 
| 290 | 
            +
                time_start = Time.now.to_f*10000
         | 
| 291 | 
            +
                
         | 
| 285 292 | 
             
                # hash of bundles per bundle name per theme; @html_by_theme[theme_name][bundle_name] = bundle_data
         | 
| 286 293 | 
             
                @html_by_theme = {}
         | 
| 287 294 | 
             
                @css_by_theme  = {}
         | 
| @@ -316,10 +323,14 @@ class ClientPkgBuild | |
| 316 323 | 
             
                  package_data = package_array.join('')
         | 
| 317 324 | 
             
                  @destination_files[ package_name ] = package_data
         | 
| 318 325 | 
             
                end
         | 
| 326 | 
            +
                
         | 
| 319 327 | 
             
                build_indexes
         | 
| 320 328 | 
             
                minimize_data
         | 
| 321 329 | 
             
                build_themes
         | 
| 322 330 |  | 
| 331 | 
            +
                ms_taken = ((Time.now.to_f*10000)-time_start).to_i/10.0
         | 
| 332 | 
            +
                @logger.log( "Time taken:  #{ms_taken}ms\n\n" )
         | 
| 333 | 
            +
                
         | 
| 323 334 | 
             
              end
         | 
| 324 335 |  | 
| 325 336 | 
             
              def setup_dirs
         | 
| @@ -10,8 +10,6 @@ __SCRIPT_DEPS__ | |
| 10 10 | 
             
            <script>
         | 
| 11 11 |  | 
| 12 12 | 
             
            /** Runtime configuration: **/
         | 
| 13 | 
            -
             | 
| 14 | 
            -
            COMM.Transporter.HelloUrl='__CLIENT_HELLO__';
         | 
| 15 | 
            -
            HThemeManager.themePath='__CLIENT_BASE__/themes';
         | 
| 13 | 
            +
            RSence.serverConf('__CLIENT_BASE__','__CLIENT_HELLO__');
         | 
| 16 14 |  | 
| 17 15 | 
             
            </script></head><body id="body"><noscript>__NOSCRIPT__</noscript></body></html>
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: rsence
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 105
         | 
| 5 5 | 
             
              prerelease: false
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 2
         | 
| 8 8 | 
             
              - 0
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              -  | 
| 11 | 
            -
              version: 2.0. | 
| 9 | 
            +
              - 8
         | 
| 10 | 
            +
              - 19
         | 
| 11 | 
            +
              version: 2.0.8.19
         | 
| 12 12 | 
             
            platform: ruby
         | 
| 13 13 | 
             
            authors: 
         | 
| 14 14 | 
             
            - Riassence Inc.
         | 
| @@ -16,7 +16,7 @@ autorequire: | |
| 16 16 | 
             
            bindir: bin
         | 
| 17 17 | 
             
            cert_chain: []
         | 
| 18 18 |  | 
| 19 | 
            -
            date: 2010-07- | 
| 19 | 
            +
            date: 2010-07-26 00:00:00 +03:00
         | 
| 20 20 | 
             
            default_executable: rsence
         | 
| 21 21 | 
             
            dependencies: 
         | 
| 22 22 | 
             
            - !ruby/object:Gem::Dependency 
         |