From 45b881dd0052126d4cd2b72b48f66db2455567c7 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 1 Mar 2016 22:27:33 -0500 Subject: [PATCH] drop jqm collapsible --- .../emby-collapsible/emby-collapsible.html | 157 ++++++++++++++++++ .../components/filterdialog/filterdialog.js | 5 +- .../filterdialog/filterdialog.template.html | 49 ++---- dashboard-ui/css/site.css | 24 +++ dashboard-ui/dashboard.html | 71 ++++---- dashboard-ui/manifest.json | 6 +- dashboard-ui/scripts/site.js | 3 +- dashboard-ui/scripts/sync.js | 9 +- 8 files changed, 240 insertions(+), 84 deletions(-) create mode 100644 dashboard-ui/bower_components/emby-collapsible/emby-collapsible.html diff --git a/dashboard-ui/bower_components/emby-collapsible/emby-collapsible.html b/dashboard-ui/bower_components/emby-collapsible/emby-collapsible.html new file mode 100644 index 000000000..4a90e70dd --- /dev/null +++ b/dashboard-ui/bower_components/emby-collapsible/emby-collapsible.html @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/components/filterdialog/filterdialog.js b/dashboard-ui/components/filterdialog/filterdialog.js index 8d798728e..0baf5dbc1 100644 --- a/dashboard-ui/components/filterdialog/filterdialog.js +++ b/dashboard-ui/components/filterdialog/filterdialog.js @@ -1,4 +1,4 @@ -define(['paperdialoghelper', 'events', 'browser', 'paper-checkbox', 'jqmcollapsible', 'css!components/filterdialog/style', 'paper-radio-button', 'paper-radio-group'], function (paperDialogHelper, events, browser) { +define(['paperdialoghelper', 'events', 'browser', 'paper-checkbox', 'emby-collapsible', 'css!components/filterdialog/style', 'paper-radio-button', 'paper-radio-group'], function (paperDialogHelper, events, browser) { function renderOptions(context, selector, cssClass, items, isCheckedFn) { @@ -526,9 +526,6 @@ setVisibility(dlg, options); document.body.appendChild(dlg); - // needed for jqm collapsibles - $(dlg.querySelectorAll('div[data-role="collapsible"]')).collapsible({}); - paperDialogHelper.open(dlg); dlg.addEventListener('iron-overlay-closed', resolve); diff --git a/dashboard-ui/components/filterdialog/filterdialog.template.html b/dashboard-ui/components/filterdialog/filterdialog.template.html index f4b149ab5..78742d645 100644 --- a/dashboard-ui/components/filterdialog/filterdialog.template.html +++ b/dashboard-ui/components/filterdialog/filterdialog.template.html @@ -25,9 +25,7 @@
-
-

${HeaderAirDays}

- +
${OptionSunday} ${OptionMonday} @@ -37,10 +35,8 @@ ${OptionFriday} ${OptionSaturday}
-
-
-

${HeaderFeatures}

- + +
${OptionHasSubtitles} ${OptionHasTrailer} @@ -48,7 +44,7 @@ ${OptionHasThemeSong} ${OptionHasThemeVideo}
-
+

@@ -61,37 +57,22 @@ ${Option4Player}

-
-

${HeaderGenres}

- +
-
- -
-

${HeaderParentalRatings}

+ +
-
- -
-

${HeaderTags}

+ +
-
- -
-

${HeaderTags}

- -
-
-
- -
-

${HeaderVideoTypes}

+ +
${OptionBluray} ${OptionDvd} @@ -101,12 +82,10 @@ ${OptionIsSD} ${Option3D}
-
- -
-

${HeaderYears}

+ +
-
+ \ No newline at end of file diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index c8eb8d467..7c2658ec4 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -1878,3 +1878,27 @@ progress { .actionSheetMenuItem:hover { background-color: #e8e8e8; } + +emby-collapsible>.style-scope { + margin: .5em 0; +} + +.ui-body-a .emby-collapsible-button { + border: 1px solid #ddd; + background-color: #f2f2f2; + text-transform: none; +} + +.ui-body-a .emby-collapsible-title { + margin: .25em 0; + color: #000; + padding: 0 0 0 .25em; + font-weight: 500; +} + +.ui-body-a .emby-collapsible-content { + border: 1px solid #ddd; + border-width: 0 1px 1px 1px; + padding: 1em 1.25em; + background-color: #fff; +} diff --git a/dashboard-ui/dashboard.html b/dashboard-ui/dashboard.html index 0a8fa95c5..3294997f9 100644 --- a/dashboard-ui/dashboard.html +++ b/dashboard-ui/dashboard.html @@ -4,7 +4,7 @@ Emby -
+
@@ -23,6 +23,8 @@
+
+

${HeaderServerInformation}

@@ -57,15 +59,17 @@

- -
diff --git a/dashboard-ui/manifest.json b/dashboard-ui/manifest.json index bf7328395..8b6e28cd0 100644 --- a/dashboard-ui/manifest.json +++ b/dashboard-ui/manifest.json @@ -16,13 +16,11 @@ } ], "icons": [ { - "src": "images/icon-144x144.png", + "src": "css/images/touchicon144.png", "sizes": "144x144", "type": "image/png", "density": "3.0" }], "display": "standalone", - "display": "standalone", - "theme_color": "#52B54B", - "start_image": "images/start-image.png" + "theme_color": "#52B54B" } \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 83eea9f4f..b495f4265 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1491,7 +1491,7 @@ var AppInfo = {}; // This doesn't perform well on iOS AppInfo.enableHeadRoom = !isIOS; - AppInfo.supportsDownloading = !(AppInfo.isNativeApp && isIOS); + AppInfo.supportsDownloading = !(AppInfo.isNativeApp); // This currently isn't working on android, unfortunately AppInfo.supportsFileInput = !(AppInfo.isNativeApp && isAndroid); @@ -1842,6 +1842,7 @@ var AppInfo = {}; define("paper-item-body", ["html!" + bowerPath + "/paper-item/paper-item-body.html"]); define("paper-collapse-item", ["html!" + bowerPath + "/paper-collapse-item/paper-collapse-item.html"]); + define("emby-collapsible", ["html!" + bowerPath + "/emby-collapsible/emby-collapsible.html"]); define("jstree", [bowerPath + "/jstree/dist/jstree", "css!thirdparty/jstree/themes/default/style.min.css"]); diff --git a/dashboard-ui/scripts/sync.js b/dashboard-ui/scripts/sync.js index dc0de3f79..80e48a986 100644 --- a/dashboard-ui/scripts/sync.js +++ b/dashboard-ui/scripts/sync.js @@ -81,7 +81,7 @@ return new Promise(function (resolve, reject) { - require(['paper-checkbox', 'paper-input', 'jqmcollapsible'], function () { + require(['paper-checkbox', 'paper-input', 'emby-collapsible'], function () { renderFormInternal(options); resolve(); }); @@ -162,8 +162,7 @@ dialogOptions.Options.indexOf('ItemLimit') != -1) { html += '
'; - html += '
'; - html += '

' + Globalize.translate('HeaderAdvanced') + '

'; + html += ''; html += '
'; if (dialogOptions.Options.indexOf('SyncNewContent') != -1) { html += '
'; @@ -179,14 +178,14 @@ html += '
' + Globalize.translate('LabelItemLimitHelp') + '
'; html += '
'; } - html += '
'; + html += ''; html += '
'; } //html += '
'; //html += '
'; - $(elem).html(html).trigger('create'); + $(elem).html(html); $('#selectSyncTarget', elem).on('change', function () {