merging back with HEAD
This commit is contained in:
parent
cd30eb437c
commit
f8b11b5423
42 changed files with 1201 additions and 182 deletions
|
|
@ -317,7 +317,15 @@ sub getEditForm {
|
|||
}
|
||||
}
|
||||
|
||||
$form->submit();
|
||||
$form->raw(
|
||||
'<tr><td COLSPAN=2>'.
|
||||
WebGUI::Form::Button($session, {}).
|
||||
WebGUI::Form::Button($session, {
|
||||
-value => $i18n->get('cancel', 'WebGUI'),
|
||||
-extras => q|onclick="history.go(-1);" class="backwardButton"|
|
||||
}).
|
||||
'</td></tr>'
|
||||
);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
|
@ -631,53 +639,28 @@ sub view {
|
|||
@files = @{ $storage->getFiles } if (defined $storage);
|
||||
|
||||
$var->{screenshots} = qq|
|
||||
<script language="javascript">AC_FL_RunContent = 0;</script>
|
||||
<script src="/extras/ukplayer/AC_RunActiveContent.js" language="javascript"></script>
|
||||
<script language="javascript">
|
||||
if (AC_FL_RunContent == 0) {
|
||||
alert("This page requires AC_RunActiveContent.js.");
|
||||
} else {
|
||||
AC_FL_RunContent(
|
||||
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
|
||||
'width', '400',
|
||||
'height', '300',
|
||||
'src', 'swc/assets',
|
||||
'quality', 'high',
|
||||
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
|
||||
'align', 'middle',
|
||||
'play', 'true',
|
||||
'loop', 'true',
|
||||
'scale', 'showall',
|
||||
'wmode', 'window',
|
||||
'devicefont', 'false',
|
||||
'id', 'slideShow',
|
||||
'bgcolor', '#ffffff',
|
||||
'name', 'coverflow',
|
||||
'menu', 'true',
|
||||
// note: the width & height in the flashVars below MUST match the width & height set above
|
||||
'flashVars',
|
||||
'config=?func=getScreenshotsConfig&width=400&height=300&backgroundColor=0xCCCCCC&fontColor=&textBorderColor=&textBackgroundColor=&controlsColor=&controlsBorderColor=&controlsBackgroundColor=',
|
||||
'allowFullScreen', 'false',
|
||||
'allowScriptAccess','sameDomain',
|
||||
'movie', '/extras/ukplayer/slideShow',
|
||||
'salign', ''
|
||||
); //end AC code
|
||||
}
|
||||
<script type="text/javascript" src="/extras/ukplayer/swfobject.js"></script>
|
||||
<script type="text/javascript">
|
||||
swfobject.registerObject("myFlashContent","9.0.0","/extras/ukplayer/expressInstall.swf");
|
||||
</script>
|
||||
<noscript>
|
||||
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
|
||||
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="400"
|
||||
height="300" id="swc/assets" align="middle">
|
||||
<param name="allowScriptAccess" value="sameDomain" />
|
||||
<param name="allowFullScreen" value="false" />
|
||||
<param name="flashVars" value="config=?func=getScreenshotsConfig" />
|
||||
<param name="movie" value="/extras/ukplayer/slideShow.swf" /><param name="quality" value="high" /><param
|
||||
name="bgcolor" value="#ffffff" /> <embed src="/extras/ukplayer/slideShow.swf" quality="high" bgcolor="#ffffff"
|
||||
width="400" height="300" name="swc/assets" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false"
|
||||
flashvars="config=?func=getScreenshotsConfig" type="application/x-shockwave-flash"
|
||||
pluginspage="http://www.macromedia.com/go/getflashplayer" />
|
||||
<div>
|
||||
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="300" id="myFlashContent">
|
||||
<param name="movie" value="/extras/ukplayer/slideShow.swf" />
|
||||
<param name="flashvars" value="config=?func=getScreenshotsConfig" />
|
||||
<!--[if !IE]>-->
|
||||
<object type="application/x-shockwave-flash" data="/extras/ukplayer/slideShow.swf" width="400"
|
||||
height="300">
|
||||
<param name="flashvars" value="config=?func=getScreenshotsConfig" />
|
||||
<!--<![endif]-->
|
||||
<a href="http:/www.adobe.com/go/getflashplayer">
|
||||
<img src="http:/www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe
|
||||
Flash player" />
|
||||
</a>
|
||||
<!--[if !IE]>-->
|
||||
</object>
|
||||
<!--<![endif]-->
|
||||
</object>
|
||||
</noscript>
|
||||
</div>
|
||||
|;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -484,9 +484,7 @@ sub deleteAttachedFiles {
|
|||
my $form = $self->_createForm($fieldConfig->{$field}, $entryData->{$field});
|
||||
if ($form->can('getStorageLocation')) {
|
||||
my $storage = $form->getStorageLocation;
|
||||
if ($storage) {
|
||||
$storage->delete;
|
||||
}
|
||||
$storage->delete if $storage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -498,7 +496,7 @@ sub deleteAttachedFiles {
|
|||
my $form = $self->_createForm($fieldConfig->{$field}, $entryData->{$field});
|
||||
if ($form->can('getStorageLocation')) {
|
||||
my $storage = $form->getStorageLocation;
|
||||
$storage->delete;
|
||||
$storage->delete if $storage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -647,7 +647,8 @@ sub prepareView {
|
|||
= WebGUI::Asset::Template->new($self->session, $templateId);
|
||||
$template->prepare($self->getMetaDataAsTemplateVariables);
|
||||
|
||||
$self->{_viewTemplate} = $template;
|
||||
$self->{_viewTemplate} = $template;
|
||||
$self->{_viewVariables} = $self->getTemplateVars;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -776,7 +777,7 @@ to be displayed within the page style.
|
|||
sub view {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $var = $self->getTemplateVars;
|
||||
my $var = delete $self->{_viewVariables};
|
||||
|
||||
my $p = $self->getFilePaginator;
|
||||
$p->appendTemplateVars( $var );
|
||||
|
|
|
|||
|
|
@ -98,70 +98,80 @@ sub definition {
|
|||
maxResponsesPerUser => {
|
||||
fieldType => 'integer',
|
||||
defaultValue => 1,
|
||||
label => 'Max user reponses',
|
||||
label => $i18n->get('Max user responses'),
|
||||
hoverHelp => $i18n->get('Max user responses help'),
|
||||
},
|
||||
overviewTemplateId => {
|
||||
tab => 'display',
|
||||
fieldType => 'template',
|
||||
defaultValue => 'PBtmpl0000000000000063',
|
||||
label => 'Overview template id',
|
||||
namespace => 'Survey/Overview',
|
||||
label => $i18n->get('Survey Overview Template'),
|
||||
hoverHelp => $i18n->get('Survey Overview Template help'),
|
||||
},
|
||||
gradebookTemplateId => {
|
||||
tab => 'display',
|
||||
fieldType => 'template',
|
||||
label => 'Grabebook template id',
|
||||
defaultValue => 'PBtmpl0000000000000062',
|
||||
namespace => 'Survey/Gradebook',
|
||||
label => $i18n->get('Gradebook Template'),
|
||||
hoverHelp => $i18n->get('Gradebook Template help'),
|
||||
},
|
||||
responseTemplateId => {
|
||||
tab => 'display',
|
||||
fieldType => 'template',
|
||||
label => 'Response template id',
|
||||
defaultValue => 'PBtmpl0000000000000064',
|
||||
namespace => 'Survey/Response',
|
||||
label => $i18n->get('Response Template'),
|
||||
hoverHelp => $i18n->get('Response Template help'),
|
||||
},
|
||||
surveyEditTemplateId => {
|
||||
tab => 'display',
|
||||
fieldType => 'template',
|
||||
label => 'Survey edit template id',
|
||||
defaultValue => 'GRUNFctldUgop-qRLuo_DA',
|
||||
namespace => 'Survey/Edit',
|
||||
label => $i18n->get('Edit Survey Template'),
|
||||
hoverHelp => $i18n->get('Edit Survey Template help'),
|
||||
},
|
||||
surveyTakeTemplateId => {
|
||||
tab => 'display',
|
||||
fieldType => 'template',
|
||||
label => 'Take survey template id',
|
||||
defaultValue => 'd8jMMMRddSQ7twP4l1ZSIw',
|
||||
namespace => 'Survey/Take',
|
||||
label => $i18n->get('Take Survey Template'),
|
||||
hoverHelp => $i18n->get('Take Survey Template help'),
|
||||
},
|
||||
surveyQuestionsId => {
|
||||
tab => 'display',
|
||||
fieldType => 'template',
|
||||
label => 'Questions template id',
|
||||
defaultValue => 'CxMpE_UPauZA3p8jdrOABw',
|
||||
namespace => 'Survey/Take',
|
||||
label => $i18n->get('Questions Template'),
|
||||
hoverHelp => $i18n->get('Questions Template help'),
|
||||
},
|
||||
sectionEditTemplateId => {
|
||||
tab => 'display',
|
||||
fieldType => 'template',
|
||||
label => 'Section Edit Tempalte',
|
||||
defaultValue => '1oBRscNIcFOI-pETrCOspA',
|
||||
namespace => 'Survey/Edit',
|
||||
label => $i18n->get('Section Edit Template'),
|
||||
hoverHelp => $i18n->get('Section Edit Template help'),
|
||||
},
|
||||
questionEditTemplateId => {
|
||||
tab => 'display',
|
||||
fieldType => 'template',
|
||||
label => 'Question Edit Tempalte',
|
||||
defaultValue => 'wAc4azJViVTpo-2NYOXWvg',
|
||||
namespace => 'Survey/Edit',
|
||||
label => $i18n->get('Question Edit Template'),
|
||||
hoverHelp => $i18n->get('Question Edit Template help'),
|
||||
},
|
||||
answerEditTemplateId => {
|
||||
tab => 'display',
|
||||
fieldType => 'template',
|
||||
label => 'Answer Edit Tempalte',
|
||||
defaultValue => 'AjhlNO3wZvN5k4i4qioWcg',
|
||||
namespace => 'Survey/Edit',
|
||||
label => $i18n->get('Answer Edit Template'),
|
||||
hoverHelp => $i18n->get('Answer Edit Template help'),
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -785,7 +785,7 @@ sub updateQuestionAnswers {
|
|||
}
|
||||
elsif ( $type eq 'Party' ) {
|
||||
my @ans
|
||||
= ( 'Democratic party', 'Republican party (or GOP)', 'Independant party', 'Other party (verbatim)' );
|
||||
= ( 'Democratic party', 'Republican party (or GOP)', 'Independent party', 'Other party (verbatim)' );
|
||||
$self->addAnswersToQuestion( \@addy, \@ans, { 3, 1 } );
|
||||
}
|
||||
elsif ( $type eq 'Race' ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue