Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Commit c47c9c7

Browse files
committed
set of minor UI enhancements on csv-to-json converter
* increase buttons sizes * style warning message accordingly * fix notification arrow direction * small copy tweaks and fixes
1 parent 0a79b06 commit c47c9c7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

themes/mango-information-systems/source/js/legacy/2015-01-08-csv-to-json.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ var views = {
133133
<div class="row"> \
134134
<div class="twelve columns"> \
135135
<h4><%= fileName %></h4> \
136+
<%= errors %> \
136137
<% if (json.results.length > 1000) { %> \
137138
<div class="alert" role="alert"> \
138-
<p>Because the file is large file, it won\'t be saved in the browser\'s memory for later use.</p> \
139-
<p><i class="fa fa-arrow-left" aria-hidden="true"></i> Please use the download button.</p> \
139+
<p>Because the file is large, it will not be saved in the browser\'s memory for later use.</p> \
140+
<p><i class="fa fa-arrow-down" aria-hidden="true"></i> Please use the download button.</p> \
140141
</div> \
141142
<% } %> \
142-
<%= errors %> \
143143
<% if (json.results.length < 1000) { %> \
144144
<textarea class="results twelve columns" rows="11"><%- JSON.stringify(json, null, "\t") %></textarea> \
145145
<% } else { %> \
@@ -151,7 +151,7 @@ var views = {
151151
<div class="twelve columns"> \
152152
<% if (json.results.length < 1000) { %> \
153153
<span class="pull-right" data-filename="<%= fileName %>"> \
154-
<a title="delete file" class="button button-default button-sm delete"><i class="fa fa-times" aria-hidden="true"></i> Delete</a> \
154+
<a title="delete file" class="button button-default delete"><i class="fa fa-times" aria-hidden="true"></i> Delete</a> \
155155
<%= button %> \
156156
</span> \
157157
<% } %> \
@@ -160,10 +160,10 @@ var views = {
160160
'
161161

162162
if (data.results.length < 1000) {
163-
var button = views.fileDownloadButton(data, fileName, '<i class="fa fa-download" aria-hidden="true"></i> Download', '', 'button-primary button-sm')
163+
var button = views.fileDownloadButton(data, fileName, '<i class="fa fa-download" aria-hidden="true"></i> Download', '', 'button-primary')
164164
}
165165
else {
166-
var button = views.fileDownloadButton(data, fileName, 'Download results file', 'button-block', 'button-primary button-sm')
166+
var button = views.fileDownloadButton(data, fileName, 'Download results file', 'button-block', 'button-primary')
167167

168168
}
169169

@@ -175,7 +175,7 @@ var views = {
175175
}
176176
, parseErrors: function(errors, fallback) {
177177
var tmpl = ' \
178-
<div class="alert alert-warning" role="alert"> \
178+
<div class="alert alert-danger" role="alert"> \
179179
<p>Conversion warning(s):</p> \
180180
<ul> \
181181
<% _.each(errors, function(err) { %> \
@@ -228,7 +228,7 @@ var views = {
228228

229229
}
230230
, convertedFile: function(fileName) {
231-
var tmpl = '<div class="three columns"><a class="savedFile button u-full-width button-sm" href="" data-filename="<%= fileName %>"><%= fileName %></a></div>'
231+
var tmpl = '<div class="three columns"><a class="savedFile button button-block" href="" data-filename="<%= fileName %>"><%= fileName %></a></div>'
232232

233233
return _.template(tmpl, {fileName: fileName})
234234
}
@@ -381,7 +381,9 @@ var views = {
381381
//~$csvSelectorPane.slideUp()
382382
//~else
383383
$previewPane.hide()
384+
384385
$csvSelectorPane.show()
386+
385387
$previewPane.empty()
386388

387389
$resultsPane.html(content).slideDown()

0 commit comments

Comments
 (0)