tpr

AdminOnSteroids

Recommended Posts

It's doable I think, but the question is what is the default user behaviour, save or publish?

You mean very new pages or pages left unpublished for a reason, and then hitting ctrl+s?

  • Like 1

Share this post


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

pages left unpublished for a reason

This one and not just brand new pages. I think it does not really matter what the previous life of the page was if we went to keep it Unpublished.

5 minutes ago, tpr said:

default user behaviour, save or publish?

I vote for "save only behavior" so that users new to AOS do not trip over it accidentally just like I do :-[ I'm not new to AOS but last time I did not notice that I published the page and it was so for more than a week... :( Those who are confident enough could switch to the current behavior but that does not include me anymore.

Share this post


Link to post
Share on other sites

v162 is uploaded, changelog here. The docs still needs to be updated (FieldOverrides and the new Branding logo feature at least). 

  • Like 1

Share this post


Link to post
Share on other sites

FYI, in case it's not obvious, it's a file compiler issue. Something to do with the line breaks. I have come across this once before. It's a pain, but an easy fix.

Share this post


Link to post
Share on other sites

Thanks, I reformatted that part, hopefully it's OK now (for me it didn't appear).

  • Like 1

Share this post


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

Thanks, I reformatted that part, hopefully it's OK now (for me it didn't appear).

Looks good at my end - thanks.

Share this post


Link to post
Share on other sites

Thanks tpr!

I'm not seeing any PHP errors, but I'm still seeing some display issues.  When viewing the AOS's module settings page with AdminThemeUikit, the enabled modules boxes are to big and the screen scrolls a lot because of it.

To fix it, I had to add to src/aos_config.scss

// fix AdminThemeUiKit from expanding the min-height at runtime
.InputfieldContent.uk-form-controls{
  min-height: auto !important;
}

There are couple of others small issues, but I'll follow up on Github.

  • Like 1

Share this post


Link to post
Share on other sites

In v165 sticky header is available for the Uikit admin theme too along with a compact (smaller, better name anyone?) masthead, plus Profile page links to configure themes (SuperUsers only):

aos-165.png.03b307599d14a9f7841ea55cde261bb4.png

  • Like 2

Share this post


Link to post
Share on other sites

Thanks @tpr - great having the sticky header.

Another one of those File Compiler annoyances that needs a   to fix:

Add links to configure admin theme settings on Profile \ProcessWire\page(SuperUser only)

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I re-worded that sentence, hopefully that works too (cannot see here the issue).

  • Like 1

Share this post


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

Thanks, I re-worded that sentence, hopefully that works too (cannot see here the issue).

Yep, that fixes it - thanks!

  • Thanks 1

Share this post


Link to post
Share on other sites

Only to mention: I know that AOS is not full supporting the new UIKit Theme, but I think I post it nevertheless.

With the new UIKit Theme the description of the fields that are usually shown inside an overlay will be displayed on the left side of the field too.

screenshot-www.juergen-kern.at-2017-11-10-19-42-14.png.01ec8ddfe990e59f5f37f0f03af685c0.png

The hover function works also. This is fe a description of a pagetable field. As you can see the description will be displayed in a small column on the left side.

Best regards

Share this post


Link to post
Share on other sites

I've just added a feature similar to PrevNextTabs module, creatively named as prevNextLinks :) 

It's largely based on @Macrura's module but there are some differences too:

  • links are added next to the page title which is imo less error-prone
  • on the last page the first children is linked and on the first page the last, so there are "Edit prev/next/last/first" links based on the current position
  • under the hood links are added to the DOM via JS, which made it much easier to position them and to serve all 3 admin themes (default, Reno, Uikit)
  • there is no option to exclude/include templates

aos-prevnextlinks.jpg.4015aef310150e56988e31e6d4556de6.jpg

@Juergen

Thanks, I'll have a look

  • Like 5

Share this post


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

I've just added a feature similar to PrevNextTabs module, creatively named as prevNextLinks :) 

this is great!  the only issues i see with the links being next to the title is that they will jump around from page to page, whereas if they stay in 1 place, you can click through the siblings without moving the mouse.

I like the fact that it goes back to the beginning/end also – that's helpful..

  • Like 1

Share this post


Link to post
Share on other sites

That's true but I think it wouldn't be used to quickly cycle through pages.

My first idea was to put these links before the title but that would make the title look odd, though I can change it if there's a need.

Share this post


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

My first idea was to put these links before the title

Maybe the arrows could float right next to the Save button? Besides not moving so much between pages, on the default theme it would also have the benefit of less confusion with the breadcrumb separators (which look quite similar).

2017-11-14_184202.png.302618aeb22c4bf3040bac284735c40d.png

2017-11-14_184104.png.9e4a18f05923a567b7ceb9dc64e86873.png

  • Like 2

Share this post


Link to post
Share on other sites

That would work, but there is an aos tweak to move the save btn next to the title. But perhaps prevnextlinks could be placed to the far right then, will think of it.

  • Like 3

Share this post


Link to post
Share on other sites

hello @tpr

I have discovered an issue with search box in page table field and updating the page table field via Ajax.

Before:

screenshot-www.juergen-kern.at-2017-11-14-11-21-02.thumb.png.fa23735cd7cecbc89407c31b70bbf4a1.png

The search box is there

 

After updating the page table via Ajax (a child page was edited in modal and then saved):

screenshot-www.juergen-kern.at-2017-11-14-11-22-03.thumb.png.7243aee5602337e88a75e43c162a431e.png

As you can see the search box is gone. After refreshing the page the search box is still there.

I have also troubles with this behavior by using a InputfieldPageTable::render hook (see https://processwire.com/talk/topic/17738-tip-how-to-change-the-table-headers-in-page-tables/). It seems that that the hook doesnt hook in if the field will be updated via Ajax. My attempt was to try to run this hook in init.php but I was not successful.

Share this post


Link to post
Share on other sites

Hello @tpr

If you can confirm the behavior written in the previous post, @Robin S helped me out at my similar problem to get it working. Running a slightly modificate code inside init.php instead of ready.php will solve the problem. Maybe its a solution you can also use if you can confirm this behavior. For the solution please click the link to my problem in the previous post.

Best regards

  • Like 1

Share this post


Link to post
Share on other sites

Filter boxes are added via JS so there is no hook there as I remember. Because of this the JS init code needs to be run on ajax change. I rarely use pagetables but I'll reproduce the issue somehow.

  • Like 1

Share this post


Link to post
Share on other sites

Hello @tpr

You can ignore this "bug". It was caused by a page table hook inside ready.php on my side. After changing my code it works as expected. Maybe there was some interference :(. Now my code and AOS work as expected - I am happy.:)

Share this post


Link to post
Share on other sites

Thanks, I like these kind of bug endings :)

  • Like 2

Share this post


Link to post
Share on other sites

Hi @tpr,

I've been having intermittent problems when using the save hotkey. I get the overlay but the form is not submitted. It's been happening on remote sites and on localhost, but I'm not sure exactly what version of AOS I first noticed the issue with. There are no errors in the browser console when the issue occurs. Browser is Chrome on Windows. Tricky one to debug because it only happens intermittently - just thought I'd mention it in case others have been experiencing it too.

I'm wondering if the behaviour of the save hotkey could be a little less restricting so if an issue like this does occur the interface is not locked and the save button is still accessible. Currently I have to use my browser dev tools to remove the height and width from the added pseudo-element and allow pointer events. 

Share this post


Link to post
Share on other sites

Do you have a field with html5 validation that prevents the Save action to perform? Aos triggers the Save button so this is what I can think of.

I have modified this feature a few weeks ago to trigger Save instead Publish when creating a new page but I don't think this is the culprit. I needed to modify things under the hood to take the DOM order into account, to find the Save btn first on new page.

I guess I can show the save overlay for a second and then remove.

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 Soma
      LogMaintenance
      A simple ProcessWire module to give some maintenance control over log files. I found myself often having lots of log files for different things that can grow more or less quickly to a size where they can be difficult to maintain. The built in Logger of PW does a good job of giving you the possibility to delete or prune logs. But it has to be done manually and sometimes a log grows into millions of lines, which makes it often impossible to even prune it as it's too large.
      LogMaintenance uses LazyCron to run the maintenance task and there's several settings you can setup on a global or per log basis.
      Archive: will create zip files for each log file in logs/archive/ folder and add the log each time the maintenance is run to a subfolder containing the datetime.
      Lines: keeps logs to a certain number of lines 
      Days: keeps the log to a certain number of days
      Bytes: keeps the log to a certain amount of bytes
      Each setting is checked from top down, the first setting to contain something is used. So if you check the "Archive" option, all other settings are ignored and logs are archived everytime the LazyCron is executed. If you want to keep your logs to a certain amount of bytes just leave all other settings to 0 or blank.
      Per Log Settings
      There's a textarea that you can use to setup a config for a specific log file one per line. All the logs you define here ignore the global settings above. The syntax for the settings is:
      logname:[archive]:[lines]:[days]:[bytes] 
      errors:1:0:0:0 // would archive the errors log messages:0:10000:0:0 // will prune the errors log to 10000 lines  
      The module can be found on github for you to check out. It's still fresh and I'm currently testing.
      https://github.com/somatonic/LogMaintenance
    • By teppo
      Fieldtype Page IDs is a third party Fieldtype that, simply put, stores Page references as integers (Page IDs).
      This fieldtype was built as a quick and dirty workaround for Page Reference fields' inability handle self-references due to circular reference issues. A project I've been working on for a while now includes a combination of RepeaterMatrix content blocks and tagging/categorization system that would've resulted in a lot of duplicate pages (and plenty of unnecessary manual work for content editors) had I used built-in Page Reference fields, and thus a new Fieldtype felt like the most sensible approach.
      Fieldtype Page IDs was designed to be loosely compatible with Page References in order to make conversions between the two feasible, but it is quite limited feature wise:
      largely due to the fact that stored values are actually just integers with no connection to Pages whatsoever some advanced selectors and related features are not supported, and page values can't be directly accessed configuration settings are limited to the bare essentials (selector string and Inputfield class) only a handful of Inputfields (AsmSelect, Checkboxes, Text) are (currently) supported Anyway, in case you need to store Page IDs (and Page IDs only) and are happy with the limitations mentioned above, feel free to give this Fieldtype a try. It has been working fine for me in one particular project, but hasn't been tested that much, so please tread carefully – and let me know if you run into any issues.
      GitHub repository: https://github.com/teppokoivula/FieldtypePageIDs
      Modules directory: https://modules.processwire.com/modules/fieldtype-page-ids/
    • By daniels
      This is a lightweight alternative to other newsletter & newsletter-subscription modules.
      You can find the Module in the Modules directory and on Github
      It can subscribe, update, unsubscribe & delete a user in a list in Mailchimp with MailChimp API 3.0. It does not provide any forms or validation, so you can feel free to use your own. To protect your users, it does not save any user data in logs or sends them to an admin.
      This module fits your needs if you...
      ...use Mailchimp as your newsletter / email-automation tool ...want to let users subscribe to your newsletter on your website ...want to use your own form, validation and messages (with or without the wire forms) ...don't want any personal user data saved in any way in your ProcessWire environment (cf. EU data regulation terms) ...like to subscribe, update, unsubscribe or delete users to/from different lists ...like the Mailchimp UI for creating / sending / reviewing email campaigns *I have only tested it with PHP 7.x so far, so use on owners risk
      EDIT:
      I've updated the module to 0.0.4. I removed the instructions from this forum, so I don't have to maintain it on multiple places. Just checkout the readme on github 🙂
      If you have questions or like to contribute, just post a reply or create an issue or pr on github. 
    • By bernhard
      WHY?
      This module was built to fill the gap between simple $pages->find() operations and complex SQL queries.
      The problem with $pages->find() is that it loads all pages into memory and that can be a problem when querying multiple thousands of pages. Even $pages->findMany() loads all pages into memory and therefore is a lot slower than regular SQL.
      The problem with SQL on the other hand is, that the queries are quite complex to build. All fields are separate tables, some repeatable fields use multiple rows for their content that belong to only one single page, you always need to check for the page status (which is not necessary on regular find() operations and therefore nobody is used to that).
      In short: It is far too much work to efficiently and easily get an array of data based on PW pages and fields and I need that a lot for my RockGrid module to build all kinds of tabular data.

      Basic Usage

       
      Docs & Download
      https://modules.processwire.com/modules/rock-finder/
      https://gitlab.com/baumrock/RockFinder/tree/master
       
      Changelog
      180528, v1.0.4 add custom select statement option 180516 change sql query method, bump version to 1.0.0 180515 multilang bugfix 180513 beta release <180513 preview/discussion took place here: https://processwire.com/talk/topic/18983-rocksqlfinder-highly-efficient-and-flexible-sql-finder-module/
    • By blynx
      Hej,
      A module which helps including Photoswipe and brings some modules for rendering gallery markup. Feedback highly appreciated
      (Also pull requests are appreciated 😉 - have a new Job now and don't work a lot with ProcessWire anymore, yet, feel free to contact me here or on GitHub, Im'm still "online"!)

      Modules directory: http://modules.processwire.com/modules/markup-processwire-photoswipe
      .zip download: https://github.com/blynx/MarkupProcesswirePhotoswipe/archive/master.zip
      You can add a photoswipe enabled thumbnail gallery / lightbox to your site like this. Just pass an image field to the renderGallery method:
      <?php $pwpswp = $modules->get('Pwpswp'); echo $pwpswp->renderGallery($page->nicePictures); Options are provided like so:
      <?php $galleryOptions = [ 'imageResizerOptions' => [ 'size' => '500x500' 'quality' => 70, 'upscaling' => false, 'cropping' => false ], 'loresResizerOptions' => [ 'size' => '500x500' 'quality' => 20, 'upscaling' => false, 'cropping' => false ], 'pswpOptions' => (object) [ 'shareEl' => false, 'indexIndicatorSep' => ' von ', 'closeOnScroll' => false ] ]; echo $pswp->renderGallery($page->images, $galleryOptions); More info about all that is in the readme: https://github.com/blynx/MarkupProcesswirePhotoswipe
      What do you think? Any ideas, bugs, critique, requests?
      cheers
      Steffen