__.each(pdata, function (val: any, key) { let single: any = {}; _show = true; let keycolumns: any = []; let maxId = 0; __.each(val, function (kval, akey) { let _length = __.size(kval); if (_length > maxId) maxId = _length; gcolumns.push('users'); let glastkeyData = {}; __.each(keycolumns, function (dkey) { gcolumns.push(dkey); }); let grows: any = []; for (let i = 0; i < maxId; i++) { let rows: any = []; rows.push(i + 1); __.each(keycolumns, function (dkey: any) { __.each(keycolumns, function (dkey: any) { let summary: any = {}; let kdata = val[dkey]; let min = Number.MAX_VALUE, max = 0; let sindex = 0, sum = 0; __.each(kdata, function (time: number) { if (time > max) max = time; if (time < min) min = time;
__.each(countryList, function(countryFromList, i){ var content = !i ? countryFromList.name : window.polyglot.t(`countries.${countryFromList.dataName}`); shipsTo.append( `<option value="${countryFromList.dataName}">${content}</option>` ); });
makeStats() { this.headline('TIME STATS'); let stats = ''; _.each(this.stats, (time, name) => stats += `\n* **${name}**: ${time}`); stats += `\n`; if (this.projects.length > 1) { _.each(this.projects, (time, name) => stats += `\n* **${name.red}**: ${time}`); stats += `\n`; } _.each(this.users, (time, name) => stats += `\n* **${name}**: ${time}`); this.write(stats.substr(1)); }
__.each(this.imgHashes, (hash, i) => { if (i < subImageDivs.length){ $(subImageDivs[i]).css('background-image', 'url(' + this.getImageUrl(hash) + ')'); } else { $('<div class="itemImg itemImg-small js-editItemSubImage floatLeft" style="background-image: url(' + this.getImageUrl(hash) + ');"><div class="btn btn-corner btn-cornerTR btn-cornerTRSmall btn-flushTop btn-c1 fade btn-shadow1 js-editItemDeleteImage"><i class="ion-close-round icon-centered icon-small"></i></div></div>') .appendTo(self.$('.js-subImageWrap')); } });
_setState(state) { super._setState(state); if (state == 'crashed') { // Reject all pending response promises. _.each(this.responsePromises, promise => { promise && promise.reject(new Error('Actor crashed.')); }); this.responsePromises = {}; this.timeouts = []; } }
__.each(this.subViews, function(subView) { if (subView.close){ subView.close(); } else { subView.unbind(); subView.remove(); } });
promise.then(() => { _.each(timeUsers, (time, name) => this[`time_${name}`] = Time.toHumanReadable(time, this.config.get('hoursPerDay'), timeFormat)); this.timeSpent = timeSpent; this.times = times });
__.each(this.userModel.get('moderators'), (modID)=> { if (modID) { modID.fromModel = true; this.renderModerator(modID); } });
makeStats() { this.headline('TIME STATS'); let stats = ''; _.each(this.stats, (time, name) => stats += `\n* ${name.red}: ${time}`); stats += `\n`; if (this.projects.length > 1) { _.each(this.projects, (time, name) => stats += `\n* ${name.red}: ${time}`); stats += `\n`; } _.each(this.users, (time, name) => stats += `\n* ${name.red}: ${time}`); this.write(stats.substr(1)); }
__.each(manualModList, function(mod){ if (mod.length === 40){ moderatorList.push(mod); } });
__.each(modelJSON, function(value, key) { if (!__.has(existingKeys, key)) { newFormData.append(key, value); } });
__.each(pdata, function (val: any, key) { let single: any = {}; _show = true; let keycolumns: any = []; let maxId = 0; __.each(val, function (kval, akey) { let _length = __.size(kval); if (_length > maxId) maxId = _length; gcolumns.push('users'); let glastkeyData = {}; __.each(keycolumns, function (dkey) { gcolumns.push(dkey); }); let grows: any = []; for (let i = 0; i < maxId; i++) { let rows: any = []; rows.push(i + 1); __.each(keycolumns, function (dkey: any) { __.each(keycolumns, function (dkey: any) { let summary: any = {}; let kdata = val[dkey]; let min = Number.MAX_VALUE, max = 0; let sindex = 0, sum = 0; __.each(kdata, function (time: number) { if (time > max) max = time; if (time < min) min = time;
__.each(countryList, function(countryFromList, i){ let content = !i ? countryFromList.name : window.polyglot.t(`countries.${countryFromList.dataName}`); shipsFrom.append( `<option value="${countryFromList.dataName}">${content}</option>` ); });