aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php
index e735f5b2f..42d9db19a 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -1042,3 +1042,36 @@ function widget_forums($arr) {
}
+
+function widget_tasklist($arr) {
+
+
+ require_once('include/event.php');
+ $o .= '<script>var tasksShowAll = 0; $(document).ready(function() { tasksFetch(); $("#tasklist-new-form").submit(function(event) { event.preventDefault(); $.post( "tasks/new", $("#tasklist-new-form").serialize(), function(data) { tasksFetch(); $("#tasklist-new-summary").val(""); } ); return false; } )});</script>';
+ $o .= '<script>function taskComplete(id) { $.post("tasks/complete/"+id, function(data) { tasksFetch();}); }
+ function tasksFetch() {
+ $.get("tasks/fetch" + ((tasksShowAll) ? "/all" : ""), function(data) {
+ $(".tasklist-tasks").html(data.html);
+ });
+ }
+ </script>';
+
+ $o .= '<div class="widget">' . '<h3>' . t('Tasks') . '</h3><div class="tasklist-tasks">';
+ $o .= '</div><form id="tasklist-new-form" action="" ><input id="tasklist-new-summary" type="text" name="summary" value="" /></form>';
+ $o .= '</div>';
+ return $o;
+
+}
+
+
+function widget_helpindex($arr) {
+ $o .= '<div class="widget">' . '<h3>' . t('Documentation') . '</h3>';
+ $o .= '<ul class="nav nav-pills nav-stacked">';
+ $o .= '<li><a href="help/general">' . t('Project/Site Information') . '</a></li>';
+ $o .= '<li><a href="help/members">' . t('For Members') . '</a></li>';
+ $o .= '<li><a href="help/admins">' . t('For Administrators') . '</a></li>';
+ $o .= '<li><a href="help/develop">' . t('For Developers') . '</a></li>';
+ $o .= '</ul></div>';
+ return $o;
+
+} \ No newline at end of file