some bug fixes

This commit is contained in:
JT Smith 2006-02-14 17:20:11 +00:00
parent 9fff19cd57
commit 121455ee70
5 changed files with 27 additions and 9 deletions

View file

@ -123,7 +123,7 @@ Adds code to the subtext field of the form so that buttons for managing or editi
sub setManageIcons {
my $self = shift;
my $returnUrl = ";proceed=goBackToPage;returnUrl=".$self->session->url->escape($self->session->asset->getUrl);
my $returnUrl = ";proceed=goBackToPage;returnUrl=".$self->session->url->escape($self->session->asset->getUrl) if $self->session->asset;
my $buttons = $self->session->icon->edit("op=editWorkflow".$returnUrl);
$buttons .= $self->session->icon->manage("op=manageWorkflows".$returnUrl);
$self->set("subtext",$buttons . $self->get("subtext"));

View file

@ -83,8 +83,8 @@ sub www_editCronJob {
name=>"enabled",
value=>$value,
defaultValue=>0,
label=>$i18n->get("enabled"),
hoverHelp=>$i18n->get("enabled help")
label=>$i18n->get("is enabled"),
hoverHelp=>$i18n->get("is enabled help")
);
my $value = $cron->get("runOnce") if defined $cron;
$f->yesNo(
@ -171,14 +171,14 @@ sub www_manageCron {
my $session = shift;
return $session->privilege->adminOnly() unless ($session->user->isInGroup(3));
my $i18n = WebGUI::International->new($session, "Workflow_Cron");
my $output = '<table>';
my $rs = $session->db->read("select taskId, title, concat(minuteOfHour, hourOfDay, dayOfMonth, monthOfYear, dayOfWeek), enabled from WorkflowSchedule");
my $output = '<table width="100%">';
my $rs = $session->db->read("select taskId, title, concat(minuteOfHour, ' ', hourOfDay, ' ', dayOfMonth, ' ', monthOfYear, ' ', dayOfWeek), enabled from WorkflowSchedule");
while (my ($id, $title, $schedule, $enabled) = $rs->array) {
$output .= '<tr><td>'
.$session->icon->delete("op=deleteCronJob;id=".$id, undef, $i18n->get("are you sure you want to delete this scheduled task"))
.$session->icon->edit("op=editCronJob;id=".$id)
.'</td><td>'.$title.'</td><td>'.$schedule.'</td><td>'
.($enabled ? "X" : "")
.($enabled ? $i18n->get("enabled") : $i18n->get("disabled"))
."</td></tr>\n";
}
$output .= '</table>';

View file

@ -201,6 +201,7 @@ If specified this will limit the list to a certain type of workflow based upon t
=cut
sub getList {
my $class = shift;
my $session = shift;
my $type = shift;
my $sql = "select workflowId, title from Workflow";

View file

@ -225,6 +225,10 @@ The parameters to be passed into the constructor. Note that the system will alwa
An integer between 1 and 3 that will represent what priority the workflow will run, 1 being highest and 3 being lowest. Defaults to 2.
=head4 title
A human readable label.
=cut
sub set {
@ -240,6 +244,7 @@ sub set {
} elsif ($properties->{runOnce} == 0) {
$self->{_data}{runOnce} = 0;
}
$self->{_data}{title} = $properties->{title} || $self->{_data}{title} || "Untitled";
$self->{_data}{priority} = $properties->{priority} || $self->{_data}{priority} || 2;
$self->{_data}{minuteOfHour} = $properties->{minuteOfHour} || $self->{_data}{minuteOfHour} || 0;
$self->{_data}{hourOfDay} = $properties->{hourOfDay} || $self->{_data}{hourOfDay} || "*";

View file

@ -73,14 +73,14 @@ our $I18N = {
lastUpdated => 0,
},
'enabled help' => {
'is enabled help' => {
message => q|If this is set to yes, then the workflow will be kicked off at the scheduled time.|,
context => q|the hover help for the enabled field|,
lastUpdated => 0,
},
'enabled' => {
message => q|Enabled?|,
'is enabled' => {
message => q|Is Enabled?|,
context => q|Yes or no question asking the user if this cron job is enabled.|,
lastUpdated => 0,
},
@ -139,6 +139,18 @@ our $I18N = {
lastUpdated => 0,
},
'enabled' => {
message => q|Enabled|,
context => q|A label to indicate that the cron job is ready to run.|,
lastUpdated => 0,
},
'disabled' => {
message => q|Disabled|,
context => q|A label to indicate that the cron job is not ready to run.|,
lastUpdated => 0,
},
'topicName' => {
message => q|Scheduler|,
context => q|The title of the cron/scheduler interface.|,