cinera_clear.js: Fix the placement of the clear
This commit is contained in:
parent
209979f63a
commit
744515dac4
|
@ -23,7 +23,7 @@ typedef struct
|
||||||
version CINERA_APP_VERSION = {
|
version CINERA_APP_VERSION = {
|
||||||
.Major = 0,
|
.Major = 0,
|
||||||
.Minor = 8,
|
.Minor = 8,
|
||||||
.Patch = 21
|
.Patch = 22
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <stdarg.h> // NOTE(matt): varargs
|
#include <stdarg.h> // NOTE(matt): varargs
|
||||||
|
@ -14220,11 +14220,11 @@ SearchToBuffer(buffers *CollationBuffers, db_header_project *StoredP, project *P
|
||||||
|
|
||||||
AppendStringToBuffer(B, Wrap0("\n"));
|
AppendStringToBuffer(B, Wrap0("\n"));
|
||||||
|
|
||||||
|
OpenNodeCNewLine(B, &IndentationLevel, NODE_DIV, "cineraIndexList");
|
||||||
|
|
||||||
asset *JSClear = GetAsset(Wrap0(BuiltinAssets[ASSET_JS_CLEAR].Filename), ASSET_JS);
|
asset *JSClear = GetAsset(Wrap0(BuiltinAssets[ASSET_JS_CLEAR].Filename), ASSET_JS);
|
||||||
AppendScriptNode(B, &URL, &IndentationLevel, JSClear, FALSE, PAGE_SEARCH);
|
AppendScriptNode(B, &URL, &IndentationLevel, JSClear, FALSE, PAGE_SEARCH);
|
||||||
|
|
||||||
OpenNodeCNewLine(B, &IndentationLevel, NODE_DIV, "cineraIndexList");
|
|
||||||
|
|
||||||
AppendLandmarkedBuffer(B, &Index, PAGE_SEARCH);
|
AppendLandmarkedBuffer(B, &Index, PAGE_SEARCH);
|
||||||
FreeBuffer(&Index);
|
FreeBuffer(&Index);
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,23 @@
|
||||||
|
// NOTE(matt): To use, source this file inside the element you wish to be obscured while processing occurs.
|
||||||
|
// After processing is complete, call FlipClear()
|
||||||
|
|
||||||
|
var ThisScriptElement = document.currentScript;
|
||||||
|
var NodeToHide = ThisScriptElement.parentNode;
|
||||||
|
|
||||||
var CineraClearElement = document.createElement("DIV");
|
var CineraClearElement = document.createElement("DIV");
|
||||||
CineraClearElement.style.position = "fixed";
|
CineraClearElement.style.position = "fixed";
|
||||||
CineraClearElement.style.height = "100%";
|
CineraClearElement.style.height = "100%";
|
||||||
CineraClearElement.style.width = "100%";
|
CineraClearElement.style.width = "100%";
|
||||||
CineraClearElement.style.zIndex = 64;
|
CineraClearElement.style.zIndex = 64;
|
||||||
var CineraPlacedClear = document.body.appendChild(CineraClearElement);
|
|
||||||
var Col = getBackgroundColourRGB(CineraPlacedClear);
|
var CineraPlacedClear = NodeToHide.appendChild(CineraClearElement);
|
||||||
CineraPlacedClear.style.background = "rgb(" + Col.R + ", " + Col.G + ", " + Col.B + ")"
|
var Colour = getBackgroundColourRGB(CineraPlacedClear);
|
||||||
|
CineraPlacedClear.style.background = "rgb(" + Colour.R + ", " + Colour.G + ", " + Colour.B + ")"
|
||||||
document.body.style.overflowY = "hidden";
|
document.body.style.overflowY = "hidden";
|
||||||
|
|
||||||
function
|
function
|
||||||
FlipClear()
|
FlipClear(BodyOverflowY)
|
||||||
{
|
{
|
||||||
document.body.style.overflowY = null;
|
document.body.style.overflowY = BodyOverflowY ? BodyOverflowY : null;
|
||||||
document.body.removeChild(CineraPlacedClear);
|
CineraPlacedClear.parentNode.removeChild(CineraPlacedClear);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ InitPrototypes(Search.ResultsContainer);
|
||||||
prepareProjects();
|
prepareProjects();
|
||||||
|
|
||||||
SyncNavState();
|
SyncNavState();
|
||||||
FlipClear();
|
FlipClear("scroll");
|
||||||
//
|
//
|
||||||
////
|
////
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue