From: Kevin Cernekee <cernekee@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org, "John 'Warthog9' Hawley" <warthog9@eaglescrag.net>
Subject: Re: [PATCH 00/11] gitweb: Change timezone
Date: Mon, 11 Apr 2011 18:19:32 -0700 [thread overview]
Message-ID: <BANLkTik9D6++P1rg+VbvKj9oTFhRYNmrpQ@mail.gmail.com> (raw)
In-Reply-To: <1302389366-21515-1-git-send-email-jnareb@gmail.com>
On Sat, Apr 9, 2011 at 3:49 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> This is split version (with assorted cleanups) of J.H. patch adding
> JavaScript-base ability to change timezone in which dates are
> displayed.
Jakub,
Thanks for the update. This UI does seem to work better than the
original "[+]" dropdown interface.
The new code appears to degrade gracefully on IE6 (everything shown in UTC).
Tests on Firefox 3.6.15 looked OK.
Chromium 6.0.472.62 (59676) does not like this operation:
Uncaught Error: NOT_FOUND_ERR: DOM Exception 8
removeChangeTZForm
/gitweb-static/gitweb.js:785
onTZFormChange
line 785: var removed = container.removeChild(container.lastChild);
Opera 10.63 resets target.selectedIndex to 1 after calling
removeChangeTZForm() from onTZFormChange(). Net effect is that you're
always stuck in the "local" zone. Here is a workaround that fixed it
for me:
var target = event.target || event.srcElement;
var selectedIndex = target.selectedIndex;
removeChangeTZForm(documentFragment, target, tzClassName);
var selected = target.options.item(selectedIndex);
Couple other random nitpicks:
> + // server-side of gitweb produces datetime in UTC,
> + // so if tz is 'utc' there is no need for changes
> + var nochange = tz === 'utc';
If I delete my gitweb_tz cookie, then refresh the page:
- All times show up in my browser's local time (good)
- Clicking UTC/GMT on the dropdown has no immediate effect; I need to
refresh the page again to see the times change (bad)
> + my (undef, undef, $datetime_class) =
> + gitweb_get_feature('javascript-timezone');
> + if ($datetime_class) {
> + $strtime = qq!<span class="datetime">$strtime</span>!;
Should this hard-code class "datetime", or use $datetime_class from
the gitweb server configuration?
> +/* JavaScript-base timezone manipulation */
Might want to reword as "JavaScript-based"
> + // refresh cookie, so it expires 7 days from last use of gitweb
> + setCookie(tzCookieName, tzCookie, { expires: 7, path: '/' });
Hmm, only 7 days?
> + * and instals appropriate onclick trigger (via event delegation).
"installs"
next prev parent reply other threads:[~2011-04-12 1:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-09 22:49 [PATCH 00/11] gitweb: Change timezone Jakub Narebski
2011-04-09 22:49 ` [PATCH 01/11] gitweb: Split JavaScript for maintability, combining on build Jakub Narebski
2011-04-09 22:49 ` [PATCH 02/11] gitweb.js: Update and improve comments in JavaScript files Jakub Narebski
2011-04-09 22:49 ` [PATCH/RFC 03/11] gitweb.js: Provide default values for padding in padLeftStr and padLeft Jakub Narebski
2011-04-09 22:49 ` [PATCH 04/11] gitweb.js: Extract and improve datetime handling Jakub Narebski
2011-04-09 22:49 ` [PATCH 05/11] gitweb.js: Introduce gitweb/static/js/lib/cookies.js Jakub Narebski
2011-04-09 22:49 ` [PATCH 06/11] gitweb.js: Provide getElementsByClassName method (if it not exists) Jakub Narebski
2011-04-09 22:49 ` [PATCH 07/11] gitweb: Refactor generating of long dates into format_timestamp_html Jakub Narebski
2011-04-09 22:49 ` [RFC/PATCH 08/11] gitweb: Unify the way long timestamp is displayed Jakub Narebski
2011-04-09 22:49 ` [PATCH 09/11] gitweb: JavaScript ability to adjust time based on timezone Jakub Narebski
2011-04-09 22:49 ` [PATCH/RFC 10/11] gitweb.js: Add UI for selecting common timezone to display dates Jakub Narebski
2011-04-10 9:36 ` Jakub Narebski
2011-04-10 14:39 ` Jakub Narebski
2011-04-10 15:10 ` Jakub Narebski
2011-04-09 22:49 ` [PATCH/RFC 11/11] gitweb: Make JavaScript ability to adjust timezones configurable Jakub Narebski
2011-04-12 1:19 ` Kevin Cernekee [this message]
2011-04-12 12:44 ` [PATCH 00/11] gitweb: Change timezone Jakub Narebski
2011-04-12 13:24 ` [PATCHv2 10/11] gitweb.js: Add UI for selecting common timezone to display dates Jakub Narebski
2011-04-12 13:25 ` [PATCHv2 11/11] gitweb: Make JavaScript ability to adjust timezones configurable Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTik9D6++P1rg+VbvKj9oTFhRYNmrpQ@mail.gmail.com \
--to=cernekee@gmail.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=warthog9@eaglescrag.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).