OsakaWebbie / kizunadb

A database app for remembering people, organizations, activities, and relationships, which I started developing in around 2000 or 2001. As a result of its age, its PHP code is primarily procedural and hand-coded - although I intend to refactor it to a more modern style, functionality is a higher priority..
http://l4jp.com/en/kizunadb-en/
GNU General Public License v2.0
0 stars 0 forks source link

Multi-Select: Search and category selection with AJAX #8

Open OsakaWebbie opened 7 years ago

OsakaWebbie commented 7 years ago

If possible, fill option box on the fly as the user types in the search box. But at a minimum, don't send non-selected names to the browser until requested by AJAX.

OsakaWebbie commented 5 years ago

This should probably be done in conjunction with the revamp of Multi-Select for the "bucket" feature, issue #16.

OsakaWebbie commented 5 years ago

On second thought, most of this is independent of Bucket, so I probably shouldn't lump them together. But please inform Karen if you plan to work on it, so we can coordinate with the Bucket code that is well on its way but only on my local VM so far. (I don't know why feature branches don't show up on Github when I do commit & push, but they don't.) If you work on this, it will also motivate me to get Bucket finished and merged!

Explanation of this enhancement:

Currently the code underlying Multi-Select (multiselect.php) is really old (pre-AJAX) and was written when the number of records was small. So it populates a Javascript array with all the person/org entries in the database, their categories, and whether each one is currently selected. That array is then used to populate the two visible lists. But now there are organizations using this database that have thousands of person records, so the loading time and memory usage is just stupid. So it needs to be revamped to use AJAX to get records that match a selected category. There should also be a simple search field for searching by name (a little feature my husband has been requesting for years!).

Also, currently the page has an iframe to house the various ms_[whatever].php files that appear when one of the action buttons on the right side is pressed. Once again, this should be AJAX instead, filling a <div> so that the page can be responsive (iframes are a fixed size, as far as I know). The appearance could also be modernized for responsiveness and touch operation. (Those green buttons are so old-school!) Feel free to use jQuery UI to its fullest.

As for the action buttons, some of them can simply go away. First of all, the whole "Pre-Filtering Search Pages" section will be irrelevant when Bucket is done. Secondly, there are a few others that no one but me ever used, and some of the code doesn't even work anymore. If you tackle this aspect, let me know and I'll take a closer look and decide which ones are expendable and which ones would be useful again if cleaned up.