format. migration
This commit is contained in:
parent
0815ccd930
commit
ca4db4353d
3 changed files with 32 additions and 4 deletions
26
migrations/versions/4480ecc50e04_.py
Normal file
26
migrations/versions/4480ecc50e04_.py
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
"""empty message
|
||||||
|
|
||||||
|
Revision ID: 4480ecc50e04
|
||||||
|
Revises: 3169519dc1e5
|
||||||
|
Create Date: 2014-05-20 02:20:20.283739
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = '4480ecc50e04'
|
||||||
|
down_revision = '3169519dc1e5'
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.add_column('changelog', sa.Column('timestamp', sa.BigInteger(), nullable=True))
|
||||||
|
### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_column('changelog', 'timestamp')
|
||||||
|
### end Alembic commands ###
|
|
@ -29,7 +29,7 @@ oml.ui.browser = function() {
|
||||||
borderWidth: Math.round(size / 64) + 'px 0',
|
borderWidth: Math.round(size / 64) + 'px 0',
|
||||||
borderStyle: 'solid',
|
borderStyle: 'solid',
|
||||||
borderColor: 'rgba(' + color[2].join(', ') + ')',
|
borderColor: 'rgba(' + color[2].join(', ') + ')',
|
||||||
margin: Math.round(size / 18) + 'px ' + Math.round(width / 2 - 14) + 'px',
|
margin: Math.round(size / 18) + 'px ' + Math.round(width / 2 - 8) + 'px',
|
||||||
fontSize: Math.round(size / 16) + 'px',
|
fontSize: Math.round(size / 16) + 'px',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
color: 'rgba(' + color[2].join(', ') + ')',
|
color: 'rgba(' + color[2].join(', ') + ')',
|
||||||
|
|
|
@ -102,7 +102,7 @@ oml.ui.infoView = function(identifyData) {
|
||||||
function formatValue(value, key, join) {
|
function formatValue(value, key, join) {
|
||||||
value = Ox.encodeHTMLEntities(value);
|
value = Ox.encodeHTMLEntities(value);
|
||||||
return value ? (Ox.isArray(value) ? value : [value]).map(function(value) {
|
return value ? (Ox.isArray(value) ? value : [value]).map(function(value) {
|
||||||
return key ?
|
return key && !identifyData ?
|
||||||
'<a href="/' + key + '==' + value + '">' + value + '</a>'
|
'<a href="/' + key + '==' + value + '">' + value + '</a>'
|
||||||
: value;
|
: value;
|
||||||
}).join(join || ', ') : '';
|
}).join(join || ', ') : '';
|
||||||
|
@ -269,6 +269,8 @@ oml.ui.infoView = function(identifyData) {
|
||||||
data = result.data;
|
data = result.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ox.print('BOOK DATA', data)
|
||||||
|
|
||||||
var $mediaButton,
|
var $mediaButton,
|
||||||
isEditable = !data.mainid && data.mediastate == 'available',
|
isEditable = !data.mainid && data.mediastate == 'available',
|
||||||
src = !identifyData
|
src = !identifyData
|
||||||
|
@ -406,7 +408,7 @@ oml.ui.infoView = function(identifyData) {
|
||||||
textAlign: 'justify'
|
textAlign: 'justify'
|
||||||
})
|
})
|
||||||
.html(
|
.html(
|
||||||
Ox.formatValue(data.classification, 'classification')
|
formatValue(data.classification, 'classification')
|
||||||
)
|
)
|
||||||
.appendTo($info);
|
.appendTo($info);
|
||||||
}
|
}
|
||||||
|
@ -437,7 +439,7 @@ oml.ui.infoView = function(identifyData) {
|
||||||
})
|
})
|
||||||
.text(
|
.text(
|
||||||
[
|
[
|
||||||
data.extension.toUpperCase(),
|
(data.extension || '???').toUpperCase(), // FIXME
|
||||||
Ox.formatValue(data.size, 'B')
|
Ox.formatValue(data.size, 'B')
|
||||||
].join(', ')
|
].join(', ')
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue