1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-09 12:06:29 +02:00
Commit Graph

282 Commits

Author SHA1 Message Date
Cameron
d7e3caae83 Admin-ui: Improved adminMenu highlighting when custom uri in use.
Plugin Builder: added menu divider example.
2018-05-23 16:29:37 -07:00
Cameron
ed36008286 Non-standard arg_separator.output value fix. 2018-05-04 17:58:25 -07:00
Cameron
0aab273723 Admin-ui: Throw error if $pluginName does not match an installed plugin. 2018-03-07 11:42:30 -08:00
Nick Liu
8a675021ff Hybrid e_tree_model flat lists or parent-children
e_tree_model is apparently used for flat lists as well as parent-child
relationships (trees). Trees are expected to be far smaller than possible flat
lists. Very large flat lists (10,000+ rows or greater) are rendered very slowly
because of the tree computation overhead.

This change figures out whether a flat list or a tree is requested and chooses
the appropriate code to run based on what is requested. Trees run the more
expensive code while flat lists are returned as-is.

In addition, the tree rendering code has been optimized. Optimizations:

* Unchanging tree node ID is set once instead of inside a foreach() loop
* The parent-child query is now sorted by the sort parent ID so that each move
  rows to tree nodes iteration doesn't have to run through every remaining row

Fixes: #3062
2018-03-06 16:08:11 -06:00
Cameron
1494c18660 Admin-UI: Added "Is Empty" option to type=number when filter is true. 2018-03-05 17:15:49 -08:00
Cameron
48b3318ecb Admin-UI: $field 'filter' attribute now accepts 'future' and 'both', defaults to 'past' when set to true. ie. search future dates, past/future dates or past dates. 2018-03-05 14:37:56 -08:00
Cameron
f1460787a1 Admin-ui Fix date filter. 2018-03-05 13:45:11 -08:00
Deltik
b3a274010e Refactored e_tree_model for Code Climate 2018-02-09 05:40:53 -06:00
Deltik
2167a69a50 Record count no longer depends on subclass impl.
Subclasses may forget to run code to do a total record count, which
leads to output showing "Total Records: 0" on some pages with lists,
like `/e107_admin/links.php`.

This commit cuts out the record counting from the getList() method of
any e_admin_form_ui subclasses and the base class so that subclasses do
not have to reimplement record counting.

The caveat with this implementation is that it violates the Law of
Demeter, as evidenced by the new chained method call:

    $this->getController()->getTreeModel()->getTotal()

Jumping through two objects to get a value is not ideal, but this is the
code we have to work with at the moment.
2018-02-09 04:57:01 -06:00
Deltik
511bb9eae9 Implemented custom sorting for e_tree_model
In #3025, e_tree_model sorting was reimplemented in pure PHP, but this
broke custom sorting (like `?field=cat_name&asc=desc`).

This commit introduces a hack that simulates a subset of MySQL/MariaDB
ORDER BY clauses, which should be sufficient for all known custom
sorting that can be requested.

Tree formatting is always preserved, but custom sorting will apply for
all items at a certain depth under the same parent.

This commit also contains some minor formatting fixes and makes a minor
change to some regex to make use of non-capturing groups.

Fixes: #3029
2018-02-09 04:37:48 -06:00
Nick Liu
e5a0935726 Reimplement e_tree_model sorting in pure PHP
Eliminated e107 dependency on the MySQL/MariaDB CREATE PROCEDURE permission

As a bonus, any attempt to use e107's native custom sorting (e.g.
`?field=cat_name&asc=desc`) will preserve the correct tree hierarchy.  The past
behavior was to sort as requested but keep showing depth, even though the
apparent tree hierarchy would be wrong.

