tpr

Module
AdminOnSteroids

841 posts in this topic

The hover on the entire pagelist line feature is a little buggy. It's a little sporadic, but if you open a branch and then collapse it, the hover no longer brings up the action buttons. Let me know if you can't reproduce and I'll try to investigate.

Share this post


Link to post
Share on other sites

Are you sure it's AOS? I can reproduce this when AOS is disabled but maybe that's not what you wrote. Which AOS feature is it (classname?) and which admin theme?

aos-hover.gif

Share this post


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

Are you sure it's AOS? I can reproduce this when AOS is disabled but maybe that's not what you wrote. Which AOS feature is it (classname?) and which admin theme?

I am on the default theme. I can't reproduce without AOS. It's not consistent, but it's also not a huge deal :)

Share this post


Link to post
Share on other sites

@tpr - I have struck an access problem with Repeaters that seems to be caused by AOS. I opened a GitHub issue for it rather than clutter up this thread.

1 person likes this

Share this post


Link to post
Share on other sites

Hi @tpr Can you please somehow make it optional the CKE stuff in AOS? I mean I do not want to use it, so it is just a waste of resources to have the CKE folder around with its hefty 903 files (5.6MB).

For the time being can I just delete the whole folder? Any nasty side-effects if I do so? :) 

Edited by szabesz
typo

Share this post


Link to post
Share on other sites

I think it's safe to delete if you don't use it.

I don't know how could I make it optional without making it uncomfortable for others who are using it. What I could do (and it's on my todo) to reduce the number of files in the CKE plugins directory.

1 person likes this

Share this post


Link to post
Share on other sites

If it is possible to download this CKE plugins directory as a ZIP file than there could be a download button on the settings page to optionally get it later, but let's just leave it at this theoretical stage and see how you can trim the number of files in the first place. And I will just delete it to see what happens :) Thanx!

EDIT: still theoretically :) but it might be a better way to include the whole stuff by default, but on the settings page there could be a "remove CKE plugin support" or something like that, which deletes the direcory and the plugin can keep it that way during upgrades. There should be some warnings, of course, etc...

Edited by szabesz

Share this post


Link to post
Share on other sites

Hi @tpr! I want to propose some improvements in auto-loaded files. 

By default these files are loaded:

/site/templates/admin.css: CSS file loaded for the entire admin
/site/templates/admin.js: JavaScript file loaded for the entire admin
/site/templates/cke.js: JavaScript file loaded for CKEditor fields
/site/templates/cke.css: CSS file loaded for CKEditor fields
/site/templates/templates.js: fallback for the CKEditor "templates" plugin templates

From the point that we try to keep templates folder as much structured as possible, it would be great that auto-loaded files, by default, will be loaded for example from "templates/admin/" folder. It also would be conveniently when you use some task runner as Gulp. It that way you can create one task for custom admin assets.

Tough, we have settings for custom assets path, it is not very handy to set these paths on every new project. 

So I want to propose to change how files are auto-loaded by default: 

1. AOS looks for files in "templates";

2. AOS looks for files in "templates/admin";

3.  AOS looks for files in custom paths.

What do you think about it? 

1 person likes this

Share this post


Link to post
Share on other sites

It's fine to me, will try not to forget on the next update :)

2 people like this

Share this post


Link to post
Share on other sites

I guess it's safe to set the defaults to "templates/admin/...", I don't want to use so many file_exists(). Is this template structure what you need?

aos-assets.png

Btw until the update you can just replace the string "cke.js" with "admin/cke.js" in AdminOnSteroids.module (and do this with all 5 assets).

 

1 person likes this

Share this post


Link to post
Share on other sites
On 2/5/2017 at 7:33 AM, szabesz said:

it might be a better way to include the whole stuff by default, but on the settings page there could be a "remove CKE plugin support" or something like that, which deletes the direcory and the plugin can keep it that way during upgrades. There should be some warnings, of course, etc...

That could work but it would add an unnecessary complication imho. In the meantime I managed to reduce the number of files to about 200 and overally module size to 2.1MB. So far so good, but I'll keep click around to see if all goes well.

1 person likes this

Share this post


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

Is this template structure what you need?

Yes, it is. 

"templates/admin/..." by default would be ok. But what about backward capability, if there is no check for the root of templates folder? 

Share this post


Link to post
Share on other sites
17 minutes ago, Zeka said:

"templates/admin/..." by default would be ok. But what about backward capability, if there is no check for the root of templates folder? 

No, there's not. Imho it's better to leave out that extra 5 file check on every admin page load. This might be a nuissance for existing users but on the long run it's better this way.

