fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
list fixes: headers, invalid elements, easier ending
[fnpeditor.git]
/
src
/
editor
/
plugins
/
core
/
metadataEditor
/
view.js
diff --git
a/src/editor/plugins/core/metadataEditor/view.js
b/src/editor/plugins/core/metadataEditor/view.js
index
432b15d
..
cde4f89
100644
(file)
--- a/
src/editor/plugins/core/metadataEditor/view.js
+++ b/
src/editor/plugins/core/metadataEditor/view.js
@@
-128,6
+128,16
@@
_.extend(View.prototype, {
view.addMetadataRow(row);
});
},
view.addMetadataRow(row);
});
},
+ getMetadataByKey: function (key) {
+ var ret;
+ this.node.getMetadata().some(function (row) {
+ if (row.key == 'relation.coverimage.url') {
+ ret = row.value;
+ return true;
+ }
+ });
+ return ret;
+ },
addMetadataRow: function(row) {
console.log(row);
var newRow = $(_.template(itemTemplate)({key: row.getKey() || '', value: row.getValue() || ''}));
addMetadataRow: function(row) {
console.log(row);
var newRow = $(_.template(itemTemplate)({key: row.getKey() || '', value: row.getValue() || ''}));
@@
-167,7
+177,7
@@
_.extend(View.prototype, {
newRow.find('td:nth-child(2)').append(valueSelectView.el).data('view', valueSelectView);
if (this.getIsFileForKey(row.getKey())) {
newRow.find('td:nth-child(2)').append(valueSelectView.el).data('view', valueSelectView);
if (this.getIsFileForKey(row.getKey())) {
- var el = $("<a href='#-' class='attachment-library' style='float: right'>
attachments
</a>");
+ var el = $("<a href='#-' class='attachment-library' style='float: right'>
" + gettext('attachments') + "
</a>");
el.on('click', function() {
attachments.select(function(v) {
valueSelectView.setInput(v);
el.on('click', function() {
attachments.select(function(v) {
valueSelectView.setInput(v);