Jump to content
tpr

AdminOnSteroids

Recommended Posts

I couldn't reproduce (latest Chrome and Firefox). Could you check what CSS rule is causing this? Apparently the page title is there but not visible because the page IDs are not aligned to the left. It could be also handy to see the markup of a failing pagelist item.

  • Like 1

Share this post


Link to post
Share on other sites

Well, I tested the admin with the following browsers:

Opera - Version:58.0.3135.107

Chrome - Version 73.0.3683.86 (Official Build) (64-bit)

Here is the markup of one of the hidden pages 404 Not found:

Spoiler

<div class="PageListItem PageListTemplate_404 PageListNoChildren PageListID27 PageListStatusHidden secondary PageListStatusSystem" data-numtotal="0" data-numchild="0"><a href="#" title="/http404/" class="PageListPage label"><span class="label_title" data-pid="27">404 Not Found</span></a><span class="PageListNumChildren detail"></span><ul class="PageListActions actions"><li class="PageListActionEdit"><a href="/admin/page/edit/?id=27" class="pw-modal pw-modal-large pw-modal-longclick" data-buttons="#ProcessPageEdit > .Inputfields > .InputfieldSubmit .ui-button">Edit</a></li><li class="PageListActionView"><a href="http://quebec.pw/http404/" class="pw-modal pw-modal-large pw-modal-longclick">View</a></li><li class="PageListActionNew"><a href="/admin/page/add/?parent_id=27">New</a></li><li class="PageListActionMove"><a href="#">Move</a></li><li class="PageListActionEdit"><a href="http://quebec.pw/admin/setup/template/edit?id=43" class="pw-modal pw-modal-large pw-modal-longclick" data-buttons="#ProcessPageEdit > .Inputfields > .InputfieldSubmit .ui-button">404</a></li><li class="PageListActionExtras ui-priority-secondary"><a href="#" class="clickExtras"><i class="fa fa-angle-right"></i></a></li></ul></div>

 

Here is a preview of all the rows to compare classes:

image.thumb.png.fb4ea83897b9a4dd467242d6862bc207.png

I checked a few classes and if I change the opacity from 0.6 to any number and back - it shows properly:

.PageList .PageListStatusHidden>a.PageListPage {
    opacity: .5;
}

Not sure why, but will test to remove all other modules to make sure that the issue is not caused by one of them.

P.S. To be sure it is not a local OS (Server 2016) or Browser issue, tested on another PC with Windows 10 and the result is still the same. As far as it is quite late now here, I will try to get an earlier version of the AOS and see if the issue would appear as well. Will keep you updated and thanks for checking it up.

  • Like 1

Share this post


Link to post
Share on other sites

So changing the opacity back and forth fixes it? That is weird, does it happen in incognito mode too?

Share this post


Link to post
Share on other sites

So, I've tried this morning to remove all the modules but the AOS and the hidden items still were hidden unless I move the mouse over them, but then after a page reload, they "hide" again.

I did test it in Incognito on both computers and still see the same thing.

After replacing the AOS 2.0.15 version with the 2.0.14 - it is all working fine so there must be something that is happening with the new version, but what and where is not clear yet. At least it is not related to my browser, computer and even the local server prior to the fact that it worked like a charm under 2.0.14 and it still does.

P.S. After an upgrade from 2.0.14 to 2.0.15 - the hidden pages get "hidden" again.

  • Like 1

Share this post


Link to post
Share on other sites

@adrian Is it happening for you with 2.0.14? As with me it just started doing the same issue as you've reported, however with 2.0.14 it works fine. And as I said, what is even stranger, if I remove the class for hidden items in developers mode and put it back, it starts working, so it is only on the page loading that it happens. I know I should not say that, but it is a bit of a relief as it is not local on my side and I am not going crazy. Go figure 😉

P.S. Somehow it seems like I was wrong with the assumption about 2.0.14 as well as the admin was showing properly, but I forgot that I've disabled the show ID option. So it is not working with both unfortunately and I guess until it is clear what is causing, I could just live without showing the ID beside the page.

Share this post


Link to post
Share on other sites

@tpr - while we're at it, I am been having issues with page scrolling - when there are lots of fields or templates such that the dropdown menu extends beyond the viewport height, AOS prevents me from scrolling the page to access those items towards the bottom of the list. It is due to the UiKit sticky header setting.