Fixes: #3015
Supercedes: #2929
2018-01-28 12:54:20 -06:00
Cameron
0671024c79 Issue #2970 btn-default > btn-default btn-secondary 2018-01-10 15:11:12 -08:00
Cameron
4476336e22 Admin-ui: Fix for size of default plugin-icon in admin menu. 2018-01-09 11:21:16 -08:00
Cameron
2788e9745c Image to Bbcode routines and batch conversion option added to admin News area (when in debug mode) 2017-12-27 20:58:59 -08:00
Cameron
1a306412f4 Reverted Issue #2929 until we can get it working correctly. 2017-12-23 11:54:25 -08:00
Cameron
a0d5e2df19 Tweaked 2017-12-21 16:30:45 -08:00
Lóna Lore
4ef9e78935 Ability to use ASC/DESC direction in getTreeModelSorted() 2017-12-22 00:51:44 +01:00
Lóna Lore
1b39eae368 getTreeModelSorted() 2017-12-22 00:39:01 +01:00
Lóna Lore
c0f66a45fc "_depth" calculation for admin_ui 2017-12-21 21:54:06 +01:00
Cameron
ad52a3ccfc Image picker re-style. 2017-12-19 16:27:57 -08:00
Cameron
e1dda1570c Fix for breadcrumb title with menu aliases. 2017-12-19 13:02:16 -08:00
Cameron
0bf882c0a7 Admin-ui: Experimental Parent/Child tree-sorting code. 2017-12-18 14:07:50 -08:00
Cameron
3d93dad248 Fixes #2862 - Search icon positioning fix across all admin-area skins. 2017-11-17 14:57:52 -08:00
Cameron
ff06f83331 Admin-ui language indicator alignment fix. 2017-11-10 17:15:34 -08:00
Cameron
85029536e7 Fixes #2834 - Batch Copy wasn't redirecting. 2017-10-30 13:39:49 -07:00
Cameron
0fe0bf57bf #2794 Added toggleButton param to admin-ui: $grid 2017-09-22 18:12:47 -07:00
Cameron
c7e5af666d Issue #2794 Enhancement: Grid View toggle button for Admin-UI 2017-09-22 14:55:44 -07:00
lonalore
5b87c9f9e2 Quickfix for Media Manager filtering. 2017-07-21 09:13:54 +02:00
Cameron
7508764f18 Fixes #2722 - html fix. 2017-07-05 14:29:33 -07:00
Cameron
f58e00c41b Admin-ui: Auto-display sort button when sortField is not empty and 'sort' parm is not set. 2017-05-08 18:47:51 -07:00
Cameron
caee889b7f Fixes Plugin Database structure update detection. 2017-04-21 14:21:29 -07:00
Cameron
40558eeedb Fixes #2588 - admin-menu icon. 2017-04-21 12:13:12 -07:00
Cameron
c766afd954 Theme selection fix. Admin-ui carousel pagination fix. 2017-04-13 08:54:59 -07:00
Cameron
16957243bc Admin-ui: Grid carousel slides are now auto-normalized. 2017-04-05 13:31:29 -07:00
Cameron
cc1b154e7b Admin-ui: Fix for batch in Grid mode 2017-04-05 13:12:29 -07:00
Cameron
674fde0525 Admin-ui: Carousel option added for use with Grid. 2017-04-05 12:42:42 -07:00
Cameron
e17316eab7 Admin-ui: Grid mode mostly complete. Fixed admin-ui top navigation. 2017-04-04 18:41:34 -07:00
Cameron
8ce9eb32c6 Admin-ui: Grid improvements. 2017-04-04 09:53:48 -07:00
Cameron
a8931d663b Admin-ui: Grid-listing (work-in-progress) 2017-04-03 20:20:38 -07:00
Cameron
c88fbb5c9a Closes #2528 Batch SEF generation added. 2017-04-02 11:32:32 -07:00
Cameron
52b44b833d Admin-ui: Parent/Child order fix. 2017-04-02 07:57:08 -07:00
Cameron
525a097517 Admin-ui: readParm['url'] added and other url fixes. 2017-03-30 13:53:06 -07:00
Cameron
7ab368076f Admin-ui: Additional checks for valid parent value when editing parent/child record. eg. download_category etc. 2017-03-30 08:58:02 -07:00
Cameron
453a7fc91e PHP 5.6 fix for sql function queries. 2017-03-28 17:55:35 -07:00
Cameron
2b37a57348 typo fix 2017-03-28 17:34:01 -07:00
Cameron
a2026244a3 Issue #2487 - Category Tree fixes. 2017-03-28 15:16:27 -07:00
Cameron
f90832a9d5 Admin-ui automated tree sorting when $sortField and $sortParent are defined. 2017-03-27 16:27:08 -07:00
MikeyGMT
ce4e2be003 Text to Lans in Admin UI #6
Text to Lans in Admin UI #6
Checked prefs, theme and plugin manager, un/reinstalled featurebox,
works fine.
2017-03-19 16:42:57 +00:00
Cameron
aa36466220 Issue #2446 e_menu multilan value fix. 2017-03-02 09:39:50 -08:00
Cameron
b2e951d2d8 Fix for admin news perms 2017-02-18 15:31:41 -08:00