fixing several misc. bugs. draggable, backToPage, tooLateDates

This commit is contained in:
Matthew Wilson 2005-11-18 17:10:26 +00:00
parent 9c8f46177a
commit 542f685014
7 changed files with 19 additions and 39 deletions

View file

@ -202,7 +202,7 @@ sub definition {
},
endDate=>{
fieldType=>'dateTime',
defaultValue=>32472169200
defaultValue=>2082783600
},
status=>{
noFormPost=>1,

View file

@ -173,16 +173,5 @@ sub view {
return $self->processTemplate(\%var, $templateId);
}
#-------------------------------------------------------------------
#sub www_edit {
# my $self = shift;
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
# $self->getAdminConsole->setHelp("article add/edit","Asset_Article");
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get("12","Asset_Article"));
#}
1;

View file

@ -97,7 +97,7 @@ sub getEditForm {
$tabform->getTab("properties")->whatNext(
-options=>{
view=>WebGUI::International::get(823, "Asset_Folder"),
""=>WebGUI::International::get(847, "Asset_Folder")
"viewParent"=>WebGUI::International::get(847, "Asset_Folder")
},
-value=>"view"
);

View file

@ -106,7 +106,7 @@ sub getEditForm {
$tabform->getTab("properties")->whatNext(
-options=>{
view=>WebGUI::International::get(823, 'Asset_Layout'),
""=>WebGUI::International::get(847, 'Asset_Layout')
viewParent=>WebGUI::International::get(847, 'Asset_Layout')
},
-value=>"view"
);
@ -138,7 +138,7 @@ sub getEditForm {
#-------------------------------------------------------------------
sub view {
my $self = shift;
my $children = $self->getLineage( ["children"], { returnObjects=>1, excludeClasses=>["WebGUI::Asset::Wobject::Layout"] });
my $children = $self->getLineage( ["children"], { returnObjects=>1, excludeClasses=>["WebGUI::Asset::Wobject::Layout","WebGUI::Asset::Wobject::Dashboard"] });
my %vars;
# I'm sure there's a more efficient way to do this. We'll figure it out someday.
my @positions = split(/\./,$self->get("contentPositions"));
@ -218,14 +218,6 @@ sub view {
return $self->processTemplate(\%vars,$self->get("templateId"));
}
#sub www_edit {
# my $self = shift;
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
# $self->getAdminConsole->setHelp("layout add/edit", "Asset_Layout");
# return $self->getAdminConsole->render($self->getEditForm->print,"Edit Layout");
#}
sub www_setContentPositions {
my $self = shift;
return WebGUI::Privilege::insufficient() unless ($self->canEdit);

View file

@ -158,7 +158,7 @@ sub duplicate {
$qdata->{Survey_sectionId} = $sdata->{Survey_sectionId};
$qdata->{Survey_questionId} = $newAsset->setCollateral("Survey_question","Survey_questionId",$qdata,1,0,"Survey_id");
while ($adata = $answers->hashRef) {
$responses = WebGUI::SQL->read("select * from Survey_questionResponse where Survey_answerId=".quote($adata->{Survey_answerId}));
my $responses = WebGUI::SQL->read("select * from Survey_questionResponse where Survey_answerId=".quote($adata->{Survey_answerId}));
$adata->{Survey_answerId} = "new";
$adata->{Survey_questionId} = $qdata->{Survey_questionId};
$adata->{Survey_id} = $newSurveyId;
@ -308,7 +308,7 @@ sub getEditForm {
$tabform->getTab('properties')->whatNext(
-options=>{
editQuestion=>WebGUI::International::get(28,'Asset_Survey'),
backToPage=>WebGUI::International::get(745,'Asset_Survey')
viewParent=>WebGUI::International::get(745,'Asset_Survey')
},
-value=>"editQuestion",
-hoverHelp => WebGUI::International::get('what next','Asset_Survey'),
@ -795,14 +795,6 @@ sub www_deleteAllResponsesConfirm {
return "";
}
#-------------------------------------------------------------------
#sub www_edit {
# my $self = shift;
# return WebGUI::Privilege::insufficient() unless $self->canEdit;
# $self->getAdminConsole->setHelp("survey add/edit","Asset_Survey");
# return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get(2,'Asset_Survey'));
#}
#-------------------------------------------------------------------
sub www_editSave {
return WebGUI::Privilege::insufficient() unless ($_[0]->canEdit);
@ -811,7 +803,6 @@ sub www_editSave {
$session{form}{qid} = "new";
return $_[0]->www_editQuestion;
}
return $output;
}

View file

@ -13,6 +13,9 @@ div.dragable:hover {
}
.dragging{
position: relative;
opacity:0.6;
-moz-opacity:0.6;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60);
cursor: hand;
z-index: 2000;
}

View file

@ -181,9 +181,9 @@ function dragable_move(e){
}
dragable_adjustScrollBars(e);
z.style.left=temp1+e.clientX-x;
z.style.top=temp2+e.clientY-y;
// alert('x is: '+ (temp1+e.clientX-x));
z.style.left=(temp1+e.clientX-x)+"px";
z.style.top=(temp2+e.clientY-y)+"px";
return false
}else {
@ -221,8 +221,13 @@ function dragable_dragStart(e){
dragging=true
z=fObj;
temp1=parseInt(z.style.left+0)
temp2=parseInt(z.style.top+0)
temp1=z.style.left;
temp1=temp1.replace(/px/g,'')+0;
temp1=parseInt(temp1);
temp2=z.style.top;
temp2=temp2.replace(/px/g,'')+0;
temp2=parseInt(temp2);
// alert(temp1,temp2);
x=e.clientX;
y=e.clientY;
return false