[qo-modules-dev] [30] prevent editTitle for the trash

[ Thread Index | Date Index | More lists.tuxfamily.org/qo-modules-dev Archives ]


Revision: 30
Author:   ytorres
Date:     2008-11-16 22:37:52 +0100 (Sun, 16 Nov 2008)

Log Message:
-----------
prevent editTitle for the trash

Modified Paths:
--------------
    yannick/shortcuts.js


Modified: yannick/shortcuts.js
===================================================================
--- yannick/shortcuts.js	2008-11-16 21:15:27 UTC (rev 29)
+++ yannick/shortcuts.js	2008-11-16 21:37:52 UTC (rev 30)
@@ -363,9 +363,11 @@
 	    if( item ) {
 	      e.stopEvent();
 	      var record = this.store.getAt(this.indexOf(item));
-	      this.currentRecord = record.data.id;
-	      this.labelEditor.startEdit(target, record.data.name);
-	      this.labelEditor.on('complete', this.LabelEditorSave, this, {delegate: item});
+	      if( record.data.type != 'trash' ) {
+		this.currentRecord = record.data.id;
+		this.labelEditor.startEdit(target, record.data.name);
+		this.labelEditor.on('complete', this.LabelEditorSave, this, {delegate: item});
+	      }
 	    }
         } else {
             e.preventDefault();


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/