MochaPHPControl (for MochaUI)

a place to post your own scripts

Moderator: 1.2 Moderators

Forum rules
  • Each Script may have only one thread per mayor release.
  • The owner of the thread should keep the first post up to date (newest version, demo...)
  • The title should include the version -> "[v0.1] Nice mooPlugin"
  • see also the detailed Rules

MochaPHPControl (for MochaUI)

Postby Quest on Fri Nov 20, 2009 8:50 am

Hey there

MochaUI is really a gread UI framework, perhaps one of the best!
But like it is used on the demo pages included in the package I think it is a little bit too static for dynamic web applications. The full application is defined by just one static init script.

So I started in coding some PHP classes to generate this init script dynamically.

This is my first release of MochaPHPControl. (Download at MochaUI google group files)
Please don't use it in productive systems, this first release is just for testing, code review and feedback what I could / should change.
Demo MochaUI Application with MochaPHPControl: http://test.divepage.net/mpc/
Editor to look at the code: http://test.divepage.net/editor/

Explination:
The classes are located in inc/classes.
The full application is controlled by the static classes sLayout and sLayoutCollection.
Instead of the old js/mocha-init.js my application loads /mochaInit.php. In this file all the columns, panels and windows are defined using the php classes. The file data/json-windows-data.js is also replaced by a php file.

Output is a collection of windows, colums and panels in a global JS object called 'muiC'.
Columns and panels will be initialized automatically.

Windows can be opened in several ways:
by using there function defined in muiC.w.[windowID]()
by setting the state to open (php side, look at parametrics window for example)
by using the action attribute of links

By the way, I modified the handling of links.
If you want to open a link in a specific panel, just use the ID of the panel inside the 'target' attribute. The URL defined in 'href' will be loaded into the panel by XHR.
Much more power gives the handling of the action-attribute. Expected content of 'action' is a JSON string.

open: opens the window with the given ID from the collection muiC.w
example: action="{open: 'about'}"
update: update an element using MochaUI.updateContent. Expects a JSON object containing the parameters required by updateContent.
content: Load predefined content from collection (used for splitPanel)
notify: just give a notify to the user, expects the string to notify
exec: execute a MUI function like tileWindow or simmilar

If there is no target and no action defined links will allways be opened in a new window.

To ensure that this new link handling is used for all links, included recently loaded from XHR, I added a small piece of code to js/source/Core/Core.js on line 252.

OK,
I hope you like it and I hope to get some feedback for my further development on this classes.

Greetings from germany, Michael

PS: demo installation on webserver will come in the next days
Last edited by Quest on Fri Nov 20, 2009 9:33 pm, edited 1 time in total.
Quest
mootools connoisseurs
 
Posts: 40
Joined: Mon Jul 28, 2008 9:56 am

Re: MochaPHPControl (for MochaUI)

Postby Quest on Fri Nov 20, 2009 9:38 am

Problem in IE8
scripts/onloadScript.js has an error on line 34: .get does not work.
can anyone help me to get the funktion updateLinks() working in IE?
Quest
mootools connoisseurs
 
Posts: 40
Joined: Mon Jul 28, 2008 9:56 am

Re: MochaPHPControl (for MochaUI)

Postby Quest on Fri Nov 20, 2009 9:31 pm

OK, I installed a demo.
MochaUI Application with MochaPHPControl: http://test.divepage.net/mpc/
Editor to look at the code: http://test.divepage.net/editor/
Quest
mootools connoisseurs
 
Posts: 40
Joined: Mon Jul 28, 2008 9:56 am

Re: MochaPHPControl (for MochaUI)

Postby scramatte on Mon Nov 23, 2009 11:41 pm

Hello Quest

We are interested to integrate your project to Zend Framework.
Please contact me by PM or email. I've let you a message this sunday ...

Might be we can find an arrangement to sponsor your developement
Best regards
scramatte
 
Posts: 1
Joined: Sun Nov 22, 2009 6:28 pm

Re: MochaPHPControl (for MochaUI)

Postby soundseller on Sat Jan 16, 2010 2:36 pm

Thanks for the work.
As a happy MochaUI user I will have to check this out some time.
Good to see that MUI is not totally abandoned.
Cheers
---------------------------------------
http://soundseller.eu
User avatar
soundseller
 
Posts: 17
Joined: Sun Sep 14, 2008 4:48 pm
Location: Germany

Re: MochaPHPControl (for MochaUI)

Postby Quest on Tue Feb 02, 2010 9:49 am

@soundseller
No, for me it is not abandoned and it will never be. It's just the greatest JS UserInterface Lib I've ever seen.
I still hope that anyone will pick up that project to continue Gregs great work.

@scramatte
For my package I will use a MIT style licence like most of the community driven code for mootools.
So feel free to integrate it to the framework.
Please give me some feedback for my further development on this package.

PS: as I realized the demo doesn't work at the moment.
Will work on this the next days.
Quest
mootools connoisseurs
 
Posts: 40
Joined: Mon Jul 28, 2008 9:56 am


Return to Your Scripts

Who is online

Users browsing this forum: Alexa [Bot] and 3 guests