Skip to content

Commit

Permalink
query by link on off feature added
Browse files Browse the repository at this point in the history
  • Loading branch information
codersaiful committed Jun 21, 2021
1 parent e6675f7 commit 7117879
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions admin/action-hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,15 @@ function wpt_configure_basic_part( $settings,$current_config_value,$field_name )
</select>
</td>
</tr>
<tr>
<th> <label class="wpt_label" for="wpt_table_query_by_url"><?php esc_html_e( 'Query by URL', 'wpt_pro' ); ?></label></th>
<td>
<select name="<?php echo esc_attr( $field_name ); ?>[query_by_url]" id="wpt_table_instant_search_filter" class="wpt_fullwidth ua_input" >
<option value="0" <?php wpt_selected( 'query_by_url', '0', $current_config_value ); ?>><?php esc_html_e( 'Off', 'wpt_pro' ); ?></option>
<option value="1" <?php wpt_selected( 'query_by_url', '1', $current_config_value ); ?>><?php esc_html_e( 'On', 'wpt_pro' ); ?></option>
</select>
</td>
</tr>
</tbody>
</table><?php do_action( 'wpto_admin_configuration_panel_bottom',$settings,$current_config_value ); ?>
</div>
Expand Down
6 changes: 6 additions & 0 deletions assets/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,12 @@
* @returns {undefined}
*/
function generate_url_by_search_query( table_id = 0, extra = '' ){
config_json = getConfig_json( table_id ); //Added vat v2.9.3.0

if(config_json.query_by_url !== '1'){
return;
}

var key,value;
var link = window.location.origin + window.location.pathname + "?table_ID=" + table_id + "&";
$('.query_box_direct_value').each(function(){
Expand Down

0 comments on commit 7117879

Please sign in to comment.