tpr

AdminOnSteroids

Recommended Posts

Yes, that's an issue that needs some thinking. Do you think globally disabling to remember position would be enough?

Also now all splitters share the same splitter setting which is probably not suitable for everyone. I guess I can fix this easily though.

Another idea borrowed from file managers to use double click on the splitter to restore the default position. So you can drag it freely and it would be remembered but you could restore defaults when needed.

  • Like 1

Share this post


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

Do you think globally disabling to remember position would be enough?

I think the key thing is that when there is no position stored in LocalStorage, it should use the field's width setting (default or template context override) as it did before.

22 minutes ago, tpr said:

Another idea borrowed from file managers to use double click on the splitter to restore the default position. So you can drag it freely and it would be remembered but you could restore defaults when needed.

Yeah, something like that sounds good.

 

Share this post


Link to post
Share on other sites

Ok, all shoud be fine in v139. One thing that I removed is the drag handler icon. I couldn't find a way to show it nicely so now the only thing that indicates the splitter is the mouse cursor.

There was an issue with the splitter's height too. Now it's set by JS because I didn't want to go flex and risk breaking other things.

From the docs:

Quote

From v137 columns are resizable by dragging the gutter between the columns. The splitter position is remembered per template and per user. Double-click on the splitter to restore the default position (set at aos_column_break field's "Column Width" setting, or defaults to the module's default value).

This feature is not available inside tabs.

 

  • Like 1

Share this post


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

Ok, all shoud be fine in v139. One thing that I removed is the drag handler icon. I couldn't find a way to show it nicely so now the only thing that indicates the splitter is the mouse cursor.

There was an issue with the splitter's height too. Now it's set by JS because I didn't want to go flex and risk breaking other things.

Looks and works great now - thanks!

  • Like 1

Share this post


Link to post
Share on other sites

Hi @tpr,

I just noticed that the position of the restore icon for PageListSelect looks a bit off when the field is inside a repeater:

2017-03-24_170618.png.8c9a4919926dc187684f97a1b34786ad.png

Share this post


Link to post
Share on other sites

hi tpr, the draggable devider looks great. would it be possible to add this feature also to the core pw-panel?

Share this post


Link to post
Share on other sites

What panel do you think of?

Share this post


Link to post
Share on other sites

I'm talking about the built in panel. Just add the class "pw-panel pw-panel-right" to a link and it opens in a sidebar panel like this:

58d528220521d_2017-03-2415_04_11-Akquiseliste.thumb.png.85d447c5c6d8d5c1593b6b45f332268c.png

It's similar to the modal, but newer and i prefer it over modals. It's great to open PDFs for a preview for example. Or to open items in my datatables.

See \wire\modules\Jquery\JqueryUI\panel.js for details. Would be awesome to make those panels draggable :) 

Share this post


Link to post
Share on other sites

The "Tree" panel is already draggable here, and also the "View page" panel.

But it's a different thing than in case of columns, here you only resize one element.

  • Like 1

Share this post


Link to post
Share on other sites
On 24.3.2017 at 3:32 PM, tpr said:

The "Tree" panel is already draggable here, and also the "View page" panel.

But it's a different thing than in case of columns, here you only resize one element.

thanks for making me aware of this! works only on left-aligned panels though... https://github.com/processwire/processwire/blob/50f2834a0ae2a9f9f2ac53439184ebdc04db2f54/wire/modules/Jquery/JqueryUI/panel.js#L411-L432

better than nothing :)

 

Share this post


Link to post
Share on other sites

Handy shortcuts to edit translations in a textdomain file in other languages in the upcoming version:

aos-translator-links.png

  • Like 2

Share this post


Link to post
Share on other sites

The abovementioned feature is available in v141, plus a new CKEditor plugin Indent Block and some minor updates.

  • Like 4

Share this post


Link to post
Share on other sites

@tpr, I often want to work with system templates. Examples being:

  • Add fields to the user template, and want easy access to the template from the admin menus or without having to set the "Show system templates" filter in the templates list.
  • When editing a field, add that field to the template of a repeater field.

Normally to do stuff like this you have to have $config->advanced = true in /site/config.php, but I don't want the risk of messing up the other things that this setting exposes. So I looked at making system templates visible through hooks and came up with this:

// Show system templates
$this->addHookBefore('ProcessField::buildEditFormInfo', function($event) {
    // Show system templates in templates list of Edit Field
    $this->wire('config')->advanced = true;
});
$this->addHookBefore('ProcessTemplate::executeNavJSON', function($event) {
    // Show system templates in admin menu
    $this->wire('config')->advanced = true;
});
$this->addHookAfter('Session::loginSuccess(roles=superuser)', null, function($event) {
    // Show system templates in templates list unless explicitly hidden
    $this->wire('session')->set('ProcessTemplateFilterSystem', 1);
});

Is this something you think would be a good option to add to AOS?

  • Like 2

Share this post


Link to post
Share on other sites
7 minutes ago, Robin S said:

would be a good option to add to AOS

+1 :)

Share this post


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

Is this something you think would be a good option to add to AOS?

Sure, I'll have a look later. 

 

8 hours ago, Robin S said:

$this->addHookAfter('Session::loginSuccess(roles=superuser)', null, function($event) {

This "(roles=superuser)" is new to me. Is there somewhere I can read more about this (and similar tricks)?

Share this post


Link to post
Share on other sites

@tpr, another idea/request: if the "permanent delete" option for Page List is checked then there is also an option to permanently delete the page from the Delete tab of Page Edit.

2017-04-03_103048.png.1b4254c7495135eb2f4c35b628366bcb.png

Thanks!

  • Like 2

Share this post


Link to post
Share on other sites

How about:

Confirm to move to Trash        Permanently delete instead

to make it less confusing?

Share this post


Link to post
Share on other sites

Hey @tpr - as I mentioned here: https://github.com/ryancramerdesign/AdminThemeUikit/issues/20, the icons only PageList option doesn't work in the UiKit theme sidebar. Now maybe Ryan will add this option to the core, but if not, it would be good to get fixed in AoS. Also, the full width hover links don't work. And also wondering if you can make an icon for the template link in the PageList - this would also help with allowing the width of the sidebar to be narrower.

I understand that the UiKit theme is still a moving target, so just ideas for you at the moment :)

Share this post


Link to post
Share on other sites

I'll have a look on the above issues/requests later, nowadays I'm busy with a 4.04 kg newborn who thinks he can steal all the hours in a day (and night) :) 

  • Like 7
  • Thanks 1

Share this post


Link to post
Share on other sites
1 minute ago, tpr said:

4.04 kg newborn

That sounds like a baby on steroids!!! :D:D

Congratulations! ^-^

  • Like 3

Share this post


Link to post
Share on other sites

Sure :) It's the second and I thought the first one is on steroids... Now I know I was very wrong :) 

  • Like 5

Share this post


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

It's the second and

Keep up the good work! You need to keep your sanity so that you will also be able to have fun with the third one too ;)

  • Like 1

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 BitPoet
      So I stumbled over the request to allow limiting templates to be used only once under every parent page in this thread
      and found that this would actually come in handy (also in a site I've built).
      The code can be found on github and soon in the module repo.
      After installation, you'll find a new checkbox "Only once per parent" in the family tab when editing a template.

    • By Robin S
      Password Generator
      Adds a password generator to InputfieldPassword.

       
      Usage
      Install the Password Generator module.
      Now any InputfieldPassword has a password generation feature. The settings for the generator are taken automatically from the settings* of the password field.
      *Settings not supported by the generator:
      Complexify: but generated passwords should still satisfy complexify settings in the recommended range. Banned words: but the generated passwords are random strings so actual words are unlikely to occur.  
      https://modules.processwire.com/modules/password-generator/
      https://github.com/Toutouwai/PasswordGenerator
    • By Robin S
      If you've ever needed to insert links to a large number of files within CKEditor you may have found that the standard PW link modal is a somewhat slow way to do it.
      This module provides a quicker way to insert links to files on the page being edited. You can insert a link to an individual file, or insert an unordered list of links to all files on the page with a single click.
      CKEditor Link Files
      Adds a menu to CKEditor to allow the quick insertion of links to files on the page being edited.

      Features
      Hover a menu item to see the "Description" of the corresponding file (if present). Click a menu item to insert a link to the corresponding file at the current cursor position. The filename is used as the link text. If you Alt-click a menu item the file description is used as the link text (with fallback to filename if no description entered). If text is currently selected in the editor then the selected text is used as the link text. Click "* Insert links to all files *" to insert an unordered list of links to all files on the page. Also works with the Alt-click option. Menu is built via AJAX so newly uploaded files are included in the menu without the page needing to be saved. However, descriptions are not available for newly uploaded files until the page is saved. Installation
      Install the CKEditor Link Files module.
      For any CKEditor field where you want the "Insert link to file" dropdown menu to appear in the CKEditor toolbar, visit the field settings and add "LinkFilesMenu" to the "CKEditor Toolbar" settings field.
       
      http://modules.processwire.com/modules/cke-link-files/
      https://github.com/Toutouwai/CkeLinkFiles
    • By matjazp
      A module for managing files and folders. Supports creating, opening (e.g. viewing, playing, editing), renaming, moving, copying, deleting and searching for files. You can also view and change (not supported on Windows) file and directory permissions. 
      https://github.com/matjazpotocnik/ProcessFileManager

      The author of FileManager component is (c) 2006 - 2018 Gerd Tentler, http://www.gerd-tentler.de/tools/filemanager/. I modified it to work with ProcessWire as a module. Please see license files on usage in commercial projects!
    • By Robin S
      An inputfield for displaying markup editable via CKEditor.
      The module is intended for use with the Form Builder module. Allows blocks of static text to be included within a form, which can be edited in the form settings using CKEditor.
      Usage
      Install the Markup CKEditor module.
      In the Form Builder module settings, add "MarkupCKEditor" to "Inputfield types to use with FormBuilder".
      In your form settings, add a new field of type "Markup CKEditor". Enter the text you want to show in this field using "Markup Text" on the "Details" tab.
      Screenshots


       
      http://modules.processwire.com/modules/inputfield-markup-ckeditor/
      https://github.com/Toutouwai/InputfieldMarkupCKEditor