From 1d74ea3fa3572b20979ea9dd97d9d815b6d682aa Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Wed, 17 Feb 2010 22:04:13 +0000 Subject: [PATCH] Bug 329637: Add a Calendar widget to the Deadline field r=ghendricks, a=mkanat git-svn-id: svn://10.0.0.236/trunk@259734 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- mozilla/webtools/bugzilla/Bugzilla/Bug.pm | 3 +-- mozilla/webtools/bugzilla/Bugzilla/Field.pm | 2 +- mozilla/webtools/bugzilla/skins/standard/show_bug.css | 3 +++ .../template/en/default/bug/create/create.html.tmpl | 8 +++----- .../bugzilla/template/en/default/bug/edit.html.tmpl | 6 +++--- .../template/en/default/list/edit-multiple.html.tmpl | 10 +++------- 7 files changed, 15 insertions(+), 19 deletions(-) diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index 75fea2e5dd0..c2e787de650 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -6998 \ No newline at end of file +6999 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/Bugzilla/Bug.pm b/mozilla/webtools/bugzilla/Bugzilla/Bug.pm index b3f0fe58e20..ad272af22e1 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Bug.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Bug.pm @@ -218,8 +218,7 @@ use constant NUMERIC_COLUMNS => qw( ); sub DATE_COLUMNS { - my @fields = Bugzilla->get_fields( - { custom => 1, type => FIELD_TYPE_DATETIME }); + my @fields = Bugzilla->get_fields({ type => FIELD_TYPE_DATETIME }); return map { $_->name } @fields; } diff --git a/mozilla/webtools/bugzilla/Bugzilla/Field.pm b/mozilla/webtools/bugzilla/Bugzilla/Field.pm index 6b9ceb7c0b2..c32a6a213e1 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Field.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Field.pm @@ -219,7 +219,7 @@ use constant DEFAULT_FIELDS => ( in_new_bugmail => 1, buglist => 1}, {name => 'remaining_time', desc => 'Remaining Hours', buglist => 1}, {name => 'deadline', desc => 'Deadline', - in_new_bugmail => 1, buglist => 1}, + type => FIELD_TYPE_DATETIME, in_new_bugmail => 1, buglist => 1}, {name => 'commenter', desc => 'Commenter'}, {name => 'flagtypes.name', desc => 'Flags', buglist => 1}, {name => 'requestees.login_name', desc => 'Flag Requestee'}, diff --git a/mozilla/webtools/bugzilla/skins/standard/show_bug.css b/mozilla/webtools/bugzilla/skins/standard/show_bug.css index ec981d51c9b..1768ddc4255 100644 --- a/mozilla/webtools/bugzilla/skins/standard/show_bug.css +++ b/mozilla/webtools/bugzilla/skins/standard/show_bug.css @@ -98,6 +98,9 @@ table#flags { .bz_time_tracking_table .bz_summarize_time { text-align: right; } +.bz_time_tracking_table #deadline { + width: 7em; +} #summary tr td { vertical-align:top; diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl index 1f3380a2973..dce1da762a9 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/bug/create/create.html.tmpl @@ -445,11 +445,9 @@ TUI_hide_default('expert_fields'); - Deadline: - - - (YYYY-MM-DD) - + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.deadline, value = deadline, + editable = 1, value_span = 2 %] diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl index 9979e955160..9725134cfc3 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl @@ -999,9 +999,9 @@ [% PROCESS formattimeunit time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %] -
- (YYYY-MM-DD) + [% INCLUDE bug/field.html.tmpl + field = bug_fields.deadline, value = bug.deadline, no_tds = 1 + editable = bug.check_can_change_field('deadline', 0, 1) %] diff --git a/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl index 91c86cc6498..5f16dae69e6 100644 --- a/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl @@ -149,13 +149,9 @@ value="[% dontchange FILTER html %]" size="6"> - - - - + [% PROCESS bug/field.html.tmpl + field = bug_fields.deadline, value = dontchange + editable = 1, allow_dont_change = 1 %]