Changeset 615438
- Timestamp:
- 10/22/2012 02:09:05 AM (13 years ago)
- Location:
- jne-shipping/trunk
- Files:
-
- 5 edited
-
display_tarif.view.php (modified) (2 diffs)
-
display_tarif_import.view.php (modified) (1 diff)
-
js-css/tarif.js (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
wpe-jneshipping.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jne-shipping/trunk/display_tarif.view.php
r601962 r615438 24 24 <option>Bulk Actions</option> 25 25 <option value="delete-all">Hapus</option> 26 <option value="reset">Kosongkan</option> 27 <!--option value="export">Export Data</option--> 26 28 </select> 27 29 <input type="submit" name="submit" class="button" value="Apply" /> … … 84 86 85 87 </div> 88 <script> 89 jQuery(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 68 68 <?php endif; ?> 69 69 70 <?php if (isset($log)) echo '<p>'.$log.'</p>'; ?> 71 70 72 </div> -
jne-shipping/trunk/js-css/tarif.js
r557694 r615438 37 37 }); 38 38 39 //alert('tes');40 39 jQuery('input[title="billingcity"], input[title="shippingcity"]').val(jQuery('#dest_location').val()).attr('readonly', 'true'); 41 40 … … 50 49 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}); 51 50 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 }); 58 52 } 59 53 … … 74 68 destLocationForm(); 75 69 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 } 92 73 }); -
jne-shipping/trunk/readme.txt
r601962 r615438 4 4 Requires at least: 3.0 5 5 Tested up to: 3.3.2 6 Stable tag: 1. 56 Stable tag: 1.6 7 7 8 8 Plugin JNE Shipping Indonesia yang khusus untuk diintegrasikan dengan plugin WP-Ecommerce. … … 36 36 == Changelog == 37 37 38 = 1.6 = 39 & Fix: Import problem. 40 & Fix: Shipping City field. 41 & Add: Kosongkan data. 42 38 43 = 1.5 = 39 44 & Fix: Warning error -
jne-shipping/trunk/wpe-jneshipping.php
r601962 r615438 4 4 Plugin URI: http://blog.chung.web.id/tag/jne-indo-shipping/ 5 5 Description: Indonesian typical JNE Shipping Module For WP E-Commerce 6 Version: 1. 56 Version: 1.6 7 7 Author: Agung Nugroho 8 8 Author URI: http://chung.web.id/ … … 109 109 } 110 110 } else if (isset($_POST['action']) && $_POST['action'] == 'import') { 111 set_time_limit(0); 112 111 113 $kota = $_POST['kota']; 112 114 $oke = $_POST['oke']; … … 116 118 $insert_opt = $_POST['insert_opt']; 117 119 120 include_once('display_tarif_import.view.php'); 121 flush(); 122 118 123 foreach ($kota as $idx => $_kota) { 119 124 if ($insert_opt == 'update') { 120 $sqlUpdate = $wpdb->prepare("INSERT ON DUPLICATE KEY UPDATE{$this->table_name} SET125 $sqlUpdate = $wpdb->prepare("INSERT INTO {$this->table_name} SET 121 126 kota = %s, 127 oke = %d, 128 reg = %d, 129 yes = %d, 130 ss = %d 131 ON DUPLICATE KEY UPDATE 122 132 oke = %d, 123 133 reg = %d, … … 126 136 ", 127 137 $_kota, 138 $oke[$idx], 139 $reg[$idx], 140 $yes[$idx], 141 $ss[$idx], 128 142 $oke[$idx], 129 143 $reg[$idx], … … 148 162 $wpdb->query($sqlInsert); 149 163 } 164 echo "<p>{$idx} Importing: {$_kota}</p>"; 165 flush(); 150 166 } 167 return; 151 168 } 152 169 … … 173 190 $__message = "Data telah dihapus."; 174 191 } 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 #} 175 200 } 176 201
Note: See TracChangeset
for help on using the changeset viewer.