},
__openView: function (view, param1, param2, callback) {
- if (typeof param1 === 'string') {
- param1 = decodeURIComponent(param1);
+ try {
+ if (typeof param1 === 'string') {
+ param1 = decodeURIComponent(param1);
+ }
+ }catch (e) {
+
}
- if (typeof param2 === 'string') {
- param2 = decodeURIComponent(param2);
+
+ try {
+ if (typeof param2 === 'string') {
+ param2 = decodeURIComponent(param2);
+ }
+ }catch (e) {
+
}
var $this = this;
var cb = function () {
$this.openingView(callback, view);
};
- if (view == 'index') {
+ if (view === 'index') {
this.openIndex(this.fluidbook.l10n.__('overview'), undefined, true, cb);
- } else if (view == 'video') {
+ } else if (view === 'video') {
this.openVideo(param1, cb);
- } else if (view == 'audio') {
+ } else if (view === 'audio') {
this.openAudio(param1, cb);
- } else if (view == 'webvideo') {
+ } else if (view === 'webvideo') {
this.openWebVideo(param1, param2, cb);
- } else if (view == 'multimedia') {
+ } else if (view === 'multimedia') {
this.openMultimedia(param1, cb);
- } else if (view == 'chapters') {
- if (param1 == undefined || param1 == 'undefined' || param1 == null || param1 == '') {
+ } else if (view === 'chapters') {
+ if (param1 === undefined || param1 === 'undefined' || param1 === null || param1 === '') {
param1 = 'null';
}
this.openChapters(param1, cb);
- } else if (view == 'archives') {
+ } else if (view === 'archives') {
this.openArchives($("#nav #archives").data('tooltip'), cb);
- } else if (view == 'text') {
+ } else if (view === 'text') {
this.openText(param1, cb);
- } else if (view == 'slideshow') {
+ } else if (view === 'slideshow') {
this.openSlideshow(param1, cb);
- } else if (view == 'iframe') {
+ } else if (view === 'iframe') {
this.openIframe(param1, cb);
- } else if (view == 'search') {
+ } else if (view === 'search') {
this.openSearch(param1, cb);
- } else if (view == 'print') {
+ } else if (view === 'print') {
this.openPrint(cb);
- } else if (view == 'download') {
+ } else if (view === 'download') {
this.openDownload(cb);
} else {
this['open' + camelView](param1, param2, cb);