Keyword

K2 Add new item window resize

More
13 years 7 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 7 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 7 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 7 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 7 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 7 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 7 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 7 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 7 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 6 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