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 # Other
project.lock.json project.lock.json
src/js/*.min.js

View File

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

View File

@ -26,16 +26,6 @@ angular
} }
$document.off('click', '.sidebar li a'); $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') .module('bit.global')
.controller('topNavController', function ($scope) { .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.filterFolder = function (folder) {
$scope.folderIdFilter = folder.id; $scope.folderIdFilter = folder.id;
if ($.AdminLTE && $.AdminLTE.layout) {
$timeout(function () { $timeout(function () {
$.AdminLTE.layout.fix(); $.AdminLTE.layout.fix();
}, 0); }, 0);
}
}; };
$scope.clearFilters = function () { $scope.clearFilters = function () {
$scope.folderIdFilter = undefined; $scope.folderIdFilter = undefined;
if ($.AdminLTE && $.AdminLTE.layout) {
$timeout(function () {
$.AdminLTE.layout.fix();
}, 0);
}
}; };
$scope.folderFilter = function (folder) { $scope.folderFilter = function (folder) {

View File

@ -14,7 +14,7 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a ui-sref="frontend.logout">Log Out</a></li> <li><a ui-sref="frontend.logout">Log Out</a></li>
<li class="control-sidebar-show"> <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> </li>
</ul> </ul>
</div> </div>

View File

@ -14,7 +14,7 @@
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a ui-sref="frontend.logout">Log Out</a></li> <li><a ui-sref="frontend.logout">Log Out</a></li>
<li class="control-sidebar-show"> <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> </li>
</ul> </ul>
</div> </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>(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/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 src="js/app.min.js?v=<!-- @echo cacheTag !>"></script>
<script> <script>
@ -56,6 +57,7 @@
<!-- @exclude --> <!-- @exclude -->
<script src="lib/jquery/jquery.js"></script> <script src="lib/jquery/jquery.js"></script>
<script src="lib/bootstrap/js/bootstrap.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/admin-lte/js/app.js"></script>
<script src="lib/forge/forge.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; overflow: hidden;
} }
.content-wrapper, .control-sidebar, .main-sidebar, .main-header .logo, .main-header .navbar, .main-footer {
.transition(initial);
}
.main-footer { .main-footer {
height: @footer-height; height: @footer-height;
} }