1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

replace two instances of incorrect caps for custom elements

This commit is contained in:
dkanada 2019-05-23 00:07:22 -07:00
parent 73b14386ef
commit 5135fd37b3
2 changed files with 29 additions and 29 deletions

View file

@ -1,7 +1,7 @@
define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager', 'imageLoader', 'layoutManager', 'browser', 'dom', 'loading', 'focusManager', 'serverNotifications', 'events', 'registerElement'], function (itemShortcuts, inputManager, connectionManager, playbackManager, imageLoader, layoutManager, browser, dom, loading, focusManager, serverNotifications, events) {
'use strict';
var ItemsContainerProtoType = Object.create(HTMLDivElement.prototype);
var ItemsContainerPrototype = Object.create(HTMLDivElement.prototype);
function onClick(e) {
var itemsContainer = this;
@ -46,7 +46,7 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
};
}
ItemsContainerProtoType.enableMultiSelect = function (enabled) {
ItemsContainerPrototype.enableMultiSelect = function (enabled) {
var current = this.multiSelect;
if (!enabled) {
@ -107,7 +107,7 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
});
}
ItemsContainerProtoType.enableDragReordering = function (enabled) {
ItemsContainerPrototype.enableDragReordering = function (enabled) {
var current = this.sortable;
if (!enabled) {
if (current) {
@ -296,12 +296,12 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
}
}
ItemsContainerProtoType.createdCallback = function () {
ItemsContainerPrototype.createdCallback = function () {
this.classList.add('itemsContainer');
};
ItemsContainerProtoType.attachedCallback = function () {
ItemsContainerPrototype.attachedCallback = function () {
this.addEventListener('click', onClick);
@ -338,7 +338,7 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
}
};
ItemsContainerProtoType.detachedCallback = function () {
ItemsContainerPrototype.detachedCallback = function () {
clearRefreshInterval(this);
this.enableMultiSelect(false);
@ -361,12 +361,12 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
this.parentContainer = null;
};
ItemsContainerProtoType.pause = function () {
ItemsContainerPrototype.pause = function () {
clearRefreshInterval(this, true);
this.paused = true;
};
ItemsContainerProtoType.resume = function (options) {
ItemsContainerPrototype.resume = function (options) {
this.paused = false;
var refreshIntervalEndTime = this.refreshIntervalEndTime;
@ -390,7 +390,7 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
return Promise.resolve();
};
ItemsContainerProtoType.refreshItems = function () {
ItemsContainerPrototype.refreshItems = function () {
if (!this.fetchData) {
return Promise.resolve();
}
@ -405,7 +405,7 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
return this.fetchData().then(onDataFetched.bind(this));
};
ItemsContainerProtoType.notifyRefreshNeeded = function (isInForeground) {
ItemsContainerPrototype.notifyRefreshNeeded = function (isInForeground) {
if (this.paused) {
this.needsRefresh = true;
return;
@ -500,7 +500,7 @@ define(['itemShortcuts', 'inputManager', 'connectionManager', 'playbackManager',
}
document.registerElement('emby-itemscontainer', {
prototype: ItemsContainerProtoType,
prototype: ItemsContainerPrototype,
extends: 'div'
});
});

View file

@ -1,9 +1,9 @@
define(['scroller', 'dom', 'layoutManager', 'inputManager', 'focusManager', 'browser', 'registerElement'], function (scroller, dom, layoutManager, inputManager, focusManager, browser) {
'use strict';
var ScrollerProtoType = Object.create(HTMLDivElement.prototype);
var ScrollerPrototype = Object.create(HTMLDivElement.prototype);
ScrollerProtoType.createdCallback = function () {
ScrollerPrototype.createdCallback = function () {
this.classList.add('emby-scroller');
};
@ -19,61 +19,61 @@ define(['scroller', 'dom', 'layoutManager', 'inputManager', 'focusManager', 'bro
});
}
ScrollerProtoType.scrollToBeginning = function () {
ScrollerPrototype.scrollToBeginning = function () {
if (this.scroller) {
this.scroller.slideTo(0, true);
}
};
ScrollerProtoType.toStart = function (elem, immediate) {
ScrollerPrototype.toStart = function (elem, immediate) {
if (this.scroller) {
this.scroller.toStart(elem, immediate);
}
};
ScrollerProtoType.toCenter = function (elem, immediate) {
ScrollerPrototype.toCenter = function (elem, immediate) {
if (this.scroller) {
this.scroller.toCenter(elem, immediate);
}
};
ScrollerProtoType.scrollToPosition = function (pos, immediate) {
ScrollerPrototype.scrollToPosition = function (pos, immediate) {
if (this.scroller) {
this.scroller.slideTo(pos, immediate);
}
};
ScrollerProtoType.getScrollPosition = function () {
ScrollerPrototype.getScrollPosition = function () {
if (this.scroller) {
return this.scroller.getScrollPosition();
}
};
ScrollerProtoType.getScrollSize = function () {
ScrollerPrototype.getScrollSize = function () {
if (this.scroller) {
return this.scroller.getScrollSize();
}
};
ScrollerProtoType.getScrollEventName = function () {
ScrollerPrototype.getScrollEventName = function () {
if (this.scroller) {
return this.scroller.getScrollEventName();
}
};
ScrollerProtoType.getScrollSlider = function () {
ScrollerPrototype.getScrollSlider = function () {
if (this.scroller) {
return this.scroller.getScrollSlider();
}
};
ScrollerProtoType.addScrollEventListener = function (fn, options) {
ScrollerPrototype.addScrollEventListener = function (fn, options) {
if (this.scroller) {
dom.addEventListener(this.scroller.getScrollFrame(), this.scroller.getScrollEventName(), fn, options);
}
};
ScrollerProtoType.removeScrollEventListener = function (fn, options) {
ScrollerPrototype.removeScrollEventListener = function (fn, options) {
if (this.scroller) {
dom.removeEventListener(this.scroller.getScrollFrame(), this.scroller.getScrollEventName(), fn, options);
}
@ -107,7 +107,7 @@ define(['scroller', 'dom', 'layoutManager', 'inputManager', 'focusManager', 'bro
});
}
ScrollerProtoType.attachedCallback = function () {
ScrollerPrototype.attachedCallback = function () {
if (this.getAttribute('data-navcommands')) {
inputManager.on(this, onInputCommand);
}
@ -170,21 +170,21 @@ define(['scroller', 'dom', 'layoutManager', 'inputManager', 'focusManager', 'bro
});
}
ScrollerProtoType.pause = function () {
ScrollerPrototype.pause = function () {
var headroom = this.headroom;
if (headroom) {
headroom.pause();
}
};
ScrollerProtoType.resume = function () {
ScrollerPrototype.resume = function () {
var headroom = this.headroom;
if (headroom) {
headroom.resume();
}
};
ScrollerProtoType.afterRefresh = function () {
ScrollerPrototype.afterRefresh = function () {
var buttons = this.parentNode.parentNode.querySelector('.emby-scrollbuttons');
if (buttons) {
this.parentNode.scroller.reload();
@ -192,7 +192,7 @@ define(['scroller', 'dom', 'layoutManager', 'inputManager', 'focusManager', 'bro
}
}
ScrollerProtoType.detachedCallback = function () {
ScrollerPrototype.detachedCallback = function () {
if (this.getAttribute('data-navcommands')) {
inputManager.off(this, onInputCommand);
}
@ -211,7 +211,7 @@ define(['scroller', 'dom', 'layoutManager', 'inputManager', 'focusManager', 'bro
};
document.registerElement('emby-scroller', {
prototype: ScrollerProtoType,
prototype: ScrollerPrototype,
extends: 'div'
});
});