Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Location of confirmation popup when deleting a discussion post.

Hi All,

When I click on the "Delete" for a post that is part of a long scrolling discussion the confirmation popup "Are you sure you want to do that" window appears way at the top of the discussion, out off the the visible browser window. Anyway to get this to display where it can be seen?

Thanks
Paul

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    You can adjust where it comes up however it may affect the other popups and you would have to fix it so the change only affects the one you want .

    My solution is to put a back to top script with an arrow or text that when you click it sends you back to the top of the page real fast.

  • Options

    I think you can turn off confirmation delete, but I don't recall how or if what I am saying is a red herring. If nobody finds out and posts first, i'll look into it later,

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2013

    here is the script I was talking about, if the forum is very long this will help get back to the top fast.

    http://vanillaforums.org/discussion/22752/howto-back-to-top

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    @peregrine

    was curious and bored so I tried various combos of this but no cigar :(

    $Configuration['Garden']['Popup']['ConfirmDelete']= 'FALSE';

    I think having that confirm is a good thing, gives me a chance to change my mind :)

  • Options
    peregrineperegrine MVP
    edited March 2013

    Yea V,

    I looked to, I may have been high on red herring juice. Probably my imagination, since i couldn't locate a config statement anywhere relating to it.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Thanks all for taking the time to answer, much appreciated.

    vrijvlinder - will try the jump code when I get a chance. Actually just tried it in Safari and IE9 and that's exactly how it behaves now before I change anything (it jumps to the top). However Firefox my browser of choice does not, it just sits there.

    I believe the logic that does the positioning is the function getPagePosition in vanilla/js/library/jquery.popup.js . Tried messing with it and it does look like Firefox does not return the scroll offset correctly.

    Thanks
    Paul

  • Options

    Just a clarification. When I said "Actually just tried it in Safari and IE9" I did not mean I have already tried adding vrijvlinders' jump logic. I meant that in those browsers vanilla works that way as standard without code changes.

  • Options

    Just wanted to mention I use Chrome and am in the same situation as @duke748. When I click to delete, it doesn't jump me to the confirm dialogue. I'll try the jump code (it seems handy anyway!) but it would be more ideal if we could figure out how to make the popup work how it's supposed to in all browsers.

  • Options
    SrggamerSrggamer HardCore Gamer ✭✭✭

    Works in Internet explore, FireFox, Safari, don't use chrome to cant say.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    @Celeste

    You could try this to move the pop up closer to the form.This would only affect that page and not the sign in popups.

    body.Vanilla.Discussion.Index .Overlay div#Popup.Popup{
    position:relative!important;
    top: 50%!important; 
    }
    
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    or maybe a script like this

    < script type="text/javascript" >
    
    function mouseXY(e){
    var X, Y;
    var ev=(!e)?window.event:e;//IE:Moz
    if (ev.pageX){//Moz
    X=ev.pageX+window.pageXOffset;
    Y=ev.pageY+window.pageYOffset;
    }
    else if(ev.clientX){//IE
    if(document.documentElement){//IE 6+ strict mode
    X=ev.clientX+document.documentElement.scrollLeft;
    Y=ev.clientY+document.documentElement.scrollTop;
    }
    else if(document.body){//Other IE
    X=ev.clientX+document.body.scrollLeft;
    Y=ev.clientY+document.body.scrollTop;
    }
    }
    else{return false}//old browsers
    var myDiv=document.getElementById('movingDiv');
    myDiv.style.left=(X-2)+'px';
    myDiv.style.top=(Y-2)+'px';
    }
    document.onmousemove=mouseXY
    < /script >
    
    < div id="movingDiv" style="top:0px;left:0px;position:absolute;border:1px groove #000000;
    width:250px;height:96px;background-color:#CCCCCC" onclick="this.style.display='none';" >< /div >
    
    
  • Options
    CelesteCeleste New
    edited April 2013

    @vrijvlinder I don't think changing the CSS is the best way to go since that way, I have to scroll down if I'm trying to delete something toward the top. For the script, where would I place that code?

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    The same way you would add any script. It may not work on a tpl based theme without some tweaking. The idea of this script is to follow your mouse with a moveable div.

    Maybe a plugin can be made for this. I will look some more for solutions....

Sign In or Register to comment.