function initialize()
{
gallery = new $.wiki.ScanGalleryPerspective({
- doc: CurrentDocument
+ doc: CurrentDocument, id: "ScanGalleryPerspective"
});
$(document).keydown(function(event) {
$('.vsplitbar').toggle(
function() {
+ $.wiki.state.perspectives.ScanGalleryPerspective.show = true;
$('#side-gallery').show();
$('.vsplitbar').css('right', 480).addClass('.active');
$('#editor .editor').css('right', 510);
gallery.onEnter();
},
function() {
+ $.wiki.state.perspectives.ScanGalleryPerspective.show = false;
$('#side-gallery').hide();
$('.vsplitbar').css('right', 0).removeClass('active');
$('#editor .editor').css('right', 30);
}
);
+ if($.wiki.state.perspectives.ScanGalleryPerspective.show)
+ $('.vsplitbar').trigger('click');
+
window.onbeforeunload = function(e) {
if($.wiki.isDirty()) {
e.returnValue = "Na stronie mogą być nie zapisane zmiany.";
console.log("Fetch success");
$('#loading-overlay').fadeOut();
var active_tab = document.location.hash || DEFAULT_PERSPECTIVE;
- var $active = $("#tabs " + active_tab);
- $active.trigger("click");
+ if(active_tab == "#ScanGalleryPerspective")
+ active_tab = DEFAULT_PERSPECTIVE;
+
+ console.log("Initial tab is:", active_tab)
+ $.wiki.switchToTab(active_tab);
},
failure: function() {
$('#loading-overlay').fadeOut();
alert("FAILURE");
}
- });
+ });
}; /* end of initialize() */
+
+ /* Load configuration */
+ $.wiki.loadConfig();
+
var initAll = function(a, f) {
if (a.length == 0) return f();
});
};
+
/*
* Initialize all perspectives
*/