<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/gitweb/static, branch v1.7.6.3</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.6.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.6.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2011-05-26T17:31:57Z</updated>
<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>
<entry>
<title>gitweb.js: Introduce code to handle cookies from JavaScript</title>
<updated>2011-05-24T18:22:44Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-04-28T19:04:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=fcce886bfb4671c4c17a3f99cb7caf0f7ab94e16'/>
<id>urn:sha1:fcce886bfb4671c4c17a3f99cb7caf0f7ab94e16</id>
<content type='text'>
Introduced gitweb/static/js/cookies.js file provides functions for
setting, getting and deleting cookies.

Code taken from subsection "Cookies in JavaScript" of "Professional
JavaScript for Web Developers" by Nicholas C. Zakas and from cookie
plugin for jQuery (dual licensed under the MIT and GPL licenses).

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: Extract and improve datetime handling</title>
<updated>2011-05-24T18:22:44Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-04-28T19:04:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=54b1479a770b240d71bbd000fb40e470987bac59'/>
<id>urn:sha1:54b1479a770b240d71bbd000fb40e470987bac59</id>
<content type='text'>
Move formatDateISOLocal(epoch, timezone) function (and also helper
timezoneOffset(timezoneInfo) function it requires) from common-lib.js to
datetime.js

Add new functions:
* localTimezoneOffset - to get browser timezone offset in seconds
* localTimezoneInfo   - to get browser timezone in '(+|-)HHMM' format
* formatTimezoneInfo - turn offset in hours and minutes into '(+|-)HHMM'
* parseRFC2822Date - to parse RFC-2822 dates that gitweb uses into epoch
* formatDateRFC2882 - like formatDateISOLocal, only RFC-2822 format

All those functions are meant to be used in future commit
'gitweb: javascript ability to adjust time based on timezone'

An alternative would be to use e.g. Datejs (http://www.datejs.com)
library, or JavaScript framework that has date formatting (perhaps as
a plugin).

While at it escape '-' in character class inside tzRe regexp, as
recommended by JSLint (http://www.jslint.com).

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 default values for padding in padLeftStr and padLeft</title>
<updated>2011-05-24T18:22:44Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-04-28T19:04:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4dfa207eec44e0d8869c4978cf3d9861aaf40091'/>
<id>urn:sha1:4dfa207eec44e0d8869c4978cf3d9861aaf40091</id>
<content type='text'>
This means that one can use padLeft(4, 2) and it would be equivalent
to runing padLeft(4, 2, '0'), and it would return '04' i.e. '4' padded
with '0' to width 2, to be used e.g. in formatting date and time.

This should make those functions easier to use.  Current code doesn't
yet make use of this feature.

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: Update and improve comments in JavaScript files</title>
<updated>2011-05-24T18:22:44Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-04-28T19:04:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e2895de4d8efef52e835731aaaaa9467e2110e62'/>
<id>urn:sha1:e2895de4d8efef52e835731aaaaa9467e2110e62</id>
<content type='text'>
This consists of adding a few extra explanation, fixing descriptions
of functions to match names of parameters in code, adding a few
separators, and fixing spelling -- while at it spell 'neighbor' using
American spelling (and not as 'neighbour').

This is post-split cleanup.

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: Split JavaScript for maintability, combining on build</title>
<updated>2011-05-24T18:22:44Z</updated>
<author>
<name>Jakub Narebski</name>
<email>jnareb@gmail.com</email>
</author>
<published>2011-04-28T19:04:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9a86dd571058a511e60af35206a31017d873e54a'/>
<id>urn:sha1:9a86dd571058a511e60af35206a31017d873e54a</id>
<content type='text'>
Split originally single gitweb.js file into smaller files, each
dealing with single issue / area of responsibility.  This move should
make gitweb's JavaScript code easier to maintain.

For better webapp performance it is recommended[1][2][3] to combine
JavaScript files.  Do it during build time (in gitweb/Makefile), by
straight concatenation of files into gitweb.js file (which is now
ignored as being generated).  This means that there are no changes to
gitweb script itself - it still uses gitweb.js or gitweb.min.js, but
now generated.

[1]: http://developer.yahoo.com/performance/rules.html
     "Minimize HTTP Requests" section
[2]: http://code.google.com/speed/articles/include-scripts-properly.html
     "1. Combine external JavaScript files"
[3]: http://javascript-reference.info/speed-up-your-javascript-load-time.htm
     "Combine Your Files" section.

See also new gitweb/static/js/README file.

Inspired-by-patch-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: Optional grouping of projects by category</title>
<updated>2011-04-29T21:21:48Z</updated>
<author>
<name>Sebastien Cevey</name>
<email>seb@cine7.net</email>
</author>
<published>2011-04-29T17:52:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d940c9015d1a770b4f8ed8e9b38cf3d16f47a6cd'/>
<id>urn:sha1:d940c9015d1a770b4f8ed8e9b38cf3d16f47a6cd</id>
<content type='text'>
This adds the $projects_list_group_categories option which, if enabled,
will result in grouping projects by category on the project list page.
The category is specified for each project by the $GIT_DIR/category file
or the 'gitweb.category' variable in its configuration file. By default,
projects are put in the $project_list_default_category category.

Note:
- Categories are always sorted alphabetically, with projects in
  each category sorted according to the globally selected $order.
- When displaying a subset of all the projects (page limiting), the
  category headers are only displayed for projects present on the page.

The feature is inspired from Sham Chukoury's patch for the XMMS2
gitweb, but has been rewritten for the current gitweb code. The CSS
for categories is inspired from Gustavo Sverzut Barbieri's patch to
group projects by path.

Thanks to Florian Ragwitz for Perl tips.

[jn: Updated to post restructuring projects list generation, fixed bugs,
 added very basic test in t9500 that there are no warnings from Perl.]

Signed-off-by: Sebastien Cevey &lt;seb@cine7.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>