FYI, v124 is uploaded, containging fewer files and with overall module files weighing 1.7MB. The Modules Directory doesn't contain the documentation anymore as it was moved to GitHub Wiki. I just tested AOS on a new install and so far so good but please report if you find something.

2 people like this

Share this post


Link to post
Share on other sites

Evening @tpr :) Is it just me who is missing text-decoration: line-through; from the page list (tree)? See:

no-line-through.png

It was also missing at least in the previous version. I have a site with AOS 0.9.96 where unpublished pages are crossed out (I know it's way back in time...).

Share this post


Link to post
Share on other sites

Good catch - it's the double span issue inside the A element. I think it's safe to apply line-through on the inner span too, will update soon.

1 person likes this

Share this post


Link to post
Share on other sites

FYI I commited the fix (no version change). Only AdminOnSteroids.css needs to be replaced.

1 person likes this

Share this post


Link to post
Share on other sites

vary small thing: could you please make the column width inputfield selected by default after clicking on the width shortcuts? that would make it very fast to change multiple columns at once:

  • click column
  • type number
  • ctrl+s

2017-02-11 16_40_48-Edit Template_ rockprojecteffort • hrd.baumrock.com.png

thank you :)

Share this post


Link to post
Share on other sites

after upgrade all of a sudden my sites all started to show the alternate skin on CK editor, even though we I don't have that sub module enabled; enabling disabling the CKEaddons doesn't change anything, e.g. it still shows the wrong skin, and also the editor has redundant text align buttons; only way to fix was to disable module.

Edit_Page__Djuna_Barnes_•_apps_williamanderson_us.jpg

Share this post


Link to post
Share on other sites

Could you check the Body field settings? Re-saving the field may fix this.

My idea is to make a hard reload, config.js often gets cached.

What have you upgraded and to what version?

Share this post


Link to post
Share on other sites

AOS 1.2.4, PW 3.0.52; hard reload doesn't affect anything; re-saving field no effect; body field settings look correct...

Share this post


Link to post
Share on other sites

I think I got it - I've refactored the submodule enabled state to a function but haven't updated it everywhere, will commit a new version soon.

Update - @Macrura could you test if this solves the issue?

 

AdminOnSteroids.min.js

Share this post


Link to post
Share on other sites

that does indeed fix the issue - thanks!!

 

1 person likes this

Share this post


Link to post
Share on other sites

Thanks! That was a silly mistake, interestingly noone spotted it, including me :) v125 is uploaded with the fix.

1 person likes this

Share this post


Link to post
Share on other sites

Experiment with pagelist counters (CSS only):

aos-pagelist-counter.gif.4ff0cf99465600778efd438da152f1e3.gif

2 people like this

Share this post


Link to post
Share on other sites

@tpr, I noticed that the filter box icon is out of alignment on Lister Pro pages. Not sure if you have Lister Pro available to test on but the culprit is a CSS rule that sets text inputs to 100% width inside #ProcessListerResults. Maybe force the width back to auto for the filterbox?

html.aos div.filterbox input[type="text"] { width:auto !important; }

