Skip to content

Commit

Permalink
Metadata tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
craigdietrich committed Jan 16, 2018
1 parent 7bc85b9 commit 20f3684
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
7 changes: 6 additions & 1 deletion system/application/views/templates/jquery.icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
var $title = $('<div class="title"></div>').appendTo($row);
var $source = $('<div class="source"></div>').appendTo($row);
var url = j;
var mo = '';
for (var p in row) {
var pp = pnode(p);
if ('art:sourceLocation'==pp && 'undefined'!=typeof(row[p][0])) {
Expand All @@ -120,10 +121,14 @@
} else if ('dcterms:title'==pp) {
var value = ('undefined'==typeof(row[p][0]) || 'undefined'==typeof(row[p][0].value)) ? '[No title]' : row[p][0].value.linkify();
$title.append(value);
}
};
if ('undefined'!=typeof(row[p][0])) {
mo += pp + ' ' +row[p][0].value + "\n";
};
}
$url.append('<a href="'+url+'" target="_blank">'+url+'</a>');
if ('undefined'!=typeof(opts.check[j])) $row.click();
$row.attr('title',mo);
}
do_match_height(true);
$('body').on('sheet_layout_change', function() { do_match_height(); });
Expand Down
8 changes: 8 additions & 0 deletions system/application/views/templates/jquery.list.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@
$row.addClass('clicked');
$row.find('input[type="checkbox"]').prop('checked',true);
}
var mo = '';
for (var k in opts.rows[j]) {
if (-1==k.indexOf(':')) continue;
if ('undefined'!=typeof(opts.rows[j][k][0])) {
mo += pnode(k) + ' ' +opts.rows[j][k][0].value + "\n";
};
};
$row.attr('title', mo);
}
$self.find('td a').on('click', function(e) {
e.stopPropagation();
Expand Down
7 changes: 6 additions & 1 deletion system/application/views/templates/jquery.tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
$url = $('<div class="url"></div>').appendTo($row);
$title = $('<div class="title"></div>').appendTo($row);
$desc = $('<div class="desc"></div>').appendTo($row);
var mo = '';
for (var p in row) {
var pp = pnode(p);
if ('art:sourceLocation'==pp && 'undefined'!=typeof(row[p][0])) {
Expand All @@ -122,10 +123,14 @@
} else if ('dcterms:title'==pp) {
var value = ('undefined'==typeof(row[p][0]) || 'undefined'==typeof(row[p][0].value)) ? '[No title]' : row[p][0].value;
$title.append(value);
}
};
if ('undefined'!=typeof(row[p][0])) {
mo += pp + ' ' +row[p][0].value + "\n";
};
}
$url.append('<a href="'+url+'" target="_blank">'+url+'</a>');
if ('undefined'!=typeof(opts.check[j])) $row.click();
$row.attr('title', mo);
}
$wrapper.append('<br clear="both" />');
do_match_height(true);
Expand Down

0 comments on commit 20f3684

Please sign in to comment.