Subversion Repositories wpShopGermany4

Rev

Rev 7173 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7173 Rev 7561
Line 23... Line 23...
23
    <div id="wpsg_product_add_target">
23
    <div id="wpsg_product_add_target">
24
        
24
        
25
    </div>
25
    </div>
26
    
26
    
27
</form>
27
</form>
28
 
28
 
29
<script>
29
<script>
30
    
30
    
31
    function wpsg_loadProduct(product_id, order_product_id) {
31
    function wpsg_loadProduct(product_id, order_product_id) {
32
 
32
 
33
        jQuery('#wpsg_product_add_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
33
        jQuery('#wpsg_product_add_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
34
        
34
        
35
        jQuery.ajax( {
35
        jQuery.ajax( {
-
 
36
            url: '<?php
-
 
37
	
36
            url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&do=product&noheader=1&edit_id=<?php $_REQUEST['edit_id']; ?>',
38
				echo wpsg_admin_url('Order', 'view', ['subaction' => 'addProduct', 'do' => 'product', 'edit_id' => $_REQUEST['edit_id']], ['noheader' => '1'], true);
-
 
39
				
-
 
40
			?>',
37
            data: {
41
            data: {
38
                product_id: product_id,
42
                product_id: product_id,
39
                order_product_id: order_product_id
43
                order_product_id: order_product_id
40
            },
44
            },
41
            success: function(data) {
45
            success: function(data) {
Line 50... Line 54...
50
    jQuery(document).ready(function() {
54
    jQuery(document).ready(function() {
51
 
55
 
52
        jQuery('#wpsg_product_add_form').on('submit', function() { return false; } );
56
        jQuery('#wpsg_product_add_form').on('submit', function() { return false; } );
53
        
57
        
54
        jQuery('#product_search').autocomplete( {
58
        jQuery('#product_search').autocomplete( {
-
 
59
            source: '<?php 
-
 
60
				
55
            source: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&do=search&noheader=1&edit_id=<?php echo $_REQUEST['edit_id']; ?>',
61
				echo wpsg_admin_url('Order', 'view', ['subaction' => 'addProduct', 'do' => 'search', 'edit_id' => $_REQUEST['edit_id']], ['noheader' => '1'], true); 
-
 
62
				
-
 
63
			?>',
56
            minLength: 2,
64
            minLength: 2,
57
            appendTo: ".autocomplete_wrap",
65
            appendTo: ".autocomplete_wrap",
58
            select: function(event, ui) {
66
            select: function(event, ui) {
59
 
67
 
60
                wpsg_loadProduct(ui.item.id, <?php echo ((wpsg_isSizedInt($_REQUEST['order_product_id']))?$_REQUEST['order_product_id']:0); ?>);
68
                wpsg_loadProduct(ui.item.id, <?php echo ((wpsg_isSizedInt($_REQUEST['order_product_id']))?$_REQUEST['order_product_id']:0); ?>);