Jump to content
tpr

AdminOnSteroids

Recommended Posts

Hello tpr,

here is another z-index problem by showing the source code via CK-Editor.

You gave the divs "breadcrumbs" and "headlines" a z-index of 100011. Now there is a problem if you use the "show source code" function of the CKEditor. This window will be overlapped from the 2 divs in the static bar, because the table which holds the source code has no z-index value (only position static).

The following line of CSS should solve this problem (not tested yet):

table.cke_dialog_contents {z-index: 100012;}

Screenshot_12.jpg

Best regards

  • Like 2

Share this post


Link to post
Share on other sites

Thanks, got it fixed. There's also a cke background overlay that was partially hidden.

  • Like 2

Share this post


Link to post
Share on other sites

Minor css issue - notice the location of the notes icon - this is the iframe that contains the Usage details on a template settings page.

Screen Shot 2016-08-29 at 6.48.30 AM.png

Share this post


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

How did you add a notes there?

I didn't add it - it's the details of the selector. Not sure, but I think maybe this only appears with ListerPro.

Screen Shot 2016-08-29 at 7.28.51 AM.png

  • Like 1

Share this post


Link to post
Share on other sites

That could be ListerPro then, I don't see that. Having no ListerPro to test I can only recommend you to use the "Overlay" style mode for these tooltips :)

  • Like 1

Share this post


Link to post
Share on other sites

Here is a sneak preview of the custom nav items feature I'm working on. They load page lists if applicable, or other pages based on the page type, eg. the Profile page. The main goal is to select pages to add to the main for easy reach. There's also an edit link to the right of the items if you want to edit the page instead list their children.

I haven't found a way to inject these pages with PHP to their destination so the last step involves a bit of JavaScript. If anyone knows how to do this, please share.

aos-navitems.png 

aos_navitems-reno.png      aos_navitems-default.png

  • Like 1

Share this post


Link to post
Share on other sites

I've just added a feature to automatically save module settings to file on uninstall, and restore on install. This way you can uninstall the module without having to re-add settings later if you decide to install again. Additionally, settings can be moved easily from one project to another. With this I can apply more "safe" default settings and leave the more advanced stuff to those who need them.

  • Like 3

Share this post


Link to post
Share on other sites
On 2016. augusztus 24. at 9:43 AM, bernhard said:

and should not be something you need steroids for... maybe you can make an issue on github and talk to ryan what is the reason for it?

Sounds pretty cool! Thanks.

Share this post


Link to post
Share on other sites

Actually there will be a fix for this in the next AOS. As I wrote on GitHub, the problem apparently comes from the navigation having 0.5em top margin, which will be 7.5px, and jQuery uses this value. I've set the margin-top to 8px which is safe enough I think.

Share this post


Link to post
Share on other sites

I would also like to join the feature request club :) 

This topic reminded me of what I currently do in WordPress development:

Besides being able to identify a site, it is also a good thing to tell apart the various instances of the sites we have (development, staging, live version, etc...). In the case of WordPress I use wp-cli to automatically update the site admin's color (the so called "Admin Color Scheme" setting), so that live sites are always in red, dev sites are in blue and staging sites are in purple. In the past, it happened to me that I worked in the wrong admin.... but with this skin changing trick, I'm far less likely to make this mistake again.

Now back to ProcessWire :) My idea is that we could set a value in in config.php, such as $config->adminHeaderColor = #FF3935; which is used by AOS to change the background color of the header. Thanks to AOS I apply sticky headers, so this color indicator could be a strong one.

BTW, here is another related feature idea: it would be cool if we could change the ProcessWire logo easily with AOS, replacing it with the client's logo.

  • Like 2

Share this post


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

it would be cool if we could change the ProcessWire logo easily with AOS, replacing it with the client's logo.

there was some discussion about this years ago: 

don't know how ryan sees this nowadays where pw should be more a framework than a cms...

  • Like 1

Share this post


Link to post
Share on other sites

@bernhard Thanks for the link to the topic! I skimmed through Ryan's replies and the only thing that seems to matter is this:

" I do think the software name ProcessWire, version number and copyright should always remain in the footer of the admin at least."

I agree, I never wanted to remove these :) Also, I always educate my clients and teach them the name of the underlying system(s)/pieces of software they use. 

Share this post


Link to post
Share on other sites

