Changeset 6181 for SRUAggregator


Ignore:
Timestamp:
04/30/15 17:01:10 (9 years ago)
Author:
emanuel.dima@uni-tuebingen.de
Message:
  1. beta-46: no more tables in clarinservices module, icon included
Location:
SRUAggregator/trunk
Files:
1 added
5 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • SRUAggregator/trunk/pom.xml

    r6174 r6181  
    88        <groupId>eu.clarin.sru.fcs</groupId>
    99        <artifactId>aggregator</artifactId>
    10         <version>2.0.0-beta-45</version>
     10        <version>2.0.0-beta-46</version>
    1111        <name>FCS Aggregator</name>
    1212
  • SRUAggregator/trunk/src/main/resources/assets/clarinservices/clarinservices.css

    r6180 r6181  
    1717  border-radius: 50px;
    1818  border-top-left-radius: 0;
    19   padding: 20px;
     19  padding: 15px;
    2020  font-size: 13px;
     21}
     22@media (min-width: 768px) {
     23  #clarinservices ul.dropdown-menu {
     24    width: 483px;
     25  }
    2126}
    2227
     
    2631}
    2732
    28 #clarinservices ul .flex {
    29   display: -webkit-box;      /* OLD - iOS 6-, Safari 3.1-6 */
    30   display: -moz-box;         /* OLD - Firefox 19- (buggy but mostly works) */
    31   display: -ms-flexbox;      /* TWEENER - IE 10 */
    32   display: -webkit-flex;     /* NEW - Chrome */
    33   display: flex;
    34 }
    35 
    36 #clarinservices table {
    37         text-align: center;
    38         background-color: #FFFFFF;
    39         width: 100%;
    40 }
    41 
    42 #clarinservices table td a{
     33#clarinservices ul li {
     34  display: inline;
     35  float: left;
     36  text-align: center;
     37  background-color: #FFFFFF;
     38}
     39
     40#clarinservices ul li a{
    4341        display: block;
    4442        width: 150px;
     
    5149}
    5250
    53 #clarinservices table td:hover a {
     51#clarinservices ul li:hover a {
    5452        background-color: #fff;
    5553        border: 2px solid #003f6e;
     
    5755}
    5856
    59 #clarinservices table td a div img {
     57#clarinservices ul li a > div {
     58  margin-top:30px;
     59}
     60
     61#clarinservices ul li a > div > div {
     62  white-space: normal;
     63}
     64
     65#clarinservices ul li a div img {
    6066        margin-right: 0px;
    6167        max-width: 100px;
    6268        max-height: 50px;
    6369}
    64 
    6570
    6671
  • SRUAggregator/trunk/src/main/resources/assets/clarinservices/clarinservices.js

    r6180 r6181  
    11(function() {
    22"use strict";
     3
     4var more_img = "clarinservices/more-clarin-services.png";
     5
     6var service_list = [
     7        {
     8                href: 'http://www.clarin.eu/portal',
     9                image: 'https://www.clarin.eu/sites/default/files/portal_small.png',
     10                title: "CLARIN portal",
     11                description: "Quick introduction to CLARIN, giving an impression about what's currently available",
     12        },
     13        {
     14                href: 'http://www.clarin.eu/services/depositing',
     15                image: 'http://www.clarin.eu/sites/default/files/long-term-archive.jpg',
     16                title: "Depositing services",
     17                description: "Store language resources in a sustainable repository at a CLARIN centre",
     18        },
     19        {
     20                href: 'http://www.clarin.eu/vlo',
     21                image: 'https://www.clarin.eu/sites/default/files/vlo_small.png',
     22                title: "Virtual Language Observatory",
     23                description: "Discover language resources using a faceted browser or a map",
     24        },
     25        {
     26                href: 'http://www.clarin.eu/content/easy-access-protected-resources',
     27                image: 'http://www.clarin.eu/sites/default/files/federated-identity.jpg',
     28                title: "Easy federated access",
     29                description: "Get easy access to protected resources, with your institutional username and password.",
     30        },
     31        {
     32                href: 'http://www.clarin.eu/content/web-services',
     33                image: 'https://www.clarin.eu/sites/default/files/webservice.png',
     34                title: "Web services and applications",
     35                description: "Explore and analyze language data with a wide variety of tools",
     36        },
     37        {
     38                href: 'http://www.clarin.eu/content/virtual-collections',
     39                image: 'https://www.clarin.eu/sites/default/files/virtualcollection.png',
     40                title: "Virtual Collections",
     41                description: "Create your own digital bookmarks, ideal for citing data sets.",
     42        },
     43        {
     44                href: 'http://www.clarin.eu/content/language-resource-inventory',
     45                image: 'https://www.clarin.eu/sites/default/files/lrt-inventory_small.png',
     46                title: "Language Resource Inventory",
     47                description: "Submit and access information about language resources relevant to your research."
     48        },
     49        {
     50                href: 'http://www.clarin.eu/content/content-search',
     51                image: 'https://www.clarin.eu/sites/default/files/search.png',
     52                title: "Content Search (prototype version)",
     53                description: "Search different corpora with a single search engine"
     54        },
     55        {
     56                href: 'http://www.clarin.eu/contact',
     57                image: 'https://www.clarin.eu/sites/default/files/questionmark.png',
     58                title: "Consulting Services",
     59                description: "Searching for a specific data set or application? Wondering how CLARIN can assist your research? Feel free to contact us!"
     60        },
     61];
    362
    463/**
     
    968 * 4. calling `main`
    1069 */
    11 var more_img = "img/more-clarin-services.png";
    12 var service_list = [
    13         [
    14                 {
    15                         href: 'http://www.clarin.eu/portal',
    16                         image: 'https://www.clarin.eu/sites/default/files/portal_small.png',
    17                         title: "CLARIN portal",
    18                         description: "Quick introduction to CLARIN, giving an impression about what's currently available",
    19                 },
    20                 {
    21                         href: 'http://www.clarin.eu/services/depositing',
    22                         image: 'http://www.clarin.eu/sites/default/files/long-term-archive.jpg',
    23                         title: "Depositing services",
    24                         description: "Store language resources in a sustainable repository at a CLARIN centre",
    25                 },
    26                 {
    27                         href: 'http://www.clarin.eu/vlo',
    28                         image: 'https://www.clarin.eu/sites/default/files/vlo_small.png',
    29                         title: "Virtual Language Observatory",
    30                         description: "Discover language resources using a faceted browser or a map",
    31                 },
    32         ],
    33         [
    34                 {
    35                         href: 'http://www.clarin.eu/content/easy-access-protected-resources',
    36                         image: 'http://www.clarin.eu/sites/default/files/federated-identity.jpg',
    37                         title: "Easy federated access",
    38                         description: "Get easy access to protected resources, with your institutional username and password.",
    39                 },
    40                 {
    41                         href: 'http://www.clarin.eu/content/web-services',
    42                         image: 'https://www.clarin.eu/sites/default/files/webservice.png',
    43                         title: "Web services and applications",
    44                         description: "Explore and analyze language data with a wide variety of tools",
    45                 },
    46                 {
    47                         href: 'http://www.clarin.eu/content/virtual-collections',
    48                         image: 'https://www.clarin.eu/sites/default/files/virtualcollection.png',
    49                         title: "Virtual Collections",
    50                         description: "Create your own digital bookmarks, ideal for citing data sets.",
    51                 },
    52         ],
    53         [
    54                 {
    55                         href: 'http://www.clarin.eu/content/language-resource-inventory',
    56                         image: 'https://www.clarin.eu/sites/default/files/lrt-inventory_small.png',
    57                         title: "Language Resource Inventory",
    58                         description: "Submit and access information about language resources relevant to your research."
    59                 },
    60                 {
    61                         href: 'http://www.clarin.eu/content/content-search',
    62                         image: 'https://www.clarin.eu/sites/default/files/search.png',
    63                         title: "Content Search (prototype version)",
    64                         description: "Search different corpora with a single search engine"
    65                 },
    66                 {
    67                         href: 'http://www.clarin.eu/contact',
    68                         image: 'https://www.clarin.eu/sites/default/files/questionmark.png',
    69                         title: "Consulting Services",
    70                         description: "Searching for a specific data set or application? Wondering how CLARIN can assist your research? Feel free to contact us!"
    71                 },
    72         ],
    73 ];
    74 
    75 // TODO: now that we're using Zepto, replace manual html management with $ calls
    7670
    7771var entityMap = {
     
    9185
    9286function renderCell(service) {
    93         var href = escapeHtml(service.href);
    94         var image = escapeHtml(service.image);
    95         var title = escapeHtml(service.title);
    96         var description = escapeHtml(service.description);
    97 
    98         var p_image     =       "<img src='" + image + "'>";
    99         var p_title     =       "<div>" + title + "</div>";
    100 
    101         return "<td title='"+description+"'><a href='" + href + "'><div>" +
    102                                 p_image + p_title +
    103                         "</div></a></td>";
    104 }
    105 
    106 function renderRow(services) {
    107         return "<tr>" + services.map(renderCell).join('') + "</tr>";
     87        var img = $('<img>').attr('src', service.image);
     88        var title = $('<div>').text(escapeHtml(service.title));
     89        var div = $('<div>').append(img).append(title);
     90        var a = $('<a>').attr('href', service.href).append(div);
     91        var li = $('<li>').attr('title', escapeHtml(service.description)).append(a);
     92        console.log(li);
     93        return li;
    10894}
    10995
    11096function renderDropdown(service_table) {
    111         var rows = service_list.map(renderRow).join('');
    112         var tablediv = "<div><table><tbody>" + rows + "</tbody></table></div>";
    113         return '<div class="dropdown">' +
    114                 '<button class="btn dropdown-toggle" type="button"'+
    115                                 ' id="dropdown-clarinservices" data-toggle="dropdown" aria-expanded="true">'+
    116                         '<div id="clarinmore"><img src="'+more_img+'"></div> '+
    117                 '</button>'+
    118                 '<ul class="dropdown-menu" role="menu" aria-labelledby="dropdown-clarinservices">'+
    119                         tablediv +
    120                 '</ul>'+
    121         '</div>';
     97        var img = $('<img>').attr('src', more_img);
     98        var imgdiv = $('<div>').attr('id', 'clarinmore').append(img);
     99        var button = $('<button>').attr({
     100                'class': 'btn dropdown-toggle',
     101                type: 'button',
     102                id:"dropdown-clarinservices",
     103                'data-toggle': "dropdown",
     104                'aria-expanded':"true"
     105        }).append(imgdiv);
     106
     107        var ul = $('<ul>').attr({
     108                'class': 'dropdown-menu',
     109                role: 'menu',
     110                "aria-labelledby": "dropdown-clarinservices"
     111        });
     112        service_list.map(renderCell).forEach(function(x){x.appendTo(ul);});
     113
     114        return $('<div>').attr('class', 'dropdown').append(button).append(ul);
    122115}
    123116
     
    125118        var csdiv = document.getElementById('clarinservices');
    126119        if (csdiv) {
    127                 csdiv.innerHTML = renderDropdown(service_list);
     120                $(csdiv).append(renderDropdown(service_list));
    128121                $(csdiv).children().each(function (x) {
    129122                        $(x).data('bs.dropdown', new Dropdown(x));
     
    186179
    187180  Dropdown.prototype.toggle = function (e) {
    188         console.log('tggle');
    189181    var $this = $(this)
    190182
     
    252244
    253245  function clearMenus(e) {
    254         console.log('clearMenus', e);
    255246    if (e && e.which === 3) return
    256247    $(backdrop).remove()
     
    272263
    273264  function getParent($this) {
    274         console.log('getParent', $this);
    275265    var selector = $this.attr('data-target')
    276266
  • SRUAggregator/trunk/src/main/resources/assets/js/main.js

    r6180 r6181  
    33"use strict";
    44
    5 var VERSION = window.MyAggregator.VERSION = "v.2.0.0-beta-45";
     5var VERSION = window.MyAggregator.VERSION = "v.2.0.0-beta-46";
    66
    77var URLROOT = window.MyAggregator.URLROOT =
  • SRUAggregator/trunk/src/main/resources/assets/js/main.jsx

    r6180 r6181  
    33"use strict";
    44
    5 var VERSION = window.MyAggregator.VERSION = "v.2.0.0-beta-45";
     5var VERSION = window.MyAggregator.VERSION = "v.2.0.0-beta-46";
    66
    77var URLROOT = window.MyAggregator.URLROOT =
Note: See TracChangeset for help on using the changeset viewer.