tpr

Module
AdminOnSteroids

761 posts in this topic

I don't have ListerPro but I can add this line if you say it fixes it. I've searched for 100% width in AOS but it seems that it's coming from ListerPro, right?

1 person likes this

Share this post


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

I've searched for 100% width in AOS but it seems that it's coming from ListerPro, right?

Yes, the full rule is...

#ProcessListerResults select, #ProcessListerResults textarea, #ProcessListerResults input[type="url"], #ProcessListerResults input[type="email"], #ProcessListerResults input[type="text"] {
    width: 100%;
}

...in ProcessPageListerPro.css

So you could override that specific rule or use a more generic rule like in my previous post to try and force the filterbox input to always be width:auto - whichever you think best. Thanks.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks, I've added width: auto to the CSS (no version change).

2 people like this

Share this post


Link to post
Share on other sites

Hi @tpr, would it be possible to get the field edit links that show on hovering a field label to work on fields that are inside repeater items?

Ooh, and another idea re: field edit links. What if Ctrl-click brought up the settings for the field in the template context? (i.e. the template overrides)

Edit: one more thing...

The "Configure" anchor links in the Submodules panel do not scroll me to the right options panel, but scroll down quite a bit further. Tested in Firefox and Chrome on Windows.

2017-03-02_111131.png.4ce64634529330936de7ef2d95b313e9.png

1 person likes this

Share this post


Link to post
Share on other sites

No issues here with the scroll (Chrome/FF).

I have plans to modify the field edit link tooltip, then I'll try to make them work in repeaters too, and perhaps add a template context feature too.

3 people like this

Share this post


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

No issues here with the scroll (Chrome/FF).

I have tracked the issue down to the "Tooltips" submodule - when this submodule is disabled the Configure anchor links scroll to the wrong place (in the default Admin theme anyway).

BTW, have been meaning to ask this for a while: is it possible to use the "Restore settings on next install" feature to copy AOS settings from one site to another? Or some other way to quickly replicate AOS settings on another site?

Share this post


Link to post
Share on other sites

Thanks, will check it.

Yes, you can copy the settings.php file to the new site, but first check the checkbox and save AOS, then uninstall, and only then copy it over. Then if you install the old settings should be loaded.

A better method that I use recently is the Module Toolkit module where you can export modules with their settings to the new site. There's a JSON copy to clipboard option so all you need is copy-paste that. Modules are re-downloaded from the modules directory so core modules are not supported atm but it's still an incredible time saver.

1 person likes this

Share this post


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

Yes, you can copy the settings.php file to the new site, but first check the checkbox and save AOS, then uninstall, and only then copy it over.

Okay, thanks for the info. It would be neat if there was a feature allowing to export/import (copy/paste) the settings JSON without needing to uninstall/reinstall. As new AOS features are rolled out quite regularly (which is awesome) I often want to synchronise my new settings across many sites.

Share this post


Link to post
Share on other sites
Just now, Robin S said:

Okay, thanks for the info. It would be neat if there was a feature allowing to export/import the settings JSON without needing to uninstall/reinstall. As new AOS features are rolled out quite regularly (which is awesome) I often want to synchronise my new settings across many sites.

Like  this?

 

2 people like this

Share this post


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

Like  this?

Yes! I had forgotten about your thread there. That is still a work in progress and not released yet, right, or did I miss it? I think AOS and Tracy are the main modules where I find myself wanting a quick way to sync settings, but would definitely be cool to have that available for any module.

Share this post


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

Yes! I had forgotten about your thread there. That is still a work in progress and not released yet, right, or did I miss it? I think AOS and Tracy are the main modules where I find myself wanting a quick way to sync settings, but would definitely be cool to have that available for any module.

It's fully functional. I'll PM it to you to try out. I'd be curious to get your feedback, and then maybe I'll just release it, maybe on its own, or maybe packaged with Module Toolkit, along with core module support to address @tpr's request.

1 person likes this

Share this post


Link to post
Share on other sites

Hey @tpr - FYI with the new Pages > Tree functionality that Ryan just committed. AOS is resulting in this:

58c0395e5cd34_ScreenShot2017-03-08at9_02_24AM.png.95e77b4f8b57213b63cb0386589aa7df.png

Share this post


Link to post
Share on other sites

Thanks, it's mostly PageList IDs that is causing this and perhaps PageListThumbs. I'll check it soon.

1 person likes this

Share this post


Link to post
Share on other sites

Seems like the "class" attribute is the culprit, I guess there's some regex going on later somewhere but  haven't checked.

Could you try replacing this line with this? It seems to fix the issue in all 3 themes.

$event->return = "<span data-pid='$page->id'>$markup</span>";

 

1 person likes this

Share this post


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

Seems like the "class" attribute is the culprit, I guess there's some regex going on later somewhere but  haven't checked.

Could you try replacing this line with this? It seems to fix the issue in all 3 themes.


$event->return = "<span data-pid='$page->id'>$markup</span>";

 

Works for me!

1 person likes this

Share this post


Link to post
Share on other sites

