Version Description
- adjusted data-findme to deal with auto value
- added the must-be-one class to force one highlander element to stay open
Download this release
Release Info
Developer | baden03 |
Plugin | Collapse-O-Matic |
Version | 1.7.2 |
Comparing to | |
See all releases |
Code changes from version 1.7.1 to 1.7.2
- collapse-o-matic.php +3 -3
- js/collapse.js +10 -3
- readme.txt +8 -3
collapse-o-matic.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Collapse-O-Matic
|
|
4 |
Text Domain: jquery-collapse-o-matic
|
5 |
Plugin URI: http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
6 |
Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
|
7 |
-
Version: 1.7.
|
8 |
Author: twinpictures, baden03
|
9 |
Author URI: http://twinpictures.de/
|
10 |
License: GPL2
|
@@ -29,7 +29,7 @@ class WP_Collapse_O_Matic {
|
|
29 |
* Current version
|
30 |
* @var string
|
31 |
*/
|
32 |
-
var $version = '1.7.
|
33 |
|
34 |
/**
|
35 |
* Used as prefix for options entry
|
@@ -130,7 +130,7 @@ class WP_Collapse_O_Matic {
|
|
130 |
if($this->options['script_location'] == 'footer' ){
|
131 |
$load_in_footer = true;
|
132 |
}
|
133 |
-
wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.6.
|
134 |
if( empty($this->options['script_check']) ){
|
135 |
wp_enqueue_script('collapseomatic-js');
|
136 |
}
|
4 |
Text Domain: jquery-collapse-o-matic
|
5 |
Plugin URI: http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
6 |
Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
|
7 |
+
Version: 1.7.2
|
8 |
Author: twinpictures, baden03
|
9 |
Author URI: http://twinpictures.de/
|
10 |
License: GPL2
|
29 |
* Current version
|
30 |
* @var string
|
31 |
*/
|
32 |
+
var $version = '1.7.2';
|
33 |
|
34 |
/**
|
35 |
* Used as prefix for options entry
|
130 |
if($this->options['script_location'] == 'footer' ){
|
131 |
$load_in_footer = true;
|
132 |
}
|
133 |
+
wp_register_script('collapseomatic-js', plugins_url('js/collapse.js', __FILE__), array('jquery'), '1.6.4', $load_in_footer);
|
134 |
if( empty($this->options['script_check']) ){
|
135 |
wp_enqueue_script('collapseomatic-js');
|
136 |
}
|
js/collapse.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*!
|
2 |
-
* Collapse-O-Matic JavaSctipt v1.6.
|
3 |
* http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
4 |
*
|
5 |
* Copyright 2016, Twinpictures
|
@@ -88,7 +88,7 @@ function toggleState (obj, id, maptastic, trig_id) {
|
|
88 |
//offset_top = jQuery('#find-'+trig_id).attr('name');
|
89 |
offset_top = jQuery('#'+trig_id).attr('data-findme');
|
90 |
|
91 |
-
if(!offset_top){
|
92 |
target_offset = jQuery('#'+trig_id).offset();
|
93 |
offset_top = target_offset.top;
|
94 |
}
|
@@ -111,7 +111,8 @@ function toggleState (obj, id, maptastic, trig_id) {
|
|
111 |
if(trig_id && jQuery('#'+trig_id).is('.find-me.colomat-close')){
|
112 |
//offset_top = jQuery('#find-'+trig_id).attr('name');
|
113 |
offset_top = jQuery('#'+trig_id).attr('data-findme');
|
114 |
-
|
|
|
115 |
target_offset = jQuery('#'+trig_id).offset();
|
116 |
offset_top = target_offset.top;
|
117 |
}
|
@@ -347,6 +348,12 @@ jQuery(document).ready(function() {
|
|
347 |
if(jQuery(this).hasClass('colomat-expand-only') && jQuery(this).hasClass('colomat-close')){
|
348 |
return;
|
349 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
var id = jQuery(this).attr('id');
|
351 |
|
352 |
//deal with any scroll to links
|
1 |
/*!
|
2 |
+
* Collapse-O-Matic JavaSctipt v1.6.4
|
3 |
* http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
4 |
*
|
5 |
* Copyright 2016, Twinpictures
|
88 |
//offset_top = jQuery('#find-'+trig_id).attr('name');
|
89 |
offset_top = jQuery('#'+trig_id).attr('data-findme');
|
90 |
|
91 |
+
if(!offset_top || offset_top == 'auto'){
|
92 |
target_offset = jQuery('#'+trig_id).offset();
|
93 |
offset_top = target_offset.top;
|
94 |
}
|
111 |
if(trig_id && jQuery('#'+trig_id).is('.find-me.colomat-close')){
|
112 |
//offset_top = jQuery('#find-'+trig_id).attr('name');
|
113 |
offset_top = jQuery('#'+trig_id).attr('data-findme');
|
114 |
+
|
115 |
+
if(!offset_top || offset_top == 'auto'){
|
116 |
target_offset = jQuery('#'+trig_id).offset();
|
117 |
offset_top = target_offset.top;
|
118 |
}
|
348 |
if(jQuery(this).hasClass('colomat-expand-only') && jQuery(this).hasClass('colomat-close')){
|
349 |
return;
|
350 |
}
|
351 |
+
|
352 |
+
//highlander must be one
|
353 |
+
if(jQuery(this).attr('rel') && jQuery(this).attr('rel').indexOf('-highlander') != '-1' && jQuery(this).hasClass('must-be-one') && jQuery(this).hasClass('colomat-close')){
|
354 |
+
return;
|
355 |
+
}
|
356 |
+
|
357 |
var id = jQuery(this).attr('id');
|
358 |
|
359 |
//deal with any scroll to links
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Contributors: twinpictures, baden03
|
|
4 |
Donate link: http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures, read me, read more, more, plugin oven
|
6 |
Requires at least: 4.0
|
7 |
-
Tested up to: 4.
|
8 |
-
Stable tag: 1.7.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -50,6 +50,10 @@ No. Not even close.
|
|
50 |
|
51 |
== Changelog ==
|
52 |
|
|
|
|
|
|
|
|
|
53 |
= 1.7.1 =
|
54 |
* integrated new collapse-commander image trigger feature
|
55 |
* added new togglegroup shortcode attribute and data-togglegroup html attribute to reference groups of expand elements with out auto-collapsing other groups, such as when using the real attribute
|
@@ -321,4 +325,5 @@ Fixed auto-expand of urls with id-anchors
|
|
321 |
* The plug-in came to be.
|
322 |
|
323 |
== Upgrade Notice ==
|
324 |
-
|
|
4 |
Donate link: http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures, read me, read more, more, plugin oven
|
6 |
Requires at least: 4.0
|
7 |
+
Tested up to: 4.6-rc2
|
8 |
+
Stable tag: 1.7.2
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
50 |
|
51 |
== Changelog ==
|
52 |
|
53 |
+
= 1.7.2 =
|
54 |
+
* adjusted data-findme to deal with ‘auto’ value
|
55 |
+
* added the must-be-one class to force one highlander element to stay open
|
56 |
+
|
57 |
= 1.7.1 =
|
58 |
* integrated new collapse-commander image trigger feature
|
59 |
* added new togglegroup shortcode attribute and data-togglegroup html attribute to reference groups of expand elements with out auto-collapsing other groups, such as when using the real attribute
|
325 |
* The plug-in came to be.
|
326 |
|
327 |
== Upgrade Notice ==
|
328 |
+
adjusted data-findme attribute to work with auto value.
|
329 |
+
added new must-be-one class to force one highlander element to stay open
|