Skip to content

Instantly share code, notes, and snippets.

Created June 29, 2012 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3020349 to your computer and use it in GitHub Desktop.
Save anonymous/3020349 to your computer and use it in GitHub Desktop.
HTML page with styles and scripts that I want to put into string.
<style type='text/css'>
._section { text-decoration:underline;font-weight:bold;font-size:1.2em; }
._instruct { font-weight:bold; }
._note { color:darkgrey;font-size:.8em; }
#_NotesContain, #_HRuse { border:2px solid black; margin-bottom:10px; }
#_completedForm { table-layout:fixed; }
#_completedForm td { border:0px;width:50%;padding-top:5px; }
</style>
<table id='_completedForm'>
<tr>
<td><span class='_instruct'>Date:&nbsp;</span><span id='_date'>{date}</span></td>
<td><span class='_instruct'>Hiring Manager:&nbsp;</span><span id='_hMngr'>{hMngr}</span></td>
</tr>
<tr>
<td colspan='2' class='_section'>Position Information</td>
</tr>
<tr>
<td><span class='_instruct'>Position Title:&nbsp;</span><span id='_title'>{title}</span></td>
<td><span class='_instruct'>If other, please propose title:&nbsp;</span><span id='_title_other'>{title_other}</span></td>
</tr>
<tr>
<td><span class='_instruct'>Department:&nbsp;</span><span id='_department'>{department}</span></td>
<td><span class='_instruct'>Salary Range:&nbsp;</span><span id='salary'>{salary}</span></td>
</tr>
<tr>
<td colspan='2'><span class='_note'>Salary ranges are subject to review and revition in accordance with
ClimateWorks' Compensation Policy. Please consult with the Associate Director of Operations &
HR for position-specific salary bands.</span></td>
</tr>
<tr>
<td><span class='_instruct'>Is this position budgeted?&nbsp;</span><span id='_budgeted'>{budgeted}</span></td>
<td><span class='_instruct'>If no, please justify hire:&nbsp;</span><span id='_budgeted_other'>{budgeted_other}</span></td>
</tr>
<tr>
<td><span class='_instruct'>Is this position a replacement for a current or recently terminated employee?&nbsp;</span><span id='_replacement'>{replacement}</span></td>
<td><span class='_instruct'>If yes, indicate employee's name:&nbsp;</span><span id='_replacement_other'>{replacement_other}</span></td>
</tr>
<tr>
<td><span class='_instruct'>Proposed Start Date:&nbsp;</span><span id='_startDate'>{startDate}</span></td>
</tr>
<tr>
<td colspan='2' class='_section'>Employment Status</td>
</tr>
<tr>
<td><span class='_instruct'>Regular or Temporary?&nbsp;</span><span id='_RegOrTemp'>{RegOrTemp}</span></td>
<td><span class='_instruct'>If temporary, indicate dates:&nbsp;</span><span id='_RegOrTemp_other'>{RegOrTemp_other}</span></td>
</tr>
<tr>
<td><span class='_instruct'>Full-time or Part-time?&nbsp;</span><span id='_FtOrPt'>{FtOrPt}</span></td>
<td><span class='_instruct'>If part-time, indicate hours:&nbsp;</span><span id='_FtOrPt_other'>{FtOrPt_other}</span></td>
</tr>
<tr>
<td><span class='_instruct'>Exempt or Non-exempt?&nbsp;</span><span id='_exempt'>{exempt}</span></td>
<td><span class='_note'>Associate level and above must be Exempt.</span></td>
</tr>
<tr>
<td colspan='2' class='_section'>Requested Search Methods</td>
</tr>
<tr>
<td><span class='_instruct'>Hiring Agency:&nbsp;</span><span id='_agency'>{agency}</span></td>
<td><span class='_instruct'>If other, please indicate:&nbsp;</span><span id='_agency_other'>{agency_other}</span></td>
</tr>
<tr>
<td><span class='_instruct'>Requested Advertising Locations:&nbsp;</span><span id='_advertising'>{advertising}</span></td>
</tr>
<tr>
<td><span class='_instruct'>Is an internal announcement requested?&nbsp;</span><span id='_intAnnouncement'>{intAnnouncement}</span></td>
<td><span class='_instruct'>If so, select date:&nbsp;</span><span id='_intAnnouncement_other'>{intAnnouncement_other}</span></td>
</tr>
<tr>
<td colspan='2' class='_section'>Interview Process</td>
</tr>
<tr>
<td colspan='2'><span class='_instruct'>First Round Interviewers:&nbsp;</span><span id='_interviewers1'>{interviewers1}</span></td>
</tr>
<tr>
<td colspan='2'><span class='_instruct'>Second Round Interviewers:&nbsp;</span><span id='_interviewers2'>{interviewers2}</span></td>
</tr>
<tr>
<td><span class='_instruct'>Writing sample required?&nbsp;</span><span id='_writingSample'>{writingSample}</span></td>
<td><span class='_instruct'>Presentation required?&nbsp;</span><span id='_presentation'>{presentation}</span></td>
</tr>
<tr>
<td colspan='2' class='_section'>Approvals (please initial and date)</td>
</tr>
<tr>
<td>
<span class='_instruct'>CEO:&nbsp;</span><input id='CI' class='_ceo _initials' type='text' />
</td>
<td>
<span class='_instruct'>Date:&nbsp;</span><input id='_CD' class='_ceo _date' type='text'/>
</td>
</tr>
<tr>
<td>
<span class='_instruct _initials'>VP/CFO:&nbsp;</span><input id='_VI' class='_vpcfo _initials' type='text' />
</td>
<td>
<span class='_instruct'>Date:&nbsp;</span><input id='_VD' class='_vpcfo _date' type='text' />
</td>
</tr>
</table>
<button class=' _saveForm'>Save</button>
<div id='_NotesContain'>
<span class='_instruct'>Notes:&nbsp;</span><br/><br/>
<span id='_notes'>{notes}</span>
</div>
<div id='_HRuse'>
<div>
<span class='_instruct'>For HR Use Only:&nbsp;</span><br/>
</div>
<div>
<span class='_instruct'>Submitted to Search Firm:&nbsp;</span>
<select id='_HO' class='_HR'>
<option>Yes</option>
<option>No</option>
</select>
</div>
<div>
<span class='_instruct'>Initials:&nbsp;</span>
<input id='_HI' class='_HR _initials' type='text' />
</div>
<div>
<span class='_instruct'>Date:&nbsp;</span>
<input id='_HD' class='_HR _date' type='text' />
</div>
</div>
<button class='_saveForm'>Save</button>
<script type='text/javascript'>
var now = new Date(),
today = (parseFloat(now.getMonth())+1)+'-'+now.getDate()+'-'+now.getFullYear();
$('._date').val(today);
var paths = window.location.href.split('/'),
page = paths.pop(),
workspace = paths.pop(),
pageURL = '/data/workspaces/'+workspace+'/pages/'+page,
$response;
$.ajax({
url: pageURL,
dataType:'html',
async:false,
success: function (data) {
$response = $(data)
}
});
$('._saveForm').bind('click', function () {
$('._initials').each( function () {
var initials = $(this).val().trim();
if (initials) {
var personnel = $(this).attr('class').split(' ')[0];
$('.'+personnel).each( function() {
var _span = document.createElement('span'),
val = $(this).val().trim();
if ($(this).hasClass('_date') && !(val) ) { val = today };
_span.innerHTML = val;
$(this).replaceWith(_span);
$response.find('#'+this.id).replaceWith(_span);
});
if ($('._initials').length == 1) { $response.find('button._saveForm').remove() };
return
}
});
$.ajax({
url: pageURL,
type: 'PUT',
contentType: 'application/xhtml+xml',
data: $response.html()
}).done( function () {
window.location = window.location.href
})
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment