Posts Tagged ‘Drag’n Drop’

Anyone who visited Mashable lately, the popular social news website, might have seen the "drag to share" functionality which appears when hovering an image.

It is a smart technique which encourages visitors to share a story by offering a quite fun usage.

Drag To Share With jQuery

Nettuts+ is sharing a very nice tutorial (with source) that enables you to implement this feature using jQuery & jQuery UI.

It makes use of the draggable & droppable components of jQuery UI to make drag’n dropping & targeting objects possible.

To see how it works, a demo is provided as well.

jQuery UI Multiselect is a widget that converts html multiple select inputs into slicker interfaces.

It makes searching within the options possible which is very functional for large lists & selected items can be re-ordered by drag’n drops.

jQuery UI Multi Select

It can display the number of selected items & for an easier selection, there are select all/deselect all links provided.

The widget is unobtrusive & and be styled with ThemeRoller.

Wix is a free web-based service for creating simple to advanced Flash websites.

It offers 100s of ready-to-use and well-categorized free Flash templates (like e-flyers, photographers, business & more) or everything can be created from scratch with a blank one.

Wix

Wix is very easy to use with its drag’n drop editor that enables anyone to add:

  • any type of media (sound, video, images)
  • shapes, cliparts, animations, effects
  • advanced photo albums (slideshows, coverflow, carousel & more)
  • & lots of widgets like Google Maps, RSS, contact forms

to their websites.

If you want to sell stuff, the application has a solution for that too. It offers PayPal buttons to be added & configured with ease.

Although Wix looks like a perfect fit for anyone who is not into or new to web design (considering it does not require any programming skills), it is also a solution for experienced users to create impressive websites very quickly.

Websites created by this free web design service are search engine friendly & hosted free. For anyone looking into getting more with Wix, check the premium upgrades.

P.S. This post is a sponsored review.

jMonthCalendar is a jQuery plugin for creating an event calendar which displays the calendar as a month-view.

Once the plugin is initialized & events array is mentioned, the calendar is ready. But jMonthCalendar offers extension points which makes it possible to interact with it like adding events, changing the month & more.

jQuery Event Calendar Plugin

The calendar supports multi-day events & drag’n drops for updating event dates easily.

It can be browsed by months & years with the prev-next links. And, the plugin uses the beautiful DateJS library for date functions

FullCalendar is a jQuery plugin for creating a full-sized calendar with drag’n drop support that can fetch events via Ajax requests on-the-fly.

It can be easily configured to use your own feed format (an extension is provided for Google Calendar).

jQuery Drag'n Drop Calendar

The plugin does not come bundled with features like "changing an event’s name or time" but has hooks for user-triggered events that makes it possible to add such features.

The calendar’s look/feel can be customized via CSS & it is well-documented.

After publishing ScheduledTweets yesterday, I received e-mails asking "how the drag’n drop & saving the new positions to the database was working".

Drag’n drop generally looks hard-to-apply but it is definitely not by using JavaScript frameworks. Here is, how it is done by using jQuery & jQuery UI:

jQuery Drag'n DropjQuery Drag'n Drop DemojQuery Drag'n Drop Download

The Database:

We create a simple database as below:

jQuery Drag'n Drop Database

The most important column in the database is recordListingID which shows us the order of the records.

This feature can be applied to any table by adding such a column to it.

The HTML:

We’ll be using an unordered list that is generated from a PHP query that lists the items according to the recordListingID value mentioned above.

Here it is:

</p>
<div id="contentLeft">
<ul>
    <li id="recordsArray_&lt;?php echo $row['recordID']; ?&gt;">&nbsp;</li>
</ul>
</div>
<p>

 

The JavaScript:

We will be using jQuery UI’s sortable plugin.

 <script type="text/javascript">
$(document).ready(function(){ 

	$(function() {
		$("#contentLeft ul").sortable({ opacity: 0.6, cursor: 'move', update: function() {
			var order = $(this).sortable("serialize") + '&action=updateRecordsListings';
			$.post("updateDB.php", order, function(theResponse){
				$("#contentRight").html(theResponse);
			});
		}
		});
	});

});
</script> 

We made the unordered list inside #contentLeft a sortable item, used the serialize function of jQuery to create the array and posted it to updateDB.php.

The PHP:

After posting the array of "new order of the items" to updateDB.php, we must run a query to update our database that will reflect the last positions of every item:

<?php
require("db.php");

