<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/gitweb/static, branch v1.7.8.2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.8.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.8.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-10-10T22:56:20Z</updated>
<entry>
<title>Merge branch 'ps/gitweb-js-with-lineno'</title>
<updated>2011-10-10T22:56:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-10T22:56:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=59b32ff338da1bd61b0df60386802cfc2edcb54c'/>
<id>urn:sha1:59b32ff338da1bd61b0df60386802cfc2edcb54c</id>
<content type='text'>
* ps/gitweb-js-with-lineno:
  gitweb: Fix links to lines in blobs when javascript-actions are enabled
</content>
</entry>
<entry>
<title>gitweb: Fix links to lines in blobs when javascript-actions are enabled</title>
<updated>2011-09-27T16:34:37Z</updated>
<author>
<name>Peter Stuge</name>
<email>peter@stuge.se</email>
</author>
<published>2011-09-27T09:51:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2b07ff3ffa04a3d52bb4aec9df9f8b6378e2f2a7'/>
<id>urn:sha1:2b07ff3ffa04a3d52bb4aec9df9f8b6378e2f2a7</id>
<content type='text'>
The fixLinks() function adds 'js=1' to each link that does not already
have 'js' query parameter specified. This is used to signal to gitweb
that the browser can actually do javascript when these links are used.

There are two problems with the existing code:

  1. URIs with fragment and 'js' query parameter, like e.g.

        ...foo?js=0#l199

     were not recognized as having 'js' query parameter already.

  2. The 'js' query parameter, in the form of either '?js=1' or ';js=1'
     was appended at the end of URI, even if it included a fragment
     (had a hash part).  This lead to the incorrect links like this

        ...foo#l199?js=1

     instead of adding query parameter as last part of query, but
     before the fragment part, i.e.

        ...foo?js=1#l199

Signed-off-by: Peter Stuge &lt;peter@stuge.se&gt;
Acked-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jn/gitweb-js-blame' into next</title>
<updated>2011-06-30T00:09:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-06-30T00:09:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=cce347da05fea3c18aeb4f11fa672d0ce7908a13'/>
<id>urn:sha1:cce347da05fea3c18aeb4f11fa672d0ce7908a13</id>
<content type='text'>
* jn/gitweb-js-blame:
  gitweb.js: use setTimeout rather than setInterval in blame_incremental.js
  gitweb.js: No need for loop in blame_incremental's handleResponse()
  gitweb.js: No need for inProgress in blame_incremental.js
</content>
</entry>
<entry>
<title>gitweb.js: use setTimeout rather than setInterval in blame_incremental.js</title>
<updated>2011-05-27T18:00:42Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-05-27T13:50:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=42ab5d40deb6dff37705ce5aa16ac69d859a04e1'/>
<id>urn:sha1:42ab5d40deb6dff37705ce5aa16ac69d859a04e1</id>
<content type='text'>
If there is a possibility that your logic could take longer to execute
than the interval time, it is recommended that you recursively call a
named function using window.setTimeout rather than window.setInterval.

Therefore instead of using setInterval as an alternate way of invoking
handleResponse (because some web browsers call onreadystatechange only
once per each distinct state, and not for each server flush), use
setTimeout and reset it from handleResponse.  As a bonus this allows
us to get rid of timer if it turns out that web browser calls
onreadystatechange on each server flush.

While at it get rid of `xhr' global variable, creating it instead as
local variable in startBlame and passing it as parameter, and of
`pollTimer' global variable, passing it as member of xhr object
(xhr.pollTimer).

Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitweb.js: No need for loop in blame_incremental's handleResponse()</title>
<updated>2011-05-27T18:00:39Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-05-27T13:50:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e8dd0e4063da6d0eecef1a6db99534e41f74b32e'/>
<id>urn:sha1:e8dd0e4063da6d0eecef1a6db99534e41f74b32e</id>
<content type='text'>
JavaScript is single-threaded, so there is no need for protecting
against changes to XMLHttpRequest object behind event handler back.

Therefore there is no need for loop that was here in case `xhr' got
new changes while processing current changes.  This should make code a
bit more clear.

Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitweb.js: No need for inProgress in blame_incremental.js</title>
<updated>2011-05-27T18:00:35Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-05-27T13:49:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4510165934eba7be94dea822e2fb1cfa89e70ca3'/>
<id>urn:sha1:4510165934eba7be94dea822e2fb1cfa89e70ca3</id>
<content type='text'>
JavaScript is single-threaded, so there is no need for protection
against re-entrancy via inProgress variable.

In particular calls to setInterval handler are stacked if handler
doesn't finish before new interrupt (before new interval).  The same
happens with events - they are (hopefully) stacked if even handler
didn't finish work.

Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jn/gitweb-js'</title>
<updated>2011-05-26T17:31:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-05-26T17:31:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a6f3f178bd7ce48f7fe4262a1e5efb3ae6a98a4d'/>
<id>urn:sha1:a6f3f178bd7ce48f7fe4262a1e5efb3ae6a98a4d</id>
<content type='text'>
* jn/gitweb-js:
  gitweb: Make JavaScript ability to adjust timezones configurable
  gitweb.js: Add UI for selecting common timezone to display dates
  gitweb: JavaScript ability to adjust time based on timezone
  gitweb: Unify the way long timestamp is displayed
  gitweb: Refactor generating of long dates into format_timestamp_html
  gitweb.js: Provide getElementsByClassName method (if it not exists)
  gitweb.js: Introduce code to handle cookies from JavaScript
  gitweb.js: Extract and improve datetime handling
  gitweb.js: Provide default values for padding in padLeftStr and padLeft
  gitweb.js: Update and improve comments in JavaScript files
  gitweb: Split JavaScript for maintability, combining on build
</content>
</entry>
<entry>
<title>gitweb.js: Add UI for selecting common timezone to display dates</title>
<updated>2011-05-24T18:22:45Z</updated>
<author>
<name>John 'Warthog9' Hawley</name>
<email>warthog9@eaglescrag.net</email>
</author>
<published>2011-04-28T19:04:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=2ae8da2552f43802476676bb86b037e9028b7a7c'/>
<id>urn:sha1:2ae8da2552f43802476676bb86b037e9028b7a7c</id>
<content type='text'>
This will modify HTML, add CSS rules and add DOM event handlers so
that clicking on any date (the common part, not the localtime part)
will display a drop down menu to choose the timezone to change to.

Currently menu displays only the following timezones:

  utc
  local
  -1200
  -1100
  ...
  +1100
  +1200
  +1300
  +1400

In timezone selection menu each timezone is +1hr to the previous.  The
code is capable of handling fractional timezones, but those have not
been added to the menu.

All changes are saved to a cookie, so page changes and closing /
reopening browser retains the last known timezone setting used.

[jn: Changed from innerHTML to DOM, moved to event delegation for
onclick to trigger menu, added close button and cookie refreshing]

Helped-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Signed-off-by: John 'Warthog9' Hawley &lt;warthog9@eaglescrag.net&gt;
Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitweb: JavaScript ability to adjust time based on timezone</title>
<updated>2011-05-24T18:22:45Z</updated>
<author>
<name>John 'Warthog9' Hawley</name>
<email>warthog9@eaglescrag.net</email>
</author>
<published>2011-04-28T19:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=291e52bd19877dc8fdd77079ba4c4326f114c461'/>
<id>urn:sha1:291e52bd19877dc8fdd77079ba4c4326f114c461</id>
<content type='text'>
This patch is based on Kevin Cernekee's &lt;cernekee@gmail.com&gt;
patch series entitled "gitweb: introduce localtime feature".  While
Kevin's patch changed the server side output so that the timezone
was output from gitweb itself, this has a number of drawbacks, in
particular with respect to gitweb-caching.

This patch takes the same basic goal, display the appropriate times in
a given common timezone, and implements it in JavaScript.  This
requires adding / using a new class, "datetime", to be able to find
elements to be adjusted from JavaScript.  Appropriate dates are
wrapped in a span with this class.

Timezone to be used can be retrieved from "gitweb_tz" cookie, though
currently there is no way to set / manipulate this cookie from gitweb;
this is left for later commit.

Valid timezones, currently, are: "utc", "local" (which means that
timezone is taken from browser), and "+/-ZZZZ" numeric timezone as in
RFC-2822.  Default timezone is "local" (currently not configurable,
left for later commit).

Fallback (should JavaScript not be enabled) is to treat dates as they
have been and display them, only, in UTC.

Pages affected:
* 'summary' view, "last change" field (commit time from latest change)
* 'log' view, author time
* 'commit' and 'commitdiff' views, author/committer time
* 'tag' view, tagger time

Based-on-code-from: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Signed-off-by: John 'Warthog9' Hawley &lt;warthog9@eaglescrag.net&gt;
Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gitweb.js: Provide getElementsByClassName method (if it not exists)</title>
<updated>2011-05-24T18:22:45Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-04-28T19:04:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=1cae3ee70dd9e389a83c494fbc95aa63c01128a1'/>
<id>urn:sha1:1cae3ee70dd9e389a83c494fbc95aa63c01128a1</id>
<content type='text'>
The code is simplified and does not support full specification of
native getElementsByClassName method, but implements just subset that
would be enough for gitweb, supporting only single class name.

Signed-off-by: John 'Warthog9' Hawley &lt;warthog9@eaglescrag.net&gt;
Signed-off-by: Jakub Narebski &lt;jnareb@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
