Jump to content
lenoir

Double-clic on a page to edit it.

Recommended Posts

I often try to edit a page by double-clicking on it's title in the tree. Intuitively.

I think that would be a nice benefit for clients editing many pages.

Share this post


Link to post
Share on other sites

I agree, and I actually have tried to implement this before. I could never get jQuery's double click event register and work here. I suppose it's because we are already using the click event. But if someone else figures out how to get both double click and click working for it, I think it would be worthwhile to have. 

  • Like 1

Share this post


Link to post
Share on other sites

Why so complicated? It's in jQuery

$('body').on("dblclick", function(){
    alert("double clicked");
});

Ah, just read again: click and double click on same. It does work with both.

Share this post


Link to post
Share on other sites

diogo's code means we could have it delete the site on triple-clicks though and destroy the world on quadruple clicks with just a few adjustments ;)

  • Like 2

Share this post


Link to post
Share on other sites

diogo's code means we could have it delete the site on triple-clicks though and destroy the world on quadruple clicks with just a few adjustments ;)

I could live with that .... or not...

Share this post


Link to post
Share on other sites

Detroy the world if you wish, just let us know when you got a version running.

  • Like 1

Share this post


Link to post
Share on other sites

Maybe we don't need to complicate. Since a new page will open, we don't need to prevent the click action because it won't be seen. I did this change on ProcessPageList.js and it works pretty well:

//line: 403

$("a.PageListPage", $ul).click(clickChild)
    .dblclick(function(){
        window.open($(this).siblings('ul').find('li.PageListActionEdit a').attr('href'), "_self");
    });
  • Like 3

Share this post


Link to post
Share on other sites

Thanks Diogo! Seems to work very well. I've added to the source and will test locally for a day or two, then push it to the dev branch. 

  • Like 3

Share this post


Link to post
Share on other sites

Thumbs up Diogo: works perfectly, feels like it's always been there ;-)

@ryan: reckon it could be by default on the next release?

Share this post


Link to post
Share on other sites

It's in the dev branch now

  • Like 2

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 louisstephens
      So I ran into a very strange issue today. I have a template with a pagetable and I went to add an item to it, when I went to select an image (for an image field) the page instantly threw up an error
      "ProcessPageSearchLive: No search specified"
      The page's content also switched to the image attached. This all worked perfectly last week (local mamp box). Has anyone experienced this before, and how did you solve it?
       

    • By Pip
      Hi everyone, 
      Is there a way for us to replicate the "http://mydomain.com/processwire/page/edit/?id=xxx" and change the template to match my site template? 
      I'm terribly happy with the admin / backend page edit. It covers literaly everything I want to empower my non super admin user in updating pages such as validation, repeater management, file upload. 
      I wish not to allow the users to see the backend for both security and aesthetic reasons. 
      Thanks and hope to hear from you soon. 
       
    • By benbyf
      Hi, Looking to create form elements on a page–some input with a colection of form inputs and the appropriate labels and variables for that input. I've used ProForms in the past and rolled out my own when creating simply one off forms, but I wonder if anyone has found a good way of allowing form creation on page editing so that clients can adhocly make and edit forms?
      Thanks
    • By lenoir
      Is it possible to let people edit a page without having to have a user-role?
      My case is the following:
      Visitors fill in a form (Formbuilder) which is saved to pages. They get a confirmation email which could contain a unique editing link. In case they need to update some information, they can click on this link, edit the fields and save. 
      Am I totally off? Is there a better practice? 
    • By AndZyk
      Hello,
      this maybe a simple question, but it bothers me for a while now:
      There used to be a warning, if two or more user try to edit the same page. But ever since AdminThemeUIkit I haven't seen it any more.
      Is this a bug or are there special circumstances under which the warning will be displayed?
      If I am logged-in in the same browser with one default and one privat window, I don't see this warning. But also different browsers on different machines in the same network don't see this warning.
      I was looking for the blog post on which this feature was announced, but couldn't find it anymore.
      We had the case, that two people were writing a text for the same page, but after person A saved the page first, the text of the person B was lost. I know we could have used ProDrafts for this case, but it shouldn't happen in the first place.
      I would appreciate some feedback. 😀
      Regards, Andreas
×
×
  • Create New...