tpr

AdminOnSteroids

Recommended Posts

2 hours ago, tpr said:

Took some time why it's not working there but finally found it

Thank you - awesome to have!

 

2 hours ago, tpr said:

I've checked the new UIkit theme and it's not bad. From AOS pov I saw only the language switcher that is misplaced but surely there are others too.

The main thing I am missing at the moment is the full row hover :)

And the position of the "Disable AdminOnSteroids" link is driving me a little crazy :D

A couple of other things I have noticed:

  • There is no support for the stick header/nav when using the traditional layout option. In sidebar mode it is built into the theme, but I don't like the iframe implementation.
  • There is a weird layout issue with AOS on - note the doubled and missing borders on these elements
    59d0f7eca8f97_ScreenShot2017-10-01at7_12_22AM.png.628bc1f9df9d45728c50035314dc561c.png
    59d0f8b15faec_ScreenShot2017-10-01at7_15_57AM.png.ff0ce220b01bf22b1ce6e173501c3941.png

 

Thanks for all your work on this!

  • Thanks 1

Share this post


Link to post
Share on other sites

I noticed an issue when AOS is enabled.  The collapsed fieldsets aren't fully expanded.

59d0fad29648d_EditPageAboutUspwoliver.test2017-10-0109-24-37.jpg.852e55d8b0927d82f1e3120cdc2af65c.jpg

 

In Chrome dev tools, you can hover over the "label" html element to see it.  I think it has something to do with this rule:

.aos_hasTooltip .title, .InputfieldCheckbox label {
    position: relative;
    display: inline-block;
}

I also noticed on those fieldsets, the AOS tooltip popup isn't working.  Nothing pops up to show the edit field links.  If I find a solution, I'll report back.

Hope that helps,

-Glenn

 

  • Like 1

Share this post


Link to post
Share on other sites

Sorry, it looks like those fields are collapsed ajax loaded fields, not fieldsets.  So to summarize:

  1. Field Initially Collapsed - Field set to Open when populated, closed when blank = works good, span full width and tooltips appear when hovered
  2. Field Initially Collapsed - Field set to Open when populated + Closed when blank + Load only when opened (AJAX)  = doesn't work, only spans the width of the label, tooltip doesn't appear when hovered.

I think the type matters here as well, I think I'm seeing the problem only on InputfieldCheckbox fields.

Share this post


Link to post
Share on other sites
On 10/04/2017 at 3:37 PM, Robin S said:

@tpr, is it possible to have the ListerTweaks submodule activated (to get the benefits of the "Lister options" section) without the submodule interfering with the columns of the Find and Users lister? Even after emptying the "Users lister columns" it shows "DEFAULTS" and prevents columns being added within the columns tab of the Users lister itself. Could there be checkboxes to turn off the column options within AOS?

@tpr, just following up a request from a while back. I think this is similar to the issue @szabesz raised the other day - it affects both the core Lister and Lister Pro. I'd like to keep the Lister tweaks active in AOS because the "Show action buttons on hover" is handy but I'd like to have a way to turn off the fixed selection of columns. I think if the columns AsmSelect is empty for a Lister then AOS should take that as meaning "do nothing to this Lister's columns".

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Robin S said:

I think if the columns AsmSelect is empty for a Lister then AOS should take that as meaning "do nothing to this Lister's columns".

Also, it should be pointed out so that we do not miss it. And another idea is to somehow "throw" a warning when someone on Lister Pro's config screen is trying to set the columns with AOS in effect. When I have the time I can let @tpr work on development site so that he can test such a feature but currently I'm just to busy...

Share this post


Link to post
Share on other sites

Hi,

After upgraded to the latest version, I found that the CKeditor doesn't work anymore. I got the following error as the attached image shows.

Gideon

 

2017-10-03 16-45-41 的螢幕擷圖.png

Share this post


Link to post
Share on other sites

I assume you're using CKEaddons plugins. If so, what plugins?

Are you using FieldOverrides? If so, what are your settings?

Share this post


Link to post
Share on other sites

I updated mine to 1.6.0 and CKEAddons is not showing up on the list anymore. See screenshot.

Screen Shot 2017-10-04 at 12.57.03 PM.png

Share this post


Link to post
Share on other sites

Have you enabled it on top? I guess I need to make the top submodule chooser more obvious.

Share this post


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

Have you enabled it on top? I guess I need to make the top submodule chooser more obvious.

Have a look at my vidcap below. Did I miss anything?

 

aos-cke.gif

Share this post


Link to post
Share on other sites

Thanks, it's a bug, insert this after this line until the next update:

$fsetCKE->add($f);

 

Share this post


Link to post
Share on other sites

I've just uploaded v1.6.1 that contains the CKEaddon config fix and also some minor AdminThemeUikit fixes.

I've also modified ListerTweaks to allow empty asmSelects. I'm not sure about this line but I guess it's needed to clear previous lister sessions.

  • Like 2

Share this post


Link to post
Share on other sites

I'd like to make some suggestions about this module, after having used it/installed it and setup on a lot of sites recently:

1) I believe that the module should default to everything off. Many of the changes that this module makes to the admin are potentially breaking, or may totally confuse non tech-savvy clients. I would rather be able to install this, and enable 1 feature at a time and then test each enabled feature.

2) In terms of defaults, i believe the CK editor skin should default to 'default' not to lightwire; because since default is the default, why not let users decide if they want to change to lightwire, instead of assuming they want it.

Also, i wouldn't include any plugins by default, especially not justify - one a site i just installed AOS on, it was showing 3 entire sets of text alignment icons in the editor; by removing that plugin, this has reverted to normal behavior.

3) with nav items, that is certainly an awesome feature, and allows you to make a lot of cool shortcuts in the sidebar, also having the option to group some into their own submenu is cool - would be even better if the submenu could be above pages so that you could put your custom shortcuts into it's own top level menu, like "Site" or "Company"; I'm not fully understanding why the menu items have 2 areas, one that links to a bookmark and one that links to the editor; it is very clever that by selecting a page, it knows you mean edit the page (not view); my clients are so technically handicapped that even having 2 areas of a menu item will probably cause a meltdown. Ideally clicking on the item would just take them to the edit page, or maybe there can be some setting for this in case other users like that dual menu item functionality...

thanks for considering!

  • Like 1

Share this post


Link to post
Share on other sites

Sounds good to me. In fact the default setting were important to me until the feature to import settings.php weren't introduced (see the bottom of AOS config page).

For the nav items I could tweak it to enable edit links only for superuers.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

right - cool, so for superusers leave the left = bookmark, right edit icon = edit, but for non-super users, clicking it just goes to edit?

Share this post


Link to post
Share on other sites

Almost, non-superusers will have only the bookmark and no edit (right) link.

Share this post


Link to post
Share on other sites

maybe leave as is? Me and my superusers only need edit...no bookmark

Share this post


Link to post
Share on other sites
On 05/10/2017 at 9:11 AM, tpr said:

I've also modified ListerTweaks to allow empty asmSelects. I'm not sure about this line but I guess it's needed to clear previous lister sessions.

That line that you weren't sure about is preventing the adding or removing of columns from the Users lister. I think you should be able to remove the else{} part because if there are no columns specified in the AOS config then you don't need to do anything to the Lister columns.

Also, it would be a little more efficient not to even hook ProcessPageLister::execute when both column AsmSelects are empty in the AOS config...

if (
    in_array($subModule, $enabledSubmodules) &&
    (!isset($_SERVER['HTTP_REFERER']) || strpos($_SERVER['HTTP_REFERER'], '?bookmark=') === false) && 
    // No need for hook if no tweaks in config
    (!empty(self::$configData['ListerTweaks_find']) || !empty(self::$configData['ListerTweaks_users']))
) { 
    // ...

 

  • Thanks 1

Share this post


Link to post
Share on other sites

I was experimenting with replacing the PW logo. The implementation is kind of a brute force but I don't think there's a better way atm.

brandinglogo.png.ca395b95709dc4fe1276bf6a94355330.png

  • Like 1

Share this post


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

How exactly? Perhaps yours is not that bf

Oh yes it is! :P 

As I use the admin's login form as a public login form (just redirecting frontend users to another page) it was crucial to change the logo...

#logo {
    display: none;
    margin-top: 6px;
} 
//replacing the logo:
var logo_o = $("#branding #logo");
logo_o.attr("href", "/");
var innerHtml_str = logo_o.html();
var updated_str = innerHtml_str.replace("/wire/modules/AdminTheme/AdminThemeReno/styles/images/", "/site/templates/admin/");
logo_o.html(updated_str);
logo_o.show(); //made hidden by display: none; so we need to turn it on. This is to prevent flashing.

I hope that's all. I did it some time ago....

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks. I used php string replace and some css but I think it's just about the same level of hacky workaround :)

  • Like 1

Share this post


Link to post
Share on other sites

@tpr Morning!

I have a question about Save on crtl+s (which is command+s on macOS, BTW): from this morning on I need keep it off as I kept accidentally publishing new pages which should not be published yet, it is because the action is not Save but rather Publish and I got used to it forgetting not to do it when I should not publish the page.

So the question is: is it possible take into account the status of the page and do "Save + Keep Unpublished" when it is Unpublished? 

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