[PE] Bug 39782
This commit is contained in:
parent
8d4b957598
commit
8bfbea3ef9
|
@ -95,6 +95,37 @@ require([
|
||||||
using : 'reporter'
|
using : 'reporter'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var setDocumentTitle = function(title) {
|
||||||
|
function getUrlParams() {
|
||||||
|
var e,
|
||||||
|
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||||
|
r = /([^&=]+)=?([^&]*)/g,
|
||||||
|
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
|
||||||
|
q = window.location.search.substring(1),
|
||||||
|
urlParams = {};
|
||||||
|
|
||||||
|
while (e = r.exec(q))
|
||||||
|
urlParams[d(e[1])] = d(e[2]);
|
||||||
|
|
||||||
|
return urlParams;
|
||||||
|
}
|
||||||
|
var params = getUrlParams(),
|
||||||
|
lang = (params["lang"] || 'en').split(/[\-\_]/)[0],
|
||||||
|
presenter = 'Presenter View';
|
||||||
|
|
||||||
|
if ( lang == 'de') presenter = '';
|
||||||
|
else if ( lang == 'es') presenter = '';
|
||||||
|
else if ( lang == 'fr') presenter = '';
|
||||||
|
else if ( lang == 'it') presenter = '';
|
||||||
|
else if ( lang == 'pt') presenter = '';
|
||||||
|
else if ( lang == 'ru') presenter = 'Режим докладчика';
|
||||||
|
else if ( lang == 'sl') presenter = '';
|
||||||
|
else if ( lang == 'tr') presenter = '';
|
||||||
|
presenter && (presenter += ' - ');
|
||||||
|
|
||||||
|
window.document.title = presenter + (title || '');
|
||||||
|
};
|
||||||
|
|
||||||
function load_document(data) {
|
function load_document(data) {
|
||||||
var docInfo = {};
|
var docInfo = {};
|
||||||
|
|
||||||
|
@ -108,7 +139,7 @@ require([
|
||||||
docInfo.put_Options(data.options);
|
docInfo.put_Options(data.options);
|
||||||
docInfo.put_Token(data.token);
|
docInfo.put_Token(data.token);
|
||||||
docInfo.put_Permissions(data.permissions || {});
|
docInfo.put_Permissions(data.permissions || {});
|
||||||
window.document.title = 'Presenter View' + (data.title ? (' - ' + data.title) : '');
|
setDocumentTitle(data.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
api.preloadReporter(data);
|
api.preloadReporter(data);
|
||||||
|
|
|
@ -96,6 +96,37 @@ require([
|
||||||
using : 'reporter'
|
using : 'reporter'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var setDocumentTitle = function(title) {
|
||||||
|
function getUrlParams() {
|
||||||
|
var e,
|
||||||
|
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||||
|
r = /([^&=]+)=?([^&]*)/g,
|
||||||
|
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
|
||||||
|
q = window.location.search.substring(1),
|
||||||
|
urlParams = {};
|
||||||
|
|
||||||
|
while (e = r.exec(q))
|
||||||
|
urlParams[d(e[1])] = d(e[2]);
|
||||||
|
|
||||||
|
return urlParams;
|
||||||
|
}
|
||||||
|
var params = getUrlParams(),
|
||||||
|
lang = (params["lang"] || 'en').split(/[\-\_]/)[0],
|
||||||
|
presenter = 'Presenter View';
|
||||||
|
|
||||||
|
if ( lang == 'de') presenter = '';
|
||||||
|
else if ( lang == 'es') presenter = '';
|
||||||
|
else if ( lang == 'fr') presenter = '';
|
||||||
|
else if ( lang == 'it') presenter = '';
|
||||||
|
else if ( lang == 'pt') presenter = '';
|
||||||
|
else if ( lang == 'ru') presenter = 'Режим докладчика';
|
||||||
|
else if ( lang == 'sl') presenter = '';
|
||||||
|
else if ( lang == 'tr') presenter = '';
|
||||||
|
presenter && (presenter += ' - ');
|
||||||
|
|
||||||
|
window.document.title = presenter + (title || '');
|
||||||
|
};
|
||||||
|
|
||||||
function load_document(data) {
|
function load_document(data) {
|
||||||
var docInfo = {};
|
var docInfo = {};
|
||||||
|
|
||||||
|
@ -109,7 +140,7 @@ require([
|
||||||
docInfo.put_Options(data.options);
|
docInfo.put_Options(data.options);
|
||||||
docInfo.put_Token(data.token);
|
docInfo.put_Token(data.token);
|
||||||
docInfo.put_Permissions(data.permissions || {});
|
docInfo.put_Permissions(data.permissions || {});
|
||||||
window.document.title = 'Presenter View' + (data.title ? (' - ' + data.title) : '');
|
setDocumentTitle(data.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
api.preloadReporter(data);
|
api.preloadReporter(data);
|
||||||
|
|
Loading…
Reference in a new issue