Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions HTML_5/ControlsList/Properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function getElement_Top(idElement) {

function getElement_Width(idElement) {
if (typeof (idElement) == "string") {
element = document.getElementById(idElement);
element = GetControlByIDAndShadowContext(idElement);
}
else {
element = idElement;
Expand All @@ -61,7 +61,7 @@ function getElement_Width(idElement) {

function getElement_Height(idElement) {
if (typeof (idElement) == "string") {
element = document.getElementById(idElement);
element = GetControlByIDAndShadowContext(idElement);
}
else {
element = idElement;
Expand Down Expand Up @@ -156,40 +156,41 @@ function Element_visibility(value, isSet) {

if (isSet == 1) {
if (value.toLowerCase() == "true")
$("#" + IDControl).show();
GetControlByIDAndShadowContext(IDControl).style.display = "";
else
$("#" + IDControl).hide();
GetControlByIDAndShadowContext(IDControl).style.display = "none";
}
return ($("#" + IDControl).is(':visible'));

return GetControlByIDAndShadowContext(IDControl).style.display != "none";
}

function Element_Width(value, isSet) {
if (isSet == 1) {
$("#" + IDControl).width(value);
GetControlByIDAndShadowContext(IDControl).style.width = `${value}px`;
// var valWidth = GetControlByIDAndShadowContext(IDControl).style.Width;
}
return getElement_Width(IDControl);
return GetControlByIDAndShadowContext(IDControl).style.width;
}

function Element_Height(value, isSet) {
if (isSet == 1) {
$("#" + IDControl).height(value);
GetControlByIDAndShadowContext(IDControl).style.height = `${value}px`;
}
return getElement_Height(IDControl);
return GetControlByIDAndShadowContext(IDControl).style.height;
}

function Element_Left(value, isSet) {
if (isSet == 1) {
$("#" + IDControl).offset({ left: value });
GetControlByIDAndShadowContext(IDControl).style.left = `${value}px`;
}
return getElement_Left(IDControl);
return GetControlByIDAndShadowContext(IDControl).style.left;
}

function Element_Top(value, isSet) {
if (isSet == 1) {
$("#" + IDControl).offset({ top: value });
GetControlByIDAndShadowContext(IDControl).style.top = `${value}px`;
}
return getElement_Top(IDControl);
return GetControlByIDAndShadowContext(IDControl).style.top;
}

function Element_Check(value, isSet) {
Expand Down
19 changes: 10 additions & 9 deletions HTML_5/HTML_JP/ControlsList/Properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function getElement_Top(idElement) {

function getElement_Width(idElement) {
if (typeof (idElement) == "string") {
element = document.getElementById(idElement);
element = GetControlByIDAndShadowContext(idElement);
}
else {
element = idElement;
Expand All @@ -61,7 +61,7 @@ function getElement_Width(idElement) {

function getElement_Height(idElement) {
if (typeof (idElement) == "string") {
element = document.getElementById(idElement);
element = GetControlByIDAndShadowContext(idElement);
}
else {
element = idElement;
Expand Down Expand Up @@ -156,38 +156,39 @@ function Element_visibility(value, isSet) {

if (isSet == 1) {
if (value.toLowerCase() == "true")
$("#" + IDControl).show();
GetControlByIDAndShadowContext(IDControl).style.display = "";
else
$("#" + IDControl).hide();
GetControlByIDAndShadowContext(IDControl).style.display = "none";
}
return ($("#" + IDControl).is(':visible'));

return GetControlByIDAndShadowContext(IDControl).style.display != "none";
}

function Element_Width(value, isSet) {
if (isSet == 1) {
$("#" + IDControl).width(value);
GetControlByIDAndShadowContext(IDControl).style.width = `${value}px`;
// var valWidth = GetControlByIDAndShadowContext(IDControl).style.Width;
}
return getElement_Width(IDControl);
}

function Element_Height(value, isSet) {
if (isSet == 1) {
$("#" + IDControl).height(value);
GetControlByIDAndShadowContext(IDControl).style.height = `${value}px`;
}
return getElement_Height(IDControl);
}

function Element_Left(value, isSet) {
if (isSet == 1) {
$("#" + IDControl).offset({ left: value });
GetControlByIDAndShadowContext(IDControl).style.left = `${value}px`;
}
return getElement_Left(IDControl);
}

function Element_Top(value, isSet) {
if (isSet == 1) {
$("#" + IDControl).offset({ top: value });
GetControlByIDAndShadowContext(IDControl).style.top = `${value}px`;
}
return getElement_Top(IDControl);
}
Expand Down