diff options
author | John 'Warthog9' Hawley <warthog9@eaglescrag.net> | 2011-04-28 21:04:10 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-24 11:22:45 -0700 |
commit | 2ae8da2552f43802476676bb86b037e9028b7a7c (patch) | |
tree | 7601b996a962534129e32f0ed0d497f589bad474 /gitweb/static/gitweb.css | |
parent | 291e52bd19877dc8fdd77079ba4c4326f114c461 (diff) | |
download | git-2ae8da2552f43802476676bb86b037e9028b7a7c.tar.gz |
gitweb.js: Add UI for selecting common timezone to display dates
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 <cernekee@gmail.com>
Signed-off-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/static/gitweb.css')
-rw-r--r-- | gitweb/static/gitweb.css | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css index 79d7eebba7..8dd093563e 100644 --- a/gitweb/static/gitweb.css +++ b/gitweb/static/gitweb.css @@ -579,6 +579,39 @@ div.remote { display: inline-block; } +/* JavaScript-based timezone manipulation */ + +.popup { /* timezone selection UI */ + position: absolute; + /* "top: 0; right: 0;" would be better, if not for bugs in browsers */ + top: 0; left: 0; + border: 1px solid; + padding: 2px; + background-color: #f0f0f0; + font-style: normal; + color: #000000; + cursor: auto; +} + +.close-button { /* close timezone selection UI without selecting */ + /* float doesn't work within absolutely positioned container, + * if width of container is not set explicitly */ + /* float: right; */ + position: absolute; + top: 0px; right: 0px; + border: 1px solid green; + margin: 1px 1px 1px 1px; + padding-bottom: 2px; + width: 12px; + height: 10px; + font-size: 9px; + font-weight: bold; + text-align: center; + background-color: #fff0f0; + cursor: pointer; +} + + /* Style definition generated by highlight 2.4.5, http://www.andre-simon.de/ */ /* Highlighting theme definition: */ |