rsence-pre 2.2.0.11 → 2.2.0.12
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/controls/window/themes/default/window.css +9 -0
 - data/js/datetime/calendar/calendar.js +109 -11
 - data/js/datetime/calendar/themes/default/calendar.css +89 -7
 - data/js/datetime/calendar/themes/default/calendar.html +11 -0
 - data/js/datetime/calendar/themes/default/calendar_bg-ie6.gif +0 -0
 - data/js/datetime/calendar/themes/default/calendar_bg.png +0 -0
 - data/js/datetime/calendar/themes/default/calendar_parts1-ie6.gif +0 -0
 - data/js/datetime/calendar/themes/default/calendar_parts1.png +0 -0
 - data/js/datetime/calendar/themes/default/calendar_parts2-ie6.gif +0 -0
 - data/js/datetime/calendar/themes/default/calendar_parts2.png +0 -0
 - data/js/datetime/datetimevalue/datetimevalue.js +22 -5
 - data/js/foundation/eventmanager/eventmanager.js +8 -6
 - data/js/foundation/locale_settings/locale_settings.js +7 -0
 - data/js/lists/radiobuttonlist/radiobuttonlist.js +4 -2
 - data/js/menus/minimenu/minimenu.js +7 -2
 - data/lib/conf/argv.rb +1 -130
 - data/lib/conf/default.rb +5 -5
 - data/lib/plugins/gui_plugin.rb +2 -0
 - data/lib/plugins/plugin_plugins.rb +1 -1
 - data/lib/rsence.rb +134 -3
 - data/plugins/client_pkg/client_pkg.rb +7 -3
 - data/plugins/client_pkg/lib/client_pkg_build.rb +2 -1
 - metadata +11 -12
 - data/js/datetime/timesheet/old_timesheet.js +0 -292
 - data/js/datetime/timesheet/themes/default/old_timesheet.css +0 -30
 - data/js/datetime/timesheet/themes/default/old_timesheet.html +0 -2
 - data/js/datetime/timesheet_item/old_timesheet_item.js +0 -308
 - data/js/datetime/timesheet_item/themes/default/old_timesheet_item.css +0 -42
 - data/js/datetime/timesheet_item/themes/default/old_timesheet_item.html +0 -8
 - data/js/datetime/timesheet_item_edit/old_timesheet_item_edit.js +0 -274
 
    
        data/lib/rsence.rb
    CHANGED
    
    | 
         @@ -25,8 +25,139 @@ 
     | 
|
| 
       25 
25 
     | 
    
         
             
            # 
         
     | 
| 
       26 
26 
     | 
    
         
             
            # Most other classes are inner workings of RSence itself and are subject to change without further notice.
         
     | 
| 
       27 
27 
     | 
    
         
             
            module RSence
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
      
 28 
     | 
    
         
            +
              
         
     | 
| 
      
 29 
     | 
    
         
            +
              # @private  Returns true, if platform fully supports POSIX standard signals.
         
     | 
| 
      
 30 
     | 
    
         
            +
              def self.pid_support?
         
     | 
| 
      
 31 
     | 
    
         
            +
                # true for non-windows
         
     | 
| 
      
 32 
     | 
    
         
            +
                return (not ['i386-mingw32','x86-mingw32'].include?(RUBY_PLATFORM))
         
     | 
| 
      
 33 
     | 
    
         
            +
              end
         
     | 
| 
      
 34 
     | 
    
         
            +
              
         
     | 
| 
      
 35 
     | 
    
         
            +
              # @private  Returns true, if platform is linux
         
     | 
| 
      
 36 
     | 
    
         
            +
              def self.linux?
         
     | 
| 
      
 37 
     | 
    
         
            +
                return RUBY_PLATFORM.end_with?('-linux')
         
     | 
| 
      
 38 
     | 
    
         
            +
              end
         
     | 
| 
      
 39 
     | 
    
         
            +
              
         
     | 
| 
      
 40 
     | 
    
         
            +
              # @private  Returns true, if platform is Mac OS X
         
     | 
| 
      
 41 
     | 
    
         
            +
              def self.darwin?
         
     | 
| 
      
 42 
     | 
    
         
            +
                return RUBY_PLATFORM.include?('-darwin')
         
     | 
| 
      
 43 
     | 
    
         
            +
              end
         
     | 
| 
      
 44 
     | 
    
         
            +
              
         
     | 
| 
      
 45 
     | 
    
         
            +
              # @private  Returns signal name that resembles INFO or PWR (extra signal to poll for server status)
         
     | 
| 
      
 46 
     | 
    
         
            +
              def self.info_signal_name
         
     | 
| 
      
 47 
     | 
    
         
            +
                if self.linux?
         
     | 
| 
      
 48 
     | 
    
         
            +
                  return 'PWR'
         
     | 
| 
      
 49 
     | 
    
         
            +
                else
         
     | 
| 
      
 50 
     | 
    
         
            +
                  return 'INFO'
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
              end
         
     | 
| 
      
 53 
     | 
    
         
            +
              
         
     | 
| 
      
 54 
     | 
    
         
            +
              # @private  This accessor enables RSence.argv method, which returns the ARGVParser instance
         
     | 
| 
      
 55 
     | 
    
         
            +
              def self.argv;    @@argv_parser;    end
         
     | 
| 
      
 56 
     | 
    
         
            +
              
         
     | 
| 
      
 57 
     | 
    
         
            +
              # @private  This accessor enables RSence.cmd method, which returns the command the process was started with.
         
     | 
| 
      
 58 
     | 
    
         
            +
              def self.cmd;     @@argv_parser.cmd;     end
         
     | 
| 
      
 59 
     | 
    
         
            +
              
         
     | 
| 
      
 60 
     | 
    
         
            +
              # Command line options parsed
         
     | 
| 
      
 61 
     | 
    
         
            +
              # @return [Hash] Parsed command-line options:
         
     | 
| 
      
 62 
     | 
    
         
            +
              # *Key* (Symbol):: *Value*
         
     | 
| 
      
 63 
     | 
    
         
            +
              # +:env_path+:: (String) The directory of the environment.
         
     | 
| 
      
 64 
     | 
    
         
            +
              # +:conf_files+:: (Array of Strings) Additional configuration files given with the +--conf+ command-line option. Default is +[]+.
         
     | 
| 
      
 65 
     | 
    
         
            +
              # +:debug+:: (true or false) True, if the +-d+ or +--debug+ command-line option was given. Default is false.
         
     | 
| 
      
 66 
     | 
    
         
            +
              # +:verbose+:: (true or false) True, if the +-v+ or +--verbose+ command-line option was given. Default is false.
         
     | 
| 
      
 67 
     | 
    
         
            +
              # +:log_fg+:: (true or false) True, if the +-f+ or +--log-fg+ command-line option was given. Default is false.
         
     | 
| 
      
 68 
     | 
    
         
            +
              # +:trace_js+:: (true or false) True, if the +--trace-js+ command-line option was given. Default is false.
         
     | 
| 
      
 69 
     | 
    
         
            +
              # +:trace_delegate+:: (true or false) True, if the +--trace-delegate+ command-line option was given. Default is false.
         
     | 
| 
      
 70 
     | 
    
         
            +
              # +:port+:: (String or nil) The TCP port number given with the +--port+ command-line option. Default is nil.
         
     | 
| 
      
 71 
     | 
    
         
            +
              # +:addr+:: (String or nil) The TCP bind address given with the +--addr+ command-line option. Default is nil.
         
     | 
| 
      
 72 
     | 
    
         
            +
              # +:server+:: (String or nil) The Rack http server handler given with the +--server+ command-line option. Default is nil.
         
     | 
| 
      
 73 
     | 
    
         
            +
              # +:reset_ses+:: (true or false) True, if the +-r+ or +--reset-sessions+ command-line option was given. Default is false.
         
     | 
| 
      
 74 
     | 
    
         
            +
              # +:autoupdate+:: (true or false) True, if the +-a+ or +--auto-update+ command-line option was given. Default is false.
         
     | 
| 
      
 75 
     | 
    
         
            +
              # +:latency+:: (Number) Amount of milliseconds to sleep in each request given with the +--latency+ command-line option. Default is 0.
         
     | 
| 
      
 76 
     | 
    
         
            +
              # +:say+:: (true or false) True, if the +-S+ or +--say+ command-line option was given. Default is false.
         
     | 
| 
      
 77 
     | 
    
         
            +
              def self.args;    @@argv_parser.args;    end
         
     | 
| 
      
 78 
     | 
    
         
            +
              
         
     | 
| 
      
 79 
     | 
    
         
            +
              # @private  This accessor enables RSence.startable? method, which returns true if a start-type command was given.
         
     | 
| 
      
 80 
     | 
    
         
            +
              def self.startable?; @@argv_parser.startable?; end
         
     | 
| 
      
 81 
     | 
    
         
            +
              
         
     | 
| 
      
 82 
     | 
    
         
            +
              # @return [String] The version of RSence
         
     | 
| 
      
 83 
     | 
    
         
            +
              def self.version; @@argv_parser.version; end
         
     | 
| 
      
 84 
     | 
    
         
            +
              
         
     | 
| 
      
 85 
     | 
    
         
            +
              # @private  This accessor enables RSence.startup method, which starts RSence.
         
     | 
| 
      
 86 
     | 
    
         
            +
              def self.startup
         
     | 
| 
      
 87 
     | 
    
         
            +
                puts "Loading configuration..." if self.args[:verbose]
         
     | 
| 
      
 88 
     | 
    
         
            +
                # Use the default configuration:
         
     | 
| 
      
 89 
     | 
    
         
            +
                require 'conf/default'
         
     | 
| 
      
 90 
     | 
    
         
            +
                @@config = Configuration.new(self.args).config
         
     | 
| 
      
 91 
     | 
    
         
            +
                
         
     | 
| 
      
 92 
     | 
    
         
            +
                # RSence runtime configuration data
         
     | 
| 
      
 93 
     | 
    
         
            +
                # @return [Hash] the active configuration structure as defined by the {file:default_conf default configuration} and overridden by local configuration files.
         
     | 
| 
      
 94 
     | 
    
         
            +
                def self.config
         
     | 
| 
      
 95 
     | 
    
         
            +
                  @@config
         
     | 
| 
      
 96 
     | 
    
         
            +
                end
         
     | 
| 
      
 97 
     | 
    
         
            +
                
         
     | 
| 
      
 98 
     | 
    
         
            +
                def self.transporter
         
     | 
| 
      
 99 
     | 
    
         
            +
                  @@transporter
         
     | 
| 
      
 100 
     | 
    
         
            +
                end
         
     | 
| 
      
 101 
     | 
    
         
            +
                def self.transporter=(transporter)
         
     | 
| 
      
 102 
     | 
    
         
            +
                  if class_variable_defined?(:'@@transporter')
         
     | 
| 
      
 103 
     | 
    
         
            +
                    warn "WARN: Transporter already set."
         
     | 
| 
      
 104 
     | 
    
         
            +
                    return
         
     | 
| 
      
 105 
     | 
    
         
            +
                  else
         
     | 
| 
      
 106 
     | 
    
         
            +
                    @@transporter = transporter
         
     | 
| 
      
 107 
     | 
    
         
            +
                  end
         
     | 
| 
      
 108 
     | 
    
         
            +
                end
         
     | 
| 
      
 109 
     | 
    
         
            +
                
         
     | 
| 
      
 110 
     | 
    
         
            +
                def self.plugin_manager
         
     | 
| 
      
 111 
     | 
    
         
            +
                  @@plugin_manager
         
     | 
| 
      
 112 
     | 
    
         
            +
                end
         
     | 
| 
      
 113 
     | 
    
         
            +
                def self.plugin_manager=(plugin_manager)
         
     | 
| 
      
 114 
     | 
    
         
            +
                  if class_variable_defined?(:'@@plugin_manager')
         
     | 
| 
      
 115 
     | 
    
         
            +
                    warn "WARN: @@plugin_manager already set."
         
     | 
| 
      
 116 
     | 
    
         
            +
                    return
         
     | 
| 
      
 117 
     | 
    
         
            +
                  else
         
     | 
| 
      
 118 
     | 
    
         
            +
                    @@plugin_manager = plugin_manager
         
     | 
| 
      
 119 
     | 
    
         
            +
                  end
         
     | 
| 
      
 120 
     | 
    
         
            +
                end
         
     | 
| 
      
 121 
     | 
    
         
            +
                
         
     | 
| 
      
 122 
     | 
    
         
            +
                def self.value_manager
         
     | 
| 
      
 123 
     | 
    
         
            +
                  @@value_manager
         
     | 
| 
      
 124 
     | 
    
         
            +
                end
         
     | 
| 
      
 125 
     | 
    
         
            +
                def self.value_manager=(value_manager)
         
     | 
| 
      
 126 
     | 
    
         
            +
                  if class_variable_defined?(:'@@value_manager')
         
     | 
| 
      
 127 
     | 
    
         
            +
                    warn "WARN: @@value_manager already set."
         
     | 
| 
      
 128 
     | 
    
         
            +
                    return
         
     | 
| 
      
 129 
     | 
    
         
            +
                  else
         
     | 
| 
      
 130 
     | 
    
         
            +
                    @@value_manager = value_manager
         
     | 
| 
      
 131 
     | 
    
         
            +
                  end
         
     | 
| 
      
 132 
     | 
    
         
            +
                end
         
     | 
| 
      
 133 
     | 
    
         
            +
                
         
     | 
| 
      
 134 
     | 
    
         
            +
                def self.session_manager
         
     | 
| 
      
 135 
     | 
    
         
            +
                  @@session_manager
         
     | 
| 
      
 136 
     | 
    
         
            +
                end
         
     | 
| 
      
 137 
     | 
    
         
            +
                def self.session_manager=(session_manager)
         
     | 
| 
      
 138 
     | 
    
         
            +
                  if class_variable_defined?(:'@@session_manager')
         
     | 
| 
      
 139 
     | 
    
         
            +
                    warn "WARN: @@session_manager already set."
         
     | 
| 
      
 140 
     | 
    
         
            +
                    return
         
     | 
| 
      
 141 
     | 
    
         
            +
                  else
         
     | 
| 
      
 142 
     | 
    
         
            +
                    @@session_manager = session_manager
         
     | 
| 
      
 143 
     | 
    
         
            +
                  end
         
     | 
| 
      
 144 
     | 
    
         
            +
                end
         
     | 
| 
      
 145 
     | 
    
         
            +
                
         
     | 
| 
      
 146 
     | 
    
         
            +
                ## Riassence Daemon controls
         
     | 
| 
      
 147 
     | 
    
         
            +
                require 'daemon/daemon'
         
     | 
| 
      
 148 
     | 
    
         
            +
                puts "Starting RSence..." if self.args[:verbose]
         
     | 
| 
      
 149 
     | 
    
         
            +
                daemon = HTTPDaemon.new
         
     | 
| 
      
 150 
     | 
    
         
            +
                daemon.daemonize!
         
     | 
| 
      
 151 
     | 
    
         
            +
              end
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
              
         
     | 
| 
      
 154 
     | 
    
         
            +
              # Includes the Signal Communication utility.
         
     | 
| 
      
 155 
     | 
    
         
            +
              # Used to respond via special PID files in the run directory of the environment
         
     | 
| 
      
 156 
     | 
    
         
            +
              require 'daemon/sigcomm'
         
     | 
| 
       29 
157 
     | 
    
         | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
      
 158 
     | 
    
         
            +
             
     | 
| 
      
 159 
     | 
    
         
            +
              # Requires the ARGVParser that functions as the command-line user interface.
         
     | 
| 
      
 160 
     | 
    
         
            +
              require 'conf/argv'
         
     | 
| 
      
 161 
     | 
    
         
            +
              
         
     | 
| 
      
 162 
     | 
    
         
            +
            end
         
     | 
| 
       32 
163 
     | 
    
         | 
| 
         @@ -55,9 +55,9 @@ class ClientPkgPlugin < Servlet 
     | 
|
| 
       55 
55 
     | 
    
         
             
              end
         
     | 
| 
       56 
56 
     | 
    
         | 
| 
       57 
57 
     | 
    
         
             
              def rebuild_client
         
     | 
| 
       58 
     | 
    
         
            -
                 
     | 
| 
       59 
     | 
    
         
            -
                  puts "build busy, sleeping.."
         
     | 
| 
       60 
     | 
    
         
            -
                  sleep 0. 
     | 
| 
      
 58 
     | 
    
         
            +
                while @build_busy
         
     | 
| 
      
 59 
     | 
    
         
            +
                  puts "-- build busy, sleeping.. --"
         
     | 
| 
      
 60 
     | 
    
         
            +
                  sleep 0.1
         
     | 
| 
       61 
61 
     | 
    
         
             
                end
         
     | 
| 
       62 
62 
     | 
    
         
             
                @build_busy = true
         
     | 
| 
       63 
63 
     | 
    
         
             
                @last_change = Time.now.to_i
         
     | 
| 
         @@ -68,6 +68,10 @@ class ClientPkgPlugin < Servlet 
     | 
|
| 
       68 
68 
     | 
    
         
             
                @build_busy = false
         
     | 
| 
       69 
69 
     | 
    
         
             
              end
         
     | 
| 
       70 
70 
     | 
    
         | 
| 
      
 71 
     | 
    
         
            +
              def ready?
         
     | 
| 
      
 72 
     | 
    
         
            +
                return (not @build_busy)
         
     | 
| 
      
 73 
     | 
    
         
            +
              end
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
       71 
75 
     | 
    
         
             
              def open
         
     | 
| 
       72 
76 
     | 
    
         
             
                if not @thr and RSence.args[:autoupdate]
         
     | 
| 
       73 
77 
     | 
    
         
             
                  @thr = Thread.new do
         
     | 
| 
         @@ -307,7 +307,8 @@ class ClientPkgBuild 
     | 
|
| 
       307 
307 
     | 
    
         
             
                end
         
     | 
| 
       308 
308 
     | 
    
         
             
                @bundles_found = {} # populated by add_bundle
         
     | 
| 
       309 
309 
     | 
    
         
             
                @conversion_stats = {} # populated by add_hints
         
     | 
| 
       310 
     | 
    
         
            -
                @src_dirs. 
     | 
| 
      
 310 
     | 
    
         
            +
                src_dirs = @src_dirs.clone
         
     | 
| 
      
 311 
     | 
    
         
            +
                src_dirs.each do | src_dir |
         
     | 
| 
       311 
312 
     | 
    
         
             
                  find_bundles( src_dir )
         
     | 
| 
       312 
313 
     | 
    
         
             
                end
         
     | 
| 
       313 
314 
     | 
    
         
             
                @destination_files = {} # rename to package_products
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rsence-pre
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 103
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 2
         
     | 
| 
       8 
8 
     | 
    
         
             
              - 2
         
     | 
| 
       9 
9 
     | 
    
         
             
              - 0
         
     | 
| 
       10 
     | 
    
         
            -
              -  
     | 
| 
       11 
     | 
    
         
            -
              version: 2.2.0. 
     | 
| 
      
 10 
     | 
    
         
            +
              - 12
         
     | 
| 
      
 11 
     | 
    
         
            +
              version: 2.2.0.12
         
     | 
| 
       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: 2011- 
     | 
| 
      
 19 
     | 
    
         
            +
            date: 2011-07-13 00:00:00 Z
         
     | 
| 
       20 
