refinement for retrieve-pane dismissing actions and Harbor logo of UI

This commit is contained in:
kunw 2016-05-19 18:54:30 +08:00
parent 07706fdafd
commit 749412fb16
8 changed files with 37 additions and 42 deletions

View File

@ -21,11 +21,7 @@ nav .container-custom {
}
.navbar-brand > img {
height: 60px;
width: 100px;
margin-top: -30px;
filter: brightness(0) invert(1);
-webkit-filter: brightness(0) invert(1);
}
.navbar-form {
@ -40,21 +36,21 @@ nav .container-custom {
}
.nav-custom li {
float: left;
padding: 10px 0 0 0;
margin-right: 12px;
list-style: none;
display: inline-block;
float: left;
padding: 10px 0 0 0;
margin-right: 12px;
list-style: none;
display: inline-block;
}
.nav-custom li a {
font-size: 14px;
color: #FFFFFF;
text-decoration: none;
font-size: 14px;
color: #FFFFFF;
text-decoration: none;
}
.nav-custom .active {
border-bottom: 3px solid #EFEFEF;
border-bottom: 3px solid #EFEFEF;
}
.dropdown {

BIN
static/ng/resources/img/Harbor_Logo_rec.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -1,10 +1,10 @@
<div class="switch-pane-drop-down" ng-show="vm.isOpen">
<div id="retrievePane" class="switch-pane-drop-down" ng-show="vm.isOpen">
<div class="row">
<div class="col-xs-12 col-md-12">
<div class="panel panel-default">
<div class="form-inline search-projects">
<div class="input-group">
<input type="text" class="form-control search-icon" placeholder="" ng-model="vm.filterInput" size="30">
<input type="text" id="retrieveFilter" class="form-control search-icon" placeholder="" ng-model="vm.filterInput" size="30">
</div>
</div>
<h5 class="page-header">//vm.projectType | tr//: <span class="badge">//vm.resultCount//</span></h5>

View File

@ -12,6 +12,7 @@
var vm = this;
vm.projectName = '';
vm.isOpen = false;
if($route.current.params.is_public) {
vm.isPublic = $route.current.params.is_public === 'true' ? 1 : 0;
@ -114,6 +115,7 @@
'publicity': '=',
'isProjectMember': '='
},
link: link,
replace: true,
controller: RetrieveProjectsController,
bindToController: true,
@ -122,6 +124,22 @@
return directive;
function link(scope, element, attrs, ctrl) {
$(document).on('click', clickHandler);
function clickHandler(e) {
var targetId = $(e.target).attr('id');
if(targetId === 'switchPane' ||
targetId === 'retrievePane' ||
targetId === 'retrieveFilter') {
return;
}else{
ctrl.isOpen = false;
scope.$apply();
}
}
}
}
})();

View File

@ -1,5 +1,5 @@
<div class="switch-pane-projects" ng-switch="vm.isOpen">
<a href="javascript:void(0);" ng-click="vm.switchPane()">//vm.projectName//</a>
<a id="switchPane" href="javascript:void(0);" ng-click="vm.switchPane()" >//vm.projectName//</a>
<span ng-switch-default class="glyphicon glyphicon-triangle-right" style="font-size: 12px;"></span>
<span ng-switch-when="true" class="glyphicon glyphicon-triangle-bottom" style="font-size: 12px;"></span>
</div>

View File

@ -10,11 +10,7 @@
function SwitchPaneProjectsController($scope) {
var vm = this;
$scope.$on('isOpen', function(e, val){
vm.isOpen = val;
});
$scope.$watch('vm.selectedProject', function(current, origin) {
if(current){
vm.projectName = current.Name;
@ -40,21 +36,16 @@
templateUrl: '/static/ng/resources/js/components/details/switch-pane-projects.directive.html',
replace: true,
scope: {
'selectedProject': '=',
'isOpen': '='
'isOpen': '=',
'selectedProject': '='
},
link: link,
controller: SwitchPaneProjectsController,
controllerAs: 'vm',
bindToController: true
}
return directive;
function link(scope, element, attrs, ctrl) {
}
}
})();

View File

@ -18,14 +18,6 @@
});
vm.url = $location.url();
vm.clickTab = clickTab;
function clickTab() {
console.log("triggered clickTab of Controller.");
vm.isOpen = false;
$scope.$apply();
}
}
function navigationDetails() {
@ -34,7 +26,6 @@
templateUrl: '/static/ng/resources/js/layout/navigation/navigation-details.directive.html',
link: link,
scope: {
'isOpen': '=',
'selectedProject': '='
},
replace: true,
@ -66,7 +57,6 @@
function click(event) {
element.find('a').removeClass('active');
$(event.target).addClass('active');
ctrl.clickTab();
}
}

View File

@ -10,12 +10,12 @@
<span ng-show="vm.publicity">// 'public_projects' | tr //</span>
<a ng-show="!vm.publicity" href="#/repositories?project_id=//vm.selectedProject.ProjectId//" class="title-color" ng-click="vm.togglePublicity({publicity: true})">// 'public_projects' | tr //</a></h4>
<div class="switch-pane">
<switch-pane-projects is-open="vm.open" selected-project="vm.selectedProject"></switch-pane-projects>
<switch-pane-projects is-open="vm.isOpen" selected-project="vm.selectedProject"></switch-pane-projects>
<span>
<navigation-details is-open="vm.open" selected-project="vm.selectedProject" ng-show="vm.isProjectMember"></navigation-details>
<navigation-details selected-project="vm.selectedProject" ng-show="vm.isProjectMember"></navigation-details>
</span>
</div>
<retrieve-projects is-open="vm.open" selected-project="vm.selectedProject" is-project-member="vm.isProjectMember" publicity="vm.publicity"></retrieve-projects>
<retrieve-projects is-open="vm.isOpen" selected-project="vm.selectedProject" is-project-member="vm.isProjectMember" publicity="vm.publicity"></retrieve-projects>
<!-- Tab panes -->
<div class="tab-content" ng-click="vm.closeRetrievePane()">
<input type="hidden" id="HarborRegUrl" value="{{.HarborRegUrl}}">