
Untitled
By: a guest on
Jul 18th, 2012 | syntax:
None | size: 1.23 KB | hits: 13 | expires: Never
JQuery extend custom object with parameters
var grid = $('.grid').loadGrid({
inlineEditing:<?php echo $edit ? 'true' : 'false'; ?>,
adding:<?php echo $edit ? 'true' : 'false'; ?>,
deleting:<?php echo $edit ? 'true' : 'false'; ?>,
pagerLocation:"top",
width:1320,
loadComplete: function() {
exp_sql = $(this).data().exp_sql;
}
});
<?
$tab = '1';
if(!@in_array($tab,$SECTIONS,true) AND $LEVEL != 1){ $edit = 0;}
?>
<table class="grid cat" action="div-m.php" title="Master catalogue info">
<th col="Catalogue" editable="<?php echo $edit ? 'select' : ''; ?>">Catalogue No</th>
<th col="ISRC" editable="<?php echo $edit ? 'text' : ''; ?>">ISRC</th>
...
</table>
...
<table class="grid isrc" action="div-d.php" title="Digital / detailed info">
...
</table>
<?php
$tab = '1';
$grid = 'cat';
if(!@in_array($tab,$SECTIONS,true) AND $LEVEL != 1){ $edit = 0;}
?>
<script type="text/javascript">
var date = {dateRange:"street_date"};
$.extend.apply(grid, date);
// $.extend(grid, dateRange:"street_date");
</script>
<table class="grid cat" action="div-m.php" title="Master catalogue info">