$action 				= $_POST['action'];
$updateRecordsArray 	= $_POST['recordsArray'];

if ($action == "updateRecordsListings"){

	$listingCounter = 1;
	foreach ($updateRecordsArray as $recordIDValue) {

		$query = "UPDATE records SET recordListingID = " . $listingCounter . " WHERE recordID = " . $recordIDValue;
		mysql_query($query) or die('Error, insert query failed');
		$listingCounter = $listingCounter + 1;
	}

	echo '<pre>';
	print_r($updateRecordsArray);
	echo '</pre>';
	echo 'If you refresh the page, you will see that records will stay just as you modified.';
}
?>

You can see that this is the easiest part. We handled the array as $updateRecordsArray and used it inside a for each statement.

With a new variable named $listingCounter, while the for each statement runs, we have updated the values of recordListingID column of every item in the database with $listingCounter values. And that’s it.

MooGenda is an event calendar script, built with MooTools, that reads events from JSON requests.

The calendar supports drag’n drops of events & in every action a JSON request is sent for instant updates.

MooTools-JSON Calendar

This MooTools calendar supports 3 different views:

  • day view
  • week view
  • month view

With clicks, the calendar switches between views with a sliding animation & displays the details of that day/view/month.

Last week, a post at WebResourcesDepot had announced the giveaway of 3 MachForm, a self-hosted HTML form builder, licenses ($39/license).

Winners are selected & announced at the bottom of the post.

To remind, what is MachForm?

MachForm

It is a  HTML form builder that you can install it under any website, comes with full PHP source code & uses MySQL for storing data.

It simply makes these processes very easy:

  • creating forms
  • collecting data
  • analyzing & exporting the data

It is a flexible application which you can create almost any type of forms & style them to fit your needs.

Here are the winners?

  • Victor (comment #33551)
  • advative (comment #33673)
  • Jerry82 (comment #33488)

Congratulations to the winners, they will be contacted by MachForm staff shortly and thanks to everyone for joining this giveaway.

MachForm, an easy to use & quality HTML form builder application, is giving away 3 licenses to WebResourcesDepot readers ($39/license).

You can find the details on winning the licenses at the bottom of the post.

MachForm

What is MachForm?

It is a browser-based, installable HTML form builder that comes with full PHP source code (& uses MySQL for storing data).

Whether you’re a developer & can create your own forms or not, MachForms offers more than a standard form:

Front-end:

  • It supports any types of elements:
    • text
    • paragraph
    • multiple choice
    • dropdown
    • address & more..
    • File uploads (users can upload files!)
  • Secure: reCaptcha support.
  • Form validation (required-duplicates allowed? or not? – with chic tooltips)
  • Password protected forms
  • Limiting to 1 entry per user
  • Easy styling: each form has its own CSS
  • Custom redirection after a form is filled

MachForm Admin

Back-end

  • You can create new forms instantly
  • Forms can be designed from an Ajaxed admin interface with drag’n drops
  • Collected data can be exported to Excel & CVS
  • Get notified when a form is filled (multiple e-mails supported)
  • 1 click installation & more..

To sum up, MachForm is a complete form creator & manager for a website that can be used by anyone with ease.

There is a demo for the application, give it a try..

How to win the free licenses?

Commenting to this post is enough to join this giveaway.

Winners will be selected randomly via the query below on 20 January 2009 (1 week later).

SELECT * FROM wp_comments WHERE comment_post_id=740 AND comment_approved=1 AND comment_type='' GROUP BY comment_author_email ORDER BY RAND() LIMIT 3

Good luck to all : ).

EasyDiagram.NET is an open source ASP.NET diagram control.

Using AJAX, EasyDiagram.NET is very fast yet simple enough even for the beginners.

ASP.NET Diagram Control

Some features of this free ASP.NET diagram control:

  • Drag’n drop support
  • Direct-draw and orthogonal modes
  • Easy node adding
  • Customizable lines & nodes
  • Ability to react node clicks (via Ajax)

EasyDiagram.NET is definitely an amazing & professional-level control that is a must-have for every ASP.NET developer.

feed-holder
FeedBurner
  • activeCollab | Project Management
  • Manage your clients email marketing with sendcube
  • MailChimp
RapidxHTML - Converts Your PSD into XHTML Rapidly
PSD to HTML
  • EasyImg - Internet Graphics Engine
  • Virtual Private Servers - eTecc Web Hosting
  • PSD to HTML

Vivvo CMS - Web Publishing at your Fingertips