File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,20 @@ angular.module('crunchinatorApp.controllers')
4545 }
4646 } ;
4747
48+ $scope . removeInvestor = function ( investor ) {
49+ $scope . selectedInvestors . splice ( $scope . selectedInvestors . indexOf ( investor ) , 1 ) ;
50+ inv_ids = _ . pluck ( $scope . selectedInvestors , 'id' ) ;
51+ $scope . filteredCompanies ( ) ;
52+ $scope . clearLookingFor ( ) ;
53+ } ;
54+
55+ $scope . removeCompany = function ( company ) {
56+ $scope . selectedCompanies . splice ( $scope . selectedCompanies . indexOf ( company ) , 1 ) ;
57+ company_ids = _ . pluck ( $scope . selectedCompanies , 'id' ) ;
58+ $scope . filteredInvestors ( ) ;
59+ $scope . clearLookingFor ( ) ;
60+ } ;
61+
4862 $scope . geoJsonData = _ . memoize ( function ( filteredCompanies ) {
4963 var geojson = {
5064 'type' : 'FeatureCollection' ,
Original file line number Diff line number Diff line change 7070# investors .dataset , # companies .dataset {
7171 height : 251px ;
7272}
73+
74+ .remove-selected {
75+ text-align : right;
76+ }
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ <h3 class="pull-left">Investors</h3>
7979 < tbody >
8080 < tr ng-repeat ="investor in selectedInvestors ">
8181 < td > {{investor.name}}</ td >
82+ < td class ="remove-selected ">
83+ < span class ="glyphicon glyphicon-remove-circle " ng-click ="removeInvestor(investor) "> </ span >
84+ </ td >
8285 </ tr >
8386 </ tbody >
8487 </ table >
@@ -102,6 +105,9 @@ <h3 class="pull-left">Companies</h3>
102105 < tbody >
103106 < tr ng-repeat ="company in selectedCompanies ">
104107 < td > {{company.name}}</ td >
108+ < td class ="remove-selected ">
109+ < span class ="glyphicon glyphicon-remove-circle remove-selected " ng-click ="removeCompany(company) "> </ span >
110+ </ td >
105111 </ tr >
106112 </ tbody >
107113 </ table >
You can’t perform that action at this time.
0 commit comments