WordPress.org

Plugin Directory

Changeset 1688293 for event-post


Ignore:
Timestamp:
06/30/17 13:06:18 (5 months ago)
Author:
bastho
Message:

Initial work on datepicker for search form

Location:
event-post/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • event-post/trunk/eventpost.php

    r1684297 r1688293  
    461461     * Enqueue JS files in admin 
    462462     */ 
    463     public function admin_scripts($deps = array('jquery')) { 
     463    public function admin_scripts($deps = array('jquery'), $force=false) { 
    464464        $page = basename($_SERVER['SCRIPT_NAME']); 
    465         if( $page!='post-new.php' && !($page=='post.php' && filter_input(INPUT_GET, 'action')=='edit') && !($page=='options-general.php' && filter_input(INPUT_GET, 'page')=='event-settings') ){ 
     465        if(!$force && $page!='post-new.php' && !($page=='post.php' && filter_input(INPUT_GET, 'action')=='edit') && !($page=='options-general.php' && filter_input(INPUT_GET, 'page')=='event-settings')){ 
    466466            return; 
    467467        } 
     
    17551755 
    17561756        // Search form 
     1757        $this->admin_scripts(null, true); 
    17571758        include (plugin_dir_path(__FILE__) . 'views/search-form.php'); 
    17581759 
  • event-post/trunk/views/search-form.php

    r1684297 r1688293  
    1515            <?php _e('Between:', 'event-post'); ?> 
    1616        </label> 
    17         <input id="eventpost-search-from-<?php echo $list_id; ?>" type="date" name="from" value="<?php echo esc_attr($from); ?>"/> 
     17        <input id="eventpost-search-from-<?php echo $list_id; ?>" type="text" name="from" value="<?php echo esc_attr($from); ?>" class="eventpost-datepicker-simple"/> 
    1818 
    1919        <label for="eventpost-search-to-<?php echo $list_id; ?>"> 
    2020            <?php _e('to:', 'event-post'); ?> 
    2121        </label> 
    22         <input id="eventpost-search-from-<?php echo $list_id; ?>" type="date" name="to" value="<?php echo esc_attr($to); ?>"/> 
     22        <input id="eventpost-search-from-<?php echo $list_id; ?>" type="text" name="to" value="<?php echo esc_attr($to); ?>" class="eventpost-datepicker-simple"/> 
    2323    </div> 
    2424    <?php endif; ?> 
Note: See TracChangeset for help on using the changeset viewer.