Changeset 12826


Ignore:
Timestamp:
Sep 1, 2011, 5:24:49 PM (10 years ago)
Author:
jordan
Message:

don't use Object.keys(), since it's not supported in IE8.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/javascript/transmission.js

    r12820 r12826  
    19001900        refreshFilterButton: function()
    19011901        {
    1902                 var text,
     1902                var o, tmp, text, torrent_count,
    19031903                    state = this[Prefs._FilterMode],
    19041904                    state_all = state == Prefs._FilterAll,
     
    19071907                    tracker_all = !tracker,
    19081908                    tracker_string = tracker ? this.getReadableDomain(tracker) : '',
    1909                     torrent_count = Object.keys(this._torrents).length,
    19101909                    visible_count = this._rows.length;
     1910
     1911                // count the total number of torrents
     1912                // torrent_count = Object.keys(this._torrents).length; // IE8 doesn't support Object.keys(
     1913                torrent_count = 0;
     1914                o = this._torrents;
     1915                for (tmp in o)
     1916                        if (o.hasOwnProperty(tmp))
     1917                                ++torrent_count;
    19111918
    19121919                text = 'Show <span class="filter-selection">';
     
    21312138
    21322139                var trackers = this.getTrackers();
    2133                 var names = Object.keys(trackers).sort();
     2140                //var names = Object.keys(trackers).sort(); (IE8 doesn't have Object.keys)
     2141                var name, name=[];
     2142                var names = [];
     2143                for  (name in trackers)
     2144                        names.push (name);
     2145                names.sort();
    21342146
    21352147                var fragment = document.createDocumentFragment();
Note: See TracChangeset for help on using the changeset viewer.