20 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       22 
22 
     | 
    
         
             
              name: rsence-deps
         
     | 
| 
         @@ -242,22 +242,21 @@ files: 
     | 
|
| 
       242 
242 
     | 
    
         
             
            - js/datetime/calendar/themes/default/calendar.html
         
     | 
| 
       243 
243 
     | 
    
         
             
            - js/datetime/calendar/themes/default/calendar_arrows-ie6.gif
         
     | 
| 
       244 
244 
     | 
    
         
             
            - js/datetime/calendar/themes/default/calendar_arrows.png
         
     | 
| 
      
 245 
     | 
    
         
            +
            - js/datetime/calendar/themes/default/calendar_bg-ie6.gif
         
     | 
| 
      
 246 
     | 
    
         
            +
            - js/datetime/calendar/themes/default/calendar_bg.png
         
     | 
| 
      
 247 
     | 
    
         
            +
            - js/datetime/calendar/themes/default/calendar_parts1-ie6.gif
         
     | 
| 
      
 248 
     | 
    
         
            +
            - js/datetime/calendar/themes/default/calendar_parts1.png
         
     | 
| 
      
 249 
     | 
    
         
            +
            - js/datetime/calendar/themes/default/calendar_parts2-ie6.gif
         
     | 
| 
      
 250 
     | 
    
         
            +
            - js/datetime/calendar/themes/default/calendar_parts2.png
         
     | 
| 
       245 
251 
     | 
    
         
             
            - js/datetime/datetimepicker/datetimepicker.js
         
     | 
| 
       246 
252 
     | 
    
         
             
            - js/datetime/datetimevalue/datetimevalue.js
         
     | 
| 
       247 
     | 
    
         
            -
            - js/datetime/timesheet/old_timesheet.js
         
     | 
| 
       248 
     | 
    
         
            -
            - js/datetime/timesheet/themes/default/old_timesheet.css
         
     | 
| 
       249 
     | 
    
         
            -
            - js/datetime/timesheet/themes/default/old_timesheet.html
         
     | 
| 
       250 
253 
     | 
    
         
             
            - js/datetime/timesheet/themes/default/timesheet.css
         
     | 
| 
       251 
254 
     | 
    
         
             
            - js/datetime/timesheet/themes/default/timesheet.html
         
     | 
| 
       252 
255 
     | 
    
         
             
            - js/datetime/timesheet/timesheet.js
         
     | 
| 
       253 
     | 
    
         
            -
            - js/datetime/timesheet_item/old_timesheet_item.js
         
     | 
| 
       254 
     | 
    
         
            -
            - js/datetime/timesheet_item/themes/default/old_timesheet_item.css
         
     | 
| 
       255 
     | 
    
         
            -
            - js/datetime/timesheet_item/themes/default/old_timesheet_item.html
         
     | 
| 
       256 
256 
     | 
    
         
             
            - js/datetime/timesheet_item/themes/default/timesheet_item.css
         
     | 
| 
       257 
257 
     | 
    
         
             
            - js/datetime/timesheet_item/themes/default/timesheet_item.html
         
     | 
| 
       258 
258 
     | 
    
         
             
            - js/datetime/timesheet_item/themes/default/timesheet_item_icons.png
         
     | 
| 
       259 
259 
     | 
    
         
             
            - js/datetime/timesheet_item/timesheet_item.js
         
     | 
| 
       260 
     | 
    
         
            -
            - js/datetime/timesheet_item_edit/old_timesheet_item_edit.js
         
     | 
| 
       261 
260 
     | 
    
         
             
            - js/datetime/timesheet_item_edit/timesheet_item_edit.js
         
     | 
| 
       262 
261 
     | 
    
         
             
            - js/foundation/application/application.js
         
     | 
| 
       263 
262 
     | 
    
         
             
            - js/foundation/control/control.js
         
     | 
| 
         @@ -354,7 +353,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       354 
353 
     | 
    
         
             
            requirements: []
         
     | 
| 
       355 
354 
     | 
    
         | 
| 
       356 
355 
     | 
    
         
             
            rubyforge_project: rsence-
         
     | 
| 
       357 
     | 
    
         
            -
            rubygems_version: 1.8. 
     | 
| 
      
 356 
     | 
    
         
            +
            rubygems_version: 1.8.5
         
     | 
| 
       358 
357 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       359 
358 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       360 
359 
     | 
    
         
             
            summary: Pre-Release 2.2 version of the RSence framework.
         
     | 
| 
         @@ -1,292 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            /*   RSence
         
     | 
| 
       2 
     | 
    
         
            -
             *   Copyright 2009 Riassence Inc.
         
     | 
| 
       3 
     | 
    
         
            -
             *   http://riassence.com/
         
     | 
| 
       4 
     | 
    
         
            -
             *
         
     | 
| 
       5 
     | 
    
         
            -
             *   You should have received a copy of the GNU General Public License along
         
     | 
| 
       6 
     | 
    
         
            -
             *   with this software package. If not, contact licensing@riassence.com
         
     | 
| 
       7 
     | 
    
         
            -
             */
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            /*** = Description
         
     | 
| 
       10 
     | 
    
         
            -
              ** HTimesheet is a simple timesheet control. 
         
     | 
| 
       11 
     | 
    
         
            -
              ***/
         
     | 
| 
       12 
     | 
    
         
            -
            var//RSence.DateTime
         
     | 
| 
       13 
     | 
    
         
            -
            HTimeSheet = HControl.extend({
         
     | 
| 
       14 
     | 
    
         
            -
              
         
     | 
| 
       15 
     | 
    
         
            -
              componentName: 'timesheet',
         
     | 
| 
       16 
     | 
    
         
            -
              
         
     | 
| 
       17 
     | 
    
         
            -
              /* Default amount of pixels per hour. Override with options when necessary. */
         
     | 
| 
       18 
     | 
    
         
            -
              pxPerHour: 24,
         
     | 
| 
       19 
     | 
    
         
            -
              
         
     | 
| 
       20 
     | 
    
         
            -
              /* Default amount of pixels from left. Override with options when necessary. */
         
     | 
| 
       21 
     | 
    
         
            -
              itemOffsetLeft: 36,
         
     | 
| 
       22 
     | 
    
         
            -
              
         
     | 
| 
       23 
     | 
    
         
            -
              /* Default amount of pixels from right. Override with options when necessary. */
         
     | 
| 
       24 
     | 
    
         
            -
              itemOffsetRight: 0,
         
     | 
| 
       25 
     | 
    
         
            -
              
         
     | 
| 
       26 
     | 
    
         
            -
              defaultEvents: {
         
     | 
| 
       27 
     | 
    
         
            -
                draggable: true
         
     | 
| 
       28 
     | 
    
         
            -
              },
         
     | 
| 
       29 
     | 
    
         
            -
              
         
     | 
| 
       30 
     | 
    
         
            -
              controlDefaults: HControlDefaults.extend({
         
     | 
| 
       31 
     | 
    
         
            -
                pxPerHour: null,
         
     | 
| 
       32 
     | 
    
         
            -
                itemOffsetLeft: null,
         
     | 
| 
       33 
     | 
    
         
            -
                itemOffsetRight: null,
         
     | 
| 
       34 
     | 
    
         
            -
                itemMinHeight: 24,
         
     | 
| 
       35 
     | 
    
         
            -
                newItemLabel: 'New Item',
         
     | 
| 
       36 
     | 
    
         
            -
                constructor: function(_ctrl){
         
     | 
| 
       37 
     | 
    
         
            -
                  if(this.pxPerHour !== null){
         
     | 
| 
       38 
     | 
    
         
            -
                    _ctrl.pxPerHour = this.pxPerHour;
         
     | 
| 
       39 
     | 
    
         
            -
                  }
         
     | 
| 
       40 
     | 
    
         
            -
                  if(this.itemOffsetLeft !== null){
         
     | 
| 
       41 
     | 
    
         
            -
                    _ctrl.itemOffsetLeft = this.itemOffsetLeft;
         
     | 
| 
       42 
     | 
    
         
            -
                  }
         
     | 
| 
       43 
     | 
    
         
            -
                  if(this.itemOffsetRight !== null){
         
     | 
| 
       44 
     | 
    
         
            -
                    _ctrl.itemOffsetRight = this.itemOffsetRight;
         
     | 
| 
       45 
     | 
    
         
            -
                  }
         
     | 
| 
       46 
     | 
    
         
            -
                }
         
     | 
| 
       47 
     | 
    
         
            -
              }),
         
     | 
| 
       48 
     | 
    
         
            -
              
         
     | 
| 
       49 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       50 
     | 
    
         
            -
              * Redraws the timesheet.
         
     | 
| 
       51 
     | 
    
         
            -
              *
         
     | 
| 
       52 
     | 
    
         
            -
              **/
         
     | 
| 
       53 
     | 
    
         
            -
              refresh: function(){
         
     | 
| 
       54 
     | 
    
         
            -
                if(this.drawn){
         
     | 
| 
       55 
     | 
    
         
            -
                  var _areaHeight = this.rect.height;
         
     | 
| 
       56 
     | 
    
         
            -
                  this.pxPerHour = (_areaHeight-(_areaHeight%48)) / 24;
         
     | 
| 
       57 
     | 
    
         
            -
                  if(this.options['hideLabel']){
         
     | 
| 
       58 
     | 
    
         
            -
                    this.setStyleOfPart( 'label', 'display', 'none' );
         
     | 
| 
       59 
     | 
    
         
            -
                    this.setStyleOfPart( 'state', 'left', '0px' );
         
     | 
| 
       60 
     | 
    
         
            -
                    this.itemOffsetLeft = 0;
         
     | 
| 
       61 
     | 
    
         
            -
                  }
         
     | 
| 
       62 
     | 
    
         
            -
                  else{
         
     | 
| 
       63 
     | 
    
         
            -
                    this.setStyleOfPart( 'label', 'height', (this.pxPerHour*24)+'px' );
         
     | 
| 
       64 
     | 
    
         
            -
                  }
         
     | 
| 
       65 
     | 
    
         
            -
                  this.setStyleOfPart( 'state', 'height', (this.pxPerHour*24)+'px' );
         
     | 
| 
       66 
     | 
    
         
            -
                }
         
     | 
| 
       67 
     | 
    
         
            -
                this.base();
         
     | 
| 
       68 
     | 
    
         
            -
              },
         
     | 
| 
       69 
     | 
    
         
            -
              
         
     | 
| 
       70 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       71 
     | 
    
         
            -
              * Refreshes the hour labels.
         
     | 
| 
       72 
     | 
    
         
            -
              *
         
     | 
| 
       73 
     | 
    
         
            -
              **/
         
     | 
| 
       74 
     | 
    
         
            -
              refreshLabel: function(){
         
     | 
| 
       75 
     | 
    
         
            -
                var hour = 1,
         
     | 
| 
       76 
     | 
    
         
            -
                    hours = [],
         
     | 
| 
       77 
     | 
    
         
            -
                    rowHeight = this.pxPerHour;
         
     | 
| 
       78 
     | 
    
         
            -
                    lineHeight = Math.round(this.pxPerHour/2);
         
     | 
| 
       79 
     | 
    
         
            -
                for(; hour < 24; hour++){
         
     | 
| 
       80 
     | 
    
         
            -
                  hours.push('<div style="line-height:'+rowHeight+'px;height:'+rowHeight+'px;top:'+Math.round((hour*rowHeight)-lineHeight)+'px" class="timesheet_hours_row">'+hour+':00</div>');
         
     | 
| 
       81 
     | 
    
         
            -
                }
         
     | 
| 
       82 
     | 
    
         
            -
                this.markupElemIds && this.markupElemIds.label && ELEM.setHTML(this.markupElemIds.label,hours.join(''));
         
     | 
| 
       83 
     | 
    
         
            -
                this.refreshState();
         
     | 
| 
       84 
     | 
    
         
            -
              },
         
     | 
| 
       85 
     | 
    
         
            -
              
         
     | 
| 
       86 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       87 
     | 
    
         
            -
              * Refreshes the lines which mark hours and half-hours.
         
     | 
| 
       88 
     | 
    
         
            -
              *
         
     | 
| 
       89 
     | 
    
         
            -
              **/
         
     | 
| 
       90 
     | 
    
         
            -
              refreshState: function(){
         
     | 
| 
       91 
     | 
    
         
            -
                var line = 0,
         
     | 
| 
       92 
     | 
    
         
            -
                    lines = [],
         
     | 
| 
       93 
     | 
    
         
            -
                    lineHeight = Math.round(this.pxPerHour/2);
         
     | 
| 
       94 
     | 
    
         
            -
                for(; line < 48; line++){
         
     | 
| 
       95 
     | 
    
         
            -
                  lines.push('<div style="top:'+(line*lineHeight)+'px" class="timesheet_lines_row'+(line%2)+'"></div>');
         
     | 
| 
       96 
     | 
    
         
            -
                }
         
     | 
| 
       97 
     | 
    
         
            -
                this.markupElemIds && this.markupElemIds.label && ELEM.setHTML(this.markupElemIds.state,lines.join(''));
         
     | 
| 
       98 
     | 
    
         
            -
              },
         
     | 
| 
       99 
     | 
    
         
            -
              dragItem: false,
         
     | 
| 
       100 
     | 
    
         
            -
              
         
     | 
| 
       101 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       102 
     | 
    
         
            -
              * Creates an item into timesheet with default label 'New Item'.
         
     | 
| 
       103 
     | 
    
         
            -
              *
         
     | 
| 
       104 
     | 
    
         
            -
              * = Parameters
         
     | 
| 
       105 
     | 
    
         
            -
              * +origY+:: Y coordinate of the new item.
         
     | 
| 
       106 
     | 
    
         
            -
              *
         
     | 
| 
       107 
     | 
    
         
            -
              **/
         
     | 
| 
       108 
     | 
    
         
            -
              createItem: function(origY){
         
     | 
| 
       109 
     | 
    
         
            -
                var _lineHeight = Math.round(this.pxPerHour/2);
         
     | 
| 
       110 
     | 
    
         
            -
                origY = Math.floor( origY / _lineHeight )*_lineHeight;
         
     | 
| 
       111 
     | 
    
         
            -
                var maxY = _lineHeight*48,
         
     | 
| 
       112 
     | 
    
         
            -
                    lineHeight = Math.round(this.pxPerHour/2);
         
     | 
| 
       113 
     | 
    
         
            -
                if(origY>maxY){
         
     | 
| 
       114 
     | 
    
         
            -
                  origY = maxY;
         
     | 
| 
       115 
     | 
    
         
            -
                }
         
     | 
| 
       116 
     | 
    
         
            -
                this.dragItem = this.createTimeSheetItem( { label: this.options.newItemLabel }, origY, lineHeight, 'create' );
         
     | 
| 
       117 
     | 
    
         
            -
              },
         
     | 
| 
       118 
     | 
    
         
            -
              
         
     | 
| 
       119 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       120 
     | 
    
         
            -
              * Dragging is used to mark items on the timesheet.
         
     | 
| 
       121 
     | 
    
         
            -
              * 
         
     | 
| 
       122 
     | 
    
         
            -
              * = Parameters
         
     | 
| 
       123 
     | 
    
         
            -
              * +x+:: x coordinate of the origin of drag
         
     | 
| 
       124 
     | 
    
         
            -
              * +y+:: y coordinate of the origin of drag
         
     | 
| 
       125 
     | 
    
         
            -
              *
         
     | 
| 
       126 
     | 
    
         
            -
              **/
         
     | 
| 
       127 
     | 
    
         
            -
              startDrag: function(x,y){
         
     | 
| 
       128 
     | 
    
         
            -
                this._startDragTime = new Date().getTime();
         
     | 
| 
       129 
     | 
    
         
            -
                this._startDragCoords = [x,y];
         
     | 
| 
       130 
     | 
    
         
            -
                return true;
         
     | 
| 
       131 
     | 
    
         
            -
              },
         
     | 
| 
       132 
     | 
    
         
            -
              
         
     | 
| 
       133 
     | 
    
         
            -
              drag: function(x,y){
         
     | 
| 
       134 
     | 
    
         
            -
                if(((new Date().getTime()) - this._startDragTime) < 200){
         
     | 
| 
       135 
     | 
    
         
            -
                  // only create when 200 ms has elapsed to enable clicking
         
     | 
| 
       136 
     | 
    
         
            -
                  return true;
         
     | 
| 
       137 
     | 
    
         
            -
                }
         
     | 
| 
       138 
     | 
    
         
            -
                if(this._startDragCoords[0]!==x && this._startDragCoords[1]!==y){
         
     | 
| 
       139 
     | 
    
         
            -
                  this.createItem(this._startDragCoords[1]-this.pageY());
         
     | 
| 
       140 
     | 
    
         
            -
                  EVENT.startDragging( this.dragItem );
         
     | 
| 
       141 
     | 
    
         
            -
                  return true;
         
     | 
| 
       142 
     | 
    
         
            -
                }
         
     | 
| 
       143 
     | 
    
         
            -
              },
         
     | 
| 
       144 
     | 
    
         
            -
              
         
     | 
| 
       145 
     | 
    
         
            -
              click: function(x,y){
         
     | 
| 
       146 
     | 
    
         
            -
                // deactivate all items
         
     | 
| 
       147 
     | 
    
         
            -
                EVENT.changeActiveControl(this);
         
     | 
| 
       148 
     | 
    
         
            -
                return true;
         
     | 
| 
       149 
     | 
    
         
            -
              },
         
     | 
| 
       150 
     | 
    
         
            -
              
         
     | 
| 
       151 
     | 
    
         
            -
              listItemViews: false,
         
     | 
| 
       152 
     | 
    
         
            -
              
         
     | 
| 
       153 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       154 
     | 
    
         
            -
              * Sets the editor given as parameter as the editor of instance.
         
     | 
| 
       155 
     | 
    
         
            -
              *
         
     | 
| 
       156 
     | 
    
         
            -
              * = Parameters
         
     | 
| 
       157 
     | 
    
         
            -
              * +_editor+:: 
         
     | 
| 
       158 
     | 
    
         
            -
              *
         
     | 
| 
       159 
     | 
    
         
            -
              **/
         
     | 
| 
       160 
     | 
    
         
            -
              setEditor: function( _editor ){
         
     | 
| 
       161 
     | 
    
         
            -
                this.editor = _editor;
         
     | 
| 
       162 
     | 
    
         
            -
              },
         
     | 
| 
       163 
     | 
    
         
            -
              
         
     | 
| 
       164 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       165 
     | 
    
         
            -
              * Returns HRect the size of given parameters and suitable for timesheet.
         
     | 
| 
       166 
     | 
    
         
            -
              *
         
     | 
| 
       167 
     | 
    
         
            -
              * = Parameters
         
     | 
| 
       168 
     | 
    
         
            -
              * +_origY+::      Y coordinate.
         
     | 
| 
       169 
     | 
    
         
            -
              * +_lineHeight+:: The height of item on time sheet.
         
     | 
| 
       170 
     | 
    
         
            -
              *
         
     | 
| 
       171 
     | 
    
         
            -
              **/
         
     | 
| 
       172 
     | 
    
         
            -
              createItemRect: function(_origY, _lineHeight){
         
     | 
| 
       173 
     | 
    
         
            -
                var _left = this.itemOffsetLeft+1,
         
     | 
| 
       174 
     | 
    
         
            -
                    _top = _origY+1,
         
     | 
| 
       175 
     | 
    
         
            -
                    _right = this.rect.width - this.itemOffsetRight - 1,
         
     | 
| 
       176 
     | 
    
         
            -
                    _bottom = _origY + _lineHeight - 2;
         
     | 
| 
       177 
     | 
    
         
            -
                if( (_top - _bottom) < this.options.itemMinHeight ){
         
     | 
| 
       178 
     | 
    
         
            -
                  _bottom = _top + this.options.itemMinHeight;
         
     | 
| 
       179 
     | 
    
         
            -
                }
         
     | 
| 
       180 
     | 
    
         
            -
                return HRect.nu( _left, _top, _right, _bottom );
         
     | 
| 
       181 
     | 
    
         
            -
              },
         
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
       183 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       184 
     | 
    
         
            -
              * Destructor; destroys the editor first and commences inherited die.
         
     | 
| 
       185 
     | 
    
         
            -
              *
         
     | 
| 
       186 
     | 
    
         
            -
              **/
         
     | 
| 
       187 
     | 
    
         
            -
              die: function(){
         
     | 
| 
       188 
     | 
    
         
            -
                this.editor.die();
         
     | 
| 
       189 
     | 
    
         
            -
                this.base();
         
     | 
| 
       190 
     | 
    
         
            -
              },
         
     | 
| 
       191 
     | 
    
         
            -
              
         
     | 
| 
       192 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       193 
     | 
    
         
            -
              * Returns a new time sheet item control. By default returns an instance
         
     | 
| 
       194 
     | 
    
         
            -
              * of HTimeSheetItem. Extend to use custom time sheet controls customized
         
     | 
| 
       195 
     | 
    
         
            -
              * for application specific purposes.
         
     | 
| 
       196 
     | 
    
         
            -
              *
         
     | 
| 
       197 
     | 
    
         
            -
              * = Parameters
         
     | 
| 
       198 
     | 
    
         
            -
              * *_value*::      A value object for the item.
         
     | 
| 
       199 
     | 
    
         
            -
              * *_top*::        Top position, 0 by default.
         
     | 
| 
       200 
     | 
    
         
            -
              * *_height*::     Height, same as half of +#pxPerHour+ by default.
         
     | 
| 
       201 
     | 
    
         
            -
              * *_drogMode*::   Dragging mode. 'normal' or 'create'. Is 'normal' by default.
         
     | 
| 
       202 
     | 
    
         
            -
              *
         
     | 
| 
       203 
     | 
    
         
            -
              **/
         
     | 
| 
       204 
     | 
    
         
            -
              createTimeSheetItem: function( _value, _top, _height, _dragMode ) {
         
     | 
| 
       205 
     | 
    
         
            -
                if(_dragMode===undefined){
         
     | 
| 
       206 
     | 
    
         
            -
                  _dragMode = 'normal';
         
     | 
| 
       207 
     | 
    
         
            -
                }
         
     | 
| 
       208 
     | 
    
         
            -
                if(_top===undefined){
         
     | 
| 
       209 
     | 
    
         
            -
                  _top = 0;
         
     | 
| 
       210 
     | 
    
         
            -
                }
         
     | 
| 
       211 
     | 
    
         
            -
                if(_height===undefined){
         
     | 
| 
       212 
     | 
    
         
            -
                  _height = Math.round(this.pxPerHour/2);
         
     | 
| 
       213 
     | 
    
         
            -
                }
         
     | 
| 
       214 
     | 
    
         
            -
                var
         
     | 
| 
       215 
     | 
    
         
            -
                _label = _value['label'],
         
     | 
| 
       216 
     | 
    
         
            -
                _item = HTimeSheetItem.nu(
         
     | 
| 
       217 
     | 
    
         
            -
                  this.createItemRect( _top, _height ),
         
     | 
| 
       218 
     | 
    
         
            -
                  this, {
         
     | 
| 
       219 
     | 
    
         
            -
                    label: _label,
         
     | 
| 
       220 
     | 
    
         
            -
                    value: _value,
         
     | 
| 
       221 
     | 
    
         
            -
                    events: {
         
     | 
| 
       222 
     | 
    
         
            -
                      draggable: true
         
     | 
| 
       223 
     | 
    
         
            -
                    }
         
     | 
| 
       224 
     | 
    
         
            -
                  }
         
     | 
| 
       225 
     | 
    
         
            -
                );
         
     | 
| 
       226 
     | 
    
         
            -
                _item.dragMode = _dragMode;    
         
     | 
| 
       227 
     | 
    
         
            -
                return _item;
         
     | 
| 
       228 
     | 
    
         
            -
              },
         
     | 
| 
       229 
     | 
    
         
            -
              
         
     | 
| 
       230 
     | 
    
         
            -
            /** = Description
         
     | 
| 
       231 
     | 
    
         
            -
              * Redraws and refreshes the values on timesheet.
         
     | 
| 
       232 
     | 
    
         
            -
              *
         
     | 
| 
       233 
     | 
    
         
            -
              **/
         
     | 
| 
       234 
     | 
    
         
            -
              refreshValue: function(){
         
     | 
| 
       235 
     | 
    
         
            -
                var
         
     | 
| 
       236 
     | 
    
         
            -
                _data = this.value,
         
     | 
| 
       237 
     | 
    
         
            -
                i;
         
     | 
| 
       238 
     | 
    
         
            -
                if(this.listItemViews === false){
         
     | 
| 
       239 
     | 
    
         
            -
                  this.listItemViews = [];
         
     | 
| 
       240 
     | 
    
         
            -
                }
         
     | 
| 
       241 
     | 
    
         
            -
                else if(this.listItemViews.length > 0){
         
     | 
| 
       242 
     | 
    
         
            -
                  for( i=0; i<this.listItemViews.length; i++){
         
     | 
| 
       243 
     | 
    
         
            -
                    this.listItemViews[i].die();
         
     | 
| 
       244 
     | 
    
         
            -
                  }
         
     | 
| 
       245 
     | 
    
         
            -
                  this.listItemViews = [];
         
     | 
| 
       246 
     | 
    
         
            -
                }
         
     | 
| 
       247 
     | 
    
         
            -
                if(_data instanceof Array && _data.length > 0){
         
     | 
| 
       248 
     | 
    
         
            -
                  var
         
     | 
| 
       249 
     | 
    
         
            -
                  _value,
         
     | 
| 
       250 
     | 
    
         
            -
                  _item;
         
     | 
| 
       251 
     | 
    
         
            -
                  for( i=0; i<_data.length; i++){
         
     | 
| 
       252 
     | 
    
         
            -
                    _value = _data[i];
         
     | 
| 
       253 
     | 
    
         
            -
                    _item = this.createTimeSheetItem( _value );
         
     | 
| 
       254 
     | 
    
         
            -
                    this.listItemViews.push( _item );
         
     | 
| 
       255 
     | 
    
         
            -
                  }
         
     | 
| 
       256 
     | 
    
         
            -
                }
         
     | 
| 
       257 
     | 
    
         
            -
                var
         
     | 
| 
       258 
     | 
    
         
            -
                _overlaps = [],
         
     | 
| 
       259 
     | 
    
         
            -
                j;
         
     | 
| 
       260 
     | 
    
         
            -
                for(i=0;i<this.listItemViews.length;i++){
         
     | 
| 
       261 
     | 
    
         
            -
                  for(j=0;j<this.listItemViews.length;j++){
         
     | 
| 
       262 
     | 
    
         
            -
                    if((i !== j) && (_overlaps.indexOf(i)===-1) && (_overlaps.indexOf(j)===-1)){
         
     | 
| 
       263 
     | 
    
         
            -
                      if(this.listItemViews[i].rect.intersects(this.listItemViews[j].rect)){
         
     | 
| 
       264 
     | 
    
         
            -
                        _overlaps.push(i);
         
     | 
| 
       265 
     | 
    
         
            -
                      }
         
     | 
| 
       266 
     | 
    
         
            -
                    }
         
     | 
| 
       267 
     | 
    
         
            -
                  }
         
     | 
| 
       268 
     | 
    
         
            -
                }
         
     | 
| 
       269 
     | 
    
         
            -
                var
         
     | 
| 
       270 
     | 
    
         
            -
                _overlapCount = _overlaps.length+1,
         
     | 
| 
       271 
     | 
    
         
            -
                _overlapLefts = {},
         
     | 
| 
       272 
     | 
    
         
            -
                _itemWidth = ( this.rect.width - this.itemOffsetRight - this.itemOffsetLeft ),
         
     | 
| 
       273 
     | 
    
         
            -
                _width = Math.floor( _itemWidth / _overlapCount),
         
     | 
| 
       274 
     | 
    
         
            -
                _left = this.itemOffsetLeft;
         
     | 
| 
       275 
     | 
    
         
            -
                for(j=0;j<_overlapCount;j++){
         
     | 
| 
       276 
     | 
    
         
            -
                  _overlapLefts[_overlaps[j]] = _left + (j*_width) + _width;
         
     | 
| 
       277 
     | 
    
         
            -
                }
         
     | 
| 
       278 
     | 
    
         
            -
                for(i=0;i<this.listItemViews.length;i++){
         
     | 
| 
       279 
     | 
    
         
            -
                  if(_overlaps.indexOf(i)===-1){
         
     | 
| 
       280 
     | 
    
         
            -
                    this.listItemViews[i].rect.setLeft(_left);
         
     | 
| 
       281 
     | 
    
         
            -
                  }
         
     | 
| 
       282 
     | 
    
         
            -
                  else {
         
     | 
| 
       283 
     | 
    
         
            -
                    this.listItemViews[i].rect.setLeft(_overlapLefts[i]);
         
     | 
| 
       284 
     | 
    
         
            -
                  }
         
     | 
| 
       285 
     | 
    
         
            -
                  this.listItemViews[i].rect.setWidth(_width);
         
     | 
| 
       286 
     | 
    
         
            -
                }
         
     | 
| 
       287 
     | 
    
         
            -
                for(i=0;i<this.listItemViews.length;i++){
         
     | 
| 
       288 
     | 
    
         
            -
                  this.listItemViews[i].drawRect();
         
     | 
| 
       289 
     | 
    
         
            -
                }
         
     | 
| 
       290 
     | 
    
         
            -
              }
         
     | 
| 
       291 
     | 
    
         
            -
            });
         
     | 
