diff --git a/vipra-cmd/runcfg/CMD.launch b/vipra-cmd/runcfg/CMD.launch index cecae20174f45544c3b10e208bf905112b2f276c..c7c1d7de9494f2b762f4890a4baa0c75ce38cd52 100644 --- a/vipra-cmd/runcfg/CMD.launch +++ b/vipra-cmd/runcfg/CMD.launch @@ -11,7 +11,7 @@ </listAttribute> <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="de.vipra.cmd.Main"/> -<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-n test"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-Ar"/> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="vipra-cmd"/> <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/> diff --git a/vipra-ui/app/html/directives/article-link.html b/vipra-ui/app/html/directives/article-link.html index d5d93f137370b687a84e19ef1069e425ecf87308..e62bd916ba357df1b280283cfbaeca58b85710b7 100644 --- a/vipra-ui/app/html/directives/article-link.html +++ b/vipra-ui/app/html/directives/article-link.html @@ -5,7 +5,7 @@ <i class="fa text-muted pointer" ng-class="{'fa-chevron-down':!detailsShown,'fa-chevron-up':detailsShown}" ng-click="toggleDetails()" ng-if="::showDetails" analytics-on analytics-event="Article details" analytics-category="Article actions"></i> </div> <a class="article-link" ui-sref="articles.show({id:article.id})" ng-attr-title="{{::article.title}}"> - <span ng-bind="article.title"></span> + <span class="title" ng-bind="article.title"></span> <ng-transclude/> </a> </span> diff --git a/vipra-ui/app/html/directives/entity-link.html b/vipra-ui/app/html/directives/entity-link.html index bb744b26efff4126facae7dafcd1e02f05ef5f9d..5fb9e2fdbca25ea8b202ecd08de14f5d36cfa975 100644 --- a/vipra-ui/app/html/directives/entity-link.html +++ b/vipra-ui/app/html/directives/entity-link.html @@ -1,7 +1,7 @@ <div class="link-wrapper"> <span class="menu-padding ellipsis"> <a class="entity-link" ui-sref="entities.show({id:entity.entity})" ng-attr-title="{{::entity.entity}}"> - <span ng-bind="entity.entity"></span> + <span class="title" ng-bind="entity.entity"></span> <ng-transclude/> </a> </span> diff --git a/vipra-ui/app/html/directives/topic-link.html b/vipra-ui/app/html/directives/topic-link.html index f0653ba543bd26a181edff09f6a666ffd5072ed8..0bb40417ab7f2f19a3dc0dc7eed0c8a1d18b8b5c 100644 --- a/vipra-ui/app/html/directives/topic-link.html +++ b/vipra-ui/app/html/directives/topic-link.html @@ -2,7 +2,7 @@ <span class="menu-padding ellipsis"> <a ui-sref="topics.show.articles({id:topic.id})" class="badge pull-right" ng-bind="::topic.articlesCount" ng-attr-title="{{::topic.articlesCount}} article(s)" ng-if="::showBadge"></a> <a class="topic-link" ui-sref="topics.show({id:topic.id})" ng-attr-title="{{::topic.name}}"> - <span ng-bind="topic.name"></span> + <span class="title" ng-bind="topic.name"></span> <ng-transclude/> </a> </span> diff --git a/vipra-ui/app/html/directives/word-link.html b/vipra-ui/app/html/directives/word-link.html index 6de27548d5f0e68d87a4949b576835b7c81c54d6..981f9e7306030c6963defb46c39a149532b7607c 100644 --- a/vipra-ui/app/html/directives/word-link.html +++ b/vipra-ui/app/html/directives/word-link.html @@ -1,6 +1,6 @@ <div class="link-wrapper"> <span class="menu-padding ellipsis"> - <a ui-sref="words.show({id: word.word})" ng-bind="word.word" ng-attr-title="{{::word.word}}"></a> + <a class="title" ui-sref="words.show({id: word.word})" ng-bind="word.word" ng-attr-title="{{::word.word}}"></a> </span> <word-menu class="menu-button" word="word" ng-if="::showMenu" /> </div> \ No newline at end of file diff --git a/vipra-ui/app/html/explorer.html b/vipra-ui/app/html/explorer.html index 7fbf7e7f37fedbd54b85b97ff4ae18c0c037f6d4..b888481bdc234cdb167811e4d82e15c4d65a56ac 100644 --- a/vipra-ui/app/html/explorer.html +++ b/vipra-ui/app/html/explorer.html @@ -14,7 +14,7 @@ <a tabindex="0" class="btn btn-sm btn-default" ng-model="explorerModels.sorttopics" bs-radio="'risingRelevance'" title="Sort by rising relevance" analytics-on analytics-event="Explorer Sort Topics (rising)" analytics-category="Filter actions">↗</a> <a tabindex="0" class="btn btn-sm btn-default" ng-model="explorerModels.sorttopics" bs-radio="'risingDecayRelevance'" title="Sort by rising relevance with decay" analytics-on analytics-event="Explorer Sort Topics (decay)" analytics-category="Filter actions">↝</a> <a tabindex="0" class="btn btn-sm btn-link btn-plain" ng-click="explorerModels.sortdir=!explorerModels.sortdir" analytics-on analytics-event="Explorer Sort Topics (dir)" analytics-category="Filter actions"> - <sort-dir ng-model="explorerModels.sortdir" /> + <i class="fa" ng-class="{'fa-sort-amount-desc':explorerModels.sortdir,'fa-sort-amount-asc':!explorerModels.sortdir}"></i> </a> </div> <div class="btn-group btn-group-justified" ng-class="{'has-warning':search}"> @@ -22,13 +22,13 @@ <span class="glyphicon glyphicon-remove-circle searchclear" ng-click="search=''" analytics-on analytics-event="Explorer Filter Topics (clear)" analytics-category="Filter actions"></span> </div> <ul class="list-unstyled item-choice topic-choice"> - <li ng-repeat="topic in topics | orderBy:explorerModels.sorttopics:explorerModels.sortdir | filter:search" ng-mouseenter="highlightSeries(topic.id, true)" ng-mouseleave="highlightSeries(topic.id, false)" ng-class="{selected:topic.selected}" class="text-muted"> + <li ng-repeat="topic in topics | orderBy:explorerModels.sorttopics:explorerModels.sortdir | filter:search" ng-mouseenter="highlightTopic(topic.id, true)" ng-mouseleave="highlightTopic(topic.id, false)" ng-class="{selected:topic.selected}" class="text-muted topic" ng-attr-data-id="{{::topic.id}}"> <div class="checkbox checkbox-condensed"> <span class="valuebar" ng-style="{width:topic.topicCurrValue}"></span> <input tabindex="0" type="checkbox" ng-model="topic.selected" ng-attr-id="relevance-{{::topic.id}}" ng-change="changeSelectedTopics()"> <label class="check" ng-attr-for="relevance-{{::topic.id}}" analytics-on analytics-event="Explorer Topic Relevance Choice" analytics-category="Explorer actions"> <span class="ellipsis menu-padding" ng-attr-title="{{::topic.name}}"> - <span ng-bind="topic.name"></span> + <span class="title" ng-bind="topic.name"></span> </span> <topic-menu topic="topic" class="menu-button" /> </label> @@ -73,13 +73,13 @@ <div class="ui-layout-south no-padding no-border" id="lower"> <div class="ui-layout-west explorer-sidebar no-border"> <ul class="list-unstyled item-choice no-offset"> - <li ng-repeat="topic in selectedTopics = (topics | filter:{selected: true} | filter:search | orderBy:explorerModels.sorttopics:explorerModels.sortdir)" ng-mouseenter="highlightSeries(topic.id, true)" ng-mouseleave="highlightSeries(topic.id, false)" ng-class="{active:explorerModels.activeTopic.id===topic.id}" class="pointer text-muted"> + <li ng-repeat="topic in selectedTopics = (topics | filter:{selected: true} | filter:search | orderBy:explorerModels.sorttopics:explorerModels.sortdir)" ng-mouseenter="highlightTopic(topic.id, true)" ng-mouseleave="highlightTopic(topic.id, false)" ng-class="{active:explorerModels.activeTopic.id===topic.id}" class="pointer text-muted topic" ng-attr-data-id="{{::topic.id}}"> <div class="radio radio-condensed"> <span class="valuebar" ng-style="{width:topic.topicCurrValue}"></span> <input tabindex="0" type="radio" ng-model="explorerModels.activeTopic" ng-attr-id="detail-{{::topic.id}}" name="topic-active" ng-value="topic"> <label class="radio" ng-attr-for="detail-{{::topic.id}}" analytics-on analytics-event="Explorer Topic Detail Choice" analytics-category="Explorer actions"> <span class="ellipsis menu-padding" ng-attr-title="{{::topic.name}}"> - <span ng-bind="topic.name"></span> + <span class="title" ng-bind="topic.name"></span> </span> <topic-menu topic="topic" class="menu-button" /> </label> diff --git a/vipra-ui/app/index.html b/vipra-ui/app/index.html index a3a8d83bcefe53ed027bd7c5598537d9a4df3ff2..a675f363832fb10673a44ffa23d62c81f273ed15 100644 --- a/vipra-ui/app/index.html +++ b/vipra-ui/app/index.html @@ -84,8 +84,12 @@ <h4 class="modal-title">Topic Models</h4> </div> <div class="modal-body"> - <ul class="list-group nomargin" ng-show="topicModels.length" ng-cloak> - <button type="button" class="list-group-item topic-model" ng-repeat="topicModel in topicModels" ng-click="changeTopicModel(topicModel)" ng-class="{'active selected-model':rootModels.topicModel.id===topicModel.id}" analytics-on analytics-event="Topic model" analytics-category="Topic model actions" bs-popover popover-title="{{::topicModel.name}}" popover-template="partials/topicmodel-popover.html" popover-placement="bottom"> + <div class="form-group has-feedback"> + <input tabindex="0" type="text" class="form-control" placeholder="Filter..." ng-model="rootModels.topicModelFilter"> + <i class="form-control-feedback glyphicon glyphicon-search text-muted"></i> + </div> + <div class="list-group nomargin" ng-show="topicModels.length" ng-cloak> + <button type="button" class="list-group-item topic-model" ng-repeat="topicModel in topicModels | filter:{name:rootModels.topicModelFilter}" ng-click="changeTopicModel(topicModel)" ng-class="{'active selected-model':rootModels.topicModel.id===topicModel.id}" analytics-on analytics-event="Topic model" analytics-category="Topic model actions" bs-popover popover-title="{{::topicModel.name}}" popover-template="partials/topicmodel-popover.html" popover-placement="bottom"> <span class="badge badge-group"> <span class="badge-part" ng-if="!topicModel.lastGenerated" title="Model was never generated">Non-generated</span> <span class="badge-part" ng-bind="::topicModel.articleCount" ng-show="topicModel.articleCount" ng-attr-title="{{::topicModel.articleCount + ' article(s)'}}" ng-cloak></span> @@ -95,7 +99,7 @@ <br ng-show="topicModel.modelConfig.description" ng-cloak> <small ng-bind="::topicModel.modelConfig.description"></small> </button> - </ul> + </div> <p class="text-center" ng-show="loading.any" ng-cloak> Loading... </p> diff --git a/vipra-ui/app/js/controllers.js b/vipra-ui/app/js/controllers.js index c9000674e51d89042933b7d28e0ac93e1d14ecec..4c04181b15aea244cde5cc4dbaaeee47d877936d 100644 --- a/vipra-ui/app/js/controllers.js +++ b/vipra-ui/app/js/controllers.js @@ -403,7 +403,7 @@ }; var wordNode = function(word, x, y) { - return newNode(word.id, 'word', 'words.show', word.id, $scope.colors.words, 'box', $scope.loadWord, x, y); + return newNode(word.word, 'word', 'words.show', word.word, $scope.colors.words, 'box', $scope.loadWord, x, y); }; var edgeExists = function(idA, idB) { @@ -827,7 +827,13 @@ return (percent * 100) + '%'; }; - $scope.highlightSeries = function(id, toggle) { + $scope.highlightTopic = function(id, toggle) { + if(toggle) { + $('[data-id="' + id + '"]').addClass('highlight'); + } else { + $('[data-id="' + id + '"]').removeClass('highlight'); + } + if (!$scope.topicsSelected) return; var highcharts = $('#topicRelChart').highcharts(); if (!highcharts) return; @@ -928,6 +934,9 @@ $scope.$watch('explorerModels.activeTopic', function() { if(!$scope.explorerModels.activeTopic) return; + $('.topic').removeClass('active-topic'); + $('[data-id="' + $scope.explorerModels.activeTopic.id + '"]').addClass('active-topic'); + // preselect some words if ($scope.explorerModels.activeTopic.words) { for (var i = 0; i < Math.min(3, $scope.explorerModels.activeTopic.words.length); i++) diff --git a/vipra-ui/app/less/app.less b/vipra-ui/app/less/app.less index 620308628311a387d215594bbeb4d87db63ccaa8..3638b6066601bd9d5cd8e07fa3efd25870a6d46e 100644 --- a/vipra-ui/app/less/app.less +++ b/vipra-ui/app/less/app.less @@ -987,6 +987,14 @@ entity-menu { font-size: 18px; } +.topic.highlight { + color: #000; +} + +.topic.active-topic .title { + text-decoration: underline; +} + [ng\:cloak], [ng-cloak], .ng-cloak { display: none !important; }