Merge commit WebGUI_7.6.9-beta into survey-rfe
* commit 'tags/WebGUI_7.6.9-beta': (31 commits) Release 7.6.9-beta preparing for 7.6.9 release fixed: Exporting to static files can leak large amounts of memory fixed: HTTP Proxy doesn't serve new content to visitors use to_json and from_json in more places instead of encode_json and decode_json Document the heretofore missing date template variable in Qualify a chained method call when getting Workflow instances. If the Attempt to fix IE6 bug fixed: ukplayer example is now loaded with swfobject.js released under the MIT licence, see gotcha's and /extras/ukplayer Added a style for printing Alumni pages Emails sent about low stock should have status unread, not completed. Moved draggable.js to extras/yui-webgui/build/layout since it is now a wrapper around YUI dragdrob Attributions in the changelog for a patch provided to fix a bug. whups, left in console.logs Updated draggable.js to wrap the YUI fixed #4137: Calendar Search page has extra head tags in body Fix a typo typo in the Operation/Workflow POD. Forward port Shelf view fix. Was not displaying child shelves, only self. Forward port the PayDriver bug fixes from 7.5 branch. Labels are always fixed #9264: new slideShow.swf uploaded in extras/ukplayer (United Knowledge/Arjan Widlak) ... Conflicts: lib/WebGUI/Asset/Wobject/Survey.pm
This commit is contained in:
commit
1376c8ae92
60 changed files with 999 additions and 1199 deletions
|
|
@ -19,7 +19,7 @@ use base 'WebGUI::Asset::File::GalleryFile';
|
|||
|
||||
use Carp qw( carp croak );
|
||||
use Image::ExifTool qw( :Public );
|
||||
use JSON qw/ encode_json decode_json /;
|
||||
use JSON qw/ to_json from_json /;
|
||||
use URI::Escape;
|
||||
use Tie::IxHash;
|
||||
use List::MoreUtils;
|
||||
|
|
@ -221,7 +221,7 @@ sub getExifData {
|
|||
|
||||
# Our processing and eliminating of bad / unparsable keys
|
||||
# isn't perfect, so handle errors gracefully
|
||||
my $exif = eval { decode_json( $self->get('exifData') ) };
|
||||
my $exif = eval { from_json( $self->get('exifData') ) };
|
||||
if ( $@ ) {
|
||||
$self->session->errorHandler->warn(
|
||||
"Could not parse JSON data for EXIF in Photo '" . $self->get('title')
|
||||
|
|
@ -461,7 +461,7 @@ sub updateExifDataFromFile {
|
|||
}
|
||||
|
||||
$self->update({
|
||||
exifData => encode_json( $info ),
|
||||
exifData => to_json( $info ),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,23 +194,24 @@ sub purgeCache {
|
|||
sub view {
|
||||
my $self = shift;
|
||||
my $calledAsWebMethod = shift;
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($self->session, 1);
|
||||
my $session = $self->session;
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session, 1);
|
||||
my $noCache =
|
||||
$self->session->var->isAdminOn
|
||||
$session->var->isAdminOn
|
||||
|| $self->get("cacheTimeout") <= 10
|
||||
|| ($versionTag && $versionTag->getId eq $self->get("tagId"));
|
||||
unless ($noCache) {
|
||||
my $out = WebGUI::Cache->new($self->session,"view_".$calledAsWebMethod."_".$self->getId)->get;
|
||||
my $out = WebGUI::Cache->new($session,"view_".$calledAsWebMethod."_".$self->getId)->get;
|
||||
return $out if $out;
|
||||
}
|
||||
my $output = $self->get("snippet");
|
||||
WebGUI::Macro::process($self->session,\$output);
|
||||
$output = $self->getToolbar.$output if ($self->session->var->isAdminOn && !$calledAsWebMethod);
|
||||
$output = $self->getToolbar.$output if ($session->var->isAdminOn && !$calledAsWebMethod);
|
||||
if ($self->getValue("processAsTemplate")) {
|
||||
$output = WebGUI::Asset::Template->processRaw($self->session, $output, $self->get);
|
||||
$output = WebGUI::Asset::Template->processRaw($session, $output, $self->get);
|
||||
}
|
||||
WebGUI::Macro::process($session,\$output);
|
||||
unless ($noCache) {
|
||||
WebGUI::Cache->new($self->session,"view_".$calledAsWebMethod."_".$self->getId)->set($output,$self->get("cacheTimeout"));
|
||||
WebGUI::Cache->new($session,"view_".$calledAsWebMethod."_".$self->getId)->set($output,$self->get("cacheTimeout"));
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2064,14 +2064,9 @@ sub www_search {
|
|||
});
|
||||
|
||||
# This is very bad! It should be $self->processStyle or whatnot.
|
||||
$self->session->http->sendHeader;
|
||||
my $template = WebGUI::Asset::Template->new($self->session,$self->get("templateIdSearch"));
|
||||
my $style = $self->session->style->process($self->getSeparator,$self->get("styleTemplateId"));
|
||||
my ($head, $foot) = split($self->getSeparator,$style);
|
||||
$self->session->output->print($head, 1);
|
||||
$self->session->output->print($self->processTemplate($var, undef, $template));
|
||||
$self->session->output->print($foot, 1);
|
||||
return "chunked";
|
||||
return $self->processStyle(
|
||||
$self->processTemplate( $var, $self->get('templateIdSearch') )
|
||||
);
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -178,6 +178,12 @@ sub definition {
|
|||
return $class->SUPER::definition($session, $definition);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getContentLastModified {
|
||||
return time;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub getCookieJar {
|
||||
my $self = shift;
|
||||
|
|
|
|||
|
|
@ -234,7 +234,11 @@ sub prepareView {
|
|||
if ($vars{showAdmin}) {
|
||||
# under normal circumstances we don't put HTML stuff in our code, but this will make it much easier
|
||||
# for end users to work with our templates
|
||||
$session->style->setScript($session->url->extras("draggable.js"),{ type=>"text/javascript" });
|
||||
$session->style->setScript($session->url->extras("yui/build/yahoo-dom-event/yahoo-dom-event.js"),{ type=>"text/javascript" });
|
||||
$session->style->setScript($session->url->extras("yui/build/animation/animation-min.js"),{ type=>"text/javascript" });
|
||||
$session->style->setScript($session->url->extras("yui/build/dragdrop/dragdrop.js"),{ type=>"text/javascript" });
|
||||
$session->style->setScript($session->url->extras("yui-webgui/build/layout/draggable.js"),{ type=>"text/javascript" });
|
||||
|
||||
$session->style->setLink($session->url->extras("draggable.css"),{ type=>"text/css", rel=>"stylesheet", media=>"all" });
|
||||
$session->style->setRawHeadTags('
|
||||
<style type="text/css">
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@ sub view {
|
|||
# build nav variables
|
||||
$pageData->{"page.rank"} = $asset->getRank;
|
||||
$pageData->{"page.absDepth"} = $asset->getLineageLength;
|
||||
$pageData->{"page.relDepth"} = $asset->getLineageLength - $start->getLineageLength;
|
||||
$pageData->{"page.relDepth"} = $asset->getLineageLength - $absoluteDepthOfFirstPage;
|
||||
$pageData->{"page.isSystem"} = $asset->get("isSystem");
|
||||
$pageData->{"page.isHidden"} = $asset->get("isHidden");
|
||||
$pageData->{"page.isViewable"} = $asset->canView;
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ sub freezeGraphConfig {
|
|||
my $self = shift;
|
||||
my $obj = shift;
|
||||
|
||||
return JSON::encode_json($obj);
|
||||
return JSON::to_json($obj);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -404,7 +404,7 @@ sub thawGraphConfig {
|
|||
my $string = shift;
|
||||
|
||||
return unless $string;
|
||||
return JSON::decode_json($string);
|
||||
return JSON::from_json($string);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -277,7 +277,8 @@ sub view {
|
|||
my @childShelves = ();
|
||||
foreach my $child (@{$self->getLineage(['children'],{returnObjects=>1,includeOnlyClasses=>['WebGUI::Asset::Wobject::Shelf']})}) {
|
||||
my $properties = $child->get;
|
||||
$child->{url} = $self->getUrl;
|
||||
$child->{url} = $child->getUrl;
|
||||
$child->{title} = $child->getTitle;
|
||||
push @childShelves, $child;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue