update embed dialog

This commit is contained in:
rolux 2014-02-17 11:57:18 +05:30
parent 2e3281f2c9
commit b0075d47cc

View file

@ -240,7 +240,7 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
options = Ox.serialize({ options = Ox.serialize({
title: data.title || void 0, title: data.title || void 0,
showTimeline: data.showTimeline || void 0, showTimeline: data.showTimeline || void 0,
timeline: data.timeline && data.timeline != 'default' ? data.timeline : void 0, timeline: data.timeline || void 0,
showAnnotations: data.showAnnotations || void 0, showAnnotations: data.showAnnotations || void 0,
showLayers: data.showAnnotations && data.showLayers ? data.showLayers : void 0, showLayers: data.showAnnotations && data.showLayers ? data.showLayers : void 0,
matchRatio: Ox.contains(['video', 'edit'], view) ? data.matchRatio || void 0 : void 0, matchRatio: Ox.contains(['video', 'edit'], view) ? data.matchRatio || void 0 : void 0,
@ -284,7 +284,7 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
function formatValue(value) { function formatValue(value) {
// See Ox.URL (encodeValue) // See Ox.URL (encodeValue)
var chars = isItem ? '/#%' : '*=&|()#%', var chars = '*=&|()#%',
ret = ''; ret = '';
value.toString().split('').forEach(function(char) { value.toString().split('').forEach(function(char) {
var index = chars.indexOf(char); var index = chars.indexOf(char);
@ -292,11 +292,10 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
? '%' + char.charCodeAt(0).toString(16).toUpperCase() ? '%' + char.charCodeAt(0).toString(16).toUpperCase()
: char; : char;
}); });
ret = ret.replace(/_/g, '%09').replace(/\s/g, '_'); return ret.replace(/_/g, '%09')
if (!isItem) { .replace(/\s/g, '_')
ret = ret.replace(/</g, '%0E').replace(/>/g, '%0F'); .replace(/</g, '%0E')
} .replace(/>/g, '%0F');
return ret;
} }
function getForm() { function getForm() {
@ -663,14 +662,10 @@ pandora.ui.embedDialog = function(/*[url, ]callback*/) {
.appendTo($form); .appendTo($form);
$input.timeline = Ox.Select({ $input.timeline = Ox.Select({
items: [ items: pandora.site.timelines,
{id: 'default', title: Ox._('Default')}
].concat(
pandora.site.timelines
),
label: Ox._('Timeline'), label: Ox._('Timeline'),
labelWidth: labelWidth, labelWidth: labelWidth,
value: 'default', value: pandora.site.user.ui.videoTimeline,
width: formWidth width: formWidth
}) })
.addClass('advanced') .addClass('advanced')