Skip to content

Commit

Permalink
visual fixes to footer, other fixes.
Browse files Browse the repository at this point in the history
Console.log plug for me looking for work.
The footer is always at the bottom of the page with a small gap between
it now. The footer is more visually distinct as well. Introduced cards
to do the features area.

Changes to code which align the rest of the codebase with the seperation
of excel helpers. Fully functional and ready to merge back into the
primary project.
  • Loading branch information
genejones committed Jan 19, 2018
1 parent b876547 commit f583791
Show file tree
Hide file tree
Showing 10 changed files with 271 additions and 246 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ adobe-export.js

#ignore jest test stuff
jest_0/
assets/js/essentials.js
19 changes: 11 additions & 8 deletions client-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ omnibus.request = request;
omnibus.excel = excel;
window.omnibus = omnibus;

console.log("Welcome to this site. I hope you find it useful. If you do, I'm currently looking for work.\r\nEmail me at iam@genejon.es with any opportunities");
console.log("Please also visit the Github for this page if you can think of anyway to improve it. https://github.com/genejones/reportsuites.com");

var processInitialOptions = function () {
window.fileName = jQuery('input#filename').val() + '.xlsx';
window.username = jQuery('input#adobe-username').val();
Expand All @@ -33,7 +36,7 @@ jQuery('#action-initial').click(processInitialOptions);
var getNewAuthToken = function () {
var token = wsse({ username: window.username, password: window.pass });
currentTokenWSSE = token.getWSSEHeader({ nonceBase64: true });
console.debug(currentTokenWSSE);
console.info(currentTokenWSSE);
};
var getHeaders = function () {
getNewAuthToken();
Expand Down Expand Up @@ -105,8 +108,8 @@ var handleUserSelectionOfRSID = function (event) {
}
}
window.adobe_vars.selected_report_suites = window.selected_report_suites;
formData = constructRequestBodyRSID(listOfSelectedRSID);
console.debug(formData);
let formData = constructRequestBodyRSID(listOfSelectedRSID);
console.info(formData);
//update the ui
displayProgressBar();
getListOfEvars(formData);
Expand Down Expand Up @@ -161,7 +164,7 @@ var determineAnalyticsInformation = function (adobeVar) {
'rsSelected': analytics.selectedReportSuites
});
//GA may use the Company/User unique hash as an user identifier in the future
console.debug(report_suites);
console.info(report_suites);
};
var getListOfEvars = function (form) {
displayProgress(15, "Fetching evars");
Expand All @@ -174,7 +177,7 @@ var getListOfEvars = function (form) {
if (!err) {
var evarsRaw = body;
window.adobe_vars.evars = JSON.parse(evarsRaw);
console.debug("succesfully got eVars");
console.info("succesfully got eVars");
getListOfProps(form);
}
else {
Expand All @@ -196,7 +199,7 @@ var getListOfProps = function (form) {
if (!err) {
var propsRaw = body;
window.adobe_vars.props = JSON.parse(propsRaw);
console.debug("successfully got props");
console.info("successfully got props");
getListOfEvents(form);
}
else {
Expand All @@ -208,11 +211,11 @@ var getListOfProps = function (form) {
};
var handleExcelSuccess = function (input) {
if (input === true) {
displayProgress(100, "Excel export complete");
displayProgress(100, "Excel export complete. Reload page to export again.");
window.dataLayer.push({ 'event': 'export-complete', 'fileSize': window.analytics.fileSize });
jQuery('#progress-view div').removeClass("progress-bar-info progress-bar-striped active");
jQuery('#progress-view div').addClass("progress-bar-success");
jQuery('.jumbotron .display-3').text("All done");
jQuery('.jumbotron .display-5').text("All done");
}
else {
console.error(input);
Expand Down
45 changes: 16 additions & 29 deletions custom.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
/* Space out content a bit */
body {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
display:flex;
min-height: 100vh;
flex-direction: column;
}

/*
h1 {
font-family: 'Allerta', Helvetica, Arial, sans-serif;
font-size: 50px!important;
line-height: 55px!important;
}
h3 {
font-family: 'Allerta', Helvetica, Arial, sans-serif;
}
p {
font-family: 'Crimson Text', Georgia, Times, serif;
font-size: 16px;
line-height: 25px;
}
*/

/* Everything but the jumbotron gets side spacing for mobile first views */
.header,
.footer {
Expand All @@ -40,23 +23,27 @@ form #rsid-selection {
float: left;
}

.content-container{
flex: 1;
padding-bottom: 1rem;
}

/* Custom page header */
.header {
padding-bottom: 1rem;
border-bottom: .05rem solid #e5e5e5;
}
/* Make the masthead heading the same height as the navigation */
.header h3 {
margin-top: 0;
margin-bottom: 0;
line-height: 3rem;
}

/* Custom page footer */
.footer {
padding-top: 1.5rem;
color: #777;
border-top: .05rem solid #e5e5e5;
padding-top: 0.2rem;
color: #e9ecef;
background-color: #666;
border-color: #666;
}

.footer a, .footer strong {
color: #e5e5e5;
}

/* Customize container */
Expand Down
2 changes: 1 addition & 1 deletion essentials-setup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
window.jQuery = require('jquery');
window.$ = jQuery;
var bootstrap = require('./assets/bootstrap/js/bootstrap.js');
var bootstrap = require('bootstrap');
15 changes: 7 additions & 8 deletions excel-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ function createSummarySheet(wb, report_suites, allAvailableReportSuites){
}
}

var sheetToPopulate = excelHelpers.makeNewSheet(wb, array, "Summary");
var ws = excelHelpers.populate_sheet_from_array_of_arrays(sheetToPopulate, array);
fileSummaryStyling(sheets.Summary);
return ws;
var sheet = excelHelpers.makeNewSheet(wb, array, "Summary", true);
console.log(sheet);
fileSummaryStyling(sheet);
return sheet;
}

function fileSummaryStyling(worksheetObj){
excelHelpers.applyStylesToTheWholeSheet(worksheetObj, styles['grey-navy']);
let ws = worksheetObj.sheet;
function fileSummaryStyling(ws){
excelHelpers.applyStylesToTheWholeSheet(ws, styles['grey-navy']);
ws.width(1, 38); //set the first column to be wider
ws.width(2, 30);
ws.width(3, 30);
Expand All @@ -79,7 +78,7 @@ var createOverviewOfSlot = function(report_suites, inputNVP, slotName, workbook)
var allKeys = []; //create a global list of keys for comparison
for (let i=0; i<report_suites.length; i++){
allKeys = union(allKeys, (keys(inputNVP[report_suites[i].rsid])) );
console.log(allKeys);
console.info(allKeys);
}
for (let i=0; i<allKeys.length; i++){
var key = allKeys[i];
Expand Down
Loading

0 comments on commit f583791

Please sign in to comment.