-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
89 lines (63 loc) · 2.35 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
taskpaper : jQuery feed parser plugin
Copyright (C) 2008 toddb
Dual licensed under the MIT (MIT-license.txt)
and GPL (GPL-license.txt) licenses.
Introduction
============
Taskpaper is a browser version of "Taskpaper" for the mac (http://www.hogbaysoftware.com/products/taskpaper). This project is an exercise to explore jQuery for doing this job using BDD. The current version has bugs on data entry. This is because using content editable elements in the DOM is generally hard. The current version is certainly not production ready but should give an idea on the extent to which we can produce test-first jQuery-based GUI on the browser.
Dependencies
============
* JQuery
Usage
=====
<html>
<head>
<link rel="stylesheet" href="lib/treeview/jquery.treeview.css" />
<link rel="stylesheet" href="css/storyq.treeview.css" />
<link rel="stylesheet" href="css/storyq.screen.css" />
<script src="lib/jquery/jquery.js" type="text/javascript"></script>
<script src="lib/jquery/jquery.cookie.js" type="text/javascript"></script>
<script src="jquery.taskpaper.js" type="text/javascript"></script>
</head>
<body>
<div id="tree">
<script type="text/javascript">
$(function() {
$('#tree').taskpaper({
url: 'my.taskpaper'
});
});
</body>
</html>
jQuery.taskpaper(options);
options:
* url: the feed URL (required).
* data: the jQuery DOM selector id.
* load: a pre-processing callback function that can be overridden for populating the tree (object -> list).
* tagsControl: the element that the tags list is populated int
* success: a function to be called if the request succeeds.
The function gets passed one argument: the taskpaper object.
Example:
$('#tree).taskpaper({
url: 'results.taskpaper',
success: function(feed) {
alert(feed.version);
}
});
Basic structure of object as hierarchical tree:
project > tasks >
> notes > tags
Compared to taskpaper representation
project:
- tasks @tags
notes
Taskpaper properties
================
* feed.version
* feed.items: an array of Projects
Taskpaper properties
====================
* item.type: project, task, note, tag
* item.text
* item.items: an array of children
Please see the provided examples and units/spec tests for more information. Run from /test-src.html