Jump to content


Photo

Admin Hot Keys

Module

  • Please log in to reply
35 replies to this topic

#1 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 17 July 2012 - 04:25 PM

ProcessWire2.+ Admin Hot Keys 0.0.7

This modules adds hot keys functionality to PW backend. The keys can be configured in the module settings in the admin.

I created a repo here for download and if anyone interested in picking it up.

https://github.com/s...ic/AdminHotKeys

Currently it supports
  • Save : ctrl+s
  • Add New : ctrl+n
  • View Page : ctrl+v
  • Open Pages search : alt+q (search field can be configured)
  • Open Templates search : ctrl+shift+t
  • Open Fields search : ctrl+shift+f
  • Goto Pages : ctrl+shift+p
  • Goto Setup : ctrl+shift+s
  • Goto Modules : ctrl+shift+m
  • Goto Access : ctrl+shift+a
Note: If you're inside a text input it will ignore the hot keys, as to avoid problems with already defined key.

Tip: If you open up templates or fields autocomplete search `ctrl+shift+f|t` press `shift+tab` to focus on the link in the label previous to the search input box. Now hit enter to get right to the template or field screen. (If using FF make sure to enable tab focus for all elements in MacOSX: http://support.mozil...enus or buttons)

@somartist | modules created | support me, flattr my work flattr.com


#2 Martijn Geerts

Martijn Geerts

    Sr. Member

  • Members
  • PipPipPipPip
  • 373 posts
  • 168

Posted 17 July 2012 - 04:35 PM

Tnx Soma ! This is great...

#3 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 17 July 2012 - 06:09 PM

Your welcome. Thanks.

Little update after playing around a little.
  • changed to use save hot key for all edit screens to save not only page.
  • added "Add new" hot key support for Template, Fields, Users, anything that has a "Add new" button.

Have fun.

@somartist | modules created | support me, flattr my work flattr.com


#4 Marty Walker

Marty Walker

    Sr. Member

  • Members
  • PipPipPipPip
  • 335 posts
  • 154

  • LocationKatoomba, AU

Posted 17 July 2012 - 07:21 PM

Hi Philipp,

Chrome on OS X likes it but I get some strange things happening in Firefox (13). I can't collapse any fields or use the PageListSelect.

Regards
Marty

#5 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 17 July 2012 - 07:26 PM

Thanks Marty, just commited an update that should fix it for FF.

@somartist | modules created | support me, flattr my work flattr.com


#6 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 18 July 2012 - 05:08 AM

Added several new actions.

Added shortcuts to admin main pages.

The most fun is to open a autcomplete search to find and edit templates or fields. Now you can wherever you are press "ctrl+shift+t" or "ctrl+shift+f" and get something like this:

PastedGraphic-1.png

Once open you can type and select, hit enter and directly go to edit screen.
Enter a char and hit backspace to show all.

Have fun.

@somartist | modules created | support me, flattr my work flattr.com


#7 slkwrm

slkwrm

    Sr. Member

  • Members
  • PipPipPipPip
  • 248 posts
  • 66

Posted 18 July 2012 - 05:48 AM

Looks interesting! Can't wait to check it :)

#8 tsd

tsd

    Jr. Member

  • Members
  • PipPip
  • 24 posts
  • 4

Posted 18 July 2012 - 06:59 AM

Looks promissing, cool little helper. I'll give it a try after work :)

#9 Martijn Geerts

Martijn Geerts

    Sr. Member

  • Members
  • PipPipPipPip
  • 373 posts
  • 168

Posted 18 July 2012 - 07:01 AM

Work fantastic :P... ctrl+shift+v --> view page ?

#10 interrobang

interrobang

    Distinguished Member

  • Members
  • PipPipPipPip
  • 107 posts
  • 49

  • LocationMunich, Germany

Posted 18 July 2012 - 07:40 AM

Wow, this is a nice little helper. Great work!

One suggestion. Is it possible to go to the templates / field main page if I just press enter in the empty modal? This way we dont't need a additonal shortcut for these pages.

#11 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 18 July 2012 - 07:53 PM

Thanks all!

Little update for 0.0.6

- added View Page to the list "ctrl+v".

- Also, I was thinking about adding a shortcut to the Template and Field pages.

I figured simplest is to add a link in the label in front of the searchfield. If you open the dialog, you can now simply press "shift+tab" to focus on that link and hit enter.

Edit: lol, just figured that "shift+tab" doesn't seem to work in FF. Back to the drawingboard :D¨

Edit2: Ok this seem related to OS setting in MacOSX. If in FF make sure this in enabled http://support.mozil...enus or buttons

@somartist | modules created | support me, flattr my work flattr.com


#12 Martijn Geerts

Martijn Geerts

    Sr. Member

  • Members
  • PipPipPipPip
  • 373 posts
  • 168

Posted 19 July 2012 - 03:56 AM

I think this"little module" adds a way quicker workflow to ProcessWire, maybe it's a good thing to make it core module.

#13 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

Posted 19 July 2012 - 04:18 AM

Soma - CTRL+V is paste on a windows PC so not sure whether there are any issues there? Just a thought.

#14 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 19 July 2012 - 06:09 AM

Soma - CTRL+V is paste on a windows PC so not sure whether there are any issues there? Just a thought.


Yeah I know, you can change it in the settings. I also thought the same but couldn't decide what would be best.

@somartist | modules created | support me, flattr my work flattr.com


#15 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

Posted 19 July 2012 - 06:15 AM

I don't know whether you could work around it by checking if an input field or textures is selected before deciding on the action? If a field is selected it would make sense to leave it as paste, else view page in a new window maybe.

#16 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 19 July 2012 - 06:22 AM

Thanks Pete. But that's not really a solution I like :D

@somartist | modules created | support me, flattr my work flattr.com


#17 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 19 July 2012 - 06:54 AM

Ok lol funny, it seems the hotkey jquery plugin already is ignoring commands if inside text inputs! So this already is solved this way. I thought it would be unnecessary to implement and I'm not sure it really is the best solution, but will help avoid problems in first place (as it also stated in Resigs plugin) . It would be nice to not needing to leave input focus to be able to save or do other actions while typing. But guess not really an issue.

@somartist | modules created | support me, flattr my work flattr.com


#18 interrobang

interrobang

    Distinguished Member

  • Members
  • PipPipPipPip
  • 107 posts
  • 49

  • LocationMunich, Germany

Posted 19 July 2012 - 10:33 AM

Soma, you have swapped the labels of "Goto Setup" and "Goto Pages" in AdminHotkeys.module

Your module is now part of my default processwire setup. Really useful..

#19 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 19 July 2012 - 10:42 AM

Thanks, nice catch. It's corrected in the latest commit.

@somartist | modules created | support me, flattr my work flattr.com


#20 Soma

Soma

    Hero Member

  • Moderators
  • 3,194 posts
  • 1748

  • LocationSH, Switzerland

Posted 19 July 2012 - 07:35 PM

Hello, just commited a new update.
  • Added new action to search for Pages using PW internal ajax search "alt+q". You can even select template to filter.
  • Added setting to change the fields used in page search. Default "title body". Search uses %= (SQL like)
  • Changed dialogs to position fixed so they appear right where you are and page doesn't jump
  • Added check so it doesn't get initialized on login screen
PastedGraphic-1.png
PastedGraphic-2.png

@somartist | modules created | support me, flattr my work flattr.com






Also tagged with one or more of these keywords: Module

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users