Implemented the "History" link in index.html.
@@ -67,8 +67,12 @@ | ||
67 | 67 | </lift:snippet> |
68 | 68 | </div> |
69 | 69 | |
70 | +<div id="history-dialog" title="History"> | |
71 | + <div id="history-body"></div> | |
72 | +</div> | |
70 | 73 | |
71 | 74 | <script type="text/javascript"> |
75 | +//<![CDATA[ | |
72 | 76 | $(function(){ |
73 | 77 | $('#add-dialog').dialog({ |
74 | 78 | autoOpen: false, |
@@ -80,6 +84,12 @@ | ||
80 | 84 | modal: true, |
81 | 85 | width: 600, |
82 | 86 | }); |
87 | + $('#history-dialog').dialog({ | |
88 | + autoOpen: false, | |
89 | + modal: true, | |
90 | + width: 600, | |
91 | + height: 400 | |
92 | + }); | |
83 | 93 | }); |
84 | 94 | |
85 | 95 | function openAddDialog(){ |
@@ -98,6 +108,24 @@ | ||
98 | 108 | function confirmRemove(id){ |
99 | 109 | var dir = $('#directory_' + id).text(); |
100 | 110 | return confirm('Removes ' + dir + ', OK?'); |
101 | -} | |
111 | +} | |
112 | + | |
113 | +function openHistoryDialog(root){ | |
114 | + $('#history-dialog').dialog('open'); | |
115 | + showHistory(root); | |
116 | +} | |
117 | + | |
118 | +function showHistory(root){ | |
119 | + $('#history-body').html('<img src="images/ajax-indicator.gif"/> Now Loading...'); | |
120 | + $.ajax({ | |
121 | + url: 'history.html', | |
122 | + cache: false, | |
123 | + data: ({'root': root}), | |
124 | + success: function(html){ | |
125 | + $('#history-body').html(html); | |
126 | + } | |
127 | + }); | |
128 | +} | |
129 | +//]]> | |
102 | 130 | </script> |
103 | 131 | </lift:surround> |