Commit 1ec4fcb6 authored by Carsten  Rose's avatar Carsten Rose
Browse files

F7284tablesorter save sort order

parent 73adfd53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: Helper/jqxDateTimeInput.js</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: Helper/jqxDateTimeInput.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @author Rafael Ostertag &lt;rafael.ostertag@math.uzh.ch>
*/
/* global $ */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
/**
* Qfq Helper Namespace
*
* @namespace QfqNS.Helper
*/
QfqNS.Helper = QfqNS.Helper || {};
(function (n) {
'use strict';
/**
* Initializes jqxDateTimeInput widgets.
*
* It configures all `&lt;div>`s having a class `jqw-datetimepicker` as jqxDateTimeInput.
*
* Given the HTML snippet
*
* ...
* &lt;div class="jqw-datetimepicker" data-control-name="datetimepicker" >&lt;/div>
* ...
*
* it will create a hidden input sibling element of the `&lt;div>` where the selected date is stored for
plain old
* form submission, thus rendering the above snippet effectively to
*
* ...
* &lt;div class="jqw-datetimepicker" data-control-name="datetimepicker" >&lt;/div>
* &lt;input type="hidden" name="datetimepicker">
* ...
*
* The jqxDateTimeInput can be configured using following `data` attributes
*
* * `data-control-name`: Mandatory attribute. Hold the name of the input element.
* * `data-format-string': Optional Format string as required by jqxDateTimeInput. See also
* {@link
http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdatetimeinput/jquery-datetimeinput-api.htm}.
* Default: "F".
* * `data-show-time-button`: Boolean value `true` or `false`, indicating whether or not a time picker
will be
* displayed.
*
* @function
* @name QfqNS.Helper.jqxDateTimeInput
*/
var jqxDateTimeInput = function () {
var index;
var $containers = $("div.jqw-datetimepicker");
$containers.each(function (index, object) {
(function ($container) {
var controlName = $container.data('control-name');
if (!controlName) {
QfqNS.Log.error("jqwDateTimePicker does not have a 'data-control-name' attribute.");
return;
}
var formatString = $container.data('format-string');
if (!formatString) {
formatString = "F";
}
var showTimeButton = $container.data('show-time-button');
if (showTimeButton === undefined) {
showTimeButton = false;
}
var jqxDateTimeInputConfig = {
formatString: formatString,
showTimeButton: showTimeButton,
theme: "bootstrap"
};
$container.jqxDateTimeInput(jqxDateTimeInputConfig);
// Our code creates a hidden input element for each jqxwidget as sibling of the widget. We do this,
// because jqxwidget don't create named input elements, and thus the value would not be sent to the
// server using a Plain Old Form submission (even if performed by an ajax request).
var $hiddenInput = $("&lt;input>")
.attr('type', 'hidden')
.attr('name', controlName);
$container.after($hiddenInput);
$hiddenInput.val($container.jqxDateTimeInput('value').toISOString());
$container.on('valueChanged', function (event) {
$hiddenInput.val(event.args.date.toISOString());
});
})($(object));
});
};
n.jqxDateTimeInput = jqxDateTimeInput;
})(QfqNS.Helper);</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2>
<h3>Classes</h3>
<ul>
<li><a href="n.Alert.html">Alert</a></li>
<li><a href="QfqNS.BSTabs.html">BSTabs</a></li>
<li><a href="QfqNS.Element.Checkbox.html">Checkbox</a></li>
<li><a href="QfqNS.Element.FormGroup.html">FormGroup</a></li>
<li><a href="QfqNS.Element.Radio.html">Radio</a></li>
<li><a href="QfqNS.Element.Select.html">Select</a></li>
<li><a href="QfqNS.Element.Textual.html">Textual</a></li>
<li><a href="QfqNS.FileDelete.html">FileDelete</a></li>
<li><a href="QfqNS.FileUpload.html">FileUpload</a></li>
<li><a href="QfqNS.Form.html">Form</a></li>
<li><a href="QfqNS.PageState.html">PageState</a></li>
<li><a href="QfqNS.QfqForm.html">QfqForm</a></li>
<li><a href="QfqNS.QfqPage.html">QfqPage</a></li>
<li><a href="QfqNS.QfqRecordList.html">QfqRecordList</a></li>
</ul>
<h3>Namespaces</h3>
<ul>
<li><a href="global.html#QfqNS">QfqNS</a></li>
<li><a href="QfqNS.Element.html">Element</a></li>
<li><a href="QfqNS.Helper.html">Helper</a></li>
</ul>
<h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon May 23 2016 12:28:24
GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: Log.js</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: Log.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @author Rafael Ostertag &lt;rafael.ostertag@math.uzh.ch>
*/
/* global console */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
(function (n) {
'use strict';
/**
*
* @type {{level: number, message: Function, debug: Function, warning: Function, error: Function}}
*
* @name QfqNS.Log
*/
n.Log = {
level: 3,
message: function (msg) {
if (this.level &lt;= 0) {
console.log('[message] ' + msg);
}
},
debug: function (msg) {
if (this.level &lt;= 1) {
console.log('[debug] ' + msg);
}
},
warning: function (msg) {
if (this.level &lt;= 2) {
console.log('[warning] ' + msg);
}
},
error: function (msg) {
if (this.level &lt;= 3) {
console.log('[error] ' + msg);
}
}
};
})(QfqNS);</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2>
<h3>Classes</h3>
<ul>
<li><a href="n.Alert.html">Alert</a></li>
<li><a href="QfqNS.BSTabs.html">BSTabs</a></li>
<li><a href="QfqNS.Element.Checkbox.html">Checkbox</a></li>
<li><a href="QfqNS.Element.FormGroup.html">FormGroup</a></li>
<li><a href="QfqNS.Element.Radio.html">Radio</a></li>
<li><a href="QfqNS.Element.Select.html">Select</a></li>
<li><a href="QfqNS.Element.Textual.html">Textual</a></li>
<li><a href="QfqNS.FileDelete.html">FileDelete</a></li>
<li><a href="QfqNS.FileUpload.html">FileUpload</a></li>
<li><a href="QfqNS.Form.html">Form</a></li>
<li><a href="QfqNS.PageState.html">PageState</a></li>
<li><a href="QfqNS.QfqForm.html">QfqForm</a></li>
<li><a href="QfqNS.QfqPage.html">QfqPage</a></li>
<li><a href="QfqNS.QfqRecordList.html">QfqRecordList</a></li>
</ul>
<h3>Namespaces</h3>
<ul>
<li><a href="global.html#QfqNS">QfqNS</a></li>
<li><a href="QfqNS.Element.html">Element</a></li>
<li><a href="QfqNS.Helper.html">Helper</a></li>
</ul>
<h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon May 23 2016 12:28:24
GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: PageState.js</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: PageState.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @author Rafael Ostertag &lt;rafael.ostertag@math.uzh.ch>
*/
/* @depend QfqEvents.js */
/* global EventEmitter */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
(function (n) {
'use strict';
/**
*
* @constructor
* @name QfqNS.PageState
*/
n.PageState = function () {
this.pageState = location.hash.slice(1);
this.data = null;
this.inPoppingHandler = false;
this.eventEmitter = new EventEmitter();
window.addEventListener("popstate", this.popStateHandler.bind(this));
};
n.PageState.prototype.on = n.EventEmitter.onMixin;
/**
*
* @param event
*
* @private
*/
n.PageState.prototype.popStateHandler = function (event) {
n.Log.debug("Enter: PageState.popStateHandler()");
this.inPoppingHandler = true;
this.pageState = location.hash.slice(1);
this.data = window.history.state;
n.Log.debug("PageState.popStateHandler(): invoke user pop state handler(s)");
this.eventEmitter.emitEvent('pagestate.state.popped', n.EventEmitter.makePayload(this, null));
this.inPoppingHandler = false;
n.Log.debug("Exit: PageState.popStateHandler()");
};
n.PageState.prototype.getPageState = function () {
return this.pageState;
};
n.PageState.prototype.getPageData = function () {
return this.data;
};
n.PageState.prototype.setPageState = function (state, data) {
if (state.startsWith('#')) {
this.pageState = state.slice(1);
window.history.replaceState(data, null, state);
} else {
this.pageState = state;
window.history.replaceState(data, null, '#' + state);
}
this.data = data;
};
n.PageState.prototype.newPageState = function (state, data) {
if (state.startsWith('#')) {
this.pageState = state.slice(1);
window.history.pushState(data, null, state);
} else {
this.pageState = state;
window.history.pushState(data, null, '#' + state);
}
this.data = data;
};
})(QfqNS);</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2>
<h3>Classes</h3>
<ul>
<li><a href="n.Alert.html">Alert</a></li>
<li><a href="QfqNS.BSTabs.html">BSTabs</a></li>
<li><a href="QfqNS.Element.Checkbox.html">Checkbox</a></li>
<li><a href="QfqNS.Element.FormGroup.html">FormGroup</a></li>
<li><a href="QfqNS.Element.Radio.html">Radio</a></li>
<li><a href="QfqNS.Element.Select.html">Select</a></li>
<li><a href="QfqNS.Element.Textual.html">Textual</a></li>
<li><a href="QfqNS.FileDelete.html">FileDelete</a></li>
<li><a href="QfqNS.FileUpload.html">FileUpload</a></li>
<li><a href="QfqNS.Form.html">Form</a></li>
<li><a href="QfqNS.PageState.html">PageState</a></li>
<li><a href="QfqNS.QfqForm.html">QfqForm</a></li>
<li><a href="QfqNS.QfqPage.html">QfqPage</a></li>
<li><a href="QfqNS.QfqRecordList.html">QfqRecordList</a></li>
</ul>
<h3>Namespaces</h3>
<ul>
<li><a href="global.html#QfqNS">QfqNS</a></li>
<li><a href="QfqNS.Element.html">Element</a></li>
<li><a href="QfqNS.Helper.html">Helper</a></li>
</ul>
<h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon May 23 2016 12:28:24
GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: PageTitle.js</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: PageTitle.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @author Rafael Ostertag &lt;rafael.ostertag@math.uzh.ch>
*/
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
(function (n) {
'use strict';
/**
*
* @type {{set: Function, get: Function, setSubTitle: Function}}
*
* @name QfqNS.PageTitle
*/
n.PageTitle = {
set: function (title) {
document.title = title;
},
get: function () {
return document.title;
},
setSubTitle: function (subTitle) {
var currentTitle = this.get();
var subtitleStrippedOff = currentTitle.replace(/ - (.*)$/, '');
document.title = subtitleStrippedOff + " - (" + subTitle + ")";
}
};
})(QfqNS);</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2>
<h3>Classes</h3>
<ul>
<li><a href="n.Alert.html">Alert</a></li>
<li><a href="QfqNS.BSTabs.html">BSTabs</a></li>
<li><a href="QfqNS.Element.Checkbox.html">Checkbox</a></li>
<li><a href="QfqNS.Element.FormGroup.html">FormGroup</a></li>
<li><a href="QfqNS.Element.Radio.html">Radio</a></li>
<li><a href="QfqNS.Element.Select.html">Select</a></li>
<li><a href="QfqNS.Element.Textual.html">Textual</a></li>
<li><a href="QfqNS.FileDelete.html">FileDelete</a></li>
<li><a href="QfqNS.FileUpload.html">FileUpload</a></li>
<li><a href="QfqNS.Form.html">Form</a></li>
<li><a href="QfqNS.PageState.html">PageState</a></li>
<li><a href="QfqNS.QfqForm.html">QfqForm</a></li>
<li><a href="QfqNS.QfqPage.html">QfqPage</a></li>
<li><a href="QfqNS.QfqRecordList.html">QfqRecordList</a></li>
</ul>
<h3>Namespaces</h3>
<ul>
<li><a href="global.html#QfqNS">QfqNS</a></li>
<li><a href="QfqNS.Element.html">Element</a></li>
<li><a href="QfqNS.Helper.html">Helper</a></li>
</ul>
<h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon May 23 2016 12:28:24
GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: QfqEvents.js</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: QfqEvents.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @author Rafael Ostertag &lt;rafael.ostertag@math.uzh.ch>
*/
/* global EventEmitter */
/* global $ */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
(function (n) {
'use strict';
/**
*
* @type {{makePayload: Function, onMixin: Function}}
*
*/
n.EventEmitter = {
makePayload: function (target, data, additionalArgs) {
return [$.extend({},
typeof additionalArgs === "object" ? additionalArgs : null,
{
target: target,
data: data
}
)];