diff --git a/pandora/config.0xdb.jsonc b/pandora/config.0xdb.jsonc index 15a38518..6ab3a8ad 100644 --- a/pandora/config.0xdb.jsonc +++ b/pandora/config.0xdb.jsonc @@ -731,6 +731,8 @@ "annotationsRange": "all", "annotationsSize": 256, "annotationsSort": "position", + "calendarFind": "", + "calendarSelection": "", "clipsColumns": 2, "columns": { "Colors": { diff --git a/pandora/config.indiancinema.jsonc b/pandora/config.indiancinema.jsonc index f6c2384e..899fcf02 100644 --- a/pandora/config.indiancinema.jsonc +++ b/pandora/config.indiancinema.jsonc @@ -751,6 +751,8 @@ "annotationsRange": "all", "annotationsSize": 256, "annotationsSort": "position", + "calendarFind": "", + "calendarSelection": "", "clipsColumns": 2, "columns": { "Colors": { diff --git a/pandora/config.padma.jsonc b/pandora/config.padma.jsonc index ff1d1c3c..a6f7931c 100644 --- a/pandora/config.padma.jsonc +++ b/pandora/config.padma.jsonc @@ -648,6 +648,8 @@ "annotationsRange": "position", "annotationsSize": 256, "annotationsSort": "position", + "calendarFind": "", + "calendarSelection": "", "clipsColumns": 2, "columns": { "Colors": { diff --git a/pandora/config.pandora.jsonc b/pandora/config.pandora.jsonc index 03dd817f..4158666e 100644 --- a/pandora/config.pandora.jsonc +++ b/pandora/config.pandora.jsonc @@ -569,6 +569,8 @@ "annotationsRange": "all", "annotationsSize": 256, "annotationsSort": "position", + "calendarFind": "", + "calendarSelection": "", "clipsColumns": 2, "columns": { "Colors": { diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index 7dff8fcc..45e7878e 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -159,16 +159,19 @@ pandora.URL = (function() { } else if (state.view == 'map') { // fixme: this doesn't handle map coordinates if (state.span[0] != '@') { - //pandora.user.ui.mapSelection = state.span; - set['mapSelection'] = state.span; - set['mapFind'] = ''; + set.mapSelection = state.span; + set.mapFind = ''; } else { - //pandora.user.ui.mapFind = state.span.slice(1); - set['mapFind'] = state.span.slice(1); - set['mapSelection'] = ''; + set.mapFind = state.span.slice(1); + set.mapSelection = ''; } } else if (state.view == 'calendar') { - // ... + // fixme: this is still very much unclear + if (state.span.length == 1 && /^\d/.test(state.span)) { + set.calendarFind = state.span[0]; + } else if (state.span.length == 2) { + set.calendarFind = state.span[0]; + } } } diff --git a/static/js/pandora/navigationView.js b/static/js/pandora/navigationView.js index 0fe6300f..f811e4b4 100644 --- a/static/js/pandora/navigationView.js +++ b/static/js/pandora/navigationView.js @@ -173,13 +173,14 @@ pandora.ui.navigationView = function(type, videoRatio) { }, function(result) { that.replaceElement(0, $element = Ox.Calendar({ - date: new Date(0), + date: new Date(ui.calendarFind || 0), events: result.data.items, // 20 px menu + 24 px toolbar + 1px resizbar + 16px statusbar (if !item) height: !ui.item ? window.innerHeight - ui.showFilters * ui.filtersSize - 61 : window.innerHeight - ui.showBrowser * (112 + Ox.UI.SCROLLBAR_SIZE) - 45, range: [-5000, 5000], + selected: ui.calendarSelection, showControls: ui.showCalendarControls, showToolbar: true, showZoombar: true,