diff --git a/vendors/shells/vault.php b/vendors/shells/vault.php index 68179e41..e975e0ed 100755 --- a/vendors/shells/vault.php +++ b/vendors/shells/vault.php @@ -25,7 +25,7 @@ class VaultShell extends Shell { if($testing == 1) { $email_dir = '/Users/karlcordes/Sites/quotenik/app/emails'; - + $ripmime_path = '/opt/local/bin/ripmime'; } @@ -39,7 +39,7 @@ class VaultShell extends Shell { if($number_of_messages == 0) { exit(0); } - + /* Loop through the messages and sort them into ones to be processed or discarded */ for ($i=30000; $i <= $number_of_messages; $i++) { @@ -162,7 +162,7 @@ class VaultShell extends Shell { } - // $this->rmdirr($email_dir); //delete all attachments from the working directory. Easiest way to stop random files persisting + // $this->rmdirr($email_dir); //delete all attachments from the working directory. Easiest way to stop random files persisting @@ -327,7 +327,7 @@ class VaultShell extends Shell { if(isset($output[0])) { //Found a valid-looking Enquiry Number $fetched_enquirynumber = $output[0]; - // echo $fetched_enquirynumber."\n"; + // echo $fetched_enquirynumber."\n"; $enquiry = $this->Enquiry->findByTitle($fetched_enquirynumber); if($enquiry) { return $enquiry; @@ -387,8 +387,8 @@ class VaultShell extends Shell { function getUniqId($email_dir) { $uniqid = uniqid(null,TRUE); //while(is_dir($email_dir."/".$uniqid) == TRUE) { - // - // } + // + // } return $uniqid; } diff --git a/views/elements/email_table_ajax.ctp b/views/elements/email_table_ajax.ctp index ed8f6643..5608493c 100755 --- a/views/elements/email_table_ajax.ctp +++ b/views/elements/email_table_ajax.ctp @@ -1,17 +1,19 @@ +link('email_table'); ?> + - - - - - - - - - +
-
- +
image('attach.png'); ?>
+ + + + + + + + + - > + > - - + - - - - + + + - - + + + + + -
image('attach.png'); ?>
0) { + 0) { echo $html->image('attach.png'); } ?> - highlight($ajax->link($email['Email']['subject'], array('controller'=> 'emails', 'action'=>'frame/', $email['Email']['id']), array('update'=>'showemail')), 'Quotation'); ?>highlight($html->link($email['Email']['subject'], array('controller'=> 'emails', 'action'=>'frame/', $email['Email']['id'])), 'Quotation'); + echo $text->highlight($html->link($email['Email']['subject'], '#', array('class'=>'viewLink', 'id'=>$email['Email']['id'])), 'Quotation'); + ?> - link(__('View', true), array('controller'=> 'emails', 'action'=>'view/', $email['Email']['id'])); - echo $ajax->link('View', array('controller'=>'emails', 'action'=>'frame/', $email['Email']['id']), array('update' => 'showemail')); - echo $html->link('Print', array('controller' => 'emails', 'action'=>'printview/', $email['Email']['id'])); - ?> -
- + + + + + +
+ +
\ No newline at end of file diff --git a/views/emails/frame.ctp b/views/emails/frame.ctp index 28cb3c31..e5124660 100755 --- a/views/emails/frame.ctp +++ b/views/emails/frame.ctp @@ -1,7 +1,6 @@
-

Email

diff --git a/views/emails/show.ctp b/views/emails/show.ctp index f175a7d8..0158a290 100755 --- a/views/emails/show.ctp +++ b/views/emails/show.ctp @@ -1,3 +1,5 @@ + +
> diff --git a/views/layouts/default.ctp b/views/layouts/default.ctp index 9c9c0a4a..6dfa64c2 100755 --- a/views/layouts/default.ctp +++ b/views/layouts/default.ctp @@ -67,7 +67,7 @@
  • link('Contacts', '/contacts/index'); ?>
      -
    • link('Contact Index', '/contacts/index'); ?>
    • +
    • link('Contact Index', '/contacts/index'); ?>
  • diff --git a/webroot/css/quotenik.css b/webroot/css/quotenik.css index b47935cd..680b7b38 100755 --- a/webroot/css/quotenik.css +++ b/webroot/css/quotenik.css @@ -286,9 +286,14 @@ a#mailheaders { color: #003d4c; } + + #viewemail { text-align: left; font-size: 80%; + clear: both; + display: block; + } @@ -309,13 +314,14 @@ a#mailheaders { } #emailframe { - float: left; - width: 50%; + + clear: both; + display: block; + } #emailattachments { - padding-right: 2em; - float: right; + } dl#showemail { @@ -1038,9 +1044,8 @@ div.tipbox { li.selected { background-color: #ffb; } span { + - font-weight: bold; - font-size: 100%; } span.note { diff --git a/webroot/js/email_table.js b/webroot/js/email_table.js new file mode 100644 index 00000000..067369d3 --- /dev/null +++ b/webroot/js/email_table.js @@ -0,0 +1,58 @@ +/** + * file: email_table.js + * date: Tue 23 March 2010 + * author: Karl Cordes + * + * purpose: uses jQuery to create a mail client-like interface for viewing the emails associated with an enquiry (or contact) + * + */ + + +$(function () { + + + + $("#ViewDialog").dialog({ + autoOpen: false, + + width: 900, + modal: false, + buttons: { + + Close: function() { + $(this).dialog('close'); + } + }, + close: function() { + //What happens on close goes here. + } + + + }); + + $('.viewLink').click(function() { + + var currentID = $(this).attr('id'); + var subject = $(this).text(); + + $("#ViewDialog").dialog("option", "title", subject); + + $.get('/emails/frame/'+currentID, function (data) { + $("#ViewDialog").html(data); + + }); + + + $("#ViewDialog").dialog('open'); + + return false; + + + + + + }) + + +} +); \ No newline at end of file