Plugin Directory

Changeset 2020864


Ignore:
Timestamp:
01/29/2019 03:22:40 AM (7 years ago)
Author:
irmau
Message:

Fixed Active Tab Selection

Location:
irm-newsroom/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • irm-newsroom/trunk/README.txt

    r1969453 r2020864  
    55Tags: ASX, ASX Announcements, ASX Listed, ASX Share Price, financial data, finance, public company, stock price, stock price feed, irm, newsroom, social, distribution, investors, subscriptions.
    66Requires at least: 3.0.1
    7 Tested up to: 4.9.8
     7Tested up to: 5.0.3
    88Stable tag: 4.3
    99License: GPLv2 or later
     
    105105== Changelog ==
    106106
     107= 1.2.4 =
     108* Fixed active tab selection
     109
    107110= 1.2.3 =
    108111* Updates to shortcode functions
  • irm-newsroom/trunk/irm-newsroom.php

    r1969453 r2020864  
    1717 * Plugin URI:        http://www.irmnewsroom.com/
    1818 * Description:       IRM Newsroom is an ASX announcements, news and social media distribution service, which enables companies to easily communicate with investors and other stakeholders across multiple online channels – including website, email subscriptions and social media channels.
    19  * Version:           1.2.3
     19 * Version:           1.2.4
    2020 * Author:            IRM
    2121 * Author URI:        http://irmau.com
     
    197197    }
    198198
    199     echo $irm_tabs = '<h2 class="nav-tab-wrapper">
    200     <a href="?page=irm-newsroom&tab=configure" class="nav-tab">Configure IRM Newsroom</a>
    201     <a href="?page=irm-newsroom&tab=list" class="nav-tab">List Page Shortcodes</a>
    202     <a href="?page=irm-newsroom&tab=flat" class="nav-tab">Flat Page Shortcodes</a>
    203     <a href="?page=irm-newsroom&tab=shareprice" class="nav-tab">Shareprice</a>
    204     <a href="?page=irm-newsroom&tab=menu" class="nav-tab">Menu</a>
    205     <a href="?page=irm-newsroom&tab=events" class="nav-tab">Events Calendar</a>
     199    echo $irm_tabs = '<h2 class="nav-tab-wrapper" id="irm-newsroom-tabs">
     200    <a href="?page=irm-newsroom&tab=configure" class="nr-configure nav-tab">Configure IRM Newsroom</a>
     201    <a href="?page=irm-newsroom&tab=list" class="nr-list nav-tab">List Page Shortcodes</a>
     202    <a href="?page=irm-newsroom&tab=flat" class="nr-flat nav-tab">Flat Page Shortcodes</a>
     203    <a href="?page=irm-newsroom&tab=shareprice" class="nr-shareprice nav-tab">Shareprice</a>
     204    <a href="?page=irm-newsroom&tab=menu" class="nr-menu nav-tab">Menu</a>
     205    <a href="?page=irm-newsroom&tab=events" class="nr-events nav-tab">Events Calendar</a>
    206206    </h2>';
     207
     208    echo '
     209    <script>
     210    (function($) {
     211        var urlParams = new URLSearchParams(location.search)
     212        var tab = urlParams.get("tab");
     213        console.log("irm newsroom. " + tab);
     214        if(tab > "") {
     215            $("#irm-newsroom-tabs .nr-"+tab).addClass("nav-tab-active");
     216        } else {
     217            $("#irm-newsroom-tabs .nr-configure").addClass("nav-tab-active");
     218        }
     219    })( jQuery );
     220    </script>
     221    ';
    207222
    208223    if( ($active_tab == "") || ($active_tab == "configure") ) {
Note: See TracChangeset for help on using the changeset viewer.