Skip to content

Commit 20f3684

Browse files
committed
Metadata tooltips
1 parent 7bc85b9 commit 20f3684

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

system/application/views/templates/jquery.icon.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
var $title = $('<div class="title"></div>').appendTo($row);
111111
var $source = $('<div class="source"></div>').appendTo($row);
112112
var url = j;
113+
var mo = '';
113114
for (var p in row) {
114115
var pp = pnode(p);
115116
if ('art:sourceLocation'==pp && 'undefined'!=typeof(row[p][0])) {
@@ -120,10 +121,14 @@
120121
} else if ('dcterms:title'==pp) {
121122
var value = ('undefined'==typeof(row[p][0]) || 'undefined'==typeof(row[p][0].value)) ? '[No title]' : row[p][0].value.linkify();
122123
$title.append(value);
123-
}
124+
};
125+
if ('undefined'!=typeof(row[p][0])) {
126+
mo += pp + ' ' +row[p][0].value + "\n";
127+
};
124128
}
125129
$url.append('<a href="'+url+'" target="_blank">'+url+'</a>');
126130
if ('undefined'!=typeof(opts.check[j])) $row.click();
131+
$row.attr('title',mo);
127132
}
128133
do_match_height(true);
129134
$('body').on('sheet_layout_change', function() { do_match_height(); });

system/application/views/templates/jquery.list.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@
111111
$row.addClass('clicked');
112112
$row.find('input[type="checkbox"]').prop('checked',true);
113113
}
114+
var mo = '';
115+
for (var k in opts.rows[j]) {
116+
if (-1==k.indexOf(':')) continue;
117+
if ('undefined'!=typeof(opts.rows[j][k][0])) {
118+
mo += pnode(k) + ' ' +opts.rows[j][k][0].value + "\n";
119+
};
120+
};
121+
$row.attr('title', mo);
114122
}
115123
$self.find('td a').on('click', function(e) {
116124
e.stopPropagation();

system/application/views/templates/jquery.tile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
$url = $('<div class="url"></div>').appendTo($row);
110110
$title = $('<div class="title"></div>').appendTo($row);
111111
$desc = $('<div class="desc"></div>').appendTo($row);
112+
var mo = '';
112113
for (var p in row) {
113114
var pp = pnode(p);
114115
if ('art:sourceLocation'==pp && 'undefined'!=typeof(row[p][0])) {
@@ -122,10 +123,14 @@
122123
} else if ('dcterms:title'==pp) {
123124
var value = ('undefined'==typeof(row[p][0]) || 'undefined'==typeof(row[p][0].value)) ? '[No title]' : row[p][0].value;
124125
$title.append(value);
125-
}
126+
};
127+
if ('undefined'!=typeof(row[p][0])) {
128+
mo += pp + ' ' +row[p][0].value + "\n";
129+
};
126130
}
127131
$url.append('<a href="'+url+'" target="_blank">'+url+'</a>');
128132
if ('undefined'!=typeof(opts.check[j])) $row.click();
133+
$row.attr('title', mo);
129134
}
130135
$wrapper.append('<br clear="both" />');
131136
do_match_height(true);

0 commit comments

Comments
 (0)