-
-
-
-
-
- id", $lang->task->create);
- //common::printLink('task', 'import', "project=$project->id", $lang->task->import);
- ?>
-
-
+
+
id&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage"; ?>
@@ -67,7 +57,7 @@
| left;?> |
task->typeList[$task->type];?> |
delay)) echo 'delayed';?>>deadline, 0, 4) > 0) echo $task->deadline;?> |
- status;?> >task->statusList->{$task->status};?> |
+ status;?> >task->statusList[$task->status];?> |
storyID)
@@ -87,4 +77,5 @@
|
+
diff --git a/trunk/module/project/view/taskheader.html.php b/trunk/module/project/view/taskheader.html.php
new file mode 100644
index 0000000000..467b7ada81
--- /dev/null
+++ b/trunk/module/project/view/taskheader.html.php
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ " ; common::printLink('project', 'task', "project=$project->id", $lang->project->listTask); echo '' ;
+ echo "" ; common::printLink('project', 'groupTask', "project=$project->id&groupby=story", $lang->project->groupTaskByStory); echo '' ;
+ echo "" ; common::printLink('project', 'groupTask', "project=$project->id&groupby=status", $lang->project->groupTaskByStatus); echo '' ;
+ echo "" ; common::printLink('project', 'groupTask', "project=$project->id&groupby=pri", $lang->project->groupTaskByPri); echo '' ;
+ echo "" ; common::printLink('project', 'groupTask', "project=$project->id&groupby=owner", $lang->project->groupTaskByOwner); echo '' ;
+ echo ""; common::printLink('project', 'groupTask', "project=$project->id&groupby=estimate",$lang->project->groupTaskByEstimate); echo '' ;
+ echo ""; common::printLink('project', 'groupTask', "project=$project->id&groupby=consumed",$lang->project->groupTaskByConsumed); echo '' ;
+ echo "" ; common::printLink('project', 'groupTask', "project=$project->id&groupby=`left`", $lang->project->groupTaskByLeft); echo '' ;
+ echo "" ; common::printLink('project', 'groupTask', "project=$project->id&groupby=type", $lang->project->groupTaskByType); echo '' ;
+ echo ""; common::printLink('project', 'groupTask', "project=$project->id&groupby=deadline",$lang->project->groupTaskByDeadline); echo '' ;
+ ?>
+
+
id", $lang->task->create); ?>
+
+
diff --git a/trunk/module/task/lang/zh-cn.php b/trunk/module/task/lang/zh-cn.php
index 2c5929a8d5..5d344ed994 100644
--- a/trunk/module/task/lang/zh-cn.php
+++ b/trunk/module/task/lang/zh-cn.php
@@ -45,11 +45,11 @@ $lang->task->status = '任务状态';
$lang->task->desc = '任务描述';
$lang->task->statusCustom = '状态排序';
-$lang->task->statusList->wait = '未开始';
-$lang->task->statusList->doing = '进行中';
-$lang->task->statusList->done = '已完成';
-$lang->task->statusList->cancel = '已取消';
-$lang->task->statusList->delayed = '延期';
+$lang->task->statusList['wait'] = '未开始';
+$lang->task->statusList['doing'] = '进行中';
+$lang->task->statusList['done'] = '已完成';
+$lang->task->statusList['cancel'] = '已取消';
+$lang->task->statusList['delayed'] = '延期';
$lang->task->typeList[''] = '';
$lang->task->typeList['design'] = '设计';
diff --git a/trunk/www/js/jquery/treetable/min.js b/trunk/www/js/jquery/treetable/min.js
new file mode 100644
index 0000000000..25c3b23fb6
--- /dev/null
+++ b/trunk/www/js/jquery/treetable/min.js
@@ -0,0 +1,13 @@
+/* jQuery treeTable Plugin 2.2.3 - http://ludo.cubicphuse.nl/jquery-plugins/treeTable/ */
+(function($){var options;var defaultPaddingLeft;$.fn.treeTable=function(opts){options=$.extend({},$.fn.treeTable.defaults,opts);return this.each(function(){$(this).addClass("treeTable").find("tbody tr").each(function(){if(!options.expandable||$(this)[0].className.search("child-of-")==-1){if(isNaN(defaultPaddingLeft)){defaultPaddingLeft=parseInt($($(this).children("td")[options.treeColumn]).css('padding-left'),10);}
+initialize($(this));}else if(options.initialState=="collapsed"){this.style.display="none";}});});};$.fn.treeTable.defaults={childPrefix:"child-of-",clickableNodeNames:false,expandable:true,indent:19,initialState:"collapsed",treeColumn:0};$.fn.collapse=function(){$(this).addClass("collapsed");childrenOf($(this)).each(function(){if(!$(this).hasClass("collapsed")){$(this).collapse();}
+this.style.display="none";});return this;};$.fn.expand=function(){$(this).removeClass("collapsed").addClass("expanded");childrenOf($(this)).each(function(){initialize($(this));if($(this).is(".expanded.parent")){$(this).expand();}
+$(this).show();});return this;};$.fn.appendBranchTo=function(destination){var node=$(this);var parent=parentOf(node);var ancestorNames=$.map(ancestorsOf($(destination)),function(a){return a.id;});if($.inArray(node[0].id,ancestorNames)==-1&&(!parent||(destination.id!=parent[0].id))&&destination.id!=node[0].id){indent(node,ancestorsOf(node).length*options.indent*-1);if(parent){node.removeClass(options.childPrefix+parent[0].id);}
+node.addClass(options.childPrefix+destination.id);move(node,destination);indent(node,ancestorsOf(node).length*options.indent);}
+return this;};$.fn.reverse=function(){return this.pushStack(this.get().reverse(),arguments);};$.fn.toggleBranch=function(){if($(this).hasClass("collapsed")){$(this).expand();}else{$(this).removeClass("expanded").collapse();}
+return this;};function ancestorsOf(node){var ancestors=[];while(node=parentOf(node)){ancestors[ancestors.length]=node[0];}
+return ancestors;};function childrenOf(node){return $("table.treeTable tbody tr."+options.childPrefix+node[0].id);};function getPaddingLeft(node){var paddingLeft=parseInt(node[0].style.paddingLeft,10);return(isNaN(paddingLeft))?defaultPaddingLeft:paddingLeft;}
+function indent(node,value){var cell=$(node.children("td")[options.treeColumn]);cell[0].style.paddingLeft=getPaddingLeft(cell)+value+"px";childrenOf(node).each(function(){indent($(this),value);});};function initialize(node){if(!node.hasClass("initialized")){node.addClass("initialized");var childNodes=childrenOf(node);if(!node.hasClass("parent")&&childNodes.length>0){node.addClass("parent");}
+if(node.hasClass("parent")){var cell=$(node.children("td")[options.treeColumn]);var padding=getPaddingLeft(cell)+options.indent;childNodes.each(function(){$(this).children("td")[options.treeColumn].style.paddingLeft=padding+"px";});if(options.expandable){cell.prepend('
');$(cell[0].firstChild).click(function(){node.toggleBranch();});if(options.clickableNodeNames){cell[0].style.cursor="pointer";$(cell).click(function(e){if(e.target.className!='expander'){node.toggleBranch();}});}
+if(!(node.hasClass("expanded")||node.hasClass("collapsed"))){node.addClass(options.initialState);}
+if(node.hasClass("expanded")){node.expand();}}}}};function move(node,destination){node.insertAfter(destination);childrenOf(node).reverse().each(function(){move($(this),node[0]);});};function parentOf(node){var classNames=node[0].className.split(' ');for(key in classNames){if(classNames[key].match("child-of-")){return $("#"+classNames[key].substring(9));}}};})(jQuery);
\ No newline at end of file
diff --git a/trunk/www/js/jquery/treetable/raw.js b/trunk/www/js/jquery/treetable/raw.js
new file mode 100644
index 0000000000..84e28ec370
--- /dev/null
+++ b/trunk/www/js/jquery/treetable/raw.js
@@ -0,0 +1,191 @@
+/* jQuery treeTable Plugin 2.2.2 - http://ludo.cubicphuse.nl/jquery-plugins/treeTable/ */
+(function($) {
+ // Helps to make options available to all functions
+ // TODO: This gives problems when there are both expandable and non-expandable
+ // trees on a page. The options shouldn't be global to all these instances!
+ var options;
+
+ $.fn.treeTable = function(opts) {
+ options = $.extend({}, $.fn.treeTable.defaults, opts);
+
+ return this.each(function() {
+ $(this).addClass("treeTable").find("tbody tr").each(function() {
+ // Initialize root nodes only if possible
+ if(!options.expandable || $(this)[0].className.search("child-of-") == -1) {
+ initialize($(this));
+ } else if(options.initialState == "collapsed") {
+ this.style.display = "none"; // Performance! $(this).hide() is slow...
+ }
+ });
+ });
+ };
+
+ $.fn.treeTable.defaults = {
+ childPrefix: "child-of-",
+ clickableNodeNames: false,
+ expandable: true,
+ indent: 19,
+ initialState: "collapsed",
+ treeColumn: 0
+ };
+
+ // Recursively hide all node's children in a tree
+ $.fn.collapse = function() {
+ $(this).addClass("collapsed");
+
+ childrenOf($(this)).each(function() {
+ if(!$(this).hasClass("collapsed")) {
+ $(this).collapse();
+ }
+
+ $(this).hide();
+ });
+
+ return this;
+ };
+
+ // Recursively show all node's children in a tree
+ $.fn.expand = function() {
+ $(this).removeClass("collapsed").addClass("expanded");
+
+ childrenOf($(this)).each(function() {
+ initialize($(this));
+
+ if($(this).is(".expanded.parent")) {
+ $(this).expand();
+ }
+
+ $(this).show();
+ });
+
+ return this;
+ };
+
+ // Add an entire branch to +destination+
+ $.fn.appendBranchTo = function(destination) {
+ var node = $(this);
+ var parent = parentOf(node);
+
+ var ancestorNames = $.map(ancestorsOf($(destination)), function(a) { return a.id; });
+
+ // Conditions:
+ // 1: +node+ should not be inserted in a location in a branch if this would
+ // result in +node+ being an ancestor of itself.
+ // 2: +node+ should not have a parent OR the destination should not be the
+ // same as +node+'s current parent (this last condition prevents +node+
+ // from being moved to the same location where it already is).
+ // 3: +node+ should not be inserted as a child of +node+ itself.
+ if($.inArray(node[0].id, ancestorNames) == -1 && (!parent || (destination.id != parent[0].id)) && destination.id != node[0].id) {
+ indent(node, ancestorsOf(node).length * options.indent * -1); // Remove indentation
+
+ if(parent) { node.removeClass(options.childPrefix + parent[0].id); }
+
+ node.addClass(options.childPrefix + destination.id);
+ move(node, destination); // Recursively move nodes to new location
+ indent(node, ancestorsOf(node).length * options.indent);
+ }
+
+ return this;
+ };
+
+ // Add reverse() function from JS Arrays
+ $.fn.reverse = function() {
+ return this.pushStack(this.get().reverse(), arguments);
+ };
+
+ // Toggle an entire branch
+ $.fn.toggleBranch = function() {
+ if($(this).hasClass("collapsed")) {
+ $(this).expand();
+ } else {
+ $(this).removeClass("expanded").collapse();
+ }
+
+ return this;
+ };
+
+ // === Private functions
+
+ function ancestorsOf(node) {
+ var ancestors = [];
+ while(node = parentOf(node)) {
+ ancestors[ancestors.length] = node[0];
+ }
+ return ancestors;
+ };
+
+ function childrenOf(node) {
+ return $("table.treeTable tbody tr." + options.childPrefix + node[0].id);
+ };
+
+ function indent(node, value) {
+ var cell = $(node.children("td")[options.treeColumn]);
+ var padding = parseInt(cell.css("padding-left"), 10) + value;
+
+ cell.css("padding-left", + padding + "px");
+
+ childrenOf(node).each(function() {
+ indent($(this), value);
+ });
+ };
+
+ function initialize(node) {
+ if(!node.hasClass("initialized")) {
+ node.addClass("initialized");
+
+ var childNodes = childrenOf(node);
+
+ if(!node.hasClass("parent") && childNodes.length > 0) {
+ node.addClass("parent");
+ }
+
+ if(node.hasClass("parent")) {
+ var cell = $(node.children("td")[options.treeColumn]);
+ var padding = parseInt(cell.css("padding-left"), 10) + options.indent;
+
+ childNodes.each(function() {
+ $($(this).children("td")[options.treeColumn]).css("padding-left", padding + "px");
+ });
+
+ if(options.expandable) {
+ cell.prepend('
');
+ $(cell[0].firstChild).click(function() { node.toggleBranch(); });
+
+ if(options.clickableNodeNames) {
+ $(cell).css('cursor', 'pointer');
+ $(cell).click(function(e) {
+ // Don't double-toggle if the click is on the existing expander icon
+ if (e.target.className != 'expander') {
+ node.toggleBranch();
+ }
+ });
+ }
+
+ // Check for a class set explicitly by the user, otherwise set the default class
+ if(!(node.hasClass("expanded") || node.hasClass("collapsed"))) {
+ node.addClass(options.initialState);
+ }
+
+ if(node.hasClass("expanded")) {
+ node.expand();
+ }
+ }
+ }
+ }
+ };
+
+ function move(node, destination) {
+ node.insertAfter(destination);
+ childrenOf(node).reverse().each(function() { move($(this), node[0]); });
+ };
+
+ function parentOf(node) {
+ var classNames = node[0].className.split(' ');
+
+ for(key in classNames) {
+ if(classNames[key].match("child-of-")) {
+ return $("#" + classNames[key].substring(9));
+ }
+ }
+ };
+})(jQuery);
\ No newline at end of file
diff --git a/trunk/www/theme/default/images/treetable/toggle-collapse-dark.png b/trunk/www/theme/default/images/treetable/toggle-collapse-dark.png
new file mode 100644
index 0000000000..76577a57a2
Binary files /dev/null and b/trunk/www/theme/default/images/treetable/toggle-collapse-dark.png differ
diff --git a/trunk/www/theme/default/images/treetable/toggle-collapse-light.png b/trunk/www/theme/default/images/treetable/toggle-collapse-light.png
new file mode 100644
index 0000000000..ed1612fd9b
Binary files /dev/null and b/trunk/www/theme/default/images/treetable/toggle-collapse-light.png differ
diff --git a/trunk/www/theme/default/images/treetable/toggle-expand-dark.png b/trunk/www/theme/default/images/treetable/toggle-expand-dark.png
new file mode 100644
index 0000000000..cfb42a4512
Binary files /dev/null and b/trunk/www/theme/default/images/treetable/toggle-expand-dark.png differ
diff --git a/trunk/www/theme/default/images/treetable/toggle-expand-light.png b/trunk/www/theme/default/images/treetable/toggle-expand-light.png
new file mode 100644
index 0000000000..27b52344dc
Binary files /dev/null and b/trunk/www/theme/default/images/treetable/toggle-expand-light.png differ
diff --git a/trunk/www/theme/default/style.css b/trunk/www/theme/default/style.css
index f6169da77d..3562c76b69 100644
--- a/trunk/www/theme/default/style.css
+++ b/trunk/www/theme/default/style.css
@@ -126,6 +126,7 @@ caption {border:1px solid #e4e4e4; background:#efefef; margin:0; padding:5
.margin-15px {margin: 15px}
.margin-20px {margin: 20px}
.padding-10px{padding: 10px}
+.padding-5px {padding: 5px}
.mt-10px {margin-top: 10px}
.mr-10px {margin-right: 10px}
@@ -242,7 +243,9 @@ caption {border:1px solid #e4e4e4; background:#efefef; margin:0; padding:5
.done {color:darkgreen}
.wait {color:#9F9F5F}
.doing {color:red}
+.delayed {background:red}
.pass {color:darkgreen}
.blocked {color:yellow}
.fail {color:red}
.hand {cursor:pointer}
+.strong {font-weight:bold}
diff --git a/trunk/www/theme/default/treetable.css b/trunk/www/theme/default/treetable.css
new file mode 100644
index 0000000000..04bd7581e4
--- /dev/null
+++ b/trunk/www/theme/default/treetable.css
@@ -0,0 +1,43 @@
+/* jQuery TreeTable Core 2.0 stylesheet
+ *
+ * This file contains styles that are used to display the tree table. Each tree
+ * table is assigned the +treeTable+ class.
+ * ========================================================================= */
+
+/* jquery.treeTable.collapsible
+ * ------------------------------------------------------------------------- */
+.treeTable tr td .expander {
+ background-position: left center;
+ background-repeat: no-repeat;
+ cursor: pointer;
+ padding: 0;
+ zoom: 1; /* IE7 Hack */
+}
+
+.treeTable tr.collapsed td .expander {
+ background-image: url(./images/treetable/toggle-expand-dark.png);
+}
+
+.treeTable tr.expanded td .expander {
+ background-image: url(./images/treetable/toggle-collapse-dark.png);
+}
+
+/* jquery.treeTable.sortable
+ * ------------------------------------------------------------------------- */
+.treeTable tr.selected, .treeTable tr.accept {
+ background-color: #3875d7;
+ color: #fff;
+}
+
+.treeTable tr.collapsed.selected td .expander, .treeTable tr.collapsed.accept td .expander {
+ background-image: url(./images/treetable/toggle-expand-light.png);
+}
+
+.treeTable tr.expanded.selected td .expander, .treeTable tr.expanded.accept td .expander {
+ background-image: url(./images/treetable/toggle-collapse-light.png);
+}
+
+.treeTable .ui-draggable-dragging {
+ color: #000;
+ z-index: 1;
+}