From 7a2c83f5bce4b740d8b36e7bda27733185d54e68 Mon Sep 17 00:00:00 2001
From: holan20180123 <56391770@qq.com>
Date: Thu, 18 Mar 2021 09:02:48 +0800
Subject: [PATCH] * Finish task #36760.
---
module/block/control.php | 3 +-
module/my/js/doc.js | 19 ++++++++++
module/my/view/doc.html.php | 73 +++++++++++++++++++++++++++++++++++++
3 files changed, 94 insertions(+), 1 deletion(-)
create mode 100644 module/my/js/doc.js
create mode 100644 module/my/view/doc.html.php
diff --git a/module/block/control.php b/module/block/control.php
index 8388eca3f7..97b8c240ed 100644
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -1687,7 +1687,8 @@ class block extends control
$stmt = $this->dao->select('*')->from(TABLE_TODO)
->where("(assignedTo = '{$this->app->user->account}' or (account='{$this->app->user->account}'))")
->andWhere('cycle')->eq(0)
- ->orderBy('`date`');
+ ->andWhere('status')->eq('wait')
+ ->orderBy('`date` desc');
if(isset($params->todoNum)) $stmt->limit($params->todoNum);
$todos = $stmt->fetchAll();
diff --git a/module/my/js/doc.js b/module/my/js/doc.js
new file mode 100644
index 0000000000..ef9e5db6f3
--- /dev/null
+++ b/module/my/js/doc.js
@@ -0,0 +1,19 @@
+$('.ajaxCollect').click(function (event) {
+ var obj = $(this);
+ var url = obj.data('url');
+ $.get(url, function(response)
+ {
+ if(response.status == 'yes')
+ {
+ obj.children('i').removeClass().addClass('icon icon-star text-yellow');
+ obj.parent().prev().children('.file-name').children('i').remove('.icon');
+ obj.parent().prev().children('.file-name').prepend(' ');
+ }
+ else
+ {
+ obj.children('i').removeClass().addClass('icon icon-star-empty');
+ obj.parent().prev().children('.file-name').children('i').remove(".icon");
+ }
+ }, 'json');
+ return false;
+});
diff --git a/module/my/view/doc.html.php b/module/my/view/doc.html.php
new file mode 100644
index 0000000000..b584afeabd
--- /dev/null
+++ b/module/my/view/doc.html.php
@@ -0,0 +1,73 @@
+
+ * @package my
+ * @version $Id
+ * @link http://www.zentao.net
+ */
+?>
+
+
+
+
+ {$pager->recTotal}";
+ echo html::a(inlink($app->rawMethod, "mode=doc&type=openedbyme"), "{$lang->doc->openedByMe}" . ($type == 'openedbyme' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'openedbyme' ? ' btn-active-text' : '') . "'");
+ echo html::a(inlink($app->rawMethod, "mode=doc&type=editedbyme"), "{$lang->doc->editedByMe}" . ($type == 'editedbyme' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'editedbyme' ? ' btn-active-text' : '') . "'");
+ ?>
+
+
+