Minor tweaks.
This commit is contained in:
parent
57b3ee6c2f
commit
51a161eede
5 changed files with 10 additions and 10 deletions
|
@ -18,11 +18,11 @@ modulejs.define('core/resource', ['_', 'config', 'core/settings'], function (_,
|
|||
return themesHref + href;
|
||||
}
|
||||
|
||||
if (_.indexOf(defaultIcons, id) >= 0) {
|
||||
if (_.includes(defaultIcons, id)) {
|
||||
return defaultThemeHref + id + '.svg';
|
||||
}
|
||||
|
||||
if (_.indexOf(defaultIcons, baseId) >= 0) {
|
||||
if (_.includes(defaultIcons, baseId)) {
|
||||
return defaultThemeHref + baseId + '.svg';
|
||||
}
|
||||
|
||||
|
|
|
@ -78,13 +78,13 @@ modulejs.define('ext/preview-audio', ['_', '$', 'core/event', 'core/format', 'co
|
|||
}
|
||||
|
||||
function initItem(item) {
|
||||
if (item.$view && _.indexOf(settings.types, item.type) >= 0) {
|
||||
if (item.$view && _.includes(settings.types, item.type)) {
|
||||
item.$view.find('a').on('click', function (ev) {
|
||||
ev.preventDefault();
|
||||
|
||||
var matchedItems = _.compact(_.map($('#items .item'), function (matchedItem) {
|
||||
matchedItem = $(matchedItem).data('item');
|
||||
return _.indexOf(settings.types, matchedItem.type) >= 0 ? matchedItem : null;
|
||||
return _.includes(settings.types, matchedItem.type) ? matchedItem : null;
|
||||
}));
|
||||
|
||||
onEnter(matchedItems, _.indexOf(matchedItems, item));
|
||||
|
|
|
@ -107,13 +107,13 @@ modulejs.define('ext/preview-img', ['_', '$', 'core/event', 'core/server', 'core
|
|||
}
|
||||
|
||||
function initItem(item) {
|
||||
if (item.$view && _.indexOf(settings.types, item.type) >= 0) {
|
||||
if (item.$view && _.includes(settings.types, item.type)) {
|
||||
item.$view.find('a').on('click', function (ev) {
|
||||
ev.preventDefault();
|
||||
|
||||
var matchedItems = _.compact(_.map($('#items .item'), function (matchedItem) {
|
||||
matchedItem = $(matchedItem).data('item');
|
||||
return _.indexOf(settings.types, matchedItem.type) >= 0 ? matchedItem : null;
|
||||
return _.includes(settings.types, matchedItem.type) ? matchedItem : null;
|
||||
}));
|
||||
|
||||
onEnter(matchedItems, _.indexOf(matchedItems, item));
|
||||
|
|
|
@ -106,13 +106,13 @@ modulejs.define('ext/preview-txt', ['_', '$', 'marked', 'prism', 'core/event', '
|
|||
}
|
||||
|
||||
function initItem(item) {
|
||||
if (item.$view && _.indexOf(_.keys(settings.types), item.type) >= 0) {
|
||||
if (item.$view && _.includes(_.keys(settings.types), item.type)) {
|
||||
item.$view.find('a').on('click', function (ev) {
|
||||
ev.preventDefault();
|
||||
|
||||
var matchedItems = _.compact(_.map($('#items .item'), function (matchedItem) {
|
||||
matchedItem = $(matchedItem).data('item');
|
||||
return _.indexOf(_.keys(settings.types), matchedItem.type) >= 0 ? matchedItem : null;
|
||||
return _.includes(_.keys(settings.types), matchedItem.type) ? matchedItem : null;
|
||||
}));
|
||||
|
||||
onEnter(matchedItems, _.indexOf(matchedItems, item));
|
||||
|
|
|
@ -79,13 +79,13 @@ modulejs.define('ext/preview-vid', ['_', '$', 'core/event', 'core/settings', 'ex
|
|||
}
|
||||
|
||||
function initItem(item) {
|
||||
if (item.$view && _.indexOf(settings.types, item.type) >= 0) {
|
||||
if (item.$view && _.includes(settings.types, item.type)) {
|
||||
item.$view.find('a').on('click', function (ev) {
|
||||
ev.preventDefault();
|
||||
|
||||
var matchedItems = _.compact(_.map($('#items .item'), function (matchedItem) {
|
||||
matchedItem = $(matchedItem).data('item');
|
||||
return _.indexOf(settings.types, matchedItem.type) >= 0 ? matchedItem : null;
|
||||
return _.includes(settings.types, matchedItem.type) ? matchedItem : null;
|
||||
}));
|
||||
|
||||
onEnter(matchedItems, _.indexOf(matchedItems, item));
|
||||
|
|
Loading…
Add table
Reference in a new issue