allow sg, but not tiff
[fnpeditor.git] / src / editor / plugins / core / metadataEditor / view.js
index 432b15d..cde4f89 100644 (file)
@@ -128,6 +128,16 @@ _.extend(View.prototype, {
             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() || ''}));
@@ -167,7 +177,7 @@ _.extend(View.prototype, {
         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);