Plugin Directory

Changeset 615438


Ignore:
Timestamp:
10/22/2012 02:09:05 AM (13 years ago)
Author:
abu.azzam
Message:

bugfixing

Location:
jne-shipping/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • jne-shipping/trunk/display_tarif.view.php

    r601962 r615438  
    2424      <option>Bulk Actions</option>
    2525      <option value="delete-all">Hapus</option>
     26      <option value="reset">Kosongkan</option>
     27      <!--option value="export">Export Data</option-->
    2628   </select>
    2729   <input type="submit" name="submit" class="button" value="Apply" />
     
    8486
    8587</div>
     88<script>
     89jQuery(document).ready(function($) {
     90    $('form').submit(function() {
     91        if ($('[name="act"]').val() == 'delete-all')
     92            return confirm('Anda yakin ingin menghapus data?');
     93        else if ($('[name="act"]').val() == 'reset')
     94            return confirm('Anda yakin ingin mengosongkan data?');
     95    });
     96});
     97</script>
  • jne-shipping/trunk/display_tarif_import.view.php

    r557696 r615438  
    6868<?php endif; ?>
    6969
     70<?php if (isset($log)) echo '<p>'.$log.'</p>'; ?>
     71
    7072</div>
  • jne-shipping/trunk/js-css/tarif.js

    r557694 r615438  
    3737    });
    3838   
    39     //alert('tes');
    4039   jQuery('input[title="billingcity"], input[title="shippingcity"]').val(jQuery('#dest_location').val()).attr('readonly', 'true');
    4140     
     
    5049      jQuery("#dest_location").autocomplete(jneshipp.ajaxurl + "?action=GETCITY",{width:250,minChars:3, matchSubset:1, matchContains:1, max:10, cacheLength:20, formatItem:formatItem, selectOnly:1, autoFill:false, cleanUrl:false, multiple:true, multipleSeparator:'|', scroll:false}); 
    5150      jQuery("#dest_location").result(findValueDestination).next().click(function(){ });
    52    }); //alert(cnt.responseText);
    53    //jQuery('.wpsc_change_country').after(cnt.responseText);
    54  /*  jQuery('.wpsc_change_country').after('<tr class="change_dest_location"><td colspan="5">'
    55       + 'City: <input type="text" name="dest_location" id="dest_location" value="" />'
    56       + '<input type="hidden" id="dest_location_code" name="dest_location_code" value="" /></td></tr>');
    57 */
     51   });
    5852}
    5953
     
    7468   destLocationForm();
    7569   
    76 /*  jQuery("#dest_location").autocomplete(jneshipp.ajaxurl + "?action=GETCITY",{width:200,minChars:3, matchSubset:1, matchContains:1, max:10, cacheLength:20, formatItem:formatItem, selectOnly:1, autoFill:false, cleanUrl:false, multiple:true, multipleSeparator:'|', scroll:false});   
    77     jQuery("#dest_location").result(findValueDestination).next().click(function(){  });
    78 
    79     jQuery("#clearForm").click(function(){ clearData();});
    80    
    81     //allowed character
    82     jQuery("#base_location").alpha({allow:", "});
    83     jQuery("#destination").alpha({allow:", "});
    84     jQuery("#weight").numeric({allow:".,"});
    85 
    86    
    87     jQuery("#checktariff").click(function(){
    88         if(jQuery("#weight").val()=='')jQuery("#weight").val(1);
    89         return tariffValidate();           
    90     });
    91             */
     70   if (jQuery('#dest_location').val() != '' && jQuery('#dest_location').length > 0) {
     71    jQuery('input[title="billingcity"], input[title="shippingcity"]').val(jQuery('#dest_location').val()).attr('readonly', 'true');
     72   }
    9273});
  • jne-shipping/trunk/readme.txt

    r601962 r615438  
    44Requires at least: 3.0
    55Tested up to: 3.3.2
    6 Stable tag: 1.5
     6Stable tag: 1.6
    77
    88Plugin JNE Shipping Indonesia yang khusus untuk diintegrasikan dengan plugin WP-Ecommerce.
     
    3636== Changelog ==
    3737
     38= 1.6 =
     39& Fix: Import problem.
     40& Fix: Shipping City field.
     41& Add: Kosongkan data.
     42
    3843= 1.5 =
    3944& Fix: Warning error
  • jne-shipping/trunk/wpe-jneshipping.php

    r601962 r615438  
    44 Plugin URI: http://blog.chung.web.id/tag/jne-indo-shipping/
    55 Description: Indonesian typical JNE Shipping Module For WP E-Commerce
    6  Version: 1.5
     6 Version: 1.6
    77 Author: Agung Nugroho
    88 Author URI: http://chung.web.id/
     
    109109            }
    110110         } else if (isset($_POST['action']) && $_POST['action'] == 'import') {
     111            set_time_limit(0);
     112           
    111113            $kota = $_POST['kota'];
    112114            $oke = $_POST['oke'];
     
    116118            $insert_opt = $_POST['insert_opt'];
    117119           
     120            include_once('display_tarif_import.view.php');
     121            flush();
     122           
    118123            foreach ($kota as $idx => $_kota) {
    119124               if ($insert_opt == 'update') {
    120                   $sqlUpdate = $wpdb->prepare("INSERT ON DUPLICATE KEY UPDATE {$this->table_name} SET
     125                  $sqlUpdate = $wpdb->prepare("INSERT INTO {$this->table_name} SET
    121126                     kota = %s,
     127                     oke = %d,
     128                     reg = %d,
     129                     yes = %d,
     130                     ss = %d
     131                  ON DUPLICATE KEY UPDATE
    122132                     oke = %d,
    123133                     reg = %d,
     
    126136                  ",
    127137                  $_kota,
     138                  $oke[$idx],
     139                  $reg[$idx],
     140                  $yes[$idx],
     141                  $ss[$idx],
    128142                  $oke[$idx],
    129143                  $reg[$idx],
     
    148162                  $wpdb->query($sqlInsert);
    149163               }
     164               echo "<p>{$idx} Importing: {$_kota}</p>";
     165               flush();
    150166            }
     167            return;
    151168         }
    152169         
     
    173190              $__message = "Data telah dihapus.";
    174191         }
     192      } else if (isset($_POST['act']) && $_POST['act'] == 'reset') {
     193        $wpdb->query("TRUNCATE TABLE {$table_name}");
     194          $__message = "Data telah dikosongkan.";
     195      } else if (isset($_POST['act']) && $_POST['act'] == 'export') {
     196        $rs = $wpdb->get_results("SELECT * FROM {$table_name}");
     197          #$__message = "Data telah dikosongkan.";
     198          #foreach($rs as $row) {
     199          #}
    175200      }
    176201     
Note: See TracChangeset for help on using the changeset viewer.