added drag bar

This commit is contained in:
JT Smith 2006-05-18 23:04:23 +00:00
parent dcad29dd8c
commit 5041f31025
6 changed files with 28 additions and 11 deletions

View file

@ -1,5 +1,6 @@
6.99.2
- Data Forms now send email as HTML.
- Added full drag bar to the top of each asset as discussed in Community IRC.
6.99.1
- Bugfixes on dashboard to fix template errors.

File diff suppressed because one or more lines are too long

View file

@ -645,7 +645,7 @@ sub sendEmail {
}
if ($to =~ /\@/) {
my $mail = WebGUI::Mail::Send->create($self->session,{to=>$to, subject=>$subject, cc=>$cc, from=>$from, bcc=>$bcc});
$mail->addText($message);
$mail->addHtml($message);
$mail->addFooter;
$mail->queue;
} else {
@ -667,13 +667,13 @@ sub sendEmail {
});
my $mail = WebGUI::Mail::Send->create($self->session,{to=>$cc, subject=>$subject, from=>$from});
if ($cc) {
$mail->addText($message);
$mail->addHtml($message);
$mail->addFooter;
$mail->queue;
}
if ($bcc) {
WebGUI::Mail::Send->create($self->session, {to=>$bcc, subject=>$subject, from=>$from});
$mail->addText($message);
$mail->addHtml($message);
$mail->addFooter;
$mail->queue;
}

View file

@ -220,7 +220,9 @@ sub view {
if ($self->{_viewVars}{showAdmin} && $self->canEditIfLocked) {
# 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
$self->{_viewVars}{"dragger.icon"} = $self->session->icon->drag();
#$self->{_viewVars}{"dragger.icon"} = $self->session->icon->drag();
$self->{_viewVars}{"dragger.icon"} = '<div id="dragTrigger" class="dragTrigger">'.$self->session->icon->drag('class="dragTrigger"').'</div></div>';
#$self->{_viewVars}{"dragger.icon"} = '<div id="dragTrigger" class="dragTrigger dragTriggerFormatting"> / / / / / / / / / / </div>';
$self->{_viewVars}{"dragger.init"} = '
<iframe id="dragSubmitter" style="display: none;" src="'.$self->session->url->extras('spacer.gif').'"></iframe>
<script type="text/javascript">

View file

@ -175,16 +175,21 @@ sub delete {
#-------------------------------------------------------------------
=head2 drag ( )
=head2 drag ( extras )
Generates an icon that can be used to drag content.
=head2 extras
Classes, Ids, Javascript triggers, or whatever else you need to add to the image to make it a drag trigger.
=cut
sub drag {
my $self = shift;
my $extras = shift;
my $i18n = WebGUI::International->new($self->session,'Icon');
return '<p style="display:inline;vertical-align:middle;"><img id="dragTrigger" class="dragTrigger" src="'.$self->getBaseURL().'drag.gif" style="vertical-align:middle;border: 0px;" alt="'.$i18n->get('Drag').'" title="'.$i18n->get('Drag').'" /></p>';
return '<p style="display:inline;vertical-align:middle;"><img '.$extras.' src="'.$self->getBaseURL().'drag.gif" style="vertical-align:middle;border: 0px;" alt="'.$i18n->get('Drag').'" title="'.$i18n->get('Drag').'" /></p>';
}
#-------------------------------------------------------------------

View file

@ -6,10 +6,19 @@ div.dragable:hover {
border: 1px dotted #cccccc;
}
.dragTrigger{
position: absolute;
cursor: move;
right: 0px;
top: 0px;
padding: 0px;
margin: 0px;
}
#dragTrigger{
width: 100%;
height: 18px;
font-size: 10px;
color: #888888;
background-color: #cccccc;
border: 1px solid #888888;
opacity: 0.5;
text-align: right;
}
.dragging{
position: relative;