This issue has been my absolutely biggest gripe with K2 since the beginning, and IMHO, HAS to be changed for the next release! I have a lot of clients who are not too thrilled with it the was it is now, and why I have "adjusted" it as follows:
To change the size of the Modal Front End pop-up editor for all instances:
Find this code: handler:'iframe',size:{x:990,y:650}
… and replace with values that fit your requirements; I chose 910px and 510px which gives a nice all around margin, including the “Close X”, on a laptop with 1,024 x 768 resolution.
1.components/com_k2/templates/user.php
- line 46
- line 107
2.components/com_k2/templates/default/category.php
- line 47
3.components/com_k2/templates/default/category_item.php
- line 31
4.components/com_k2/templates/default/item.php
- line 30
- line 111
5.modules/mod_k2_login/tmpl/userblock.php
- line
Alternatively, and what I am now doing with all my client K2 – enabled sites is to have the editor open in a new tab/window (target = _blank). This has the added benefits of:
- not inadvertently leaving the Item “locked” if one clicks outside the pop-up and closes it; once “Submit” has been clicked and the “Item Saved” is displayed, the new Item show up in the K2 Item listing in the “proper” (unlocked) state
- one can have more than one Item Editor “tab” open; may come in handy, but again, watch the 'time-out' issue
Here's how I changed the code in ALL of the above locations (may or may not be appropriately “elegant”, but it works :) )
- replace:
a class="modal" rel="{handler:'iframe',size:{x:990,y:650}}
- with:
a target="_blank"
Maybe I am just “old-fashioned”, but I believe Lightboxes are great for photos, etc., but anything that has to do with a “program's” functionality sould be provided within it's environment; a more consistent experience for the user, especially the casual or non-tech end user (i.e. the client! :)
Now, if we could ONLY get the PROPER buttons! Save, Save & New, Apply, Cancel ... my next "quest" :)