Skip to content

Commit 02142f4

Browse files
Implement accordation for chart page #40
1 parent ebd3011 commit 02142f4

File tree

3 files changed

+34
-45
lines changed

3 files changed

+34
-45
lines changed

classes/Visualizer/Render/Page/Data.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ protected function _renderSidebarContent() {
6363
'chart' => $this->chart->ID,
6464
), admin_url( 'admin-ajax.php' ) );
6565

66-
echo '<input type="button" name="back_button" class="return-settings-btn preview-btn hidden-setting" value="&laquo; Back">';
67-
echo '<div class="initial-screen">';
66+
echo '<ul class="group-wrapper">';
67+
echo '<li class="group">';
68+
echo '<h2 class="group-title main-group">' . __( 'Chart Source', 'visualizer' ) . '</h2>';
69+
echo '<ul class="group-content">';
6870
echo '<iframe id="thehole" name="thehole"></iframe>';
6971
echo '<p class="group-description">';
7072
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' );
@@ -76,14 +78,13 @@ protected function _renderSidebarContent() {
7678
printf( esc_html__( 'or read how you can add Google spreadsheet in following %1$sarticle%1$s.', 'visualizer' ), '<a href="https://github.com/madpixelslabs/visualizer/wiki/How-can-I-populate-data-from-Google-Spreadsheet%3F" target="_blank">', '</a>' );
7779
echo '</p>';
7880

79-
echo '<div>';
8081
echo '<form id="csv-form" action="', $upload_link, '" method="post" target="thehole" enctype="multipart/form-data">';
8182
echo '<input type="hidden" id="remote-data" name="remote_data">';
8283
echo '<div class="form-inline">';
83-
echo '<div class="button button-primary file-wrapper computer-btn">';
84-
echo '<input type="file" id="csv-file" class="file" name="local_data">';
85-
esc_attr_e( 'From Computer', 'visualizer' );
86-
echo '</div>';
84+
echo '<div class="button button-primary file-wrapper computer-btn">';
85+
echo '<input type="file" id="csv-file" class="file" name="local_data">';
86+
esc_attr_e( 'From Computer', 'visualizer' );
87+
echo '</div>';
8788

8889
echo '<a id="remote-file" class="button from-web from-web-btn" href="javascript:;">', esc_html__( 'From Web', 'visualizer' ), '</a>';
8990
// Added by Ash/Upwork
@@ -109,17 +110,17 @@ protected function _renderSidebarContent() {
109110
<?php
110111
}
111112

112-
echo'<input type="button" name="advanced_button" class="advanced-settings-btn preview-btn" value="' . __( 'Advanced', 'visualizer' ) . ' &raquo;">';
113-
// Added by Ash/Upwork
114-
echo '</div>';
115-
echo '</div>';
113+
echo '</ul></li>';
116114

117-
// changed by Ash/Upwork
118-
echo '<div class= "second-screen hidden-setting">';
119-
echo '<form id="settings-form" action="', add_query_arg( 'nonce', wp_create_nonce() ), '" method="post">';
120-
echo $this->sidebar;
121-
echo '</form>';
122-
echo '</div>';
115+
echo '<ul class="group-wrapper">';
116+
echo '<li class="group">';
117+
echo '<h2 class="group-title main-group">' . __( 'Chart Settings', 'visualizer' ) . '</h2>';
118+
echo '<ul class="group-content">';
119+
echo '<form id="settings-form" action="', add_query_arg( 'nonce', wp_create_nonce() ), '" method="post">';
120+
echo $this->sidebar;
121+
echo '</form>';
122+
echo '</ul></li>';
123+
echo '</ul>';
123124
// changed by Ash/Upwork
124125
}
125126

js/frame.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,4 @@
110110

111111
return $(this);
112112
};
113-
})(jQuery);
114-
115-
//Hide / show settings in sidebar
116-
(function($) {
117-
$(document).ready(function() {
118-
119-
$('.advanced-settings-btn').click(function(){
120-
$('.second-screen, .return-settings-btn').removeClass("hidden-setting");
121-
$('.initial-screen').addClass("hidden-setting");
122-
});
123-
124-
$('.return-settings-btn').click(function(){
125-
$('.second-screen, .return-settings-btn').addClass("hidden-setting");
126-
$('.initial-screen').removeClass("hidden-setting");
127-
});
128-
});
129-
})(jQuery);
113+
})(jQuery);

languages/visualizer.pot

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# This file is distributed under the GPL v2.0 or later.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Visualizer: Charts and Graphs Lite 1.7.5\n"
5+
"Project-Id-Version: Visualizer: Charts and Graphs Lite 1.7.6\n"
66
"Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
7-
"POT-Creation-Date: 2017-01-20 12:32:52+00:00\n"
7+
"POT-Creation-Date: 2017-02-17 13:22:15+00:00\n"
88
"MIME-Version: 1.0\n"
99
"Content-Type: text/plain; charset=utf-8\n"
1010
"Content-Transfer-Encoding: 8bit\n"
@@ -172,40 +172,44 @@ msgid ""
172172
"its value to 1. This option increases the speed of remote CSV uploading."
173173
msgstr ""
174174

175-
#: classes/Visualizer/Render/Page/Data.php:70
175+
#: classes/Visualizer/Render/Page/Data.php:68
176+
msgid "Chart Source"
177+
msgstr ""
178+
179+
#: classes/Visualizer/Render/Page/Data.php:72
176180
msgid ""
177181
"Select and upload your data CSV file here. The first row of the CSV file "
178182
"should contain the column headings. The second one should contain series "
179183
"type (string, number, boolean, date, datetime, timeofday)."
180184
msgstr ""
181185

182-
#: classes/Visualizer/Render/Page/Data.php:74
186+
#: classes/Visualizer/Render/Page/Data.php:76
183187
msgid ""
184188
"If you are unsure about how to format your data CSV then please take a look "
185189
"at this sample:"
186190
msgstr ""
187191

188-
#: classes/Visualizer/Render/Page/Data.php:76
192+
#: classes/Visualizer/Render/Page/Data.php:78
189193
msgid "or read how you can add Google spreadsheet in following %1$sarticle%1$s."
190194
msgstr ""
191195

192-
#: classes/Visualizer/Render/Page/Data.php:85
196+
#: classes/Visualizer/Render/Page/Data.php:86
193197
msgid "From Computer"
194198
msgstr ""
195199

196-
#: classes/Visualizer/Render/Page/Data.php:88
200+
#: classes/Visualizer/Render/Page/Data.php:89
197201
msgid "From Web"
198202
msgstr ""
199203

200-
#: classes/Visualizer/Render/Page/Data.php:107
204+
#: classes/Visualizer/Render/Page/Data.php:108
201205
msgid "Check PRO Version "
202206
msgstr ""
203207

204-
#: classes/Visualizer/Render/Page/Data.php:112
205-
msgid "Advanced"
208+
#: classes/Visualizer/Render/Page/Data.php:117
209+
msgid "Chart Settings"
206210
msgstr ""
207211

208-
#: classes/Visualizer/Render/Page/Data.php:137
212+
#: classes/Visualizer/Render/Page/Data.php:138
209213
#: classes/Visualizer/Render/Page/Settings.php:55
210214
msgid "Back"
211215
msgstr ""

0 commit comments

Comments
 (0)