|Drag 'n' Drop is here!|
|Written by Ankit Ahuja|
|Tuesday, 14 July 2009 14:59|
It’s been more than a week since I last updated you on my project that is dealing with increasing the frontend editing capability of Joomla! I’m excited to announce that this week I was able to implement Drag ‘n’ Drop placement of modules. In addition to that, I was able to fix some bugs and refine the code. You can download the latest release from JC -> http://joomlacode.org/gf/project/frediting/frs/.
<div id="newsflash" data-position="newsflash"> <jdoc:include type="modules" name="newsflash" style="raw editor" /> </div>
The ‘data-’ type of attribute is supported in HTML 5. I might choose an alternative attribute, such as ‘rel’ or ‘alt’ but the idea of using a unique attribute is so that it does not interfere with the layout of any template. You can give this attribute to all DIV Containers for whose positions you want to enable Drag and Drop. So, for example, if you want to leave out the footer, simply don’t include the ‘data-position’ attribute in its container.
When you drag and drop the module into a new position and/or order, an AJAX request is sent to the method ‘saveOrder’ in the module controller. The controller method then saves the new position and/or order.
In addition to the demo, I have now set up my project at joomlacode.org so that you can help me find bugs. For now, the SVN source is still at labs. I’m in the process of moving my SVN repository to Joomla Code.
I might think about implementing editing of menu parameters if time permits. But, atleast for the following week, I’ll be fixing bugs and glitches in code as well as refining it and adding support for IE. I also have to start working on an administrative interface where you’ll be able to configure the behavior of the plugin, including setting the background-color on hover over titles, specifying unique classes for containers of article and page titles, etc.
SVN Source: http://labs.joomla.org/svn/labs/playground/people/ankit