Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sravnitel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
sravnitel
Commits
023a56f2
Commit
023a56f2
authored
Feb 25, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. divider position 2. titles bottom margin 3. drag-event lag 4. images scaled differently
parent
4e045e69
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
66 deletions
+108
-66
jquery.sravnitel.js
assets/js/jquery.sravnitel.js
+81
-56
shortcode.php
inc/shortcode.php
+3
-4
readme.txt
readme.txt
+22
-4
sravnitel.php
sravnitel.php
+2
-2
No files found.
assets/js/jquery.sravnitel.js
View file @
023a56f2
This diff is collapsed.
Click to expand it.
inc/shortcode.php
View file @
023a56f2
...
@@ -94,20 +94,19 @@ function sravnitel_init(){
...
@@ -94,20 +94,19 @@ function sravnitel_init(){
if
(
!
$sravnitel_atts
[
'showtitles'
]){
if
(
!
$sravnitel_atts
[
'showtitles'
]){
$showtitles_str
=
"false"
;
$showtitles_str
=
"false"
;
}
else
{
}
else
{
$showtitles_str
=
"true"
;
$showtitles_str
=
strtolower
(
$sravnitel_atts
[
'showtitles'
])
;
}
}
if
(
!
$sravnitel_atts
[
'showtoggle'
]){
if
(
!
$sravnitel_atts
[
'showtoggle'
]){
$showtoggle_str
=
"false"
;
$showtoggle_str
=
"false"
;
}
else
{
}
else
{
$showtoggle_str
=
"true"
;
$showtoggle_str
=
strtolower
(
$sravnitel_atts
[
'showtoggle'
])
;
}
}
$content
=
"<b>
$titles_str
</b>"
;
$content
=
"<b>
$titles_str
</b>"
;
$content
=
<<<TXT
$content
=
<<<TXT
<!-- https://wordpress.org/plugins/sravnitel/ -->
<div><div id="$id_str" style="position:relative;" class="sravnitel"></div></div>
<div id="$id_str" style="position:relative;" class="sravnitel"></div>
<script>
<script>
jQuery(window).load(function(){
jQuery(window).load(function(){
jQuery("#$id_str").sravnitel({
jQuery("#$id_str").sravnitel({
...
...
readme.txt
View file @
023a56f2
=== Plugin Name ===
=== Plugin Name ===
Contributors: okdzhimiev
Contributors: okdzhimiev
Tags: images, posts, plugin, page, before after slider, visual composer, slider, shortcode, zoom, pan, drag, pinch to zoom
Tags: images, posts, plugin, page, before after slider, visual composer, slider, shortcode, zoom, pan, drag, pinch to zoom
, compare images
Requires at least: 4.5.5
Requires at least: 4.5.5
Tested up to: 4.7.
1
Tested up to: 4.7.
2
Stable tag: 1.
1
Stable tag: 1.
3
License: GPLv2 or later
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
License URI: https://www.gnu.org/licenses/gpl-2.0.html
...
@@ -25,6 +25,7 @@ Sravnitel is a WordPress plugin by Elphel Inc. based on a jQuery plugin *jquery.
...
@@ -25,6 +25,7 @@ Sravnitel is a WordPress plugin by Elphel Inc. based on a jQuery plugin *jquery.
* Click on the view area to quickly switch between left and right image
* Click on the view area to quickly switch between left and right image
* Click on the zoom info in the top right to zoom-to-fit the view area
* Click on the zoom info in the top right to zoom-to-fit the view area
* To place several instances of the plugin assign unique ids: [sravnitel id='test1' ...], [sravnitel id='test2' ...]
**Working demo**
**Working demo**
...
@@ -75,7 +76,7 @@ It's an integer number. Insert an image into a post and look for "wp-image-NN".
...
@@ -75,7 +76,7 @@ It's an integer number. Insert an image into a post and look for "wp-image-NN".
= Examples =
= Examples =
* Fit image into the view window, w/o titles:
* Fit image into the view window, w/o titles:
`[sravnitel images="ID0,ID1,ID2" width=640 height=480]`
`[sravnitel i
d="test" i
mages="ID0,ID1,ID2" width=640 height=480]`
* Fit image into the view window, with titles and toggle button:
* Fit image into the view window, with titles and toggle button:
`[sravnitel images="ID0,ID1,ID2" width=640 height=480 showtitles=true showtoggle=true]`
`[sravnitel images="ID0,ID1,ID2" width=640 height=480 showtitles=true showtoggle=true]`
* Also fit image, with titles:
* Also fit image, with titles:
...
@@ -105,6 +106,16 @@ It's an integer number. Insert an image into a post and look for "wp-image-NN".
...
@@ -105,6 +106,16 @@ It's an integer number. Insert an image into a post and look for "wp-image-NN".
== Changelog ==
== Changelog ==
= 1.3 =
* Allow more than one instance on the page
* Set title table margin to 0px
* Fixed [... showtitles=false ...] showing titles
* Added delayed images place updating due to drag event lagging.
= 1.2 =
* Fixed view size when titles are disabled (showtitles=false)
* Fixed divider containment area - offset() instead of position()
= 1.1 =
= 1.1 =
* Fixed coordinates not rounding while dragging
* Fixed coordinates not rounding while dragging
* Added single touch events by enabling 'jquery-touch-punch' in enqueue.php
* Added single touch events by enabling 'jquery-touch-punch' in enqueue.php
...
@@ -117,6 +128,13 @@ It's an integer number. Insert an image into a post and look for "wp-image-NN".
...
@@ -117,6 +128,13 @@ It's an integer number. Insert an image into a post and look for "wp-image-NN".
== Upgrade Notice ==
== Upgrade Notice ==
= 1.3 =
* Allow more than one instance on a page, improved divider dragging
= 1.2 =
* Fixed view size when titles are disabled (showtitles=false)
* Fixed divider containment area
= 1.1 =
= 1.1 =
* This version adds single (dragging) and multi (pinch to zoom) touch mobile support.
* This version adds single (dragging) and multi (pinch to zoom) touch mobile support.
...
...
sravnitel.php
View file @
023a56f2
<?php
<?php
/**
/**
* @package Sravnitel
* @package Sravnitel
* @version 1.
1
* @version 1.
3
* @file sravnitel.php
* @file sravnitel.php
* @brief shortcodes
* @brief shortcodes
* @copyright Copyright (C) 2017 Elphel Inc.
* @copyright Copyright (C) 2017 Elphel Inc.
...
@@ -26,7 +26,7 @@ Plugin Name: Sravnitel
...
@@ -26,7 +26,7 @@ Plugin Name: Sravnitel
Plugin URI: http://wordpress.org/plugins/sravnitel/
Plugin URI: http://wordpress.org/plugins/sravnitel/
Description: Before-After overlayed image comparison plugin with: slider, zoom, 2+ images.
Description: Before-After overlayed image comparison plugin with: slider, zoom, 2+ images.
Author: Elphel Inc.
Author: Elphel Inc.
Version: 1.
1
Version: 1.
3
Author URI: http://www3.elphel.com
Author URI: http://www3.elphel.com
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment