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

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 flydev
      PulsewayPush
      Send "push" from ProcessWire to Pulseway.
       
      Description
      PulsewayPush simply send a push to a Pulseway instance. If you are using this module, you probably installed Pulseway on your mobile device: you will receive notification on your mobile.
      To get more information about Pulseway, please visit their website.
      Note
      They have a free plan which include 10 notifications (push) each day.
       
      Usage
      Install the PulsewayPush module.
      Then call the module where you like in your module/template code :
      <?php $modules->get("PulsewayPush")->push("The title", "The notification message.", "elevated"); ?>  
      Hookable function
      ___push() ___notify() (the two function do the same thing)
       
      Download
      Github:  https://github.com/flydev-fr/PulsewayPush Modules Directory: https://modules.processwire.com/modules/pulseway-push/  
      Examples of use case
      I needed for our work a system which send notification to mobile device in case of a client request immediate support. Pulseway was choosen because it is already used to monitor our infrastructure.
      An idea, you could use the free plan to monitor your blog or website regarding the number of failed logins attempts (hooking Login/Register?), the automated tool then block the attacker's IP with firewall rules and send you a notification.
       

       
      - - - - - - - - - - - - - -
      11-22-2017: added the module to the modules directory
       
    • By netcarver
      Part 1 of a 2 part Module & Service Reveal.
      I'm currently working on a new module: ModuleReleaseNotes that was inspired by the work I originally did on making Ryan's ProcessWireUpgrades module "release" aware. In the end, I decided to ditch the approach I was originally taking and instead work on a module that hooked in to the UpgradeConfirmation dialog and the module edit page.
      Aims
      My aims for this module are as follows...
      Make discovery of a module's changes prior to an upgrade a trivial task. Make breaking changes very obvious. Make reading of a module's support documentation post-install a trivial task. Make module authors start to think about how they can improve the change discovery process for their modules. Make sure the display of information from the module support files/commit messages doesn't introduce a vulnerability. Looking at these in turn...
      Making discovery of a module's changes prior to upgrade a trivial task.
      This is done by adding a "What's changed section" to the upgrade confirmation dialog.  This section takes a best-effort approach to showing what's changed between the installed version and the updated version that's available via the module repository.
      At present, it is only able to talk to github-hosted repositories in order to ask them for the release notes, the changelog file (if present) and a list of commits between the git tag that matches the installed version and the tag matching the latest version.
      It will display the Release Notes (if the author is using the feature), else it will display the commits between the tags (if tagging is used by the module author) else it will show the changelog file (if present) else it will show the latest N commits on the master branch (N, of course, being configurable to your liking.)
      An example of the Github Release Notes pulled in for you, taken from Mike Rockett's TextformatterTypographer Module...

      An example of a tag-to-tag commit list from the same module...

      An example of a changelog - formatted to show just the changes (formatting styles will change)...

      Finally, an example of a fallback list of commits - sorry Adrian ...

       
      Making breaking changes obvious.
      This is currently done by searching for a set of configurable search strings. Later versions may be able to support breaking change detection via use of Semantic Versioning - but this may require some way of signalling the use of this versioning standard on a module-by-module basis.
      For now, then, you can customise the default set of change markers. Here I have added my own alias to the list of breaking change markers and the changes section of the changelog is styled accordingly (these will be improved)...

       
      Make reading of a module's support documentation, post-install, a trivial task.
      This is done by making some of the support files (like the README, CHANGELOG and LICENSE files) readable from the module's information/settings screen. There is an option to control the initial open/closed state of this section...

      Here is Tracy's README file from within the module settings page... 

       
      Make module authors start to think about how they can improve the change discovery process for their modules.
      There are notes in each of the sections displayed on the upgrade confirmation page that help authors use each of the features...

       
      Make sure display of external information doesn't introduce a vulnerability.
      This is an ongoing concern, and is the thing that is most likely to delay or prevent this module's release lead to this module's withdrawl should a vulnerability be found. Currently, output is formatted either via Markdown + HTML Purifier (if it was originally a Markdown file) or via htmlspecialchars() if it has come from a plaintext file.
      If you discover a vulnerability, please get in contact with me via the forum PM system.
       
      Ongoing...
      For now, I've concentrated on integration with GitHub, as most people use that platform to host their code. I know a few people are hosting their repositories with BitBucket (PWFoo comes to mind) and some with GitLab (Mike Rockett?) and I would eventually like to have adaptor implementations for these providers (and perhaps GitKraken) - but for now, GitHub rules and the other hosts are unsupported.
       
      Links
      Github: ModuleReleaseNotes
      PW Module Repository: Here
    • By FrancisChung
      Hi,
      I was wondering if anyone knew what this did? 

      If so, do you know what modules it actually impacts? Is there another log that lists the action it took?

      I'm having some weird problems with PHP duplicate declaration per link below, since this module was run.
       
       
    • By Macrura
      Field Descriptions Extended
      This module enables you to extend field descriptions by dividing short descriptions with a longer text that is revealed in a toggle.
      Github: https://github.com/outflux3/FieldDescriptionsExtended
      Extending your field descriptions using the standard field's description field.
      Once this module is installed, it will automatically search your description field for the presence of 5 dashes (-----).
      Any content above the 5 dashes will be visible and the content below the dashes will be hidden. A 'More...' link will appear at the end of the short description which when clicked will reveal the rest of the description.
      Using Simple Markdown Editor with the description field
      If you have Simple Markdown Editor (InputfieldSimpleMDE) installed, you can enable the field description to have that editor.
      *When using Simple MDE, you can use the button (Insert Horizontal Line) instead of typing 5 dashes. More about SimpleMDE.
      Extending your field descriptions using content from a ProcessWire Page for the field description.
      You may use the content from a ProcessWire page as a field description. This would allow you to easily insert images, links, and use hanna codes.
      To use page content for your field descriptions, please follow these instructions:
      Install Select Fields module (FieldtypeFields) http://modules.processwire.com/modules/fieldtype-fields/ Create a new field using this field type, e.g. field_select. Add the field to any template you will be using for your field descriptions. Setup your help pages (for example under a settings branch) where you will store the field description content,using the template containing the Field Select. Add content to a page and select the field where that content should show. To show a short text before the link to the longer content, separate them with 5 dashes Be sure to update your settings on this page, first enable page content descriptions,then specify the name of the Select Fields field, template to search, and content field. If you create a field description using this method, please note that the description field must be blank for contexts where you want the page content to appear.
      You can freely use template context for field descriptions, but the Page Content method is not context sensitive and will display under all contexts where the description is blank.
      ----
      original post:
      This is a new module, hope to release soon, which allows extended field descriptions, in currently 2 ways.
      The main feature of the module is that you can have a short description and then a 'more...' link which drops down a longer block of text.
      This is achieved by separating the intro/visible text and the rest with 5 dashes.

      Example setup:

      the 2nd way is if you are using AdminThemeUiKit, you can show extended field instructions in a panel. The content of the panel is edited on a regular PW page. This use case would probably not be that common, but if you had a field that required some extended instructions for how to use, this could be useful; Also, since this allows you to target information and instructions down at the field level, it could reduce the amount of documentation needed on a global level, since it is a lot more context targeted.

    • By blynx
      Hej,
      A module which helps including Photoswipe and brings some modules for rendering gallery markup. Feedback highly appreciated

      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