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

Commit b1782da

Browse files
author
RobertLRead
committed
Basic attempt to get CSV Upload working
1 parent 8663d6e commit b1782da

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

UploadData.tpl

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<title>PricesPaid v. 2.0 BETA </title>
6+
<meta name="robots" content="NOINDEX, NOFOLLOW">
7+
8+
<link rel="stylesheet" type="text/css" href="theme/css/bootstrap.css">
9+
<link rel="stylesheet" type="text/css"
10+
href="./theme/css/decoration_gui.css" >
11+
<link href="./theme/css/shared.css" rel="stylesheet" type="text/css" media="screen, projection">
12+
<link href="./theme/css/mainPage.css" rel="stylesheet" type="text/css" media="screen, projection">
13+
<link rel="stylesheet" href="../SlickGrid-master/slick.grid.css" type="text/css">
14+
15+
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
16+
17+
<link rel="stylesheet" type="text/css" href="../js/jqPagination-master/css/jqpagination.css">
18+
19+
<link rel="stylesheet" type="text/css" href="../js/jquery.jqplot.css" >
20+
{{!goog_anal_script}}
21+
22+
</head>
23+
<body>
24+
25+
26+
<div id="header">
27+
<div class="col-md-3 col-xs-5 logo">
28+
<span id="pricespaid_logo"><img src="theme/img/pp_logo_beta.png" alt="PricesPaid"></span>
29+
</div>
30+
<div class="col-md-9 col-xs-7">
31+
<nav class="navbar" role="navigation">
32+
33+
<!-- Collect the nav links, forms, and other content for toggling -->
34+
<div>
35+
<ul class="nav navbar-nav">
36+
<li id="return_to_search" class="active"><a href="#">Search</a></li>
37+
<li id="logoutLink"><a href="#">Logout</a></li>
38+
</ul>
39+
</div><!-- /.navbar-collapse -->
40+
</nav>
41+
</div>
42+
43+
<div class="container">
44+
<div class='row'>
45+
<div class='col-12-xs'>
46+
<img id="betastripe" src="theme/img/Beta2.0.png" alt="Beta 2.0">
47+
</div>
48+
</div>
49+
50+
51+
52+
53+
54+
<!-- Content ... below the header -->
55+
<div id="content">
56+
57+
<div>
58+
PriceHistory requires a particular format for dynamic CSV upload. You may find it helpful to use a <a href="http://deepinthecode.github.io/mr-csv-transformer/?UNITS,PRICE,AGENCY,VENDOR,PSC,DESCR,LONGDESCR,DATE,AWARDIDIDV,MANUFACTURER_NAME,MANUFACTURER_PART_NUMBER,BUREAU,CONTRACT_NUMBER,TO_ZIP_CODE,FROM_ZIP_CODE,UNIT_OF_ISSUE">tool</a> created by David Young, Drew Shefman and Robert Read from the "Mr. Data Converter" tool to put your CSV file into the PriceHistory format.
59+
60+
</div>
61+
62+
<div>
63+
<textarea name="csv" id="csv" rows="20" cols="60"></textarea>
64+
</div>
65+
<input id="add_data" name="submit" value="Add This CSV File" class="input_submit" title="Click to upload Data!" type="submit" onclick="performAddData();">
66+
67+
<!-- end of "content" -->
68+
</div>
69+
70+
71+
{{!footer_html}}
72+
73+
</div>
74+
</body>
75+
<script src="../js/jquery.min.js"></script>
76+
77+
78+
<script src="../SlickGrid-master/lib/jquery.event.drag-2.2.js"></script>
79+
80+
<script src="../SlickGrid-master/slick.core.js"></script>
81+
<script src="../SlickGrid-master/slick.editors.js"></script>
82+
<script src="../SlickGrid-master/slick.grid.js"></script>
83+
<!-- jqplot stuff -->
84+
85+
<!--[if lt IE 9]>
86+
<![endif]-->
87+
88+
<!-- I use Stuart Banerman's hashcode to map award names to colors reliably: https://github.com/stuartbannerman/hashcode -->
89+
<script src="../js/hashcode-master/lib/hashcode.min.js"></script>
90+
91+
<link href="../js/feedback_me/css/jquery.feedback_me.css" rel="stylesheet" type="text/css" />
92+
<script src="../js/jquery-ui.min.js"></script>
93+
<script src="../js/feedback_me/js/jquery.feedback_me.js"></script>
94+
<script src="./js/StandardFunctions.js"></script>
95+
<script src="./js/Utility.js"></script>
96+
97+
<script>
98+
99+
function performAddData() {
100+
var csv = $("#csv").val();
101+
alert("About to try to add"+csv);
102+
103+
$.post("UploadCSVFile",
104+
{ csv_file: csv
105+
},
106+
processAddResults
107+
).fail(function() { alert("The data add failed in some way; please try something else."); });
108+
};
109+
110+
function processAddResults(data) {
111+
alert("Maybe it worked:"+data);
112+
}
113+
</script>
114+
115+
116+
</html>
117+

UploadFooter.tpl

Whitespace-only changes.

0 commit comments

Comments
 (0)