Plugin Directory

Changeset 1605468


Ignore:
Timestamp:
02/28/2017 08:27:06 PM (9 years ago)
Author:
upcast
Message:

Fixed fullscreen and no-plan bug

Location:
elvantools/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • elvantools/trunk/elvantotools.php

    r1605175 r1605468  
    33 * @package ElvantoTools
    44 * @author JagTech
    5  * @version 1.3
     5 * @version 1.4
    66 */
    77/*
     
    1010Description: Display rosters and song lists from Elvanto
    1111Author: JagTech
    12 Version: 1.3
     12Version: 1.4
    1313Author URI: http://jagtech.biz
    1414*/
     
    7676    $display_columns = explode(',',$columns);
    7777    $content = '['.implode('] [',$display_columns).']';
    78     $prefix = '<div class=\1elvantotools_roster '.($fullscreen ? 'elvantotools_fullscreen' : '').'"><div class="elvantotools_table_scroll"><table>';
     78    $prefix = '<div class="elvantotools_roster '.($fullscreen ? 'elvantotools_fullscreen' : '').'"><div class="elvantotools_table_scroll"><table>';
    7979    $suffix = '</table></div></div>';
    8080    $top_left_content = '<span class="dashicons dashicons-editor-expand elvantotools_go_fullscreen '.($fullscreen ? 'elvantotools_fullscreen_on' : '').'"></span>';
  • elvantools/trunk/readme.txt

    r1605169 r1605468  
    44Requires at least: 4.2.2
    55Tested up to: 4.7.2
    6 Stable tag: 1.3
     6Stable tag: 1.4
    77
    88ElvantoTools is a plugin that allows the display of Elvanto information
     
    5656v1.3
    5757Added service plan popup
     58v1.4
     59Fixed fullscreen and no-plan bug
  • elvantools/trunk/style.css

    r1605169 r1605468  
    126126
    127127.elvantotools-popup-trigger { cursor:pointer; }
    128 .elvantotools-overlay { position: fixed; top:0; bottom:0; left:0; right: 0; background: rgba(0,0,0, 0.7); transition: opacity 500ms; visibility: hidden; opacity: 0; z-index: 999999}
     128.elvantotools-overlay { position: fixed; top:0; bottom:0; left:0; right: 0; background: rgba(0,0,0, 0.7); transition: opacity 500ms; visibility: hidden; opacity: 0; z-index: 9999999 }
    129129.elvantotools-overlay:target { visibility: visible; opacity: 1; }
    130130.elvantotools-popup { width: 30% ; position: relative; transition: all 5s ease-in-out; background: #fff; padding: 20px; margin: 50px auto; max-height:75%; overflow-y:scroll }
  • elvantools/trunk/widget.php

    r1605169 r1605468  
    152152            $service_series[$service_date][$service_name] = $service['series_name'];
    153153            $service_ids[$service_date][$service_name] = $service['id'];
    154             foreach ($service['plans']['plan'] as $plan) {
    155                 //error_log('plan='.print_r($plan,true));
    156                 $new_plan = array();
    157                 foreach ($plan['items']['item'] as $item) {
    158                     $new_item = array();
    159                     $new_item['duration'] = $item['duration'];
    160                     $new_item['title'] = $item['title'];
    161                     $new_item['type'] = $item['heading'] ? 'heading' : ($item['song'] ? 'song' : 'item');
    162                     $new_item['description'] = $item['description'];
    163                     $new_plan[] = $new_item;
    164                 }               
    165                 $service_plans[$service_date][$service_name] = $new_plan;
     154            if (isset($service['plans']) && is_array($service['plans']) && isset($service['plans']['plan']) && is_array($service['plans']['plan'])) {
     155                foreach ($service['plans']['plan'] as $plan) {
     156                    //error_log('plan='.print_r($plan,true));
     157                    $new_plan = array();
     158                    foreach ($plan['items']['item'] as $item) {
     159                        $new_item = array();
     160                        $new_item['duration'] = $item['duration'];
     161                        $new_item['title'] = $item['title'];
     162                        $new_item['type'] = $item['heading'] ? 'heading' : ($item['song'] ? 'song' : 'item');
     163                        $new_item['description'] = $item['description'];
     164                        $new_plan[] = $new_item;
     165                    }               
     166                    $service_plans[$service_date][$service_name] = $new_plan;
     167                }
    166168            }
    167169         }
     
    232234            $details = '&nbsp;<a class="elvantotools-popup-trigger" href="#[id]"><span class="dashicons dashicons-format-aside"></span></a><div id="[id]" class="elvantotools-overlay"><div class="elvantotools-popup"><a class="elvantotools-popup-close" href="#" >&times;</a><div class="elvantotools-popup-content">[plan]</div></div></div>';
    233235       
    234         error_log('service_dates='.print_r($service_dates,true));
     236        //error_log('service_dates='.print_r($service_dates,true));
    235237       
    236238        foreach ($service_dates as $service_date=>$services) {
    237239            foreach ($services as $service) {
    238                 if ($show_details) {
     240                if ($show_details && isset($service_plans[$service_date]) && is_array($service_plans[$service_date]) &&
     241                                     isset($service_plans[$service_date][$service]) && is_array($service_plans[$service_date][$service])) {
    239242                    $formatted_details = '<table class="elvantotools-service-plan"><thead><tr><th class="elvantotools-series-name" colspan="2">'.$service_series[$service_date][$service].'</th></tr></thead><tbody>';
    240243                    foreach ($service_plans[$service_date][$service] as $item) {
Note: See TracChangeset for help on using the changeset viewer.