MODIFIED CODE:
Code: Select all
///////////////////////////////////////////////////////////////
// Maximized Mode /////////////////////////////////////////////
///////////////////////////////////////////////////////////////
function MaximizedModeController()
{
var self = this;
$("#clipMaximizeButton,#clipExitMaximizeButton")
.on("click", function () { self.toggleMaximize(); })
.on("mousedown touchstart", function (e)
{
// Prevents the button click from causing camera maximize actions.
// Do not use touchEvents.Gate(e) here, otherwise events sneak through on touchscreens.
// stopPropagation prevents the event from reaching videoPlayer.
e.stopPropagation();
// And [suppressMouseHelper] clears the state in case the event got there before we stopped propagation.
videoPlayer.suppressMouseHelper();
});
this.updateMaximizeButtonState = function () {
// Elimina las verificaciones y muestra siempre el botón
$("#clipMaximizeButton").removeClass('maximizeButtonHidden');
$("#clipExitMaximizeButton").addClass('maximizeButtonHidden');
if (loadingHelper.DidLoadingFinish()) {
resized();
}
};
this.toggleMaximize = function ()
{
if (settings.ui3_is_maximized === "1")
settings.ui3_is_maximized = "0";
else
settings.ui3_is_maximized = "1";
this.loadMaximizeState();
};
this.loadMaximizeState = function ()
{
if (settings.ui3_is_maximized === "1")
$("#layoutleft,#layouttop").hide();
else
$("#layoutleft,#layouttop").show();
this.updateMaximizeButtonState();
clipLoader && clipLoader.RedrawClipList();
BI_CustomEvent.Invoke("MaximizeChanged", settings.ui3_is_maximized === "1");
}
this.EnableMaximizedMode = function ()
{
if (settings.ui3_is_maximized !== "1")
this.toggleMaximize();
};
this.DisableMaximizedMode = function ()
{
if (settings.ui3_is_maximized === "1")
this.toggleMaximize();
};
this.loadMaximizeState();
}