Share this post


Link to post
Share on other sites

Well I don't know how could I fix the long menu issue, sticky works just this way.

@MilenKo Are you also on Mac? As I know adrian also is.

  • Like 1

Share this post


Link to post
Share on other sites

@tpr Nope, I am on Windows as I've mentioned it earlier (Server 2016 & Windows 10 latest upgrades) but testing it on Linux did the same. I can test it on Mac as well but am not sure that would fix it prior to the fact that @adrian already had the issue on his one.
 a

Share this post


Link to post
Share on other sites

This has something to do that the markup is different here, there is a span.label_title around the page title's text. This has came up earlier too but I couldn't figure out why.

I googled around and found a WebKit bug that could cause this. Could you try applying this CSS? If it works via devtools, please try adding this to aos.min.css (just append to the end):

.PageList .PageListItem {
    transform: scale3d(1,1,1);
}

Or if no joy, by adding backface-visibilty: hidden. Unfortunately because I can't reproduce I can't check.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Hey @tpr I am super happy to confirm that adding the style to aos.min.css fixed the issue and now my Admin tree is back to its normal state 🙂 I guess we will see a new AOS release some time soon with the fix 😉 Thank you sincerely!

  • Like 2

Share this post


Link to post
Share on other sites

Thanks, I've added this to v2.0.16, please try. It also contains a fix for the PHP notice @Brian Peat has come across.

  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, adrian said:

when there are lots of fields or templates such that the dropdown menu extends beyond the viewport height, AOS prevents me from scrolling the page to access those items towards the bottom of the list.

I've tried setting a max height on the dropdown menus so at least they were scrollable, but unfortunately the 3rd level menus that open to the right were cut off. They are absolutely positioned so I don't think this could be fixed. Btw I really don't like how the main menu markup is built in the admin, submenus are not part of the menu markup but they are positioned there on open. A simple CSS solution would be enough I think with proper nested markup, that would allow more customization.

  • Like 1

Share this post


Link to post
Share on other sites

@tpr - don't worry about the fixed header issue - maybe just remove the option unless you can get Ryan to change how the menus are built (although that seems unlikely).

Share this post


Link to post
Share on other sites

Recently I have been trying to improve the user friendliness of various page select fields, including single select and checkboxes.

The issue comes down to the fact that if say for example you have a single checkbox, you can explain what the effect of checking that box is. But if you are using checkboxes on a page select field, there is no way to have any extended information about the option. An example of where something like this is already in use is on the Status field - each option has the title of the option, e.g. Unpublished, and then additional info, like "Not visible on site". 

Currently my solution is to use a custom inputfield that extends the primary inputfield, which extends the attributes for each option, and then use javascript for handling the display.

  • On checkboxes, adding uk-tooltip to the checkbox labels with the data-description on the option becoming the tooltip content. (see screenshot below)
  • On single selects, i have some JS replace the field description with the info about the selected option. (see screenshot).

The reason i'm posting this here is to see if there is any simpler/better way to do this, e.g. hook into the creation of the options for any page field and add the custom attributes, without having to change the inputfield type. And i thought this could be a good candidate for AOS. To better illustrate how it works, i have included some screenshots and links to the repos for the select extended and checkboxes extended.

Select Extended:

nothing selected

973404192_Edit_Page__Home__dev_fredsherry_com.jpg.71caee0ca17733e006c248505b2e73ec.jpg

Option selected, with option's description showing:

1940487017_Edit_Page__Home__dev_fredsherry_com.jpg.685d6e65881215fedd580c055dfdb19e.jpg

https://github.com/outflux3/InputfieldSelectExtended

-----

Checkboxes Extended

hovering over any option shows the option's description:

 

hover_checkboxes.png.76af25d35fcec2203d9683ef73ab1c10.png

https://github.com/outflux3/InputfieldCheckboxesExtended

  • Like 3

Share this post


Link to post
Share on other sites
9 hours ago, Macrura said:

The reason i'm posting this here is to see if there is any simpler/better way to do this, e.g. hook into the creation of the options for any page field and add the custom attributes, without having to change the inputfield type.

I was going to write a tutorial but then I thought I might as well take the next step and turn it into a module:

If @tpr wants to include the functionality in AOS and people would prefer that rather than a standalone module then I'm fine with that. 🙂

  • Like 3

Share this post


Link to post
Share on other sites

Thanks for sharing!

28 minutes ago, Robin S said:

If @tpr wants to include the functionality in AOS

That would be a good thing for sure but even better would be to add it to the core 😉 

Share this post


Link to post
Share on other sites

Hi! Small request here, just added Input Mask to integer fields tweaking a little bit of lines in the module, maybe this should be enabled by default? Anyone see any possible issues, maybe on number type inputs? I think it's the type of field where it is particularly useful so you can filter nicely with selectors. (think of a price field)

Share this post


Link to post
Share on other sites

I don't use this feature very much but if you feel it would make a useful addition, create a PR (or show the changes in other ways) and I'll check.

  • Like 1

Share this post


Link to post
Share on other sites

Hi @tpr

I have z-index issue with UIkit Sticky header being on. input.InputfieldDatetimeDatepicker has a higher z-index than the header. I quick fixed it with  #pw-mastheads {z-index:11 !important;} but I'm not quite sure what to do.

Share this post


Link to post
Share on other sites

Thanks, I just used the z-index: 11 you suggested in v2.017. There's a very high z-index on the datepicker calendar div added by AOS that was needed back then. This is still above the masthead on scroll but I think it's better not to change that.

There's also a bunch of new CKEditor plugins added in this version: 

  • Color Button
  • Color Dialog
  • Table Resize
  • Table Tools
  • Table Tools Toolbar
  • Like 2

Share this post


Link to post
Share on other sites

@tpr, would you consider adding an exclude class to the "Autosize textareas according to content" feature? Generally I like this feature but I have some modules with textareas in their config that contain a lot of content and would like to be able to exclude these from being autosized. So I was thinking there could be some special class that can be applied to textareas (e.g. "no-autosize") and the AOS feature when enabled would apply to all textareas without this class. What do you think?

  • Like 1

Share this post


Link to post
Share on other sites

There already is one, the textarea selector is "textarea:not(.noAutosize)". I haven't checked it yet but in theory it should work. Otherwise you could apply a max-height with CSS that could also help, or perhaps setting the height with !important.

  • Like 3

Share this post


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

There already is one, the textarea selector is "textarea:not(.noAutosize)". I haven't checked it yet but in theory it should work.

Works great, thanks.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By eelkenet
      Hi! I've created a small Inputfield module called InputfieldFloatRange which allows you to use an HTML5 <input type="range" ../> slider as an InputField. I needed something like this for a project where the client needs to be able to tweak this value more based on 'a feeling' than just entering a boring old number. Maybe more people can use this so I'm hereby releasing it into the wild.  
       
      What is it?
      The missing range slider Inputfield for Processwire. 
      What does it do?
      This module extends InputfieldFloat and allows you to use HTML5 range sliders for number fields in your templates.
      It includes a visible and editable value field, to override/tweak the value if required.  
      Features
      Min/max values Precision (number of decimals) Steps (Read more) Manual override of the selected value (will still adhere to the rules above) Usage
      Clone / zip repo Install FieldtypeFloatRange, this automatically installs the Inputfield Create new field of type `Float (range)` or convert an existing `Float`, `Integer` or `Text` field. To render the field's value simply echo `$page->field` Demo
      A field with Min=0, Max=1, Step=0.2, Precision=2

      Field with settings Min=0, Max=200, Step=0.25, Precision=2

       
      Todo
      Make the display-field's size configurable (will use the Input Size field setting)  Hopefully become redundant If it's usable for others I'll add it to the Modules list  
      Changelog
      v002
      - Fix issue where setting the step value to an empty value created problem with validation
      - Make the display-field optional 
      v001
      - Initial release
       
      Thanks!
       
       
    • By Robin S
      Another little admin helper module...
      Template Field Widths
      Adds a "Field widths" field to Edit Template that allows you to quickly set the widths of inputfields in the template.

      Why?
      When setting up a new template or trying out different field layouts I find it a bit slow and tedious to have to open each field individually in a modal just to set the width. This module speeds up the process.
      Installation
      Install the Template Field Widths module.
      Config options
      You can set the default presentation of the "Field widths" field to collapsed or open. Field widths entered into the Template Field Widths inputfield are only applied if the Edit Template form is submitted with the Template Field Widths inputfield in an opened state. "Collapsed" is the recommended setting if you think you might also use core inputs for setting field widths in a template context. You can choose Name or Label as the primary identifier shown for the field. The unchosen alternative will become the title attribute shown on hover. You can choose to show the original field width next to the template context field width.  
      https://github.com/Toutouwai/TemplateFieldWidths
      https://modules.processwire.com/modules/template-field-widths/
    • By adrian
      Tracy Debugger for ProcessWire
      The ultimate “swiss army knife” debugging and development tool for the ProcessWire CMF/CMS

       
      Integrates and extends Nette's Tracy debugging tool and adds 35+ custom tools designed for effective ProcessWire debugging and lightning fast development
      The most comprehensive set of instructions and examples is available at: https://adrianbj.github.io/TracyDebugger
      Modules Directory: http://modules.processwire.com/modules/tracy-debugger/
      Github: https://github.com/adrianbj/TracyDebugger
      A big thanks to @tpr for introducing me to Tracy and for the idea for this module and for significant feedback, testing, and feature suggestions.
    • By adrian
      This module allows you to automatically rename file (including image) uploads according to a configurable format
      This module lets you define as many rules as you need to determine how uploaded files will be named and you can have different rules for different pages, templates, fields, and file extensions, or one rule for all uploads. Renaming works for files uploaded via the admin interface and also via the API, including images added from remote URLs.   Github: https://github.com/adrianbj/CustomUploadNames
      Modules Directory: http://modules.processwire.com/modules/process-custom-upload-names/
      Renaming Rules
      The module config allows you to set an unlimited number of Rename Rules. You can define rules to specific fields, templates, pages, and file extensions. If a rule option is left blank, the rule with be applied to all fields/templates/pages/extensions. Leave Filename Format blank to prevent renaming for a specific field/template/page combo, overriding a more general rule. Rules are processed in order, so put more specific rules before more general ones. You can drag to change the order of rules as needed. The following variables can be used in the filename format: $page, $template, $field, and $file. For some of these (eg. $field->description), if they haven't been filled out and saved prior to uploading the image, renaming won't occur on upload, but will happen on page save (could be an issue if image has already been inserted into RTE/HTML field before page save). Some examples: $page->title mysite-{$template->name}-images $field->label $file->description {$page->name}-{$file->filesize}-kb prefix-[Y-m-d_H-i-s]-suffix (anything inside square brackets is is considered to be a PHP date format for the current date/time) randstring[n] (where n is the number of characters you want in the string) ### (custom number mask, eg. 001 if more than one image with same name on a page. This is an enhanced version of the automatic addition of numbers if required) If 'Rename on Save' is checked files will be renamed again each time a page is saved (admin or front-end via API). WARNING: this setting will break any direct links to the old filename, which is particularly relevant for images inserted into RTE/HTML fields. The Filename Format can be defined using plain text and PW $page variable, for example: mysite-{$page->path} You can preserve the uploaded filename for certain rules. This will allow you to set a general renaming rule for your entire site, but then add a rule for a specific page/template/field that does not rename the uploaded file. Just simply build the rule, but leave the Filename Format field empty. You can specify an optional character limit (to nearest whole word) for the length of the filename - useful if you are using $page->path, $path->name etc and have very long page names - eg. news articles, publication titles etc. NOTE - if you are using ProcessWire's webp features, be sure to use the useSrcExt because if you have jpg and png files on the same page and your rename rules result in the same name, you need to maintain the src extension so they are kept as separate files.
      $config->webpOptions = array(     'useSrcExt' => false, // Use source file extension in webp filename? (file.jpg.webp rather than file.webp) ); Acknowledgments
      The module config settings make use of code from Pete's EmailToPage module and the renaming function is based on this code from Ryan: http://processwire.com/talk/topic/3299-ability-to-define-convention-for-image-and-file-upload-names/?p=32623 (also see this post for his thoughts on file renaming and why it is the lazy way out - worth a read before deciding to use this module). 
       
       
      NOTE:
      This should not be needed on most sites, but I work with lots of sites that host PDFs and photos/vectors that are available for download and I have always renamed the files on upload because clients will often upload files with horrible meaningless filenames like:
      Final ReportV6 web version for John Feb 23.PDF

×
×
  • Create New...