Quickstart ¶
Step 1: Installation ¶
- After purchasing a license
- Download the ZIP-file from the official download site
-
Extract
AppGiniHelper.min.js
from the ZIP-file
tohooks/AppGiniHelper.min.js
1 2 3 4 |
|
Step 2: Integration ¶
-
Open
hooks/header-extras.php
in your favourite code editor
I recommend using VSCODE for various reasons -
Paste the following lines of code into
hooks/header-extras.php
and -
Save the file
header-extras.php
1 2 3 |
|
Step 3: Start coding ¶
Common Changes ¶
For common changes like Navigation Bar modifications you can start by placing a
<script></script>
block in
hooks/header-extras.php
and start coding there.
1 2 3 4 5 6 7 8 9 |
|
Reload your app in the browser ( without cache ) and check the top Navigation Bar.
You should see a different brand title and icon at the top-left.
Modifications of Detail Views ¶
For modifications of Detail Views I recommend creating a new javascript file
hooks/TABLENAME-dv.js
:
1 2 3 |
|
See also: Detail View
Tip
In a javascript file
*.js
you must not write
<script></script>
because the browser already knows this is Javascript.
Modifications of Table Views ¶
For modifications of Table Views I recommend creating a new javascript file
hooks/TABLENAME-tv.js
:
1 2 3 4 5 6 7 8 9 |
|
Important
For Table View modifications we have to wait until the table has been rendered ("lazy loading").
Tip
In a javascript file
*.js
you must not write
<script></script>
because the browser already knows this is Javascript.
Next Steps ¶
- Common modifications
- Change Table View
- Change Detail View
Tips ¶
Browser Cache problems ¶
You can avoid some versioning-/caching-trouble by appending a dynamic parameter. This should force the browsers to load the current version of your scripts from server and not from your browser's local cache.
1
|
|
Custom Pages ¶
If you intend to create
Custom Pages
outside
the main directory, for example in the
hooks
subdirectory, then you should change the
<script>
-include as follows (recommended):
1
|
|
Fix
Note the prepended constant
PREPEND_PATH
: This constant should resolve problems finding the script even outside main directory.
Alternatively, you can always use a fully qualified URL (address)
1
|
|
Caution
Keep in mind that you will have to change the
src
-address when copying or moving your application to a different location. If, for example, you upload your app to a server called
example.com
, you will have to change
src
to something like this:
1
<script src="http://www.example.com/myApp/hooks/AppGiniHelper.min.js"></script>