[Devel] [GIT] OpenBioMaps GIT repository, branch master updated:

git at vocs.unideb.hu git at vocs.unideb.hu
Tue Aug 28 03:41:52 CEST 2018


    The project "OpenBioMaps GIT repository":

    The branch, master has been updated
       via  9aa9aaf1439fdec93ff347f04ab2fe856e30e4d7 (commit)
       via  14c0ec271d8a1899ff02f7dd455d3b642579da7e (commit)
       via  ea0431177a1cbbd88eb20771db00aafdadb4db24 (commit)
       via  5d1639ff13ea4a3cf6bebe6c4ae822843bcdc691 (commit)
      from  32db2c5b25cf660014cc7fe69a48ae444dc49045 (commit)


- Log -----------------------------------------------------------------
commit 9aa9aaf1439fdec93ff347f04ab2fe856e30e4d7
Merge: 14c0ec27 32db2c5b
Author: Bán Miklós <banm at vocs.unideb.hu>
Date:   Tue Aug 28 03:41:37 2018 +0200

Merge branch 'master' of vocsi:/home/git/openbiomaps

commit 14c0ec271d8a1899ff02f7dd455d3b642579da7e
Author: Bán Miklós <banm at vocs.unideb.hu>
Date:   Tue Aug 28 02:35:21 2018 +0200

Fixes and updates

1) photo/attachment file_connect table

Update table:
ALTER TABLE file_connect ALTER COLUMN conid TYPE character varying(32);
ALTER TABLE file_connect ADD COLUMN temporal boolean DEFAULT true;
ALTER TABLE file_connect ADD COLUMN sessionid character varying(64);
ALTER TABLE file_connect ADD COLUMN rownum smallint;

In Data tables add a trigger:

CREATE TRIGGER file_connection AFTER INSERT ON dinpi FOR EACH ROW EXECUTE PROCEDURE file_connect_status_update();

file_connect_status_update
BEGIN
IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN
IF (new.obm_files_id IS NOT NULL) THEN
UPDATE file_connect SET temporal=false WHERE temporal=true AND conid=new.obm_files_id;
END IF;
RETURN new;
END IF;
END

This trigger and the 'temporal' column can prevent accidental deletion from file_connect if session id are not unique.

- duplicated conid problem fixed
- connections can be deleted or updated from phtomanage window
- file manager admin page was updated, but not ready. The table content was updated, but files can't be deleted or updated.

2)

autocomplete / create menu (SELECT DISTINCT ...) bug fixed
Default is using distinct without unique obm_id column but menu can be
create with the optional all_options='on' parameter and in this case
menu will be created without 'distinct'.

3)

speedup filter for improving auto created menus which uses SELECT
DISTINCT query. This filter can be useful for huge tables.
Add the obm_first_letter_filter column to these tables. E.g.
UPDATE kuvet_bevet_2018 SET obm_first_letter_filter=lower(substring(telepules from 1 for 1))

And it will be used in the queries in the following way:
OLD:
SELECT DISTINCT "telepules" "telepules" FROM hrsz_terkepek."kuvet_bevet_2018" WHERE CAST("telepules" AS TEXT) ILIKE 'bak%' ORDER BY telepules LIMIT 20
With speedup_filter:
SELECT DISTINCT "telepules" "telepules" FROM hrsz_terkepek."kuvet_bevet_2018" WHERE obm_first_letter_filter='b' AND CAST("telepules" AS TEXT) ILIKE 'bak%' ORDER BY telepules LIMIT 20

4)

text filter (and other box filter) menus can controlled by several
parameters. See the following examples and explanations.

modules/text_filter:
d.szamossag:nested(d.egyedszam):autocomplete
d.egyedszam:values():

Explanation of this example:
- The "d" letter will be resolved from the sql_query's alias, for
creating references for the JOIN-ed tables
- nested(x) means that the select menu's content for x column, will be created by the
user input in this field.
- autocomplete: means that the 'szamosság' field will not be
displayed as the usual multiselect input field but as an autocomplete field. Further parameter is
"singleselect".
- values() sets values for the field. In this case the select input field will be empty (It will be filled with filtered content based on user input in the box above it).

I have to write documentation, consistently and diligently ... Is there anybody can help me??? There are so many small and practical
non-documented features everywhere!!!
We should update the 'github.com/OpenBioMaps/documentation' page after create or update OBM features!!!

commit ea0431177a1cbbd88eb20771db00aafdadb4db24
Author: Bán Miklós <banm at vocs.unideb.hu>
Date:   Fri Aug 24 18:55:22 2018 +0200

non defined index warning fix

this bug fix not a full solution for this problem because it just
eliminates the warnings without solving the background of this problem

commit 5d1639ff13ea4a3cf6bebe6c4ae822843bcdc691
Author: Bán Miklós <banm at vocs.unideb.hu>
Date:   Fri Aug 24 18:54:19 2018 +0200

autocomplete list definition bug fix

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                         |  10 +-
 libs/.afuncs.php.swk                               | Bin 0 -> 143360 bytes
 libs/.common_pg_funcs.php.swi                      | Bin 0 -> 299008 bytes
 libs/afuncs.php                                    |  95 +++++++++----
 libs/common_pg_funcs.php                           |  81 ++++++-----
 libs/css/style.css                                 |   2 +-
 libs/interface.php                                 |   2 +-
 libs/js/admin.js                                   |  74 +++++-----
 libs/js/functions.js                               |   5 +-
 libs/js/main.js                                    |  17 +--
 libs/js/maps.js                                    |  53 ++++---
 libs/js/uploader.js                                | 156 ++++++++++++---------
 libs/modules/results_asList.php                    |   2 +-
 libs/photos.php                                    |   1 -
 libs/project_admin.php                             |  39 +++---
 libs/update_fields.php                             |  16 ++-
 libs/upload_funcs.php                              |  14 +-
 pds/pds_class.php                                  |   8 +-
 .../initial/root/UMS_REPOSITORY/repository.db      |   5 +
 templates/initial/root/index.php                   |   7 +
 20 files changed, 362 insertions(+), 225 deletions(-)
 create mode 100644 libs/.afuncs.php.swk
 create mode 100644 libs/.common_pg_funcs.php.swi

-- 
OpenBioMaps GIT repository


More information about the Devel mailing list