merge back with HEAD for 7.7.0
This commit is contained in:
parent
426bc41b04
commit
04105713f0
23 changed files with 120 additions and 60 deletions
|
|
@ -1104,6 +1104,7 @@ sub www_addAlbumService {
|
|||
description => $form->get('synopsis','textarea'),
|
||||
synopsis => $form->get('synopsis','textarea'),
|
||||
othersCanAdd => $form->get('othersCanAdd','yesNo'),
|
||||
ownerUserId => $session->user->userId,
|
||||
});
|
||||
|
||||
$album->requestAutoCommit;
|
||||
|
|
|
|||
|
|
@ -1019,6 +1019,7 @@ sub www_addFileService {
|
|||
title => $form->get('title','text'),
|
||||
description => $form->get('synopsis','textarea'),
|
||||
synopsis => $form->get('synopsis','textarea'),
|
||||
ownerUserId => $session->user->userId,
|
||||
});
|
||||
|
||||
my $storage = $file->getStorageLocation;
|
||||
|
|
|
|||
|
|
@ -442,6 +442,8 @@ sub view {
|
|||
# javascript and css files for compare form datatable
|
||||
$self->session->style->setLink($self->session->url->extras('yui/build/datatable/assets/skins/sam/datatable.css'),
|
||||
{type =>'text/css', rel=>'stylesheet'});
|
||||
$self->session->style->setScript($self->session->url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'), {type =>
|
||||
'text/javascript'});
|
||||
$self->session->style->setScript($self->session->url->extras('yui/build/json/json-min.js'), {type =>
|
||||
'text/javascript'});
|
||||
$self->session->style->setScript($self->session->url->extras('yui/build/connection/connection-min.js'), {type =>
|
||||
|
|
@ -1024,6 +1026,7 @@ sub www_getCompareListData {
|
|||
unless (scalar(@listingIds)) {
|
||||
@listingIds = $self->session->form->checkList("listingId");
|
||||
}
|
||||
my @responseFields = ("attributeId", "name", "description","fieldType", "checked");
|
||||
|
||||
foreach my $listingId (@listingIds){
|
||||
$listingId =~ s/_____/-/g;
|
||||
|
|
@ -1038,11 +1041,13 @@ sub www_getCompareListData {
|
|||
url =>$listing->getUrl,
|
||||
lastUpdated =>$session->datetime->epochToHuman( $listing->get('revisonDate'),"%z" ),
|
||||
});
|
||||
push(@responseFields, $listingId_safe, $listingId_safe."_compareColor");
|
||||
}
|
||||
push(@results,{name=>$i18n->get('last updated label'),fieldType=>'lastUpdated'});
|
||||
|
||||
my $jsonOutput;
|
||||
$jsonOutput->{ColumnDefs} = \@columnDefs;
|
||||
$jsonOutput->{ColumnDefs} = \@columnDefs;
|
||||
$jsonOutput->{ResponseFields} = \@responseFields;
|
||||
|
||||
foreach my $category (keys %{$self->getCategories}) {
|
||||
push(@results,{name=>$category,fieldType=>'category'});
|
||||
|
|
@ -1144,6 +1149,7 @@ sub www_search {
|
|||
|
||||
my $self = shift;
|
||||
my $var = $self->get;
|
||||
my $db = $self->session->db;
|
||||
|
||||
$var->{compareForm} = $self->getCompareForm;
|
||||
$self->session->style->setScript($self->session->url->extras('yui/build/yahoo/yahoo-min.js'),
|
||||
|
|
@ -1175,7 +1181,7 @@ sub www_search {
|
|||
my $attributes;
|
||||
my @attribute_loop;
|
||||
my $categoryLoopName = $self->session->url->urlize($category)."_loop";
|
||||
$attributes = $self->session->db->read("select * from Matrix_attribute where category =? and assetId = ?",
|
||||
$attributes = $db->read("select * from Matrix_attribute where category =? and assetId = ?",
|
||||
[$category,$self->getId]);
|
||||
while (my $attribute = $attributes->hashRef) {
|
||||
$attribute->{label} = $attribute->{name};
|
||||
|
|
@ -1184,10 +1190,14 @@ sub www_search {
|
|||
$attribute->{extras} = " class='attributeSelect'";
|
||||
if($attribute->{fieldType} eq 'Combo'){
|
||||
$attribute->{fieldType} = 'SelectBox';
|
||||
}
|
||||
if($attribute->{fieldType} eq 'SelectBox'){
|
||||
$attribute->{options} = "blank\n".$attribute->{options};
|
||||
my %options;
|
||||
tie %options, 'Tie::IxHash';
|
||||
%options = $db->buildHash('select value, value from MatrixListing_attribute
|
||||
where attributeId = ? order by value',[$attribute->{attributeId}]);
|
||||
$options{'blank'} = 'blank';
|
||||
$attribute->{options} = \%options;
|
||||
$attribute->{value} = 'blank';
|
||||
$attribute->{extras} = "style='width:120px'";
|
||||
}
|
||||
$attribute->{form} = WebGUI::Form::DynamicField->new($self->session,%{$attribute})->toHtml;
|
||||
push(@attribute_loop,$attribute);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue