# config

name: css
value:
  /* General settings for the entire page */
  body {
    margin: 0ex 1ex;
    padding: 0px;
    background-color: white;
    font-family: sans-serif;
  }

  /* The project logo in the upper left-hand corner of each page */
  div.logo {
    display: table-cell;
    text-align: center;
    vertical-align: bottom;
    font-weight: bold;
    color: #558195;
    min-width: 200px;
    white-space: nowrap;
  }

  /* The page title centered at the top of each page */
  div.title {
    display: table-cell;
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    padding: 0 0 0 1em;
    color: #558195;
    vertical-align: bottom;
    width: 100%;
  }

  /* The login status message in the top right-hand corner */
  div.status {
    display: table-cell;
    text-align: right;
    vertical-align: bottom;
    color: #558195;
    font-size: 0.8em;
    font-weight: bold;
    min-width: 200px;
    white-space: nowrap;
  }

  /* The header across the top of the page */
  div.header {
    display: table;
    width: 100%;
  }

  /* The main menu bar that appears at the top of the page beneath
  ** the header */
  div.mainmenu {
    padding: 5px 10px 5px 10px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    letter-spacing: 1px;
    background-color: #558195;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    color: white;
  }

  /* The submenu bar that *sometimes* appears below the main menu */
  div.submenu, div.sectionmenu {
    padding: 3px 10px 3px 0px;
    font-size: 0.9em;
    text-align: center;
    background-color: #456878;
    color: white;
  }
  div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
  div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
    padding: 3px 10px 3px 10px;
    color: white;
    text-decoration: none;
  }
  div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
    color: #558195;
    background-color: white;
  }

  /* All page content from the bottom of the menu or submenu down to
  ** the footer */
  div.content {
    padding: 0ex 1ex 1ex 1ex;
    border: solid #aaa;
    border-width: 1px;
  }

  /* Some pages have section dividers */
  div.section {
    margin-bottom: 0px;
    margin-top: 1em;
    padding: 1px 1px 1px 1px;
    font-size: 1.2em;
    font-weight: bold;
    background-color: #558195;
    color: white;
    white-space: nowrap;
  }

  /* The "Date" that occurs on the left hand side of timelines */
  div.divider {
    background: #a1c4d4;
    border: 2px #558195 solid;
    font-size: 1em; font-weight: normal;
    padding: .25em;
    margin: .2em 0 .2em 0;
    float: left;
    clear: left;
    white-space: nowrap;
  }

  /* The footer at the very bottom of the page */
  div.footer {
    clear: both;
    font-size: 0.8em;
    padding: 5px 10px 5px 10px;
    text-align: right;
    background-color: #558195;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    color: white;
  }

  /* Hyperlink colors in the footer */
  div.footer a { color: white; }
  div.footer a:link { color: white; }
  div.footer a:visited { color: white; }
  div.footer a:hover { background-color: white; color: #558195; }

  /* verbatim blocks */
  pre.verbatim {
     background-color: #f5f5f5;
     padding: 0.5em;
  }

  /* The label/value pairs on (for example) the ci page */
  table.label-value th {
    vertical-align: top;
    text-align: right;
    padding: 0.2ex 2ex;
  }


name: header
value:
  <html>
  <head>
  <base href="$baseurl/$current_page" />
  <title>$<project_name>: $<title></title>
  <link rel="alternate" type="application/rss+xml" title="RSS Feed"
        href="$home/timeline.rss" />
  <link rel="stylesheet" href="$home/style.css?enhanced" type="text/css"
        media="screen" />
  </head>
  <body>
  <div class="header">
    <div class="logo">
      <th1>
      proc getLogoUrl { baseurl } {
        set idx(first) [string first // $baseurl]
        if {$idx(first) != -1} {
          set idx(first+1) [expr {$idx(first) + 2}]
          set idx(nextRange) [string range $baseurl $idx(first+1) end]
          set idx(next) [string first / $idx(nextRange)]
          if {$idx(next) != -1} {
            set idx(next) [expr {$idx(next) + $idx(first+1)}]
            set idx(next-1) [expr {$idx(next) - 1}]
            set scheme [string range $baseurl 0 $idx(first)]
            set host [string range $baseurl $idx(first+1) $idx(next-1)]
            if {[string compare $scheme http:/] == 0} {
              set scheme http://
            } else {
              set scheme https://
            }
            set logourl $scheme$host/
          } else {
            set logourl $baseurl
          }
        } else {
          set logourl $baseurl
        }
        return $logourl
      }
      set logourl [getLogoUrl $baseurl]
      </th1>
      <a href="$logourl">
        <img src="$baseurl/logo" border="0" alt="$project_name">
      </a>
    </div>
    <div class="title"><small>$<project_name></small><br />$<title></div>
    <div class="status"><th1>
       if {[info exists login]} {
         puts "Logged in as $login"
       } else {
         puts "Not logged in"
       }
    </th1></div>
  </div>
  <div class="mainmenu">
  <th1>
  html "<a href='$home$index_page'>Home</a>\n"
  if {[anycap jor]} {
    html "<a href='$home/timeline'>Timeline</a>\n"
  }
  if {[hascap oh]} {
    html "<a href='$home/dir?ci=tip'>Files</a>\n"
  }
  if {[hascap o]} {
    html "<a href='$home/brlist'>Branches</a>\n"
    html "<a href='$home/taglist'>Tags</a>\n"
  }
  if {[hascap r]} {
    html "<a href='$home/reportlist'>Tickets</a>\n"
  }
  if {[hascap j]} {
    html "<a href='$home/wiki'>Wiki</a>\n"
  }
  if {[hascap s]} {
    html "<a href='$home/setup'>Admin</a>\n"
  } elseif {[hascap a]} {
    html "<a href='$home/setup_ulist'>Users</a>\n"
  }
  if {[info exists login]} {
    html "<a href='$home/login'>Logout</a>\n"
  } else {
    html "<a href='$home/login'>Login</a>\n"
  }
  </th1></div>


name: footer
value:
  <div class="footer">
    <th1>
    proc getTclVersion {} {
      if {[catch {tclEval info patchlevel} tclVersion] == 0} {
        return "<a href=\"http://www.tcl.tk/\">Tcl</a> version $tclVersion"
      }
      return ""
    }
    proc getVersion { version } {
      set length [string length $version]
      return [string range $version 1 [expr {$length - 2}]]
    }
    set version [getVersion $manifest_version]
    set tclVersion [getTclVersion]
    set fossilUrl http://www.fossil-scm.org
    </th1>
    <a href="$fossilUrl/">Fossil</a>
    version $release_version $tclVersion
    <a href="$fossilUrl/index.html/info/$version">$manifest_version</a>
    <a href="$fossilUrl/fossil/timeline?c=$manifest_date&amp;y=ci">$manifest_date</a>
  </div>
  </body></html>


# reportfmt

title: All Tickets
cols:
  #ffffff Key:
  #f2dcdc Active
  #e8e8e8 Review
  #cfe8bd Fixed
  #bde5d6 Tested
  #cacae5 Deferred
  #c8c8c8 Closed

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    datetime(tkt_mtime) AS 'mtime',
    type,
    status,
    subsystem,
    title
  FROM ticket


# event

type: ci
bgcolor: #fff0c0
user: stever
ecomment:
  initial commit of stever's enhancements 
  including new textarea widget, added stock widget options
  as well as favicon support

comment:
  initial commint of stever's enhancements 
  including new widgets and option
  as well as faviocn support


type: ci
bgcolor: #fff0c0
user: gerald
comment: Broke widgets out into separate files and places pieces into subdirectories.
ecomment:
  Broke widgets out into separate files and places pieces into subdirectories.
  Fixes ticket [9ef22504a1].


type: ci
bgcolor: #fff0c0
user: gerald
comment:
  Corrected implementation of focus command to match that of tk.  Most options "not implemented yet" errors at this time.


type: ci
bgcolor: #fff0c0
user: gerald
comment:
  Changed ensembles to map lower case subcommands to title case commands so that subcommands such as "info" do not interfere with core tcl commands.

  Note -- the definitions in grid.tcl will be overridden by whose in wtk-grid.tcl.  The code in grid.tcl is not yet working.


type: ci
bgcolor: #fff0c0
user: gerald
comment:
  Corrected error messages in focus.

  Made bind command correspond to Tk syntax and raise exceptions for not yet implemented features.


type: ci
bgcolor: #fff0c0
user: gerald
comment:
  Change the procs that handle the ensemble subcommands begin with and upper case to aviod conflicts with built in commands.


type: ci
bgcolor: #fff0c0
user: gerald
comment:
  Added an implementation for the wm protocol command.
  As part of this added private properties to widgets.


type: ci
bgcolor: #fff0c0
user: gerald
comment:
  Added code to store title in the properties.  Also added a catch because "." is not a command currently but just "hacked" in.  Will remove the catch once we switch to widgets being tcloo objects.


type: ci
bgcolor: #fff0c0
user: seandeelywoods
comment:
  Ported code to TclOO. Demos all work. Integrated the Odie package
  to extend TclOO and add extra keywords and to make TclOO more snitlike.


type: ci
bgcolor: #fff0c0
user: seandeelywoods
comment:
  Removed several debugging puts statements

  Fixed some snitizisms I had missed in the canvas implementation.
  Rather than use delegation to re-use the "event_fire" method, I've 
  simply created an object_event_fire method for the canvas to 
  distinguish between widget bindings and canvas object bindings


type: ci
bgcolor: #fff0c0
user: seandeelywoods
comment:
  Added oval, circle, and arc types to the canvas/wtk.js

  Modified the "graft" keyword such that calling the
  method of a graft with no arguments returns the object

  The wtk widget classes now fall back to the traditional
  unknown handler if the first argument does not look like a tkpath


type: ci
bgcolor: #fff0c0
user: seandeelywoods
comment:
  De-snitted a lot of the event handlers

  Added a new "options_dict" method for introspecting options. The
  odie way of handling properties collapsed horribly if there happened
  to be an option named -options (as we see in the combobox...)

  Added "my variable" to methods that were relying on the "variable"
  keyword in the class definition magically working

  Developed a TclOO implementation of traced variable event linking

  Updated to the latest ODIE, which adds mutexes, fixes a few bugs
  with properties, etc. (See odie fossil timeline)


type: t
user: anonymous
brief: Ticket [ae3ca7ab35]: 5 changes
comment:
  Ticket [ae3ca7ab35] <i>Problems running the server.tcl program</i> status still Open with 5 other changes


# ticketchng

login: gwlester
mimetype: text/x-fossil-plain
icomment:
  When running the demo against IE8, the code correctly detects that WebSockets is not supported and logs that it is falling back to AJAX.  The problem is that the page does not then proceed to accept/receive/display the widgets from the server.


login: anonymous
mimetype: text/x-fossil-plain
icomment:
  I tried running the server.tcl program, but it presented a couple of problems.

  Firs tof all: I checked out the source code from the repository today.

  This is what I did:
  I clicked on, respectively, the Hello, World demo. THis led to an internal error.

  I clicked on the demo.tcl script - nothing appeared

  I clicked on the sketch.tcl script - a simple but elegant drawing window appeared, but sketching did not work.

  I copy the output from the server.tcl program below:

  Started wtk demo on http://localhost:9001
  URL: /
  URL: /
  URL: /src.html
  URL: /sapui5.html
  bgerror: Error processing handler for /sapui5.html:
  couldn't open "sapui5.html": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 21)
      invoked from within
  "webhandler handle sock412"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  couldn't open "sapui5.html": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 21)
      invoked from within
  "webhandler handle sock412"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  URL: /demo.tcl
  ::wtk::widgets(.) = id obj0
  URL: /lib/jquery.min.js
  URL: /widgets/wtk.js
  URL: /resources/sap-ui-core.js
  bgerror: Error processing handler for /resources/sap-ui-core.js:
  couldn't open "resources/sap-ui-core.js": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 12)
      invoked from within
  "webhandler handle sock416"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  couldn't open "resources/sap-ui-core.js": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 12)
      invoked from within
  "webhandler handle sock416"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  URL: /resources/sap-ui-core.js
  bgerror: Error processing handler for /resources/sap-ui-core.js:
  couldn't open "resources/sap-ui-core.js": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 12)
      invoked from within
  "webhandler handle sock404"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  couldn't open "resources/sap-ui-core.js": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 12)
      invoked from within
  "webhandler handle sock404"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  URL: /wsctrl
  Socket sock416 upgraded to WebSocket for sessionid 1384162461589
  URL: /sketch.tcl
  URL: /lib/jquery.min.js
  URL: /widgets/wtk.js
  URL: /resources/sap-ui-core.js
  bgerror: Error processing handler for /resources/sap-ui-core.js:
  couldn't open "resources/sap-ui-core.js": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 12)
      invoked from within
  "webhandler handle sock428"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  couldn't open "resources/sap-ui-core.js": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 12)
      invoked from within
  "webhandler handle sock428"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  URL: /resources/sap-ui-core.js
  bgerror: Error processing handler for /resources/sap-ui-core.js:
  couldn't open "resources/sap-ui-core.js": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 12)
      invoked from within
  "webhandler handle sock384"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  couldn't open "resources/sap-ui-core.js": no such file or directory
      while executing
  "open $fn"
      (procedure "filecontents" line 1)
      invoked from within
  "filecontents $url"
      (procedure "webhandler" line 12)
      invoked from within
  "webhandler handle sock384"
      ("uplevel" body line 1)
      invoked from within
  "uplevel #0 $Httpd(responsehandler) handle $sock"
  URL: /wsctrl
  Socket sock428 upgraded to WebSocket for sessionid 1384162461589
  bgerror: invalid command name "<<<<<<<"
  invalid command name "<<<<<<<"
      while executing
  "<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<"
      (procedure "::wtk::fromclient" line 5)
      invoked from within
  "::wtk::fromclient {EVENT obj1 mousemove 67 154 0 }"
      invoked from within
  "[dict get $::session($sessionid) interp] eval ::wtk::fromclient [list $cmd]"
      (procedure "ws_receive" line 29)
      invoked from within
  "ws_receive junk sock428"


login: anonymous
mimetype: text/x-fossil-plain
icomment:
  I repaired the code that was mangled by the merge conflict. 

  The sketch demo does work - it was a bit slow in reacting, but I can only draw lines, not rectangles etc. it seems.