FYI - there are still some issues with the new tree submenus - some unpublished pages just appear blank. Note "Resources" is blank:

58c2f296db0dc_ScreenShot2017-03-10at10_37_38AM.png.2f257adcd14a9b1cd062dc422aeeca5e.png

If you can't reproduce, let me know and I'll see if I can figure out why it's only some unpublished pages that are doing this.

Share this post


Link to post
Share on other sites

It seems to be the "double span" issue again. Could you try replacing the same line as in my post above with this:

$event->return = str_replace('<span ', '<span data-pid="' . $page->id . '" ', $event->return);

 

1 person likes this

Share this post


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

It seems to be the "double span" issue again. Could you try replacing the same line as in my post above with this:


$event->return = str_replace('<span ', '<span data-pid="' . $page->id . '" ', $event->return);

 

That seems to take care of things!

Share this post


Link to post
Share on other sites

Thanks, but unfortunately there were other issues with the current approach. In v130 (just uploaded) all should be fine, and pagelist IDs are visible in the new Tree menu too.

aos-pagelistthumbs.png.714eb37d0c341498003f5ae1b4c5d65c.png

This version also contains the option to align the top nav to the left in the default admin theme (idea & request by @Robin S - thanks!).

2 people like this

Share this post


Link to post
Share on other sites

New feature in v131: new move to first/last buttons for file/image fields (FileFieldTweaks). This adds up/down icons (right-left in case of images) that you can use to move items to the first or last position.

aos-first-last-buttons.gif.a5b701884faa04a1ae7247de29efc168.gif

4 people like this

Share this post


Link to post
Share on other sites

v133 contains a new CKE plugin Code Snippet which lets you insert rich code snippets with syntax highlighting into the editor. The plugin uses highlight.js.

On the frontend you'll need to include highlight.js assets and initialize (see more at higlightjs.org):

Quote

<link rel="stylesheet" href="/path/to/styles/default.css">
<script src="/path/to/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

To customize the languages available for selection and the theme, add this to /site/templates/admin/cke.js file (this is the auto-loaded configuration file for CKEditor, you can modify it in the Asset Paths section in AOS):

CKEDITOR.editorConfig = function (config) {

    config.codeSnippet_theme = 'foundation';

    config.codeSnippet_languages = {
        apache: 'Apache',
        css: 'CSS',
        html: 'HTML',
        ini: 'INI   ',
        javascript: 'JavaScript',
        scss: 'SCSS',
        php: 'PHP',
        sql: 'SQL',
    };
};

 

aos-cke-codesnippet-editor.png.cf90dbbc2601bd7f12810adcd2741862.png

 

aos-cke-codesnippet-dialog.png.418e975ea9a2c397e5e43df7926cab38.png

 

4 people like this

Share this post


Link to post
Share on other sites

v134 has a new option for FileFieldTweaks: disable filename truncation for File fields.

Thanks @BitPoet for the right track and @Robin S for the request. This was something bugged me for some time but was lazy to investigate :)

aos-untruncate.png

4 people like this

Share this post


Link to post
Share on other sites

hi @tpr,

it would be nice to have a "fullscreen" button for some of my inputfields in my current project. it seems to be quite easy to make the inputfields content div fullscreen like this:

.fullscreen {
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    overflow: scroll;
    position: fixed;
    z-index: 999;
}

i need it for my datatables fields, but i'm thinking if that would maybe also interesting for other fields. that's why i thought creating a module. and then i thought that could maybe be interesting for AOS as well. like having a toggle icon to make CKE fields fullscreen?

with fullscreen i mean full browser window ;)

what do you think?

Share this post


Link to post
Share on other sites

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

As for the other fields the biggest issue is the button placement, or finding another solution to trigger. I think such features would fit to the drop down idea I plan to add to field labels - when my time allows :)

