Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
1ec4fcb6
Commit
1ec4fcb6
authored
Jun 22, 2019
by
Carsten Rose
Browse files
F7284tablesorter save sort order
parent
73adfd53
Changes
321
Show whitespace changes
Inline
Side-by-side
d
oc/ANNOTATION.md
→
D
oc
umentation-develop
/ANNOTATION.md
View file @
1ec4fcb6
File moved
d
oc/CODEMIRROR.md
→
D
oc
umentation-develop
/CODEMIRROR.md
View file @
1ec4fcb6
File moved
d
oc/CODING.md
→
D
oc
umentation-develop
/CODING.md
View file @
1ec4fcb6
File moved
Documentation-develop/CODING.pdf
0 → 100644
View file @
1ec4fcb6
File added
d
oc/DRAGANDDROP.md
→
D
oc
umentation-develop
/DRAGANDDROP.md
View file @
1ec4fcb6
File moved
d
oc/HTML.md
→
D
oc
umentation-develop
/HTML.md
View file @
1ec4fcb6
File moved
Documentation-develop/HTML.pdf
0 → 100644
View file @
1ec4fcb6
File added
d
oc/LAYOUT.md
→
D
oc
umentation-develop
/LAYOUT.md
View file @
1ec4fcb6
File moved
Documentation-develop/LAYOUT.pdf
0 → 100644
View file @
1ec4fcb6
File added
d
oc/Makefile
→
D
oc
umentation-develop
/Makefile
View file @
1ec4fcb6
File moved
d
oc/NewVersion.md
→
D
oc
umentation-develop
/NewVersion.md
View file @
1ec4fcb6
File moved
d
oc/PROTOCOL.md
→
D
oc
umentation-develop
/PROTOCOL.md
View file @
1ec4fcb6
...
...
@@ -563,3 +563,30 @@ Current Page
Redirect
: Issued by the Server. It is a command prompting the Client to
navigate away from the Current Page.
### Tablesorter Save View
To save a table view the client sends a post request with the following data:
{
"name": "<name of view>",
"public": <boolean>,
"tableId": "<id of table to which view belongs>",
"view": {
"columnSelection": <array of chosen column ids>,
"filters": <array of strings>,
"sortList": <array of arrays of length 2>
}
}
Request URL
: api/save.php
Request Method
: POST
URL Parameters
:
`s=<SIP>`
- to prove permission.
Server Response
: The response contains at least a [Minimal Response].
Documentation-develop/PROTOCOL.pdf
0 → 100644
View file @
1ec4fcb6
File added
d
oc/REST.md
→
D
oc
umentation-develop
/REST.md
View file @
1ec4fcb6
...
...
@@ -12,11 +12,11 @@ General Concept
*
There is one PHP file to handle all REST calls:
typo3conf/ext/qfq/Classes/
a
pi/rest.php
typo3conf/ext/qfq/Classes/
A
pi/rest.php
*
All further endpoints are appended after rest.php, seperated by '/'. Example:
http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/restPerson/1/restAddress/123?myEmail=jonni@miller.com
http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/restPerson/1/restAddress/123?myEmail=jonni@miller.com
The argument 'myEmail' is just to show how GET variables will be submitted.
...
...
@@ -39,7 +39,7 @@ GET - export
Example:
curl -X GET "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/restPerson"
curl -X GET "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/restPerson"
Details:
...
...
@@ -55,7 +55,7 @@ POST - insert
Example:
curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/restPerson" -d '{"name":"Miller","firstname":"Jonni"}'
curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/restPerson" -d '{"name":"Miller","firstname":"Jonni"}'
Details:
...
...
@@ -69,7 +69,7 @@ PUT - update
Example:
curl -X PUT "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/restPerson/1" -d '{"name":"Miller","firstname":"Jonni"}'
curl -X PUT "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/restPerson/1" -d '{"name":"Miller","firstname":"Jonni"}'
Details:
...
...
@@ -83,7 +83,7 @@ Delete
Example:
curl -X DELETE "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/restPerson/1"
curl -X DELETE "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/restPerson/1"
Details:
...
...
@@ -97,7 +97,7 @@ Header Token Authorization
Example:
curl -X GET -H 'Authorization: Token token="mySuperSecretToken"' "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/restPerson/"
curl -X GET -H 'Authorization: Token token="mySuperSecretToken"' "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/restPerson/"
Static token
------------
...
...
@@ -120,6 +120,6 @@ Append the GET variable `?XDEBUG_SESSION_START=1`
Example:
curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Classes/
a
pi/rest.php/restPerson?XDEBUG_SESSION_START=1" -d '{"name":"Miller","firstname":"Jonni"}'
curl -X POST "http://localhost/qfq/typo3conf/ext/qfq/Classes/
A
pi/rest.php/restPerson?XDEBUG_SESSION_START=1" -d '{"name":"Miller","firstname":"Jonni"}'
PhpStorm with activated debugger will stop at any breakpoint and 'stepping' through the code is possible.
d
oc/T3_DOC.md
→
D
oc
umentation-develop
/T3_DOC.md
View file @
1ec4fcb6
File moved
Documentation-develop/TABLESORTER.md
0 → 100644
View file @
1ec4fcb6
===========
Tablesorter
===========
*
https://mottie.github.io/tablesorter/docs/index.html
General Concept
===============
Tablesorter supports filter, column on/off and sort.
A QFQ enhancement allows save/delete/activate of custom tablesorter
`views`
. This feature is described in this document.
QFQ uses the table 'Setting' to store per user, public and readonly settings. At time of writing only 'tablesorter' settings
are supported. Further settings might come in the future.
Show table with tablesorter activate/save/delete
================================================
A page with a HTML table includes the command
`{{'<uniqueName>' AS _tablesorter-view-saver}}`
inside of the HTML table tag.
QFQ will replace the command::
<table
{{
'
allperson
'
AS
_tablesorter-view-saver
}}
class=
"tablesorter tablesorter-filter tablesorter-column-selector"
>
...
</table>
by
<table data-tablesorter-id='allperson' data-tablesorter-sip='5d0e29c4eacc2'
data-tablesorter-view='[{"name":"test","public":false,"tableId":"mytable","view":"eyJjb2x1bW5TZWxlY3Rpb24iOlswLDEsMiwzXSwiZmlsdGVycyI6WyIiLCIiLCIiLCIiXSwic29ydExpc3QiOltdfQ=="}]' class="table tablesorter tablesorter-column-selector tablesorter-filter tablesorter-pager">
data-tablesorter-id:
'
<uniqueName>
'
data-tablesorter-sip:
tableId: the '
<uniqueName>
', in the example it's 'allperson'
feUser: the current logged in FE user. If no FE user is logged in, take the QFQ cookie. With this workaround, it's at
least possible to work with 'views' during a browser session.
data-tablesorter-view: JSON encoded array
Array of views.
Each view:
['name'] - Name of the view. Value is html entity encoded.
['public'] - true or false. false mean's 'private'.
['tableId'] - '
<uniqueName>
' - this is the filter to assign views to a specific HTML table.
['view'] - base64 encoded JSON array. It's base64 encoded for two reasons:
a) we do not have to take care about SQL injection (the user might supply filter strings, incl. regex expressions)
b) the JSON array will contain '}}', which confuses QFQ/evaluate.
QFQ will collect all views:
a) all private views of the current table and FE User,
b) all public views of the current table.
Save tablesorter view
=====================
The user might click on 'Save Private View' or 'Save Public View'.
A Ajax Post request to
http://localhost/qfq/typo3conf/ext/qfq/Classes/Api/setting.php?s=badcaffee1234
The SIP is the one given by
`data-tablesorter-sip`
and contains
`tableId`
and
`feUser`
. The SIP is right to manipulate the views.
The POST contains:
feUser - fe user login name
mode - missing or 'delete' if the given view should be deleted
public - true|false
name - name of the view
view - base64 encoded tablesorter filter/order/column selector.
Response setting.php
====================
setting.php will always answer with a JSON stream (Minimal response):
{
"status": "success"|"error",
"message": "<message>"
}
d
oc/THUMBNAIL.md
→
D
oc
umentation-develop
/THUMBNAIL.md
View file @
1ec4fcb6
File moved
d
oc/TINYMCE.md
→
D
oc
umentation-develop
/TINYMCE.md
View file @
1ec4fcb6
File moved
d
oc/UI.md
→
D
oc
umentation-develop
/UI.md
View file @
1ec4fcb6
File moved
Documentation-develop/UI.pdf
0 → 100644
View file @
1ec4fcb6
File added
Prev
1
2
3
4
5
…
17
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment