tpr

AdminOnSteroids

Recommended Posts

Hey @tpr - I just noticed that AOS removes the 3px border radius on Page List Action buttons. Is there a particular reason for this? Is it just a stylistic choice on your part, or a remnant of some old code? No big deal, just thought I'd ask :)

  • Like 1

Share this post


Link to post
Share on other sites

Hi @tpr,

AOS has a stylesheet rule...

html.noFilenameTruncate i.fa-file-image-o, html.noFilenameTruncate .InputfieldFileInfo i {
    left: -21px !important;
    top: 3px;
    float: left;
}

...but this is too broad and affects the FontAwesome icon 'file-image-o' outside of the image inputfield when the noFilenameTruncate option is active (e.g. in the icon picker or in the module listing if that icon is used for a module).

  • Like 1

Share this post


Link to post
Share on other sites

@tpr Thank you for this great module.

Note to self: When your site is doing something fabulous and you can't remember for the life of you how you did it, check AOS first :lol:

  • Like 4

Share this post


Link to post
Share on other sites

Thanks! Use the code you find there with caution, it doesn't always follow the best practices :)

Plus unfortunately your quote is also valid when changing a word in it:

When your site is doing something weird and you can't remember for the life of you how you did it, check AOS first  :) 

  • Like 1

Share this post


Link to post
Share on other sites

When working with the NavItems submodule, which is incredibly useful, i have encountered some caveats, and not sure if these can be fixed/addressed...

1) The js that adds those items seems to only work on the first menu item, and if that has child items. Usually this is Pages, and has children;  but in my case, i have a dashboard module that takes the top position under the admin, and is the landing page for the admin. In this case, the nav items don't show, since there are no child items present under the dashboard process.

2) For custom nav items, i often will need to be able to place the menu items in specific places, like under a 'Content' or 'Company' menu, and i know that won't be possible currently in AOS,  so as a workaround, I used the technique of adding a menu item, using ProcessPageEdit as the selected process, and then doing the trick of of hooking in ready.php to specify the id of the edit page (courtesy @Jonathan Lahijani), but the issue with this is that the $input->get doesn't seem to be available to other modules (maybe the order in which they are loaded), and therefore any modules used in the admin that rely on $input->get->id don't work, since the URL that you are on is the url (name) of the process page.

if($page->template=="admin" && $page->name == "homepage-config") {
  $input->get->id = $pages->get("/settings/homepage-editor/")->id;
}

So anyway i have a somewhat hacky process module (ProcessMenuLink) that $session redirects to the edit page for the item; ultimately would be cool if there were some way to have the menu item itself link directly to the edit page w/o redirect, but for now this is the workaround i'm using...

thanks for listening!

Share this post


Link to post
Share on other sites

@tpr, I've been having a look at getting the field edit links working inside repeaters.

The solution is pretty simple. At line 2342...

if ($field = $inputfield->hasField) {
//...

And because of the suffix added to the name of inputfields inside a repeater I think it would be good to make this change at line 2354...

$editFieldTooltip = '<em class="aos_EditField">' . $field->name . '<i class="fa fa-pencil"></i></em>';

...to use $field->name instead of $inputfield->name.

  • Like 2

Share this post


Link to post
Share on other sites

Thanks,  I'll check all the issues and fixes when I finally get out of this less productive holiday season :)

  • Like 2

Share this post


Link to post
Share on other sites
On 12/27/2017 at 3:07 AM, Robin S said:

The solution is pretty simple. At line 2342...


if ($field = $inputfield->hasField) {
//...

Thanks for this - this has solved the issue with FieldDescriptionsExtended that i posted about...

Share this post


Link to post
Share on other sites

Hi @tpr,

Could you please give some comment about where things stand with AOS with regard to AdminThemeUikit? Have you done much testing with the Uikit theme and would you say that AOS is officially supports the Uikit theme at the moment?

So far I have been holding off switching to the Uikit theme - for a few reasons, one of which is that AOS is a pretty important part of my custom profile and I want to be sure the module works well with the theme before I switch my clients over to it. I haven't tested AOS much with the Uikit theme but at a quick glance I noticed a few things that made me think that the theme might not be officially supported by AOS yet.

AOS toggle/config link doesn't align with the left edge of the content container:2018-01-10_114345.png.9f63eb45f34bcb101bcacb6ac30b3f6a.png

Module config icon position is a bit off and icon is fuzzy (wrong size?):
2018-01-10_114421.png.a85d942c7962c66d68586d101658d813.png

Also, the Escape key does not clear the notices.

No pressure if AOS is not ready for AdminThemeUikit yet - just wanted to check.

  • Like 1

Share this post


Link to post
Share on other sites

No, I haven't dealt with every detail yet, mostly only with the issues you reported here and on github. I do not use pw nowadays too much and even if I do I use the Reno theme so I cannot spot all the issues. But I think the majority of them are easy to fix, apart from the fact that now 3 admin themes are there to check which slows down things. I plan to iron out the known issues in the following weeks. 

  • Like 1

Share this post


Link to post
Share on other sites
54 minutes ago, tpr said:

I do not use pw nowadays too much

Noooooooooo! :o

You have been seduced by some other sexy CMF??? (The hussy!) Tell me it isn't true! :-)

  • Like 2
  • Haha 1

Share this post


Link to post
Share on other sites

No, things are not that obvious.  We are using other tools that allow separating admin and frontend to different servers,  so even if fronted gets hacked they can't get hold of sensitive data but only static html files. This is something pw can't do afaik,  perhaps with procache but I haven't tried that workaround so far. 

  • Like 1

Share this post


Link to post
Share on other sites
20 hours ago, tpr said:

apart from the fact that now 3 admin themes are there to check which slows down things. I plan to iron out the known issues in the following weeks. 

I recommend dropping classic Default admin theme support. After all, AdminThemeUikit is becoming the new default in the near future.

Share this post


Link to post
Share on other sites
On 10/01/2018 at 6:20 AM, tpr said:

No, things are not that obvious.  We are using other tools that allow separating admin and frontend to different servers,  so even if fronted gets hacked they can't get hold of sensitive data but only static html files. This is something pw can't do afaik,  perhaps with procache but I haven't tried that workaround so far. 

Can you elaborate on "other tools that allow separating admin and frontend to different servers". Do you mean tools like Gatsby and the likes ?

Share this post


Link to post
Share on other sites

I meant CMSes that can output the whole site to a different server. One example is WordPress + Simply Static plugin.

  • Like 1

Share this post


Link to post
Share on other sites

Yesterday I've fixed a few things mentioned earlier. Some remarks:

On 1/9/2018 at 11:49 PM, Robin S said:

Also, the Escape key does not clear the notices.

For me it works fine. Does it happen on other sites too? Others?

On 12/19/2017 at 5:19 PM, Macrura said:

In this case, the nav items don't show, since there are no child items present under the dashboard process.

Yep, navItems are hacky because there is no hook to add menu items properly.

To add items only to specific pages would require to rewrite the whole thing, but my biggest concern is how to make the admin for it simple.

On 12/15/2017 at 1:25 PM, adrian said:

AOS removes the 3px border radius on Page List Action buttons. Is there a particular reason for this?

I don't remember why it's there :) 

On 1/10/2018 at 8:25 PM, szabesz said:

I recommend dropping classic Default admin theme support. After all, AdminThemeUikit is becoming the new default in the near future.

Sure, when the time comes.

 

  • Like 1

Share this post


Link to post
Share on other sites
On 10/01/2018 at 6:20 PM, tpr said:

We are using other tools that allow separating admin and frontend to different servers,  so even if fronted gets hacked they can't get hold of sensitive data but only static html files. This is something pw can't do afaik,  perhaps with procache but I haven't tried that workaround so far.

I opened a feature request topic about this in the ProCache sub-forum (not sure if you have access to that). Will be interesting to see if Ryan will consider adding such a feature.

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, tpr said:

 

On 10/01/2018 at 11:49 AM, Robin S said:

Also, the Escape key does not clear the notices.

For me it works fine.

I think the issue is here. Because the index may be 0 this line should be:

if (HotkeysSettings.indexOf('removeNoticeHotkey') !== -1) {

 

  • Like 1

Share this post


Link to post
Share on other sites

I will check the procache forum, thanks! (I need a different account there). 

Seems like I missed the - 1 for the indexOf, thanks for the help. 

Share this post


Link to post
Share on other sites

In the upcoming 1.7.4 version there will be a new tweak for the Logs page. The helpers field on top can be expanded by default, and the select box of Actions replaced with radios.

I don't really get why the actions are in a select, radios are easier to use. I've requested this change in the core on GitHub (and got a few likes there too) but so far there's no response.

loghelpers.gif

  • Like 5

Share this post


Link to post
Share on other sites

Hello all. Does anyone experience an issue with the spacing between different fields in the admin while using AdminOnSteroids? I determined that the issue appears with the module prior to the fact that if I disable it, everything shows up correctly.

Presently I am using the latest PW 3.0.91 with the default Uikit theme and any place I go that shows fields in the admin is showing with a huge white space in between two. At first, I thought that I set some settings incorrectly, but even after a reset of the module I still see the issue appearing.

Any suggestions how to fix this as I was browsing through all the 40 pages in this topic, used search keywords to try to find the result, however so far I had no luck.

In case of a need, I am using a few other modules:

FieldTypeComments, MarkupSEO, ProcessWireUpgrade however if I disable AOS it all works fine.

P.S. The screenshot is a real one to one on 1396x768

MarkupSEO-Module-Spacing-Issue.png

Share this post


Link to post
Share on other sites

Any javascript errors in the web browser's console?  Does it happen with other web browsers?

Try disabling AOS Tooltips, do you still see the problem?

Share this post


Link to post
Share on other sites
1 hour ago, MilenKo said:

Any suggestions how to fix

As I remember there was (is?) an issue with tooltips feature set to Overlay type. Could you check if this is the culprit? 

Share this post


Link to post
Share on other sites

@gmclelland, @tpr   The issue appears if I enable tooltips for field description and field notes (even without having marked to use the overlay style). As soon as I turned off the Tooltips option completely, everything came back to normal.

Any suggestions to try to have the tooltips activated and avoid the spacing? At least for now I am OK to use the module even without the tooltips, so thank you both...

 

Share this post


Link to post
Share on other sites

Hi @tpr, I would like to have a little feature request here. I guess most of us feel pain when choosing fields and templates in dropdown select if the list grows large.  I think we could implement a search function to make us more efficient. I think AOS is the best place to implement this.

After some brief search, select2.js could be a good candidate. It hides the original select tag instead of using some div with hidden input field, so it , most likely, does not affect the inputfield like asm select. With option closeOnSelect: false could prevent the open and close behavior every time when we choose an item from asm. Also, it looks easy to implement. I hope you could consider adding this.:P

https://select2.org/getting-started/basic-usage

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Robin S
      Breadcrumb Dropdowns
      Adds dropdown menus of page edit links to the breadcrumbs in Page Edit.

      Installation
      Install the Breadcrumb Dropdowns module. The module requires ProcessWire >= v3.0.83 and AdminThemeUikit.
      There is a checkbox option in the module config that determines if the breadcrumb dropdowns will include pages that the user does not have permission to edit.
      Features/details
      The module adds an additional breadcrumb item at the end for the currently edited page. That's because I think it's more intuitive for the dropdown under each breadcrumb item to show the item's sibling pages rather than the item's child pages. In the dropdown menus the current page and the current page's parents are highlighted in a crimson colour to make it easier to quickly locate them in case you want to edit the next or previous sibling page. If the option to include uneditable pages is selected then those pages are indicated by a reduced text opacity and the "not-allowed" cursor is shown on hover. There is a limit of 25 sibling pages per dropdown for performance reasons and to avoid the dropdown becoming unwieldy. Incompatibilities
      This module replaces the AdminThemeUikit::renderBreadcrumbs method so will potentially be incompatible with other modules that hook the same method.
      Known incompatible modules:
      AdminThemeBoss  
      https://modules.processwire.com/modules/breadcrumb-dropdowns/
      https://github.com/Toutouwai/BreadcrumbDropdowns
    • By joshuag
      Hey guys, 
      Thought I would share a quick preview of Designme. A module we (Eduardo @elabx and I) are building for visually laying out your templates/edit screens. 🙂
      This is a really quick, zero polish screen grab. FYI. 
      Video #2 - UPDATE
      This new video shows the following features in Designme:
      Re-arranging fields via Drag & Drop Re-sizing fields via Dragging. Adjusting field settings - with live refresh. Working on "hidden" fields while Designme is active. Creating New fields. Deleting fields. Creating/Deleting Tabs. Dragging fields between tabs. Creating fieldsets. Tagging/Un-tagging fields. Fields without headers expand when hovered (like checkboxes). Live filtering of fields in the sidebar. Ability to adjust (all) Template settings without leaving Designme. Template File Tree Editing Template files source code with ACE Editor. Editing Multiple files with ACE Editor. (New Tabs) Saving files. Techie stuff Fields load their own js/css dependancies. *ready to use on creation (*most fields)  Everything happens via Ajax to ProcessPageEdit (via module + hooks). Designme has a JS api that you can use.  All actions trigger events.  We would love any detailed feedback on what you see so far. If you are interested in testing Designme. Let me know below. 🙂
       
       
      Video #1. 
       
    • By dreerr
      TemplateEnginePug (formally TemplateEngineJade)
       
      This module adds Pug templates to the TemplateEngineFactory. It uses https://github.com/pug-php/pug to render templates.
      doctype html html(lang='en') head meta(http-equiv='content-type', content='text/html; charset=utf-8') title= $page->title link(rel='stylesheet', type='text/css', href=$config->urls->templates . 'styles/main.css') body include header.pug h1= $page->title if $page->editable() p: a(href=$page->editURL) Edit Project on GitHub: github.com/dreerr/TemplateEnginePug
      Project in modules directory: modules.processwire.com/modules/template-engine-pug/
       
      For common problems/features/questions about the Factory, use the TemplateEngineFactory thread.
       
    • By tpr
      ProcessNetteTester
      Run Nette Tester tests within ProcessWire admin.
      (continued from here)

      Features
      AJAX interface for running Nette Tester tests, in bulk or manually display counter, error message and execution time in a table run all tests at once or launch single tests show formatted test error messages and report PHP syntax errors stop on first failed test (optional) hide passed tests (optional) display failed/total instead passed/total (optional) re-run failed tests only (optional) auto scroll (optional) include or exclude tests based on query parameters start/stop all tests with the spacebar reset one test or all tests (ctrl+click) https://modules.processwire.com/modules/process-nette-tester/
      https://github.com/rolandtoth/ProcessNetteTester
    • By bernhard
      Some of you might have followed the development of this module here: https://processwire.com/talk/topic/15524-previewdiscussion-rockdatatables/ . It is the successor of "RockDataTables" and requires RockFinder to get the data for the grid easily and efficiently. It uses the open source part of agGrid for grid rendering.
       
      WHY?
      ProcessWire is awesome for creating all kinds of custom backend applications, but where it is not so awesome in my opinion is when it comes to listing this data. Of course we have the built in page lister and we have ListerPro, but none of that solutions is capable of properly displaying large amounts of data, for example lists of revenues, aggregations, quick and easy sorts by the user, instant filter and those kind of features. RockGrid to the rescue 😉 
       
      Features/Highlights:
      100k+ rows Instant (client side) filter, search, sort (different sort based on data type, eg "lower/greater than" for numbers, "contains" for strings) extendable via plugins (available plugins at the moment: fullscreen, csv export, reload, batch-processing of data, column sum/statistics, row selection) all the agGrid features (cell renderers, cell styling, pagination, column grouping etc) vanilla javascript, backend and frontend support (though not all plugins are working on the frontend yet and I don't plan to support it as long as I don't need it myself)  
      Limitations:
      While there is an option to retrieve data via AJAX the actual processing of the grid (displaying, filtering, sorting) is done on the client side, meaning that you can get into troubles when handling really large datasets of several thousands of rows. agGrid should be one of the most performant grid options in the world (see the official example page with a 100k row example) and does a lot to prevent problems (such as virtual row rendering), but you should always have this limitation in mind as this is a major difference to the available lister options that do not have this limitation.
      Currently it only supports AdminThemeUikit and I don't plan to support any other admin theme.
       
      Download: https://gitlab.com/baumrock/RockGrid
      Installation: https://gitlab.com/baumrock/RockGrid/wikis/Installation
      Quikckstart: https://gitlab.com/baumrock/RockGrid/wikis/quickstart
      Further instructions: https://gitlab.com/baumrock/RockGrid/wikis/quickstart#further-instructions
       
      Module status: alpha, License: MIT
      Note that every installation and uninstallation sends an anonymous google analytics event to my google analytics account. If you don't want that feel free to remove the appropriate lines of code before installation/uninstallation.
       
      Contribute:
      You can contribute to the development of this and other modules or just say thank you by
      testing, reporting issues and making PRs at gitlab liking this post buying me a drink: paypal.me/baumrock/5 liking my facebook page: facebook.com/baumrock hiring me for pw work: baumrock.com  
      Support: Please note that this module might not be as easy and plug&play as many other modules. It needs a good understanding of agGrid (and JavaScript in general) and it likely needs some looks into the code to get all the options. Please understand that I can not provide free support for every request here in the forum. I try to answer all questions that might also help others or that might improve the module but for individual requests I offer paid support for 60€ per hour.
       
      Changelog
      180711 bugfix (naming issue) 180630 alpha realease  
      Use Cases / Examples:
      Colored grid cells, Icons, Links etc. The Grid also has a "batcher" feature built in that helps communicating with the server via AJAX and managing resource intensive tasks in batches:

      Filters, PW panel links and instant reload on panel close:

      You can combine the grid with a chart library like I did with the (outdated) RockDataTables module: