FS#1737 - Javascript Overhaul
@scott wrote:
Convert all the JS to using one library. Seems there is scattered JS scripts all over and we need to pick one solution that could be long term and has plenty of features for improving FS.
I vote for JQuery w/ Bootstrap which has some nice JS effects using JQuery.
@peterdd wrote on 2021-04-02:
Yes, move inline javascript out of templates, but no need for single wholeinone js file, it’s ok to load only the js files required for current page. Probably in 2021 there is no need for js framework anymore and standard javascript is just fine for the functionality Flyspray requires.
ID | Project | Summary | Priority | Severity | Assigned To | Progress | |
---|---|---|---|---|---|---|---|
2098 | Flyspray | Low | Medium |
ID | Project | Summary | Priority | Severity | Assigned To | Progress | |
---|---|---|---|---|---|---|---|
2038 | Flyspray | FS#2038 - Jscalendar must be replaced with something else | Medium | Low |
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Incomplete list of current javascript usage in Flyspray
admin and pm: liststablecontrol2021-04-02 fixed in develupdated 2021-10-19
yet incomplete javascript file usage
In order to address the last point "inline code", the list of tpl that contain some:
./themes/CleanFS/templates/common.list.tpl2021-04-02: fixed in develFor this first pass, the list does not contain third party, /setup/templates/administration.tpl, /js/jscalendar/calendar.php and /scripts/langedit.php, which contain some inline script tag.
Among me, the first step is to globalize $baseurl as a js global scope var in ./themes/CleanFS/templates/header.tpl
I'll pull a little patch for this and then rewrite all xhr calls based on $baseurl.
On github, I'll tag these patches as FS#1737-IC referring to this (these) comment(s).
edit by @peterdd 2021-04-02: updated
Second step: extract most of PHP/JS melting code and put them into dedicated or common js files.
functions.js is considered as common js file container.
For each dedicated js code, a single file has created in new "js/modules" directory.
An external branch https://github.com/landrok/flyspray/tree/PHP/JS-meltings-clean-scriptinlinemarkup has been dedicated to that step.
It has been done for these files:
./themes/CleanFS/templates/roadmap.tpl
./themes/CleanFS/templates/newmultitasks.tpl
./themes/CleanFS/templates/index.tpl
./themes/CleanFS/templates/newtask.tpl
./themes/CleanFS/templates/admin.prefs.tpl
./themes/CleanFS/templates/common.multiuserselect.tpl
./themes/CleanFS/templates/common.editallusers.tpl
./themes/CleanFS/templates/details.view.tpl
In order not to disturb first step validation, I am waiting for first step integration to pull those updates.
Do you want I pull twice together ?
Current dokuwiki ( see www.dokuwiki.org) also uses jquery as js lib.
So I vote for jquery and doing it together with updating our dokuwiki stuff. (
FS#2028)A replacement for the currently used 'lightbox 1' plugin could be
this jquery based plugin:
Maybe too many options we do not need..