Changes. Considering switching javascript to Jquery.

This commit is contained in:
Karl Cordes 2009-11-10 11:26:25 +11:00
parent 206cd90b8a
commit 32199181d6
7 changed files with 138 additions and 143 deletions

View file

@ -30,6 +30,9 @@ class QuoteProductsController extends AppController {
$product = $this->QuoteProduct->Product->findById($this->data['QuoteProduct']['product_id']);
$this->data['QuoteProduct']['description'] = $product['Product']['description'];
$numberOfItems - $this->Quo
if ($this->QuoteProduct->save($this->data)) {
$quoteid = $this->data['QuoteProduct']['quote_id'];

View file

@ -27,7 +27,8 @@ class QuoteProduct extends AppModel {
'conditions' => '',
'fields' => '',
'order' => ''
)
),
);

View file

@ -136,8 +136,3 @@ $boxdata['enquirynumber'] = $enquiry['Enquiry']['title'];
<h3><?php __($number_of_quotes.' Quotes in this Enquiry');?></h3>
<?php echo $this->element('quote_table', $quotes); ?>
</div>
<?
debug($smtp_errors);
?>

View file

@ -3,141 +3,141 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php echo $html->charset(); ?>
<title>
<?php __('CMC'); ?>
<?php echo $title_for_layout; ?>
</title>
<? echo $html->meta('icon'); ?>
<?php
echo $html->css('quotenik');
echo $scripts_for_layout;
//echo $javascript->link('jquery');
//echo $javascript->link('jquery-ui');
echo $javascript->link('prototype');
echo $javascript->link('scriptaculous');
echo $javascript->link('ckeditor/ckeditor');
<head>
<?php echo $html->charset(); ?>
<title>
<?php __('CMC'); ?>
<?php echo $title_for_layout; ?>
</title>
<? echo $html->meta('icon'); ?>
<?php
echo $html->css('quotenik');
?>
echo $scripts_for_layout;
//echo $javascript->link('jquery');
//echo $javascript->link('jquery-ui');
echo $javascript->link('prototype');
echo $javascript->link('scriptaculous');
echo $javascript->link('ckeditor/ckeditor');
</head>
<body>
<div id="container">
<div id="header">
<h3 id="logo">CMC Technologies</h3>
?>
<div id="username">
<?php
if(isset($currentuser) == FALSE) {
echo $html->link('Login', '/users/login');
}
else {
$logoutlink = $html->link('Logout', '/users/logout');
echo "Logged in as: ". $html->link($currentuser['User']['username'], '/users/view/'. $currentuser['User']['id']). ' (' . $logoutlink.')';
}
?>
</div>
</head>
<body>
<div id="container">
<div id="header">
<h3 id="logo">CMC Technologies</h3>
<div id = "nav">
<ul id="nav">
<li><h3><?php echo $html->link('Enquiries', '/enquiries/index'); ?></h3>
<ul>
<li><?php echo $html->link('Enquiry Register', '/enquiries/index'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Customers', '/customers/index'); ?></h3>
<ul>
<li><?php echo $html->link('Customer Index', '/customers/index'); ?></li>
<li><?php echo $html->link('Find Customer', '/customers/find'); ?></li>
<li><?php echo $html->link('Add Customer', '/customers/add'); ?></li>
<li><?php echo $html->link('Industries', '/industries/index'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Contacts', '/contacts/index'); ?></h3>
<ul>
<li><?php echo $html->link('Contact Index', '/contacts/index'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Products', '/products/index'); ?></h3>
<ul>
<li><?php echo $html->link('Product Index', '/products/index'); ?></li>
<li><?php echo $html->link('Add Product', '/products/add'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Quotes', '/quotes/index'); ?></h3>
<ul>
<li><?php echo $html->link('Quote Index', '/quotes/index'); ?></li>
<li><?php echo $html->link('Find Quote', '/quotes/find'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Principles', '/principles/index'); ?></h3>
<ul>
<li><?php echo $html->link('Principle Index', '/principles/index'); ?></li>
<li><?php echo $html->link('Add Principle', '/principles/add'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Users', '/users/index'); ?></h3>
<ul>
<li><?php echo $html->link('Users Index', '/users/index'); ?></li>
<li><?php echo $html->link('Add User', '/users/add'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Help', '/pages/help'); ?></h3>
<ul>
<li><?php echo $html->link('About', '/pages/about'); ?></li>
</ul>
</li>
</ul>
<div id="username">
</div>
<?php
if(isset($currentuser) == FALSE) {
echo $html->link('Login', '/users/login');
}
else {
$logoutlink = $html->link('Logout', '/users/logout');
echo "Logged in as: ". $html->link($currentuser['User']['username'], '/users/view/'. $currentuser['User']['id']). ' (' . $logoutlink.')';
}
?>
</div>
</div>
<div id="content">
<?php
if ($session->check('Message.flash')):
$session->flash();
endif;
?>
<div id = "nav">
<ul id="nav">
<li><h3><?php echo $html->link('Enquiries', '/enquiries/index'); ?></h3>
<ul>
<li><?php echo $html->link('Enquiry Register', '/enquiries/index'); ?></li>
</ul>
</li>
<?php echo $content_for_layout; ?>
<li><h3><?php echo $html->link('Customers', '/customers/index'); ?></h3>
<ul>
<li><?php echo $html->link('Customer Index', '/customers/index'); ?></li>
<li><?php echo $html->link('Find Customer', '/customers/find'); ?></li>
<li><?php echo $html->link('Add Customer', '/customers/add'); ?></li>
<li><?php echo $html->link('Industries', '/industries/index'); ?></li>
</ul>
</li>
</div>
<div id="footer">
<?php echo $html->link(
$html->image('cake.power.gif', array('alt'=> __("CakePHP: the rapid development php framework", true), 'border'=>"0")),
'http://www.cakephp.org/',
array('target'=>'_new'), null, false
);
?>
</div>
</div>
<li><h3><?php echo $html->link('Contacts', '/contacts/index'); ?></h3>
<ul>
<li><?php echo $html->link('Contact Index', '/contacts/index'); ?></li>
</ul>
</li>
<?php
$mem_usage = memory_get_usage(true);
if ($mem_usage < 1024)
echo $mem_usage." bytes";
elseif ($mem_usage < 1048576)
echo round($mem_usage/1024,2)." kilobytes";
else
echo round($mem_usage/1048576,2)." megabytes";
echo "<br/>";
?>
<?php echo $cakeDebug; ?>
<li><h3><?php echo $html->link('Products', '/products/index'); ?></h3>
<ul>
<li><?php echo $html->link('Product Index', '/products/index'); ?></li>
<li><?php echo $html->link('Add Product', '/products/add'); ?></li>
</ul>
</li>
</body>
<li><h3><?php echo $html->link('Quotes', '/quotes/index'); ?></h3>
<ul>
<li><?php echo $html->link('Quote Index', '/quotes/index'); ?></li>
<li><?php echo $html->link('Find Quote', '/quotes/find'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Principles', '/principles/index'); ?></h3>
<ul>
<li><?php echo $html->link('Principle Index', '/principles/index'); ?></li>
<li><?php echo $html->link('Add Principle', '/principles/add'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Users', '/users/index'); ?></h3>
<ul>
<li><?php echo $html->link('Users Index', '/users/index'); ?></li>
<li><?php echo $html->link('Add User', '/users/add'); ?></li>
</ul>
</li>
<li><h3><?php echo $html->link('Help', '/pages/help'); ?></h3>
<ul>
<li><?php echo $html->link('About', '/pages/about'); ?></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="content">
<?php
if ($session->check('Message.flash')):
$session->flash();
endif;
?>
<?php echo $content_for_layout; ?>
</div>
<div id="footer">
<?php echo $html->link(
$html->image('cake.power.gif', array('alt'=> __("CakePHP: the rapid development php framework", true), 'border'=>"0")),
'http://www.cakephp.org/',
array('target'=>'_new'), null, false
);
?>
</div>
</div>
<?php
$mem_usage = memory_get_usage(true);
if ($mem_usage < 1024)
echo $mem_usage." bytes";
elseif ($mem_usage < 1048576)
echo round($mem_usage/1024,2)." kilobytes";
else
echo round($mem_usage/1048576,2)." megabytes";
echo "<br/>";
?>
<?php echo $cakeDebug; ?>
</body>
</html>

View file

@ -8,10 +8,8 @@ echo $paginator->counter(array(
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
<th><?php echo $paginator->sort('id');?></th>
<th><?php echo $paginator->sort('principle_id');?></th>
<th><?php echo $paginator->sort('title');?></th>
<th><?php echo $paginator->sort('description');?></th>
<th><?php echo $paginator->sort('model_number');?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
@ -24,18 +22,14 @@ foreach ($products as $product):
}
?>
<tr<?php echo $class;?>>
<td>
<?php echo $product['Product']['id']; ?>
</td>
<td>
<?php echo $html->link($product['Principle']['name'], array('controller'=> 'principles', 'action'=>'view', $product['Principle']['id'])); ?>
</td>
<td>
<?php echo $product['Product']['title']; ?>
</td>
<td>
<?php echo $product['Product']['description']; ?>
</td>
<td>
<?php echo $product['Product']['model_number']; ?>
</td>

View file

@ -105,6 +105,8 @@ else {
$tcpdf->Output($output_dir.$filename, 'F');
echo "<br> Wrote: ".$output_dir.$filename;
//$tcpdf->Output('cmcquote.pdf', 'D');

View file

@ -183,8 +183,8 @@ ul.principle-emails {
}
#nav h3 a{
font-size: 120%;
font-weight: bold;
font-size: 160%;
font-weight: normal;
color:#FFFFFF;
width: 100%;
/* background: #E9E9E9; */
@ -247,7 +247,7 @@ ul.principle-emails {
background: #fff;
clear: both;
color: #333;
padding: 5px;
padding: 10px;
overflow: auto;
}
#footer {