Skip to content

Commit 4e52e59

Browse files
committed
!!!Restyled sidebar
1 parent 265032e commit 4e52e59

File tree

3 files changed

+76
-22
lines changed

3 files changed

+76
-22
lines changed

classes/Visualizer/Render/Page/Data.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,9 @@ protected function _renderSidebarContent() {
6565
'chart' => $this->chart->ID,
6666
), admin_url( 'admin-ajax.php' ) );
6767

68-
echo '<li class="group open">';
69-
echo '<h3 class="group-title">', esc_html__( 'Upload CSV File', Visualizer_Plugin::NAME ), '</h3>';
70-
echo '<div class="group-content">';
68+
echo '<input type="button" name="back_button" class="return-settings-btn preview-btn hidden-setting" value="&laquo; Back">';
69+
echo '<div class="initial-screen">';
7170
echo '<iframe id="thehole" name="thehole"></iframe>';
72-
7371
echo '<p class="group-description">';
7472
esc_html_e( "Select and upload your data CSV file here. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).", Visualizer_Plugin::NAME );
7573
echo '</p>';
@@ -107,21 +105,25 @@ protected function _renderSidebarContent() {
107105
$Visualizer_Pro->_addEditorElements();
108106
}else{
109107
?>
110-
<a href="<?php echo Visualizer_Plugin::PRO_TEASER_URL;?>" title="<?php echo Visualizer_Plugin::PRO_TEASER_TITLE;?>" target="_new">
108+
<a href="<?php echo Visualizer_Plugin::PRO_TEASER_URL;?>" title="<?php echo Visualizer_Plugin::PRO_TEASER_TITLE;?>" class="check-pro-btn" target="_new">
111109
<input type="button" class="button preview preview-btn" id="existing-chart-free" value="<?php esc_attr_e( 'Check PRO Version ', Visualizer_Plugin::NAME );?>">
112110
</a>
111+
112+
<input type="button" name="advanced_button" class="advanced-settings-btn preview-btn" value="Advanced &raquo;">
113+
113114
<?php
114115
}
115116
// Added by Ash/Upwork
116117

117118
echo '</div>';
118119
echo '</div>';
119-
echo '</li>';
120120

121121
// changed by Ash/Upwork
122+
echo '<div class= "second-screen hidden-setting">';
122123
echo '<form id="settings-form" action="', add_query_arg( 'nonce', wp_create_nonce() ), '" method="post">';
123124
echo $this->sidebar;
124125
echo '</form>';
126+
echo '</div>';
125127
// changed by Ash/Upwork
126128
}
127129

@@ -151,4 +153,4 @@ protected function _renderToolbar() {
151153
echo '<input type="submit" id="settings-button" class="button button-primary button-large push-right" value="', $this->button, '">';
152154
}
153155

154-
}
156+
}

css/frame.css

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
.group.open {
6060
border-bottom: 1px solid #DFDFDF;
61-
61+
6262
}
6363

6464
.group-title {
@@ -157,11 +157,17 @@ div.group-content {
157157

158158
div.group-content .group-description {
159159
padding: 0;
160-
margin-bottom: 20px;
161160
font-weight: 300;
162161
font-family: "Montserrat",sans-serif;
163162
}
164163

164+
.initial-screen .group-description {
165+
padding: 0;
166+
font-weight: 300;
167+
font-family: "Montserrat",sans-serif;
168+
padding: 10px 20px 20px;
169+
}
170+
165171
.section-title {
166172
display: block;
167173
font-weight: bold;
@@ -258,6 +264,7 @@ div.group-content .group-description {
258264
margin-top: 40px;
259265
padding: 20px;
260266
border-top: 1px dashed #ddd;
267+
text-align: center;
261268
}
262269

263270
.rate-the-plugin{
@@ -266,7 +273,7 @@ div.group-content .group-description {
266273
}
267274

268275
#rate-stars {
269-
margin: 10px 0px 10px 55px;
276+
margin: 15px auto;
270277
width: 100px;
271278
height: 20px;
272279
background-image: url('../images/star.png');
@@ -278,7 +285,6 @@ div.group-content .group-description {
278285
text-decoration: none;
279286
font-family: "Montserrat",sans-serif;
280287
font-weight: 400;
281-
margin: 0px 0px 0px 30px;
282288
}
283289

284290
#flattr {
@@ -440,16 +446,17 @@ div.group-content .group-description {
440446
cursor: pointer;
441447
}
442448

443-
#remote-file {
449+
#remote-file {
450+
float: right;
444451
clear: both;
445452
}
446453

447454
.form-inline {
448-
display: inline-block;
449-
margin-bottom: 0;
455+
margin: 0 auto;
456+
display: table;
450457
vertical-align: middle;
451458
}
452-
459+
453460
.computer-btn{
454461
color: #646464 !important;
455462
border: medium none rgb(100, 100, 100) !important;
@@ -478,7 +485,7 @@ div.group-content .group-description {
478485
border: 1px solid #2f8cea !important;
479486
box-shadow: none !important;
480487

481-
488+
482489
}
483490

484491
.just-on-pro{
@@ -489,9 +496,9 @@ div.group-content .group-description {
489496
opacity: 0.8;
490497
margin-bottom: 10px;
491498
}
492-
493-
494-
499+
500+
501+
495502
.from-web{
496503
margin-top: 0px;
497504
margin-bottom: 15px !important;
@@ -612,6 +619,35 @@ div.group-content .group-description {
612619
transition: all .3s ease;
613620
}
614621

622+
.check-pro-btn {
623+
height: 40px;
624+
width: 245px;
625+
display: block;
626+
margin: 0 auto;
627+
}
628+
629+
.advanced-settings-btn, .return-settings-btn {
630+
cursor: pointer;
631+
display: block;
632+
margin: 0 auto;
633+
width: 260px;
634+
line-height: 34px;
635+
font-size: 17px;
636+
width: 260px;
637+
height: auto;
638+
-webkit-border-radius: 3px;
639+
-moz-border-radius: 3px;
640+
border-radius: 3px;
641+
margin-bottom: 20px;
642+
}
643+
644+
.return-settings-btn {
645+
margin: 10px auto;
646+
}
647+
648+
.hidden-setting {
649+
display:none;
650+
}
615651

616652

617653

@@ -625,7 +661,7 @@ div.group-content .group-description {
625661
font-size: 14px;
626662
}
627663
.group-title::after {
628-
top: 10px;
664+
top: 10px;
629665
}
630666
#rate-stars {
631667
margin: 3px 0 10px 40%;
@@ -636,4 +672,4 @@ div.group-content .group-description {
636672

637673

638674

639-
}
675+
}

js/frame.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,20 @@
105105

106106
return $(this);
107107
}
108-
})(jQuery);
108+
})(jQuery);
109+
110+
//Hide / show settings in sidebar
111+
(function($) {
112+
$(document).ready(function() {
113+
114+
$('.advanced-settings-btn').click(function(){
115+
$('.second-screen, .return-settings-btn').removeClass("hidden-setting");
116+
$('.initial-screen').addClass("hidden-setting");
117+
});
118+
119+
$('.return-settings-btn').click(function(){
120+
$('.second-screen, .return-settings-btn').addClass("hidden-setting");
121+
$('.initial-screen').removeClass("hidden-setting");
122+
});
123+
});
124+
})(jQuery);

0 commit comments

Comments
 (0)