Well if I release 054 you could add js/css tweaks on your own, because AOS will automatically add admin.js and admin.css from "/site/templates" dir. I concluded that this is the best place to have them but please tell if you have other opinion.

Changing colors is not that easy, unfortunately. It could be great if someone could take the time and separate color-related stuff in a scss file. This way colors could be edited as variables.

I've experimented with css3 features like hue-rotation, saturation and such, and results were great, apart from the fact that if I turned off "NoAnims" in AOS, admin became very sluggish. Even with no animations I suspect many computers would have tough times rendering the admin, unfortunately.

I've also added a feature to add extra items to the navigation besides the CustomNavItems I showcased earlier. This allows adding any part of the admin, eg. direct link to the translator or module edit screens:

Translator: setup/language-translator/edit/?language_id=1066&textdomain=site--templates--_strings-php
HelloWorld module: module/edit?name=Helloworld
//disabled item
!AdminOnSteroids: module/edit?name=AdminOnSteroids

 

  • Like 2

Share this post


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

AOS will automatically add admin.js and admin.css from "/site/templates" dir. I concluded that this is the best place to have them but please tell if you have other opinion.

Wow :) I will try it out for sure. As for the path, well, I do not think we have other viable options than using this path, so let's go for it, maybe with an additional subfolder to keep things organized, such as: /site/templates/aos or /site/templates/AdminOnSteroids which is longer, but more concise than "aos".

About the color issue: I was just thinking about something like this (sorry for the actual colors, it is just an example...):

#masthead, #branding, .main-nav-toggle { background-color: red !important; }
#ProcessPageSearchQuery { background-color: darkred !important; }

I do not want to recolor the admin, the WP part of the comment is just an example I'm familiar with. Changing the head is just enough for the use case I've outlined. But with the new admin.js and admin.css feature one can easily do this.

Edited by szabesz
typos

Share this post


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

Besides being able to identify a site, it is also a good thing to tell apart the various instances of the sites we have (development, staging, live version, etc...). In the case of WordPress I use wp-cli to automatically update the site admin's color (the so called "Admin Color Scheme" setting), so that live sites are always in red, dev sites are in blue and staging sites are in purple. In the past, it happened to me that I worked in the wrong admin.... but with this skin changing trick, I'm far less likely to make this mistake again.

Not to be a feature stealer :), but I wonder if an icon/label on the Tracy debugbar might be a decent approach for this? Maybe not if you don't have the debugbar enabled in the backend? Or maybe if you typically don't want it on in the backend, then you could just have this "PW Instance" panel enabled for the backend, but no others?

I was thinking of adding a field where you can type the "label" for the current site - ie "Dev", "Staging", "Live" etc and then would be displayed in the debug bar. You could also choose an icon color along with the label.

Any thoughts on this vs coloring the header via AOS?

Share this post


Link to post
Share on other sites
4 hours ago, szabesz said:

BTW, here is another related feature idea: it would be cool if we could change the ProcessWire logo easily with AOS, replacing it with the client's logo.

I'd love to see this - I don't think it is taking away from PW branding - in fact I'd be happy to see the PW logo in the footer instead. I think as well as making the client feel like it's a system customized for them, I think the actual key benefit is providing another key visual trigger to let you know what site's admin you are currently looking at.

  • Like 2

Share this post


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

Any thoughts on this vs coloring the header via AOS?

Thanks for the idea, however, I used to use a prominent "corner ribbon" (eg https://codepen.io/eode9/pen/twkKm) but it was not enough, I did make the stupid mistake even thought it was big and red. Maybe its just me, I dunno... The header bar is even bigger and more prominent when it is "sticky", so I hope that will do.

BTW, I normally have Tracy turned off for the backend, it's only enabled when fiddling with admin hacks :P, and this sort of feature probably fits AOS better, I suppose.

  • Like 1

Share this post


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

I'd be happy to see the PW logo in the footer instead

+1

What happens when we click on it, anyway? It does not take us to processwire.com but... ;) The proposed footer logo / current text version should be linked though.

  • Like 2

Share this post


Link to post
Share on other sites

In case you haven't come across with this beautiful blog post from... well, myself, here is another approach to easily distinguish different projects:

Per Project Chrome Instances

This approach has other benefits too: better isolation, saved passwords, bookmarks bar for the current projet only, etc.

  • Like 1

Share this post


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