| 
       292 
     | 
    
         
            -
             
     | 
| 
         @@ -1,30 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            .timesheet_hours_col {
         
     | 
| 
       2 
     | 
    
         
            -
              position: absolute;
         
     | 
| 
       3 
     | 
    
         
            -
              top: 0px; left: 0px; width: 32px;
         
     | 
| 
       4 
     | 
    
         
            -
              font-family: Arial, sans-serif;
         
     | 
| 
       5 
     | 
    
         
            -
              font-size: 11px;
         
     | 
| 
       6 
     | 
    
         
            -
              color: #666;
         
     | 
| 
       7 
     | 
    
         
            -
              vertical-align: middle;
         
     | 
| 
       8 
     | 
    
         
            -
              text-align: right;
         
     | 
| 
       9 
     | 
    
         
            -
            }
         
     | 
| 
       10 
     | 
    
         
            -
            .timesheet_hours_row {
         
     | 
| 
       11 
     | 
    
         
            -
              position: absolute;
         
     | 
| 
       12 
     | 
    
         
            -
              left: 0px; width: 32px;
         
     | 
| 
       13 
     | 
    
         
            -
            }
         
     | 
| 
       14 
     | 
    
         
            -
            .timesheet_lines_col {
         
     | 
| 
       15 
     | 
    
         
            -
              position: absolute;
         
     | 
| 
       16 
     | 
    
         
            -
              top: 0px; left: 36px; right: 0px;
         
     | 
| 
       17 
     | 
    
         
            -
              border-left: 1px solid #aaa;
         
     | 
| 
       18 
     | 
    
         
            -
              border-bottom: 1px solid #aaa;
         
     | 
| 
       19 
     | 
    
         
            -
              border-right: 1px solid #aaa;
         
     | 
| 
       20 
     | 
    
         
            -
            }
         
     | 
| 
       21 
     | 
    
         
            -
            .timesheet_lines_row0,
         
     | 
| 
       22 
     | 
    
         
            -
            .timesheet_lines_row1 {
         
     | 
| 
       23 
     | 
    
         
            -
              position: absolute;
         
     | 
| 
       24 
     | 
    
         
            -
              left: 0px; right: 0px; height: 1px;
         
     | 
| 
       25 
     | 
    
         
            -
              line-height: 1px; font-size: 0px;
         
     | 
| 
       26 
     | 
    
         
            -
              background-color: #ccc;
         
     | 
| 
       27 
     | 
    
         
            -
            }
         
     | 
| 
       28 
     | 
    
         
            -
            .timesheet_lines_row0 {
         
     | 
| 
       29 
     | 
    
         
            -
              background-color: #aaa;
         
     | 
| 
       30 
     | 
    
         
            -
            }
         
     |