forked from 0x2620/pandora
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) {
|
if (canEdit || data.description) {
|
||||||
$('<div>')
|
$('<div>')
|
||||||
|
.addClass("InlineImages")
|
||||||
.append(
|
.append(
|
||||||
Ox.EditableContent({
|
Ox.EditableContent({
|
||||||
clickLink: pandora.clickLink,
|
clickLink: pandora.clickLink,
|
||||||
editable: canEdit,
|
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,
|
maxHeight: Infinity,
|
||||||
placeholder: formatLight(Ox._('No Description')),
|
placeholder: formatLight(Ox._('No Description')),
|
||||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||||
|
|
|
@ -362,17 +362,12 @@ pandora.ui.infoView = function(data, isMixed) {
|
||||||
clickLink: pandora.clickLink,
|
clickLink: pandora.clickLink,
|
||||||
collapseToEnd: false,
|
collapseToEnd: false,
|
||||||
editable: canEdit,
|
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')),
|
placeholder: formatLight(Ox._(isMixed.summary ? 'Mixed Summary' : 'No Summary')),
|
||||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
value: data.summary || ''
|
value: data.summary || ''
|
||||||
})
|
})
|
||||||
|
.addClass("InlineImages")
|
||||||
.css(css)
|
.css(css)
|
||||||
.css({
|
.css({
|
||||||
marginTop: '12px',
|
marginTop: '12px',
|
||||||
|
@ -449,18 +444,13 @@ pandora.ui.infoView = function(data, isMixed) {
|
||||||
clickLink: pandora.clickLink,
|
clickLink: pandora.clickLink,
|
||||||
collapseToEnd: false,
|
collapseToEnd: false,
|
||||||
editable: canEdit,
|
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')),
|
placeholder: formatLight(Ox._(isMixed.songs ? 'Mixed Songs' : 'unknown')),
|
||||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
value: data.songs || ''
|
value: data.songs || ''
|
||||||
|
|
||||||
})
|
})
|
||||||
|
.addClass("InlineImages")
|
||||||
.css(css)
|
.css(css)
|
||||||
.css({
|
.css({
|
||||||
overflow: 'hidden'
|
overflow: 'hidden'
|
||||||
|
@ -1043,17 +1033,12 @@ pandora.ui.infoView = function(data, isMixed) {
|
||||||
Ox.EditableContent({
|
Ox.EditableContent({
|
||||||
clickLink: pandora.clickLink,
|
clickLink: pandora.clickLink,
|
||||||
editable: canEdit,
|
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')),
|
placeholder: formatLight(Ox._('No Description')),
|
||||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
value: value.description || ''
|
value: value.description || ''
|
||||||
})
|
})
|
||||||
|
.addClass("InlineImages")
|
||||||
.css(css)
|
.css(css)
|
||||||
.css({
|
.css({
|
||||||
overflow: 'hidden'
|
overflow: 'hidden'
|
||||||
|
|
|
@ -260,16 +260,11 @@ pandora.ui.infoView = function(data, isMixed) {
|
||||||
|
|
||||||
if (canEdit || data.summary) {
|
if (canEdit || data.summary) {
|
||||||
$('<div>')
|
$('<div>')
|
||||||
|
.addClass("InlineImages")
|
||||||
.append(
|
.append(
|
||||||
Ox.EditableContent({
|
Ox.EditableContent({
|
||||||
clickLink: pandora.clickLink,
|
clickLink: pandora.clickLink,
|
||||||
editable: canEdit,
|
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,
|
maxHeight: Infinity,
|
||||||
placeholder: formatLight(Ox._( isMixed.summary ? 'Mixed Summary' : 'No Summary')),
|
placeholder: formatLight(Ox._( isMixed.summary ? 'Mixed Summary' : 'No Summary')),
|
||||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||||
|
|
|
@ -280,16 +280,11 @@ pandora.ui.infoView = function(data, isMixed) {
|
||||||
.appendTo($div);
|
.appendTo($div);
|
||||||
if (canEdit || data[key + 'description']) {
|
if (canEdit || data[key + 'description']) {
|
||||||
$('<div>')
|
$('<div>')
|
||||||
|
.addClass("InlineImages")
|
||||||
.append(
|
.append(
|
||||||
descriptions[key] = Ox.EditableContent({
|
descriptions[key] = Ox.EditableContent({
|
||||||
clickLink: pandora.clickLink,
|
clickLink: pandora.clickLink,
|
||||||
editable: canEdit,
|
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))])),
|
placeholder: formatLight(Ox._('No {0} Description', [Ox._(Ox.toTitleCase(key))])),
|
||||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||||
type: 'textarea',
|
type: 'textarea',
|
||||||
|
@ -353,6 +348,7 @@ pandora.ui.infoView = function(data, isMixed) {
|
||||||
|
|
||||||
if (canEdit || data.summary) {
|
if (canEdit || data.summary) {
|
||||||
$('<div>')
|
$('<div>')
|
||||||
|
.addClass("InlineImages")
|
||||||
.css({
|
.css({
|
||||||
marginTop: '12px',
|
marginTop: '12px',
|
||||||
marginBottom: '12px'
|
marginBottom: '12px'
|
||||||
|
@ -362,12 +358,6 @@ pandora.ui.infoView = function(data, isMixed) {
|
||||||
clickLink: pandora.clickLink,
|
clickLink: pandora.clickLink,
|
||||||
collapseToEnd: false,
|
collapseToEnd: false,
|
||||||
editable: canEdit,
|
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,
|
maxHeight: Infinity,
|
||||||
placeholder: formatLight(Ox._('No Summary')),
|
placeholder: formatLight(Ox._('No Summary')),
|
||||||
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
tooltip: canEdit ? pandora.getEditTooltip() : '',
|
||||||
|
|
Loading…
Reference in a new issue