2017-02-28_103120.png.dfc359ee4b58a743a984729d2b4e147b.png

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 bernhard
      Hi,
      just stumbled over a little module that i built for my last project. it helped me to test performance of my rockdatatables module to generate 3000 random json datasets and i want to share it with you. maybe it saves some time for someone.
      https://gitlab.com/baumrock/RockDummyData/
      easy example:
      $rdd = $modules->get('RockDummyData'); for($i=0; $i<15; $i++) { // this has to be inside the for-loop to always get a new dummy $dummy = $rdd->getDummy(); echo date("d.m.Y H:i:s", $dummy->timestamp) . "<br>"; } more advanced:
      $json = new stdClass(); $json->data = array(); $rdd = $modules->get('RockDummyData'); for($i=0; $i<3000; $i++) { // this has to be inside the for-loop to always get a new dummy $dummy = $rdd->getDummy(); $obj = new stdClass(); $obj->name = $dummy->forename . ' ' . $dummy->surname; $obj->position = $dummy->job; $obj->office = $dummy->city; $obj->color = $dummy->color; $obj->start_date = new stdClass(); $obj->start_date->display = date('d.m.Y',$dummy->timestamp); $obj->start_date->sort = $dummy->timestamp; $obj->salary = rand(0,10000); $json->data[] = $obj; } echo json_encode($json); you have to store your random datasets on your own into the /data folder. there are several services for creating all kinds of random data on the web - if you know one service that allows sharing those datasets let me know and i can include common needed data into the module
    • By AndySh
      Hello!
      I need your assistance please. I purchased the module FormBuilder. Unfortunately, the module discontinued delivering customer submissions to e-mail box specified in the module settings. Direct mailing to the e-mail box works OK. The module settings stays the same and are correct, like "Send e-mail to administrator(s) is checked. The last version of FormBuilder 3.0 has been installed. Please advise how to resolve the issue becase I cannot get orders from customers anymore (((
    • By kixe
      As described in this post (https://processwire.com/talk/topic/8551-custom-urls-for-pages/?p=82742) the option 'Name Format Children' under the tab 'Family' in template settings doesn't work properly and also not as expected. I had a look inside the code and made some changes which are working properly, which offers much more options, more consistency and less code too.

      The result is the following. You have 3 Options for generating name and title, which could be combined in endless variations.
      Name is always derived from title, same like creating pages manually.
      type date: if function detects # character anywhere in the string, conversion will be: deletion of # and string will be used as format parameter for PHP date() function type field: if string is a fieldname of the parent page the value of this field will be used type string: if string doesn't fit to the 2 preceeding it will be taken as it is All parts (separated by comma) will be composed in the order of setting. You can use unlimited numbers of parts

      I made a pull request on github: https://github.com/ryancramerdesign/ProcessWire/pull/831

      Example screenshots

      Setting ...


      will result in


       
    • By kongondo
      FieldtypeRuntimeMarkup and InputfieldRuntimeMarkup
       
      Modules Directory: http://modules.processwire.com/modules/fieldtype-runtime-markup/
      GitHub: https://github.com/kongondo/FieldtypeRuntimeMarkup
       
      This module allows for custom markup to be dynamically (PHP) generated and output within a page's edit screen (in Admin).
       
      The value for the fieldtype is generated at runtime. No data is saved in the database. The accompanying InputfieldRuntimeMarkup is only used to render/display the markup in the page edit screen.
       
      The field's value is accessible from the ProcessWire API in the frontend like any other field, i.e. it has access to $page and $pages.
       
      The module was commissioned/sponsored by @Valan. Although there's certainly other ways to achieve what this module does, it offers a dynamic and flexible alternative to generating your own markup in a page's edit screen whilst also allowing access to that markup in the frontend. Thanks Valan!
       
      Warning/Consideration
      Although access to ProcessWire's Fields' admin pages is only available to Superusers, this Fieldtype will evaluate and run the custom PHP Code entered and saved in the field's settings (Details tab). Utmost care should therefore be taken in making sure your code does not perform any CRUD operations!! (unless of course that's intentional) The value for this fieldtype is generated at runtime and thus no data is stored in the database. This means that you cannot directly query a RuntimeMarkup field from $pages->find(). Usage and API
       
      Backend
      Enter your custom PHP snippet in the Details tab of your field (it is RECOMMENDED though that you use wireRenderFile() instead. See example below). Your code can be as simple or as complicated as you want as long as in the end you return a value that is not an array or an object or anything other than a string/integer.
       
      FieldtypeRuntimeMarkup has access to $page (the current page being edited/viewed) and $pages. 
       
      A very simple example.
      return 'Hello'; Simple example.
      return $page->title; Simple example with markup.
      return '<h2>' . $page->title . '</h2>'; Another simple example with markup.
      $out = '<h1>hello '; $out .= $page->title; $out .= '</h1>'; return $out; A more advanced example.
      $p = $pages->get('/about-us/')->child('sort=random'); return '<p>' . $p->title . '</p>'; An even more complex example.
      $str =''; if($page->name == 'about-us') { $p = $page->children->last(); $str = "<h2><a href='{$p->url}'>{$p->title}</a></h2>"; } else { $str = "<h2><a href='{$page->url}'>{$page->title}</a></h2>"; } return $str; Rather than type your code directly in the Details tab of the field, it is highly recommended that you placed all your code in an external file and call that file using the core wireRenderFile() method. Taking this approach means you will be able to edit your code in your favourite text editor. It also means you will be able to type more text without having to scroll. Editing the file is also easier than editing the field. To use this approach, simply do:
      return wireRenderFile('name-of-file');// file will be in /site/templates/ If using ProcessWire 3.x, you will need to use namespace as follows:
      return ProcessWire\wireRenderFile('name-of-file'); How to access the value of RuntimeMarkup in the frontend (our field is called 'runtime_markup')
       
      Access the field on the current page (just like any other field)
      echo $page->runtime_markup; Access the field on another page
      echo $pages->get('/about-us/')->runtime_markup; Screenshots
       
      Backend
       

       

       
      Frontend