Aleksander Machniak
2013-11-21 303e21fc638c2d65b21eb0d8c02d9ab6f658d6e0
Replace Array.indexOf() with jQuery.inArray() for older browsers (IE<9)
1 files modified
4 ■■■■ changed files
program/js/app.js 4 ●●●● patch | view | raw | blame | history
program/js/app.js
@@ -3709,7 +3709,7 @@
      var index = this.local_storage_get_item('compose.index', []),
        key = this.env.compose_id;
        if (index.indexOf(key) < 0) {
        if ($.inArray(key, index) < 0) {
          index.push(key);
        }
        this.local_storage_set_item('compose.' + key, formdata, true);
@@ -3755,7 +3755,7 @@
    if (window.localStorage) {
      var index = this.local_storage_get_item('compose.index', []);
      if (index.indexOf(key) >= 0) {
      if ($.inArray(key, index) >= 0) {
        this.local_storage_remove_item('compose.' + key);
        this.local_storage_set_item('compose.index', $.grep(index, function(val,i){ return val != key; }));
      }