Changes to have the software function without the presence of jquery-ui (which may not be complete). Also, brought the jquery libraries to the server, instead of using them as hosted from google. Some browser configurations may have an issue with what they deem to be cross site scripting.

git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@822 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-29 20:27:12 +00:00
parent d79077e279
commit 7198d7e6f4
13 changed files with 172 additions and 95 deletions

View File

@@ -178,20 +178,8 @@ echo $this->element('statement_entries', array
<script type="text/javascript"><!--
$(document).ready(function(){
$("#TxFromDate")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
$("#TxThroughDate")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
datepicker('TxFromDate');
datepicker('TxThroughDate');
resetForm();
});
--></script>

View File

@@ -393,12 +393,7 @@ Configure::write('debug', '0');
<script type="text/javascript"><!--
$(document).ready(function(){
$("#TransactionStamp")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
datepicker('TransactionStamp');
$("#customer-id").val(0);
$("#receipt-customer-name").html("INTERNAL ERROR");

View File

@@ -70,14 +70,16 @@ echo('</DIV>' . "\n"); // End #sidemenu-container
$javascript->codeBlock(
<<<JSCB
jQuery(document).ready(function(){
jQuery("#sidemenu").accordion
({ fillSpace : true,
event : "click hoverintent",
animated : "bounceslide",
if (jQuery("#sidemenu").accordion != null) {
jQuery("#sidemenu").accordion
({ fillSpace : true,
event : "click hoverintent",
animated : "bounceslide",
JSCB
. (isset($active_section) ? "\tactive : $active_section,\n" : '') .
<<<JSCB
});
}
});
JSCB
, array('inline' => false));

View File

@@ -50,7 +50,7 @@
// mechanism _additional_ to what Cake has provided :-/
$this->__scripts = array();
if (!empty($_SERVER['HTTPS']))
if (!empty($_SERVER['HTTPS']))
$protocol = 'https://';
else
$protocol = 'http://';
@@ -60,8 +60,6 @@
echo $html->css('layout') . "\n";
echo $html->css('print', null, array('media' => 'print')) . "\n";
echo $html->css('sidemenu') . "\n";
echo $javascript->link($protocol . 'ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js') . "\n";
echo $javascript->link($protocol . 'ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js') . "\n";
$theme = 'smoothness';
$theme = 'base';
@@ -72,6 +70,13 @@
$theme = 'darkness';
echo $html->css('themes/'.$theme.'/ui.all') . "\n";
echo $javascript->link('jquery-1.3.2.min') . "\n";
echo $javascript->link('jquery-ui-1.7.2.custom.min') . "\n";
//echo $javascript->link($protocol . 'ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js') . "\n";
//echo $javascript->link($protocol . 'ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js') . "\n";
//echo $javascript->link($protocol . 'ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js') . "\n";
//echo $javascript->link($protocol . 'ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js') . "\n";
echo $javascript->link('jquery.form') . "\n";
echo $javascript->link('jquery.hoverIntent') . "\n";
echo $javascript->link('pmgr') . "\n";

View File

@@ -199,19 +199,8 @@ function addChargeSource(flash) {
'</FIELDSET>'
);
$("#Entry"+id+"EffectiveDate")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
$("#Entry"+id+"ThroughDate")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
datepicker("Entry"+id+"EffectiveDate");
datepicker("Entry"+id+"ThroughDate");
return id;
}
@@ -330,12 +319,7 @@ Configure::write('debug', '0');
};
$(document).ready(function(){
$("#TransactionStamp")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
datepicker('TransactionStamp');
$("#lease-id").val(0);
$("#invoice-lease").html("INTERNAL ERROR");
@@ -355,7 +339,7 @@ Configure::write('debug', '0');
var id;
resetForm(true);
$("#TransactionStamp").datepicker('disable');
$("#TransactionStamp").attr('disabled', true);
$("#TransactionStamp").val("<?php echo date('m/d/Y', $movein['time']); ?>");
$('#TransactionStamp').after
('<input type="hidden"' +

View File

@@ -282,13 +282,7 @@ echo $form->end('Perform Move ' . ucfirst($move_type));
<script type="text/javascript"><!--
$(document).ready(function(){
$("#LeaseMoveDate")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
datepicker('LeaseMoveDate');
resetForm();
<?php if ($move_type === 'out') { ?>

View File

@@ -60,13 +60,7 @@ function resetForm() {
}
$(document).ready(function(){
$("#TransactionStamp")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
datepicker('TransactionStamp');
resetForm();
});
--></script>

View File

@@ -60,13 +60,7 @@ function resetForm() {
}
$(document).ready(function(){
$("#TransactionStamp")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
datepicker('TransactionStamp');
resetForm();
});
--></script>

View File

@@ -75,13 +75,7 @@ function resetForm() {
}
$(document).ready(function(){
$("#TransactionStamp")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
datepicker('TransactionStamp');
resetForm();
});
--></script>

View File

@@ -92,13 +92,7 @@ function resetForm() {
}
$(document).ready(function(){
$("#TransactionStamp")
.attr('autocomplete', 'off')
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
datepicker('TransactionStamp');
resetForm();
});
--></script>

19
site/webroot/js/jquery-1.3.2.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -104,14 +104,13 @@ function addDiv(id_name, div_name, into_div_name, flash, html, script) {
$("#"+into_div_name).append(html);
if (flash) {
$('#'+div_name+'-'+id)
.css({'background-color' : 'yellow'})
.slideDown()
//.animate({ backgroundColor: "yellow" }, 300)
.animate({ backgroundColor: "white" }, 500);
$('#'+div_name+'-'+id)
//.addClass('ui-state-focus')
.slideDown()
//.removeClass('ui-state-focus', 500)
;
} else {
$('#'+div_name+'-'+id)
.show();
$('#'+div_name+'-'+id).show();
}
id = id - 0 + 1;
@@ -147,13 +146,37 @@ function fmtCurrency(amount) {
//
// Datepicker helpers
function datepicker(id) {
$("#"+id).attr('autocomplete', 'off');
if ($("#"+id).datepicker != null) {
$("#"+id)
.datepicker({ constrainInput: true,
numberOfMonths: [1, 1],
showCurrentAtPos: 0,
dateFormat: 'mm/dd/yy' });
}
}
function datepickerNow(id, usetime) {
var now = new Date();
// datepicker seems to squash the time portion,
// so we have to pass in a copy of now instead.
$("#"+id).datepicker('setDate', new Date(now));
if ($("#"+id).datepicker != null) {
// datepicker seems to squash the time portion,
// so we have to pass in a copy of now instead.
$("#"+id).datepicker('setDate', new Date(now));
}
else {
$("#"+id).val(((now.getMonth()+1) < 10 ? '0' : '')
+ (now.getMonth()+1) + '/'
+ (now.getDate() < 10 ? '0' : '')
+ now.getDate() + '/'
+ now.getFullYear());
}
if (usetime == null)
usetime = true;
$("#"+id).val($("#"+id).val() +
(usetime
? (' '
@@ -168,15 +191,27 @@ function datepickerSet(fromid, id, a, b) {
var dt;
if (fromid == null)
dt = new Date();
else
dt = new Date($("#"+fromid).datepicker('getDate'));
else {
if ($("#"+id).datepicker != null)
dt = new Date($("#"+fromid).datepicker('getDate'));
else
dt = new Date($("#"+fromid).val());
}
if (a != null)
dt.setDate(a);
if (b != null)
dt.setDate(b);
$("#"+id).datepicker('setDate', dt);
if ($("#"+id).datepicker != null)
$("#"+id).datepicker('setDate', dt);
else {
$("#"+id).val(((dt.getMonth()+1) < 10 ? '0' : '')
+ (dt.getMonth()+1) + '/'
+ (dt.getDate() < 10 ? '0' : '')
+ dt.getDate() + '/'
+ dt.getFullYear());
}
}
function datepickerBOM(fromid, id) {