tpr

AdminOnSteroids

Recommended Posts

4 minutes ago, tpr said:

For ckeditor there is already a Maximize plugin in aos (ckeaddons).

i am quite busy those days so i missed that ;)

6 minutes ago, tpr said:

As for the other fields the biggest issue is the button placement, or finding another solution to trigger.

yeah i was not sure about that as well. i thought of placing it beside the open/close toggle of the field label.

Share this post


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

For ckeditor there is already a Maximize plugin in aos (ckeaddons).

Hi @tpr Should ctrl+S/command+S trigger the save action in the maximized view as well? It does not work for me on Mac/Chrome.

Share this post


Link to post
Share on other sites

It seems that the Maximize plugin replaces the DOM entirely and there's no Save button at all. My only idea is to trigger a click on the pushed Maximize button which works, though the transition to the non-maximized state is visible for a few milliseconds.

  • Like 1

Share this post


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

...non-maximized state is visible for a few milliseconds

Better than nothing :) It would be awesome if you could add it.

Share this post


Link to post
Share on other sites

Thanks! Save works but it cannot re-maximize it afterwards. At first I got a PW error notification which said something like: "body field could not be found" (I do not have the exact message) but after that it just fails without any error in sight.

Share this post


Link to post
Share on other sites

No idea what is happening there :) No errors here on latest PW dev and latest AOS, default and Reno themes. Cache?

Edit: have you added CKEditor buttons to the body field before AOS? Sometimes that can cause JS errors, re-saving the field usually helps.

  • Like 1

Share this post


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

Edit: have you added CKEditor buttons to the body field before AOS? Sometimes that can cause JS errors, re-saving the field usually helps.

Thanks for the tip, sadly it did not work :( Anyway, I only use/used AOS to mod the editor.

I cleared the cache, tried it in Firefox too, and it does save the page so it is the new JS at work, it just cannot do maximize at the end. No JS error in the console either. Worst kinda issue...

Share this post


Link to post
Share on other sites

I may not understand it correctly but it sounds that the page you are editing is not reloaded after ctrl+s. On reload everything should start clean so no idea how this could fail.

Anyway I committed the update (no version change), plus made ctrl+s work in cases when the page is opened in a modal, eg. when using FEEL or perhaps the bult-in front-end editor.

Share this post


Link to post
Share on other sites

I updated to AOS 1.3.6, nothing has changed (as expected). This is what happens:

Edit: screenshot was removed because of privacy concerns.

Share this post


Link to post
Share on other sites

Thanks, but it seems OK to me, at least I can't see the issue on the gif. So at the end of the video if you click on the Maximize button nothing happens? My best guess is that you expect the editor to re-maximize automatically which is not the case.

I've installed SystemNotifications module and disabled all other submodules of AOS but it's still working as expected here (on "expected" I mean what I expect :)).

If you think it's still an issue and could provide a login to me to check, that would be great (or install a new PW instance for me to check, it's a few minutes using Soma’s Online Installer)

Share this post


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

My best guess is that you expect the editor to re-maximize automatically which is not the case.

Yes, I do. Oh well, then it was just a misunderstanding.

So you mean it is not possible to re-maximize it automatically? The idea here is to work in maximized mode only, not being distracted (too much) by periodic saves.

Share this post


Link to post
Share on other sites

AOS triggers the save button only, what you need would be ajax save which is harder to implement. Maybe I'll check it some day though.

Of course I could find a way to Maximize after ctrl+s but I'm not sure this won't be a nuissance.

  • Like 1

Share this post


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

I'm not sure this won't be a nuissance.

Not sure either, however, the feature in its current state could be "improved" that way. After all, now we have to do it manually. Maybe an option in the Settings for those who want it to "stay" maximized?

Share this post


Link to post
Share on other sites

I think the time I could invest in this workaround could be spent on adding ajax save to ckeditor :)

  • Like 1

Share this post


Link to post
Share on other sites

Hi @tpr

I have found one small issue with CKEditor plugins, didn't find any mentioning in this threed, but maybe you are alreade aware about it. 

If field is just in a page all additional plugins are loaded and initilated, but if field is inside of matrix/repeater field with ajax loading. After opening of collapsed item CKEditor in it is initializing just with plugins set in field settings.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, got it sorted out, now it works with Repeaters and ajax-loaded fields, need to check with RepeaterMatrix too. Will update the module later if all goes well.

aos-ckeaddons-repeater-ajax.gif.e3a70bc22f25a74ab4e18fb55c982e49.gif

Share this post


Link to post
Share on other sites

Sneak preview of draggable column splitter when using AOS admin columns:

aos-column-splitter.gif.3017d341279e382c69f3fc35b332aabc.gif

  • Like 6

Share this post


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

Sneak preview of draggable column splitter when using AOS admin columns:

Does it remember the widths on a refresh or on a new session?

Share this post


Link to post
Share on other sites

Draggable column width looks awesome, but at the moment I am getting this:

58d40f8b552f7_ScreenShot2017-03-23at11_09_24AM.png.bfa9150345ad20a63ff7309010740887.png

 

Share this post


Link to post
Share on other sites

Yep, sorry for that, should be fixed in v138.

  • Like 1

Share this post


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

Yep, sorry for that, should be fixed in v138.

Thanks, it works now, but it no longer honors the width setting defined in the template. I have it set to 50%, but now it starts about 70 / 30. It might also be nice if it were optional - in some cases it will be a great addition, but sometime it's just a superfluous bit of UI. Please don't take that the wrong way - it really will be awesome in many cases.

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 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
    • By mtwebit
      Tasker is a module to handle and execute long-running jobs in Processwire. It provides a simple API  to create tasks (stored as PW pages), to set and query their state (Active, Waiting, Suspended etc.), and to execute them via Cron, LazyCron or HTTP calls.
      Creating a task
      $task = wire('modules')->Tasker->createTask($class, $method, $page, 'Task title', $arguments); where $class and $method specify the function that performs the job, $page is the task's parent page and $arguments provide optional configuration for the task.
      Executing a task
      You need to activate a task first
      wire('modules')->Tasker->activateTask($task); then Tasker will automatically execute it using one of its schedulers: Unix cron, LazyCron or TaskerAdmin's REST API + JS client.
      Getting the job done
      Your method that performs the task looks like
      public function longTask($page, &$taskData, $params) { ... } where $taskData is a persistent storage and $params are run-time options for the task.
      Monitoring progress, management
      The TaskerAdmin module provides a Javascript-based front-end to list tasks, to change their state and to monitor their progress (using a JQuery progressbar and a debug log area). It also allows the on-line execution of tasks using periodic HTTP calls performed by Javascript.

       
      Monitoring task progress (and log messages if debug mode is active)

       
      Task data and log

      Detailed info (setup, task dependencies, time limits, REST API etc.) and examples can be found on GitHub.
      This is my first public PW module. I'm sure it needs improvement