Skip to content

Commit

Permalink
add option to hide the menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kkuepper committed Dec 10, 2024
1 parent 2c9856e commit 8751685
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 3 deletions.
5 changes: 4 additions & 1 deletion admin/app/scripts/controllers/next_episode.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,14 @@ angular.module('bmmApp')
getEpisodeInformation();
}
});

}).fail(function() {
doneLoading();
});
};

$scope.postScreenshot = function() {
_api.podcastScreenshot($routeParams.id);
}

init(offset);
});
2 changes: 1 addition & 1 deletion admin/app/views/main.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div ng-controller="MainCtrl" class="admin">
<div ng-controller="MainCtrl" ng-class="{admin: true, hideMenu: init.hide_menu}">

<!--LOADINGSCREEN-->
<div class="loadscreen" ng-hide="init.load.loaded">
Expand Down
1 change: 1 addition & 0 deletions admin/app/views/pages/next-episode.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ <h4>
<span class="publishing" ng-if="!nextEpisode.published">Publishing at: </span>
<span class="publishing" ng-if="nextEpisode.published">✔ Already published at: </span>
{{nextEpisode.published_at | _locals:init.translation['iso-639-1']:'{d}. {SHORTMONTH} {yyyy} - {HH}:{mm}'}} (<a href="track/{{nextEpisode.id}}" ng-click="go('/track/'+nextEpisode.id);">link</a>)
<a href="#" ng-click="postScreenshot()">Post Screenshot</a>
</h4>
<div class="controls">
<span class="disabled left" ng-if="episodeShowedIndex == 0">
Expand Down
7 changes: 7 additions & 0 deletions common/app/scripts/services/_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,13 @@ angular.module('bmmLibApp')
})
};

factory.podcastScreenshot = function(podcastId) {
return factory.addToQueue({
method: 'POST',
url: serverUrl + 'podcast/' + podcastId + '/screenshot/'
});
};

return factory;

});
6 changes: 6 additions & 0 deletions common/app/scripts/services/_init.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ angular.module('bmmLibApp')
findBible([], 0, bibleLoaded);
}

var searchObject = $location.search();
console.log("hide_menu",searchObject, searchObject.hide_menu);
if (searchObject.hide_menu) {
factory.hide_menu = true;
}

$q.all(promises).then(function() {
factory.load.complete.resolve();
factory.load.loaded = true;
Expand Down
6 changes: 5 additions & 1 deletion common/app/styles/partials/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
z-index: 4;
}

.hideMenu header {
visibility: hidden;
}

header {
@include transition(margin-top);
position: absolute;
Expand Down Expand Up @@ -244,4 +248,4 @@ div.search {
.sub-header {//.ng-hide {
display: inline-block !important;
}
}
}
4 changes: 4 additions & 0 deletions common/app/styles/partials/_navigator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,7 @@ screen and (max-height: $maxHeight) and (max-width: $mobileWidth) {
margin-left: $navigationWidth;
}
}

.hideMenu [navigator] {
visibility: hidden;
}
6 changes: 6 additions & 0 deletions common/app/styles/partials/_viewer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,9 @@ header {
margin-top: 0;
}
}

.admin.hideMenu [ng-view] {
margin-top: 0;
margin-left: 0;
padding-bottom: 16px;
}

0 comments on commit 8751685

Please sign in to comment.