File tree Expand file tree Collapse file tree 7 files changed +244
-78
lines changed Expand file tree Collapse file tree 7 files changed +244
-78
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,35 @@ angular.module('openshiftConsole')
109
109
onSortChange : update
110
110
} ;
111
111
112
+ $scope . showNewProjectPanel = false ;
113
+
114
+ $scope . createProject = function ( ) {
115
+ $scope . showNewProjectPanel = true ;
116
+ } ;
117
+
118
+ $scope . closeNewProjectPanel = function ( ) {
119
+ $scope . showNewProjectPanel = false ;
120
+ } ;
121
+
122
+ $scope . onNewProject = function ( ) {
123
+ $scope . showNewProjectPanel = false ;
124
+ } ;
125
+
126
+ $scope . showEditProjectPanel = false ;
127
+
128
+ $scope . editProject = function ( project ) {
129
+ $scope . editingProject = project ;
130
+ $scope . showEditProjectPanel = true ;
131
+ } ;
132
+
133
+ $scope . closeEditProjectPanel = function ( ) {
134
+ $scope . showEditProjectPanel = false ;
135
+ } ;
136
+
137
+ $scope . onEditProject = function ( ) {
138
+ $scope . showEditProjectPanel = false ;
139
+ } ;
140
+
112
141
$scope . $watch ( 'search.text' , _ . debounce ( function ( searchText ) {
113
142
$scope . keywords = filterKeywords = KeywordService . generateKeywords ( searchText ) ;
114
143
$scope . $apply ( filterProjects ) ;
Original file line number Diff line number Diff line change 87
87
justify-content : flex-end ;
88
88
margin : -27px 0 0 0 ;
89
89
@media (min-width : 660px ) {
90
+ display : block ;
90
91
margin-bottom : 20px ;
91
92
margin-left : 40px ;
92
93
margin-top : 0 ;
93
94
order : 2 ;
94
95
}
96
+
97
+ .origin-modal-popup {
98
+ @media (min-width : @screen-sm-min ) {
99
+ width : 370px ;
100
+ }
101
+ }
95
102
}
96
103
.projects-options {
97
104
display : flex ;
157
164
.project-info :hover {
158
165
background-color : @table-bg-hover ;
159
166
}
167
+
168
+ .origin-modal-popup {
169
+ @media (min-width : @screen-sm-min ) {
170
+ margin-left : -10px ;
171
+ margin-top : -25px ;
172
+ width : 370px ;
173
+ }
174
+
175
+ & .position-above {
176
+ @media (min-width : @screen-sm-min ) {
177
+ margin-top : 20px ;
178
+ }
179
+ }
180
+ }
160
181
}
Original file line number Diff line number Diff line change @@ -25,9 +25,13 @@ <h2 class="text-center">Loading...</h2>
25
25
< h1 > My Projects</ h1 >
26
26
< div class ="projects-options ">
27
27
< div class ="projects-add " ng-if ="canCreate ">
28
- < a href ="create-project " class ="btn btn-md btn-primary ">
28
+ < button ng-click ="createProject() " class ="btn btn-md btn-primary ">
29
+ < span class ="fa fa-plus "> </ span >
29
30
Create Project
30
- </ a >
31
+ </ button >
32
+ < origin-modal-popup shown ="showNewProjectPanel " modal-title ="Create Project " on-close ="closeNewProjectPanel() ">
33
+ < create-project is-dialog ="true " redirect-action ="onNewProject " on-cancel ="closeNewProjectPanel "> </ create-project >
34
+ </ origin-modal-popup >
31
35
</ div >
32
36
< div class ="projects-search ">
33
37
< form role ="form " class ="search-pf has-button ">
@@ -101,7 +105,7 @@ <h2 class="h1">
101
105
</ a >
102
106
</ li >
103
107
< li role ="menuitem ">
104
- < a ng-href ="project/{{project.metadata.name}}/edit?then=./ ">
108
+ < a ng-href ="" ng-click =" editProject(project) ">
105
109
Edit Project
106
110
</ a >
107
111
</ li >
@@ -120,6 +124,9 @@ <h2 class="h1">
120
124
</ ul >
121
125
</ div >
122
126
</ div >
127
+ < origin-modal-popup shown ="showEditProjectPanel && editingProject === project " modal-title ="Edit Project " on-close ="closeEditProjectPanel() ">
128
+ < edit-project project ="project " is-dialog ="true " redirect-action ="onEditProject " on-cancel ="closeEditProjectPanel "> </ edit-project >
129
+ </ origin-modal-popup >
123
130
</ div >
124
131
</ div >
125
132
< p class ="projects-instructions " ng-if ="canCreate === false " ng-include ="'views/_cannot-create-project.html' "> </ p >
You can’t perform that action at this time.
0 commit comments