diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json
index 228d4c4f52..ac4fe8801a 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json
+++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json
@@ -15,12 +15,12 @@
},
"devDependencies": {},
"ignore": [],
- "version": "1.0.40",
- "_release": "1.0.40",
+ "version": "1.0.42",
+ "_release": "1.0.42",
"_resolution": {
"type": "version",
- "tag": "1.0.40",
- "commit": "483fcf8659bb829dd12ec41c629c7ab7c380bbd8"
+ "tag": "1.0.42",
+ "commit": "72b4735c586da9d565a9ff268cec1156a71da144"
},
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "~1.0.0",
diff --git a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js
index 4de8810516..e2136bffa8 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/paperdialoghelper/paperdialoghelper.js
@@ -1,6 +1,6 @@
define(['historyManager', 'focusManager', 'performanceManager', 'browser', 'paper-dialog', 'scale-up-animation', 'fade-out-animation', 'fade-in-animation', 'css!./paperdialoghelper.css'], function (historyManager, focusManager, performanceManager, browser) {
- function paperDialogHashHandler(dlg, hash, resolve, lockDocumentScroll) {
+ function paperDialogHashHandler(dlg, hash, resolve) {
var self = this;
self.originalUrl = window.location.href;
@@ -55,7 +55,7 @@
dlg.addEventListener('iron-overlay-closed', onDialogClosed);
dlg.open();
- if (lockDocumentScroll !== false && !document.body.classList.contains('noScroll')) {
+ if (dlg.getAttribute('data-lockscroll') == 'true' && !document.body.classList.contains('noScroll')) {
document.body.classList.add('noScroll');
removeScrollLockOnClose = true;
}
@@ -85,6 +85,19 @@
focusManager.autoFocus(e.target);
}
+ function shouldLockDocumentScroll(options) {
+
+ if (options.lockScroll != null) {
+ return options.lockScroll;
+ }
+
+ if (options.size == 'fullscreen') {
+ return true;
+ }
+
+ return browser.mobile;
+ }
+
function createDialog(options) {
options = options || {};
@@ -94,6 +107,10 @@
dlg.setAttribute('with-backdrop', 'with-backdrop');
dlg.setAttribute('role', 'alertdialog');
+ if (shouldLockDocumentScroll(options)) {
+ dlg.setAttribute('data-lockscroll', 'true');
+ }
+
// without this safari will scroll the background instead of the dialog contents
// but not needed here since this is already on top of an existing dialog
// but skip it in IE because it's causing the entire browser to hang
diff --git a/dashboard-ui/bower_components/iron-meta/.bower.json b/dashboard-ui/bower_components/iron-meta/.bower.json
index f4bfef4a7c..e1304d174b 100644
--- a/dashboard-ui/bower_components/iron-meta/.bower.json
+++ b/dashboard-ui/bower_components/iron-meta/.bower.json
@@ -26,14 +26,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"main": "iron-meta.html",
- "homepage": "https://github.com/polymerelements/iron-meta",
+ "homepage": "https://github.com/PolymerElements/iron-meta",
"_release": "1.1.1",
"_resolution": {
"type": "version",
"tag": "v1.1.1",
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
},
- "_source": "git://github.com/polymerelements/iron-meta.git",
+ "_source": "git://github.com/PolymerElements/iron-meta.git",
"_target": "^1.0.0",
- "_originalSource": "polymerelements/iron-meta"
+ "_originalSource": "PolymerElements/iron-meta"
}
\ No newline at end of file
diff --git a/dashboard-ui/components/imagedownloader/imagedownloader.js b/dashboard-ui/components/imagedownloader/imagedownloader.js
index 76aa7b2399..9503960cf5 100644
--- a/dashboard-ui/components/imagedownloader/imagedownloader.js
+++ b/dashboard-ui/components/imagedownloader/imagedownloader.js
@@ -6,7 +6,7 @@
var hasChanges = false;
// These images can be large and we're seeing memory problems in safari
- var browsableImagePageSize = browserInfo.safari ? 6 : 10;
+ var browsableImagePageSize = browserInfo.safari ? 6 : (browserInfo.mobile ? 10 : 30);
var browsableImageStartIndex = 0;
var browsableImageType = 'Primary';
@@ -272,7 +272,8 @@
currentItemType = itemType;
var dlg = paperDialogHelper.createDialog({
- size: 'fullscreen-border'
+ size: 'fullscreen-border',
+ lockScroll: true
});
var theme = 'b';
diff --git a/dashboard-ui/components/tvguide/tvguide.js b/dashboard-ui/components/tvguide/tvguide.js
index 1f57ddaf7a..0bfd2fe335 100644
--- a/dashboard-ui/components/tvguide/tvguide.js
+++ b/dashboard-ui/components/tvguide/tvguide.js
@@ -452,9 +452,9 @@
function selectDate(page) {
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: dateOptions,
showCancel: true,
title: Globalize.translate('HeaderSelectDate'),
diff --git a/dashboard-ui/scripts/actionsheet.js b/dashboard-ui/scripts/actionsheet.js
index edb69b91bf..7ce7e3f05c 100644
--- a/dashboard-ui/scripts/actionsheet.js
+++ b/dashboard-ui/scripts/actionsheet.js
@@ -1,13 +1,19 @@
-(function () {
+define(['paperdialoghelper', 'paper-menu', 'paper-dialog', 'scale-up-animation', 'fade-out-animation'], function (paperDialogHelper) {
- function show(options) {
+ function parentWithClass(elem, className) {
- require(['paper-menu', 'paper-dialog', 'scale-up-animation', 'fade-out-animation'], function () {
- showInternal(options);
- });
+ while (!elem.classList || !elem.classList.contains(className)) {
+ elem = elem.parentNode;
+
+ if (!elem) {
+ return null;
+ }
+ }
+
+ return elem;
}
- function showInternal(options) {
+ function show(options) {
// items
// positionTo
@@ -15,6 +21,8 @@
// title
var html = '';
+ html += '
';
+
var windowHeight = $(window).height();
var pos;
@@ -54,13 +62,6 @@
html += '';
}
- // There seems to be a bug with this in safari causing it to immediately roll up to 0 height
- var isScrollable = !browserInfo.safari;
-
- if (isScrollable) {
- //html += '
';
- }
-
var itemsWithIcons = options.items.filter(function (o) {
return o.ironIcon;
});
@@ -94,10 +95,7 @@
html += '';
}
html += '';
-
- if (isScrollable) {
- //html += '';
- }
+ html += '
';
if (options.showCancel) {
html += '';
@@ -105,10 +103,11 @@
html += '
';
}
- var dlg = document.createElement('paper-dialog');
- dlg.setAttribute('with-backdrop', 'with-backdrop');
- dlg.setAttribute('role', 'alertdialog');
- dlg.setAttribute('noAutoFocus', 'noAutoFocus');
+ var dlg = paperDialogHelper.createDialog({
+ modal: false,
+ entryAnimationDuration: 160,
+ exitAnimationDuration: 200
+ });
dlg.innerHTML = html;
if (pos) {
@@ -119,25 +118,7 @@
document.body.appendChild(dlg);
- dlg.animationConfig = {
- // scale up
- 'entry': {
- name: 'scale-up-animation',
- node: dlg,
- timing: { duration: 160, easing: 'ease-out' }
- },
- // fade out
- 'exit': {
- name: 'fade-out-animation',
- node: dlg,
- timing: { duration: 200, easing: 'ease-in' }
- }
- };
-
- var delay = browserInfo.chrome ? 0 : 100;
- setTimeout(function () {
- dlg.open();
- }, delay);
+ paperDialogHelper.open(dlg);
// Has to be assigned a z-index after the call to .open()
dlg.addEventListener('iron-overlay-closed', function () {
@@ -151,13 +132,14 @@
var target = parentWithClass(e.target, 'actionSheetMenuItem');
if (target) {
+
var selectedId = target.getAttribute('data-id');
+ paperDialogHelper.close(dlg);
+
// Add a delay here to allow the click animation to finish, for nice effect
setTimeout(function () {
- dlg.close();
-
if (options.callback) {
options.callback(selectedId);
}
@@ -167,20 +149,7 @@
});
}
- function parentWithClass(elem, className) {
-
- while (!elem.classList || !elem.classList.contains(className)) {
- elem = elem.parentNode;
-
- if (!elem) {
- return null;
- }
- }
-
- return elem;
- }
-
- window.ActionSheetElement = {
+ return {
show: show
};
-})();
\ No newline at end of file
+});
\ No newline at end of file
diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js
index b95cef20b4..7d9c6aec8a 100644
--- a/dashboard-ui/scripts/edititemmetadata.js
+++ b/dashboard-ui/scripts/edititemmetadata.js
@@ -1146,9 +1146,9 @@
ironIcon: 'photo'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: elem,
callback: function (id) {
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index ba2f08e304..99e7713264 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -722,9 +722,9 @@
});
}
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: positionTo,
callback: function (id) {
@@ -994,9 +994,9 @@
});
}
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: items,
positionTo: positionTo,
callback: function (id) {
@@ -2766,9 +2766,9 @@
};
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: button,
callback: function (id) {
@@ -2877,11 +2877,13 @@
showSortMenu: function (options) {
- require(['paperdialoghelper', 'paper-dialog', 'paper-radio-button', 'paper-radio-group', 'scale-up-animation', 'fade-in-animation', 'fade-out-animation'], function (paperDialogHelper) {
+ require(['paperdialoghelper', 'paper-radio-button', 'paper-radio-group'], function (paperDialogHelper) {
var dlg = paperDialogHelper.createDialog({
removeOnClose: true,
- modal: false
+ modal: false,
+ entryAnimationDuration: 160,
+ exitAnimationDuration: 200
});
dlg.classList.add('ui-body-a');
@@ -2889,21 +2891,12 @@
var html = '';
- // There seems to be a bug with this in safari causing it to immediately roll up to 0 height
- // Have to disable this right now because it's causing the radio buttons to not function properly in other browsers besides chrome
- var isScrollable = false;
- if (browserInfo.android) {
- isScrollable = true;
- }
+ html += '';
- html += '
';
+ html += '';
html += Globalize.translate('HeaderSortBy');
html += '
';
- if (isScrollable) {
- html += '';
- }
-
html += '';
for (var i = 0, length = options.items.length; i < length; i++) {
@@ -2913,17 +2906,14 @@
}
html += '';
- html += '';
+ html += '
';
html += Globalize.translate('HeaderSortOrder');
- html += '';
+ html += '
';
html += '';
html += '';
html += '';
html += '';
-
- if (isScrollable) {
- html += '';
- }
+ html += '
';
html += '';
html += '
' + Globalize.translate('ButtonClose') + '';
@@ -2933,16 +2923,13 @@
document.body.appendChild(dlg);
var fireCallbackOnClose = false;
- var delay = browserInfo.animate ? 0 : 100;
- setTimeout(function () {
- paperDialogHelper.open(dlg).then(function () {
+ paperDialogHelper.open(dlg).then(function () {
- if (options.callback && fireCallbackOnClose) {
- options.callback();
- }
- });
- }, delay);
+ if (options.callback && fireCallbackOnClose) {
+ options.callback();
+ }
+ });
$('.groupSortBy', dlg).on('iron-select', function () {
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index 2b79c1f8de..9186fe8a9e 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -450,9 +450,9 @@
}
}
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: items,
positionTo: displayContextItem,
callback: function (id) {
@@ -1135,9 +1135,9 @@
ironIcon: 'sync'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: items,
positionTo: e.target,
callback: function (id) {
diff --git a/dashboard-ui/scripts/livetvstatus.js b/dashboard-ui/scripts/livetvstatus.js
index f8b7328039..6578fea616 100644
--- a/dashboard-ui/scripts/livetvstatus.js
+++ b/dashboard-ui/scripts/livetvstatus.js
@@ -421,9 +421,9 @@
id: 'other'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: button,
callback: function (id) {
@@ -460,9 +460,9 @@
id: 'other'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: button,
callback: function (id) {
diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js
index 04c594d63c..f12d36e3fb 100644
--- a/dashboard-ui/scripts/mediacontroller.js
+++ b/dashboard-ui/scripts/mediacontroller.js
@@ -93,11 +93,11 @@
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
Dashboard.hideLoadingMsg();
- ActionSheetElement.show({
+ actionsheet.show({
title: Globalize.translate('HeaderSelectPlayer'),
items: menuItems,
positionTo: button,
@@ -413,9 +413,9 @@
id: 'cancel'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
//positionTo: positionTo,
title: Globalize.translate('ConfirmEndPlayerSession'),
diff --git a/dashboard-ui/scripts/medialibrarypage.js b/dashboard-ui/scripts/medialibrarypage.js
index 027e6e35f4..67f4e48fb8 100644
--- a/dashboard-ui/scripts/medialibrarypage.js
+++ b/dashboard-ui/scripts/medialibrarypage.js
@@ -122,9 +122,9 @@
ironIcon: 'mode-edit'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: elem,
callback: function (resultId) {
diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js
index f77cd4902e..1e18f9ab9d 100644
--- a/dashboard-ui/scripts/mediaplayer-video.js
+++ b/dashboard-ui/scripts/mediaplayer-video.js
@@ -121,9 +121,9 @@
return opt;
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: $('.videoSubtitleButton')[0],
callback: function (id) {
@@ -140,7 +140,7 @@
self.showQualityFlyout = function () {
- require(['qualityoptions', 'actionsheet'], function (qualityoptions) {
+ require(['qualityoptions', 'actionsheet'], function (qualityoptions, actionsheet) {
var currentSrc = self.getCurrentSrc(self.currentMediaRenderer).toLowerCase();
var isStatic = currentSrc.indexOf('static=true') != -1;
@@ -174,7 +174,7 @@
return o.selected;
});
selectedId = selectedId.length ? selectedId[0].bitrate : null;
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: $('.videoQualityButton')[0],
callback: function (id) {
@@ -236,9 +236,9 @@
return opt;
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: $('.videoAudioButton')[0],
callback: function (id) {
diff --git a/dashboard-ui/scripts/nowplayingpage.js b/dashboard-ui/scripts/nowplayingpage.js
index 5f5b301ffd..9f8592536e 100644
--- a/dashboard-ui/scripts/nowplayingpage.js
+++ b/dashboard-ui/scripts/nowplayingpage.js
@@ -142,9 +142,9 @@
return menuItem;
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: button,
callback: function (id) {
@@ -199,9 +199,9 @@
ironIcon: currentIndex == null ? 'check' : null
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: button,
callback: function (id) {
diff --git a/dashboard-ui/scripts/pluginspage.js b/dashboard-ui/scripts/pluginspage.js
index d66ba7e8f8..f1dc08e930 100644
--- a/dashboard-ui/scripts/pluginspage.js
+++ b/dashboard-ui/scripts/pluginspage.js
@@ -185,9 +185,9 @@
ironIcon: 'delete'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: elem,
callback: function (resultId) {
diff --git a/dashboard-ui/scripts/selectserver.js b/dashboard-ui/scripts/selectserver.js
index d850bb3a63..38d667d500 100644
--- a/dashboard-ui/scripts/selectserver.js
+++ b/dashboard-ui/scripts/selectserver.js
@@ -188,9 +188,9 @@
ironIcon: 'delete'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: elem,
callback: function (id) {
@@ -229,9 +229,9 @@
ironIcon: 'cancel'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: elem,
callback: function (id) {
diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js
index b91b9028ff..7176131f89 100644
--- a/dashboard-ui/scripts/site.js
+++ b/dashboard-ui/scripts/site.js
@@ -1873,12 +1873,14 @@ var AppInfo = {};
paths.sharingwidget = "cordova/sharingwidget";
paths.serverdiscovery = "cordova/serverdiscovery";
paths.wakeonlan = "cordova/wakeonlan";
+ paths.actionsheet = "cordova/actionsheet";
} else {
paths.dialog = "components/dialog";
paths.prompt = "components/prompt";
paths.sharingwidget = "components/sharingwidget";
paths.serverdiscovery = apiClientBowerPath + "/serverdiscovery";
paths.wakeonlan = apiClientBowerPath + "/wakeonlan";
+ paths.actionsheet = "scripts/actionsheet";
}
// hack for an android test before browserInfo is loaded
@@ -2056,12 +2058,6 @@ var AppInfo = {};
});
define("tileitemcss", ['css!css/tileitem.css']);
- if (Dashboard.isRunningInCordova()) {
- define("actionsheet", ["cordova/actionsheet"]);
- } else {
- define("actionsheet", ["scripts/actionsheet"]);
- }
-
define("sharingmanager", ["scripts/sharingmanager"]);
if (Dashboard.isRunningInCordova() && browserInfo.safari) {
@@ -2519,9 +2515,9 @@ pageClassOn('pageshow', "page", function () {
}
if (currentTheme != 'a' && !browserInfo.mobile) {
- document.body.classList.add('darkScrollbars');
+ document.documentElement.classList.add('darkScrollbars');
} else {
- document.body.classList.remove('darkScrollbars');
+ document.documentElement.classList.remove('darkScrollbars');
}
Dashboard.ensurePageTitle(page);
diff --git a/dashboard-ui/scripts/slideshow.js b/dashboard-ui/scripts/slideshow.js
index 084f8ea840..27f542b734 100644
--- a/dashboard-ui/scripts/slideshow.js
+++ b/dashboard-ui/scripts/slideshow.js
@@ -16,9 +16,9 @@
ironIcon: 'photo-library'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
callback: function (id) {
diff --git a/dashboard-ui/scripts/syncactivity.js b/dashboard-ui/scripts/syncactivity.js
index 32dd6b38e4..dbcd1f748d 100644
--- a/dashboard-ui/scripts/syncactivity.js
+++ b/dashboard-ui/scripts/syncactivity.js
@@ -287,9 +287,9 @@
});
}
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: elem,
callback: function (id) {
diff --git a/dashboard-ui/scripts/syncjob.js b/dashboard-ui/scripts/syncjob.js
index 16e1e25c8d..39c0901744 100644
--- a/dashboard-ui/scripts/syncjob.js
+++ b/dashboard-ui/scripts/syncjob.js
@@ -179,9 +179,9 @@
});
}
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: elem,
callback: function (id) {
diff --git a/dashboard-ui/scripts/userprofilespage.js b/dashboard-ui/scripts/userprofilespage.js
index 1941a6f65c..c19d76d961 100644
--- a/dashboard-ui/scripts/userprofilespage.js
+++ b/dashboard-ui/scripts/userprofilespage.js
@@ -77,9 +77,9 @@
ironIcon: 'delete'
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
items: menuItems,
positionTo: card,
callback: function (id) {
diff --git a/dashboard-ui/themes/holiday/theme.js b/dashboard-ui/themes/holiday/theme.js
index 7cb5116390..da66dbcea4 100644
--- a/dashboard-ui/themes/holiday/theme.js
+++ b/dashboard-ui/themes/holiday/theme.js
@@ -138,9 +138,9 @@
ironIcon: current == 'christmas' ? 'check' : null
});
- require(['actionsheet'], function () {
+ require(['actionsheet'], function (actionsheet) {
- ActionSheetElement.show({
+ actionsheet.show({
title: 'Happy holidays from the Emby team! Select your holiday theme:',
items: items,
callback: function (id) {