×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Voting button will take to the bottom of the page

Voting button will take to the bottom of the page 14 years 7 months ago #6489

  • pantau
  • pantau's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
If you click vote button - either yes or no, the browser will automaticaly take you to the last comment on the bottom of the page.

EDIT: It's not only voting button but also a delete button.

Voting button will take to the bottom of the page 14 years 7 months ago #6492

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
This is a bug. It takes you to the comment form, when it should actually take you to the comment. Thanks for the report will be fixed in the next version.

Voting button will take to the bottom of the page 14 years 3 months ago #8248

  • pantau
  • pantau's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Hi, I am afraid it has not been fixed yet even thought the new version was released.

Voting button will take to the bottom of the page 14 years 3 months ago #8249

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey pantau,
there is no new version right now :) There is just an alpha out there. The next alpha in Januar/Februar will fix the problem with the voting.

Voting button will take to the bottom of the page 14 years 3 months ago #8250

  • pantau
  • pantau's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Hey, you are right. Sorry for the confusion. :) Happy New Year!

Voting button will take to the bottom of the page 14 years 3 months ago #8271

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
1) Open this file:
components/com_comment/joscomment/jscripts/client.js

2) Search for this function:
function JOSC_addNew()
{
    JOSC_resetFormPos();
    JOSC_goToAnchor('CommentForm');
}

3) Comment-out the anchor call like so:
function JOSC_addNew()
{
    JOSC_resetFormPos();
    //JOSC_goToAnchor('CommentForm');
}

Please let us know if you encounter any side effects :)

Voting button will take to the bottom of the page 14 years 3 months ago #8274

  • pantau
  • pantau's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
HI, I did what you said and it's still the same :(

Voting button will take to the bottom of the page 14 years 3 months ago #8277

  • pantau
  • pantau's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
OK, it works now. Not sure why but it did not work when I changed it. Good job! I appreciate your help :)

Voting button will take to the bottom of the page 14 years 3 months ago #8310

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
It would of just been the cache :)

Voting button will take to the bottom of the page 14 years 3 months ago #8317

  • pantau
  • pantau's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
OK, I found one side effect. After the change, when you click at "add comment" it does not do anything instead of taking you to the "add comment" window.

Voting button will take to the bottom of the page 14 years 3 months ago #8324

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Yeah I realized that the next day :P Do this instead to the same client.js file:

(1) Change the "JOSC_addNew()" function (same one from above) back to it's original...
function JOSC_addNew() {
    JOSC_resetFormPos();
    JOSC_goToAnchor('CommentForm');
}

(2) Search for this function...
function JOSC_ajaxReady()
...and change this line (inside the function)...
JOSC_addNew();
...to this...
JOSC_resetFormPos();


With those changes, JoomlaComment will never jump to the Comment Form (or any other existing URL anchor) from AJAX operations but instead only when you click the specific "Add Comment" button manually. I already made these changes to the latest alpha version and it's worked well for me so far :)

Voting button will take to the bottom of the page 14 years 3 months ago #8463

  • pantau
  • pantau's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
I managed to add your code only yesterday and it works! Thanks so much for your help! :)
  • Page:
  • 1
Time to create page: 0.160 seconds