Plugin Directory

Changeset 1755928


Ignore:
Timestamp:
10/31/2017 01:01:11 PM (8 years ago)
Author:
tomiskym
Message:

New version 1.1.1

Location:
checklist-in-post
Files:
10 added
4 edited

Legend:

Unmodified
Added
Removed
  • checklist-in-post/trunk/checklist-in-post/checklist_in_post.php

    r1754305 r1755928  
    44Description: Checklist in Post - Allow creating checklists in posts for readers
    55Author: Tomasz Małecki
    6 Version: 1.1
     6Version: 1.1.1
    77Author URI: http://tomiskym.deviantart.com
    88Text Domain: checklistinpost
     
    6868
    6969function checklistinpost_start_shortcode( $attributes,$content=null ) {
    70 
    71                 $content = "<div class='checklist_in_post'>" . $content . "</div>";
    72         return $content;
    73                 //Return div instead of ul ?
     70    $content = "<div class='checklist_in_post'>" . $content . "</div>";
     71    return $content;
    7472}
    7573
  • checklist-in-post/trunk/checklist-in-post/checklist_in_post_frontend.js

    r1754305 r1755928  
    3030
    3131            $checkedli.each(function(index){
    32                 toggleCookie('checkedLi[' + index + ']');
     32                //toggleCookie('checkedLi[' + index + ']');
     33                //console.log(getAbsolutePath());
    3334                if(checkCookie('checkedLi[' + index + ']')) {
    3435                    $(this).toggleClass( 'todo-checked' );
     
    4748
    4849        /**
     50         * Function for getting path of current site
     51         * @returns {string}
     52         */
     53        function getAbsolutePath() {
     54            var loc = window.location;
     55            var pathName = loc.pathname.substring(0, loc.pathname.lastIndexOf('/') + 1);
     56            //return loc.href.substring(0, loc.href.length - ((loc.pathname + loc.search + loc.hash).length - pathName.length));
     57            return pathName;
     58        }
     59
     60        /**
    4961         * Cookie create function
    5062         *
     
    5769            d.setTime(d.getTime() + (exdays*24*60*60*1000));
    5870            var expires = "expires="+ d.toUTCString();
    59             document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
     71            var pathName = getAbsolutePath();
     72            console.log(pathName);
     73            document.cookie = cname + "=" + cvalue + ";" + expires + ";path=" + pathName;
    6074        }
    6175
     
    8599         */
    86100        function toggleCookie(cname) {
     101            console.log('toggleCookie ' + cname);
    87102            var cookie = getCookie(cname);
    88103            if (cookie === "1") {
    89104                //Change to 0
    90105                setCookie(cname, 0, 0);
     106
    91107            } else {
    92108                setCookie(cname, 1, 365);
    93 
    94109            }
    95110        }
     
    101116         */
    102117        function checkCookie(cname){
     118            console.log('checkCookie ' + cname);
    103119            var cookie = getCookie(cname);
    104120            if(cookie === "1"){
  • checklist-in-post/trunk/checklist-in-post/readme.txt

    r1754305 r1755928  
    44Requires at least: 3.0
    55Tested up to: 4.8
    6 Stable tag: 1.1
     6Stable tag: 1.1.1
    77License: #GNUGPLv3
    88License URI: https://www.gnu.org/licenses/gpl.html
     
    3030
    3131== Changelog ==
     321.1.1
     33Fixed: ToggleCookie
     34Fixed: Cookie path=/
    32351.1.0
    3336New : Changed way how checked elements are build, changed classes
  • checklist-in-post/trunk/readme.txt

    r1754305 r1755928  
    44Requires at least: 3.0
    55Tested up to: 4.8
    6 Stable tag: 1.1
     6Stable tag: 1.1.1
    77License: #GNUGPLv3
    88License URI: https://www.gnu.org/licenses/gpl.html
     
    3030
    3131== Changelog ==
     321.1.1
     33Fixed: ToggleCookie
     34Fixed: Cookie path=/
    32351.1.0
    3336New : Changed way how checked elements are build, changed classes
Note: See TracChangeset for help on using the changeset viewer.