From 7783cf67a8ea19b22b1ff9cffdec733136290269 Mon Sep 17 00:00:00 2001
From: Paul Sori
Date: Sun, 18 Nov 2018 01:15:35 -0500
Subject: [PATCH] Better modals
---
modules/db-management/database-master.js | 2 +-
public/css/master.css | 26 ++++++++++++++++++++++
public/js/mstream.js | 28 +++++++++++++++++++-----
public/js/winamp.js | 2 +-
public/mstream.html | 8 +++----
5 files changed, 55 insertions(+), 11 deletions(-)
diff --git a/modules/db-management/database-master.js b/modules/db-management/database-master.js
index 407d9b1..d54fb6c 100644
--- a/modules/db-management/database-master.js
+++ b/modules/db-management/database-master.js
@@ -88,7 +88,7 @@ exports.setup = function (mstream, program) {
// Scan library
mstream.get('/db/recursive-scan', (req, res) => {
- runScan(program);
+ const scan = runScan(program);
res.status((scan.error === true) ? 555 : 200).json({ status: scan.message });
});
}
diff --git a/public/css/master.css b/public/css/master.css
index ea41705..253fe6c 100755
--- a/public/css/master.css
+++ b/public/css/master.css
@@ -14,6 +14,32 @@ body {
clear: both;
}
+#save_playlist_form{
+ padding-left: 15px;
+ padding-right: 15px;
+ padding-top: 25px;
+}
+
+input[type="submit"], input[type="button"] {
+ background-color: rgb(147, 151, 205);
+ border-radius: 2px;
+ border-style: solid;
+ border-width: 1px;
+ border-color: rgb(147, 151, 205);
+ box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
+ box-sizing: border-box;
+ color: rgb(255, 255, 255);
+ cursor: pointer;
+ width: 150px;
+ height: 40px;
+ font-weight: 800;
+ font-size: 15px;
+ font-family: 'Jura', sans-serif;
+}
+
+input[type="submit"]:focus {outline:0;}
+input[type="button"]:focus {outline:0;}
+
.fullHeight {
height: 100%;
overflow: scroll; }
diff --git a/public/js/mstream.js b/public/js/mstream.js
index 41efb46..945c6b6 100755
--- a/public/js/mstream.js
+++ b/public/js/mstream.js
@@ -23,11 +23,13 @@ $(document).ready(function () {
// Modals
$("#sharePlaylist").iziModal({
title: 'Share Playlist',
- setBottom: 100
+ headerColor: '#5a5a6a',
+ padding: 15
});
$('#savePlaylist').iziModal({
title: 'Save Playlist',
- setBottom: 100
+ headerColor: '#5a5a6a',
+ width: 475
});
$(document).on('click', '.trigger-share', function (event) {
event.preventDefault();
@@ -42,6 +44,7 @@ $(document).ready(function () {
$('#savePlaylist').iziModal('open');
});
$('#savePlaylist').iziModal('setTop', '15%');
+ $('#sharePlaylist').iziModal('setTop', '15%');
const myDropzone = new Dropzone(document.body, {
previewsContainer: false,
@@ -304,6 +307,9 @@ $(document).ready(function () {
/////////////////////////////////////// File Explorer
function loadFileExplorer() {
+ $('ul.left-nav-menu li').removeClass('selected');
+ $('.get_file_explorer').addClass('selected');
+
resetPanel('File Explorer', 'scrollBoxHeight1');
programState = [{
state: 'fileExplorer'
@@ -627,6 +633,8 @@ $(document).ready(function () {
});
function getAllPlaylists() {
+ $('ul.left-nav-menu li').removeClass('selected');
+ $('.get_all_playlists').addClass('selected');
resetPanel('Playlists', 'scrollBoxHeight1');
programState = [{
state: 'allPlaylists'
@@ -767,6 +775,8 @@ $(document).ready(function () {
///////////////////////////// Database Management
// The Manage DB panel
$('.db-panel').on('click', function () {
+ $('ul.left-nav-menu li').removeClass('selected');
+ $('.db-panel').addClass('selected');
resetPanel('Database', 'scrollBoxHeight2');
$('#directory_bar').hide();
@@ -794,7 +804,7 @@ $(document).ready(function () {
return;
}
// If you got this far the db is made and working
- $('#filelist').append('Your DB has ' + response.totalFileCount + ' files
');
+ $('#filelist').append('Your DB has ' + response.totalFileCount + ' files
');
});
});
@@ -841,6 +851,8 @@ $(document).ready(function () {
});
function getAllAlbums() {
+ $('ul.left-nav-menu li').removeClass('selected');
+ $('.get_all_albums').addClass('selected');
resetPanel('Albums', 'scrollBoxHeight1');
programState = [{
@@ -919,6 +931,8 @@ $(document).ready(function () {
});
function getAllArtists() {
+ $('ul.left-nav-menu li').removeClass('selected');
+ $('.get_all_artists').addClass('selected');
resetPanel('Artists', 'scrollBoxHeight1');
programState = [{
state: 'allArtists'
@@ -984,6 +998,8 @@ $(document).ready(function () {
getRatedSongs();
});
function getRatedSongs() {
+ $('ul.left-nav-menu li').removeClass('selected');
+ $('.get_rated_songs').addClass('selected');
resetPanel('Starred', 'scrollBoxHeight1');
programState = [{
state: 'allRated'
@@ -1026,6 +1042,8 @@ $(document).ready(function () {
//////////////////////// Jukebox Mode
function setupJukeboxPanel() {
+ $('ul.left-nav-menu li').removeClass('selected');
+ $('.jukebox_mode').addClass('selected');
// Hide the directory bar
resetPanel('Jukebox Mode', 'scrollBoxHeight2');
currentBrowsingList = [];
@@ -1039,7 +1057,7 @@ $(document).ready(function () {
\
\
Jukebox Mode allows you to control this page remotely
\
-
CONNECT IT!
\
+ \
\
';
}
@@ -1049,7 +1067,7 @@ $(document).ready(function () {
}
// The jukebox panel
- $('#jukebox_mode').on('click', function () {
+ $('.jukebox_mode').on('click', function () {
setupJukeboxPanel();
});
diff --git a/public/js/winamp.js b/public/js/winamp.js
index 76428c6..f0893f1 100644
--- a/public/js/winamp.js
+++ b/public/js/winamp.js
@@ -875,7 +875,7 @@ $(document).ready(function () {
}
// The jukebox panel
- $('#jukebox_mode').on('click', function () {
+ $('.jukebox_mode').on('click', function () {
setupJukeboxPanel();
});
diff --git a/public/mstream.html b/public/mstream.html
index ebe2e34..36c2f5e 100755
--- a/public/mstream.html
+++ b/public/mstream.html
@@ -93,7 +93,7 @@
-
+
@@ -106,7 +106,7 @@
@@ -120,7 +120,7 @@
Days
-
+
@@ -189,7 +189,7 @@
Database
-
+
Jukebox