<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,14 +2,31 @@
 To get the latest version, please visit http://javascript.neyric.com/wireit
 ---------------------------------------------------------------------------
 
-Version 0.4.1
+Version 0.5.0
 not released yet
 
+Current:
+	* Layer.onChangeEvt (+implementation in WiringEditor for saved state, + implementation in Layouts to reinit the layout)
+
 TODO:
-	* Layer.onChangeEvt (+implementation in WiringEditor for saved state, + implementation in Layouts)
+
+	* Guide
+	* Do Ajax + REST adapter
+	* BUG: jsBox: form values in input fields are overriden !!
+	* Autoload in WiringEditor: example, si http://.../editor/?name=test/math =&gt; charger &quot;test/math&quot;
+	* Default language propertiesForm
+	* Provide XML Adapter using REST Adapter
+	* Gears adapter if no backend usable
+	* BUG: if terminal not visible, give the offset of the first parent DOM element visible
+	
+LATER
+
+	* Uneditable layer
 
 Changeset:
 
+	* filter box in load panel
+	* InOutContainer
 	* Spring Layout (experimental) (+examples)
 	* Wire mouse events
 	* Adapters for WiringEditor (removed the complicated SMD &amp; YUI-RPC stuff)</diff>
      <filename>VERSION.txt</filename>
    </modified>
    <modified>
      <diff>@@ -126,48 +126,53 @@ jsBox.WiringEditor = function(options) {
 
 YAHOO.lang.extend(jsBox.WiringEditor, WireIt.WiringEditor, {
    
-   /**
-    * Update the module list right after loading the SMD
-    */
-   onSMDsuccess: function() {
-      
-      this.service.listWirings({language: this.options.languageName},{
-   			success: function(result) {
-   				this.pipes = result.result;
-   				this.pipesByName = {};
-   				this.renderLoadPanel();
-               this.updateLoadPanelList();
-               //this.loadPanel.show();
-   			},
-   			scope: this
-   	});
-   },
-   
    
    /**
     * Add the &quot;run&quot; button
     */
    renderButtons: function() {
       jsBox.WiringEditor.superclass.renderButtons.call(this);
+
+		// Add the run button
       var toolbar = YAHOO.util.Dom.get('toolbar');
       var runButton = new YAHOO.widget.Button({ label:&quot;Run&quot;, id:&quot;WiringEditor-runButton&quot;, container: toolbar });
       runButton.on(&quot;click&quot;, jsBox.run, jsBox, true);
    },
-   
-   /**
-    * Overwrite updateLoadPanelList to add Composed modules to the module list
-    */
-   updateLoadPanelList: function() { 
-      try {
-       var left = YAHOO.util.Dom.get('left');
-       var list = WireIt.cn(&quot;ul&quot;);
-       if(YAHOO.lang.isArray(this.pipes)) {
-          for(var i = 0 ; i &lt; this.pipes.length ; i++) {
-             var module = this.pipes[i];
 
-             this.pipesByName[module.name] = module;
-             
-             // Add the module to the list
+
+	load: function() {
+
+	    this.adapter.listWirings({language: this.options.languageName},{
+				success: function(result) {
+					this.pipes = result.result;
+					this.pipesByName = {};
+					this.renderLoadPanel();
+	            this.updateLoadPanelList();
+	            this.loadPanel.show();
+	
+					//  Customize to display composed module in the left list
+					this.updateComposedModuleList();
+				},
+				scope: this
+			}
+			);
+
+	 },
+	
+	
+	updateComposedModuleList: function() {
+		
+		var l = YAHOO.util.Dom.getElementsByClassName(&quot;ComposedModule&quot;, &quot;div&quot;, this.leftEl);
+		for(var i = 0 ; i &lt; l.length ; i++) {
+			this.leftEl.removeChild(l[i]);
+		}
+		
+		if(YAHOO.lang.isArray(this.pipes)) {
+	       for(i = 0 ; i &lt; this.pipes.length ; i++) {
+	          var module = this.pipes[i];
+	          this.pipesByName[module.name] = module;
+	
+				// Add the module to the list
              var div = WireIt.cn('div', {className: &quot;WiringEditor-module ComposedModule&quot;});
              div.appendChild( WireIt.cn('span', null, null, module.name) );
              var ddProxy = new WireIt.ModuleProxy(div, this);
@@ -178,27 +183,13 @@ YAHOO.lang.extend(jsBox.WiringEditor, WireIt.WiringEditor, {
                    &quot;title&quot;: module.name
                 }
              };
-             left.appendChild(div);
-               
+             this.leftEl.appendChild(div);
 
-             var li = WireIt.cn('li',null,{cursor: 'pointer'},module.name);
-             YAHOO.util.Event.addListener(li, 'click', function(e,args) {
-                try {
-                   this.loadPipe(YAHOO.util.Event.getTarget(e).innerHTML);
-                }
-                catch(ex) {
-                   console.log(ex);
-                }
-             }, this, true);
-             list.appendChild(li);
-          }
-       }
-       var panelBody = YAHOO.util.Dom.get('loadPanelBody');
-       panelBody.innerHTML = &quot;&quot;;
-       panelBody.appendChild(list);
-       
-      }catch(ex){console.log(ex);}
-    }
+	       }
+	    }
+	
+	}
+	
    
 });
 </diff>
      <filename>examples/jsBox/jsBox.js</filename>
    </modified>
    <modified>
      <diff>@@ -5,39 +5,12 @@
   &lt;title&gt;WireIt - a Javascript Wiring Library&lt;/title&gt;
 	&lt;meta name=&quot;author&quot; content=&quot;Eric Abouaf&quot; /&gt;
 	&lt;meta name=&quot;copyright&quot; content=&quot;Copyright 2006-2009 Eric Abouaf&quot; /&gt;
-	&lt;meta name=&quot;keywords&quot; content=&quot;wireit,javascript,library,pipes,visualization,yui,programming,canvas,wire,wires,framework&quot; /&gt;
+	&lt;meta name=&quot;keywords&quot; content=&quot;wireit,javascript,library,pipes,visualization,yui,programming,canvas,wire,wires,framework,webdev,ajax,ui,web,graphics,graph,graphs,opensource,tools&quot; /&gt;
 	&lt;meta name=&quot;description&quot; content=&quot;WireIt is an open-source javascript library to create web wirable interfaces for dataflow applications, visual programming languages or graphical modeling.&quot; /&gt;
 	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
 	&lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;WireIt blog&quot; href=&quot;http://javascript.neyric.com/blog/feed/&quot; /&gt;
 	&lt;link rel=&quot;shortcut icon&quot; type=&quot;images/x-icon&quot; href=&quot;res/favicon.ico&quot; /&gt;
-  &lt;style&gt;
-
-body { background-color: white; margin: 0; padding: 0; font-family:&quot;Trebuchet MS&quot;,Helvetica,Arial,Verdana; font-size: 13px; }
-p {	font-size: 13px; }
-ul li {	font-size: 13px;}
-
-#headbar { background-image: url(res/logo-wireit.jpg);	height: 223px; margin: 0;	padding: 0; }
-
-/*.navigation { }*/
-.navigation li { margin: 0; display: inline; margin-right: 30px;}
-.navigation li a { color: #999999; text-decoration: none;	font-size: 14px; }
-.navigation li a:hover { color: #cccc33; text-decoration: underline; }
-
-#layout { width: 80%; }
-#layout td.left { width: 55%;}
-#layout td.right { width: 45%;}
-#layout td.left, #layout td.right { padding: 15px 30px; vertical-align: top; }
-
-p.title { font-weight: bold; font-size: 22px;}
-td.left ul { list-style-image: url(res/star.png); }
-
-div.appBox { width: 100%;  /*height: 144px;*/ position: relative;  margin-top: 10px; }
-div.appBox p { position: absolute; left: 130px;  top: 0px; 	font-size: 18px; text-decoration: none;}
-div.appBox a {text-decoration: none;}
-div.appBox p span {color: #aaa;font-size: 11pt;}
-div.appBox p span.big { color: #ffb73e; font-size: 16pt; font-weight: bold;}
-  &lt;/style&gt;
-
+	&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;res/style.css&quot; /&gt;
  &lt;/head&gt;
 
  &lt;body&gt;
@@ -48,7 +21,8 @@ div.appBox p span.big { color: #ffb73e; font-size: 16pt; font-weight: bold;}
 		&lt;li&gt;&lt;a href=&quot;http://javascript.neyric.com/wireit&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;	
 		&lt;li&gt;&lt;a href=&quot;http://github.com/neyric/wireit/&quot;&gt;GitHub[Git]&lt;/a&gt;&lt;/li&gt;
 		&lt;li&gt;&lt;a href=&quot;http://neyric.lighthouseapp.com/projects/25048-wireit&quot;&gt;Issues&lt;/a&gt;&lt;/li&gt;
-		&lt;li&gt;&lt;a href=&quot;doc/index.html&quot;&gt;Documentation&lt;/a&gt;&lt;/li&gt;		
+		&lt;li&gt;&lt;a href=&quot;guide.html&quot;&gt;Guide&lt;/a&gt;&lt;/li&gt;		
+		&lt;li&gt;&lt;a href=&quot;doc/index.html&quot;&gt;API Documentation&lt;/a&gt;&lt;/li&gt;		
 		&lt;li&gt;&lt;a href=&quot;http://javascript.neyric.com/blog/category/wireit/&quot;&gt;Blog&lt;/a&gt; 
 			  &lt;a href=&quot;http://javascript.neyric.com/blog/feed/&quot;&gt;&lt;img src=&quot;doc/rss.png&quot; border=&quot;0&quot;/&gt;&lt;/a&gt;&lt;/li&gt;	
 		&lt;li&gt;&lt;a href=&quot;http://groups.google.com/group/wireit/&quot;&gt;Forums&lt;/a&gt;&lt;/li&gt;
@@ -99,8 +73,9 @@ div.appBox p span.big { color: #ffb73e; font-size: 16pt; font-weight: bold;}
 			
 			&lt;p&gt;Different types of Container are provided :&lt;/p&gt;
 			&lt;ul&gt;
-				&lt;li&gt;ImageContainer - use images as graph nodes&lt;/li&gt;
+				&lt;li&gt;InOutContainer - simple module with named inputs and outputs&lt;/li&gt;
 				&lt;li&gt;FormContainer - build form containers based on &lt;a href=&quot;http://javascript.neyric.com/inputex/&quot;&gt;inputEx&lt;/a&gt; forms&lt;/li&gt;
+				&lt;li&gt;ImageContainer - use images as graph nodes&lt;/li&gt;
 			&lt;/ul&gt;
 			
 			&lt;p&gt;You can create your own container by subclassing the base &lt;i&gt;Container&lt;/i&gt; class, and still benefit from the drop-in use of the WiringEditor in your web application.&lt;/p&gt;
@@ -115,6 +90,7 @@ div.appBox p span.big { color: #ffb73e; font-size: 16pt; font-weight: bold;}
 		
 		
 		  	&lt;ul&gt;
+				&lt;li&gt;&lt;a href=&quot;guide.html&quot;&gt;WireIt's Guide&lt;/a&gt; - the ultimate ressource&lt;/li&gt;
 				&lt;li&gt;&lt;a href=&quot;doc/index.html&quot;&gt;API documentation&lt;/a&gt; built with &lt;a href=&quot;http://developer.yahoo.com/yui/yuidoc/&quot;&gt;YUI Doc&lt;/a&gt;&lt;/li&gt;
 				&lt;li&gt;&lt;a href=&quot;http://wiki.github.com/neyric/wireit&quot;&gt;Wiki&lt;/a&gt;&lt;/li&gt;
 			&lt;/ul&gt;
@@ -132,10 +108,8 @@ div.appBox p span.big { color: #ffb73e; font-size: 16pt; font-weight: bold;}
 		&lt;!-- Right Column --&gt;
 		&lt;td class=&quot;right&quot;&gt;
 			
-			&lt;!-- Updates changeset --&gt;
-			&lt;p class=&quot;title&quot;&gt;Download&lt;/p&gt;
-			
-			&lt;div style=&quot;text-align:center;font-weight:bold; font-size:15px;background-color:#EEEEEE;-moz-border-radius: 10px; padding: 10px;-webkit-border-radius: 10px;&quot;&gt;
+			&lt;!-- Download --&gt;
+			&lt;div style=&quot;text-align:center;font-weight:bold; font-size:17px;background-color:#EEEEEE;-moz-border-radius: 10px; padding: 10px;-webkit-border-radius: 10px;&quot;&gt;
 				&lt;a href=&quot;http://cloud.github.com/downloads/neyric/wireit/WireIt-0.4.0.zip&quot;&gt;Download WireIt 0.4.0&lt;/a&gt;&lt;br/&gt;
 				&lt;span style=&quot;font-size: 70%; font-weight: normal;&quot;&gt;(WireIt-0.4.0.zip - 7.8MB - &lt;a href=&quot;VERSION.txt&quot;&gt;changeset&lt;/a&gt;)&lt;/span&gt;
 			&lt;/div&gt;
@@ -250,12 +224,13 @@ div.appBox p span.big { color: #ffb73e; font-size: 16pt; font-weight: bold;}
 		&lt;li&gt;&lt;a href=&quot;http://javascript.neyric.com/wireit&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;	
 		&lt;li&gt;&lt;a href=&quot;http://github.com/neyric/wireit/&quot;&gt;GitHub[Git]&lt;/a&gt;&lt;/li&gt;
 		&lt;li&gt;&lt;a href=&quot;http://neyric.lighthouseapp.com/projects/25048-wireit&quot;&gt;Issues&lt;/a&gt;&lt;/li&gt;
-		&lt;li&gt;&lt;a href=&quot;doc/index.html&quot;&gt;Documentation&lt;/a&gt;&lt;/li&gt;		
+		&lt;li&gt;&lt;a href=&quot;guide.html&quot;&gt;Guide&lt;/a&gt;&lt;/li&gt;	
+		&lt;li&gt;&lt;a href=&quot;doc/index.html&quot;&gt;API Documentation&lt;/a&gt;&lt;/li&gt;		
 		&lt;li&gt;&lt;a href=&quot;http://javascript.neyric.com/blog/category/wireit/&quot;&gt;Blog&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;	
 		&lt;li&gt;&lt;a href=&quot;http://groups.google.com/group/wireit/&quot;&gt;Forums&lt;/a&gt;&lt;/li&gt;
 	&lt;/ul&gt;
 	
-	&lt;p style=&quot;font-size: 90%; margin-top: 20px;&quot;&gt;Rails is released under the &lt;a href=&quot;license.txt&quot; style=&quot;color: white;&quot;&gt;MIT license&lt;/a&gt;.&lt;/p&gt;
+	&lt;p style=&quot;font-size: 90%; margin-top: 20px;&quot;&gt;WireIt is released under the &lt;a href=&quot;license.txt&quot; style=&quot;color: white;&quot;&gt;MIT license&lt;/a&gt;.&lt;/p&gt;
 &lt;/div&gt;
 
 &lt;/center&gt;</diff>
      <filename>index.html</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,13 @@ WireIt.Layer = function(options) {
     * @type {HTMLElement}
     */
    this.el = null;
-   
+
+	/**
+    * Event that is fired when the layer has been changed
+    * You can register this event with myTerminal.eventChanged.subscribe(function(e,params) { }, scope);
+    * @event eventChanged
+    */
+   this.eventChanged = new YAHOO.util.CustomEvent(&quot;eventChanged&quot;);
    
    /**
     * Event that is fired when a wire is added
@@ -45,7 +51,6 @@ WireIt.Layer = function(options) {
     */
    this.eventRemoveWire = new YAHOO.util.CustomEvent(&quot;eventRemoveWire&quot;);
    
-   
    /**
     * Event that is fired when a container is added
     * You can register this event with myTerminal.eventAddContainer.subscribe(function(e,params) { var container=params[0];}, scope);
@@ -74,7 +79,6 @@ WireIt.Layer = function(options) {
     */
    this.eventContainerResized = new YAHOO.util.CustomEvent(&quot;eventContainerResized&quot;);
    
-   
    this.render();
    
    this.initContainers();
@@ -190,15 +194,19 @@ WireIt.Layer.prototype = {
       if(container.ddResize) {
          container.ddResize.on('endDragEvent', function() {
             this.eventContainerResized.fire(container);
+				this.eventChanged.fire(this);
          }, this, true);
       }
       if(container.dd) {
          container.dd.on('endDragEvent', function() {
             this.eventContainerDragged.fire(container);
+				this.eventChanged.fire(this);
          }, this, true);
       }
    
       this.eventAddContainer.fire(container);
+
+		this.eventChanged.fire(this);
    
       return container;
    },
@@ -216,6 +224,8 @@ WireIt.Layer.prototype = {
          this.containers = WireIt.compact(this.containers);
       
          this.eventRemoveContainer.fire(container);
+
+			this.eventChanged.fire(this);
       }
    },
 
@@ -238,6 +248,9 @@ WireIt.Layer.prototype = {
          
          // Re-Fire an event at the layer level
          this.eventAddWire.fire(wire);
+
+			// Fire the layer changed event
+			this.eventChanged.fire(this);
       }
    },
 
@@ -254,6 +267,7 @@ WireIt.Layer.prototype = {
          this.wires[index] = null;
          this.wires = WireIt.compact(this.wires);
          this.eventRemoveWire.fire(wire);
+			this.eventChanged.fire(this);
       }
    },
 </diff>
      <filename>js/Layer.js</filename>
    </modified>
    <modified>
      <diff>@@ -93,26 +93,7 @@ WireIt.WiringEditor = function(options) {
         modal: true
      });
      this.helpPanel.render();
-
 	
-		this.alertPanel = new widget.Panel('WiringEditor-alertPanel', {
-         fixedcenter: true,
-         draggable: true,
-         width: '500px',
-         visible: false,
-         modal: true
-      });
-      this.alertPanel.setHeader(&quot;Message&quot;);
-      this.alertPanel.setBody(&quot;&lt;div id='alertPanelBody'&gt;&lt;/div&gt;&quot;);
-      this.alertPanel.render(document.body);
-		Event.onAvailable('alertPanelBody', function() {
-			var button = WireIt.cn('button', null, null, &quot;Ok&quot;);
-			Dom.get('alertPanelBody').appendChild(button);
-			Event.addListener(button,'click', function() {
-				this.alertPanel.hide();
-			}, this, true);
-		}, this, true);
-		
     
     /**
      * @property layout
@@ -126,6 +107,7 @@ WireIt.WiringEditor = function(options) {
      * @type {WireIt.Layer}
      */
     this.layer = new WireIt.Layer(this.options.layerOptions);
+	 this.layer.eventChanged.subscribe(this.onLayerChanged, this, true);
 
 	 /**
 	  * @property leftEl
@@ -170,7 +152,6 @@ WireIt.WiringEditor.prototype = {
 	 this.adapter = options.adapter || WireIt.WiringEditor.adapters.JsonRpc;
      
     this.options.languageName = options.languageName || 'anonymousLanguage';
-
     
     this.options.propertiesFields = options.propertiesFields;
     
@@ -287,7 +268,7 @@ WireIt.WiringEditor.prototype = {
     var value = this.getValue();
     
     if(value.name === &quot;&quot;) {
-       alert(&quot;Please choose a name&quot;);
+       this.alert(&quot;Please choose a name&quot;);
        return;
     }
 
@@ -307,7 +288,7 @@ WireIt.WiringEditor.prototype = {
   */
  saveModuleSuccess: function(o) {
 
-    alert(&quot;Saved !&quot;);
+    this.alert(&quot;Saved !&quot;);
 
 	 console.log(this.tempSavedWiring);
 	var name = this.tempSavedWiring.name;
@@ -326,10 +307,12 @@ WireIt.WiringEditor.prototype = {
   * @method saveModuleFailure
   */
  saveModuleFailure: function(o) {
-    alert(&quot;error while saving! &quot;);
+    this.alert(&quot;error while saving! &quot;);
  },
 
-	alert: function() {
+	alert: function(txt) {
+		if(!this.alertPanel){ this.renderAlertPanel(); }
+		Dom.get('alertPanelBody').innerHTML = txt;
 		this.alertPanel.show();
 	},
 
@@ -345,9 +328,12 @@ WireIt.WiringEditor.prototype = {
   * @method onNew
   */
  onNew: function() {
-    this.layer.clear();
-    
-     this.propertiesForm.clear();
+	this.preventLayerChangedEvent = true;
+	
+   this.layer.clear(); 
+   this.propertiesForm.clear();
+
+	this.preventLayerChangedEvent = false;
  },
 
  /**
@@ -359,8 +345,10 @@ WireIt.WiringEditor.prototype = {
       var value = this.getValue();
  		this.adapter.deleteWiring({name: value.name, language: this.options.languageName},{
  			success: function(result) {
- 				alert(&quot;Deleted !&quot;);
- 			}
+				this.onNew();
+ 				this.alert(&quot;Deleted !&quot;);
+ 			},
+			scope: this
  		});
        
     }
@@ -386,38 +374,56 @@ WireIt.WiringEditor.prototype = {
           modal: true
        });
        this.loadPanel.setHeader(&quot;Select module&quot;);
-       this.loadPanel.setBody(&quot;&lt;div id='loadPanelBody'&gt;&lt;/div&gt;&quot;);
+       this.loadPanel.setBody(&quot;Search: &lt;input type='text' id='loadFilter' /&gt;&lt;div id='loadPanelBody'&gt;&lt;/div&gt;&quot;);
        this.loadPanel.render(document.body);
+
+		// Listen the keyup event to filter the module list
+		Event.onAvailable('loadFilter', function() {
+			Event.addListener('loadFilter', &quot;keyup&quot;, this.inputFilterTimer, this, true);
+		}, this, true);
+
     }
  },
 
+	/**
+	 * Method called from each keyup on the search filter in load panel.
+	 * The real filtering occurs only after 500ms so that the filter process isn't called too often
+	 */
+	inputFilterTimer: function() {
+		if(this.inputFilterTimeout) {
+			clearTimeout(this.inputFilterTimeout);
+			this.inputFilterTimeout = null;
+		}
+		var that = this;
+		this.inputFilterTimeout = setTimeout(function() {
+				that.updateLoadPanelList(Dom.get('loadFilter').value);
+		}, 500);
+	},
+
 
  /**
   * @method updateLoadPanelList
   */
- updateLoadPanelList: function() {
+ updateLoadPanelList: function(filter) {
+	
     var list = WireIt.cn(&quot;ul&quot;);
     if(lang.isArray(this.pipes)) {
        for(var i = 0 ; i &lt; this.pipes.length ; i++) {
           var module = this.pipes[i];
-          
           this.pipesByName[module.name] = module;
-          
-          var li = WireIt.cn('li',null,{cursor: 'pointer'},module.name);
-          Event.addListener(li, 'click', function(e,args) {
-             try {
-                this.loadPipe(Event.getTarget(e).innerHTML);
-             }
-             catch(ex) {
-                console.log(ex);
-             }
-          }, this, true);
-          list.appendChild(li);
+          if(!filter || filter === &quot;&quot; || module.name.match(new RegExp(filter,&quot;i&quot;)) ) {
+	          list.appendChild( WireIt.cn('li',null,{cursor: 'pointer'},module.name) );
+			}
        }
     }
     var panelBody = Dom.get('loadPanelBody');
     panelBody.innerHTML = &quot;&quot;;
     panelBody.appendChild(list);
+
+    Event.addListener(list, 'click', function(e,args) {
+    	this.loadPipe(Event.getTarget(e).innerHTML);
+    }, this, true);
+
  },
 
  /**
@@ -429,6 +435,7 @@ WireIt.WiringEditor.prototype = {
 			success: function(result) {
 				this.pipes = result.result;
 				this.pipesByName = {};
+				
 				this.renderLoadPanel();
             this.updateLoadPanelList();
             this.loadPanel.show();
@@ -468,6 +475,13 @@ WireIt.WiringEditor.prototype = {
   * @param {String} name Pipe name
   */
  loadPipe: function(name) {
+	
+	try {
+	
+		this.preventLayerChangedEvent = true;
+	
+     this.loadPanel.hide();
+	
     var pipe = this.getPipeByName(name), i;
     
     // TODO: check if current pipe is saved...
@@ -502,9 +516,52 @@ WireIt.WiringEditor.prototype = {
         }
      }
      
-     this.loadPanel.hide();
+
+	this.preventLayerChangedEvent = true;
+	
+  	}
+  	catch(ex) {
+     	this.alert(ex);
+  	}
  },
- 
+
+ 	renderAlertPanel: function() {
+		
+ 	 /**
+     * @property alertPanel
+     * @type {YAHOO.widget.Panel}
+     */
+		this.alertPanel = new widget.Panel('WiringEditor-alertPanel', {
+         fixedcenter: true,
+         draggable: true,
+         width: '500px',
+         visible: false,
+         modal: true
+      });
+      this.alertPanel.setHeader(&quot;Message&quot;);
+      this.alertPanel.setBody(&quot;&lt;div id='alertPanelBody'&gt;&lt;/div&gt;&lt;button id='alertPanelButton'&gt;Ok&lt;/button&gt;&quot;);
+      this.alertPanel.render(document.body);
+		Event.addListener('alertPanelButton','click', function() {
+			this.alertPanel.hide();
+		}, this, true);
+	},
+
+
+	onLayerChanged: function() {
+		if(!this.preventLayerChangedEvent) {
+			console.log(&quot;layer changed !&quot;);
+			this.markUnsaved();
+		}
+	},
+
+	markSaved: function() {
+		
+	},
+	
+	markUnsaved: function() {
+		
+	},
+
  
  /**
   * This method return a wiring within the given vocabulary described by the modules list
@@ -555,6 +612,10 @@ WireIt.WiringEditor.adapters = {};
  */
 WireIt.WiringEditor.adapters.JsonRpc = {
 	
+	config: {
+		url: '../../backend/php/WiringEditor.php'
+	},
+	
 	saveWiring: function(val, callbacks) {
 		this._sendJsonRpcRequest(&quot;saveWiring&quot;, val, callbacks);
 	},
@@ -571,7 +632,7 @@ WireIt.WiringEditor.adapters.JsonRpc = {
 	_sendJsonRpcRequest: function(method, value, callbacks) {
 		var postData = YAHOO.lang.JSON.stringify({&quot;id&quot;:(this._requestId++),&quot;method&quot;:method,&quot;params&quot;:value,&quot;version&quot;:&quot;json-rpc-2.0&quot;});
 
-		YAHOO.util.Connect.asyncRequest('POST', '../../backend/php/WiringEditor.php', {
+		YAHOO.util.Connect.asyncRequest('POST', this.config.url, {
 			success: function(o) {
 				var s = o.responseText,
 					 r = YAHOO.lang.JSON.parse(s);</diff>
      <filename>js/WiringEditor.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 /*
 Distributed under the MIT License :
 
-Copyright (c) 2007-2008, Eric Abouaf &lt;neyric@via.ecp.fr&gt;
+Copyright (c) 2007-2009, Eric Abouaf &lt;eric.abouaf at gmail&gt;
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the &quot;Software&quot;), to deal</diff>
      <filename>license.txt</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>86d229bd5b56835dc3d42ddd20b5c834fa5eb24b</id>
    </parent>
  </parents>
  <author>
    <name>neyric</name>
    <email>eric.abouaf@gmail.com</email>
  </author>
  <url>http://github.com/neyric/wireit/commit/2db5490566f482e74ea695dfe9314b2963ee473d</url>
  <id>2db5490566f482e74ea695dfe9314b2963ee473d</id>
  <committed-date>2009-07-20T13:54:02-07:00</committed-date>
  <authored-date>2009-07-20T13:54:02-07:00</authored-date>
  <message>WiringEditor: search box in load panel, Layer: eventChanged</message>
  <tree>e8c092ec1b0129026d5af04b62775d374bf0bebc</tree>
  <committer>
    <name>neyric</name>
    <email>eric.abouaf@gmail.com</email>
  </committer>
</commit>
