src/js/model.js
branchnew-model
changeset 880 4c7b33bf2795
parent 872 d777d05a16e4
child 881 f11b234497f7
--- a/src/js/model.js	Tue Apr 24 20:25:40 2012 +0200
+++ b/src/js/model.js	Thu Apr 26 19:18:57 2012 +0200
@@ -73,7 +73,7 @@
 IriSP.Model.List.prototype = new Array();
 
 IriSP.Model.List.prototype.getElement = function(_id) {
-    var _index = (IriSP._(this.idIndex).indexOf(_id));
+    var _index = (IriSP._(this.idIndex).indexOf(this.source.getNamespaced(_id).fullName));
     if (_index !== -1) {
         return this[_index];
     }
@@ -538,7 +538,7 @@
 }
 
 IriSP.Model.Source.prototype.getElement = function(_elId) {
-    return this.directory.getElement(_elId);
+    return this.directory.getElement(_this.getNamespaced(_elId).fullname);
 }
 
 IriSP.Model.Source.prototype.setCurrentMediaId = function(_idRef) {