Version Description
- 19/01/2016 - update - Minor option udpate.
Download this release
Release Info
Developer | paratheme |
Plugin | Accordion |
Version | 1.10 |
Comparing to | |
See all releases |
Code changes from version 1.9 to 1.10
- accordions.php +8 -8
- admin/css/style.css +2 -1
- admin/js/scripts.js +1 -1
- includes/accordions-functions.php +34 -0
- includes/accordions-meta.php +17 -13
- js/jquery.tablednd.js +0 -382
- js/responsive-accordion.js +0 -43
- readme.txt +33 -30
accordions.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Accordions
|
4 |
-
Plugin URI: http://
|
5 |
Description: Fully responsive and mobile ready accordion grid for wordpress.
|
6 |
-
Version: 1.
|
7 |
Author: pickplugins
|
8 |
Author URI: http://pickplugins.com
|
9 |
License: GPLv2 or later
|
@@ -21,12 +21,12 @@ class Accordions{
|
|
21 |
define('accordions_plugin_dir', plugin_dir_path( __FILE__ ) );
|
22 |
define('accordions_wp_url', 'https://wordpress.org/plugins/accordions/' );
|
23 |
define('accordions_wp_reviews', 'http://wordpress.org/support/view/plugin-reviews/accordions' );
|
24 |
-
define('accordions_pro_url','http://
|
25 |
-
define('accordions_demo_url', 'http://
|
26 |
-
define('accordions_conatct_url', 'http://
|
27 |
-
define('accordions_qa_url', 'http://
|
28 |
define('accordions_plugin_name', 'Accordions' );
|
29 |
-
define('accordions_plugin_version', '1.
|
30 |
define('accordions_customer_type', 'free' );
|
31 |
define('accordions_share_url', 'https://wordpress.org/plugins/accordions/' );
|
32 |
define('accordions_tutorial_video_url', '//www.youtube.com/embed/h2wNFJaaY8s?rel=0' );
|
@@ -84,7 +84,7 @@ class Accordions{
|
|
84 |
wp_enqueue_script('jquery-ui-core');
|
85 |
//wp_enqueue_script('jquery-ui-sortable');
|
86 |
wp_enqueue_script('accordions_admin_js', plugins_url( '/admin/js/scripts.js' , __FILE__ ) , array( 'jquery' ));
|
87 |
-
wp_enqueue_script('jquery.tablednd.js', plugins_url( '/js/jquery.tablednd.js' , __FILE__ ) , array( 'jquery' ));
|
88 |
|
89 |
//wp_enqueue_style('accordions_admin_style', accordions_plugin_url.'admin/css/style.css'); // ssl issue
|
90 |
wp_enqueue_style('accordions_admin_style', plugins_url( 'admin/css/style.css', __FILE__ ));
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Accordions
|
4 |
+
Plugin URI: http://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/
|
5 |
Description: Fully responsive and mobile ready accordion grid for wordpress.
|
6 |
+
Version: 1.10
|
7 |
Author: pickplugins
|
8 |
Author URI: http://pickplugins.com
|
9 |
License: GPLv2 or later
|
21 |
define('accordions_plugin_dir', plugin_dir_path( __FILE__ ) );
|
22 |
define('accordions_wp_url', 'https://wordpress.org/plugins/accordions/' );
|
23 |
define('accordions_wp_reviews', 'http://wordpress.org/support/view/plugin-reviews/accordions' );
|
24 |
+
define('accordions_pro_url','http://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/' );
|
25 |
+
define('accordions_demo_url', 'http://pickplugins.com' );
|
26 |
+
define('accordions_conatct_url', 'http://pickplugins.com/contact' );
|
27 |
+
define('accordions_qa_url', 'http://www.pickplugins.com/questions/' );
|
28 |
define('accordions_plugin_name', 'Accordions' );
|
29 |
+
define('accordions_plugin_version', '1.10' );
|
30 |
define('accordions_customer_type', 'free' );
|
31 |
define('accordions_share_url', 'https://wordpress.org/plugins/accordions/' );
|
32 |
define('accordions_tutorial_video_url', '//www.youtube.com/embed/h2wNFJaaY8s?rel=0' );
|
84 |
wp_enqueue_script('jquery-ui-core');
|
85 |
//wp_enqueue_script('jquery-ui-sortable');
|
86 |
wp_enqueue_script('accordions_admin_js', plugins_url( '/admin/js/scripts.js' , __FILE__ ) , array( 'jquery' ));
|
87 |
+
//wp_enqueue_script('jquery.tablednd.js', plugins_url( '/js/jquery.tablednd.js' , __FILE__ ) , array( 'jquery' ));
|
88 |
|
89 |
//wp_enqueue_style('accordions_admin_style', accordions_plugin_url.'admin/css/style.css'); // ssl issue
|
90 |
wp_enqueue_style('accordions_admin_style', plugins_url( 'admin/css/style.css', __FILE__ ));
|
admin/css/style.css
CHANGED
@@ -119,7 +119,8 @@
|
|
119 |
display: inline-block;
|
120 |
}
|
121 |
#accordions_metabox .accordions-content .section-header .removeaccordions {
|
122 |
-
background:
|
|
|
123 |
cursor: pointer;
|
124 |
display: inline-block;
|
125 |
float: right;
|
119 |
display: inline-block;
|
120 |
}
|
121 |
#accordions_metabox .accordions-content .section-header .removeaccordions {
|
122 |
+
background: rgb(255, 91, 64) none repeat scroll 0 0;
|
123 |
+
color: #fff;
|
124 |
cursor: pointer;
|
125 |
display: inline-block;
|
126 |
float: right;
|
admin/js/scripts.js
CHANGED
@@ -115,7 +115,7 @@ jQuery(document).ready(function($)
|
|
115 |
}
|
116 |
|
117 |
|
118 |
-
$(".accordions-content").append('<tr index="'+row+'" valign="top"><td class="
|
119 |
|
120 |
|
121 |
|
115 |
}
|
116 |
|
117 |
|
118 |
+
$(".accordions-content").append('<tr index="'+row+'" valign="top"><td class="tab-new" style="vertical-align:middle;"><br/><input width="100%" placeholder="accordions Header" type="text" name="accordions_content_title[row_'+row+']" value="" /><br /><br /><textarea placeholder="accordions Content" name="accordions_content_body[row_'+row+']" ></textarea></td></tr>');
|
119 |
|
120 |
|
121 |
|
includes/accordions-functions.php
CHANGED
@@ -8,6 +8,40 @@
|
|
8 |
if ( ! defined('ABSPATH')) exit; // if direct access
|
9 |
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
function accordions_paratheme_dark_color($input_color)
|
12 |
{
|
13 |
if(empty($input_color))
|
8 |
if ( ! defined('ABSPATH')) exit; // if direct access
|
9 |
|
10 |
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
function accordions_add_shortcode_column( $columns ) {
|
17 |
+
return array_merge( $columns,
|
18 |
+
array( 'shortcode' => __( 'Shortcode', 'accordions' ) ) );
|
19 |
+
}
|
20 |
+
add_filter( 'manage_accordions_posts_columns' , 'accordions_add_shortcode_column' );
|
21 |
+
|
22 |
+
|
23 |
+
function accordions_posts_shortcode_display( $column, $post_id ) {
|
24 |
+
if ($column == 'shortcode'){
|
25 |
+
?>
|
26 |
+
<input style="background:#bfefff" type="text" onClick="this.select();" value="[accordions <?php echo 'id="'.$post_id.'"';?>]" /><br />
|
27 |
+
<textarea cols="50" rows="1" style="background:#bfefff" onClick="this.select();" ><?php echo '<?php echo do_shortcode("[accordions id='; echo "'".$post_id."']"; echo '"); ?>'; ?></textarea>
|
28 |
+
<?php
|
29 |
+
|
30 |
+
}
|
31 |
+
}
|
32 |
+
add_action( 'manage_accordions_posts_custom_column' , 'accordions_posts_shortcode_display', 10, 2 );
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
+
|
45 |
function accordions_paratheme_dark_color($input_color)
|
46 |
{
|
47 |
if(empty($input_color))
|
includes/accordions-meta.php
CHANGED
@@ -25,8 +25,8 @@ function accordions_posttype_register() {
|
|
25 |
|
26 |
$args = array(
|
27 |
'labels' => $labels,
|
28 |
-
'public' =>
|
29 |
-
'publicly_queryable' =>
|
30 |
'show_ui' => true,
|
31 |
'query_var' => true,
|
32 |
'menu_icon' => null,
|
@@ -422,7 +422,7 @@ function meta_boxes_accordions_input( $post ) {
|
|
422 |
?>
|
423 |
<tr index='<?php echo $index; ?>' valign="top">
|
424 |
|
425 |
-
|
426 |
|
427 |
<td style="vertical-align:middle;">
|
428 |
<div class="section-header">
|
@@ -446,7 +446,7 @@ function meta_boxes_accordions_input( $post ) {
|
|
446 |
|
447 |
?>
|
448 |
|
449 |
-
<label class="switch"
|
450 |
|
451 |
|
452 |
|
@@ -487,24 +487,28 @@ function meta_boxes_accordions_input( $post ) {
|
|
487 |
|
488 |
|
489 |
|
490 |
-
<script>
|
491 |
|
492 |
-
jQuery(document).ready(function() {
|
493 |
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
499 |
|
500 |
|
501 |
|
502 |
|
503 |
|
504 |
|
505 |
-
});
|
506 |
|
507 |
-
</script>
|
508 |
|
509 |
|
510 |
|
25 |
|
26 |
$args = array(
|
27 |
'labels' => $labels,
|
28 |
+
'public' => false,
|
29 |
+
'publicly_queryable' => false,
|
30 |
'show_ui' => true,
|
31 |
'query_var' => true,
|
32 |
'menu_icon' => null,
|
422 |
?>
|
423 |
<tr index='<?php echo $index; ?>' valign="top">
|
424 |
|
425 |
+
|
426 |
|
427 |
<td style="vertical-align:middle;">
|
428 |
<div class="section-header">
|
446 |
|
447 |
?>
|
448 |
|
449 |
+
<label class="switch" ><input type="checkbox" name="accordions_hide[<?php echo $index; ?>]" value="1" <?php echo $checked; ?> />Hide on Frontend</label>
|
450 |
|
451 |
|
452 |
|
487 |
|
488 |
|
489 |
|
|
|
490 |
|
|
|
491 |
|
492 |
+
|
493 |
+
|
494 |
+
<script>
|
495 |
+
jQuery(document).ready(function($)
|
496 |
+
{
|
497 |
+
$(function() {
|
498 |
+
$( "#accordions-content tbody" ).sortable();
|
499 |
+
//$( ".items-container" ).disableSelection();
|
500 |
+
});
|
501 |
+
|
502 |
+
})
|
503 |
+
|
504 |
+
</script>
|
505 |
|
506 |
|
507 |
|
508 |
|
509 |
|
510 |
|
|
|
511 |
|
|
|
512 |
|
513 |
|
514 |
|
js/jquery.tablednd.js
DELETED
@@ -1,382 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* TableDnD plug-in for JQuery, allows you to drag and drop table rows
|
3 |
-
* You can set up various options to control how the system will work
|
4 |
-
* Copyright (c) Denis Howlett <denish@isocra.com>
|
5 |
-
* Licensed like jQuery, see http://docs.jquery.com/License.
|
6 |
-
*
|
7 |
-
* Configuration options:
|
8 |
-
*
|
9 |
-
* onDragStyle
|
10 |
-
* This is the style that is assigned to the row during drag. There are limitations to the styles that can be
|
11 |
-
* associated with a row (such as you can't assign a border--well you can, but it won't be
|
12 |
-
* displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as
|
13 |
-
* a map (as used in the jQuery css(...) function).
|
14 |
-
* onDropStyle
|
15 |
-
* This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations
|
16 |
-
* to what you can do. Also this replaces the original style, so again consider using onDragClass which
|
17 |
-
* is simply added and then removed on drop.
|
18 |
-
* onDragClass
|
19 |
-
* This class is added for the duration of the drag and then removed when the row is dropped. It is more
|
20 |
-
* flexible than using onDragStyle since it can be inherited by the row cells and other content. The default
|
21 |
-
* is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your
|
22 |
-
* stylesheet.
|
23 |
-
* onDrop
|
24 |
-
* Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table
|
25 |
-
* and the row that was dropped. You can work out the new order of the rows by using
|
26 |
-
* table.rows.
|
27 |
-
* onDragStart
|
28 |
-
* Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the
|
29 |
-
* table and the row which the user has started to drag.
|
30 |
-
* onAllowDrop
|
31 |
-
* Pass a function that will be called as a row is over another row. If the function returns true, allow
|
32 |
-
* dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under
|
33 |
-
* the cursor. It returns a boolean: true allows the drop, false doesn't allow it.
|
34 |
-
* scrollAmount
|
35 |
-
* This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the
|
36 |
-
* window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2,
|
37 |
-
* FF3 beta
|
38 |
-
* dragHandle
|
39 |
-
* This is the name of a class that you assign to one or more cells in each row that is draggable. If you
|
40 |
-
* specify this class, then you are responsible for setting cursor: move in the CSS and only these cells
|
41 |
-
* will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where
|
42 |
-
* the whole row is draggable.
|
43 |
-
*
|
44 |
-
* Other ways to control behaviour:
|
45 |
-
*
|
46 |
-
* Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows
|
47 |
-
* that you don't want to be draggable.
|
48 |
-
*
|
49 |
-
* Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form
|
50 |
-
* <tableID>[]=<rowID1>&<tableID>[]=<rowID2> so that you can send this back to the server. The table must have
|
51 |
-
* an ID as must all the rows.
|
52 |
-
*
|
53 |
-
* Other methods:
|
54 |
-
*
|
55 |
-
* $("...").tableDnDUpdate()
|
56 |
-
* Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells).
|
57 |
-
* This is useful if you have updated the table rows using Ajax and you want to make the table draggable again.
|
58 |
-
* The table maintains the original configuration (so you don't have to specify it again).
|
59 |
-
*
|
60 |
-
* $("...").tableDnDSerialize()
|
61 |
-
* Will serialize and return the serialized string as above, but for each of the matching tables--so it can be
|
62 |
-
* called from anywhere and isn't dependent on the currentTable being set up correctly before calling
|
63 |
-
*
|
64 |
-
* Known problems:
|
65 |
-
* - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0
|
66 |
-
*
|
67 |
-
* Version 0.2: 2008-02-20 First public version
|
68 |
-
* Version 0.3: 2008-02-07 Added onDragStart option
|
69 |
-
* Made the scroll amount configurable (default is 5 as before)
|
70 |
-
* Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes
|
71 |
-
* Added onAllowDrop to control dropping
|
72 |
-
* Fixed a bug which meant that you couldn't set the scroll amount in both directions
|
73 |
-
* Added serialize method
|
74 |
-
* Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row
|
75 |
-
* draggable
|
76 |
-
* Improved the serialize method to use a default (and settable) regular expression.
|
77 |
-
* Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table
|
78 |
-
*/
|
79 |
-
jQuery.tableDnD = {
|
80 |
-
/** Keep hold of the current table being dragged */
|
81 |
-
currentTable : null,
|
82 |
-
/** Keep hold of the current drag object if any */
|
83 |
-
dragObject: null,
|
84 |
-
/** The current mouse offset */
|
85 |
-
mouseOffset: null,
|
86 |
-
/** Remember the old value of Y so that we don't do too much processing */
|
87 |
-
oldY: 0,
|
88 |
-
|
89 |
-
/** Actually build the structure */
|
90 |
-
build: function(options) {
|
91 |
-
// Set up the defaults if any
|
92 |
-
|
93 |
-
this.each(function() {
|
94 |
-
// This is bound to each matching table, set up the defaults and override with user options
|
95 |
-
this.tableDnDConfig = jQuery.extend({
|
96 |
-
onDragStyle: null,
|
97 |
-
onDropStyle: null,
|
98 |
-
// Add in the default class for whileDragging
|
99 |
-
onDragClass: "tDnD_whileDrag",
|
100 |
-
onDrop: null,
|
101 |
-
onDragStart: null,
|
102 |
-
scrollAmount: 5,
|
103 |
-
serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs
|
104 |
-
serializeParamName: null, // If you want to specify another parameter name instead of the table ID
|
105 |
-
dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable
|
106 |
-
}, options || {});
|
107 |
-
// Now make the rows draggable
|
108 |
-
jQuery.tableDnD.makeDraggable(this);
|
109 |
-
});
|
110 |
-
|
111 |
-
// Now we need to capture the mouse up and mouse move event
|
112 |
-
// We can use bind so that we don't interfere with other event handlers
|
113 |
-
jQuery(document)
|
114 |
-
.bind('mousemove', jQuery.tableDnD.mousemove)
|
115 |
-
.bind('mouseup', jQuery.tableDnD.mouseup);
|
116 |
-
|
117 |
-
// Don't break the chain
|
118 |
-
return this;
|
119 |
-
},
|
120 |
-
|
121 |
-
/** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */
|
122 |
-
makeDraggable: function(table) {
|
123 |
-
var config = table.tableDnDConfig;
|
124 |
-
if (table.tableDnDConfig.dragHandle) {
|
125 |
-
// We only need to add the event to the specified cells
|
126 |
-
var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table);
|
127 |
-
cells.each(function() {
|
128 |
-
// The cell is bound to "this"
|
129 |
-
jQuery(this).mousedown(function(ev) {
|
130 |
-
jQuery.tableDnD.dragObject = this.parentNode;
|
131 |
-
jQuery.tableDnD.currentTable = table;
|
132 |
-
jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
|
133 |
-
if (config.onDragStart) {
|
134 |
-
// Call the onDrop method if there is one
|
135 |
-
config.onDragStart(table, this);
|
136 |
-
}
|
137 |
-
return false;
|
138 |
-
});
|
139 |
-
})
|
140 |
-
} else {
|
141 |
-
// For backwards compatibility, we add the event to the whole row
|
142 |
-
var rows = jQuery("tr", table); // get all the rows as a wrapped set
|
143 |
-
rows.each(function() {
|
144 |
-
// Iterate through each row, the row is bound to "this"
|
145 |
-
var row = jQuery(this);
|
146 |
-
if (! row.hasClass("nodrag")) {
|
147 |
-
row.mousedown(function(ev) {
|
148 |
-
if (ev.target.tagName == "TD") {
|
149 |
-
jQuery.tableDnD.dragObject = this;
|
150 |
-
jQuery.tableDnD.currentTable = table;
|
151 |
-
jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
|
152 |
-
if (config.onDragStart) {
|
153 |
-
// Call the onDrop method if there is one
|
154 |
-
config.onDragStart(table, this);
|
155 |
-
}
|
156 |
-
return false;
|
157 |
-
}
|
158 |
-
}).css("cursor", "move"); // Store the tableDnD object
|
159 |
-
}
|
160 |
-
});
|
161 |
-
}
|
162 |
-
},
|
163 |
-
|
164 |
-
updateTables: function() {
|
165 |
-
this.each(function() {
|
166 |
-
// this is now bound to each matching table
|
167 |
-
if (this.tableDnDConfig) {
|
168 |
-
jQuery.tableDnD.makeDraggable(this);
|
169 |
-
}
|
170 |
-
})
|
171 |
-
},
|
172 |
-
|
173 |
-
/** Get the mouse coordinates from the event (allowing for browser differences) */
|
174 |
-
mouseCoords: function(ev){
|
175 |
-
if(ev.pageX || ev.pageY){
|
176 |
-
return {x:ev.pageX, y:ev.pageY};
|
177 |
-
}
|
178 |
-
return {
|
179 |
-
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
|
180 |
-
y:ev.clientY + document.body.scrollTop - document.body.clientTop
|
181 |
-
};
|
182 |
-
},
|
183 |
-
|
184 |
-
/** Given a target element and a mouse event, get the mouse offset from that element.
|
185 |
-
To do this we need the element's position and the mouse position */
|
186 |
-
getMouseOffset: function(target, ev) {
|
187 |
-
ev = ev || window.event;
|
188 |
-
|
189 |
-
var docPos = this.getPosition(target);
|
190 |
-
var mousePos = this.mouseCoords(ev);
|
191 |
-
return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
|
192 |
-
},
|
193 |
-
|
194 |
-
/** Get the position of an element by going up the DOM tree and adding up all the offsets */
|
195 |
-
getPosition: function(e){
|
196 |
-
var left = 0;
|
197 |
-
var top = 0;
|
198 |
-
/** Safari fix -- thanks to Luis Chato for this! */
|
199 |
-
if (e.offsetHeight == 0) {
|
200 |
-
/** Safari 2 doesn't correctly grab the offsetTop of a table row
|
201 |
-
this is detailed here:
|
202 |
-
http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/
|
203 |
-
the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
|
204 |
-
note that firefox will return a text node as a first child, so designing a more thorough
|
205 |
-
solution may need to take that into account, for now this seems to work in firefox, safari, ie */
|
206 |
-
e = e.firstChild; // a table cell
|
207 |
-
}
|
208 |
-
|
209 |
-
while (e.offsetParent){
|
210 |
-
left += e.offsetLeft;
|
211 |
-
top += e.offsetTop;
|
212 |
-
e = e.offsetParent;
|
213 |
-
}
|
214 |
-
|
215 |
-
left += e.offsetLeft;
|
216 |
-
top += e.offsetTop;
|
217 |
-
|
218 |
-
return {x:left, y:top};
|
219 |
-
},
|
220 |
-
|
221 |
-
mousemove: function(ev) {
|
222 |
-
if (jQuery.tableDnD.dragObject == null) {
|
223 |
-
return;
|
224 |
-
}
|
225 |
-
|
226 |
-
var dragObj = jQuery(jQuery.tableDnD.dragObject);
|
227 |
-
var config = jQuery.tableDnD.currentTable.tableDnDConfig;
|
228 |
-
var mousePos = jQuery.tableDnD.mouseCoords(ev);
|
229 |
-
var y = mousePos.y - jQuery.tableDnD.mouseOffset.y;
|
230 |
-
//auto scroll the window
|
231 |
-
var yOffset = window.pageYOffset;
|
232 |
-
if (document.all) {
|
233 |
-
// Windows version
|
234 |
-
//yOffset=document.body.scrollTop;
|
235 |
-
if (typeof document.compatMode != 'undefined' &&
|
236 |
-
document.compatMode != 'BackCompat') {
|
237 |
-
yOffset = document.documentElement.scrollTop;
|
238 |
-
}
|
239 |
-
else if (typeof document.body != 'undefined') {
|
240 |
-
yOffset=document.body.scrollTop;
|
241 |
-
}
|
242 |
-
|
243 |
-
}
|
244 |
-
|
245 |
-
if (mousePos.y-yOffset < config.scrollAmount) {
|
246 |
-
window.scrollBy(0, -config.scrollAmount);
|
247 |
-
} else {
|
248 |
-
var windowHeight = window.innerHeight ? window.innerHeight
|
249 |
-
: document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
|
250 |
-
if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) {
|
251 |
-
window.scrollBy(0, config.scrollAmount);
|
252 |
-
}
|
253 |
-
}
|
254 |
-
|
255 |
-
|
256 |
-
if (y != jQuery.tableDnD.oldY) {
|
257 |
-
// work out if we're going up or down...
|
258 |
-
var movingDown = y > jQuery.tableDnD.oldY;
|
259 |
-
// update the old value
|
260 |
-
jQuery.tableDnD.oldY = y;
|
261 |
-
// update the style to show we're dragging
|
262 |
-
if (config.onDragClass) {
|
263 |
-
dragObj.addClass(config.onDragClass);
|
264 |
-
} else {
|
265 |
-
dragObj.css(config.onDragStyle);
|
266 |
-
}
|
267 |
-
// If we're over a row then move the dragged row to there so that the user sees the
|
268 |
-
// effect dynamically
|
269 |
-
var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y);
|
270 |
-
if (currentRow) {
|
271 |
-
// TODO worry about what happens when there are multiple TBODIES
|
272 |
-
if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
|
273 |
-
jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
|
274 |
-
} else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) {
|
275 |
-
jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
|
276 |
-
}
|
277 |
-
}
|
278 |
-
}
|
279 |
-
|
280 |
-
return false;
|
281 |
-
},
|
282 |
-
|
283 |
-
/** We're only worried about the y position really, because we can only move rows up and down */
|
284 |
-
findDropTargetRow: function(draggedRow, y) {
|
285 |
-
var rows = jQuery.tableDnD.currentTable.rows;
|
286 |
-
for (var i=0; i<rows.length; i++) {
|
287 |
-
var row = rows[i];
|
288 |
-
var rowY = this.getPosition(row).y;
|
289 |
-
var rowHeight = parseInt(row.offsetHeight)/2;
|
290 |
-
if (row.offsetHeight == 0) {
|
291 |
-
rowY = this.getPosition(row.firstChild).y;
|
292 |
-
rowHeight = parseInt(row.firstChild.offsetHeight)/2;
|
293 |
-
}
|
294 |
-
// Because we always have to insert before, we need to offset the height a bit
|
295 |
-
if ((y > rowY - rowHeight) && (y < (rowY + rowHeight))) {
|
296 |
-
// that's the row we're over
|
297 |
-
// If it's the same as the current row, ignore it
|
298 |
-
if (row == draggedRow) {return null;}
|
299 |
-
var config = jQuery.tableDnD.currentTable.tableDnDConfig;
|
300 |
-
if (config.onAllowDrop) {
|
301 |
-
if (config.onAllowDrop(draggedRow, row)) {
|
302 |
-
return row;
|
303 |
-
} else {
|
304 |
-
return null;
|
305 |
-
}
|
306 |
-
} else {
|
307 |
-
// If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
|
308 |
-
var nodrop = jQuery(row).hasClass("nodrop");
|
309 |
-
if (! nodrop) {
|
310 |
-
return row;
|
311 |
-
} else {
|
312 |
-
return null;
|
313 |
-
}
|
314 |
-
}
|
315 |
-
return row;
|
316 |
-
}
|
317 |
-
}
|
318 |
-
return null;
|
319 |
-
},
|
320 |
-
|
321 |
-
mouseup: function(e) {
|
322 |
-
if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) {
|
323 |
-
var droppedRow = jQuery.tableDnD.dragObject;
|
324 |
-
var config = jQuery.tableDnD.currentTable.tableDnDConfig;
|
325 |
-
// If we have a dragObject, then we need to release it,
|
326 |
-
// The row will already have been moved to the right place so we just reset stuff
|
327 |
-
if (config.onDragClass) {
|
328 |
-
jQuery(droppedRow).removeClass(config.onDragClass);
|
329 |
-
} else {
|
330 |
-
jQuery(droppedRow).css(config.onDropStyle);
|
331 |
-
}
|
332 |
-
jQuery.tableDnD.dragObject = null;
|
333 |
-
if (config.onDrop) {
|
334 |
-
// Call the onDrop method if there is one
|
335 |
-
config.onDrop(jQuery.tableDnD.currentTable, droppedRow);
|
336 |
-
}
|
337 |
-
jQuery.tableDnD.currentTable = null; // let go of the table too
|
338 |
-
}
|
339 |
-
},
|
340 |
-
|
341 |
-
serialize: function() {
|
342 |
-
if (jQuery.tableDnD.currentTable) {
|
343 |
-
return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable);
|
344 |
-
} else {
|
345 |
-
return "Error: No Table id set, you need to set an id on your table and every row";
|
346 |
-
}
|
347 |
-
},
|
348 |
-
|
349 |
-
serializeTable: function(table) {
|
350 |
-
var result = "";
|
351 |
-
var tableId = table.id;
|
352 |
-
var rows = table.rows;
|
353 |
-
for (var i=0; i<rows.length; i++) {
|
354 |
-
if (result.length > 0) result += "&";
|
355 |
-
var rowId = rows[i].id;
|
356 |
-
if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) {
|
357 |
-
rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
|
358 |
-
}
|
359 |
-
|
360 |
-
result += tableId + '[]=' + rowId;
|
361 |
-
}
|
362 |
-
return result;
|
363 |
-
},
|
364 |
-
|
365 |
-
serializeTables: function() {
|
366 |
-
var result = "";
|
367 |
-
this.each(function() {
|
368 |
-
// this is now bound to each matching table
|
369 |
-
result += jQuery.tableDnD.serializeTable(this);
|
370 |
-
});
|
371 |
-
return result;
|
372 |
-
}
|
373 |
-
|
374 |
-
}
|
375 |
-
|
376 |
-
jQuery.fn.extend(
|
377 |
-
{
|
378 |
-
tableDnD : jQuery.tableDnD.build,
|
379 |
-
tableDnDUpdate : jQuery.tableDnD.updateTables,
|
380 |
-
tableDnDSerialize: jQuery.tableDnD.serializeTables
|
381 |
-
}
|
382 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/responsive-accordion.js
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
// Responsive Accordion v1.3, Copyright 2014, Joe Mottershaw, https://github.com/joemottershaw/
|
2 |
-
// ============================================================================================
|
3 |
-
|
4 |
-
jQuery(document).ready(function($) {
|
5 |
-
$('.responsive-accordion').each(function() {
|
6 |
-
// Set Expand/Collapse Icons
|
7 |
-
$('.responsive-accordion-minus', this).hide();
|
8 |
-
|
9 |
-
// Hide panels
|
10 |
-
$('.responsive-accordion-panel', this).hide();
|
11 |
-
|
12 |
-
// Bind the click event handler
|
13 |
-
$('.responsive-accordion-head', this).click(function(e) {
|
14 |
-
// Get elements
|
15 |
-
var thisAccordion = $(this).parent().parent(),
|
16 |
-
thisHead = $(this),
|
17 |
-
thisPlus = thisHead.find('.responsive-accordion-plus'),
|
18 |
-
thisMinus = thisHead.find('.responsive-accordion-minus'),
|
19 |
-
thisPanel = thisHead.siblings('.responsive-accordion-panel');
|
20 |
-
|
21 |
-
// Reset all plus/mins symbols on all headers
|
22 |
-
thisAccordion.find('.responsive-accordion-plus').show();
|
23 |
-
thisAccordion.find('.responsive-accordion-minus').hide();
|
24 |
-
|
25 |
-
// Reset all head/panels active statuses except for current
|
26 |
-
thisAccordion.find('.responsive-accordion-head').not(this).removeClass('active');
|
27 |
-
thisAccordion.find('.responsive-accordion-panel').not(this).removeClass('active').slideUp();
|
28 |
-
|
29 |
-
// Toggle current head/panel active statuses
|
30 |
-
if (thisHead.hasClass('active')) {
|
31 |
-
thisHead.removeClass('active');
|
32 |
-
thisPlus.show();
|
33 |
-
thisMinus.hide();
|
34 |
-
thisPanel.removeClass('active').slideUp();
|
35 |
-
} else {
|
36 |
-
thisHead.addClass('active');
|
37 |
-
thisPlus.hide();
|
38 |
-
thisMinus.show();
|
39 |
-
thisPanel.addClass('active').slideDown();
|
40 |
-
}
|
41 |
-
});
|
42 |
-
});
|
43 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Donate link: http://pickplugins.com
|
4 |
Tags: accordion, accordions, Responsive accordions, accordions plugin, jQuery accordions, accordions short-code, accordions Widget, accordions plugin wordpress, accordions plugin jquery
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.4.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -16,10 +16,10 @@
|
|
16 |
Accordions is pure HTML & CSS3 responsive accordion grid for WordPress. By this plugin you can display unlimited accordion grid at same page via short-code.
|
17 |
|
18 |
|
19 |
-
### Accordions by http://
|
20 |
|
21 |
-
* [Buy to Premium!»](http://
|
22 |
-
* [Live Demo!»](http://
|
23 |
|
24 |
|
25 |
<br />
|
@@ -27,37 +27,37 @@ Accordions is pure HTML & CSS3 responsive accordion grid for WordPress. By this
|
|
27 |
|
28 |
<strong>Plugin Features</strong><br />
|
29 |
|
30 |
-
*
|
31 |
-
*
|
32 |
-
* Use
|
33 |
-
*
|
34 |
-
*
|
35 |
-
*
|
36 |
-
*
|
37 |
-
* Background Image for accordions area.
|
38 |
-
* Custom Active accordions background color.
|
39 |
-
* Custom default background color.
|
40 |
-
* Custom font color and size for accordions header.
|
41 |
-
* Custom font color and size for accordions content.
|
42 |
|
43 |
|
44 |
<strong>Premium Features</strong><br />
|
45 |
|
46 |
-
*
|
47 |
-
* Life time support via forum.
|
48 |
-
* 7 Days Refund.
|
49 |
-
* Themes(4 Different Themes).
|
50 |
-
* Icon Position(Left or Right).
|
51 |
-
* Custom Icons(Add your own icons).
|
52 |
-
* Multilevel or child accordion.
|
53 |
-
* Hide any accordion without deleting.
|
54 |
-
* Click Header to scroll top.
|
55 |
* Default active accordion.
|
56 |
-
*
|
|
|
|
|
|
|
57 |
* Filter Hook for Accordion Header & Content.
|
58 |
-
* Open/Active accordion by url, (ex: yourdomain.com/accordion-page/?id=2)
|
59 |
-
*
|
60 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
|
63 |
|
@@ -102,6 +102,9 @@ then paste this shortcode anywhere in your page to display accordions<br />
|
|
102 |
== Changelog ==
|
103 |
|
104 |
|
|
|
|
|
|
|
105 |
= 1.9 =
|
106 |
* 11/12/2015 - fix - Shortcode issue fixed.
|
107 |
|
3 |
Donate link: http://pickplugins.com
|
4 |
Tags: accordion, accordions, Responsive accordions, accordions plugin, jQuery accordions, accordions short-code, accordions Widget, accordions plugin wordpress, accordions plugin jquery
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.4.1
|
7 |
+
Stable tag: 1.10
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
16 |
Accordions is pure HTML & CSS3 responsive accordion grid for WordPress. By this plugin you can display unlimited accordion grid at same page via short-code.
|
17 |
|
18 |
|
19 |
+
### Accordions by http://pickplugins.com
|
20 |
|
21 |
+
* [Buy to Premium!»](http://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/)
|
22 |
+
* [Live Demo!»](http://www.pickplugins.com/demo/accordions/)
|
23 |
|
24 |
|
25 |
<br />
|
27 |
|
28 |
<strong>Plugin Features</strong><br />
|
29 |
|
30 |
+
* Unlimited Accordion.
|
31 |
+
* Responsive Design.
|
32 |
+
* Use Via Short-Codes.
|
33 |
+
* Drag & Drop accordion sorting.
|
34 |
+
* WP Editor for accordion content.
|
35 |
+
* Container Background Image.
|
36 |
+
* Container Background Color.
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
|
39 |
<strong>Premium Features</strong><br />
|
40 |
|
41 |
+
* Short-Codes support inside accordion content
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
* Default active accordion.
|
43 |
+
* Multilevel , Nested accordion.
|
44 |
+
* Click Header to scroll top.
|
45 |
+
* Active on Mouse Hover.
|
46 |
+
* Hide any accordion without deleting.
|
47 |
* Filter Hook for Accordion Header & Content.
|
48 |
+
* Open/Active accordion by url Parameter, (ex: yourdomain.com/accordion-page/?id=2)
|
49 |
+
* Mouse click or hover event for active accordion.
|
50 |
+
* Multi Color Header.
|
51 |
+
* Container Text Align.
|
52 |
+
* Font Awesome Icons(Add your own icons).
|
53 |
+
* Icons Custom Color.
|
54 |
+
* Icon Position(Left or Right).
|
55 |
+
* Header Custom Padding.
|
56 |
+
* Header Custom Margin
|
57 |
+
* Content Custom Margin
|
58 |
+
* Content Custom Padding
|
59 |
+
* Custom Background color for Content.
|
60 |
+
* Lazy Load.
|
61 |
|
62 |
|
63 |
|
102 |
== Changelog ==
|
103 |
|
104 |
|
105 |
+
= 1.10 =
|
106 |
+
* 19/01/2016 - update - Minor option udpate.
|
107 |
+
|
108 |
= 1.9 =
|
109 |
* 11/12/2015 - fix - Shortcode issue fixed.
|
110 |
|