Keyword

K2 Add new item window resize

More
13 years 11 months ago #87387 by rexkramer
Replied by rexkramer on topic K2 Add new item window resize
Simply send it to Fotis , so it will make its way into the new release ;-)

juju said:
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 put the file on a new topic with a tutorial ;)

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

More
13 years 11 months ago #87388 by juju
Replied by juju on topic K2 Add new item window resize
Are you sure ? Moderator wasn't really motivated until now...

 

The release date of the next version is fixed ?

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

More
13 years 11 months ago #87389 by Hanny
Replied by Hanny on topic K2 Add new item window resize
Who is Fotis, and how would we go about contacting them?

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

More
13 years 11 months ago #87390 by juju
Replied by juju on topic K2 Add new item window resize
Fotis : it's not the men behind the JoomlaWork profile ?

 

If it's that, I already contact him asking for help, he didn't even deign to reply something...

 

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

More
13 years 11 months ago #87391 by rexkramer
Replied by rexkramer on topic K2 Add new item window resize
Fotis is joomlaworks – at least the avatar picture shows himself ;-) If it is an unknown support-staff, well... than he is a celeb like paris hilton ;-) I am sure celebs have volunteers and PRagencies for twitter and facebook LOL

Anyway, i hope someone responsible is monitoring this discussion, and will recognize the important and crucial stuff in it!
juju said:

Fotis : it's not the men behind the JoomlaWork profile ?

 

If it's that, I already contact him asking for help, he didn't even deign to reply something...

 

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

More
13 years 11 months ago #87392 by Hanny
Replied by Hanny on topic K2 Add new item window resize
I know some of the key K2 folks have had their eyes on this thread for some time now - so it's not as if they're unaware of our progress ;)

 

When do juju and I become part of the development team, that's the question! :-D

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

More
13 years 11 months ago #87393 by juju
Replied by juju on topic K2 Add new item window resize
Hanny said : When do juju and I become part of the development team, that's the question! :-D
 

For me I think it will not for now ^^ Even if we do our best, I'm sure that the developpers of K2 could add the function we've proposed in few minutes... because they know exactly how K2 worked, they designed it, and it's more easy in this case...

That's what's annoying, I know this developpers can't answer to all people who have a problem or a suggestion, but here we have very good suggestions ^^ And we've practically solved the problem ourself, so they have just to improve our work and make it cleaner. This issue with save button, close the popup, and maybe the animation while saving an item are highly requested features, for almost years, so a little consideration and help from developpers would be welcome :) That's why I contact the JoomlaWork guy and three others people to tell them I tried with Hanny to simplify the add form, but no reply, at all... 



   

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

More
13 years 11 months ago #87394 by rexkramer
Replied by rexkramer on topic K2 Add new item window resize
@K2 devs

Listen guys, here is really some hot and badly needed stuff for K2 !!!

@juju

Totally agree with you. Nothing more to add.

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

More
13 years 11 months ago #87395 by juju
Replied by juju on topic K2 Add new item window resize
^^ Hope make the developpers come...

 

I managed to make the animation appear in a new modal window, and it's more simply, just two thing to add in the code. But I have a problem : when we call the function "chargement" at the beginning of the function "submitbutton", it's work, but if you forget to specify the category of the article or the title, the form is reloaded with the animation :/

 

 

Edit : maybe I solved the problem, the last issue I have is that in the animation pop-up, I have the cross in top-right corner (close button), I try to not display it, but for now I can't. It's annoying because if the user click on this close button, the form continue to save the article, and the user will maybe lost in all this pop-up thing...

 

 

So, here we go, delete everything that you've changed this morning for the animation popup, clean your form.php file.

 

Now, at the beginning of the file, just below <script type="text/javascript"> //<![CDATA[   (line 19)

We have :

 

function chargement(){

       SqueezeBox.initialize();

      SqueezeBox.fromElement(this, { handler: 'iframe', url: 'www.notreassurance.com/img/gif-anime_80px.gif', size: {x: 100, y: 100},

      onShow:$('sbox-window').setStyles({'padding': 0})

      });

}

 

function submitbutton(pressbutton) {      syncExtraFieldsEditor();     if (trim( document.adminForm.title.value ) == "") {

           alert( '<?php echo JText::_('Item must have a title', true); ?>' );

     } else if (trim( document.adminForm.catid.value ) == "0") {

           alert( '<?php echo JText::_('Please select a category', true); ?>' );

     } else {

           <?php if(!$this->params->get('taggingSystem')): ?>

           var tags = document.getElementById("selectedTags");

           for(i=0; i<tags.options.length; i++)

               tags.options.selected = true;

           <?php endif; ?>

           submitform( pressbutton );

      }

 

     if (trim( document.adminForm.title.value ) != "" && trim( document.adminForm.catid.value ) != "0"){                         chargement();

     }

}

 

 

That's all, be careful, in fact we add a function "chargement", and the second function "submitbutton" is already existing, I just add the last if case with the load of chargement function.

 

 

 

 

 

 

 

 

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

More
13 years 11 months ago #87396 by juju
Replied by juju on topic K2 Add new item window resize
I managed to remove the close button (top right cross), just replace the function "chargement" by these :

 

function chargement(){

           SqueezeBox.initialize();

          SqueezeBox.fromElement(this, {

              handler: 'iframe',

              url: 'www.notreassurance.com/img/gif-anime_80px.gif',

              size: {x: 80, y: 80},

              onShow:$('sbox-window').setStyles({'padding': 0}),

              onShow:$('sbox-btn-close').setStyles({'background': 'none'}),

              onShow:$('sbox-btn-close').setStyles({'height': 0}),

});

 

}

 

Still an other problem ^^  If the user click outside of the animation window, it return to add form and continue to saving...

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

More
13 years 11 months ago #87397 by Hanny
Replied by Hanny on topic K2 Add new item window resize
I can't wait to try this stuff tomorrow - good stuff juju!

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

More
13 years 11 months ago #87398 by juju
Replied by juju on topic K2 Add new item window resize
Yes ! I managed to understand how this squeezebox worked :) And I can delete force the user to wait until the end of saving ! (by disabling the closure of the squeezebox).

 

Little explanations : Squeezebox don't come with K2, they are integrated to Joomla, so we can use everywhere, it's just a type of window. K2 use the squeezebox for adding item for example, through the class "modal" in the add link :)

 

In fact, it's the modal.js file who control all these squeezebox, So I looked into the file modal.js, and we can see al options when a squeezebox is created :

 

var SqueezeBox = {

 

presets: {

size: {x: 600, y: 450},

sizeLoading: {x: 200, y: 150},

marginInner: {x: 20, y: 20},

marginImage: {x: 150, y: 200},

handler: false,

adopt: null,

closeWithOverlay: true,

zIndex: 65555,

overlayOpacity: 0.7,

classWindow: '',

classOverlay: '',

disableFx: false,

onOpen: Class.empty,

onClose: Class.empty,

onUpdate: Class.empty,

onResize: Class.empty,

onMove: Class.empty,

onShow: Class.empty,

onHide: Class.empty,

fxOverlayDuration: 250,

fxResizeDuration: 750,

fxContentDuration: 250,

ajaxOptions: {}

},

 

 

And, here, I see WHAT ?! : closeWithOverlay   !!!!

 

So I simply add this option and set to false in my code, and it works, now when you clicked outside of the animation squeezebox, it don't exit anything, it just forced the user to wait the end of saving :)

 

And I think these squeeze box are really interesting things, and i'm going to study all the others options :p.

 

So here is the new function chargement : 

 

function chargement(){



      SqueezeBox.initialize();



      SqueezeBox.fromElement(this, {

      handler: 'iframe',

      url: 'www.notreassurance.com/img/gif-anime_80px.gif',

      size: {x: 80, y: 80}, closeWithOverlay: false,

     onShow:$('sbox-window').setStyles({'padding': 0}),

     onShow:$('sbox-btn-close').setStyles({'background': 'none'}),

     onShow:$('sbox-btn-close').setStyles({'height': 0}),



});



}

 

Can you please test the various error cases ? For example, I had a bug with the animation when the users forget the title, or the category, I fix it, but maybe I forget something...

 

Thanks ;) Now, the code is preatty clean, and I understand what I'm doing :)

 

 

 

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

More
13 years 11 months ago #87399 by juju
Replied by juju on topic K2 Add new item window resize
And for those who are interested, maybe I'll explain how to add a preview button next to the save button. This button opens a new squeezebox with the preview of the article. The method is not really clean yet so I have to work on it...

 

And I keep thinking that his popup to add article is really not user friendly. You imagine ? If I do a preview button, so we'll have a preview squeezebox over the add squeezebox ? 

 

popup, popup, popup.... it's really annoying.

 

I would have a simple form, like when you create a topic on this forum. Like that, we could use squeezebox for preview, wait animation... and it would be clean and great for the user :) But transform the add squeezebox into a form embedded IN the website, I don't know how we can do this without change almost everything :/

 

 

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

More
13 years 11 months ago #87400 by juju
Replied by juju on topic K2 Add new item window resize
I wrote a little post on the "Advanced K2 users" discussion, I hope that change something...

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

More
13 years 11 months ago #87401 by rexkramer
Replied by rexkramer on topic K2 Add new item window resize
@Hanny @ juju

Just some thoughts for the restless coders... I have to admit, i am not a coder, but i can read some code at least. Though I have to do some PHP and JS modifications from time to time – but its definitely not my daily job! The K2 modal window behavior and its content plus the button combination reminded me on:

NoNumber.nl 's AdvancedModuleManager

That seems very close to the optimal behavior. You should have a look at the code, or even better: Contact Peter van Westen. I guess, he could be a great help!!! !!! Call him Mr. Modal ;-)

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

More
13 years 11 months ago #87402 by juju
Replied by juju on topic K2 Add new item window resize
So what's up guys ?

@Rex : Did you have the time to contact Peter ?

@Both of you : Did you test my work ? I had no more problems, except that in IE, the animation iframe have horizontal and vertical scroll bar, but I think you just have to change the size of the iframe.

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

More
13 years 11 months ago #87403 by Hanny
Replied by Hanny on topic K2 Add new item window resize
I haven't had time to test it yet - my weekend was really busy, but I will try and squeeze in some time today to give it a shot (no promises though).  I should be able to test it tomorrow for sure!

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

More
13 years 11 months ago #87404 by juju
Replied by juju on topic K2 Add new item window resize
Ok, thanks ;) I've not really free time eather, so it's not a problem if you don't test that today ;)

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

More
13 years 11 months ago #87405 by rexkramer
Replied by rexkramer on topic K2 Add new item window resize
@juju

Sorry, right after my last posts I had absolutely no sparetime... currently in a totally different job. :-(

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

More
13 years 10 months ago #87406 by juju
Replied by juju on topic K2 Add new item window resize
So, I have a little news, I found an other solution for the error "Calendar.setup", it's not really clean, but it works :

 

I simply delete the alert message in files :

 

/intranet/media/system/js/calendar-setup.js  (search the alert message : "Not found" ...)

/intranet/includes/js/jscalendar-1.0/calendar-setup_stripped.js (search the alert message : "Not found" ...)

 

I delete the alert message in this two files. Just after, nothing change, but I left two hours for lunch, and when I retry, no more alert error message ! I assume it takes a while to the system to refresh the news version of all js files.

 

Nevermind, it's not clean, but it works, and like that you can let the calendar fields in the file form.php ;)

 

But I hope it don't cause other problems... because this message appear for a good reason (I hope is not but ...).

 

 

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


Powered by Kunena Forum