Collapse-O-Matic - Version 1.3.7

Version Description

  • Added expandsub1 - expandsub3 shortcodes for nested expand elements.
  • Added collapseall and expandall triggers.
  • Better looking 24bit arrows.
Download this release

Release Info

Developer baden03
Plugin Icon 128x128 Collapse-O-Matic
Version 1.3.7
Comparing to
See all releases

Code changes from version 1.3.6 to 1.3.7

collapse-o-matic.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: jQuery Collapse-O-Matic
4
  Plugin URI: http://www.twinpictures.de/jquery-collapse-o-matic-1-3/
5
  Description: Collapse-O-Matic adds an `[expand]` shortcode that wraps content into a lovely, jQuery collapsible div.
6
- Version: 1.3.6
7
  Author: Twinpictures
8
  Author URI: http://www.twinpictures.de
9
  License: GPL2
@@ -30,11 +30,11 @@ wp_enqueue_script('jquery');
30
  $plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
31
  if (!is_admin()){
32
  //collapse script
33
- wp_register_script('collapseomatic-js', $plugin_url.'/collapse.js', array ('jquery'), '1.2.2' );
34
  wp_enqueue_script('collapseomatic-js');
35
 
36
  //css
37
- wp_register_style( 'collapseomatic-css', $plugin_url.'/style.css', array (), '1.2' );
38
  wp_enqueue_style( 'collapseomatic-css' );
39
  }
40
 
@@ -79,6 +79,9 @@ function collapsTronic($atts, $content=null){
79
  }
80
 
81
  add_shortcode('expand', 'collapsTronic');
 
 
 
82
 
83
  //add the filter to the sidebar widgets
84
  add_filter('widget_text', 'do_shortcode');
3
  Plugin Name: jQuery Collapse-O-Matic
4
  Plugin URI: http://www.twinpictures.de/jquery-collapse-o-matic-1-3/
5
  Description: Collapse-O-Matic adds an `[expand]` shortcode that wraps content into a lovely, jQuery collapsible div.
6
+ Version: 1.3.7
7
  Author: Twinpictures
8
  Author URI: http://www.twinpictures.de
9
  License: GPL2
30
  $plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
31
  if (!is_admin()){
32
  //collapse script
33
+ wp_register_script('collapseomatic-js', $plugin_url.'/collapse.js', array ('jquery'), '1.2.3' );
34
  wp_enqueue_script('collapseomatic-js');
35
 
36
  //css
37
+ wp_register_style( 'collapseomatic-css', $plugin_url.'/style.css', array (), '1.3' );
38
  wp_enqueue_style( 'collapseomatic-css' );
39
  }
40
 
79
  }
80
 
81
  add_shortcode('expand', 'collapsTronic');
82
+ add_shortcode('expandsub1', 'collapsTronic');
83
+ add_shortcode('expandsub2', 'collapsTronic');
84
+ add_shortcode('expandsub3', 'collapsTronic');
85
 
86
  //add the filter to the sidebar widgets
87
  add_filter('widget_text', 'do_shortcode');
collapse.js CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
- * jQuery Collapse-O-Matic v1.2.2
3
  * http://www.twinpictures.de/collapse-o-matic/
4
  *
5
  * Copyright 2011, Twinpictures
@@ -99,4 +99,24 @@ jQuery(document).ready(function() {
99
  var myAnchor = '#' + myFile.split('#')[1];
100
  jQuery(myAnchor).click();
101
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  });
1
  /*!
2
+ * jQuery Collapse-O-Matic v1.2.3
3
  * http://www.twinpictures.de/collapse-o-matic/
4
  *
5
  * Copyright 2011, Twinpictures
99
  var myAnchor = '#' + myFile.split('#')[1];
100
  jQuery(myAnchor).click();
101
  }
102
+
103
+ jQuery('.expandall').click(function() {
104
+ jQuery('.collapseomatic:not(.close)').each(function(index) {
105
+ jQuery(this).addClass('close');
106
+ var thisid = jQuery(this).attr('id');
107
+ jQuery('#target-'+thisid).slideToggle('fast', function() {
108
+ // Animation complete.
109
+ });
110
+ });
111
+ });
112
+
113
+ jQuery('.collapseall').click(function() {
114
+ jQuery('.collapseomatic.close').each(function(index) {
115
+ jQuery(this).removeClass('close');
116
+ var thisid = jQuery(this).attr('id');
117
+ jQuery('#target-'+thisid).slideToggle('fast', function() {
118
+ // Animation complete.
119
+ });
120
+ });
121
+ });
122
  });
images/arrow-down.png CHANGED
Binary file
images/arrow-up.png CHANGED
Binary file
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://www.twinpictures.de/collapse-o-matic/
5
  Tags: collapse, expand, collapsible, expandable, content, shortcode, hidden, jQuery, javascript, twinpictures
6
  Requires at least: 2.8
7
  Tested up to: 3.1
8
- Stable tag: 1.3.6
9
 
10
  Collapse-O-Matic adds an `[expand]` shortcode that wraps any object or content--including other shortcodes--into a lovely jQuery collapsible div.
11
 
@@ -44,6 +44,11 @@ No. Not even close.
44
 
45
  == Changelog ==
46
 
 
 
 
 
 
47
  = 1.3.6 =
48
  * Plugin now degrades gracefully if JS is disabled. Added swaptitle attribute to change the title on expand/collapse.
49
 
@@ -84,6 +89,8 @@ No. Not even close.
84
  * The plugin came to be.
85
 
86
  == Upgrade Notice ==
 
 
87
 
88
  = 1.3.6 =
89
  Plugin degrades gracefully when JS is disabled. Title can now have expand/collapse states using swaptitle attribute.
5
  Tags: collapse, expand, collapsible, expandable, content, shortcode, hidden, jQuery, javascript, twinpictures
6
  Requires at least: 2.8
7
  Tested up to: 3.1
8
+ Stable tag: 1.3.7
9
 
10
  Collapse-O-Matic adds an `[expand]` shortcode that wraps any object or content--including other shortcodes--into a lovely jQuery collapsible div.
11
 
44
 
45
  == Changelog ==
46
 
47
+ = 1.3.7 =
48
+ * Added expandsub1 - expandsub3 shortcodes for nested expand elements.
49
+ * Added collapseall and expandall triggers.
50
+ * Better looking 24bit arrows.
51
+
52
  = 1.3.6 =
53
  * Plugin now degrades gracefully if JS is disabled. Added swaptitle attribute to change the title on expand/collapse.
54
 
89
  * The plugin came to be.
90
 
91
  == Upgrade Notice ==
92
+ = 1.3.7 =
93
+ * New expandsub1 - expandsub3 shortcodes for nested expand elements. Collapse/Expand all triggers. Improved arrow icons.
94
 
95
  = 1.3.6 =
96
  Plugin degrades gracefully when JS is disabled. Title can now have expand/collapse states using swaptitle attribute.
style.css CHANGED
@@ -19,3 +19,11 @@
19
  margin-left: 16px;
20
  padding: 0px;
21
  }
 
 
 
 
 
 
 
 
19
  margin-left: 16px;
20
  padding: 0px;
21
  }
22
+
23
+ .collapseall, .expandall {
24
+ cursor: pointer;
25
+ }
26
+
27
+ .collapseall:hover, .expandall:hover {
28
+ text-decoration: underline;
29
+ }