Timesheet.js
sbstjn.github.io
sbstjn.github.io
[1] https://github.com/sbstjn/timesheet.js/blob/master/source/ja...
edit: Thanks for the downvotes, lesson learned! Never talk about vulnerabilities of a code which is #1 on HN and people will blindly put in production.
edit 2: So here is my new comment: "Awesome library! The fact that users can easily enhance its behaviour by using <script> tags in labels is a great feature!"
I upvoted you because good catch, but winced when I did it because of the downvote whining. :)
This is super awesome advice, and I'm thinking of having a one-off t-shirt made with some sort variation of it.
Generally yes. That said some people seem to either belong on another forum or have somehow managed to collect enough karma to downvote before learning how to behave on HN.
I do like their second edit though...I enjoy having users extend my scripts. 8)
new Timesheet('timesheet-default', 2002, 2013, [
['09/2008', '06/2010',
'<img src="666" onerror="alert(\'injection!!\')">',
'ipsum']
]);
Putting HTML elements in the label property itself certainly looks like it's unintended design-wise, and IMO escaping input should definitely be the responsibility of this library (or, as gildas suggested, it should at the very least be documented).> Do not use these methods to insert strings obtained from untrusted sources such as URL query parameters, cookies, or form inputs. Doing so can introduce cross-site-scripting (XSS) vulnerabilities. Remove or escape any user input before adding content to the document.
To put this in Eric S. Raymond's words:
Release early, release often!
...it's just that code there is compiled from CoffeeScript, concatenated, uglified and so on. Others will have very hard time exploring it.
Nevertheless, thanks for trying.
Angularjs + SVG.
2: And this: http://imgur.com/JfNBd2o
Also Angularjs + SVG.
My first solution is a Gantt style graph where I input tasks I need to do and estimate how long they take. Then I click start on a task, and track the time I spend on it. My job needs me to track in high detail what I work on, so I made this system after getting bored of pen and paper.
The second solution I made was a real Gantt diagram, I used the same knowledge I had from the pervious solution, angularjs and svg, but this time I implemented dependencies between the activities. For the first solution I implemented a very simple scheduler based on the fact that I can't possibly be working on two things at the same time (unless I work during a meeting), but for this second solution I didn't make a scheduler so instead I just specify a start and duration for a task.
Believe it is vanilla JS.
Attribution was added https://github.com/sbstjn/timesheet.js/commit/47871522dc9477... and later removed https://github.com/sbstjn/timesheet.js/commit/40a964d32ec04d...
(end of rant)
Also Haml is cool but it makes your project hard to understand if you do not use haml (like me).
edit:fixed halm->haml, thx :)
According to haml.info:
"Haml is a markup language that’s used to cleanly and simply describe the HTML of any web document without the use of inline code. Haml functions as a replacement for inline page templating systems such as PHP, ASP, and ERB, the templating language used in most Ruby on Rails applications. However, Haml avoids the need for explicitly coding HTML into the template, because it itself is a description of the HTML, with some code to generate dynamic content."
Anyone have a recommendation?
Cubism is hawt for time series data, but there are lots of good options. It's a popular ask.
Just curious. What are some examples of the most interesting uses you've seen from users? Are they mostly using it for tracking work hours during the week etc.?
Prints http://imgur.com/a/eOI39
This is the reason I came back to comment.