Skip to content

Instantly share code, notes, and snippets.

@luebbert42
Created June 2, 2015 07:54
Show Gist options
  • Save luebbert42/d3eccd03c6cdb52daab6 to your computer and use it in GitHub Desktop.
Save luebbert42/d3eccd03c6cdb52daab6 to your computer and use it in GitHub Desktop.
*******HEADER*******
<script src="app.hronlinemanager.com/js/gehaltsreporter/jquery-ui/jquery-ui.js"></script>
<script src="app.hronlinemanager.com/js/gehaltsreporter/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="app.hronlinemanager.com/js/gehaltsreporter/jquery.gehaltsreporter.js"></script>
<script src="app.hronlinemanager.com/js/jquery.number.min.js"></script>
*******BODY*******
<script type="text/javascript">
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
$(document).ready(function () {
/*******
*
* inject position_id from outside, e.g. teaser
* use a get_parameter preset_pos_id as a parameter like http://gehaltsreporter.local/path/to/this/page/?preset_pos_id=80
* app will check if position_id is valid (i.e. exists in host database) and will only display label if
* position is available
*/
var preset_pos_id = getParameterByName('preset_pos_id');
/**
* this is used to render the login form & reset form instead of the questionnaire
* http://gehaltsreporter.local/#signin will render the login form
* http://gehaltsreporter.local/#reset will render the password reset form
* @type {string}
*/
var specialPage = location.hash.slice(1);
var options = {};
options.preset_pos_id = preset_pos_id;
options.baseUrl = 'http://app.hronlinemanager.com/';
options.specialPage = specialPage;
$('#hrApp').gehaltsreporter(options);
});
</script>
<p>... Teaser text might be inserted here...</p>
<div id="hrApp">
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment