Jump to content

AdminOnSteroids


tpr

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
Link to comment
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.

 

Link to comment
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
Link to comment
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
Link to comment
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 :) 

Link to comment
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
Link to comment
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 :)

 

Link to comment
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
Link to comment
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)?

Link to comment
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 :)

Link to comment
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
Link to comment
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
×
×
  • Create New...