1 person likes this

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 kixe
      This morning I pushed a module to github which extends the page api with moving and sorting capability.
      https://github.com/kixe/PageSortMove
      /** * CALLABLE * PageSortMove::execute($pageID, $newIndex = 0, $parentID = null); * $modules->get('PageSortMove')->execute($pageID, $newIndex = 0, $parentID = null); * * EXTENDED PAGE API * @property $page->first // under same parent * @property $page->last * * @method $page->first($parentID = null) * @method $page->last($parentID = null) * @method $page->sort($newIndex) * @method $page->move($newIndex, $parentID = null) */ Have a nice weekend.
    • By Robin S
      I have had this module sitting in a 95% complete state for a while now and have finally made the push to get it out there. Thanks to @teppo for his Hanna Code Helper module which I referred to and borrowed from during development.
      https://github.com/Toutouwai/HannaCodeDialog
      HannaCodeDialog
      A module for ProcessWire CMS/CMF. Provides a number of enhancements for working with Hanna Code tags in CKEditor. The main enhancement is that Hanna tags in a CKEditor field may be double-clicked to edit their attributes using core ProcessWire inputfields in a modal dialog.
      Requires the Hanna Code module.
      Installation
      Install the HannaCodeDialog module using any of the normal methods.
      For any CKEditor field where you want the "Insert Hanna tag" dropdown menu to appear in the CKEditor toolbar, visit the field settings and add "HannaDropdown" to the "CKEditor Toolbar" settings field.
      Module configuration
      Visit the module configuration screen to set any of the following:
      Exclude prefix: Hanna tags named with this prefix will not appear in the CKEditor toolbar dropdown menu for Hanna tag insertion. Exclude Hanna tags: Hanna tags selected here will not appear in the CKEditor toolbar dropdown menu for Hanna tag insertion. Background colour of tag widgets: you can customise the background colour used for Hanna tags in CKEditor if you like. Dialog width: in pixels Dialog height: in pixels Features
      Insert tag from toolbar dropdown menu
      Place the cursor in the CKEditor window where you want to insert your Hanna tag, then select the tag from the "Insert Hanna tag" dropdown.

      Edit tag attributes in modal dialog
      Insert a tag using the dropdown or double-click an existing tag in the CKEditor window to edit the tag attributes in a modal dialog.

      Tags are widgets
      Hanna tags that have been inserted in a CKEditor window are "widgets" - they have a background colour for easy identification, are protected from accidental editing, and can be moved within the text by drag-and-drop.

      Options for tag attributes may be defined
      You can define options for a tag attribute so that editors must choose an option rather than type text. This is useful for when only certain strings are valid for an attribute and also has the benefit of avoiding typos.
      Add a new attribute for the Hanna tag, named the same as the existing attribute you want to add options for, followed by "__options". The options themselves are defined as a string, using a pipe character as a delimiter between options. Example for an existing attribute named "vegetables":
      vegetables__options=Spinach|Pumpkin|Celery|Tomato|Brussels Sprout|Potato You can define a default for an attribute as normal. Use a pipe delimiter if defining multiple options as the default, for example:
      vegetables=Tomato|Potato Dynamic options
      Besides defining static options as above, you can use one Hanna tag to dynamically generate options for another. For instance, you could create a Hanna tag that generates options based on images that have been uploaded to the page, or the titles of children of the page.
      Your Hanna tag that generates the options should echo a string of options delimited by pipe characters (i.e. the same format as a static options string).
      You will probably want to name the Hanna tag that generates the options so that it starts with an underscore (or whatever prefix you have configured as the "exclude" prefix in the module config), to avoid it appearing as an insertable tag in the HannaCodeDialog dropdown menu.
      Example for an existing attribute named "image":
      image__options=[[_images_on_page]] And the code for the _images_on_page tag:
      <?php $image_names = array(); $image_fields = $page->fields->find('type=FieldtypeImage')->explode('name'); foreach($image_fields as $image_field) { $image_names = array_unique( array_merge($image_names, $page->$image_field->explode('name') ) ); } echo implode('|', $image_names); Choice of inputfield for attribute
      For attributes which you have defined options for, you can choose the inputfield that is used to select from the options.
      Inputfields that support the selection of a single option are select (this is the default inputfield for attributes with options so it isn't necessary to specify it if you want it) and radios.
      Inputfields that support the selection of multiple options are selectmultiple, asmselect and checkboxes.
      You can also specify a checkbox inputfield - this is not for attributes with defined options but will limit an attribute to an integer value of 1 or 0.
      The names of the inputfield types are case-insensitive.
      Example for an existing attribute named "vegetables":
      vegetables__type=asmselect Descriptions and notes for inputfields
      You can add a description or notes to an attribute and these will be displayed in the dialog.
      Example for an existing attribute named "vegetables":
      vegetables__description=Please select vegetables for your soup. vegetables__notes=Pumpkin and celery is a delicious combination. Notes
      When creating or editing a Hanna tag you can view a basic cheatsheet outlining the HannaCodeDialog features relating to attributes below the "Attributes" config inputfield.
      Troubleshooting
      HannaCodeDialog includes and automatically loads the third-party CKEditor plugins Line Utilities and Widget. If you have added these plugins to your CKEditor field already for some purpose and experience problems with HannaCodeDialog try deactivating those plugins from the CKEditor field settings.
    • By Soma
      PageListImageLabel
      Marty requested and sponsored a new module little while ago.
      http://processwire.c...t-image-option/
      I just wanted to create a separate release thread. Many thanks to Marty for sponsoring and making this possible. This just shows how great this community is.
      So here it is the Page List Image Label module. It enables you to add thumbnails of images from the pages in the admin page tree.
      Download:
      http://modules.processwire.com/modules/page-list-image-label/
      Github: 
      https://github.com/somatonic/PageListImageLabel
      A screenshot of it in production. (old version)

    • By FIA2008
      How can I change the output of `Page::render`?
      I've created a hook before page::render, but when I set the $event->return to something else, my whole page is replaced with that value.
      For example:
       
      public function beforePageRender(HookEvent $event) { $event->return = 'blaat'; } This will cause my whole page to be nothing more than just 'blaat'.
      What I want, is that my menu, footer etc. are still visible but only the content of that page is replaced.