accurator/commit
Merge master into field.
author | Chris Dijkshoorn |
---|---|
Wed Jan 6 12:11:20 2016 +0100 | |
committer | Chris Dijkshoorn |
Wed Jan 6 12:11:20 2016 +0100 | |
commit | 40a3a6f2088e3b79360aea8dbad2e4a9542aeea0 |
tree | feb963ce33550c9c8d8ddca03080d7d5cd8dae1c |
parent | ed3f8037adc28983e01694c432a1c0deef6ab8d5 cdc0ae62b16ec48e92d28b49c68054f8c78ed3dd |
Diff style: patch stat
diff --cc lib/accurator/ui_elements.pl index e2924f5,dae609d..601805e --- a/lib/accurator/ui_elements.pl +++ b/lib/accurator/ui_elements.pl @@@ -34,9 -9,11 +34,9 @@@ uri_label(Uri, Label) : % % Determine which type of UI elements to query for. get_elements(labels, Dic, Options) :- - get_text_elements(Dic, Options). + get_labels(Dic, Options). - get_elements(countries, Dic, Options) :- get_countries(Dic, Options). - get_elements(languages, Dic, Options) :- get_languages(Dic, Options). diff --cc rdf/domain/bible/ui/fields.ttl index e7ac748,0000000..e7ac748 mode 100644,000000..100644 --- a/rdf/domain/bible/ui/fields.ttl +++ b/rdf/domain/bible/ui/fields.ttl diff --cc rdf/domain/bird/ui/fields.ttl index 9d13509,0000000..9d13509 mode 100644,000000..100644 --- a/rdf/domain/bird/ui/fields.ttl +++ b/rdf/domain/bird/ui/fields.ttl diff --cc rdf/ui/labels_schema.ttl index c2a7b2f,f51423f..3474198 --- a/rdf/ui/labels_schema.ttl +++ b/rdf/ui/labels_schema.ttl @@@ -4,51 -4,29 +4,63 @@@ @prefix dc: <http://purl.org/dc/terms/> . @prefix skos: <http://www.w3.org/2004/02/skos/core#> . -auis:uiLabel a rdf:Property; - rdfs:domain auis:UI ; +auis:UI a rdfs:Class ; + rdfs:label "Super-class of all Accurator user interfaces"@en . + +auis:AnnotationUI a rdfs:Class ; + rdfs:label "Accurator annotation interface"@en ; + rdfs:subClassOf auis:UI . + +auis:uiLabel a rdf:Property ; rdfs:label "Super-property of all labels"@en . + auis:textLabel a rdf:Property; + rdfs:label "Property connecting UI to text"@en ; + rdfs:subPropertyOf auis:uiLabel . + + auis:buttonLabel a rdf:Property; + rdfs:label "Property connecting UI to label for button"@en ; + rdfs:subPropertyOf auis:uiLabel . + + auis:linkLabel a rdf:Property; + rdfs:label "Property connecting UI to label for link"@en ; + rdfs:subPropertyOf auis:uiLabel . + -auis:UILabel a rdfs:Class; +auis:UILabel a rdfs:Class ; rdfs:label "Super-class of all labels"@en . -auis:UI a rdfs:Class; - rdfs:label "Super-class of all Accurator user interfaces."@en . +auis:Field a rdfs:Class ; + rdfs:label "Super-class of all fields"@en . + +auis:fields a rdf:Property ; + rdfs:label "Fields for UI"@en ; + rdfs:comment "Property for connecting annotation UI to included fields"@en . + +auis:fragmentFields a rdf:Property ; + rdfs:label "Fields for fragments"@en ; + rdfs:comment "Property for connecting fields for describing fragments of media."@en . + +auis:wholeFields a rdf:Property ; + rdfs:label "Fields for describing whole things"@en ; + rdfs:comment "Property for connecting annotation UI to include fields that describe whole things."@en . -auis:SelectField a rdfs:Class; +auis:DropdownField a rdfs:Class ; + rdfs:label "Dropdown"@en ; + rdfs:subClassOf auis:Field . + +auis:TextField a rdfs:Class ; + rdfs:label "Text field"@en ; + rdfs:subClassOf auis:Field . + +auis:RadioButtonField a rdfs:Class ; + rdfs:label "Radio buttons"@en ; + rdfs:subClassOf auis:Field . + +auis:CheckboxField a rdfs:Class ; + rdfs:label "Checkboxes"@en ; + rdfs:subClassOf auis:Field . + +auis:SelectField a rdfs:Class ; rdfs:label "Select field" ; rdfs:comment "Selectfield bundles possible options together."@en . diff --cc rdf/void.ttl index 328d754,9e52466..8774c4b --- a/rdf/void.ttl +++ b/rdf/void.ttl @@@ -31,49 -32,39 +32,53 @@@ <accurator-generic> a void:Dataset ; - void:subset <accurator-schema> ; -- void:subset <accurator-ui-schema> ; -- void:subset <accurator-ui> ; -- void:subset <accurator-ui-countries> ; -- void:subset <accurator-ui-languages> ; ++ void:subset <accurator-schema> , ++ <accurator-ui-schema> , ++ <accurator-ui> , ++ <accurator-ui-countries> , ++ <accurator-ui-languages> , dcterms:title "Generic Accurator configuration" ; - void:dataDump <accurator_domain.ttl> . + void:dataDump <domain/domain.ttl> . <accurator-bird-domain> a void:Dataset ; dcterms:title "Accurator configuration for bird domain" ; - void:subset <accurator-ui-schema> ; - void:subset <accurator-ui> ; - void:subset <accurator-ui-countries> ; - void:subset <accurator-ui-languages> ; - void:dataDump <domain_bird/annotation_ui_bird.ttl> ; - void:dataDump <domain_bird/accurator_domain_bird.ttl> ; - void:dataDump <domain_bird/accurator_ui_bird.ttl> . + void:dataDump <domain/bird/bird_domain.ttl> ; + void:subset <accurator-ui-bird> . + + <accurator-ui-bird> + a void:Dataset ; + dcterms:title "Locale and domain agnostic Accurator UI instance for bird" ; + void:dataDump <domain/bird/ui/labels.ttl> , - <domain/bird/ui/labels_nl.ttl> . ++ <domain/bird/ui/labels_nl.ttl> , ++ <domain/bird/ui/fields.ttl> . <accurator-bible-domain> a void:Dataset ; dcterms:title "Accurator configuration for bible domain" ; - void:subset <accurator-schema> ; - void:subset <accurator-ui-schema> ; - void:subset <accurator-ui> ; - void:subset <accurator-ui-countries> ; - void:subset <accurator-ui-languages> ; - void:dataDump <domain_bible/accurator_domain_bible.ttl> ; - void:dataDump <domain_bible/annotation_ui_bible.ttl> ; - void:dataDump <domain_bible/accurator_ui_bible.ttl> ; - void:dataDump <domain_bible/concept_scheme_bible_figure.ttl> ; - void:dataDump <domain_bible/concept_scheme_bible_theme.ttl> . - void:dataDump <domain/bible/bible_domain.ttl> ; - void:dataDump <domain/bible/concept_scheme_bible_figure.ttl> ; - void:dataDump <domain/bible/concept_scheme_bible_theme.ttl> ; ++ void:dataDump <domain/bible/bible_domain.ttl> , ++ <domain/bible/concept_scheme_bible_figure.ttl> ; ++ <domain/bible/concept_scheme_bible_theme.ttl> ; + void:subset <accurator-ui-bible> . + + <accurator-ui-bible> + a void:Dataset ; + dcterms:title "Locale and domain agnostic Accurator UI instance for bible" ; + void:dataDump <domain/bible/ui/labels.ttl> , - <domain/bible/ui/labels_nl.ttl> . ++ <domain/bible/ui/labels_nl.ttl> , ++ <domain/bible/ui/fields.ttl> . + +<accurator-page> + a void:Dataset ; + dcterms:title "Page type tasks" ; + void:dataDump <domain_page/accurator_ui_page_leon.ttl> , + <domain_page/accurator_ui_page_cristina.ttl> , + <domain_page/accurator_ui_page_sebastien.ttl> , + <domain_page/accurator_ui_page_chris.ttl> , + <domain_page/accurator_domain_page_leon.ttl> , + <domain_page/accurator_domain_page_cristina.ttl> , + <domain_page/accurator_domain_page_sebastien.ttl> , + <domain_page/accurator_domain_page_chris.ttl> . [ vann:preferredNamespacePrefix "accu" ; vann:preferredNamespaceUri "http://accurator.nl/schema#" diff --cc web/css/accurator.css index a8ec54f,9ee69ab..fcfd421 --- a/web/css/accurator.css +++ b/web/css/accurator.css @@@ -53,6 -55,6 +55,10 @@@ Navba height: 20px; } ++#navbarFrmSearch{ ++ text-align: center; ++} ++ @media (min-width: 768px) { .navbar .navbar-nav { display: inline-block; @@@ -82,8 -86,15 +90,10 @@@ Intr top: 75px; } - /* Additional info page */ - #chkEmail { -/* Register page */ -.registerMessage { - margin-top: 50px; -} - + /******************************************************************************* + Form page + *******************************************************************************/ + #formChkEmail { margin-top: 10px; } @@@ -184,61 -198,8 +197,63 @@@ About pag text-align: center; } -/* Annotate page */ -.navigationButton { +/* Search Results */ +.search-form { + width: 250px; + margin: auto; +} + +#results { + padding-top: 10px; + padding-left: 10px; + padding-right: 10px; +} + +.filters { + padding-bottom: 10px; +} + +.thumbnail { + cursor: pointer; +} + +.path-label { + color: rgb(255, 255, 255); + display: inline; + padding: 0.2em 0.6em 0.3em; + font-size: 75%; + font-weight: bold; + line-height: 2; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: 0.25em 0.25em 0.25em 0.25em; + cursor: pointer; +} + +.path-label:hover, .path-label:visited:hover { + color: rgb(225, 225, 225); + text-decoration: none; +} + +.path-label:visited { + color: rgb(255, 255, 255); + text-decoration: none; +} + +.path-resource { + background-color: rgb(20, 65, 115); + padding: 0.3em 0.6em 0.4em; + font-size: 80%; +} + +.path-literal {background-color: rgb(100, 100, 100);} +.path-property {background-color: rgb(66, 139, 202);} + - /* Item page */ ++/******************************************************************************* ++Item page ++*******************************************************************************/ +.itemDivNavigationButton { margin-top: 10px; } @@@ -264,11 -215,11 +279,7 @@@ margin-top: 12px; } - /*#frmSearchAnnotate { -#navbarFrmSearch{ -- text-align: center; - }*/ -} -- -.navButton { +.itemBtnNavigation { width: 100px; } @@@ -285,13 -236,6 +296,63 @@@ text-align: center; } +#itemDivAnnotationFields { + margin-top: 10px; +} + +.itemLbl { + margin-right: 10px; +} ++ ++/* Item page: Typeahead functionality */ ++/* source: http://twitter.github.io/typeahead.js/examples/ */ ++ ++#itemFrmAnnotationFields { ++ text-align: center; ++ margin-bottom: 10px; ++} ++ ++#itemLblPageType { ++ vertical-align: bottom; ++} ++ ++#itemInpPageType, ++.tt-menu { ++ width: 396px; ++} ++ ++.tt-menu { ++ text-align: left; ++ margin: 4px 0; ++ padding: 4px 0; ++ background-color: #fff; ++ border: 1px solid #ccc; ++ border: 1px solid rgba(0, 0, 0, 0.2); ++ -webkit-border-radius: 8px; ++ -moz-border-radius: 8px; ++ border-radius: 8px; ++ -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2); ++ -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2); ++ box-shadow: 0 5px 10px rgba(0,0,0,.2); ++} ++ ++.tt-suggestion { ++ padding: 1px 20px; ++ font-size: 13px; ++ line-height: 18px; ++} ++ ++.tt-suggestion:hover { ++ cursor: pointer; ++ color: #fff; ++ background-color: #0097cf; ++} ++ ++.tt-suggestion.tt-cursor { ++ color: #fff; ++ background-color: #0097cf; ++} ++ /* End page */ .endScreen { overflow-x: hidden; diff --cc web/js/accurator_profile.js index 2b0fe37,d489ab4..3cdd3d6 --- a/web/js/accurator_profile.js +++ b/web/js/accurator_profile.js @@@ -1,8 -1,5 +1,8 @@@ -/* Accurator Profile -*/ +/******************************************************************************* - Accurator Intro ++Accurator Profile +Code for showing statistical elements on the profile page and allowing the user +to change settings. +*******************************************************************************/ var locale, ui, domain, experiment, user, userName, realName; var recentItems; var initialClusters, enrichedClusters, clusters; @@@ -45,14 -44,12 +45,13 @@@ function populateRecentlyAnnotated() var items = []; if(numberOfItems === 0) { - //Hide if nothing is annotated - $("#rowLastAnnotated").hide(); + $("#profileDivLastAnnotated").hide(); } else { for (var i=0; i<numberOfItems; i++) { - var uri = data.uris[i]; + var uri = uris[i]; items[i] = new item(uri); } + //Create clusters for easy adding based on search.js code initialClusters[0] = new cluster([], items); enrichedClusters[0] = new cluster([], 'undefined'); addItems(0); diff --cc web/js/accurator_results.js index dd8ed2f,9c6240b..2ab75df --- a/web/js/accurator_results.js +++ b/web/js/accurator_results.js @@@ -4,9 -4,9 +4,9 @@@ Page showing overview of recommender/se cluster_search_ui (search.js pagination.js and thumbnail.js) *******************************************************************************/ var locale, experiment, ui, typeRec, userName, realName; - var txtRecTitle, vntFirstTitle, vntFirstText; + var resultsTxtRecommendationsFor, resultsHdrFirst, resultsTxtFirst; -// Options provided for cluster_search_ui__search.js +// Options provided for search.js displayOptions = { numberDisplayedItems: 4, showFilters: false, @@@ -89,10 -91,11 +89,11 @@@ function addButtonEvents() } function events() { - $.getJSON("recently_annotated", {user:user}) + $.getJSON("annotations", {uri:user, type:"user"}) .done(function(annotations){ - if(annotations.length===0) { - alertMessage(vntFirstTitle, vntFirstText, 'success'); + uris = annotations.uris; + if(uris.length===0) { + alertMessage(resultsHdrFirst, vntFirstText, 'success'); } }); } diff --cc web/js/accurator_utilities.js index 4b78a76,d6a273d..6f7dba1 --- a/web/js/accurator_utilities.js +++ b/web/js/accurator_utilities.js @@@ -285,14 -285,12 +285,14 @@@ function alertMessage(title, text, type function populateNavbar(userName, linkList) { // Only popluate navbar when no experiment is running if(typeof experiment === "undefined" || experiment === "none") { - populateUserDropdown(userName, linkList); + populateNavbarUser(userName, linkList); } else { // Hide recommendations button if experiment is running + $("#btnRecommend").hide(); $("#navbarBtnRecommend").hide(); + $("#btnResultsRecommend").hide(); // Hide search form - $("#frmGroupSearch").hide(); + $("#navbarFrmSearch").hide(); // Remove link from logo if experiment is running $(".navbar-brand").attr('href', "#"); }