diff --git a/dashboard-ui/css/fonts/mblogo.eot b/dashboard-ui/css/fonts/mblogo.eot deleted file mode 100644 index 4067fab007..0000000000 Binary files a/dashboard-ui/css/fonts/mblogo.eot and /dev/null differ diff --git a/dashboard-ui/css/fonts/mblogo.ttf b/dashboard-ui/css/fonts/mblogo.ttf deleted file mode 100644 index 212e67c404..0000000000 Binary files a/dashboard-ui/css/fonts/mblogo.ttf and /dev/null differ diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 1e0af4be05..443afb7173 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -65,8 +65,7 @@ font-family: 'MBLogo'; font-style: normal; font-weight: 200; - src: url('fonts/mblogo.eot'); - src: url('fonts/mblogo.eot?#iefix') format('embedded-opentype'), url('fonts/mblogo.woff') format('woff'), url('fonts/mblogo.ttf') format('truetype'); + src: url('fonts/mblogo.woff') format('woff'); } * { diff --git a/dashboard-ui/dlnaprofile.html b/dashboard-ui/dlnaprofile.html index a29244cc43..f33651ef91 100644 --- a/dashboard-ui/dlnaprofile.html +++ b/dashboard-ui/dlnaprofile.html @@ -278,6 +278,16 @@ +
+

${HeaderSubtitleProfiles}

+
+

${HeaderSubtitleProfilesHelp}

+

+
+
+
+
+

${HeaderXmlSettings}

@@ -687,6 +697,52 @@
+ + + - + \ No newline at end of file diff --git a/dashboard-ui/scripts/dlnaprofile.js b/dashboard-ui/scripts/dlnaprofile.js index 59f389cb98..7daa17e40c 100644 --- a/dashboard-ui/scripts/dlnaprofile.js +++ b/dashboard-ui/scripts/dlnaprofile.js @@ -50,6 +50,7 @@ var idInfo = profile.Identification || {}; renderIdentificationHeaders(page, idInfo.Headers || []); + renderSubtitleProfiles(page, profile.SubtitleProfiles || []); $('#txtInfoFriendlyName', page).val(profile.FriendlyName || ''); $('#txtInfoModelName', page).val(profile.ModelName || ''); @@ -212,7 +213,7 @@ } function editXmlDocumentAttribute(page, attribute) { - + isSubProfileNew = attribute == null; attribute = attribute || {}; currentSubProfile = attribute; @@ -242,6 +243,82 @@ $('#xmlAttributePopup', page).popup('close'); } + function renderSubtitleProfiles(page, profiles) { + + var index = 0; + + var html = ''; + + var elem = $('.subtitleProfileList', page).html(html).trigger('create'); + + $('.btnDeleteProfile', elem).on('click', function () { + + var itemIndex = parseInt(this.getAttribute('data-index')); + + currentProfile.SubtitleProfiles.splice(itemIndex, 1); + + renderSubtitleProfiles(page, currentProfile.SubtitleProfiles); + }); + + $('.lnkEditSubProfile', elem).on('click', function () { + + var itemIndex = parseInt(this.getAttribute('data-index')); + + editSubtitleProfile(page, currentProfile.SubtitleProfiles[itemIndex]); + }); + } + + function editSubtitleProfile(page, profile) { + + isSubProfileNew = profile == null; + profile = profile || {}; + currentSubProfile = profile; + + var popup = $('#subtitleProfilePopup', page); + + $('#txtSubtitleProfileFormat', popup).val(profile.Format || ''); + $('#selectSubtitleProfileMethod', popup).val(profile.Method || '').selectmenu('refresh'); + $('#selectSubtitleProfileDidlMode', popup).val(profile.DidlMode || '').selectmenu('refresh'); + + popup.popup('open'); + } + + function saveSubtitleProfile(page) { + + currentSubProfile.Format = $('#txtSubtitleProfileFormat', page).val(); + currentSubProfile.Method = $('#selectSubtitleProfileMethod', page).val(); + currentSubProfile.DidlMode = $('#selectSubtitleProfileDidlMode', page).val(); + + if (isSubProfileNew) { + + currentProfile.SubtitleProfiles.push(currentSubProfile); + } + + renderSubtitleProfiles(page, currentProfile.SubtitleProfiles); + + currentSubProfile = null; + + $('#subtitleProfilePopup', page).popup('close'); + } + function renderSubProfiles(page, profile) { renderDirectPlayProfiles(page, profile.DirectPlayProfiles); @@ -981,6 +1058,11 @@ editXmlDocumentAttribute(page); }); + $('.btnAddSubtitleProfile', page).on('click', function () { + + editSubtitleProfile(page); + }); + }).on('pageshow', "#dlnaProfilePage", function () { var page = this; @@ -1058,8 +1140,8 @@ return false; }, - onIdentificationHeaderFormSubmit: function() { - + onIdentificationHeaderFormSubmit: function () { + var form = this; var page = $(form).parents('.page'); @@ -1075,8 +1157,18 @@ saveXmlDocumentAttribute(page); + return false; + }, + + onSubtitleProfileFormSubmit: function () { + + var form = this; + var page = $(form).parents('.page'); + + saveSubtitleProfile(page); + return false; } }; -})(jQuery, document, window); +})(jQuery, document, window); \ No newline at end of file diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 0a126a9dc4..3de2cb2139 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -183,9 +183,9 @@ function setPeopleHeader(page, item) { if (item.Type == "Audio" || item.Type == "MusicAlbum" || item.MediaType == "Book" || item.MediaType == "Photo") { - $('#peopleHeader', page).html('People'); + $('#peopleHeader', page).html(Globalize.translate('HeaderPeople')); } else { - $('#peopleHeader', page).html('Cast & Crew'); + $('#peopleHeader', page).html(Globalize.translate('HeaderCastAndCrew')); } } @@ -426,54 +426,54 @@ var attributes = []; if (item.CameraMake) { - attributes.push(createAttribute("Camera make", item.CameraMake)); + attributes.push(createAttribute(Globalize.translate('MediaInfoCameraMake'), item.CameraMake)); } if (item.CameraModel) { - attributes.push(createAttribute("Camera model", item.CameraModel)); + attributes.push(createAttribute(Globalize.translate('MediaInfoCameraModel'), item.CameraModel)); } if (item.Altitude) { - attributes.push(createAttribute("Altitude", item.Altitude.toFixed(1))); + attributes.push(createAttribute(Globalize.translate('MediaInfoAltitude'), item.Altitude.toFixed(1))); } if (item.Aperture) { - attributes.push(createAttribute("Aperture", 'F' + item.Aperture.toFixed(1))); + attributes.push(createAttribute(Globalize.translate('MediaInfoAperture'), 'F' + item.Aperture.toFixed(1))); } if (item.ExposureTime) { var val = 1 / item.ExposureTime; - attributes.push(createAttribute("Exposure time", '1/' + val + ' s')); + attributes.push(createAttribute(Globalize.translate('MediaInfoExposureTime'), '1/' + val + ' s')); } if (item.FocalLength) { - attributes.push(createAttribute("Focal length", item.FocalLength.toFixed(1) + ' mm')); + attributes.push(createAttribute(Globalize.translate('MediaInfoFocalLength'), item.FocalLength.toFixed(1) + ' mm')); } if (item.ImageOrientation) { - attributes.push(createAttribute("Orientation", item.ImageOrientation)); + attributes.push(createAttribute(Globalize.translate('MediaInfoOrientation'), item.ImageOrientation)); } if (item.IsoSpeedRating) { - attributes.push(createAttribute("Iso Speed Rating", item.IsoSpeedRating)); + attributes.push(createAttribute(Globalize.translate('MediaInfoIsoSpeedRating'), item.IsoSpeedRating)); } if (item.Latitude) { - attributes.push(createAttribute("Latitude", item.Latitude.toFixed(1))); + attributes.push(createAttribute(Globalize.translate('MediaInfoLatitude'), item.Latitude.toFixed(1))); } if (item.Longitude) { - attributes.push(createAttribute("Longitude", item.Longitude.toFixed(1))); + attributes.push(createAttribute(Globalize.translate('MediaInfoLongitude'), item.Longitude.toFixed(1))); } if (item.ShutterSpeed) { - attributes.push(createAttribute("ShutterSpeed", item.ShutterSpeed)); + attributes.push(createAttribute(Globalize.translate('MediaInfoShutterSpeed'), item.ShutterSpeed)); } if (item.Software) { - attributes.push(createAttribute("Software", item.Software)); + attributes.push(createAttribute(Globalize.translate('MediaInfoSoftware'), item.Software)); } html += attributes.join('
'); @@ -510,10 +510,10 @@ html = html.join(' / '); if (artists.length == 1) { - return 'Artist:  ' + html; + return Globalize.translate('ValueArtist', html); } if (artists.length > 1) { - return 'Artists:  ' + html; + return Globalize.translate('ValueArtists', html); } return html; @@ -619,7 +619,7 @@ var elem = $('#similarCollapsible', page).show(); - $('.detailSectionHeader', elem).html('If you like ' + item.Name + ', check these out...'); + $('.detailSectionHeader', elem).html(Globalize.translate('HeaderIfYouLikeCheckTheseOut', item.Name)); var html = LibraryBrowser.getPosterViewHtml({ items: result.Items, @@ -674,7 +674,7 @@ if (item.Tags && item.Tags.length) { var html = ''; - html += '

Tags

'; + html += '

' + Globalize.translate('HeaderTags') + '

'; for (var i = 0, length = item.Tags.length; i < length; i++) { html += '
' + item.Tags[i] + '
'; @@ -693,7 +693,7 @@ if (item.Keywords && item.Keywords.length) { var html = ''; - html += '

Plot Keywords

'; + html += '

' + Globalize.translate('HeaderPlotKeywords') + '

'; for (var i = 0, length = item.Keywords.length; i < length; i++) { html += '
' + item.Keywords[i] + '
'; @@ -800,11 +800,11 @@ if (item.Type == "BoxSet") { var collectionItemTypes = [ - { name: 'Movies', type: 'Movie' }, - { name: 'Series', type: 'Series' }, - { name: 'Albums', type: 'MusicAlbum' }, - { name: 'Games', type: 'Game' }, - { name: 'Books', type: 'Book' } + { name: Globalize.translate('HeaderMovies'), type: 'Movie' }, + { name: Globalize.translate('HeaderSeries'), type: 'Series' }, + { name: Globalize.translate('HeaderAlbums'), type: 'MusicAlbum' }, + { name: Globalize.translate('HeaderGames'), type: 'Game' }, + { name: Globalize.translate('HeaderBooks'), type: 'Book' } ]; renderCollectionItems(page, collectionItemTypes, result.Items, user, context); @@ -812,19 +812,19 @@ }); if (item.Type == "Season") { - $('#childrenTitle', page).html('Episodes'); + $('#childrenTitle', page).html(Globalize.translate('HeaderEpisodes')); } else if (item.Type == "Series") { - $('#childrenTitle', page).html('Seasons'); + $('#childrenTitle', page).html(Globalize.translate('HeaderSeasons')); } else if (item.Type == "MusicAlbum") { - $('#childrenTitle', page).html('Tracks'); + $('#childrenTitle', page).html(Globalize.translate('HeaderTracks')); } else if (item.Type == "GameSystem") { - $('#childrenTitle', page).html('Games'); + $('#childrenTitle', page).html(Globalize.translate('HeaderGames')); } else { - $('#childrenTitle', page).html('Items'); + $('#childrenTitle', page).html(Globalize.translate('HeaderItems')); } } @@ -840,14 +840,12 @@ }); - if (!typeItems.length) { - continue; + if (typeItems.length) { + renderCollectionItemType(page, type, typeItems, user); } - - renderCollectionItemType(page, type, typeItems, user); } - var otherType = { name: 'Other Items' }; + var otherType = { name: Globalize.translate('HeaderOtherItems') }; var otherTypeItems = items.filter(function (curr) { @@ -864,7 +862,7 @@ } if (!items.length) { - renderCollectionItemType(page, { name: 'Titles' }, items, user); + renderCollectionItemType(page, { name: Globalize.translate('HeaderItems') }, items, user); } $('.collectionItems', page).trigger('create').createCardMenus(); @@ -880,7 +878,7 @@ html += '' + type.name + ''; if (user.Configuration.IsAdministrator) { - html += 'Edit'; + html += '' + Globalize.translate('ButtonEdit') + ''; } html += ''; @@ -991,14 +989,14 @@ html += ''; if (review.Url) { - html += ''; + html += ''; } html += ''; } if (limit && result.TotalRecordCount > limit) { - html += '

'; + html += '

'; } $('#criticReviewsContent', page).html(html).trigger('create'); @@ -1154,7 +1152,7 @@ } if (limit && chapters.length > limit) { - html += '

'; + html += '

'; } $('#scenesContent', page).html(html).trigger('create'); @@ -1191,83 +1189,83 @@ continue; } - var type = stream.Type.replace('EmbeddedImage', 'Embedded Image'); - html += '
'; - html += '
' + type + '
'; + var displayType = Globalize.translate('MediaInfoStreamType' + stream.Type); + + html += '
' + displayType + '
'; var attributes = []; if (stream.Language && stream.Type != "Video") { - attributes.push(createAttribute("Language", stream.Language)); + attributes.push(createAttribute(Globalize.translate('MediaInfoLanguage'), stream.Language)); } if (stream.Codec) { - attributes.push(createAttribute("Codec", stream.Codec.toUpperCase())); + attributes.push(createAttribute(Globalize.translate('MediaInfoCodec'), stream.Codec.toUpperCase())); } if (stream.Profile) { - attributes.push(createAttribute("Profile", stream.Profile)); + attributes.push(createAttribute(Globalize.translate('MediaInfoProfile'), stream.Profile)); } if (stream.Level) { - attributes.push(createAttribute("Level", stream.Level)); + attributes.push(createAttribute(Globalize.translate('MediaInfoLevel'), stream.Level)); } if (stream.Width || stream.Height) { - attributes.push(createAttribute("Resolution", stream.Width + 'x' + stream.Height)); + attributes.push(createAttribute(Globalize.translate('MediaInfoResolution'), stream.Width + 'x' + stream.Height)); } if (stream.AspectRatio && stream.Codec != "mjpeg") { - attributes.push(createAttribute("Aspect Ratio", stream.AspectRatio)); + attributes.push(createAttribute(Globalize.translate('MediaInfoAspectRatio'), stream.AspectRatio)); } - if (type == "Video") { + if (stream.Type == "Video") { if (stream.IsAnamorphic != null) { - attributes.push(createAttribute("Anamorphic", (stream.IsAnamorphic ? 'Yes' : 'No'))); + attributes.push(createAttribute(Globalize.translate('MediaInfoAnamorphic'), (stream.IsAnamorphic ? 'Yes' : 'No'))); } - attributes.push(createAttribute("Interlaced", (stream.IsInterlaced ? 'Yes' : 'No'))); + attributes.push(createAttribute(Globalize.translate('MediaInfoInterlaced'), (stream.IsInterlaced ? 'Yes' : 'No'))); } if (stream.AverageFrameRate || stream.RealFrameRate) { - attributes.push(createAttribute("Framerate", (stream.AverageFrameRate || stream.RealFrameRate))); + attributes.push(createAttribute(Globalize.translate('MediaInfoFramerate'), (stream.AverageFrameRate || stream.RealFrameRate))); } if (stream.ChannelLayout) { - attributes.push(createAttribute("Layout", stream.ChannelLayout)); + attributes.push(createAttribute(Globalize.translate('MediaInfoLayout'), stream.ChannelLayout)); } else if (stream.Channels) { - attributes.push(createAttribute("Channels", stream.Channels + ' ch')); + attributes.push(createAttribute(Globalize.translate('MediaInfoChannels'), stream.Channels + ' ch')); } if (stream.BitRate && stream.Codec != "mjpeg") { - attributes.push(createAttribute("Bitrate", (parseInt(stream.BitRate / 1024)) + ' kbps')); + attributes.push(createAttribute(Globalize.translate('MediaInfoBitrate'), (parseInt(stream.BitRate / 1024)) + ' kbps')); } if (stream.SampleRate) { - attributes.push(createAttribute("Sample Rate", stream.SampleRate + ' khz')); + attributes.push(createAttribute(Globalize.translate('MediaInfoSampleRate'), stream.SampleRate + ' khz')); } if (stream.BitDepth) { - attributes.push(createAttribute("Bit Depth", stream.BitDepth + ' bit')); + attributes.push(createAttribute(Globalize.translate('MediaInfoBitDepth'), stream.BitDepth + ' bit')); } if (stream.PixelFormat) { - attributes.push(createAttribute("Pixel Format", stream.PixelFormat)); + attributes.push(createAttribute(Globalize.translate('MediaInfoPixelFormat'), stream.PixelFormat)); } if (stream.Type != "Video") { - attributes.push(createAttribute("Default", (stream.IsDefault ? 'Yes' : 'No'))); + attributes.push(createAttribute(Globalize.translate('MediaInfoDefault'), (stream.IsDefault ? 'Yes' : 'No'))); } if (stream.Type == "Subtitle") { - attributes.push(createAttribute("Forced", (stream.IsForced ? 'Yes' : 'No'))); - attributes.push(createAttribute("External", (stream.IsExternal ? 'Yes' : 'No'))); + attributes.push(createAttribute(Globalize.translate('MediaInfoForced'), (stream.IsForced ? 'Yes' : 'No'))); + attributes.push(createAttribute(Globalize.translate('MediaInfoExternal'), (stream.IsExternal ? 'Yes' : 'No'))); } if (stream.Type == "Video" && version.Timestamp) { - attributes.push(createAttribute("Timestamp", version.Timestamp)); + attributes.push(createAttribute(Globalize.translate('MediaInfoTimestamp'), version.Timestamp)); } html += attributes.join('
'); @@ -1276,22 +1274,22 @@ } if (version.Container) { - html += '
Container' + version.Container + '
'; + html += '
' + Globalize.translate('MediaInfoContainer') + '' + version.Container + '
'; } if (version.Formats && version.Formats.length) { - //html += '
Format' + version.Formats.join(',') + '
'; + //html += '
'+Globalize.translate('MediaInfoFormat')+'' + version.Formats.join(',') + '
'; } if (version.Path) { - html += '
Path' + version.Path + '
'; + html += '
' + Globalize.translate('MediaInfoPath') + '' + version.Path + '
'; } if (version.Size) { var size = (version.Size / (1024 * 1024)).toFixed(0); - html += '
Size' + size + ' MB
'; + html += '
' + Globalize.translate('MediaInfoSize') + '' + size + ' MB
'; } return html; @@ -1372,7 +1370,7 @@ } if (limit && items.length > limit) { - html += '

'; + html += '

'; } return html; @@ -1426,10 +1424,10 @@ html += '

' + cast.Name + '

'; - var role = cast.Role ? "as " + cast.Role : cast.Type; + var role = cast.Role ? Globalize.translate('ValueAsRole', cast.Role) : cast.Type; if (role == "GuestStar") { - role = "Guest star"; + role = Globalize.translate('ValueGuestStar'); } role = role || ""; @@ -1448,7 +1446,7 @@ } if (limit && casts.length > limit) { - html += '

'; + html += '

'; } $('#castContent', page).html(html).trigger('create'); diff --git a/dashboard-ui/scripts/useredit.js b/dashboard-ui/scripts/useredit.js index e376d12f74..5bbb7169ec 100644 --- a/dashboard-ui/scripts/useredit.js +++ b/dashboard-ui/scripts/useredit.js @@ -21,7 +21,7 @@ } if (user.Id && loggedInUser.Configuration.IsAdministrator) { - $('#fldConnectInfo', page).hide(); + $('#fldConnectInfo', page).show(); } else { $('#fldConnectInfo', page).hide(); }