some bug fixes
This commit is contained in:
parent
e1fee84dc5
commit
15bb672c3c
8 changed files with 147 additions and 32 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
6.99.2
|
6.99.2
|
||||||
|
- Added UI Levels to asset toolbar icons, as discussed in Community IRC.
|
||||||
- Data Forms now send email as HTML.
|
- Data Forms now send email as HTML.
|
||||||
- Added full drag bar to the top of each asset as discussed in Community IRC.
|
- Added full drag bar to the top of each asset as discussed in Community IRC.
|
||||||
- fixed a bug in the project management app that was causing a no privilege error when trying to display the view.
|
- fixed a bug in the project management app that was causing a no privilege error when trying to display the view.
|
||||||
|
|
@ -24,7 +25,7 @@
|
||||||
page.
|
page.
|
||||||
- Added a context menu to the last item in the crumb trail in the asset
|
- Added a context menu to the last item in the crumb trail in the asset
|
||||||
manager as discussed in Community IRC.
|
manager as discussed in Community IRC.
|
||||||
- Login boxes are now Section 508 compliant.
|
- Login boxes are now Section 508 compliant as discussed in Community IRC.
|
||||||
|
|
||||||
6.99.1
|
6.99.1
|
||||||
- Bugfixes on dashboard to fix template errors.
|
- Bugfixes on dashboard to fix template errors.
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
57
docs/upgrades/templates-6.99.2/article_with_files.tmpl
Executable file
57
docs/upgrades/templates-6.99.2/article_with_files.tmpl
Executable file
|
|
@ -0,0 +1,57 @@
|
||||||
|
#PBtmpl0000000000000207
|
||||||
|
#create
|
||||||
|
#namespace:Article
|
||||||
|
#url:article-with-files
|
||||||
|
#title:Article with Files
|
||||||
|
#menuTitle:Article with Files
|
||||||
|
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>
|
||||||
|
|
||||||
|
<tmpl_if session.var.adminOn>
|
||||||
|
<p><tmpl_var controls></p>
|
||||||
|
</tmpl_if>
|
||||||
|
|
||||||
|
<tmpl_if displayTitle>
|
||||||
|
<h2><tmpl_var title></h2>
|
||||||
|
</tmpl_if>
|
||||||
|
|
||||||
|
<tmpl_if pagination.isFirstPage>
|
||||||
|
</tmpl_if>
|
||||||
|
|
||||||
|
<tmpl_if description>
|
||||||
|
<tmpl_var description>
|
||||||
|
</tmpl_if>
|
||||||
|
|
||||||
|
<tmpl_if pagination.isLastPage>
|
||||||
|
<tmpl_if linkUrl>
|
||||||
|
<tmpl_if linkTitle>
|
||||||
|
<p />
|
||||||
|
<a href="<tmpl_var linkUrl>"><tmpl_var linkTitle></a>
|
||||||
|
</tmpl_if>
|
||||||
|
</tmpl_if>
|
||||||
|
<tmpl_loop attachment_loop>
|
||||||
|
<p style="display:inline;vertical-align:middle;"><a href="<tmpl_var url>"><img src="<tmpl_var icon>" style="vertical-align:middle;border: 0px;" alt="<tmpl_var filename>" /> <tmpl_var filename></a></p><br />
|
||||||
|
</tmpl_loop>
|
||||||
|
</tmpl_if>
|
||||||
|
|
||||||
|
<tmpl_if pagination.pageCount.isMultiple>
|
||||||
|
<tmpl_var pagination.previousPage>
|
||||||
|
·
|
||||||
|
<tmpl_var pagination.pageList.upTo20>
|
||||||
|
·
|
||||||
|
<tmpl_var pagination.nextPage>
|
||||||
|
</tmpl_if>
|
||||||
|
|
||||||
|
<tmpl_if pagination.isFirstPage>
|
||||||
|
</tmpl_if>
|
||||||
|
|
||||||
|
<tmpl_if pagination.isLastPage>
|
||||||
|
<tmpl_if allowDiscussion>
|
||||||
|
<p>
|
||||||
|
<table width="100%" cellspacing="2" cellpadding="1" border="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center" width="50%" class="tableMenu"><a href="<tmpl_var replies.URL>"><tmpl_var replies.label> (<tmpl_var replies.count>)</a></td>
|
||||||
|
<td align="center" width="50%" class="tableMenu"><a href="<tmpl_var post.url>"><tmpl_var post.label></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</tmpl_if>
|
||||||
|
</tmpl_if>
|
||||||
|
|
@ -22,12 +22,35 @@ my $session = start(); # this line required
|
||||||
|
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
updateTT();
|
updateTT();
|
||||||
|
addToolbarUiLevels();
|
||||||
|
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------
|
||||||
|
sub addToolbarUiLevels {
|
||||||
|
print "\tAdding asset toolbar UI levels.\n" unless ($quiet);
|
||||||
|
$session->config->set("assetToolbarUiLevel", {
|
||||||
|
"edit" => 1,
|
||||||
|
"delete" => 1,
|
||||||
|
"cut" => 1,
|
||||||
|
"copy" => 1,
|
||||||
|
"shortcut" => 5,
|
||||||
|
"editBranch" => 9,
|
||||||
|
"lock" => 5,
|
||||||
|
"export" => 9,
|
||||||
|
"changeUrl" => 9,
|
||||||
|
"promote" => 3,
|
||||||
|
"demote" => 3,
|
||||||
|
"manage" => 5,
|
||||||
|
"revisions" => 5,
|
||||||
|
"view" => 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------
|
#-------------------------------------------------
|
||||||
sub updateTT {
|
sub updateTT {
|
||||||
|
print "\tUpdating the Time Tracking System.\n" unless ($quiet);
|
||||||
my $tableList = [
|
my $tableList = [
|
||||||
"create table TT_projectTasks (
|
"create table TT_projectTasks (
|
||||||
taskId varchar(22) binary not null,
|
taskId varchar(22) binary not null,
|
||||||
|
|
@ -60,7 +83,6 @@ sub updateTT {
|
||||||
"alter table TT_timeEntry drop column lastUpdateDate"
|
"alter table TT_timeEntry drop column lastUpdateDate"
|
||||||
];
|
];
|
||||||
|
|
||||||
print "\tUpdating the Time Tracking System.\n" unless ($quiet);
|
|
||||||
foreach (@{$tableList}) {
|
foreach (@{$tableList}) {
|
||||||
$session->db->write($_);
|
$session->db->write($_);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,25 @@
|
||||||
# "WebGUI::Asset::RichEdit" : 4
|
# "WebGUI::Asset::RichEdit" : 4
|
||||||
# },
|
# },
|
||||||
|
|
||||||
|
# Configure the UI Levels of the asset toolbar links.
|
||||||
|
|
||||||
|
"assetToolbarUiLevel" : {
|
||||||
|
"edit" : 1,
|
||||||
|
"delete" : 1,
|
||||||
|
"cut" : 1,
|
||||||
|
"copy" : 1,
|
||||||
|
"shortcut" : 5,
|
||||||
|
"editBranch" : 9,
|
||||||
|
"lock" : 5,
|
||||||
|
"export" : 9,
|
||||||
|
"changeUrl" : 9,
|
||||||
|
"promote" : 3,
|
||||||
|
"demote" : 3,
|
||||||
|
"manage" : 5,
|
||||||
|
"revisions" : 5,
|
||||||
|
"view" : 1
|
||||||
|
},
|
||||||
|
|
||||||
# You can override the UI Levels of any field in the edit form of
|
# You can override the UI Levels of any field in the edit form of
|
||||||
# any asset using the following variables. Basically just take the
|
# any asset using the following variables. Basically just take the
|
||||||
# class name of the asset separated by underscores, and append
|
# class name of the asset separated by underscores, and append
|
||||||
|
|
|
||||||
|
|
@ -897,43 +897,56 @@ sub getToolbar {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return undef unless $self->canEdit;
|
return undef unless $self->canEdit;
|
||||||
return $self->{_toolbar} if (exists $self->{_toolbar});
|
return $self->{_toolbar} if (exists $self->{_toolbar});
|
||||||
|
my $userUiLevel = $self->session->user->profileField("uiLevel");
|
||||||
|
my $uiLevels = $self->session->config->get("assetToolbarUiLevel");
|
||||||
my $i18n = WebGUI::International->new($self->session, "Asset");
|
my $i18n = WebGUI::International->new($self->session, "Asset");
|
||||||
my $toolbar = "";
|
my $toolbar = "";
|
||||||
my $commit;
|
my $commit;
|
||||||
if ($self->canEditIfLocked) {
|
if ($self->canEditIfLocked) {
|
||||||
$toolbar .= $self->session->icon->delete('func=delete',$self->get("url"),$i18n->get(43));
|
$toolbar .= $self->session->icon->delete('func=delete',$self->get("url"),$i18n->get(43)) if ($userUiLevel >= $uiLevels->{"delete"});
|
||||||
$toolbar .= $self->session->icon->edit('func=edit',$self->get("url"));
|
$toolbar .= $self->session->icon->edit('func=edit',$self->get("url")) if ($userUiLevel >= $uiLevels->{"edit"});
|
||||||
} else {
|
} else {
|
||||||
$toolbar .= $self->session->icon->locked('func=manageRevisions',$self->get("url"));
|
$toolbar .= $self->session->icon->locked('func=manageRevisions',$self->get("url")) if ($userUiLevel >= $uiLevels->{"revisions"});
|
||||||
}
|
}
|
||||||
$toolbar .= $self->session->icon->cut('func=cut',$self->get("url"))
|
$toolbar .= $self->session->icon->cut('func=cut',$self->get("url")) if ($userUiLevel >= $uiLevels->{"cut"});
|
||||||
.$self->session->icon->copy('func=copy',$self->get("url"));
|
$toolbar .= $self->session->icon->copy('func=copy',$self->get("url")) if ($userUiLevel >= $uiLevels->{"copy"});
|
||||||
$toolbar .= $self->session->icon->shortcut('func=createShortcut',$self->get("url")) unless ($self->get("className") =~ /Shortcut/);
|
$toolbar .= $self->session->icon->shortcut('func=createShortcut',$self->get("url")) if ($userUiLevel >= $uiLevels->{"shortcut"} && !($self->get("className") =~ /Shortcut/));
|
||||||
$self->session->style->setLink($self->session->url->extras('contextMenu/contextMenu.css'), {rel=>"stylesheet",type=>"text/css"});
|
$self->session->style->setLink($self->session->url->extras('contextMenu/contextMenu.css'), {rel=>"stylesheet",type=>"text/css"});
|
||||||
$self->session->style->setScript($self->session->url->extras('contextMenu/contextMenu.js'), {type=>"text/javascript"});
|
$self->session->style->setScript($self->session->url->extras('contextMenu/contextMenu.js'), {type=>"text/javascript"});
|
||||||
my $lock = "";
|
my $output = '<script type="text/javascript">
|
||||||
if (!$self->isLocked) {
|
//<![CDATA[
|
||||||
$lock = 'contextMenu.addLink("'.$self->getUrl("func=lock").'","'.$i18n->get("lock").'");';
|
var contextMenu = new contextMenu_createWithImage("'.$self->getIcon(1).'","'.$self->getId.'","'.$self->getName.'");';
|
||||||
|
if ($userUiLevel >= $uiLevels->{"lock"} && !$self->isLocked) {
|
||||||
|
$output .= 'contextMenu.addLink("'.$self->getUrl("func=lock").'","'.$i18n->get("lock").'");';
|
||||||
}
|
}
|
||||||
my $export = "";
|
if ($userUiLevel >= $uiLevels->{"changeUrl"}) {
|
||||||
if (defined $self->session->config->get("exportPath")) {
|
$output .= 'contextMenu.addLink("'.$self->getUrl("func=changeUrl").'","'.$i18n->get("change url").'");';
|
||||||
$export = 'contextMenu.addLink("'.$self->getUrl("func=export").'","'.$i18n->get("Export","Icon").'");';
|
|
||||||
}
|
}
|
||||||
return '<script type="text/javascript">
|
if ($userUiLevel >= $uiLevels->{"export"} && defined $self->session->config->get("exportPath")) {
|
||||||
//<![CDATA[
|
$output .= 'contextMenu.addLink("'.$self->getUrl("func=export").'","'.$i18n->get("Export","Icon").'");';
|
||||||
var contextMenu = new contextMenu_createWithImage("'.$self->getIcon(1).'","'.$self->getId.'","'.$self->getName.'");
|
}
|
||||||
'.$lock.'
|
if ($userUiLevel >= $uiLevels->{"editBranch"}) {
|
||||||
contextMenu.addLink("'.$self->getUrl("func=changeUrl").'","'.$i18n->get("change url").'");
|
$output .= 'contextMenu.addLink("'.$self->getUrl("func=editBranch").'","'.$i18n->get("edit branch").'");';
|
||||||
'.$export.'
|
}
|
||||||
contextMenu.addLink("'.$self->getUrl("func=editBranch").'","'.$i18n->get("edit branch").'");
|
if ($userUiLevel >= $uiLevels->{"promote"}) {
|
||||||
contextMenu.addLink("'.$self->getUrl("func=promote").'","'.$i18n->get("promote").'");
|
$output .= 'contextMenu.addLink("'.$self->getUrl("func=promote").'","'.$i18n->get("promote").'");';
|
||||||
contextMenu.addLink("'.$self->getUrl("func=demote").'","'.$i18n->get("demote").'");
|
}
|
||||||
contextMenu.addLink("'.$self->getUrl("func=manageAssets").'","'.$i18n->get("manage").'");
|
if ($userUiLevel >= $uiLevels->{"demote"}) {
|
||||||
contextMenu.addLink("'.$self->getUrl("func=manageRevisions").'","'.$i18n->get("revisions").'");
|
$output .= 'contextMenu.addLink("'.$self->getUrl("func=demote").'","'.$i18n->get("demote").'");';
|
||||||
contextMenu.addLink("'.$self->getUrl.'","'.$i18n->get("view").'");
|
}
|
||||||
contextMenu.print();
|
if ($userUiLevel >= $uiLevels->{"manage"}) {
|
||||||
//]]>
|
$output .= 'contextMenu.addLink("'.$self->getUrl("func=manageAssets").'","'.$i18n->get("manage").'");';
|
||||||
</script>'.$toolbar;
|
}
|
||||||
|
if ($userUiLevel >= $uiLevels->{"revisions"}) {
|
||||||
|
$output .= 'contextMenu.addLink("'.$self->getUrl("func=manageRevisions").'","'.$i18n->get("revisions").'");';
|
||||||
|
}
|
||||||
|
if ($userUiLevel >= $uiLevels->{"view"}) {
|
||||||
|
$output .= 'contextMenu.addLink("'.$self->getUrl.'","'.$i18n->get("view").'");';
|
||||||
|
}
|
||||||
|
$output .= 'contextMenu.print();
|
||||||
|
//]]>
|
||||||
|
</script>'.$toolbar;
|
||||||
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -1268,7 +1281,7 @@ sub manageAssetsSearch {
|
||||||
$output .= WebGUI::Form::formFooter($self->session);
|
$output .= WebGUI::Form::formFooter($self->session);
|
||||||
$self->session->output->print($output);
|
$self->session->output->print($output);
|
||||||
$output = '';
|
$output = '';
|
||||||
return undef unless ($self->session->form->get("doit"));
|
return undef unless ($self->session->form->get("doit") && $self->session->form->get("keywords") ne "");
|
||||||
my $class = $self->session->form->process("class","className") eq "any" ? undef : $self->session->form->process("class","className");
|
my $class = $self->session->form->process("class","className") eq "any" ? undef : $self->session->form->process("class","className");
|
||||||
my $assets = WebGUI::Search->new($self->session,0)->search({
|
my $assets = WebGUI::Search->new($self->session,0)->search({
|
||||||
keywords=>$self->session->form->get("keywords"),
|
keywords=>$self->session->form->get("keywords"),
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,10 @@ sub getAssets {
|
||||||
my @assets = ();
|
my @assets = ();
|
||||||
while (my ($id, $class, $version) = $rs->array) {
|
while (my ($id, $class, $version) = $rs->array) {
|
||||||
my $asset = WebGUI::Asset->new($self->session, $id, $class, $version);
|
my $asset = WebGUI::Asset->new($self->session, $id, $class, $version);
|
||||||
|
unless (defined $asset) {
|
||||||
|
$self->session->errorHandler->warn("Search index contains assetId $id even though it no longer exists.");
|
||||||
|
next;
|
||||||
|
}
|
||||||
push(@assets, $asset);
|
push(@assets, $asset);
|
||||||
}
|
}
|
||||||
return \@assets;
|
return \@assets;
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,6 @@ function contextMenu_draw(){
|
||||||
output += '<img src="' + this.imagePath + '" id="contextMenu_' + this.id + '" onclick="return contextMenu_renderLeftClick(\'contextMenu_' + this.id + '_menu\',event)" alt="' + this.name + '" title="' + this.name + '" align="absmiddle" />';
|
output += '<img src="' + this.imagePath + '" id="contextMenu_' + this.id + '" onclick="return contextMenu_renderLeftClick(\'contextMenu_' + this.id + '_menu\',event)" alt="' + this.name + '" title="' + this.name + '" align="absmiddle" />';
|
||||||
} else {
|
} else {
|
||||||
output += '<a href="#" id="contextMenu_' + this.id + '" onclick="return contextMenu_renderLeftClick(\'contextMenu_' + this.id + '_menu\',event)">' + this.name + '</a>';
|
output += '<a href="#" id="contextMenu_' + this.id + '" onclick="return contextMenu_renderLeftClick(\'contextMenu_' + this.id + '_menu\',event)">' + this.name + '</a>';
|
||||||
//output += '<a href="javascript:contextMenu_renderLeftClick(\'contextMenu_' + this.id + '_menu\',event)" id="contextMenu_' + this.id + '">' + this.name + '</a>';
|
|
||||||
}
|
}
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue