1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

control sidebar adjustments

This commit is contained in:
Kyle Spearrin 2017-06-06 12:18:43 -04:00
parent 27d291b0e9
commit fadd070663
10 changed files with 41 additions and 18 deletions

1
.gitignore vendored
View File

@ -200,3 +200,4 @@ FakesAssemblies/
# Other
project.lock.json
src/js/*.min.js

View File

@ -46,7 +46,7 @@ gulp.task('lint', function () {
gulp.task('build', function (cb) {
return runSequence(
'clean',
['browserify', 'lib', 'webpack', 'less', 'settings', 'lint'],
['browserify', 'lib', 'webpack', 'less', 'settings', 'lint', 'min:js'],
cb);
});
@ -305,6 +305,10 @@ gulp.task('dist:move', function () {
src: paths.npmDir + 'node-forge/dist/prime.worker.*',
dest: paths.dist + 'lib/forge'
},
{
src: paths.webroot + 'js/bw.min.js',
dest: paths.dist + 'js'
},
{
src: [
paths.webroot + '**/app/**/*.html',

View File

@ -26,16 +26,6 @@ angular
}
$document.off('click', '.sidebar li a');
$('#control-sidebar').on('click', function (e) {
e.preventDefault();
var bod = $('body');
if (!bod.hasClass('control-sidebar-open')) {
bod.addClass('control-sidebar-open');
} else {
bod.removeClass('control-sidebar-open');
}
});
}
});

View File

@ -2,5 +2,13 @@ angular
.module('bit.global')
.controller('topNavController', function ($scope) {
$scope.toggleControlSidebar = function () {
var bod = $('body');
if (!bod.hasClass('control-sidebar-open')) {
bod.addClass('control-sidebar-open');
}
else {
bod.removeClass('control-sidebar-open');
}
};
});

View File

@ -284,13 +284,22 @@
$scope.filterFolder = function (folder) {
$scope.folderIdFilter = folder.id;
if ($.AdminLTE && $.AdminLTE.layout) {
$timeout(function () {
$.AdminLTE.layout.fix();
}, 0);
}
};
$scope.clearFilters = function () {
$scope.folderIdFilter = undefined;
if ($.AdminLTE && $.AdminLTE.layout) {
$timeout(function () {
$.AdminLTE.layout.fix();
}, 0);
}
};
$scope.folderFilter = function (folder) {

View File

@ -14,7 +14,7 @@
<ul class="nav navbar-nav">
<li><a ui-sref="frontend.logout">Log Out</a></li>
<li class="control-sidebar-show">
<a href="#" id="control-sidebar"><i class="fa fa-bars"></i></a>
<a href="#" ng-click="toggleControlSidebar()"><i class="fa fa-bars"></i></a>
</li>
</ul>
</div>

View File

@ -14,7 +14,7 @@
<ul class="nav navbar-nav">
<li><a ui-sref="frontend.logout">Log Out</a></li>
<li class="control-sidebar-show">
<a href="#" id="control-sidebar"><i class="fa fa-bars"></i></a>
<a href="#" ng-click="toggleControlSidebar()"><i class="fa fa-bars"></i></a>
</li>
</ul>
</div>

View File

@ -42,6 +42,7 @@
<script>(window.angular||document.write('<script src="lib\/angular\/angular.min.js?v=<!-- @echo cacheTag !>"><\/script>'));</script>
<script src="js/lib.min.js?v=<!-- @echo cacheTag !>"></script>
<script src="js/bw.min.js?v=<!-- @echo cacheTag"></script>
<script src="js/app.min.js?v=<!-- @echo cacheTag !>"></script>
<script>
@ -56,6 +57,7 @@
<!-- @exclude -->
<script src="lib/jquery/jquery.js"></script>
<script src="lib/bootstrap/js/bootstrap.js"></script>
<script src="js/main.js"></script>
<script src="lib/admin-lte/js/app.js"></script>
<script src="lib/forge/forge.js"></script>

5
src/js/main.js Normal file
View File

@ -0,0 +1,5 @@
var AdminLTEOptions = {
controlSidebarOptions: {
selector: '#adminlte-fakeselector'
}
};

View File

@ -134,6 +134,10 @@ h1, h2, h3, h4, h5, h6,
overflow: hidden;
}
.content-wrapper, .control-sidebar, .main-sidebar, .main-header .logo, .main-header .navbar, .main-footer {
.transition(initial);
}
.main-footer {
height: @footer-height;
}