covers/links
This commit is contained in:
parent
75a14fed1e
commit
b6daa19d73
15 changed files with 209 additions and 44 deletions
|
|
@ -285,7 +285,7 @@ oml.URL = (function() {
|
|||
// pushes a new URL (as string or from state)
|
||||
that.push = function(stateOrURL, expandURL) {
|
||||
var state,
|
||||
title = oml.getPageTitle(stateOrURL)
|
||||
title = oml.getPageTitle(stateOrURL),
|
||||
url;
|
||||
oml.replaceURL = expandURL;
|
||||
if (Ox.isObject(stateOrURL)) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ oml.ui.infoView = function(identifyData) {
|
|||
|
||||
var ui = oml.user.ui,
|
||||
|
||||
css = getCSS(ui.coverSize),
|
||||
css = getCSS(ui.coverSize, oml.config.coverRatio),
|
||||
|
||||
that = Ox.Element()
|
||||
.addClass('OxTextPage')
|
||||
|
|
@ -39,6 +39,7 @@ oml.ui.infoView = function(identifyData) {
|
|||
right: !identifyData ? '176px' : 16 + Ox.UI.SCROLLBAR_SIZE + 'px',
|
||||
top: '16px'
|
||||
})
|
||||
[ui.coverSize == 512 ? 'hide' : 'show']()
|
||||
.appendTo(that),
|
||||
|
||||
$data,
|
||||
|
|
@ -232,13 +233,6 @@ oml.ui.infoView = function(identifyData) {
|
|||
$image.animate(css.image, 250);
|
||||
$reflectionImage.animate(css.image, 250);
|
||||
$reflection.animate(css.reflection, 250);
|
||||
/*
|
||||
$reflectionGradient.animate({
|
||||
width: iconSize + 'px',
|
||||
height: iconSize / 2 + 'px'
|
||||
}, 250);
|
||||
*/
|
||||
|
||||
oml.UI.set({coverSize: coverSize});
|
||||
}
|
||||
|
||||
|
|
@ -291,9 +285,19 @@ oml.ui.infoView = function(identifyData) {
|
|||
tooltip: '' // TODO
|
||||
})
|
||||
.on({
|
||||
error: function() {
|
||||
if (size == 512) {
|
||||
$info.show();
|
||||
}
|
||||
},
|
||||
load: function() {
|
||||
ratio = $image[0].width / $image[0].height;
|
||||
updateCover(ratio);
|
||||
if (size == 512) {
|
||||
$info.css({
|
||||
left: getCSS(512, ratio).info.left
|
||||
}).show();
|
||||
}
|
||||
}
|
||||
})
|
||||
.attr({src: src})
|
||||
|
|
|
|||
|
|
@ -142,4 +142,4 @@ oml.ui.list = function() {
|
|||
|
||||
return that;
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -122,6 +122,17 @@ oml.clearFilters = function() {
|
|||
oml.UI.set({find: find});
|
||||
};
|
||||
|
||||
oml.clickLink = function(e) {
|
||||
if (
|
||||
e.target.hostname == document.location.hostname
|
||||
&& !Ox.startsWith(e.target.pathname, '/static')
|
||||
) {
|
||||
oml.URL.push(e.target.pathname, true);
|
||||
} else {
|
||||
oml.openLink(e.target.href);
|
||||
}
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
oml.doHistory = function(action, items, targets, callback) {
|
||||
|
|
@ -894,6 +905,15 @@ oml.hasDialogOrScreen = function() {
|
|||
|| !!$('.OxScreen').length;
|
||||
};
|
||||
|
||||
oml.openLink = function(url) {
|
||||
if (Ox.startsWith(url, 'mailto:')) {
|
||||
window.open(url);
|
||||
} else {
|
||||
//window.open('/url=' + encodeURIComponent(url), '_blank');
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
};
|
||||
|
||||
oml.reloadList = function() {
|
||||
oml.$ui.list.updateElement();
|
||||
};
|
||||
|
|
@ -934,6 +954,7 @@ oml.resizeWindow = function() {
|
|||
oml.$ui.leftPanel && oml.$ui.leftPanel.size(2, oml.getInfoHeight());
|
||||
oml.resizeListFolders();
|
||||
oml.$ui.rightPanel && oml.$ui.rightPanel.updateElement();
|
||||
oml.$ui.list && oml.$ui.list.size();
|
||||
};
|
||||
|
||||
oml.updateFilterMenus = function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue