<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>jquery.matrixMap.js</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,9 @@
 jquery.matrix.js
+jquery.matrixMap.js
 Copyright 2009 Nicholas Hubbard
+Dual licensed under the MIT and GPL licenses:
+http://www.opensource.org/licenses/mit-license.php
+http://www.gnu.org/licenses/gpl.html
 
 This file provides a description for each jquery.matrix plugin.
 NOTE: Most plugins require some sort of configuration within MySource Matrix in order to talk to the server.  Please take a look at the tutorials at www.zedsaid.com/projects</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 /**
 * MySource Matrix Simple Edit Tools (jquery.matrix.js)
-* version: 0.3 (APR-16-2009)
+* version: 0.3 (May-05-2009)
 * Copyright (C) 2009 Nicholas Hubbard
 * @requires jQuery v1.3 or later
 * @requires Trigger or Asset configuration in MySource Matrix
@@ -28,188 +28,6 @@ function page_on_load() {
 	  
 
 /**
-* Plugin that allows you to browse the MySource Matrix asset tree structure.  
-* This is beneficial sometimes as you can bypass the java asset map.
-* It sends XML to Matrix, then receives an XML response.
-* Demo: http://www.puc.edu/dev/jquery-matrix-test-suite/matrix-map
-*
-* @version $Revision: 0.3
-*/
-$.fn.matrixMap = function (options) {
-	var defaults = {
-		root: 1,
-		showChildren: false
-	};
-	
-	var options = $.extend(defaults, options);
-	var obj = $(this);
-	
-	// Find out what site we are at
-	var proto = location.protocol;
-	var site = location.host;
-	var host_url = proto + '//' + site + '?SQ_ACTION=asset_map_request';
-	
-	// Construct our XML to send
-	//var xml_move = '&lt;command action=&quot;move asset&quot; to_parent_assetid=&quot;2858&quot; to_parent_pos=&quot;1&quot;&gt;&lt;asset assetid=&quot;47315&quot;  linkid=&quot;81951&quot;  parentid=&quot;2858&quot; /&gt;&lt;/command&gt;';
-	var xml_get = '&lt;command action=&quot;get assets&quot;&gt;&lt;asset assetid=&quot;' + defaults.root + '&quot; start=&quot;0&quot; limit=&quot;150&quot; linkid=&quot;10&quot; /&gt;&lt;/command&gt;';
-	
-	// Create our element
-	obj.append('&lt;ul id=&quot;map_root&quot;&gt;&lt;/ul&gt;');
-	
-	// Set somes image vars
-	var type_2_path = '/__lib/web/images/icons/asset_map/not_visible.png';
-	var type_2_image = '&lt;img class=&quot;type_2&quot; src=&quot;' + type_2_path + '&quot; /&gt;';
-	var branch_closed = '&lt;img src=&quot;/__lib/web/images/tree/branch_closed.gif&quot; /&gt;';
-	var branch_open = '&lt;img src=&quot;/__lib/web/images/tree/branch_open.gif&quot; /&gt;';
-	var branch_stalk = '&lt;img src=&quot;/__lib/web/images/tree/stalk.gif&quot; /&gt;';
-	
-	// Create our ajax to send the XML
-	$.ajax({
-		url: host_url,
-		type: 'POST',
-		processData: false,
-		data: xml_get,
-		contentType: &quot;text/xml&quot;,
-		dataType: 'xml',
-		success: function(xml) {
-			// Check each asset that we find
-			$(xml).find('asset').each(function() {
-				// Only include asset tags with attributesp
-				if ($(this).attr('assetid') &gt; 0) {
-					// Set some of our vars that will populate our asset map
-					var asset_id = unescape($(this).attr('assetid'));
-					var asset_status = $(this).attr('status');
-					var asset_link_type = parseInt($(this).attr('link_type'));
-					var asset_type_code = $(this).attr('type_code');
-					var asset_num_kids = parseInt($(this).attr('num_kids'));
-					var asset_name = unescape($(this).attr('name')).replace(/\+/g, ' ');
-					// See what kind of link type we have
-					if (asset_link_type === 2) {
-						// Type 2 link
-						var asset_image = '&lt;img class=&quot;asset_image&quot; src=&quot;/__data/asset_types/' + asset_type_code + '/icon.png&quot; /&gt;';
-						asset_image = type_2_image + asset_image;
-					} else {
-						// Type 1 link
-						var asset_image = '&lt;img src=&quot;/__data/asset_types/' + asset_type_code + '/icon.png&quot; /&gt;';
-					}
-					
-					// See if we have kids
-					if (asset_num_kids === 0) {
-						var indicate_kids = branch_stalk;
-					} else {
-						var indicate_kids = branch_closed;
-					}
-					$('&lt;li&gt;&lt;/li&gt;').html('&lt;a href=&quot;#&quot; class=&quot;icon_hold&quot;&gt;' + asset_image + '&lt;/a&gt; &lt;a id=&quot;a' + asset_id + '&quot; href=&quot;#&quot; rel=&quot;' + asset_num_kids + '&quot;&gt;' + asset_name + '&lt;/a&gt;').appendTo('#map_root');
-				}// End if
-			
-			});// End each
-			
-			// Set our first/last class
-			$('ul li:first').addClass('first');
-			$('ul li:last').addClass('last');
-			
-		}// End success
-		
-	});// End ajax
-	
-	// Lets click our parents to show their children
-	$('#map_root li a').live('dblclick', function(){
-		
-		// Get our current asset
-		var current_asset = $(this);
-		var sub_root = $(this).attr('id').replace('a', '');
-		var num_kids = $(this).attr('rel');
-		
-		// If there are no kids don't continue
-		if (num_kids === '0') {
-			return;	
-		}
-		
-		// Check to see if we already have a class
-		if (current_asset.hasClass('children')) {
-			current_asset.removeClass('children');
-			// Hide our tree
-			current_asset.parent().next('ul').hide();
-			return;
-		} else {
-			// This must meen that we can expand, so add a class
-			current_asset.addClass('children');
-			// Let it know that we have expanded so we don't have to load again
-			current_asset.addClass('cache');
-		}
-		
-		// Construct our XML to send
-		var xml_get = '&lt;command action=&quot;get assets&quot;&gt;&lt;asset assetid=&quot;' + sub_root + '&quot; start=&quot;0&quot; limit=&quot;150&quot; linkid=&quot;10&quot; /&gt;&lt;/command&gt;';
-		
-		// Create a new list
-		current_asset.parent().after('&lt;ul&gt;&lt;/ul&gt;');
-		
-		// Grab our child assets
-		$.ajax({
-			url: host_url,
-			type: 'POST',
-			processData: false,
-			data: xml_get,
-			contentType: &quot;text/xml&quot;,
-			dataType: 'xml',
-			error: function (XMLHttpRequest, textStatus, errorThrown) {
-				console.log(XMLHttpRequest + textStatus + errorThrown);
-			},
-			beforeSend: function () {
-				current_asset.parent().after('&lt;ul class=&quot;loading&quot;&gt;&lt;li&gt;&lt;img src=&quot;/__lib/web/images/icons/asset_map/loading_node.png&quot; /&gt; Loading...&lt;/li&gt;&lt;/ul&gt;');
-			},
-			success: function (xml) {
-				// Remove loading
-				$('.loading').remove();
-				// Check each asset that we find
-				$(xml).find('asset').each(function() {
-					// Only include asset tags with attributesp
-					if ($(this).attr('assetid') &gt; 0) {
-						// Set some of our vars that will populate our asset map
-						var asset_id = unescape($(this).attr('assetid'));
-						var asset_type_code = $(this).attr('type_code');
-						var asset_link_type = parseInt($(this).attr('link_type'));
-						var asset_num_kids = parseInt($(this).attr('num_kids'));
-						var asset_name = unescape($(this).attr('name')).replace(/\+/g, ' ');
-						var asset_image = ' &lt;img src=&quot;/__data/asset_types/' + asset_type_code + '/icon.png&quot; /&gt;';
-						// See what kind of link type we have
-						if (asset_link_type === 2) {
-							// Type 2 link
-							var asset_image = '&lt;img class=&quot;asset_image&quot; src=&quot;/__data/asset_types/' + asset_type_code + '/icon.png&quot; /&gt;';
-							var asset_image = type_2_image + asset_image;
-						} else {
-							// Type 1 link
-							var asset_image = '&lt;img src=&quot;/__data/asset_types/' + asset_type_code + '/icon.png&quot; /&gt;';
-						}
-						
-						// See if we have kids
-						if (asset_num_kids === 0) {
-							var indicate_kids = branch_stalk;
-						} else {
-							var indicate_kids = branch_closed;
-						}
-						
-						$('&lt;li&gt;&lt;/li&gt;').html('&lt;a href=&quot;#&quot; class=&quot;icon_hold&quot;&gt;' + asset_image + '&lt;/a&gt; &lt;a id=&quot;a' + asset_id + '&quot; href=&quot;#&quot; rel=&quot;' + asset_num_kids + '&quot;&gt;' + asset_name + '&lt;/a&gt;').appendTo(current_asset.parent().next());
-					}// End if
-				
-				});// End each
-				
-				// Set our first/last class
-				$('ul li:first').addClass('first');
-				$('ul li:last').addClass('last');
-				
-			}// End success
-			
-		});// End ajax
-		
-		return false;
-		
-	});// End live click
-	
-};// End matrixMap
-
-
-/**
 * Plugin that allows Asset Builders to be submitted using Ajax.  
 * This is nessessary to allow Matrix to open a from as a stand alone.
 *</diff>
      <filename>jquery.matrix.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>eda71172801e3f25c33d46daf14dd47341e25cf3</id>
    </parent>
  </parents>
  <author>
    <name>Nic Hubbard</name>
    <email>nic@zedsaid.com</email>
  </author>
  <url>http://github.com/nnhubbard/matrix-jquery-tools/commit/acdad1e869e7add1fae3c6ef9734e6c9192ec9df</url>
  <id>acdad1e869e7add1fae3c6ef9734e6c9192ec9df</id>
  <committed-date>2009-05-05T18:53:04-07:00</committed-date>
  <authored-date>2009-05-05T18:53:04-07:00</authored-date>
  <message>matrixMap has now been moved to its own .js file.  This plugin is going to be significantly larger than the others, and it needs its own file.  This will essentially be a seperate project.</message>
  <tree>e0e1cef41f02aa53179009f2868c5758e28332ad</tree>
  <committer>
    <name>Nic Hubbard</name>
    <email>nic@zedsaid.com</email>
  </committer>
</commit>
