Commit ac5e87e5 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge remote-tracking branch 'origin/raos_work' into crose_work

parents 71d80a99 c2c674c3
/.plantuml_install
/doc/*.pdf
/.doc_plantuml
/.support
......
......@@ -174,7 +174,8 @@ module.exports = function (grunt) {
{
cwd: 'bower_components/jqwidgets/jqwidgets/',
src: [
'jqx-all.js'
'jqx-all.js',
'globalization/globalize.js'
],
expand: true,
dest: typo3_js,
......@@ -205,7 +206,8 @@ module.exports = function (grunt) {
{
cwd: 'bower_components/jqwidgets/jqwidgets/',
src: [
'jqx-all.js'
'jqx-all.js',
'globalization/globalize.js'
],
expand: true,
dest: 'js/',
......
......@@ -6,6 +6,11 @@
/* global EventEmitter */
/* @depend QfqEvents.js */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
(function (n) {
......
......@@ -8,6 +8,11 @@
/* @depend QfqEvents.js */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
......@@ -20,6 +25,8 @@ var QfqNS = QfqNS || {};
*
* @param {string} tabId HTML id of the element having `nav` and `nav-tabs` classes
* @constructor
*
* @name QfqNS.BSTabs
*/
n.BSTabs = function (tabId) {
this.tabId = tabId;
......
......@@ -4,7 +4,17 @@
/* @depend FormGroup.js */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
/**
* Qfq.Element Namespace
*
* @namespace QfqNS.Element
*/
QfqNS.Element = QfqNS.Element || {};
(function (n) {
......@@ -15,6 +25,7 @@ QfqNS.Element = QfqNS.Element || {};
*
* @param $element
* @constructor
* @name QfqNS.Element.Checkbox
*/
function Checkbox($element) {
n.FormGroup.call(this, $element);
......
......@@ -2,7 +2,17 @@
* @author Rafael Ostertag <rafael.ostertag@math.uzh.ch>
*/
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
/**
* Qfq.Element Namespace
*
* @namespace QfqNS.Element
*/
QfqNS.Element = QfqNS.Element || {};
(function (n) {
......@@ -18,6 +28,7 @@ QfqNS.Element = QfqNS.Element || {};
*
*
* @constructor
* @name QfqNS.Element.FormGroup
*/
n.FormGroup = function ($enclosedElement) {
if (!$enclosedElement || $enclosedElement.length === 0) {
......@@ -30,6 +41,13 @@ QfqNS.Element = QfqNS.Element || {};
this.$helpBlock = this.$formGroup.find(".help-block");
};
/**
* Test if the Form Group is of the given type
*
* @param {string} type type name
* @returns {boolean} true if the Form Group is of the given type. False otherwise
* @protected
*/
n.FormGroup.prototype.isType = function (type) {
var lowerCaseType = type.toLowerCase();
var isOfType = true;
......@@ -140,15 +158,4 @@ QfqNS.Element = QfqNS.Element || {};
this.$element.prop('required', required);
};
/**
* Read Only click handler.
*
* Since the readonly attribute does not work as expected on certain input types, emulate read only
*/
n.FormGroup.prototype.readOnlyHandler = function () {
return false;
};
})(QfqNS.Element);
\ No newline at end of file
......@@ -4,12 +4,28 @@
/* global $ */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
/**
* Qfq.Element Namespace
*
* @namespace QfqNS.Element
*/
QfqNS.Element = QfqNS.Element || {};
(function (n) {
'use strict';
/**
*
* @param name
* @returns {*}
* @function QfqNS.Element.getElement
*/
n.getElement = function (name) {
var $element = $('[name="' + name + '"]:not([type="hidden"])');
if ($element.length === 0) {
......
......@@ -2,7 +2,17 @@
* @author Rafael Ostertag <rafael.ostertag@math.uzh.ch>
*/
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
/**
* Qfq.Element Namespace
*
* @namespace QfqNS.Element
*/
QfqNS.Element = QfqNS.Element || {};
(function (n) {
......@@ -13,6 +23,7 @@ QfqNS.Element = QfqNS.Element || {};
*
* @param $element
* @constructor
* @name QfqNS.Element.Radio
*/
function Radio($element) {
n.FormGroup.call(this, $element);
......
......@@ -3,7 +3,17 @@
*/
/* global $ */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
/**
* Qfq.Element Namespace
*
* @namespace QfqNS.Element
*/
QfqNS.Element = QfqNS.Element || {};
(function (n) {
......@@ -14,6 +24,7 @@ QfqNS.Element = QfqNS.Element || {};
*
* @param $element
* @constructor
* @name QfqNS.Element.Select
*/
function Select($element) {
n.FormGroup.call(this, $element);
......
......@@ -2,7 +2,17 @@
* @author Rafael Ostertag <rafael.ostertag@math.uzh.ch>
*/
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
/**
* Qfq.Element Namespace
*
* @namespace QfqNS.Element
*/
QfqNS.Element = QfqNS.Element || {};
(function (n) {
......@@ -13,6 +23,7 @@ QfqNS.Element = QfqNS.Element || {};
*
* @param $element
* @constructor
* @name QfqNS.Element.Textual
*/
function Textual($element) {
n.FormGroup.call(this, $element);
......
......@@ -2,7 +2,17 @@
* @author Rafael Ostertag <rafael.ostertag@math.uzh.ch>
*/
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
/**
* Qfq.Element Namespace
*
* @namespace QfqNS.Element
*/
QfqNS.Element = QfqNS.Element || {};
(function (n) {
......
......@@ -6,11 +6,24 @@
/* @depend QfqEvents.js */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
(function (n) {
'use strict';
/**
*
* @param formSelector
* @param targetUrl
* @constructor
*
* @name QfqNS.FileDelete
*/
n.FileDelete = function (formSelector, targetUrl) {
this.formSelector = formSelector;
this.targetUrl = targetUrl;
......
......@@ -7,12 +7,23 @@
/* @depend QfqEvents.js */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
(function (n) {
'use strict';
/**
*
* @param formSelector
* @param targetUrl
* @constructor
* @name QfqNS.FileUpload
*/
n.FileUpload = function (formSelector, targetUrl) {
this.formSelector = formSelector;
this.targetUrl = targetUrl;
......
......@@ -6,11 +6,22 @@
/* global EventEmitter */
/* @depend QfqEvents.js */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
(function (n) {
'use strict';
/**
*
* @param formId
* @constructor
* @name QfqNS.Form
*/
n.Form = function (formId) {
this.formId = formId;
this.eventEmitter = new EventEmitter();
......
......@@ -4,18 +4,43 @@
/* global $ */
/**
* Qfq Namespace
*
* @namespace QfqNS
*/
var QfqNS = QfqNS || {};
/**
* Qfq Helper Namespace
*
* @namespace QfqNS.Helper
*/
QfqNS.Helper = QfqNS.Helper || {};
(function (n) {
'use strict';
/**
*
* @param jqHXR
* @param textStatus
* @param errorThrown
*
* @function QfqNS.Helper.showAjaxError
*/
n.showAjaxError = function (jqHXR, textStatus, errorThrown) {
var alert = new QfqNS.Alert("Error:<br> " +
errorThrown, "error");
alert.show();
};
/**
*
* @param string
* @returns {*}
*
* @function QfqNS.Helper.stringBool
*/
n.stringToBool = function (string) {
if (typeof string !== "string") {
return string;
......
......@@ -21,6 +21,11 @@ QfqNS.Helper = QfqNS.Helper || {};
(function (n) {
'use strict';
/**
*
* @function
* @name QfqNS.Helper.jqxComboBox
*/
var jqxComboBox = function () {
var index;
var $containers = $("div.jqw-combobox");
......@@ -45,6 +50,9 @@ QfqNS.Helper = QfqNS.Helper || {};
$container.jqxComboBox({source: source});
// 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 = $("<input>")
.attr('type', 'hidden')
.attr('name', controlName);
......
......@@ -83,6 +83,9 @@ QfqNS.Helper = QfqNS.Helper || {};
$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 = $("<input>")
.attr('type', 'hidden')
.attr('name', controlName);
......
......@@ -4,10 +4,22 @@
/* 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) {
......
......@@ -5,12 +5,22 @@
/* @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;
......
......@@ -2,11 +2,22 @@
* @author Rafael Ostertag <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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment