')
+ .css({marginBottom: '4px'})
+ .append(formatKey(key, 'statistics'))
+ .append(
+ $('
')
+ .css({margin: '2px 0 0 -1px'}) // fixme: weird
+ .append(
+ $input = Ox.Editable({
+ placeholder: key == 'groups'
+ ? formatLight(Ox._(isMixed[key] ? 'Mixed Groups' : 'No Groups'))
+ : isMixed[key] ? formatLight(Ox._('Mixed Users')) : '',
+ editable: key == 'user' && canEdit,
+ tooltip: canEdit ? pandora.getEditTooltip() : '',
+ value: isMixed[key]
+ ? ''
+ : key == 'user' ? data[key] : data[key].join(', ')
+ })
+ .bindEvent(Ox.extend({
+ submit: function(event) {
+ editMetadata(key, event.value);
+ }
+ }, key == 'groups' ? {
+ doubleclick: canEdit ? function() {
+ setTimeout(function() {
+ if (window.getSelection) {
+ window.getSelection().removeAllRanges();
+ } else if (document.selection) {
+ document.selection.empty();
+ }
+ });
+ pandora.$ui.groupsDialog = pandora.ui.groupsDialog({
+ id: data.id,
+ name: data.title,
+ type: 'item'
+ })
+ .bindEvent({
+ groups: function(data) {
+ $input.options({
+ value: data.groups.join(', ')
+ });
+ }
+ })
+ .open();
+ } : function() {}
+ } : {}))
+ )
+ )
+ .appendTo($statistics);
+ });
+
+ // Created and Modified ----------------------------------------------------
+ if (!isMultiple && canEdit) {
+
+ ['created', 'modified'].forEach(function(key) {
+ $('
')
+ .css({marginBottom: '4px'})
+ .append(formatKey(key, 'statistics'))
+ .append(
+ $('
').html(Ox.formatDate(data[key], '%B %e, %Y'))
+ )
+ .appendTo($statistics);
+ });
+
// Notes --------------------------------------------------------------------
if (canEdit) {