I'd love to see this - I don't think it is taking away from PW branding - in fact I'd be happy to see the PW logo in the footer instead. I think as well as making the client feel like it's a system customized for them, I think the actual key benefit is providing another key visual trigger to let you know what site's admin you are currently looking at.

I agree,  being able to do a little welcoming branding for the client is really great.

I am doing that with a few lines of JS and CSS already, placing another logo (at least) next to the PW logo. Not perfect but it works.

 

Share this post


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

In case you haven't come across with this beautiful blog post from... well, myself, here is another approach to easily distinguish different projects:

Per Project Chrome Instances

This approach has other benefits too: better isolation, saved passwords, bookmarks bar for the current projet only, etc.

Beautiful blog post indeed! :D However, you used the keywords: "for the current project only". I mean, I mixup the admins of the same project, so that is what I've solved with different admin theme colors. It would be an overkill to launch 4 Chrome instances for a project, 2 or three for another, and trying to tell the instances apart from my macOS dock would be frustrating. I also use other browsers too sometimes (for example here is Blisk I recently learnt about here, in the forums), although Chrome is my favorite for development so far.

Share this post


Link to post
Share on other sites

How many admins do you have for one project? :) I try to work on one project at a time, and only one Chrome instance is running + one for everything else.

Share this post


Link to post
Share on other sites

The use case is this: I have a local dev instance and I also have the live site and sometimes even another staging instance for testing another "branch". So same project, but different environments running different clones of the site. It does matter whether I make changes to the live site or to my local instance ;) Since the admin area looks identical, it is easy to pick the wrong tab without noticing, especially around midnight :P

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 Mike Rockett
      Jumplinks for ProcessWire
      Release: 1.5.56
      Composer: rockett/jumplinks
      Jumplinks is an enhanced version of the original ProcessRedirects by Antti Peisa.
      The Process module manages your permanent and temporary redirects (we'll call these "jumplinks" from now on, unless in reference to redirects from another module), useful for when you're migrating over to ProcessWire from another system/platform. Each jumplink supports wildcards, shortening the time needed to create them.
      Unlike similar modules for other platforms, wildcards in Jumplinks are much easier to work with, as Regular Expressions are not fully exposed. Instead, parameters wrapped in curly braces are used - these are described in the documentation.
      Under Development: 2.0, to be powered by FastRoute
      As of version 1.5.0, Jumplinks requires at least ProcessWire 2.6.1 to run.
      View on GitLab
      Download via the Modules Directory
      Read the docs
      Features
      The most prominent features include:
      Basic jumplinks (from one fixed route to another) Parameter-based wildcards with "Smart" equivalents Mapping Collections (for converting ID-based routes to their named-equivalents without the need to create multiple jumplinks) Destination Selectors (for finding and redirecting to pages containing legacy location information) Timed Activation (activate and/or deactivate jumplinks at specific times) 404-Monitor (for creating jumplinks based on 404 hits) Additionally, the following features may come in handy:
      Stale jumplink management Legacy domain support for slow migrations An importer (from CSV or ProcessRedirects) Feedback & Feature Requests
      I’d love to know what you think of this module. Please provide some feedback on the module as a whole, or even regarding smaller things that make it whole. Also, please feel free to submit feature requests and their use-cases.
      Note: Features requested so far have been added to the to-do list, and will be added to 2.0, and not the current dev/master branches.
      Open Source

      Jumplinks is an open-source project, and is free to use. In fact, Jumplinks will always be open-source, and will always remain free to use. Forever. If you would like to support the development of Jumplinks, please consider making a small donation via PayPal.
      Enjoy! :)
    • By BitPoet
      As threatened in Ryan's announcement for 3.0.139, I built a little module for sliding toggles as a replacement for checkboxes. Styling of the input is CSS3 only (with all the usual caveats about older browsers), no JS necessary, and may still be a bit "rough around the edges", so to speak, since I didn't have much time for testing on different devices or brushing things up enough so I'd feel comfortable pushing it to the module directory. But here's the link to the GitHub repo for now:
      InputfieldSlideToggle
      Fieldtype and Inputfield that implements smartphone-style toggles as replacement for checkbox inputs. The visualization is CSS-only, no additional JS necessary.
      Status
      Still very alpha, use with caution!
      Features / Field Settings
      Size
      You can render the toggles in four different sizes: small, medium, large and extra large.
      Off Color
      Currently, "unchecked" toggles can be displayed either in grey (default) or red.
      On Color
      "Checked" toggles can be rendered in one of these colors: blue (default), black, green, grey, orange or red.
      Screenshots

      Some examples with checkbox label


      View all Size and Color Combinations
      Small toggles Medium toggles Big toggles Extra big toggles  









    • By Orkun
      Hi Guys
      I needed to add extended functionalities for the InputfieldDatetime Module (module is from processwire version 2.7.3) because of a Request of Customer.
      So I duplicated the module and placed it under /site/modules/.
      I have added 3 new Settings to the InputfieldDatetime Module.
      1. Day Restriction - Restrict different days based on weekdays selection (e.g. saturday, sunday) - WORKING

       
      2. Time Slots - Define Time slots based on custom Integer Value (max is 60 for 1 hour) - WORKING

       
      3. Time Range Rules per Weekday - Define a minTime and MaxTime per Weekday (e.g. Opening Hours of a Restaurant) - NOT WORKING PROPERLY

       
      The Problem
      Time Slots and Day Restriction working fine so far. But the Time Range Rules per Weekday doesn't work right.
      What should happen is, that when you click on a date, it should update the minTime and maxTime of the Time Select.
      But the change on the select only happens if you select a date 2 times or when you select a date 1 time and then close the datepicker and reopen it again.
      The time select doesn't get change when you select a date 1 time and don't close the picker.
      Here is the whole extended InputfieldDatetime Module.
      The Files that I have changed:
      InputfieldDatetime.module InputfieldDatetime.js jquery-ui-timepicker-addon.js (https://trentrichardson.com/examples/timepicker/) - updated it to the newest version, because minTime and maxTime Option was only available in the new version  
      Thats the Part of the JS that is not working correctly:
      if(datetimerules && datetimerules.length){ options.onSelect = function(date, inst) { var day = $(this).datetimepicker("getDate").getDay(); day = day.toString(); var mintime = $(this).attr('data-weekday'+day+'-mintime'); var maxtime = $(this).attr('data-weekday'+day+'-maxtime'); console.log("weekday: "+day); console.log("minTime: "+mintime); console.log("maxTime: "+maxtime); var optionsAll = $(this).datetimepicker( "option", "all" ); optionsAll.minTime = mintime; optionsAll.maxTime = maxtime; $(this).datetimepicker('destroy'); $(this).datetimepicker(optionsAll); $(this).datetimepicker('refresh'); //$.datepicker._selectDate($(this).attr("id"),date); //$.datepicker._base_getDateDatepicker(); // var inst = $.datepicker._getInst($(this)); // $.datepicker._updateDatepicker(inst); /*$(this).datetimepicker('destroy'); InputfieldDatetimeDatepicker($(this), mintime, maxtime); $(this).datetimepicker('refresh'); */ // $(this).datetimepicker('option', {minTime: mintime, maxTime: maxtime}); } } Can you have a look and find out what the Problem is?
      InputfieldDatetime.zip
       
      Kind Regards
      Orkun
    • By teppo
      This module tracks changes, additions, removals etc. of public (as in "not under admin") pages of your site. Like it's name says, it doesn't attempt to be a version control system or anything like that - just a log of what's happened.
      At the moment it's still a work in progress and will most likely be a victim of many ruthless this-won't-work-let's-try-that-instead cycles, but I believe I've nailed basic functionality well enough to post it here.. so, once again, I'll be happy to hear any comments you folks can provide
      https://modules.processwire.com/modules/process-changelog/
      https://github.com/teppokoivula/ProcessChangelog
      How does it work?
      Exactly like it's (sort of) predecessor, Process Changelog actually consists of two modules: Process Changelog and Process Changelog Hooks. Hooks module exists only to serve main module by hooking into various functions within Pages class, collecting data of performed operations, refining it and keeping up a log of events in it's own custom database table (process_changelog.) Visible part is managed by Process Changelog, which provides users a (relatively) pretty view of the contents of said log table.
      How do you use it?
      When installed this module adds new page called Changelog under Admin > Setup which provides you with a table view of collected data and basic filtering tools See attached screenshots to get a general idea about what that page should look like after a while.
      For detailed installation instructions etc. see README.md.
       


    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-08-08
      2019-06-15
      2019-06-02
      2019-05-25
      If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




×
×
  • Create New...