Changeset 1755928
- Timestamp:
- 10/31/2017 01:01:11 PM (8 years ago)
- Location:
- checklist-in-post
- Files:
-
- 10 added
- 4 edited
-
tags/1.1.1 (added)
-
tags/1.1.1/admin (added)
-
tags/1.1.1/admin/options.php (added)
-
tags/1.1.1/checklist_in_post.js (added)
-
tags/1.1.1/checklist_in_post.php (added)
-
tags/1.1.1/checklist_in_post_frontend.js (added)
-
tags/1.1.1/css (added)
-
tags/1.1.1/css/checklist_in_post.css (added)
-
tags/1.1.1/css/checklist_in_post_frontend.css (added)
-
tags/1.1.1/readme.txt (added)
-
trunk/checklist-in-post/checklist_in_post.php (modified) (2 diffs)
-
trunk/checklist-in-post/checklist_in_post_frontend.js (modified) (5 diffs)
-
trunk/checklist-in-post/readme.txt (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
checklist-in-post/trunk/checklist-in-post/checklist_in_post.php
r1754305 r1755928 4 4 Description: Checklist in Post - Allow creating checklists in posts for readers 5 5 Author: Tomasz Małecki 6 Version: 1.1 6 Version: 1.1.1 7 7 Author URI: http://tomiskym.deviantart.com 8 8 Text Domain: checklistinpost … … 68 68 69 69 function 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; 74 72 } 75 73 -
checklist-in-post/trunk/checklist-in-post/checklist_in_post_frontend.js
r1754305 r1755928 30 30 31 31 $checkedli.each(function(index){ 32 toggleCookie('checkedLi[' + index + ']'); 32 //toggleCookie('checkedLi[' + index + ']'); 33 //console.log(getAbsolutePath()); 33 34 if(checkCookie('checkedLi[' + index + ']')) { 34 35 $(this).toggleClass( 'todo-checked' ); … … 47 48 48 49 /** 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 /** 49 61 * Cookie create function 50 62 * … … 57 69 d.setTime(d.getTime() + (exdays*24*60*60*1000)); 58 70 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; 60 74 } 61 75 … … 85 99 */ 86 100 function toggleCookie(cname) { 101 console.log('toggleCookie ' + cname); 87 102 var cookie = getCookie(cname); 88 103 if (cookie === "1") { 89 104 //Change to 0 90 105 setCookie(cname, 0, 0); 106 91 107 } else { 92 108 setCookie(cname, 1, 365); 93 94 109 } 95 110 } … … 101 116 */ 102 117 function checkCookie(cname){ 118 console.log('checkCookie ' + cname); 103 119 var cookie = getCookie(cname); 104 120 if(cookie === "1"){ -
checklist-in-post/trunk/checklist-in-post/readme.txt
r1754305 r1755928 4 4 Requires at least: 3.0 5 5 Tested up to: 4.8 6 Stable tag: 1.1 6 Stable tag: 1.1.1 7 7 License: #GNUGPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl.html … … 30 30 31 31 == Changelog == 32 1.1.1 33 Fixed: ToggleCookie 34 Fixed: Cookie path=/ 32 35 1.1.0 33 36 New : Changed way how checked elements are build, changed classes -
checklist-in-post/trunk/readme.txt
r1754305 r1755928 4 4 Requires at least: 3.0 5 5 Tested up to: 4.8 6 Stable tag: 1.1 6 Stable tag: 1.1.1 7 7 License: #GNUGPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl.html … … 30 30 31 31 == Changelog == 32 1.1.1 33 Fixed: ToggleCookie 34 Fixed: Cookie path=/ 32 35 1.1.0 33 36 New : Changed way how checked elements are build, changed classes
Note: See TracChangeset
for help on using the changeset viewer.