Keyword

Frontend editing cancel (Joomla! v3.2 - K2 v2.6.7)

More
10 years 10 months ago #121057 by Derk
Hi there,

On the frontend, when using the item editor there's a problem,
the cancel button (Annuleren in Dutch) does not work.
I might have found the place in the HTML code:

Actual code, Joomla! v3.2 - K2 v2.6.7

<tr>
<td class="button" id="toolbar-save">
<a onclick="Joomla.submitbutton('save'); return false;" href="#" class="toolbar">
<span class="icon-32-save icon-save" title="Opslaan"></span> Opslaan </a>
</td>
<td class="button" id="toolbar-cancel">
<a href="#" class="toolbar">
<span class="icon-32-cancel icon-cancel" title="Annuleren"></span> Sluiten </a>
</td>
</tr>


Change this line:
<a href="#" class="toolbar">
To:
<a onclick="Joomla.submitbutton('cancel');" href="#" class="toolbar">

I still have to figure out what to change in the K2 (php?) file.
Maybe a developer for the K2 project can help? I don't know if my solution
is correct (for example, do I need to add return true or false???)

Thank you in advance for your time and effort!!!

Derk

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 10 months ago #121058 by Yiota
Maybe you are facing javascript issues in your page. Some kind of conflict. Check in your browser's console to see if you are getting any errors.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #121059 by Derk
Only a warning:
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 10 months ago #121060 by Yiota
Also check if your page loads more than one jQuery library or any other plugin or extension that could cause a conflict with this.
When the item page is loaded through the frontend editing window do you notice anything else breaking, like maybe the tabs?

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #121061 by Derk
All the other buttons/tabs work well,
I disabled all modules active on the page,
that does not help...
The JQeury, I've no idea, but tried to disable jquery in the K2 parameters
that makes no difference...
I can send you a private message with login information?

Thank you very much!!!

Derk

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 10 months ago #121062 by Yiota
Check if you are loading more than one jQuery library through the Network of your browser's inspector or for any strange javascript file that could cause this issue.
Also if you are using K2 template overrides make sure that the itemform.php has no changes between your own and the one inside the component's folder.
Question: What Joomla! and K2 version do you use?

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #121063 by Derk
The JQuery file in the /media/jui/js is not present on my server.
My joomla version is 3.2, my K2 version is now the svn, but maybe it's better to
get back to v2.6.7 (same problem, tried the svn to fix it, no succes...).
Which version of JQuery should I use, and where can I download it?
Just put the download in the /media/jui/js folder?

Derk

Please Log in or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
10 years 10 months ago #121064 by Yiota
I think that joomla! 3.2 has the 1.10.2 version of jQuery included in that media folder. You should better get it from another joomla! 3.2 installation package to be sure and put it in the correct folder.
Then check again.

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago - 10 years 10 months ago #121065 by Derk
The jquery-1.10.2.min.map was missing, I downloaded it:
code.jquery.com/jquery-1.10.2.min.map
and also:
code.jquery.com/jquery-1.10.2.js
and put them in the /media/jui/js on my site.
That does not solve the problem.
Maybe it's something in the html generated? Adding:
Joomla.submitbutton('cancel');
makes it possible to close the frontend editor window...
---
<a class="toolbar" href="#" onclick="Joomla.submitbutton('cancel');">
<span title="Opslaan" class="icon-32-save icon-save"></span> Opslaan </a>
---
Edit: the striked lines were from the save button, I meant ofcourse the cancel button...

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #121066 by Derk
On another site, I saw the same html code (without the Joomla.submitbutton('cancel') )
and on that site the cancel button works fine, so it's not a html problem probably...

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum