Difference between revisions of "Team:UCLA/Journal Formatter"

Line 8: Line 8:
 
var title = $('#title').val();
 
var title = $('#title').val();
 
var description = $('#description').val();
 
var description = $('#description').val();
 +
var team = $('input[name=team]:checked').val();
  
var output = '<div class="week-entry">\n  <div class="row week-header" id="cdi-week-' + weekNum + '-header">\n    <div class="columns small-2 week-number">\n      <span>Week</span>\n      <p>' + weekNum + '</p>\n    </div>\n    <div class="columns small-10">\n      <h4>' + title + '</h4>\n      <p>' + description + '</p>\n    </div>\n  </div>\n  <div class="row week-content" id="cdi-week-' + weekNum + '-header">\n  </div>\n</div>'
+
var output = '<div class="week-entry">\n  <div class="row week-header" id="' + team +'-week-' + weekNum + '-header">\n    <div class="columns small-2 week-number">\n      <span>Week</span>\n      <p>' + weekNum + '</p>\n    </div>\n    <div class="columns small-10">\n      <h4>' + title + '</h4>\n      <p>' + description + '</p>\n    </div>\n  </div>\n  <div class="row week-content" id="' + team + '-week-' + weekNum + '-header">\n  </div>\n</div>'
  
$('#output').val(output);
+
  $('#output').val(output);
 +
});
 +
 
 +
$('#day-submit').on('click', function(){
 +
var dayNum = $('#day-number').val();
 +
var month = $('#month').val();
 +
var title = $('#title').val();
 +
var entry = $('#text-editor').val();
 +
 
 +
var output = '    <div class="row day-entry">\n      <div class="columns small-2 small-offset-1 day-date">\n        <span>' + month + '</span>\n        <p>' + dayNum +'</p>\n      </div>\n      <div class="columns small-9">\n        <h5>' + title + '</h5>\n        <p>' + entry + '</p>\n      </div>\n    </div>'
 +
 
 +
  $('#output').val(output);
  
  

Revision as of 05:29, 5 August 2016

Input of day entry in here:
CDI Team: PCage Team:

Title of day or week entry here:

Description of week entry here:

Week Number:

Month: Day Number:

Copy and Paste This: