use css class for inline images
This commit is contained in:
parent
8fa00f31a8
commit
a25509e1a4
4 changed files with 7 additions and 42 deletions
|
@ -251,16 +251,11 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
|||
|
||||
if (canEdit || data.description) {
|
||||
$('<div>')
|
||||
.addClass("InlineImages")
|
||||
.append(
|
||||
Ox.EditableContent({
|
||||
clickLink: pandora.clickLink,
|
||||
editable: canEdit,
|
||||
format: function(value) {
|
||||
return value.replace(
|
||||
/<img src=/g,
|
||||
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
|
||||
);
|
||||
},
|
||||
maxHeight: Infinity,
|
||||
placeholder: formatLight(Ox._('No Description')),
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
|
|
|
@ -362,17 +362,12 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
clickLink: pandora.clickLink,
|
||||
collapseToEnd: false,
|
||||
editable: canEdit,
|
||||
format: function(value) {
|
||||
return value.replace(
|
||||
/<img src=/g,
|
||||
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
|
||||
);
|
||||
},
|
||||
placeholder: formatLight(Ox._(isMixed.summary ? 'Mixed Summary' : 'No Summary')),
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
type: 'textarea',
|
||||
value: data.summary || ''
|
||||
})
|
||||
.addClass("InlineImages")
|
||||
.css(css)
|
||||
.css({
|
||||
marginTop: '12px',
|
||||
|
@ -449,18 +444,13 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
clickLink: pandora.clickLink,
|
||||
collapseToEnd: false,
|
||||
editable: canEdit,
|
||||
format: function(value) {
|
||||
return value.replace(
|
||||
/<img src=/g,
|
||||
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
|
||||
);
|
||||
},
|
||||
placeholder: formatLight(Ox._(isMixed.songs ? 'Mixed Songs' : 'unknown')),
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
type: 'textarea',
|
||||
value: data.songs || ''
|
||||
|
||||
})
|
||||
.addClass("InlineImages")
|
||||
.css(css)
|
||||
.css({
|
||||
overflow: 'hidden'
|
||||
|
@ -1043,17 +1033,12 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
Ox.EditableContent({
|
||||
clickLink: pandora.clickLink,
|
||||
editable: canEdit,
|
||||
format: function(value) {
|
||||
return value.replace(
|
||||
/<img /g,
|
||||
'<img style="max-width: 256px; max-height: 256px; margin: 0 16px 16px 0; float: left;" '
|
||||
);
|
||||
},
|
||||
placeholder: formatLight(Ox._('No Description')),
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
type: 'textarea',
|
||||
value: value.description || ''
|
||||
})
|
||||
.addClass("InlineImages")
|
||||
.css(css)
|
||||
.css({
|
||||
overflow: 'hidden'
|
||||
|
|
|
@ -260,16 +260,11 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
|
||||
if (canEdit || data.summary) {
|
||||
$('<div>')
|
||||
.addClass("InlineImages")
|
||||
.append(
|
||||
Ox.EditableContent({
|
||||
clickLink: pandora.clickLink,
|
||||
editable: canEdit,
|
||||
format: function(value) {
|
||||
return value.replace(
|
||||
/<img src=/g,
|
||||
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
|
||||
);
|
||||
},
|
||||
maxHeight: Infinity,
|
||||
placeholder: formatLight(Ox._( isMixed.summary ? 'Mixed Summary' : 'No Summary')),
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
|
|
|
@ -280,16 +280,11 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
.appendTo($div);
|
||||
if (canEdit || data[key + 'description']) {
|
||||
$('<div>')
|
||||
.addClass("InlineImages")
|
||||
.append(
|
||||
descriptions[key] = Ox.EditableContent({
|
||||
clickLink: pandora.clickLink,
|
||||
editable: canEdit,
|
||||
format: function(value) {
|
||||
return value.replace(
|
||||
/<img src=/g,
|
||||
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
|
||||
);
|
||||
},
|
||||
placeholder: formatLight(Ox._('No {0} Description', [Ox._(Ox.toTitleCase(key))])),
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
type: 'textarea',
|
||||
|
@ -353,6 +348,7 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
|
||||
if (canEdit || data.summary) {
|
||||
$('<div>')
|
||||
.addClass("InlineImages")
|
||||
.css({
|
||||
marginTop: '12px',
|
||||
marginBottom: '12px'
|
||||
|
@ -362,12 +358,6 @@ pandora.ui.infoView = function(data, isMixed) {
|
|||
clickLink: pandora.clickLink,
|
||||
collapseToEnd: false,
|
||||
editable: canEdit,
|
||||
format: function(value) {
|
||||
return value.replace(
|
||||
/<img src=/g,
|
||||
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
|
||||
);
|
||||
},
|
||||
maxHeight: Infinity,
|
||||
placeholder: formatLight(Ox._('No Summary')),
|
||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||
|
|
Loading…
Reference in a new issue