Hi everyone,
I apply modifications here by Hanny : community.getk2.org/forum/topics/k2-add-new-item-window-resize?xg_source=msg_com_forum&id=3536014%3ATopic%3A73456&page=16#comments
With that, when the user click on the save button, the pop-up box is closed and the page refresh.
But I would do a more friendly system for the users :
When they click on the save button, they would have a gif animation in the window while the article is saved, and when it's done, they would have a message who said them "Item send".
I want to do that because when you put an image and attachments, it's pretty long to saved the article, and I think the user will find the time long...
I know that I can display an alert like : alert( 'Item send' ) when the article was save, but how I can display a gif or a message while the article is saved ?
Thanks ;)
PS : Also, I have an other question to ask you, in form.php :
How I can have the category selected by the user in the drop box ? Because I have to customize the message to the user if he can publish or not ;)
So I wrote that code :
$user = &JFactory::getUser();if ($user->authorize('com_k2', 'publish', 'category', 'all') || $user->authorize('com_k2', 'publish', 'category', [Category])){ alert('Item published'); }else{
alert('Item send to an administrator');
}
But I need the if of the category :/
I apply modifications here by Hanny : community.getk2.org/forum/topics/k2-add-new-item-window-resize?xg_source=msg_com_forum&id=3536014%3ATopic%3A73456&page=16#comments
With that, when the user click on the save button, the pop-up box is closed and the page refresh.
But I would do a more friendly system for the users :
When they click on the save button, they would have a gif animation in the window while the article is saved, and when it's done, they would have a message who said them "Item send".
I want to do that because when you put an image and attachments, it's pretty long to saved the article, and I think the user will find the time long...
I know that I can display an alert like : alert( 'Item send' ) when the article was save, but how I can display a gif or a message while the article is saved ?
Thanks ;)
PS : Also, I have an other question to ask you, in form.php :
How I can have the category selected by the user in the drop box ? Because I have to customize the message to the user if he can publish or not ;)
So I wrote that code :
$user = &JFactory::getUser();if ($user->authorize('com_k2', 'publish', 'category', 'all') || $user->authorize('com_k2', 'publish', 'category', [Category])){ alert('Item published'); }else{
alert('Item send to an administrator');
}
But I need the if of the category :/