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() $text = Ox.Element()
.addClass('OxTextPage') .addClass('OxTextPage OxSelectable')
.css({ .css({
padding: '16px', padding: '16px',
overflowY: 'scroll', overflowY: 'scroll'
MozUserSelect: 'text',
WebkitUserSelect: 'text'
}); });
$panel = Ox.SplitPanel({ $panel = Ox.SplitPanel({

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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