Skip to content

Commit 9338c89

Browse files
committed
Merge pull request #70 from Codeinwp/development
Development
2 parents 605ec82 + b6c76de commit 9338c89

File tree

9 files changed

+116
-95
lines changed

9 files changed

+116
-95
lines changed

CHANGELOG.md

Lines changed: 0 additions & 60 deletions
This file was deleted.

classes/Visualizer/Module/Admin.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,20 @@ public function renderLibraryPage() {
316316
$filter = 'all';
317317
}
318318

319+
// Added by Ash/Upwork
320+
$filterByMeta = filter_input( INPUT_GET, 'filter', FILTER_SANITIZE_STRING );
321+
if($filterByMeta){
322+
$query = array(
323+
'key' => Visualizer_Plugin::CF_SETTINGS,
324+
'value' => $filterByMeta,
325+
'compare' => 'LIKE',
326+
);
327+
$meta = isset($query_args['meta_query']) ? $query_args['meta_query'] : array();
328+
$meta[] = $query;
329+
$query_args['meta_query'] = $meta;
330+
}
331+
// Added by Ash/Upwork
332+
319333
// fetch charts
320334
$charts = array();
321335
$query = new WP_Query( $query_args );

classes/Visualizer/Plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
class Visualizer_Plugin {
3131

3232
const NAME = 'visualizer';
33-
const VERSION = '1.5.3';
33+
const VERSION = '1.5.4';
3434

3535
// custom post types
3636
const CPT_VISUALIZER = 'visualizer';
@@ -167,4 +167,4 @@ public static function getChartTypes() {
167167
return array( 'line', 'area', 'bar', 'column', 'pie', 'geo', 'scatter', 'candlestick', 'gauge' );
168168
}
169169

170-
}
170+
}

classes/Visualizer/Render/Library.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ private function _renderChartBox( $placeholder_id, $chart_id ) {
7979
* @access private
8080
*/
8181
private function _renderLibrary() {
82+
// Added by Ash/Upwork
83+
$filterBy = null;
84+
if(isset($_GET["filter"]) && strlen($_GET["filter"]) > 0){
85+
$filterBy = filter_input( INPUT_GET, "filter", FILTER_SANITIZE_STRING );
86+
}
87+
$action = $_SERVER["REQUEST_URI"];
88+
echo '<div id="visualizer-search"><form action="" method="get">
89+
<input type="text" name="filter" value="' . $filterBy . '">
90+
<input type="hidden" name="page" value="visualizer">
91+
<input type="submit" class="button button-secondary" value="' . esc_attr__('Search', Visualizer_Plugin::NAME) . '">
92+
</form></div>';
93+
// Added by Ash/Upwork
94+
8295
echo '<div id="visualizer-types" class="visualizer-clearfix">';
8396
echo '<ul>';
8497
foreach ( $this->types as $type => $label ) {

css/frame.css

Lines changed: 54 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -431,28 +431,32 @@ div.group-content .group-description {
431431
}
432432

433433
.file-wrapper {
434-
position: relative;
435-
overflow: hidden;
434+
display: inline-block;
435+
width: auto;
436+
max-width: 133px;
436437
}
437438

438439
.file {
439-
font-size: 200px;
440-
position: absolute;
441-
top: 0;
442-
right: 0;
443-
opacity: 0;
444-
-moz-opacity: 0;
445-
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
446-
cursor: pointer;
440+
font-size: 22px;
441+
position: fixed;
442+
opacity: 0;
443+
margin-left: -33px;
444+
margin-top: -6px;
445+
-moz-opacity: 0;
446+
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
447+
cursor: pointer;
448+
max-width: 138px;
447449
}
448450

449451
#remote-file {
450-
float: right;
451-
clear: both;
452+
float: right;
453+
display: inline-block;
454+
margin-left: 6px;
452455
}
453456

454457
.form-inline {
455-
margin: 0 auto;
458+
/*margin: 0 auto;*/
459+
width:100%;
456460
display: table;
457461
vertical-align: middle;
458462
}
@@ -468,6 +472,8 @@ div.group-content .group-description {
468472
border: 1px solid #B0B0B0 !important;
469473
box-shadow: none !important;
470474
text-shadow:none!important;
475+
left: -18px;
476+
overflow: hidden;
471477

472478
}
473479

@@ -489,7 +495,7 @@ div.group-content .group-description {
489495
}
490496

491497
.just-on-pro{
492-
background: #FFF url("../images/available_pro.png") no-repeat scroll 0px 1px !important;
498+
background: #F5F5F5 url("../images/available_pro.png") no-repeat scroll 0px 1px !important;
493499
width: 250px;
494500
height: 100px;
495501
cursor:not-allowed;
@@ -514,7 +520,7 @@ div.group-content .group-description {
514520
box-shadow: none !important;
515521
font-family: "Open Sans",sans-serif;
516522
font-weight: 700;
517-
margin-left: 2px !important;
523+
/*margin-left: 2px !important;*/
518524
}
519525

520526
.from-web-btn:hover{
@@ -527,14 +533,20 @@ div.group-content .group-description {
527533
-ms-transition: all .3s ease;
528534
-o-transition: all .3s ease;
529535
transition: all .3s ease;
530-
margin-left: 2px !important;
536+
/*margin-left: 2px !important;*/
531537
border: 1px solid #89B158 !important;
532538
box-shadow: none !important;
533539
}
534540

535541
.preview{
536542
width: 100%;
537543
}
544+
545+
546+
#sidebar > ul > div.initial-screen > div {
547+
padding: 0 20px;
548+
}
549+
538550
.from-chart-btn{
539551
color: #646464 !important;
540552
border: medium none #646464 !important;
@@ -545,8 +557,8 @@ div.group-content .group-description {
545557
box-shadow: none !important;
546558
font-family: "Open Sans",sans-serif;
547559
font-weight: 700;
548-
margin-left: 2px !important;
549-
margin-top: 2px !important;
560+
/*margin-left: 2px !important;
561+
margin-top: 2px !important;*/
550562
}
551563

552564
.from-chart-btn:hover{
@@ -559,26 +571,24 @@ div.group-content .group-description {
559571
-ms-transition: all .3s ease;
560572
-o-transition: all .3s ease;
561573
transition: all .3s ease;
562-
margin-left: 2px !important;
574+
/*margin-left: 2px !important;*/
563575
border: 1px solid #10aecb !important;
564576
box-shadow: none !important;
565-
margin-top: 2px !important;
577+
/*margin-top: 2px !important;*/
566578
}
567579

568580
input#existing-chart {
569-
left: 18px;
581+
/*left: 18px;
570582
width: 110px;
571-
position: relative;
583+
position: relative;*/
572584
}
573585

574586
select#chart-id {
575-
left: 44px;
576-
position: relative;
577-
width: 120px;
587+
float: right;
588+
width: 95px;
578589
}
579590

580591
button#editor-chart-button {
581-
width: 260px;
582592
margin: 0 auto;
583593
display: block;
584594
background-color: #2f8cea !important;
@@ -658,10 +668,8 @@ div.group-content .group-description {
658668
cursor: pointer;
659669
display: block;
660670
margin: 0 auto;
661-
width: 260px;
662671
line-height: 34px;
663672
font-size: 17px;
664-
width: 260px;
665673
height: auto;
666674
-webkit-border-radius: 3px;
667675
-moz-border-radius: 3px;
@@ -670,6 +678,14 @@ div.group-content .group-description {
670678
margin-top:5px;
671679
}
672680

681+
.return-settings-btn {
682+
width: 90%;
683+
}
684+
685+
.advanced-settings-btn {
686+
width: 100%;
687+
}
688+
673689
.return-settings-btn {
674690
margin: 10px auto;
675691
}
@@ -698,7 +714,16 @@ div.group-content .group-description {
698714
.rate-the-plugin {
699715
margin-left: -8%;
700716
}
717+
}
701718

702-
719+
@media screen and (max-width: 782px) {
720+
.button.button-primary.file-wrapper.computer-btn, #remote-file, #existing-chart {
721+
padding: 0 10px 1px;
722+
line-height: 26px;
723+
font-size: 13px;
724+
vertical-align: middle;
725+
height: 28px;
726+
margin-bottom: 4px;
727+
}
703728

704729
}

css/library.css

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,31 @@ a.page-numbers:hover {
142142

143143
.visualizer-library-pagination {
144144
display: none;
145-
}
145+
}
146+
147+
#visualizer-search form {
148+
display:flex;
149+
align-items: center;
150+
}
151+
152+
#visualizer-search > form > input[type="text"]:nth-child(1) {
153+
height: 30px;
154+
}
155+
#visualizer-search .button-secondary {
156+
background-color: lightcoral;
157+
box-shadow: 0 0 5px lightpink;
158+
padding: 5px 10px;
159+
color: white;
160+
text-decoration: none;
161+
-webkit-border-radius: 5px;
162+
-moz-border-radius: 5px;
163+
border-radius: 5px;
164+
font-weight: bold;
165+
line-height: 17px;
166+
font-size: 14px;
167+
margin-left: 20px;
168+
}
169+
#visualizer-search .button-secondary:hover {
170+
background-color: lightpink;
171+
border-color: lightpink;
172+
}

images/available_pro.png

-26 KB
Loading

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Visualizer: Charts and Graphs
44
Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs/
55
Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
6-
Version: 1.5.3
6+
Version: 1.5.4
77
Author: Themeisle
88
Author URI: http://themeisle.com
99
License: GPL v2.0 or later

readme.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
=== WordPress Charts and Graphs ===
22
Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
3-
Donate link: http://flattr.com/thing/2574985/WordPress-Visualizer
43
Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
54
Requires at least: 3.5
6-
Tested up to: 4.4.1
5+
Tested up to: 4.4.2
76
Stable tag: trunk
87
License: GPL v2.0 or later
98
License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -70,6 +69,9 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
7069

7170
== Changelog ==
7271

72+
= 1.5.4 =
73+
* Added free search text over graphs
74+
7375
= 1.5.2 =
7476
* Added step2 and 3 into step 1
7577

0 commit comments

Comments
 (0)