Version Description
- Autoclose elements will now trigger SwapTitle
Download this release
Release Info
Developer | baden03 |
Plugin | Collapse-O-Matic |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.8 to 1.4.1
- collapse-o-matic.php +91 -29
- collapse.js +158 -44
- images/arrow-down-dark.png +0 -0
- images/arrow-up-dark.png +0 -0
- images/arrows.psd +0 -0
- readme.txt +112 -28
- style-dark.css +35 -0
- style.css +14 -8
collapse-o-matic.php
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: jQuery Collapse-O-Matic
|
4 |
-
Plugin URI: http://
|
5 |
-
Description: Collapse-O-Matic adds an
|
6 |
-
Version: 1.
|
7 |
-
Author:
|
8 |
-
Author URI: http://
|
9 |
License: GPL2
|
|
|
10 |
*/
|
11 |
|
12 |
-
/* Copyright
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -25,18 +26,30 @@ License: GPL2
|
|
25 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
*/
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
39 |
}
|
|
|
40 |
|
41 |
|
42 |
function collapsTronic($atts, $content = null){
|
@@ -50,40 +63,89 @@ function collapsTronic($atts, $content = null){
|
|
50 |
'tag' => 'span',
|
51 |
'trigclass' => '',
|
52 |
'targclass' => '',
|
|
|
53 |
'rel' => '',
|
54 |
'expanded' => '',
|
|
|
|
|
|
|
|
|
55 |
), $atts));
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
$altatt = '';
|
58 |
if($alt){
|
59 |
-
$altatt = 'alt="'.$alt.'"';
|
|
|
|
|
|
|
60 |
}
|
61 |
$relatt = '';
|
62 |
if($rel){
|
63 |
$relatt = 'rel="'.$rel.'"';
|
64 |
}
|
65 |
if($expanded){
|
66 |
-
$trigclass .= ' close';
|
67 |
}
|
68 |
-
$link =
|
69 |
if($swaptitle){
|
70 |
-
$link .=
|
71 |
}
|
72 |
-
else{
|
73 |
-
$link .= $title;
|
74 |
-
}
|
75 |
-
$link .= '" id="'.$id.'" '.$relatt.' '.$altatt.'>'.$title.'</'.$tag.'>';
|
76 |
$eDiv = '';
|
77 |
-
if($content
|
78 |
-
$eDiv =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
80 |
-
return $
|
81 |
}
|
82 |
|
|
|
83 |
add_shortcode('expand', 'collapsTronic');
|
84 |
-
|
85 |
-
add_shortcode('
|
86 |
-
|
|
|
87 |
|
88 |
//add the filter to the sidebar widgets
|
89 |
add_filter('widget_text', 'do_shortcode');
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: jQuery Collapse-O-Matic
|
4 |
+
Plugin URI: http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
5 |
+
Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
|
6 |
+
Version: 1.4.1
|
7 |
+
Author: twinpictures, baden03
|
8 |
+
Author URI: http://twinpictures.de/
|
9 |
License: GPL2
|
10 |
+
|
11 |
*/
|
12 |
|
13 |
+
/* Copyright 2012 Twinpictures (www.twinpictures.de)
|
14 |
|
15 |
This program is free software; you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License, version 2, as
|
26 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
*/
|
28 |
|
29 |
+
function collapsTronicInit() {
|
30 |
+
wp_enqueue_script('jquery');
|
31 |
+
|
32 |
+
$plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
|
33 |
+
if (!is_admin()){
|
34 |
+
//collapse script
|
35 |
+
wp_register_script('collapseomatic-js', $plugin_url.'/collapse.js', array ('jquery'), '1.3.2' );
|
36 |
+
wp_enqueue_script('collapseomatic-js');
|
37 |
|
38 |
+
//css
|
39 |
+
wp_register_style( 'collapseomatic-css', $plugin_url.'/style.css', array (), '1.5.1' );
|
40 |
+
wp_enqueue_style( 'collapseomatic-css' );
|
41 |
+
}
|
42 |
+
|
43 |
+
add_shortcode('expand', 'collapsTronic');
|
44 |
|
45 |
+
for ($i=1; $i<30; $i++) {
|
46 |
+
add_shortcode('expandsub'.$i, 'collapsTronic');
|
47 |
+
}
|
48 |
+
|
49 |
+
//add the filter to the sidebar widgets
|
50 |
+
add_filter('widget_text', 'do_shortcode');
|
51 |
}
|
52 |
+
add_action('init', 'collapsTronicInit');
|
53 |
|
54 |
|
55 |
function collapsTronic($atts, $content = null){
|
63 |
'tag' => 'span',
|
64 |
'trigclass' => '',
|
65 |
'targclass' => '',
|
66 |
+
'trigpos' => 'above',
|
67 |
'rel' => '',
|
68 |
'expanded' => '',
|
69 |
+
'excerpt' => '',
|
70 |
+
'excerptpos' => 'below-trigger',
|
71 |
+
'excerpttag' => 'div',
|
72 |
+
'excerptclass' => '',
|
73 |
), $atts));
|
74 |
|
75 |
+
if($excerpt){
|
76 |
+
if($excerptpos == 'above-trigger'){
|
77 |
+
$nibble = '<'.$excerpttag.' class="'.$excerptclass.'">'.$excerpt.'</'.$excerpttag.'>';
|
78 |
+
}
|
79 |
+
else{
|
80 |
+
$nibble = '<'.$excerpttag.' class="collapseomatic_excerpt '.$excerptclass.'">'.$excerpt.'</'.$excerpttag.'>';
|
81 |
+
}
|
82 |
+
|
83 |
+
}
|
84 |
$altatt = '';
|
85 |
if($alt){
|
86 |
+
$altatt = 'alt="'.$alt.'" title="'.$alt.'"';
|
87 |
+
}
|
88 |
+
else{
|
89 |
+
$altatt = 'title="'.$title.'"';
|
90 |
}
|
91 |
$relatt = '';
|
92 |
if($rel){
|
93 |
$relatt = 'rel="'.$rel.'"';
|
94 |
}
|
95 |
if($expanded){
|
96 |
+
$trigclass .= ' colomat-close';
|
97 |
}
|
98 |
+
$link = "<".$tag." class='collapseomatic ".$trigclass."' id='".$id."' ".$relatt." ".$altatt.">".$title."</".$tag.">\n";
|
99 |
if($swaptitle){
|
100 |
+
$link .= "<".$tag." id='swap-".$id."' style='display:none;'>".$swaptitle."</".$tag.">\n";
|
101 |
}
|
|
|
|
|
|
|
|
|
102 |
$eDiv = '';
|
103 |
+
if($content){
|
104 |
+
$eDiv = "<div id='target-".$id."' class='collapseomatic_content ".$targclass."'>".do_shortcode($content)."</div>\n";
|
105 |
+
}
|
106 |
+
if($excerpt){
|
107 |
+
if($excerptpos == 'above-trigger'){
|
108 |
+
if($trigpos == 'below'){
|
109 |
+
$retStr = $eDiv.$nibble.$link;
|
110 |
+
}
|
111 |
+
else{
|
112 |
+
$retStr = $nibble.$link.$eDiv;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
else if($excerptpos == 'below-trigger'){
|
116 |
+
if($trigpos == 'below'){
|
117 |
+
$retStr = $eDiv.$link.$nibble;
|
118 |
+
}
|
119 |
+
else{
|
120 |
+
$retStr = $link.$nibble.$eDiv;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
else{
|
124 |
+
if($trigpos == 'below'){
|
125 |
+
$retStr = $eDiv.$link.$nibble;
|
126 |
+
}
|
127 |
+
else{
|
128 |
+
$retStr = $link.$eDiv.$nibble;
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
else{
|
133 |
+
if($trigpos == 'below'){
|
134 |
+
$retStr = $eDiv.$link;
|
135 |
+
}
|
136 |
+
else{
|
137 |
+
$retStr = $link.$eDiv;
|
138 |
+
}
|
139 |
}
|
140 |
+
return $retStr;
|
141 |
}
|
142 |
|
143 |
+
/*
|
144 |
add_shortcode('expand', 'collapsTronic');
|
145 |
+
for ($i=1; $i<30; $i++) {
|
146 |
+
add_shortcode('expandsub'.$i, 'collapsTronic');
|
147 |
+
}
|
148 |
+
*/
|
149 |
|
150 |
//add the filter to the sidebar widgets
|
151 |
add_filter('widget_text', 'do_shortcode');
|
collapse.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/*!
|
2 |
-
* jQuery Collapse-O-Matic v1.2
|
3 |
-
* http://
|
4 |
*
|
5 |
-
* Copyright
|
6 |
*
|
7 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8 |
* of this software and associated documentation files (the "Software"), to deal
|
@@ -25,57 +25,108 @@
|
|
25 |
*/
|
26 |
|
27 |
jQuery(document).ready(function() {
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
29 |
//inital collapse
|
30 |
-
jQuery('.collapseomatic:not(.close)').each(function(index) {
|
31 |
var thisid = jQuery(this).attr('id');
|
32 |
jQuery('#target-'+thisid).css('display', 'none');
|
33 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
|
|
|
|
|
|
|
|
|
|
35 |
jQuery('.collapseomatic').hover(function () {
|
36 |
-
jQuery(this).addClass("hover");
|
37 |
},
|
38 |
function () {
|
39 |
-
jQuery(this).removeClass("hover");
|
40 |
}
|
41 |
);
|
42 |
|
|
|
43 |
jQuery('.collapseomatic').click(function() {
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
57 |
|
58 |
//deal with grouped items if needed
|
59 |
if(jQuery(this).attr('rel') !== undefined){
|
60 |
var rel = jQuery(this).attr('rel');
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
}
|
68 |
});
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
function closeOtherGroups(rel){
|
71 |
jQuery('.collapseomatic[rel!="' + rel +'"]').each(function(index) {
|
72 |
//add close class if open
|
73 |
-
if(jQuery(this).hasClass('close') && jQuery(this).attr('rel') !== undefined){
|
74 |
-
jQuery(this).removeClass('close');
|
75 |
var id = jQuery(this).attr('id');
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
jQuery('#target-'+id).slideToggle('fast', function() {
|
77 |
// Animation complete.
|
78 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
80 |
});
|
81 |
}
|
@@ -83,12 +134,31 @@ jQuery(document).ready(function() {
|
|
83 |
function closeOtherMembers(rel, id){
|
84 |
jQuery('.collapseomatic[rel="' + rel +'"]').each(function(index) {
|
85 |
//add close class if open
|
86 |
-
if(jQuery(this).attr('id') != id && jQuery(this).hasClass('close') && jQuery(this).attr('rel') !== undefined){
|
87 |
-
|
|
|
88 |
var thisid = jQuery(this).attr('id');
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
90 |
// Animation complete.
|
91 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
});
|
94 |
}
|
@@ -101,22 +171,66 @@ jQuery(document).ready(function() {
|
|
101 |
}
|
102 |
|
103 |
jQuery('.expandall').click(function() {
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
});
|
112 |
|
113 |
jQuery('.collapseall').click(function() {
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
});
|
122 |
});
|
1 |
/*!
|
2 |
+
* jQuery Collapse-O-Matic v1.3.2
|
3 |
+
* http://plugins.twinpictures.de/plugins/collapse-o-matic/
|
4 |
*
|
5 |
+
* Copyright 2012, Twinpictures
|
6 |
*
|
7 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8 |
* of this software and associated documentation files (the "Software"), to deal
|
25 |
*/
|
26 |
|
27 |
jQuery(document).ready(function() {
|
28 |
+
|
29 |
+
//force collapse
|
30 |
+
jQuery('.force_content_collapse').each(function(index) {
|
31 |
+
jQuery(this).css('display', 'none');
|
32 |
+
});
|
33 |
+
|
34 |
//inital collapse
|
35 |
+
jQuery('.collapseomatic:not(.colomat-close)').each(function(index) {
|
36 |
var thisid = jQuery(this).attr('id');
|
37 |
jQuery('#target-'+thisid).css('display', 'none');
|
38 |
});
|
39 |
+
|
40 |
+
//inital swaptitle for pre-expanded elements
|
41 |
+
jQuery('.collapseomatic.colomat-close').each(function(index) {
|
42 |
+
var thisid = jQuery(this).attr('id');
|
43 |
+
if(jQuery("#swap-"+thisid).length > 0){
|
44 |
+
swapTitle(this, thisid);
|
45 |
+
}
|
46 |
+
});
|
47 |
+
|
48 |
|
49 |
+
//Display the collapse wrapper... use to reverse the show-all on no JavaScript degredation.
|
50 |
+
jQuery('.content_collapse_wrapper').each(function(index) {
|
51 |
+
jQuery(this).css('display', 'inline');
|
52 |
+
});
|
53 |
+
|
54 |
jQuery('.collapseomatic').hover(function () {
|
55 |
+
jQuery(this).addClass("colomat-hover");
|
56 |
},
|
57 |
function () {
|
58 |
+
jQuery(this).removeClass("colomat-hover");
|
59 |
}
|
60 |
);
|
61 |
|
62 |
+
|
63 |
jQuery('.collapseomatic').click(function() {
|
64 |
+
//alert('phones ringin dude');
|
65 |
+
var id = jQuery(this).attr('id');
|
66 |
+
if(id.indexOf('bot-') != '-1'){
|
67 |
+
id = id.substr(4);
|
68 |
+
jQuery('#'+id).toggleClass('colomat-close');
|
69 |
+
}
|
70 |
+
else{
|
71 |
+
jQuery(this).toggleClass('colomat-close');
|
72 |
+
}
|
73 |
+
//check if the title needs to be swapped out
|
74 |
+
if(jQuery("#swap-"+id).length > 0){
|
75 |
+
swapTitle(this, id);
|
76 |
+
}
|
77 |
+
|
78 |
+
jQuery('#target-'+id).slideToggle('fast', function() {
|
79 |
+
// Animation complete.
|
80 |
+
});
|
81 |
|
82 |
//deal with grouped items if needed
|
83 |
if(jQuery(this).attr('rel') !== undefined){
|
84 |
var rel = jQuery(this).attr('rel');
|
85 |
+
if(rel.indexOf('-highlander') != '-1'){
|
86 |
+
closeOtherMembers(rel, id);
|
87 |
+
}
|
88 |
+
else{
|
89 |
+
closeOtherGroups(rel);
|
90 |
+
}
|
91 |
}
|
92 |
});
|
93 |
|
94 |
+
function swapTitle(obj, id){
|
95 |
+
var orightml = jQuery(obj).html();
|
96 |
+
var swaphtml = jQuery("#swap-"+id).html();
|
97 |
+
jQuery(obj).html(swaphtml);
|
98 |
+
jQuery("#swap-"+id).html(orightml);
|
99 |
+
|
100 |
+
//is cufon involved? if so, do that thing
|
101 |
+
if(swaphtml.indexOf("<cufon") != -1){
|
102 |
+
var trigelem = jQuery(this).get(0).tagName;
|
103 |
+
Cufon.replace(trigelem);
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
function closeOtherGroups(rel){
|
108 |
jQuery('.collapseomatic[rel!="' + rel +'"]').each(function(index) {
|
109 |
//add close class if open
|
110 |
+
if(jQuery(this).hasClass('colomat-close') && jQuery(this).attr('rel') !== undefined){
|
111 |
+
jQuery(this).removeClass('colomat-close');
|
112 |
var id = jQuery(this).attr('id');
|
113 |
+
|
114 |
+
//check if the title needs to be swapped out
|
115 |
+
if(jQuery("#swap-"+id).length > 0){
|
116 |
+
swapTitle(this, id);
|
117 |
+
}
|
118 |
+
|
119 |
jQuery('#target-'+id).slideToggle('fast', function() {
|
120 |
// Animation complete.
|
121 |
});
|
122 |
+
|
123 |
+
//check if there are nested children that need to be collapsed
|
124 |
+
var ancestors = jQuery('.collapseomatic', '#target-'+id);
|
125 |
+
ancestors.each(function(index) {
|
126 |
+
jQuery(this).removeClass('colomat-close');
|
127 |
+
var thisid = jQuery(this).attr('id');
|
128 |
+
jQuery('#target-'+thisid).css('display', 'none');
|
129 |
+
})
|
130 |
}
|
131 |
});
|
132 |
}
|
134 |
function closeOtherMembers(rel, id){
|
135 |
jQuery('.collapseomatic[rel="' + rel +'"]').each(function(index) {
|
136 |
//add close class if open
|
137 |
+
if(jQuery(this).attr('id') != id && jQuery(this).hasClass('colomat-close') && jQuery(this).attr('rel') !== undefined){
|
138 |
+
//collapse the element
|
139 |
+
jQuery(this).removeClass('colomat-close');
|
140 |
var thisid = jQuery(this).attr('id');
|
141 |
+
|
142 |
+
//check if the title needs to be swapped out
|
143 |
+
if(jQuery("#swap-"+thisid).length > 0){
|
144 |
+
swapTitle(this, thisid);
|
145 |
+
}
|
146 |
+
|
147 |
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
148 |
// Animation complete.
|
149 |
});
|
150 |
+
|
151 |
+
//check if there are nested children that need to be collapsed
|
152 |
+
var ancestors = jQuery('.collapseomatic', '#target-'+id);
|
153 |
+
ancestors.each(function(index) {
|
154 |
+
jQuery(this).removeClass('colomat-close');
|
155 |
+
var thisid = jQuery(this).attr('id');
|
156 |
+
//check if the title needs to be swapped out
|
157 |
+
if(jQuery("#swap-"+thisid).length > 0){
|
158 |
+
swapTitle(this, thisid);
|
159 |
+
}
|
160 |
+
jQuery('#target-'+thisid).css('display', 'none');
|
161 |
+
})
|
162 |
}
|
163 |
});
|
164 |
}
|
171 |
}
|
172 |
|
173 |
jQuery('.expandall').click(function() {
|
174 |
+
if(jQuery(this).attr('rel') !== undefined){
|
175 |
+
var rel = jQuery(this).attr('rel');
|
176 |
+
jQuery('.collapseomatic[rel="' + rel +'"].collapseomatic:not(.colomat-close)').each(function(index) {
|
177 |
+
jQuery(this).addClass('colomat-close');
|
178 |
+
var thisid = jQuery(this).attr('id');
|
179 |
+
|
180 |
+
if(jQuery("#swap-"+thisid).length > 0){
|
181 |
+
swapTitle(this, thisid);
|
182 |
+
}
|
183 |
+
|
184 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
185 |
+
// Animation complete.
|
186 |
+
});
|
187 |
+
});
|
188 |
+
}
|
189 |
+
else{
|
190 |
+
jQuery('.collapseomatic:not(.colomat-close)').each(function(index) {
|
191 |
+
jQuery(this).addClass('colomat-close');
|
192 |
+
var thisid = jQuery(this).attr('id');
|
193 |
+
|
194 |
+
if(jQuery("#swap-"+thisid).length > 0){
|
195 |
+
swapTitle(this, thisid);
|
196 |
+
}
|
197 |
+
|
198 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
199 |
+
// Animation complete.
|
200 |
+
});
|
201 |
+
});
|
202 |
+
}
|
203 |
});
|
204 |
|
205 |
jQuery('.collapseall').click(function() {
|
206 |
+
if(jQuery(this).attr('rel') !== undefined){
|
207 |
+
var rel = jQuery(this).attr('rel');
|
208 |
+
jQuery('.collapseomatic[rel="' + rel +'"].collapseomatic.colomat-close').each(function(index) {
|
209 |
+
jQuery(this).removeClass('colomat-close');
|
210 |
+
var thisid = jQuery(this).attr('id');
|
211 |
+
|
212 |
+
if(jQuery("#swap-"+thisid).length > 0){
|
213 |
+
swapTitle(this, thisid);
|
214 |
+
}
|
215 |
+
|
216 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
217 |
+
// Animation complete.
|
218 |
+
});
|
219 |
+
});
|
220 |
+
}
|
221 |
+
else{
|
222 |
+
jQuery('.collapseomatic.colomat-close').each(function(index) {
|
223 |
+
jQuery(this).removeClass('colomat-close');
|
224 |
+
var thisid = jQuery(this).attr('id');
|
225 |
+
|
226 |
+
if(jQuery("#swap-"+thisid).length > 0){
|
227 |
+
swapTitle(this, thisid);
|
228 |
+
}
|
229 |
+
|
230 |
+
jQuery('#target-'+thisid).slideToggle('fast', function() {
|
231 |
+
// Animation complete.
|
232 |
+
});
|
233 |
+
});
|
234 |
+
}
|
235 |
});
|
236 |
});
|
images/arrow-down-dark.png
DELETED
Binary file
|
images/arrow-up-dark.png
DELETED
Binary file
|
images/arrows.psd
DELETED
Binary file
|
readme.txt
CHANGED
@@ -1,38 +1,38 @@
|
|
1 |
=== jQuery Collapse-O-Matic ===
|
2 |
|
3 |
-
Contributors:
|
4 |
-
Donate link: http://
|
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.
|
9 |
|
10 |
-
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Collapse-O-Matic adds an `[expand title="trigger text"]hidden content[/expand]` shortcode that will wrap any content, including other shortcodes, into a lovely jQuery
|
15 |
|
16 |
== Installation ==
|
17 |
|
18 |
-
1. Old-school: upload the `collapse-o-matic` folder to the `/wp-content/
|
19 |
-
1. Activate the
|
20 |
-
1. Add a the shortcode to your post like so: `[expand title=Displayed Title Goes Here]Hidden content goes here[/expand]`
|
21 |
-
1. Test that the this
|
22 |
1. Tweak the CSS to match your flavor.
|
23 |
-
1. Rate the
|
24 |
-
1. Leave a comment regarding bugs, feature request, cocktail recipes at http://
|
25 |
|
26 |
== Frequently Asked Questions ==
|
27 |
|
28 |
= I am a Social Netwookiee, do you have a Facebook page? =
|
29 |
Yes, yes... <a href='http://www.facebook.com/twinpictures'>Twinpictures is on Facebook</a>.
|
30 |
|
31 |
-
= Does Twinpictures do the
|
32 |
-
Ah yes! <a href='twitter.com
|
33 |
|
34 |
= How does one use the shortcode, exactly? =
|
35 |
-
A <a href='http://
|
36 |
|
37 |
= Is Galato the same as Ice Cream? =
|
38 |
No. Not even close.
|
@@ -44,16 +44,61 @@ No. Not even close.
|
|
44 |
|
45 |
== Changelog ==
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
= 1.3.8 =
|
48 |
-
* Expand elements
|
49 |
|
50 |
= 1.3.7 =
|
51 |
* Added expandsub1 - expandsub3 shortcodes for nested expand elements.
|
52 |
-
* Added
|
53 |
* Better looking 24bit arrows.
|
54 |
|
55 |
= 1.3.6 =
|
56 |
-
*
|
57 |
|
58 |
= 1.3.5 =
|
59 |
* Random ID's now start with letters, for valid xhtml.
|
@@ -62,36 +107,75 @@ No. Not even close.
|
|
62 |
* Changed '-member' to '-highlander' because it sounds better.
|
63 |
|
64 |
= 1.3.3 =
|
65 |
-
* Added the ability to have only one member of a group expanded by
|
66 |
|
67 |
= 1.3.2 =
|
68 |
-
* Added Expanded attribute that sets the default
|
69 |
* Added style that moves arrows to the right of the text.
|
70 |
|
71 |
= 1.3.1 =
|
72 |
* Added the hover style to pimp the element style when moused over.
|
73 |
|
74 |
= 1.3 =
|
75 |
-
* Added the rel attribute to deal with grouping
|
76 |
* Added the trigclass and targclass attributes.
|
77 |
* Added the alt attribute to define the title's hover-over text.
|
78 |
|
79 |
= 1.2 =
|
80 |
* Expanded the shortcode to include an optional tag attribute. The system defaults to wrapping the trigger in a span tag.
|
81 |
* Style will support various element tags... span, div, h1, h2... etc.
|
82 |
-
* Style
|
83 |
|
84 |
= 1.1 =
|
85 |
* Optimized Code
|
86 |
* Shortcode now works in Sidebar
|
87 |
* Expand Titles now have title tags that match the title, not just some random number
|
88 |
-
*
|
89 |
* Added auto expand feature if an anchor tag is used in the URL
|
90 |
|
91 |
= 1.0 =
|
92 |
-
* The
|
93 |
|
94 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
= 1.3.8 =
|
96 |
Expand elements that have content containing only one space will not insert target elements.
|
97 |
|
@@ -99,7 +183,7 @@ Expand elements that have content containing only one space will not insert targ
|
|
99 |
New expandsub1 - expandsub3 shortcodes for nested expand elements. Collapse/Expand all triggers. Improved arrow icons.
|
100 |
|
101 |
= 1.3.6 =
|
102 |
-
|
103 |
|
104 |
= 1.3.5 =
|
105 |
Random ID's are now valid xhtml.
|
@@ -120,10 +204,10 @@ Hover style added.
|
|
120 |
Collapse-O-Matic has been significantly advanced. Elements can now be grouped together.
|
121 |
|
122 |
= 1.2 =
|
123 |
-
Style has been updated for ultimate flexibility.
|
124 |
|
125 |
= 1.1 =
|
126 |
-
Shortcode now works in sidebars.
|
127 |
|
128 |
= 1.0 =
|
129 |
Where once there was not, there now is.
|
1 |
=== jQuery Collapse-O-Matic ===
|
2 |
|
3 |
+
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
|
6 |
Requires at least: 2.8
|
7 |
+
Tested up to: 3.3.1
|
8 |
+
Stable tag: 1.4.1
|
9 |
|
10 |
+
Remove clutter, save space: display and hide additional content in a SEO friendly way by warpping content in an [expand] shortcode.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Collapse-O-Matic adds an `[expand title="trigger text"]hidden content[/expand]` shortcode that will wrap any content, including other shortcodes, into a lovely jQuery expanding and collapsing div. A <a href='http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/'>complete listing of shortcode options and attribute demos</a> are available, as well as <a href='http://wordpress.org/tags/jquery-collapse-o-matic'>free community</a> and <a href='http://plugins.twinpictures.de/plugins/collapse-o-matic/support/'>premium support</a>. This plug-in was inspired by DrLebowski's Collapsing Objects.
|
15 |
|
16 |
== Installation ==
|
17 |
|
18 |
+
1. Old-school: upload the `collapse-o-matic` folder to the `/wp-content/plug-ins/` directory via FTP. Hipster: Ironically add collapse-o-matic via the WordPress Plug-ins menu.
|
19 |
+
1. Activate the Plug-in
|
20 |
+
1. Add a the shortcode to your post like so: `[expand title="Displayed Title Goes Here"]Hidden content goes here[/expand]`
|
21 |
+
1. Test that the this plug-in meets your demanding needs.
|
22 |
1. Tweak the CSS to match your flavor.
|
23 |
+
1. Rate the plug-in and verify if it works at wordpress.org.
|
24 |
+
1. Leave a comment regarding bugs, feature request, cocktail recipes at http://wordpress.org/tags/jquery-collapse-o-matic/
|
25 |
|
26 |
== Frequently Asked Questions ==
|
27 |
|
28 |
= I am a Social Netwookiee, do you have a Facebook page? =
|
29 |
Yes, yes... <a href='http://www.facebook.com/twinpictures'>Twinpictures is on Facebook</a>.
|
30 |
|
31 |
+
= Does Twinpictures do the Twitter? =
|
32 |
+
Ah yes! <a href='http://twitter.com/#!/twinpictures'>@Twinpictures</a> does the twitter tweeting around here.
|
33 |
|
34 |
= How does one use the shortcode, exactly? =
|
35 |
+
A <a href='http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/'>complete listing of shortcode options</a> has been provided to answer this exact question.
|
36 |
|
37 |
= Is Galato the same as Ice Cream? =
|
38 |
No. Not even close.
|
44 |
|
45 |
== Changelog ==
|
46 |
|
47 |
+
= 1.4.1 =
|
48 |
+
* Autoclose elements will now trigger SwapTitle
|
49 |
+
|
50 |
+
= 1.4 =
|
51 |
+
* Relaunched of plugin page on Twinpictures' Plugin Oven
|
52 |
+
|
53 |
+
= 1.3.18 =
|
54 |
+
* Added alternate style sheet for sites with dark backgrounds.
|
55 |
+
|
56 |
+
= 1.3.17 =
|
57 |
+
* Improved nesting collapse function for sub-levels and added support for nesting 30 levels deep.
|
58 |
+
|
59 |
+
= 1.3.16.1 =
|
60 |
+
* Added noarrows class for better integration of images as triggers.
|
61 |
+
|
62 |
+
= 1.3.16 =
|
63 |
+
* Bug Fix for the new trigpos attribute, stupid, stupid, stupid
|
64 |
+
|
65 |
+
= 1.3.15 =
|
66 |
+
* Added trigpos attribute to position the trigger below the target.
|
67 |
+
|
68 |
+
= 1.3.14 =
|
69 |
+
* Fixed the Enqueue error (thanks pborg & lancehudson)
|
70 |
+
* Expand All and Collapse All will now also trigger swap titles
|
71 |
+
* Added force_content_collapse class trigger to hide all targets w/o tirggers (roll-your-own)
|
72 |
+
* Added content_collapse_wrapper class trigger that keeps targets hidden if no JavaScript is present.
|
73 |
+
|
74 |
+
= 1.3.13 =
|
75 |
+
* Added the ability to place a second trigger link inside the expanding content area.
|
76 |
+
|
77 |
+
= 1.3.12 =
|
78 |
+
* Added the 'tracy patch' that will collapse all nested items if the parent is collapsed via highlander grouping.
|
79 |
+
|
80 |
+
= 1.3.11 =
|
81 |
+
* Added excerpt feature and all related attributes.
|
82 |
+
|
83 |
+
= 1.3.10 =
|
84 |
+
* Swaptitle system rebuilt to support images and cufon.
|
85 |
+
* Updated CSS the over generalized names close and hover to more plug-in specific colomat-close and colomat-hover
|
86 |
+
* removed !important from CSS arrow definitions to make it easier to redefine arrows.
|
87 |
+
|
88 |
+
= 1.3.9 =
|
89 |
+
* Swaptitle will not be triggered if either <img> or <cufon> tags are used in trigger titles
|
90 |
+
* Added rel grouping to the collapse/expand-all triggers to target only elements of a single group.
|
91 |
+
|
92 |
= 1.3.8 =
|
93 |
+
* Expand elements containing content with one empty space will no longer insert empty target elements.
|
94 |
|
95 |
= 1.3.7 =
|
96 |
* Added expandsub1 - expandsub3 shortcodes for nested expand elements.
|
97 |
+
* Added collapse/expand-all triggers.
|
98 |
* Better looking 24bit arrows.
|
99 |
|
100 |
= 1.3.6 =
|
101 |
+
* Plug-in now degrades gracefully if JS is disabled. Added swaptitle attribute to change the title on expand/collapse.
|
102 |
|
103 |
= 1.3.5 =
|
104 |
* Random ID's now start with letters, for valid xhtml.
|
107 |
* Changed '-member' to '-highlander' because it sounds better.
|
108 |
|
109 |
= 1.3.3 =
|
110 |
+
* Added the ability to have only one member of a group expanded by adding '-member' to the rel attribute value.
|
111 |
|
112 |
= 1.3.2 =
|
113 |
+
* Added Expanded attribute that sets the default position expanded open.
|
114 |
* Added style that moves arrows to the right of the text.
|
115 |
|
116 |
= 1.3.1 =
|
117 |
* Added the hover style to pimp the element style when moused over.
|
118 |
|
119 |
= 1.3 =
|
120 |
+
* Added the rel attribute to deal with grouping collapse elements.
|
121 |
* Added the trigclass and targclass attributes.
|
122 |
* Added the alt attribute to define the title's hover-over text.
|
123 |
|
124 |
= 1.2 =
|
125 |
* Expanded the shortcode to include an optional tag attribute. The system defaults to wrapping the trigger in a span tag.
|
126 |
* Style will support various element tags... span, div, h1, h2... etc.
|
127 |
+
* Style separates the arrow icons, so there is no background bleed-over on extra-long trigger titles.
|
128 |
|
129 |
= 1.1 =
|
130 |
* Optimized Code
|
131 |
* Shortcode now works in Sidebar
|
132 |
* Expand Titles now have title tags that match the title, not just some random number
|
133 |
+
* Shortcode can include a user-defined ID instead of a generated random number
|
134 |
* Added auto expand feature if an anchor tag is used in the URL
|
135 |
|
136 |
= 1.0 =
|
137 |
+
* The plug-in came to be.
|
138 |
|
139 |
== Upgrade Notice ==
|
140 |
+
= 1.4.1 =
|
141 |
+
* Swaptitle will be triggered by autoexpand/collapse events such as highlander grouping.
|
142 |
+
|
143 |
+
= 1.4 =
|
144 |
+
* Improved support and FAQs on Plugin Oven support page
|
145 |
+
|
146 |
+
= 1.3.18 =
|
147 |
+
* Added alternate style sheet for sites with dark backgrounds.
|
148 |
+
|
149 |
+
= 1.3.17 =
|
150 |
+
* Improved nesting collapse function for sub-levels and added support for nesting 30 levels deep.
|
151 |
+
|
152 |
+
= 1.3.16.1 =
|
153 |
+
* Added noarrows class for better integration of images as triggers.
|
154 |
+
|
155 |
+
= 1.3.16 =
|
156 |
+
* Bug Fix for the new trigpos attribute, stupid, stupid, stupid
|
157 |
+
|
158 |
+
= 1.3.15 =
|
159 |
+
Added trigpos attribute to position the trigger below the target.
|
160 |
+
|
161 |
+
= 1.3.14 =
|
162 |
+
Fixed Enqueue error and swap title on expand/collpase all. Expanded roll-your-own features.
|
163 |
+
|
164 |
+
= 1.3.13 =
|
165 |
+
Added the ability to place a second trigger link inside the expanding content area.
|
166 |
+
|
167 |
+
= 1.3.12 =
|
168 |
+
Now when Highlander Grouping collapses an element, it will automatically collapse nested elements as well.
|
169 |
+
|
170 |
+
= 1.3.11 =
|
171 |
+
Added excerpt feature that allows a juicy bit of nibble text to be displayed above and below the trigger text—as well as below the target text.
|
172 |
+
|
173 |
+
= 1.3.10 =
|
174 |
+
Rebuilt swaptitle to support images and cufon text. Change CSS names to be more plug-in specific.
|
175 |
+
|
176 |
+
= 1.3.9 =
|
177 |
+
Title triggers that contain <img> or <cufon> tags will not trigger swaptitle. Added rel grouping option to expand/collapse-all triggers.
|
178 |
+
|
179 |
= 1.3.8 =
|
180 |
Expand elements that have content containing only one space will not insert target elements.
|
181 |
|
183 |
New expandsub1 - expandsub3 shortcodes for nested expand elements. Collapse/Expand all triggers. Improved arrow icons.
|
184 |
|
185 |
= 1.3.6 =
|
186 |
+
Plug-in degrades gracefully when JS is disabled. Title can now have expand/collapse states using swaptitle attribute.
|
187 |
|
188 |
= 1.3.5 =
|
189 |
Random ID's are now valid xhtml.
|
204 |
Collapse-O-Matic has been significantly advanced. Elements can now be grouped together.
|
205 |
|
206 |
= 1.2 =
|
207 |
+
Style has been updated for ultimate flexibility. Shortcode can now be written as `[expand title="title goes here" id="optional-id-goes-here" tag="optional-html-tag-goes-here"]content goes here[/expand]`.
|
208 |
|
209 |
= 1.1 =
|
210 |
+
Shortcode now works in sidebars. Shortcode must be written as `[expand title="title goes here" id="optional-id-goes-here"]content goes here[/expand]`.
|
211 |
|
212 |
= 1.0 =
|
213 |
Where once there was not, there now is.
|
style-dark.css
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.collapseomatic {
|
2 |
+
background-image: url(images/arrow-down-dark.png);
|
3 |
+
background-repeat: no-repeat;
|
4 |
+
padding: 0 0 10px 16px;
|
5 |
+
/*border: 1px dotted blue;*/
|
6 |
+
cursor: pointer;
|
7 |
+
}
|
8 |
+
.arrowright {
|
9 |
+
background-position: top right;
|
10 |
+
padding: 0 16px 10px 0;
|
11 |
+
}
|
12 |
+
.noarrow {
|
13 |
+
background-image: none !important;
|
14 |
+
padding: 0 0 10px 0;
|
15 |
+
}
|
16 |
+
.colomat-hover {
|
17 |
+
text-decoration: underline;
|
18 |
+
}
|
19 |
+
.colomat-close {
|
20 |
+
background-image: url(images/arrow-up-dark.png);
|
21 |
+
}
|
22 |
+
.collapseomatic_excerpt, .collapseomatic_content {
|
23 |
+
margin-top: 0px;
|
24 |
+
margin-left: 16px;
|
25 |
+
padding: 0px;
|
26 |
+
}
|
27 |
+
.content_collapse_wrapper {
|
28 |
+
display: none;
|
29 |
+
}
|
30 |
+
.collapseall, .expandall {
|
31 |
+
cursor: pointer;
|
32 |
+
}
|
33 |
+
.collapseall:hover, .expandall:hover {
|
34 |
+
text-decoration: underline;
|
35 |
+
}
|
style.css
CHANGED
@@ -1,29 +1,35 @@
|
|
1 |
.collapseomatic {
|
2 |
-
background-image: url(images/arrow-down.png)
|
3 |
background-repeat: no-repeat;
|
4 |
padding: 0 0 10px 16px;
|
|
|
5 |
cursor: pointer;
|
6 |
}
|
7 |
.arrowright {
|
8 |
background-position: top right;
|
9 |
padding: 0 16px 10px 0;
|
10 |
}
|
11 |
-
.
|
|
|
|
|
|
|
|
|
12 |
text-decoration: underline;
|
13 |
}
|
14 |
-
.close {
|
15 |
-
background-image: url(images/arrow-up.png)
|
16 |
}
|
17 |
-
.collapseomatic_content {
|
18 |
margin-top: 0px;
|
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 |
-
}
|
1 |
.collapseomatic {
|
2 |
+
background-image: url(images/arrow-down.png);
|
3 |
background-repeat: no-repeat;
|
4 |
padding: 0 0 10px 16px;
|
5 |
+
/*border: 1px dotted blue;*/
|
6 |
cursor: pointer;
|
7 |
}
|
8 |
.arrowright {
|
9 |
background-position: top right;
|
10 |
padding: 0 16px 10px 0;
|
11 |
}
|
12 |
+
.noarrow {
|
13 |
+
background-image: none !important;
|
14 |
+
padding: 0 0 10px 0;
|
15 |
+
}
|
16 |
+
.colomat-hover {
|
17 |
text-decoration: underline;
|
18 |
}
|
19 |
+
.colomat-close {
|
20 |
+
background-image: url(images/arrow-up.png);
|
21 |
}
|
22 |
+
.collapseomatic_excerpt, .collapseomatic_content {
|
23 |
margin-top: 0px;
|
24 |
margin-left: 16px;
|
25 |
padding: 0px;
|
26 |
}
|
27 |
+
.content_collapse_wrapper {
|
28 |
+
display: none;
|
29 |
+
}
|
30 |
.collapseall, .expandall {
|
31 |
cursor: pointer;
|
32 |
}
|
|
|
33 |
.collapseall:hover, .expandall:hover {
|
34 |
text-decoration: underline;
|
35 |
+
}
|