Skip to content

Commit

Permalink
fix loading issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen committed Jul 1, 2016
1 parent a042886 commit 894927f
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions hooks/edit.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
<?php

function HookRs_barcodeEditAutolivejs()
function HookRs_barcodeEditEditadditionaljs()
{
global $baseurl,$barcode_display_fields,$barcode_type,$ref;


if ($barcode_display_fields) {
?>

</script>
<script src="<?php echo $baseurl;?>/plugins/rs_barcode/lib/jquery-barcode/jquery-barcode.min.js"></script>

<script>
jQuery(window).load(function()
<script type="text/javascript">
jQuery(document).ready(function()
{
//alert(<?php echo $ref; ?>);
<?php
<?php if ($barcode_display_fields) {
foreach ($barcode_display_fields as $bcfield) {
$fieldsf = get_field($bcfield);
if (get_data_by_field($ref, $bcfield)) { ?>
//alert(<?php echo $bcfield;?>);
jQuery("input#field_<?php echo $bcfield;?>").after(jQuery("<label for='mybcdiv<?php echo $bcfield;?>' class='bclabel'>Barcode <?php echo $barcode_type; ?></label>"));
jQuery('label[for="mybcdiv<?php echo $bcfield;?>"]').after(jQuery("<div id='mybcdiv<?php echo $bcfield;?>' class='bcdivclass'>").barcode("<?php echo get_data_by_field($ref, $bcfield);?>","<?php echo $barcode_type; ?>",{barWidth:3, barHeight:40,output:'css'}));
<?php }} ?>
<?php }}} ?>
});
</script>


<?php }
}
<?php }

?>

0 comments on commit 894927f

Please sign in to comment.