diff --git a/htdocs/css/admin.css b/htdocs/css/admin.css index fc2bfe6..88d8da8 100644 --- a/htdocs/css/admin.css +++ b/htdocs/css/admin.css @@ -80,7 +80,7 @@ h1 { padding-right: 15px; } -.bookmarks table .frequency { +.bookmarks table .frequency, .bookmark-list table .frequency { text-align: right; } @@ -90,6 +90,10 @@ h1 { display: initial; } +.bookmark-list table .form-check-input { + margin-left: 0; +} + .actions { margin: 1rem 0; } diff --git a/htdocs/lib/BookmarkBar.js b/htdocs/lib/BookmarkBar.js index 35e8919..2284ca5 100644 --- a/htdocs/lib/BookmarkBar.js +++ b/htdocs/lib/BookmarkBar.js @@ -145,21 +145,3 @@ BookmarkBar.prototype.getDemodulatorPanel = function() { BookmarkBar.prototype.getDemodulator = function() { return this.getDemodulatorPanel().getDemodulator(); }; - -BookmarkLocalStorage = function(){ -}; - -BookmarkLocalStorage.prototype.getBookmarks = function(){ - return JSON.parse(window.localStorage.getItem("bookmarks")) || []; -}; - -BookmarkLocalStorage.prototype.setBookmarks = function(bookmarks){ - window.localStorage.setItem("bookmarks", JSON.stringify(bookmarks)); -}; - -BookmarkLocalStorage.prototype.deleteBookmark = function(data) { - if (data.id) data = data.id; - var bookmarks = this.getBookmarks(); - bookmarks = bookmarks.filter(function(b) { return b.id !== data; }); - this.setBookmarks(bookmarks); -}; diff --git a/htdocs/lib/BookmarkLocalStorage.js b/htdocs/lib/BookmarkLocalStorage.js new file mode 100644 index 0000000..edb4992 --- /dev/null +++ b/htdocs/lib/BookmarkLocalStorage.js @@ -0,0 +1,17 @@ +BookmarkLocalStorage = function(){ +}; + +BookmarkLocalStorage.prototype.getBookmarks = function(){ + return JSON.parse(window.localStorage.getItem("bookmarks")) || []; +}; + +BookmarkLocalStorage.prototype.setBookmarks = function(bookmarks){ + window.localStorage.setItem("bookmarks", JSON.stringify(bookmarks)); +}; + +BookmarkLocalStorage.prototype.deleteBookmark = function(data) { + if (data.id) data = data.id; + var bookmarks = this.getBookmarks(); + bookmarks = bookmarks.filter(function(b) { return b.id !== data; }); + this.setBookmarks(bookmarks); +}; diff --git a/htdocs/lib/settings/BookmarkTable.js b/htdocs/lib/settings/BookmarkTable.js index c01f3dc..136a66f 100644 --- a/htdocs/lib/settings/BookmarkTable.js +++ b/htdocs/lib/settings/BookmarkTable.js @@ -66,14 +66,16 @@ NameEditor.prototype.getInputHtml = function() { function FrequencyEditor(table) { Editor.call(this, table); - this.suffixes = { - 'K': 3, - 'M': 6, - 'G': 9, - 'T': 12 - }; } +FrequencyEditor.suffixes = { + '': 0, + 'K': 3, + 'M': 6, + 'G': 9, + 'T': 12 +}; + FrequencyEditor.prototype = new Editor(); FrequencyEditor.prototype.getInputHtml = function() { @@ -81,8 +83,7 @@ FrequencyEditor.prototype.getInputHtml = function() { '' + '