Commit 6061288a authored by born's avatar born
Browse files

We now show key phrases in event modal as well

parent 2aa0d1e4
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ angular
        $rootScope.vissettings = {settingsview: true, visview: false, query: "", ownfile: true, paperdatafile: false, otherdatafile: false, fileIsRead: false, addEdgeValue: false, addCentrality: false, degreeCentrality: true, eigenvectorCentrality: false, addEventYears: false, showUnconnectedNodes: false, groupByGender: true, degree: 1, minDegree: true, equalDegree: false, maxDegree: false, count: 1, minCount: true, equalCount: false, maxCount: false, selectAllIssuers: false, physicsEnabled: true, networkLocked: false};
        $rootScope.search = {highlighted:[]};
    })
    .controller('VissuiteController', function($rootScope, $scope, $sce, $filter, $http, $timeout, $q, GraphUtils, FileSaver, FileUploader) {
    .controller('VissuiteController', function($rootScope, $scope, $sce, $filter, $http, $timeout, $q, GraphUtils, GeneralUtils, FileSaver, FileUploader) {
        // Here, we want to save settings
        $scope.vissettings = $rootScope.vissettings;

@@ -846,6 +846,18 @@ angular
            $scope.setConnectedEvents = function(pers){
                $scope.person.connected = pers;
                $scope.eventinfo = pers.events;
                for( var i = 0; i < $scope.eventinfo.length; i++ ){
                    var event = $scope.eventinfo[i];
                    const kparr = event.attributes.key_words;
                    var flattenedarr = GeneralUtils.flatten(kparr);
                    //console.log(flattenedarr);
                    flattenedarr = flattenedarr.filter(function(el){
                        return typeof el == "string";
                    });
                    //console.log(flattenedarr);
                    $scope.eventinfo[i].attributes.keyphrases = flattenedarr;
                }
                //console.log($scope.eventinfo);
            }

            $scope.togglePhysics = function(){
+2 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@
                                        <th at-attribute="attributes.date">Date(s)</th>
                                        <th at-attribute="attributes.location">Location(s)</th>
                                        <th at-attribute="attributes.uri">Source URI(s)</th>
                                        <th at-attribute="attributes.keyphrases">Key phrases</th>
                                    </tr>
                                </thead>
                                <tbody>
@@ -130,6 +131,7 @@
                                        <td at-attribute="attributes.date">{{item.attributes.date}}</td>
                                        <td at-attribute="attributes.location">{{item.attributes.location}}</td>
                                        <td at-attribute="attributes.uri" ng-bind-html="item.attributes.uri"></td>
                                        <td at-attribute="attributes.keyphrases">{{item.attributes.keyphrases}}</td>
                                    </tr>
                                </tbody>
                            </table>