use class .OxSelectable, not style -user-select

This commit is contained in:
rolux 2013-07-19 09:34:01 +00:00
parent 9b83fb3c0a
commit de04f0816f
8 changed files with 64 additions and 66 deletions

View file

@ -99,12 +99,10 @@ pandora.ui.helpDialog = function() {
});
$text = Ox.Element()
.addClass('OxTextPage')
.addClass('OxTextPage OxSelectable')
.css({
padding: '16px',
overflowY: 'scroll',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
overflowY: 'scroll'
});
$panel = Ox.SplitPanel({

View file

@ -11,9 +11,7 @@ pandora.ui.infoView = function(data) {
canSeeAllMetadata = pandora.user.level != 'guest',
css = {
marginTop: '4px',
textAlign: 'justify',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
textAlign: 'justify'
},
iconRatio = ui.icons == 'posters' ? (
ui.showSitePosters ? pandora.site.posters.ratio : data.posterRatio
@ -246,9 +244,7 @@ pandora.ui.infoView = function(data) {
.css({
marginBottom: '-3px',
fontWeight: 'bold',
fontSize: '13px',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
fontSize: '13px'
})
.bindEvent({
submit: function(event) {
@ -279,9 +275,7 @@ pandora.ui.infoView = function(data) {
.css({
marginBottom: '-3px',
fontWeight: 'bold',
fontSize: '13px',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
fontSize: '13px'
})
.bindEvent({
submit: function(event) {
@ -296,6 +290,7 @@ pandora.ui.infoView = function(data) {
if (isEditable) {
var $div = $('<div>')
.addClass('OxSelectable')
.css(css)
.appendTo($text);
['country', 'year'].forEach(function(key, i) {
@ -336,13 +331,18 @@ pandora.ui.infoView = function(data) {
)
}
});
$('<div>').css(css).html(html.join('; ')).appendTo($text);
$('<div>')
.addClass('OxSelectable')
.css(css)
.html(html.join('; '))
.appendTo($text);
}
// Alternative Titles ------------------------------------------------------
// FIXME: This should be an array of objects {title: '', info: ''}
data.alternativeTitles && $('<div>')
.addClass('OxSelectable')
.css(css)
.html(
formatKey('Alternative Title' + (data.alternativeTitles.length == 1 ? '' : 's'))
@ -359,6 +359,7 @@ pandora.ui.infoView = function(data) {
// FIXME: we will want to check for data.seriesId here
if (isEditable && data.seriesTitle) {
var $div = $('<div>')
.addClass('OxSelectable')
// FIXME: Don't extend!
.css(Ox.extend(css, {marginTop: '20px'})) // FIXME: just a guess
.appendTo($text);
@ -389,6 +390,7 @@ pandora.ui.infoView = function(data) {
});
} else if (data.episodeDirector || data.writer || data.producer || data.cinematographer || data.editor) {
$div = $('<div>')
.addClass('OxSelectable')
.css(css)
.appendTo($text);
html = [];
@ -401,6 +403,7 @@ pandora.ui.infoView = function(data) {
}
data.cast && $('<div>')
.addClass('OxSelectable')
.css(css)
.html(
formatKey('cast') + data.cast.map(function(value) {
@ -417,6 +420,7 @@ pandora.ui.infoView = function(data) {
.appendTo($text);
data.productionCompany && $('<div>')
.addClass('OxSelectable')
.css(css)
.html(
formatKey('studio')
@ -426,6 +430,7 @@ pandora.ui.infoView = function(data) {
if (data.genre || (data.keyword && canSeeAllMetadata)) {
$div = $('<div>')
.addClass('OxSelectable')
.css(css)
.appendTo($text);
html = [];
@ -439,6 +444,7 @@ pandora.ui.infoView = function(data) {
}
data.summary && $('<div>')
.addClass('OxSelectable')
.css(css)
.html(formatKey('summary') + data.summary)
.appendTo($text);
@ -461,12 +467,11 @@ pandora.ui.infoView = function(data) {
)
.append(
$('<div>')
.addClass('OxSelectable')
.css({
display: 'table-cell',
paddingTop: '4px',
textAlign: 'justify',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
textAlign: 'justify'
})
.html(value)
)
@ -477,6 +482,7 @@ pandora.ui.infoView = function(data) {
});
data.filmingLocations && $('<div>')
.addClass('OxSelectable')
.css(css)
.html(
formatKey(Ox._('Filming Locations')) + data.filmingLocations.map(function(location) {
@ -486,6 +492,7 @@ pandora.ui.infoView = function(data) {
.appendTo($text);
data.releasedate && $('<div>')
.addClass('OxSelectable')
.css(css)
.html(
formatKey(Ox._('Release Date')) + Ox.formatDate(data.releasedate, '%A, %B %e, %Y')
@ -494,6 +501,7 @@ pandora.ui.infoView = function(data) {
if (data.budget || data.gross || data.profit) {
$div = $('<div>')
.addClass('OxSelectable')
.css(css)
.appendTo($text);
html = [];
@ -508,6 +516,7 @@ pandora.ui.infoView = function(data) {
if (data.connections) {
$div = $('<div>')
.addClass('OxSelectable')
.css(css)
.appendTo($text);
html = [];
@ -541,6 +550,7 @@ pandora.ui.infoView = function(data) {
['reviews', 'links'].forEach(function(key) {
data[key] && $('<div>')
.addClass('OxSelectable')
.css(css)
.html(
formatKey(key) + data[key].map(function(value) {

View file

@ -8,9 +8,7 @@ pandora.ui.infoView = function(data) {
canSeeAllMetadata = pandora.user.level != 'guest',
css = {
marginTop: '4px',
textAlign: 'justify',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
textAlign: 'justify'
},
iconRatio = ui.icons == 'posters' ? (
ui.showSitePosters ? pandora.site.posters.ratio : data.posterRatio
@ -245,9 +243,7 @@ pandora.ui.infoView = function(data) {
.css({
marginBottom: '-3px',
fontWeight: 'bold',
fontSize: '13px',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
fontSize: '13px'
})
.bindEvent({
submit: function(event) {
@ -278,9 +274,7 @@ pandora.ui.infoView = function(data) {
.css({
marginBottom: '-3px',
fontWeight: 'bold',
fontSize: '13px',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
fontSize: '13px'
})
.bindEvent({
submit: function(event) {
@ -317,7 +311,7 @@ pandora.ui.infoView = function(data) {
// Encyclopedia and Wiki ---------------------------------------------------
if ((data.encyclopedia || data.wiki) && canEdit) {
$links = Ox.Element().css(css);
$links = Ox.Element().addClass('OxSelectable').css(css);
if (data.encyclopedia) {
$links
.append(formatKey('encyclopedia'))
@ -803,6 +797,7 @@ pandora.ui.infoView = function(data) {
if (canEdit || value.description) {
var filmography = key == 'studios' ? Ox._('Films') : Ox._('Filmography'),
$name = Ox.Element()
.addClass('OxSelectable')
.css(css)
.css({marginTop: '12px', fontWeight: 'bold'})
.html(
@ -847,6 +842,7 @@ pandora.ui.infoView = function(data) {
})
.appendTo($name),
$text = $('<div>')
.addClass('OxSelectable')
.css(css)
.hide()
.appendTo($descriptions);
@ -890,7 +886,7 @@ pandora.ui.infoView = function(data) {
if (canEdit || keys.filter(function(key) {
return data[key];
}).length) {
$element = $('<div>').css(css);
$element = $('<div>').addClass('OxSelectable').css(css);
keys.forEach(function(key, i) {
if (canEdit || data[key]) {
if ($element.children().length) {

View file

@ -8,9 +8,7 @@ pandora.ui.infoView = function(data) {
canRemove = pandora.site.capabilities.canRemoveItems[pandora.user.level],
css = {
marginTop: '4px',
textAlign: 'justify',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
textAlign: 'justify'
},
html,
iconRatio = ui.icons == 'posters' ? data.posterRatio : 1,
@ -200,9 +198,7 @@ pandora.ui.infoView = function(data) {
.css({
marginBottom: '-3px',
fontWeight: 'bold',
fontSize: '13px',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
fontSize: '13px'
})
.bindEvent({
submit: function(event) {
@ -520,7 +516,7 @@ pandora.ui.infoView = function(data) {
if (canEdit || keys.filter(function(key) {
return data[key];
}).length) {
$element = $('<div>').css(css);
$element = $('<div>').addClass('OxSelectable').css(css);
keys.forEach(function(key, i) {
if (canEdit || data[key]) {
if ($element.children().length) {

View file

@ -7,9 +7,7 @@ pandora.ui.infoView = function(data) {
canRemove = pandora.site.capabilities.canRemoveItems[pandora.user.level],
css = {
marginTop: '4px',
textAlign: 'justify',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
textAlign: 'justify'
},
descriptions = [],
html,
@ -211,7 +209,11 @@ pandora.ui.infoView = function(data) {
['source', 'project'].forEach(function(key) {
if (canEdit || data[key]) {
var $div = $('<div>').css(css).css({margin: 0}).appendTo($data);
var $div = $('<div>')
.addClass('OxSelectable')
.css(css)
.css({margin: 0})
.appendTo($data);
$('<span>')
.html(
formatKey({
@ -283,9 +285,7 @@ pandora.ui.infoView = function(data) {
})
.css({
fontWeight: 'bold',
fontSize: '13px',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
fontSize: '13px'
})
.bindEvent({
submit: function(event) {
@ -345,7 +345,11 @@ pandora.ui.infoView = function(data) {
renderGroup(['license']);
$('<div>').css(css).css({height: '16px'}).appendTo($text);
$('<div>')
.addClass('OxSelectable')
.css(css)
.css({height: '16px'})
.appendTo($text);
// Duration, Aspect Ratio --------------------------------------------------
@ -650,7 +654,9 @@ pandora.ui.infoView = function(data) {
if (canEdit || keys.filter(function(key) {
return data[key];
}).length) {
$element = $('<div>').css(css);
$element = $('<div>')
.addClass('OxSelectable')
.css(css);
keys.forEach(function(key, i) {
if (canEdit || data[key]) {
if ($element.children().length) {

View file

@ -156,11 +156,12 @@ pandora.ui.logsDialog = function() {
})
],
closeButton: true,
content: $('<code>').append($('<pre>').css({
margin: '16px',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
}).text(value.text)),
content: $('<code>').append(
$('<pre>')
.addClass('OxSelectable')
.css({margin: '16px'})
.text(value.text)
),
height: height - 48,
keys: {enter: 'close', escape: 'close'},
maximizeButton: true,

View file

@ -72,12 +72,11 @@ pandora.ui.news = function(width, height) {
tooltip: isEditable ? pandora.getEditTooltip() : '',
value: items[index].title
})
.addClass('OxSelectable')
.css({
display: 'inline-block',
fontWeight: 'bold',
fontSize: '16px',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
})
.bindEvent({
submit: function(data) {
@ -94,11 +93,10 @@ pandora.ui.news = function(width, height) {
tooltip: isEditable ? pandora.getEditTooltip() : '',
value: items[index].date
})
.addClass('OxSelectable')
.css({
display: 'inline-block',
fontSize: '9px',
MozUserSelect: 'text',
WebkitUserSelect: 'text'
fontSize: '9px'
})
.bindEvent({
submit: function(data) {
@ -117,10 +115,7 @@ pandora.ui.news = function(width, height) {
value: items[index].text,
width: width - 512
})
.css({
MozUserSelect: 'text',
WebkitUserSelect: 'text'
})
.addClass('OxSelectable')
.bindEvent({
submit: function(data) {
editItem('text', data.value);

View file

@ -26,28 +26,24 @@ pandora.ui.toolbar = function() {
textAlign: 'center',
title: getListName(pandora.user.ui._list)
})
.addClass('OxSelectable')
.css({
position: 'absolute',
left: getListTitleLeft() + 'px',
top: '4px',
right: (ui._list ? 324 : 310) + 'px',
width: 'auto',
MozUserSelect: 'text',
OUserSelect: 'text',
WebkitUserSelect: 'text'
width: 'auto'
})
: pandora.$ui.itemTitle = Ox.Label({
textAlign: 'center'
})
.addClass('OxSelectable')
.css({
position: 'absolute',
left: '236px',
top: '4px',
right: (ui._list ? 324 : 310) + 'px',
width: 'auto',
MozUserSelect: 'text',
OUserSelect: 'text',
WebkitUserSelect: 'text'
width: 'auto'
})
.hide()
);