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

Merge branch 'master' into Feature4922ExcelImportViaPHP

# Conflicts:
#	extension/qfq/qfq/Constants.php
#	extension/qfq/qfq/exceptions/AbstractException.php
#	extension/qfq/qfq/form/FormAction.php
#	extension/qfq/qfq/report/Report.php
#	extension/qfq/qfq/store/Config.php
parents 2b979283 aa0bbec7
......@@ -30,3 +30,4 @@
.virtual_env
/.support_sonar
/.sonar_scanner
/extension/Documentation/html
\ No newline at end of file
before_script:
- VERSION=`cat ./version`
snapshot:
except:
- tags
script:
- make VERSION=$VERSION snapshot
- chmod a+r qfq_$VERSION_*.zip
- scp qfq_$VERSION_*.zip w16:qfq/snapshots/
release:
only:
- tags
script:
- make VERSION=$VERSION release
- chmod a+r qfq_$VERSION_*.zip
- scp qfq_$VERSION_*.zip w16:qfq/releases/
This diff is collapsed.
......@@ -11,6 +11,7 @@ module.exports = function (grunt) {
'javascript/src/*.js'
];
var js_plugins = 'javascript/src/Plugins/*.js';
var js_worker = 'javascript/src/Worker/*.js';
// Project configuration.
grunt.initConfig({
......@@ -19,7 +20,7 @@ module.exports = function (grunt) {
bootstrap: {
files: [
{
cwd: 'bower_components/bootstrap/dist/css/',
cwd: 'node_modules/bootstrap/dist/css/',
src: [
'bootstrap.min.css',
'bootstrap-theme.min.css'
......@@ -30,7 +31,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/bootstrap/dist/js/',
cwd: 'node_modules/bootstrap/dist/js/',
src: [
'bootstrap.min.js'
],
......@@ -39,7 +40,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/bootstrap/dist/fonts/',
cwd: 'node_modules/bootstrap/dist/fonts/',
expand: true,
src: [
'*'
......@@ -52,7 +53,7 @@ module.exports = function (grunt) {
bootstrap_dev: {
files: [
{
cwd: 'bower_components/bootstrap/dist/css/',
cwd: 'node_modules/bootstrap/dist/css/',
src: [
'bootstrap.min.css',
'bootstrap-theme.min.css'
......@@ -63,7 +64,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/bootstrap/dist/js/',
cwd: 'node_modules/bootstrap/dist/js/',
src: [
'bootstrap.min.js'
],
......@@ -72,7 +73,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/bootstrap/dist/fonts/',
cwd: 'node_modules/bootstrap/dist/fonts/',
expand: true,
src: [
'*'
......@@ -85,7 +86,7 @@ module.exports = function (grunt) {
bootstrap_validator: {
files: [
{
cwd: 'bower_components/bootstrap-validator/dist/',
cwd: 'node_modules/bootstrap-validator/dist/',
src: [
'validator.min.js'
],
......@@ -94,7 +95,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/bootstrap-validator/dist/',
cwd: 'node_modules/bootstrap-validator/dist/',
src: [
'validator.min.js'
],
......@@ -107,7 +108,7 @@ module.exports = function (grunt) {
jquery: {
files: [
{
cwd: 'bower_components/jquery/dist/',
cwd: 'node_modules/jquery/dist/',
src: [
'jquery.min.js'
],
......@@ -116,7 +117,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/jquery/dist/',
cwd: 'node_modules/jquery/dist/',
src: [
'jquery.min.js'
],
......@@ -129,7 +130,7 @@ module.exports = function (grunt) {
jquery_tablesorter: {
files: [
{
cwd: 'bower_components/tablesorter/dist/js/',
cwd: 'node_modules/tablesorter/dist/js/',
src: [
'jquery.tablesorter.min.js'
],
......@@ -138,7 +139,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/tablesorter/dist/js/',
cwd: 'node_modules/tablesorter/dist/js/',
src: [
'jquery.tablesorter.min.js',
'jquery.tablesorter.widgets.min.js',
......@@ -153,7 +154,7 @@ module.exports = function (grunt) {
ChartJS: {
files: [
{
cwd: 'bower_components/Chart.js/dist/',
cwd: 'node_modules/chart.js/dist/',
src: [
'Chart.min.js'
],
......@@ -162,7 +163,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/Chart.js/dist/',
cwd: 'node_modules/chart.js/dist/',
src: [
'Chart.min.js'
],
......@@ -175,7 +176,7 @@ module.exports = function (grunt) {
jqwidgets: {
files: [
{
cwd: 'bower_components/jqwidgets/jqwidgets/',
cwd: 'node_modules/jqwidgets-framework/jqwidgets/',
src: [
'jqx-all.js',
'globalization/globalize.js'
......@@ -185,7 +186,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/jqwidgets/jqwidgets/styles/',
cwd: 'node_modules/jqwidgets-framework/jqwidgets/styles/',
src: [
'jqx.base.css',
'jqx.bootstrap.css'
......@@ -195,7 +196,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/jqwidgets/jqwidgets/styles/',
cwd: 'node_modules/jqwidgets-framework/jqwidgets/styles/',
src: [
'images/**'
],
......@@ -207,7 +208,7 @@ module.exports = function (grunt) {
jqwidgets_devel: {
files: [
{
cwd: 'bower_components/jqwidgets/jqwidgets/',
cwd: 'node_modules/jqwidgets-framework/jqwidgets/',
src: [
'jqx-all.js',
'globalization/globalize.js'
......@@ -217,7 +218,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/jqwidgets/jqwidgets/styles/',
cwd: 'node_modules/jqwidgets-framework/jqwidgets/styles/',
src: [
'jqx.base.css',
'jqx.bootstrap.css'
......@@ -227,7 +228,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/jqwidgets/jqwidgets/styles/',
cwd: 'node_modules/jqwidgets-framework/jqwidgets/styles/',
src: [
'images/**'
],
......@@ -239,7 +240,7 @@ module.exports = function (grunt) {
tinymce: {
files: [
{
cwd: 'bower_components/tinymce/',
cwd: 'node_modules/tinymce/',
src: [
'tinymce.min.js'
],
......@@ -248,7 +249,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/tinymce/',
cwd: 'node_modules/tinymce/',
src: [
'themes/*/theme.min.js',
'plugins/*/plugin.min.js',
......@@ -263,7 +264,7 @@ module.exports = function (grunt) {
tinymce_devel: {
files: [
{
cwd: 'bower_components/tinymce/',
cwd: 'node_modules/tinymce/',
src: [
'tinymce.min.js'
],
......@@ -272,7 +273,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/tinymce/',
cwd: 'node_modules/tinymce/',
src: [
'themes/*/theme.min.js',
'plugins/*/plugin.min.js',
......@@ -287,7 +288,7 @@ module.exports = function (grunt) {
eventEmitter: {
files: [
{
cwd: 'bower_components/eventEmitter/',
cwd: 'node_modules/wolfy87-eventemitter/',
src: [
'EventEmitter.min.js'
],
......@@ -296,7 +297,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/eventEmitter/',
cwd: 'node_modules/wolfy87-eventemitter/',
src: [
'EventEmitter.min.js'
],
......@@ -331,7 +332,7 @@ module.exports = function (grunt) {
typeahead: {
files: [
{
cwd: 'bower_components/corejs-typeahead/dist',
cwd: 'node_modules/corejs-typeahead/dist',
src: [
"typeahead.bundle.min.js"
],
......@@ -340,7 +341,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/corejs-typeahead/dist',
cwd: 'node_modules/corejs-typeahead/dist',
src: [
"typeahead.bundle.min.js"
],
......@@ -353,7 +354,7 @@ module.exports = function (grunt) {
codemirror: {
files: [
{
cwd: 'bower_components/codemirror/lib',
cwd: 'node_modules/codemirror/lib',
src: [
"codemirror.js"
],
......@@ -362,7 +363,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/codemirror/lib',
cwd: 'node_modules/codemirror/lib',
src: [
"codemirror.js"
],
......@@ -371,7 +372,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/codemirror/lib',
cwd: 'node_modules/codemirror/lib',
src: [
"codemirror.css"
],
......@@ -380,7 +381,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/codemirror/lib',
cwd: 'node_modules/codemirror/lib',
src: [
"codemirror.css"
],
......@@ -389,7 +390,7 @@ module.exports = function (grunt) {
flatten: true
},
{
cwd: 'bower_components/codemirror/mode',
cwd: 'node_modules/codemirror/mode',
src: [
"**"
],
......@@ -398,7 +399,7 @@ module.exports = function (grunt) {
flatten: false
},
{
cwd: 'bower_components/codemirror/mode',
cwd: 'node_modules/codemirror/mode',
src: [
"**"
],
......@@ -424,6 +425,28 @@ module.exports = function (grunt) {
flatten: true
}
]
},
worker: {
files: [
{
src: js_worker,
expand: true,
dest: "js/Worker/",
flatten: true
},
{
src: js_worker,
expand: true,
dest: typo3_js,
flatten: true
},
{
src: js_worker,
expand: true,
dest: "mockup/Worker/",
flatten: true
}
]
}
},
uglify: {
......@@ -492,6 +515,7 @@ module.exports = function (grunt) {
production: {
files: {
"extension/Resources/Public/Css/qfq-bs.css": "less/qfq-bs.css.less",
"extension/Resources/Public/Css/qfq-letter.css": "less/qfq-letter.css.less",
"extension/Resources/Public/Css/qfq-plain.css": "less/qfq-plain.css.less",
"extension/Resources/Public/Css/bs-tablesorter.css": "less/bs-tablesorter.less"
},
......@@ -502,6 +526,7 @@ module.exports = function (grunt) {
devel: {
files: {
"css/qfq-bs.css": "less/qfq-bs.css.less",
"css/qfq-letter.css": "less/qfq-letter.css.less",
"css/qfq-plain.css": "less/qfq-plain.css.less",
"css/bs-tablesorter.css": "less/bs-tablesorter.less"
},
......
PHPDOC ?= support/pear/phpdoc
JSDOC ?= jsdoc
SONAR_SCANNER_VERSION = 3.0.3.778
PKG_VERSION = $(shell awk '/version/ { print $$3 }' extension/ext_emconf.php | sed "s/'//g")
NIGHTLY_DATE = $(shell date '+%Y%m%d')
......@@ -11,7 +6,7 @@ RELEASE_DATE = $(shell date '+%Y%m%d%H%M')
GIT_REVISION_SHORT = $(shell git rev-parse --short HEAD || true)
GIT_REVISION_LONG = $(shell git rev-parse HEAD || true)
EXTENSION_CONTENT = Classes Configuration Documentation qfq Resources ext_emconf.php ext_localconf.php ext_tables.php ext_icon.png config.qfq.example.ini RELEASE.txt
EXTENSION_CONTENT = Classes Configuration Documentation qfq Resources ext_emconf.php ext_localconf.php ext_tables.php ext_icon.png ext_conf_template.txt config.qfq.example.php RELEASE.txt
DISTDIR=dist
......@@ -20,22 +15,24 @@ PIP_TMP ?= /tmp
all: archive t3sphinx
doc: phpdoc jsdoc plantuml
maintainer-clean:
rm -f .bowerpackages .doc_plantuml .npmpackages .phpdocinstall .plantuml_install .support .support_plantuml
rm -rf doc/jsdoc doc/phpdoc doc/plantuml support bower_components node_modules .python_virtualenv build-dist
rm -f .doc_plantuml .npmpackages .phpdocinstall .plantuml_install .support .support_plantuml
rm -rf doc/jsdoc doc/phpdoc doc/plantuml support node_modules .python_virtualenv build-dist
archive: clean qfq.zip
qfq.zip:
cd extension; zip -r ../$@ $(EXTENSION_CONTENT)
clean:
cd doc/diagram ; $(MAKE) $@
update-qfq-doc:
rsync -av --delete --exclude=_make --exclude=_static extension/Documentation/ ../qfq-doc/Documentation/
update-qfq-doc:
rsync -av --delete --exclude=_make --exclude=_static extension/Documentation/ ../qfq-doc/Documentation/; \
cd ../qfq-doc/; \
git commit -a; \
git push
git-revision: make-dist-dir
echo $(GIT_REVISION_LONG) > $(DISTDIR)/revision.git
......@@ -57,13 +54,13 @@ dist-copy-extension:
build-dist: t3sphinx make-dist-dir dist-copy-extension dist-move-doc git-revision
echo "Distribution made in $(DIST)"
nightly: bootstrap build-dist
nightly: basic build-dist
cd $(DISTDIR); zip -r ../qfq_$(VERSION)_$(RELEASE_DATE).zip $(EXTENSION_CONTENT) revision.git -x config.ini
snapshot: bootstrap build-dist
snapshot: basic build-dist
cd $(DISTDIR) ; zip -r ../qfq_$(VERSION)_$(RELEASE_DATE).zip $(EXTENSION_CONTENT) revision.git -x config.ini
release: bootstrap build-dist
release: basic build-dist
if [ -z "$(VERSION)" ] ; then echo "Set VERSION make variable to the release version (fmt: maj.min.micro)" ; exit 1 ; fi
cd $(DISTDIR) ; zip -r "../qfq_$(VERSION)_$(RELEASE_DATE).zip" $(EXTENSION_CONTENT) revision.git -x config.ini
......@@ -73,31 +70,13 @@ t3sphinx: .virtual_env
plantuml:
cd doc/diagram ; $(MAKE)
bootstrap: .phpdocinstall .npmpackages .bowerpackages .plantuml_install .virtual_env .sonar_scanner
bootstrap: .npmpackages .plantuml_install .virtual_env
npm update
bower update
grunt default
jsdoc: .npmpackages
$(JSDOC) -c JSDocConf.json
phpdoc: .phpdocinstall
$(PHPDOC)
.phpdocinstall: .support
if [ ! -f "`pwd`/support/pear.config" ]; then \
pear config-create "`pwd`/support" "`pwd`/support/pear.config" ; \
pear -c "`pwd`/support/pear.config" channel-discover pear.phpdoc.org ; \
fi
pear -c "`pwd`/support/pear.config" install --alldeps phpDocumentor
touch $@
.sonar_scanner: .support_sonar
cd support/sonar ;\
wget https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$(SONAR_SCANNER_VERSION)-linux.zip ;\
unzip -o sonar-scanner-cli-$(SONAR_SCANNER_VERSION)-linux.zip
touch $@
basic: .npmpackages .virtual_env
npm update
grunt default
.plantuml_install: .support_plantuml
wget --no-check-certificate -O support/plantuml/plantuml.jar 'https://downloads.sourceforge.net/project/plantuml/plantuml.jar'
......@@ -105,15 +84,9 @@ phpdoc: .phpdocinstall
.npmpackages: package.json
npm ls -g grunt-cli 2>/dev/null || { echo "Please install grunt-cli npm package using 'npm install -g grunt-cli'" 1>&2 ; exit 1; }
npm ls -g jsdoc 2>/dev/null || { echo "Please install jsdoc npm package using 'npm install -g jsdoc'" 1>&2 ; exit 1; }
npm ls -g bower 2>/dev/null || { echo "Please install bower npm package using 'npm install -g bower'" 1>&2 ; exit 1; }
npm install
touch $@
.bowerpackages: bower.json
bower --silent install
touch $@
.support:
mkdir -p support
touch $@
......@@ -122,10 +95,6 @@ phpdoc: .phpdocinstall
mkdir -p support/plantuml
touch $@
.support_sonar: .support
mkdir -p support/sonar
touch $@
.virtual_env: pip-temp-directory
virtualenv .python_virtualenv
. .python_virtualenv/bin/activate ; TMPDIR="$(PIP_TMP)" pip install --upgrade sphinx==1.5.5
......@@ -134,13 +103,9 @@ phpdoc: .phpdocinstall
pip-temp-directory:
test -d "$(PIP_TMP)" || mkdir -p "$(PIP_TMP)"
sonar: .sonar_scanner
support/sonar/sonar-scanner-$(SONAR_SCANNER_VERSION)-linux/bin/sonar-scanner
.PHONY: nightly maintainer-clean snapshot release git-revision t3sphinx build-dist make-dist-dir dist-move-doc dist-copy-extension pip-temp-directory plantuml sonar
copyReleasNotes:
copyReleaseNotes:
cp extension/Documentation/Release.rst extension/RELEASE.txt
cp extension/Documentation/Release.rst CHANGELOG.md
[![pipeline status](https://git.math.uzh.ch/typo3/qfq/badges/master/pipeline.svg)](https://git.math.uzh.ch/typo3/qfq/commits/master)
QFQ: Quick Form Query - Typo3 Extbase Extension
===============================================
......
{
"name": "qfq",
"authors": [
"Carsten Rose <carsten.rose@math.uzh.ch>"
],
"description": "",
"main": "",
"moduleType": [],
"license": "MIT",
"homepage": "",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"bootstrap": "^3.3.6",
"jqwidgets": "4.2.1",
"tablesorter": "jquery.tablesorter#^2.25.6",
"eventEmitter": "^4.3.0",
"bootstrap-validator": "^0.11.5",
"Chart.js": "^2.1.2",
"tinymce": "tinymce-dist#^4.4.3",
"corejs-typeahead": "^1.1.1",
"codemirror": "^5.24.0"
}
}
Setup
==
=====
Include the main CodeMirror JavaScript in the HTML source:
......@@ -9,7 +9,7 @@ Add the class `qfq-codemirror` to a `<textarea>` element. This class marks the e
.Helper.codemirror()`.
Configuration
==
=============
Set the `data-config` attribute on the `<textarea>` element. The value has to be valid JSON. It will then be
deserialized and passed to CodeMirror during initialization. E.g.
......@@ -21,7 +21,7 @@ Refer to the [CodeMirror manual](https://codemirror.net/doc/manual.html) under s
configuration options.
Mode
==
====
The configuration option `mode` sets the mode to be used by CodeMirror. To work properly, the corresponding
JavaScript file has to be loaded. For instance, `mode: "text/x-sql"` requires to include `code-mirror-mode/sql/sql.js`
......
......@@ -196,6 +196,12 @@ Download
See PROTOCOL.md > Download
Monitor
-------
Shows files instantly in the browser. Via AJAX request a user defined HTML element will be replaced by the content of the
file. 'frequency' and mode 'replace' / 'append' can be configured. Only files in document root are acessible.
Print
-----
......@@ -216,7 +222,7 @@ Formelement type: DATE / DATETIME / TIME
* regexp might be user defined. If given, do not use system regexp!
* No min/max check.
* Server:
* check with system wirde regexp
* check with system wide regexp
* regexp might be user defined. If given, do not use system regexp!
* Do min/max check.
......@@ -249,9 +255,33 @@ Debug / Log
* Check to display debug info:
$this->store->getVar(SYSTEM_SHOW_DEBUG_INFO, STORE_SYSTEM) === 'yes'
Form Log
--------
On request (by user in FormEditor) a 'formLog' mode can be activated per individual form. The mode will be disabled after
FORM_LOG_EXPIRE (typically 1800 seconds).
* The formLog button (top of FormEditor) open's the same page with SIP parameter:
* form=<formName>
* _formLogMode=logAll|logSession
* If a form is opened with '_formLogMode' SIP parameter, the form is not shown.
* Instead:
* An empty formLogFile ist created
* Filename: $this->formSpec[formLogFileSession|formLogFileAll]='fileadmin/protected/log/form.<formname>.log' (all) or
form.<formname>.<beuser>log is set.
* A HTML element with htmlid='formLog-1' is rendered together with the AJAX monitor code to the current logFile.
* If a form is instantiated (load, save, udpate, delete), the system checks if corresponding lock files exist.
* Correspondig expired logfiles will be deleted.
* Active logfiles will be filled.
Errormessages & Eceptions
=========================
Errormessages & Exceptions
==========================
* Exception types:
* Code
......
# Drag And Drop
## Sort
Initialize a dnd container by adding the class "qfq-dnd"
Set container object class to `class="qfq-dnd qfq-dnd-sort"`.
Add the data elements: `data-dnd-api="url"` and `data-dnd-key="key"`.
For the children inside of the container (just the first children):
add `data-dnd-id` to a reference you can handle (probably record id).
Request will be sent containing following GET variables:
* dragId = `data-dnd-id` of the dragged object,
* dragPosition = client internal old position of the dragged object.
* setTo = "after" or "before",
* hoverId = `data-dnd-id` id of the element the dragged element is now hovering, meaning before or after.
* hoverPosition = client internal position of currently hovered element.