Skip to content

Commit b119bac

Browse files
committed
fixed design and composer info.
1 parent ec7e151 commit b119bac

File tree

5 files changed

+5
-124
lines changed

5 files changed

+5
-124
lines changed

classes/Visualizer/Render/Page/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class="dashicons dashicons-lock"></span></span>
124124
<input type="url" id="remote-data" name="remote_data"
125125
placeholder="<?php esc_html_e( 'Please enter the URL of CSV file', 'visualizer' ); ?>"
126126
class="visualizer-input">
127-
<p><?php _e( 'How often do you want to check the url', 'visualizer' ); ?></p>
127+
<p class="group-description"><?php _e( 'How often do you want to check the url', 'visualizer' ); ?></p>
128128
<select name="vz-import-time" id="vz-import-time"
129129
class="visualizer-select">
130130
<option value="3600"><?php _e( 'Each hour', 'visualizer' ); ?></option>

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "codeinwp/easy-content-types",
2+
"name": "codeinwp/visualizer",
33
"description": "Visualizer for WordPress.",
44
"keywords": [
55
"wordpress",

css/frame.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,8 @@ input#existing-chart {
682682

683683
select#chart-id {
684684
float: right;
685-
width: 95px;
685+
width: 146px;
686+
margin-right: 14px;
686687
}
687688

688689
button#editor-chart-button {

languages/visualizer.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ msgid ""
44
msgstr ""
55
"Project-Id-Version: Visualizer: Charts and Graphs Lite 2.0.0\n"
66
"Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
7-
"POT-Creation-Date: 2017-04-06 15:20:04+00:00\n"
7+
"POT-Creation-Date: 2017-04-07 13:45:21+00:00\n"
88
"MIME-Version: 1.0\n"
99
"Content-Type: text/plain; charset=utf-8\n"
1010
"Content-Transfer-Encoding: 8bit\n"

tests/test-import.php

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -142,126 +142,6 @@ public function test_file_import( $file, $content, $series ) {
142142
$this->assertEquals( $series_new, $series );
143143
}
144144

145-
/**
146-
* Testing editor feature.
147-
*
148-
* @access public
149-
* @dataProvider editorDataProvider
150-
*/
151-
public function test_pro_editor( $data, $content ) {
152-
if ( ! defined( 'VISUALIZER_PRO_VERSION' ) ) {
153-
$this->markTestSkipped( 'PRO not installed/available, skipping test' );
154-
}
155-
156-
$this->create_chart();
157-
$this->_setRole( 'administrator' );
158-
159-
$_POST = array(
160-
'chart_data' => $data,
161-
);
162-
$_GET = array(
163-
'nonce' => wp_create_nonce(),
164-
'chart' => $this->chart,
165-
);
166-
$_FILES = array();
167-
168-
// swallow the output
169-
ob_start();
170-
try {
171-
$this->_handleAjax( 'visualizer-upload-data' );
172-
} catch ( WPAjaxDieContinueException $e ) {
173-
// We expected this, do nothing.
174-
} catch ( WPAjaxDieStopException $ee ) {
175-
// We expected this, do nothing.
176-
}
177-
ob_end_clean();
178-
179-
$chart = get_post( $this->chart );
180-
$content_new = $chart->post_content;
181-
182-
$this->assertEquals( $content_new, serialize( $content ) );
183-
}
184-
185-
/**
186-
* Testing fetch from chat feature. We only need to test fetching, because we already have a test case for uploading data
187-
*
188-
* @access public
189-
*/
190-
public function test_pro_fetch_from_chart() {
191-
if ( ! defined( 'VISUALIZER_PRO_VERSION' ) ) {
192-
$this->markTestSkipped( 'PRO not installed/available, skipping test' );
193-
}
194-
195-
$this->create_chart();
196-
$this->_setRole( 'administrator' );
197-
198-
$_GET = array(
199-
'nonce' => wp_create_nonce(),
200-
'chart_id' => $this->chart,
201-
);
202-
203-
// swallow the output
204-
ob_start();
205-
try {
206-
$this->_handleAjax( 'visualizer-fetch-data' );
207-
} catch ( WPAjaxDieContinueException $e ) {
208-
// We expected this, do nothing.
209-
} catch ( WPAjaxDieStopException $ee ) {
210-
// We expected this, do nothing.
211-
}
212-
ob_end_clean();
213-
214-
$response = json_decode( $this->_last_response );
215-
$this->assertInternalType( 'object', $response );
216-
$this->assertObjectHasAttribute( 'success', $response );
217-
$this->assertObjectHasAttribute( 'data', $response );
218-
$this->assertTrue( $response->success );
219-
}
220-
221-
/**
222-
* Provide the "edited" data
223-
*
224-
* @access public
225-
*/
226-
public function editorDataProvider() {
227-
$data = array();
228-
$file = VISUALIZER_ABSPATH . DIRECTORY_SEPARATOR . 'samples' . DIRECTORY_SEPARATOR . 'line.csv';
229-
list($content, $series) = $this->parseFile( $file, 10 );
230-
231-
if ( ($handle = fopen( $file, 'r' )) !== false ) {
232-
$row = 0;
233-
while ( ($line = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE )) !== false ) {
234-
if ( $row++ <= 1 ) {
235-
$cols = count( $line );
236-
$datum = array();
237-
for ( $col = 0; $col < $cols; $col++ ) {
238-
$datum[] = '"' . $line[ $col ] . '"';
239-
}
240-
} else {
241-
$cols = count( $line );
242-
$datum = array();
243-
for ( $col = 0; $col < $cols; $col++ ) {
244-
if ( is_numeric( $line[ $col ] ) ) {
245-
// multiply all numbers by 10
246-
$datum[] = $line[ $col ] * 10;
247-
} else {
248-
$datum[] = '"' . $line[ $col ] . '"';
249-
}
250-
}
251-
}
252-
$data[] = $datum;
253-
}
254-
}
255-
256-
$csv = array();
257-
foreach ( $data as $row ) {
258-
$csv[] = '[' . implode( ',', $row ) . ']';
259-
}
260-
$csv = '[' . implode( ',', $csv ) . ']';
261-
return array(
262-
array( $csv, $content ),
263-
);
264-
}
265145
/**
266146
* Provide the fileURL for uploading the file
267147
*

0 commit comments

Comments
 (0)