speedy32129 / time_logger

Redmine Time logger plugin. More than likely there is only going to be one more public release. New version has new time logging with the option of multiple loggers running at the same time, fixes for excessive loggng, and a whole new look.
Other
59 stars 43 forks source link

Static placement for timer controls #11

Closed RazZziel closed 9 years ago

RazZziel commented 9 years ago

It would be awesome to have the timer controls placed statically in a corner of the browser viewport, so that when working on a series of long issues, I don't have to move back and forth between the comments and the timer controls.

tvdeyen commented 9 years ago

I don't think that this has to be provided by this plugin, this has to be provided by your theme IMO. This plugin just hooks into the top navi of redmine, so just making the time logger static wouldn't solve anything. Make the whole header static is more useful I think. And that's done in your skin:

div#header {
  margin-top: 32px;
}

div#top-menu {
  position: fixed;
  z-index: 1;
  width: 100%;
  left: 0;
  top: 0;
}

I am using the Circle theme, so your values may vary.

RazZziel commented 9 years ago

Hi, sorry for the delay!

Making the whole navigation bar static makes sense, but in my head I pictured moving only the timer, regardless of the navigation bar, because at least for me there's little value in having the rest of the elements of the bar always available, but there's a lot of value in having the timer always visible.

However modifying the theme looks easy enough so I'll give it a try.

RazZziel commented 9 years ago

In the end I managed what I needed in a very quick 'n' dirty way:

diff --git a/assets/stylesheets/time_logger.css b/assets/stylesheets/time_logger.css
index 46db6bd..4c850d9 100644
--- a/assets/stylesheets/time_logger.css
+++ b/assets/stylesheets/time_logger.css
@@ -19,7 +19,7 @@
 .icon-stop-action { background-image: url(../images/stop.png); }
 .icon-list-action { background-image: url(../images/list.png); }

-#time-logger-menu { margin-right: 8px; }
+#time-logger-menu { position:fixed; bottom:0px; right:8px; background:black; padding:1em; }
 #time-logger-menu a { margin-right: 0px; }
 #time-logger-menu .icon { padding-left: 20px; }
speedy32129 commented 9 years ago

I did add your suggestion and end users can comment out my method to implement yours. I'm hoping in the next version it will be part of the configuration.

Thanks!