- Posts: 119
COMMUNITY FORUM
K2 Add new item window resize
- juju
-
- Offline
- Premium Member
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
- Posts: 119
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
- Posts: 119
But really really dirty, and I don't all understand what I do ^^ But it's work :p
It display a little gif in center of the screen (not sure in the center) while saving the item.
So, here is how I do , but warning : it's just a test version...
In form.php :
Just before <form action="index.php" enctype="multipart/form-data" method="post" name="adminForm" id="adminForm">, add :
<div id="charge-sbox-overlay" style="z-index: 65555; xg-p: fixed; top: 0px; left: 0px; visibility: hidden; opacity: 0.7; width: 1349px; height: 619px;" class=""></div>
<div id="charge-sbox-window" style="z-index: 0; xg-p: fixed; top: 35%; left: 50%; padding: 2px; width: 100px; height: 100px; margin-left:-50px;" class=""><div id="charge-sbox-content" style="visibility: hidden; opacity: 1;" class="ssbox-content-iframe"><iframe height="100" frameborder="0" width="100" src="www.notreassurance.com/img/gif-anime_80px.gif"></iframe></div></div>
After that, in the beginning of the file, after <script type="text/javascript"> , add :
function chargement(){ document.getElementById("charge-sbox-window").style.zIndex="70000"; document.getElementById("charge-sbox-content").style.visibility="visible"; document.getElementById("charge-sbox-overlay").style.visibility="visible"; }
And finally, add this just before syncExtraFieldsEditor(), at the beginning of the function submitbutton(pressbutton) :
chargement();
Try to save an item, and watch the animation ;) Try with an image in the article, to see the animation few seconds ;)
I hope you could help me to simplify this code and make it better :)
Please Log in or Create an account to join the conversation.
- rexkramer
-
- Offline
- Senior Member
- Posts: 71
Interesting post! A lot of people have problems with the "silent progress", especially when people upload zipped galleries. Also, i am not a friend of the open modal window, when you hit the save button?! Is it possible to close the modal window after the save or cancel action automaticly?
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
- Posts: 119
(see also previous pages), with K2 Multi Notify, and also others modifications I do,
I have now :
- The user click on "add an item", a pop up appear, the size of the pop-up is automatically sized to 80% of the screen.
- The editor is JCE, and I modified the skin to have the same minimal editor like on this forum.
- The user write his article, and click on save.
- An animation appear while the article is saved
- When it's finished, an alert message is displayed, with different message if the user can publish or not.
If the user can publish, I display an alert message "Thanks, Your item have been published !".
If the user can't publish, I display an alert message "Thanks, your item has been sent to a moderator, it will be published after verification." and an email is automatically sent to a moderator, with in the mail : a preview link and a link for publish article.
- The pop-up box for adding article is closed automatically and the page is refresh. If the user could publish, he is redirected to his fresh article ;)
I think it's really complete :) I'll do a complete tuto if you are interested ;)
Please Log in or Create an account to join the conversation.
- rexkramer
-
- Offline
- Senior Member
- Posts: 71
Many thanks for the compact overview. I was getting off-topic, i know. Sometimes its hard to find, join and understand a disscussion, which is already going on for quiet some time. Thanks again.
By the way, is there any interest from JoomlaWorks in all this neat stuff. All the modifications sounds really usefull and should be integrated.
Please Log in or Create an account to join the conversation.
- rexkramer
-
- Offline
- Senior Member
- Posts: 71
Please Log in or Create an account to join the conversation.
- Hanny
-
- Offline
- Senior Member
- Posts: 48
We should fork it for that one feature! J'k!
Please Log in or Create an account to join the conversation.
- rexkramer
-
- Offline
- Senior Member
- Posts: 71
(Replying with quotes is a real pain on ning)
It is a big usability-bug. Period.
A fork: Definitely worth a thought :-) ;-)
...the developers have said it's not a bug
...We should fork it for that one feature!
Please Log in or Create an account to join the conversation.
- rexkramer
-
- Offline
- Senior Member
- Posts: 71
Thousand thumbs up for all your efforts!
Please Log in or Create an account to join the conversation.
- Hanny
-
- Offline
- Senior Member
- Posts: 48
I think a google code would be a good idea for this particular stuff, you're probably right.
Please Log in or Create an account to join the conversation.
- Hanny
-
- Offline
- Senior Member
- Posts: 48
I understand what you mean - but that was the only way I could get the page redirect to properly work. I know it's not the best way at the moment, but so far it was all I could find that would work to get rid of that issue.
I (like you) will keep trying!
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
- Posts: 119
And for the loading animation, it works very well but I'm not sure of that I modify ^^
And finally, I would like to make available my modified file form.php, but I think maybe I do other modification you don't need for your website, so the most simple is :
-I clean my file form.php
-I put the file on a new topic with a tutorial ;)
I'll try to make a good and complete tutorial tonight, and try to explain myself clearly, despite the fact I'm a french man so my english is not really perfect :p
Please Log in or Create an account to join the conversation.
- Hanny
-
- Offline
- Senior Member
- Posts: 48
I tend to get confusing sometimes when I talk about lots of things all at once :)
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
- Posts: 119
Please Log in or Create an account to join the conversation.
- Hanny
-
- Offline
- Senior Member
- Posts: 48
Also,
I have found that if you add this code when you have a user who is not authorized to publish adds an article, it will redirect them to their 'page of articles' instead of reloading the page.
I was looking at that because in another thread lolothegiraffe said that occasionally the page would get caught into a reload, and it would keep reloading over and over.
I used your form.php code, but I replaced:
parent.window.location.reload();
with:
parent.window.location="<?php echo (JRoute::_(K2HelperRoute::getUserRoute($user->id))); ?>";
While that takes them to their page, the URL is pretty ugly - but it works for now.
I also like the animation you put in there, going to see if I can get it to pop-up in another modal box while it saves!
I did notice though - that when I put the code in for the animation - it causes the form to have a huge blank white space at the top, and then the user has to scroll down to get to the form. Hope we can resolve this!
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
- Posts: 119
I found the animation on the web, I put directly the url of the image, without saving it on the server.
going to see if I can get it to pop-up in another modal box while it saves!
It's exactly I want to do since this morning ^^ That's why said it's work for now, but there is a cleaner solution, for sure ;)
And for the redirection problem, I really want to redirect the user to the article he has just saved (for the user who can publish only) but it cause this fu***** error of Calendar, so I just reload the page for now :/
Please Log in or Create an account to join the conversation.
- Hanny
-
- Offline
- Senior Member
- Posts: 48
www.ajaxload.info/
Please Log in or Create an account to join the conversation.
- juju
-
- Offline
- Premium Member
- Posts: 119
Please Log in or Create an account to join the conversation.
- Hanny
-
- Offline
- Senior Member
- Posts: 48
Please Log in or Create an account to join the conversation.