LEFT | RIGHT |
1 /* | 1 /* |
2 * This Source Code is subject to the terms of the Mozilla Public License | 2 * This Source Code is subject to the terms of the Mozilla Public License |
3 * version 2.0 (the "License"). You can obtain a copy of the License at | 3 * version 2.0 (the "License"). You can obtain a copy of the License at |
4 * http://mozilla.org/MPL/2.0/. | 4 * http://mozilla.org/MPL/2.0/. |
5 */ | 5 */ |
6 | 6 |
7 const Cc = Components.classes; | 7 const Cc = Components.classes; |
8 const Ci = Components.interfaces; | 8 const Ci = Components.interfaces; |
9 const Cr = Components.results; | 9 const Cr = Components.results; |
10 const Cu = Components.utils; | 10 const Cu = Components.utils; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 { | 403 { |
404 this._filterString = value.toLowerCase(); | 404 this._filterString = value.toLowerCase(); |
405 this.refilter(); | 405 this.refilter(); |
406 }, | 406 }, |
407 | 407 |
408 filter: function(entry) | 408 filter: function(entry) |
409 { | 409 { |
410 if (this._filterString) | 410 if (this._filterString) |
411 { | 411 { |
412 let foundMatch = false; | 412 let foundMatch = false; |
413 for (let [col, label] of new Iterator(entry.cols)) | 413 for (let col in entry.cols) |
414 if (label.toLowerCase().indexOf(this._filterString) >= 0) | 414 if (entry.cols[col].toLowerCase().indexOf(this._filterString) >= 0) |
415 foundMatch = true; | 415 foundMatch = true; |
416 | 416 |
417 if (!foundMatch) | 417 if (!foundMatch) |
418 return false; | 418 return false; |
419 } | 419 } |
420 return true; | 420 return true; |
421 }, | 421 }, |
422 | 422 |
423 compare: function(entry1, entry2) | 423 compare: function(entry1, entry2) |
424 { | 424 { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 for (let i = 0; i < this.observers.length; i++) | 529 for (let i = 0; i < this.observers.length; i++) |
530 if (this.observers[i] == observer) | 530 if (this.observers[i] == observer) |
531 this.observers.splice(i--, 1); | 531 this.observers.splice(i--, 1); |
532 }, | 532 }, |
533 notifyObservers: function(operation, entry) | 533 notifyObservers: function(operation, entry) |
534 { | 534 { |
535 for (let observer of this.observers) | 535 for (let observer of this.observers) |
536 observer(this, operation, entry); | 536 observer(this, operation, entry); |
537 } | 537 } |
538 }; | 538 }; |
LEFT | RIGHT |