Commit 4ee6228a authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch master. First functional 'monitor' version.

parents 1d6095ba 920f3ec3
......@@ -36,6 +36,63 @@ Features
Bug Fixes
^^^^^^^^^
Version 18.6.0
--------------
Date: 13.06.2018
Notes
^^^^^
* config.qfq.ini migrated to config.qfq.php - the old config.qfq.ini get's `chmod 000`.
* Most of config.qfq.ini migrated to Typo3 / Extension Manager - all but the DB /LDAP credentials.
* Keep in config.qfq.ini: ::
# Rename DB credentials from DB_<key> to DB_1_<key>, with key = 'NAME|HOST|USER|PASSWORD'
DB_1_USER = ...
DB_1_SERVER = ...
DB_1_PASSWORD = ...
DB_1_NAME = ...
* NEW: Drag and drop to sort elements! Check the Manual.
* `URL forwardMode`
* `client` renamed to `auto`.
* `close` added.
Features
^^^^^^^^
* #6100 / Url Forward Auto: Update Manual.rst. The F.parameter.saveAndClose has been removed again. Mode 'close' can be assigned statically or dynamic.
* #6178 / Input: Step: New option 'step' for FE.parameter.
* Download.php: references to non existing files now reported as missing file, not 'wrong mimetype' anymore.
* #4918 / Drag'n'Drop reorder elements DRAGANDDROP.md, PROTOCOL.md: Doc for "drag'n' drop" implementation.
dragAndDrop.php: API endpoint DragAndDrop.php: Class for implementing drag'n' drop functionality.
Link.php: implement new renderMode=8 - returning only the sip. QuickFormQuery.php: New entry point for processing "drag'n' drop".
* #3971 / Form title: new design from form title
Bug Fixes
^^^^^^^^^
* #5077 / Dynamic Update & FE.type=required: Server fixed -
a) dynamic calculated modeSql respected,
b) formModeGlobal=requiredOff respected,
c) dynamic FE with mode='hidden' are not saved anymore.
* #6176 / Icon not aligned when error text: Buttons now wrapped in one 'input-group'.
* Manual.rst: reformat autocron QFQ code
* #5880 / Skip Error Message during dynamicUpdate
* #5870 / Missing file config.qfq.ini: Clean QFQ message
* #5924 / config.qfq.ini/LocalConfiguration.php: several places in formEditor.sql still contained the 'dbIndex...'
instead of 'index...'. fixed.
* #6168 Configuration language setting ignored: Form and FormElement editor still used uppercase config values for
language configuration. Updated to the new camel case notation.
* #5890 / config.qfq.ini is public readable. Renamed file to config.qfq.php. Implement a basic migration assistant to
copy DB credentials to new config.qfq.php. All other values have to be copied to extmanager/qfq-configuration manually.
* #6216 / Oops, an error occurred! Code - unhandled exception will be caught now.
Version 18.4.4
--------------
......@@ -119,7 +176,7 @@ Features
Bug Fixes
^^^^^^^^^
* #5706 Fixed that problematic characters in 'fileDestination' has not been sanatized.
* #5706 / Fixed that problematic characters in 'fileDestination' has not been sanatized.
* Fixed problem with buttons clipping trough alert
* Client: wrong variable, updated CSS for long errors
......
......@@ -11,7 +11,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 ext_conf_template.txt 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
......
# 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.
Example: http://something/bla?dragId=uno&dragPosition=1&setTo=before&hoverId=tre&hoverPosition=3
\ No newline at end of file
......@@ -47,8 +47,8 @@ Neue Versionsnummer
6) **New Tag**:
git tag v18.4.4
git push -u origin v18.4.4
git tag v18.6.0
git push -u origin v18.6.0
7) PhpStorm: **Sync** all files to VM qfq.
......
......@@ -73,11 +73,11 @@ the Client by adding following name/value pairs to the response JSON
Stream
{
"status": "error",
...
"field-name": "<field name>",
"field-message": "<message>",
...
"status": "error",
...
"field-name": "<field name>",
"field-message": "<message>",
...
}
Only one validation failure per request can be reported to Client.
......@@ -224,18 +224,22 @@ The format of redirect information is outlined below
{
...
"redirect": "no" | "url" | "url-skip-history" | "client"
"redirect": "no" | "url" | "url-skip-history" | "auto" | "close"
"redirect-url": "<url>"
...
}
`"redirect"`
: type of redirection. `"no"` advises the Client to stay on the
Current Page. `"client"` advises the Client to decide where to
redirect to. `"url"` advices the Client to redirect to the URL
provided in `"redirect-url"`. `"url-skip-history"` behaves like
`"url"` but the current page will skip the browser history.
: type of redirection.
* `"no"` advises the Client to stay on the Current Page.
* `"close"` the client goes back one in history - if there is no history, stays on the same page.
* `"auto"` the Client decide where to redirect to.
* if the user clicks 'save', stay on the same page.
* if the user clicks 'close', go back one in history - if there is no history, stays on the same page.
* `"url"` advices the Client to redirect to the URL provided in `"redirect-url"`.
* `"url-skip-history"` behaves like `"url"` but the current page will skip the browser history.
`"redirect-url"`
: Used to provide an URL when `"redirect"` is set to `"url"`. It
......@@ -465,7 +469,7 @@ Request Method
: GET
URL Parameters
: `s=<SIP>` (form, r)
: `s=<SIP>` (form, r)
: `action=lock`, `action=extend`, `action=release>`
: `recordHashMd5=<value of hidden form element 'recordHashMd5'>`
......@@ -479,7 +483,7 @@ JSON Response from the server (extended [Minimal Response]) containing:
{
"status": "success"|"error"|"conflict"|"conflict_allow_force",
"message": "<message>"
"message": "<message>"e5
}
`status` indicates how the request has been fulfilled by the server.
......@@ -488,6 +492,29 @@ On one of`"error"|"conflict"|"conflict_allow_force"` the Client must display `"<
On `"conflict"` the Client opens the alert as modal dialog (user can't change anything on the form) with a 'reload current
form' button.
On `"conflict_allow_force"` the Client opens the alert non-modal (default).
### Drag And Drop (sort)
Request
: api/dragAndDrop.php
Request Method
: GET
URL Parameters:
: `s=<SIP>` (`form=<formname>`)
:
: `dragId=<data-dnd-id of dragged element>`
: `dragPosition=<client internal position (numbering) of element before dragging>`
: `setTo=before`, `setTo=after`
: `hoverId=<data-dnd-id of dragged element>`
: `hoverPosition=<client internal position (numbering) of element after dragging>`
Server Response
: The response contains at least a [Minimal Response]. In addition, a
[HTML Element Update] may be included.
## Glossary
......
......@@ -13,8 +13,17 @@ require_once(__DIR__ . '/../../qfq/qfq/exceptions/UserReportException.php');
require_once(__DIR__ . '/../../qfq/qfq/exceptions/CodeException.php');
require_once(__DIR__ . '/../../qfq/qfq/exceptions/DbException.php');
/**
* Class QfqController
* @package IMATHUZH\Qfq\Controller
*/
class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
/**
* @return string
* @throws qfq\CodeException
* @throws qfq\UserFormException
*/
public function showAction() {
$origErrorReporting = '';
......
This diff is collapsed.
......@@ -36,6 +36,63 @@ Features
Bug Fixes
^^^^^^^^^
Version 18.6.0
--------------
Date: 13.06.2018
Notes
^^^^^
* config.qfq.ini migrated to config.qfq.php - the old config.qfq.ini get's `chmod 000`.
* Most of config.qfq.ini migrated to Typo3 / Extension Manager - all but the DB /LDAP credentials.
* Keep in config.qfq.ini: ::
# Rename DB credentials from DB_<key> to DB_1_<key>, with key = 'NAME|HOST|USER|PASSWORD'
DB_1_USER = ...
DB_1_SERVER = ...
DB_1_PASSWORD = ...
DB_1_NAME = ...
* NEW: Drag and drop to sort elements! Check the Manual.
* `URL forwardMode`
* `client` renamed to `auto`.
* `close` added.
Features
^^^^^^^^
* #6100 / Url Forward Auto: Update Manual.rst. The F.parameter.saveAndClose has been removed again. Mode 'close' can be assigned statically or dynamic.
* #6178 / Input: Step: New option 'step' for FE.parameter.
* Download.php: references to non existing files now reported as missing file, not 'wrong mimetype' anymore.
* #4918 / Drag'n'Drop reorder elements DRAGANDDROP.md, PROTOCOL.md: Doc for "drag'n' drop" implementation.
dragAndDrop.php: API endpoint DragAndDrop.php: Class for implementing drag'n' drop functionality.
Link.php: implement new renderMode=8 - returning only the sip. QuickFormQuery.php: New entry point for processing "drag'n' drop".
* #3971 / Form title: new design from form title
Bug Fixes
^^^^^^^^^
* #5077 / Dynamic Update & FE.type=required: Server fixed -
a) dynamic calculated modeSql respected,
b) formModeGlobal=requiredOff respected,
c) dynamic FE with mode='hidden' are not saved anymore.
* #6176 / Icon not aligned when error text: Buttons now wrapped in one 'input-group'.
* Manual.rst: reformat autocron QFQ code
* #5880 / Skip Error Message during dynamicUpdate
* #5870 / Missing file config.qfq.ini: Clean QFQ message
* #5924 / config.qfq.ini/LocalConfiguration.php: several places in formEditor.sql still contained the 'dbIndex...'
instead of 'index...'. fixed.
* #6168 Configuration language setting ignored: Form and FormElement editor still used uppercase config values for
language configuration. Updated to the new camel case notation.
* #5890 / config.qfq.ini is public readable. Renamed file to config.qfq.php. Implement a basic migration assistant to
copy DB credentials to new config.qfq.php. All other values have to be copied to extmanager/qfq-configuration manually.
* #6216 / Oops, an error occurred! Code - unhandled exception will be caught now.
Version 18.4.4
--------------
......@@ -119,7 +176,7 @@ Features
Bug Fixes
^^^^^^^^^
* #5706 Fixed that problematic characters in 'fileDestination' has not been sanatized.
* #5706 / Fixed that problematic characters in 'fileDestination' has not been sanatized.
* Fixed problem with buttons clipping trough alert
* Client: wrong variable, updated CSS for long errors
......
......@@ -2,8 +2,8 @@
[general]
project = QFQ - Quick Form Query
version = 18.4
release = 18.4.4
version = 18.6
release = 18.6.0
t3author = Carsten Rose
copyright = since 2017 by the author
......
......@@ -57,9 +57,9 @@ copyright = u'2017, Carsten Rose'
# built documents.lease
#
# The short X.Y version.
version = '18.4'
version = '18.6'
# The full version, including alpha/beta/rc tags.
release = '18.4.4'
release = '18.6.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -36,6 +36,63 @@ Features
Bug Fixes
^^^^^^^^^
Version 18.6.0
--------------
Date: 13.06.2018
Notes
^^^^^
* config.qfq.ini migrated to config.qfq.php - the old config.qfq.ini get's `chmod 000`.
* Most of config.qfq.ini migrated to Typo3 / Extension Manager - all but the DB /LDAP credentials.
* Keep in config.qfq.ini: ::
# Rename DB credentials from DB_<key> to DB_1_<key>, with key = 'NAME|HOST|USER|PASSWORD'
DB_1_USER = ...
DB_1_SERVER = ...
DB_1_PASSWORD = ...
DB_1_NAME = ...
* NEW: Drag and drop to sort elements! Check the Manual.
* `URL forwardMode`
* `client` renamed to `auto`.
* `close` added.
Features
^^^^^^^^
* #6100 / Url Forward Auto: Update Manual.rst. The F.parameter.saveAndClose has been removed again. Mode 'close' can be assigned statically or dynamic.
* #6178 / Input: Step: New option 'step' for FE.parameter.
* Download.php: references to non existing files now reported as missing file, not 'wrong mimetype' anymore.
* #4918 / Drag'n'Drop reorder elements DRAGANDDROP.md, PROTOCOL.md: Doc for "drag'n' drop" implementation.
dragAndDrop.php: API endpoint DragAndDrop.php: Class for implementing drag'n' drop functionality.
Link.php: implement new renderMode=8 - returning only the sip. QuickFormQuery.php: New entry point for processing "drag'n' drop".
* #3971 / Form title: new design from form title
Bug Fixes
^^^^^^^^^
* #5077 / Dynamic Update & FE.type=required: Server fixed -
a) dynamic calculated modeSql respected,
b) formModeGlobal=requiredOff respected,
c) dynamic FE with mode='hidden' are not saved anymore.
* #6176 / Icon not aligned when error text: Buttons now wrapped in one 'input-group'.
* Manual.rst: reformat autocron QFQ code
* #5880 / Skip Error Message during dynamicUpdate
* #5870 / Missing file config.qfq.ini: Clean QFQ message
* #5924 / config.qfq.ini/LocalConfiguration.php: several places in formEditor.sql still contained the 'dbIndex...'
instead of 'index...'. fixed.
* #6168 Configuration language setting ignored: Form and FormElement editor still used uppercase config values for
language configuration. Updated to the new camel case notation.
* #5890 / config.qfq.ini is public readable. Renamed file to config.qfq.php. Implement a basic migration assistant to
copy DB credentials to new config.qfq.php. All other values have to be copied to extmanager/qfq-configuration manually.
* #6216 / Oops, an error occurred! Code - unhandled exception will be caught now.
Version 18.4.4
--------------
......@@ -119,7 +176,7 @@ Features
Bug Fixes
^^^^^^^^^
* #5706 Fixed that problematic characters in 'fileDestination' has not been sanatized.
* #5706 / Fixed that problematic characters in 'fileDestination' has not been sanatized.
* Fixed problem with buttons clipping trough alert
* Client: wrong variable, updated CSS for long errors
......
; QFQ configuration
;
; Save this file as: <site path>/typo3conf/config.qfq.ini
DB_1_USER = <DBUSER>
DB_1_SERVER = <DBSERVER>
DB_1_PASSWORD = <DBPW>
DB_1_NAME = <DB>
; DB_2_USER = <DBUSER>
; DB_2_SERVER = <DBSERVER>
; DB_2_PASSWORD = <DBPW>
; DB_2_NAME = <DB>
; LDAP_1_RDN =
; LDAP_1_PASSWORD =
<?php
// QFQ configuration
//
// Save this file as: <site path>/typo3conf/config.qfq.php
return [
'DB_1_USER' => '<DBUSER>',
'DB_1_SERVER' => '<DBSERVER>',
'DB_1_PASSWORD' => '<DBPW>',
'DB_1_NAME' => '<DB>',
//DB_2_USER = <DBUSER>
//DB_2_SERVER = <DBSERVER>
//DB_2_PASSWORD = <DBPW>
//DB_2_NAME = <DB>
// DB_n ...
// ...
// LDAP_1_RDN =
// LDAP_1_PASSWORD =
];
......@@ -120,7 +120,11 @@ formDataMatchError = match error
# cat=form-config/config; type=string; label=Form data error message:Default is 'error'. Customizable error message used in validator.js. generic violation.
formDataError = error
# cat=form-config/config; type=boolean; label=Show record-id in form title:Default is off (0). If on (1), append the current record id on the title. New records get '(new)'.
showIdInFormTitle = 0
# cat=form-config/config; type=string; label=Wrap the subrecord column 'id|ID|Id' with the given class. E.g. 'text-muted' is rendered as ...<span class="text-muted">value</span>.
cssClassColumnId = text-muted
......@@ -245,5 +249,96 @@ newButtonClass = btn btn-default navbar-btn
newButtonGlyphIcon = glyphicon-plus
# cat=custom/layout; type=string; label=Custom variable 01:Default empty. Can be used the centrally define variables. E.g. "CONTACT_EMAIL = 'john@doe.com'". Retrieve them via '{{CONTACT_EMAIL:Y}}'.
custom1 =
# cat=custom/layout; type=string; label=Custom variable 02
custom2 =
# cat=custom/layout; type=string; label=Custom variable 03
custom3 =
# cat=custom/layout; type=string; label=Custom variable 04
custom4 =
# cat=custom/layout; type=string; label=Custom variable 05
custom5 =
# cat=custom/layout; type=string; label=Custom variable 06
custom6 =
# cat=custom/layout; type=string; label=Custom variable 07
custom7 =
# cat=custom/layout; type=string; label=Custom variable 08
custom8 =
# cat=custom/layout; type=string; label=Custom variable 09
custom9 =
# cat=custom/layout; type=string; label=Custom variable 10
custom10 =
# cat=custom/layout; type=string; label=Custom variable 11
custom11 =
# cat=custom/layout; type=string; label=Custom variable 12
custom12 =
# cat=custom/layout; type=string; label=Custom variable 13
custom13 =
# cat=custom/layout; type=string; label=Custom variable 14
custom14 =
# cat=custom/layout; type=string; label=Custom variable 15
custom15 =
# cat=custom/layout; type=string; label=Custom variable 16
custom16 =
# cat=custom/layout; type=string; label=Custom variable 17
custom17 =
# cat=custom/layout; type=string; label=Custom variable 18
custom18 =
# cat=custom/layout; type=string; label=Custom variable 19
custom19 =
# cat=custom/layout; type=string; label=Custom variable 20
custom20 =
# cat=custom/layout; type=string; label=Custom variable 21
custom21 =
# cat=custom/layout; type=string; label=Custom variable 22
custom22 =
# cat=custom/layout; type=string; label=Custom variable 23
custom23 =
# cat=custom/layout; type=string; label=Custom variable 24
custom24 =
# cat=custom/layout; type=string; label=Custom variable 25
custom25 =
# cat=custom/layout; type=string; label=Custom variable 26
custom26 =
# cat=custom/layout; type=string; label=Custom variable 27
custom27 =
# cat=custom/layout; type=string; label=Custom variable 28
custom28 =
# cat=custom/layout; type=string; label=Custom variable 29
custom29 =
# cat=custom/layout; type=string; label=Custom variable 30
custom30 =
......@@ -11,7 +11,7 @@ $EM_CONF[$_EXTKEY] = array(
'dependencies' => 'fluid,extbase',
'clearcacheonload' => true,
'state' => 'stable',
'version' => '18.4.4',
'version' => '18.6.0',
'constraints' => [
'depends' => [
'typo3' => '6.0.0-9.2.99',
......
......@@ -89,7 +89,7 @@ try {
$answer = array();
if ($flagSuccess) {
$answer[API_MESSAGE] = 'Deleted';
$answer[API_REDIRECT] = API_ANSWER_REDIRECT_CLIENT;
$answer[API_REDIRECT] = API_ANSWER_REDIRECT_AUTO;
$answer[API_STATUS] = API_ANSWER_STATUS_SUCCESS;
} else {
$answer[API_STATUS] = API_ANSWER_STATUS_ERROR;
......
<?php
/**
* Created by PhpStorm.
* User: ep
* Date: 12/23/15
* Time: 6:17 PM
*/
namespace qfq;
use qfq;
require_once(__DIR__ . '/../qfq/store/Store.php');
require_once(__DIR__ . '/../qfq/Constants.php');
require_once(__DIR__ . '/../qfq/QuickFormQuery.php');
//require_once(__DIR__ . '/../qfq/exceptions/UserFormException.php');
//require_once(__DIR__ . '/../qfq/exceptions/CodeException.php');
//require_once(__DIR__ . '/../qfq/exceptions/DbException.php');
//require_once(__DIR__ . '/../qfq/exceptions/ErrorHandler.php');
/**
* Return JSON encoded answer
*
* status: success|error
* message: <message>
* redirect: client|url|no
* redirect-url: <url>
* field-name: <field name>
* field-message: <message>
* form-data: [ fieldname1 => value1, fieldname2 => value2, ... ]
* form-control: [ fieldname1 => status1, fieldname2 => status2, ... ] status: show|hide, enabled|disabled,
* readonly|readwrite
*
* Description:
*
* Save successful. Button 'close', 'new'. Form.forward: 'auto'. Client logic decide to redirect or not. Show message
* if no redirect. status = 'success' message = <message> redirect = 'client'
*
* Save successful. Button 'close': Form.forward: 'page'. Client redirect to url.
* status = 'success'
* message = <message>
* redirect = 'url'
* redirect-url = <URL>
*
* Save failed: Button: any. Show message and set 'alert' on _optional_ specified form element. Bring 'pill' of
* specified form element to front. status = 'error' message = <message> redirect = 'no' Optional: field-name = <field
* name> field-message = <message appearing as tooltip (or similar) near the form element>
*/
$answer = array();
$answer[API_REDIRECT] = API_ANSWER_REDIRECT_NO;
$answer[API_STATUS] = API_ANSWER_STATUS_ERROR;
$answer[API_MESSAGE] = '';
try {
$qfq = new QuickFormQuery(['bodytext' => '']);
$data = $qfq->dragAndDrop();
$answer[API_STATUS] = API_ANSWER_STATUS_SUCCESS;
$answer[API_MESSAGE] = 'reorder: success';
// $answer[API_FORM_UPDATE] = $data[API_FORM_UPDATE];
// $answer[API_ELEMENT_UPDATE] = $data[API_ELEMENT_UPDATE];
// unset($answer[API_FORM_UPDATE][API_ELEMENT_UPDATE]);