FS#1737 - Javascript Overhaul
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.
ID | Project | Summary | Priority | Severity | Assigned To | Progress | |
---|---|---|---|---|---|---|---|
2098 | Flyspray - The bug killer! | FS#2098 - Attached image cannot be downloaded | Low | Medium |
ID | Project | Summary | Priority | Severity | Assigned To | Progress | |
---|---|---|---|---|---|---|---|
2038 | Flyspray - The bug killer! | FS#2038 - Jscalendar must be replaced with something else | Medium | Low |
Incomplete list of current javascript usage in Flyspray
yet incomplete javascript file usage
In order to address the last point "inline code", the list of tpl that contain some:
For 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).
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..