Keyword

Toggle sidebar in 'add new item' modal

More
8 years 5 months ago - 8 years 5 months ago #153243 by Denis
Hello K2'ers, I was adding some css to my site today as I changed template. At some point the opening of the toggle sidebar tucked into the modal window (see attachment if it worked) and it is basically not visible.

I backtracked a few steps and no luck, but it was only basic css anyway.

I am referring to when a user clicks 'add new item' on the frontend to add an item and the modal window opens up. It actually opens fine, with the 'item form sidebar' there as it should be, then it slips away to the right, tucking itself in like the attachment.

ps. when I 'edit an item' it is fine as when scouring for a solution the changes I made, made this page full screen:
www.joomshaper.com/forums/k2-front-end-edit-item-modal-window-fix-small-sizing
www.joomlaworks.net/forum/k2-en/44524-k2-floating-add-new-item-bar-fix#150287

Attachment: imgur.com/erLPIKh

So if somebody has a solution or suggestion (make 'add new item' full screen or to fix display on the modal window) would be really appreciated.

Joomla 3.5
K2 2.6.9

Kind regards
Last edit: 8 years 5 months ago by Denis. Reason: space

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

More
8 years 5 months ago - 8 years 5 months ago #153246 by Denis
Replied by Denis on topic Toggle sidebar in 'add new item' modal
Fixed it: www.joomlaworks.net/forum/k2-en/24033-k2-add-new-item-window-resize

but used this to replace: rel="{handler:'iframe',size:{x:window.getSize().scrollSize.x-80, y: window.getSize().size.y-80}, onShow:$('sbox-window').setStyles({'padding': 0})}"

modules/k2_user/tmpl/userblock.php
and template/html......customtemplate/userblock.php

now I have edit item and
add new item from k2_user module are full screen :-) not modal.
Last edit: 8 years 5 months ago by Denis. Reason: link

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

More
8 years 5 months ago #153249 by Denis
Replied by Denis on topic Toggle sidebar in 'add new item' modal
Related question if that is ok?

The modal attached to the k2_user module, when I press the close button it takes me to mysite/index.php#

How can I change the direction e.g. index.php/bestpage

Many thanks.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 5 months ago #153261 by Krikor Boghossian
Replied by Krikor Boghossian on topic Toggle sidebar in 'add new item' modal
Hello,

This is the default functionality. These actions will open in a module.
You can override the module and manually change the links but this might cause unexpected behaviour.

As for the sidebar. Are you using any overrides for the itemform.php file?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
8 years 5 months ago #153284 by Denis
Replied by Denis on topic Toggle sidebar in 'add new item' modal
Hello Krikor, thanks for the info.

In terms of overrides, I would say no. Throughout K2 I found myself moving and deleting php but no overrides.

Back to the "save" and "close" buttons.

Save is fine, it saves and gives a message like "your item has been saved" 'add item' changes to 'edit item'.

But close is causing me problems, it used to redirect to index.php# now it just stays on the same k2 url for add or edit item (so the back button is the only way out).

Can I not edit these <a hrefs "#":

<tr>
<td id="toolbar-save" class="button">
<a class="toolbar" href="#" onclick="Joomla.submitbutton('save'); return false;"> <span title="<?php echo JText::_('K2_SAVE'); ?>" class="icon-32-save icon-save"></span> <?php echo JText::_('K2_SAVE'); ?> </a>
</td>
<td id="toolbar-cancel" class="button">
<a class="toolbar" href="#"> <span title="<?php echo JText::_('K2_CANCEL'); ?>" class="icon-32-cancel icon-cancel"></span> <?php echo JText::_('K2_CLOSE'); ?> </a>
</td>

to where I want them to go. above is itemform.php

Kind regards

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

More
8 years 5 months ago - 8 years 5 months ago #153287 by Denis
Replied by Denis on topic Toggle sidebar in 'add new item' modal
Update is that if I go to 'add item' using a menu item type =(k2) item edit form, brings me to the form -> press close and it closes back to the last page the user was on. Works perfect.

The way I'm referring to above in my previous post before the last one, is from clicking 'add new item' from the k2 user module.

So I can use the menu item instead. Wish I wasn't forced to do these things and be given a choice of how I wish to use K2.

-> so when I click on 'edit item' from within the item, the close still doesn't work in this. Just stays on the same page.

Any feedback or ideas appreciated.

Kind regards
Last edit: 8 years 5 months ago by Denis.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 5 months ago #153295 by Krikor Boghossian
Replied by Krikor Boghossian on topic Toggle sidebar in 'add new item' modal

In terms of overrides, I would say no. Throughout K2 I found myself moving and deleting php but no overrides.


This way you will lose all your edits when you update.
The edit it is intended to function this way. If you edit an item, you will remain on that page.

Which parts of K2 did you change?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
8 years 5 months ago - 8 years 5 months ago #153303 by Denis
Replied by Denis on topic Toggle sidebar in 'add new item' modal
edit: sorry yes I do have overrides in place.

Thank you. I don't believe I will lose them actually, as I did the whole com_k2 copy. I have my current template "custom" here: templates/mytemplate/html/com_k2/templates/mycustom_template (and I think I'll be sticking with 2.6.9 for a while, just that I only use K2 for one basic function - for users to add articles frontend, display them and edit them).

This has the usual suspects: category.php, item.php etc. I only edited these php files. I moved stuff properly for display purposes. e.g. I moved the avatar to the beginning of the item as opposed to the end, I moved 'blocks' of php after watching various (k2) tutorials on how to do this..

Ok then, you are left looking at the same screen if you try to edit one of your items (from the frontend to be clear), even though you press "close" --- (you say that is how it should function).

BUT

If I create an item (off a menu item as mentioned) -> I create it -> save it -> K2 shifts to 'Edit Item' -> I press 'close' -> it closes properly.

I mean it closes properly to the last page the user came from AND that is from an edit item screen.

Explaining this to the valuable users of my future site is not going to be fun. "if you are going to edit one of your items, the close button actually doesn't do anything, pay no notice and click back a few times, or manipulate the url to your liking".
Last edit: 8 years 5 months ago by Denis. Reason: edit

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

More
8 years 5 months ago #153304 by Denis
Replied by Denis on topic Toggle sidebar in 'add new item' modal
Urls might help:


1. Going into item and clicking "edit item" url =
mywebsite222.com/index.php?option=com_k2&Itemid=859&cid=453&lang=en&task=edit&tmpl=component&view=item
("close" does not work here i.e. it doesn't do anything)

2. Select to add new item from menu item =
mywebsite222.com/index.php?option=com_k2&Itemid=1000&lang=en&layout=itemform&task=add&view=item
(save works fine, after saving I stay on same screen, it switches to "edit item" instead of "add new item" and the url automatically changes to the url below).

3. "Edit item" url coming from "add new item" screen. These just switch over after pressing successfully pressing "save".
http://mywebsite222/index.php?option=com_k2&view=item&task=edit&cid=462&tmpl=component&Itemid=1000
(this is titled "edit item").
(close works here as discussed).

I have a close working on one edit item screen, granted it is a different url.

Any ideas how to fix this?

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


Powered by Kunena Forum