dbmsv2 init...1
This commit is contained in:
parent
5a3b04a0e9
commit
24ad28b024
@ -234,15 +234,11 @@ class CommonHelper
|
|||||||
foreach ($viewDatas['control']['field_optons'][$field] as $key => $entity) {
|
foreach ($viewDatas['control']['field_optons'][$field] as $key => $entity) {
|
||||||
$isSelected = $key == $value ? ' selected' : '';
|
$isSelected = $key == $value ? ' selected' : '';
|
||||||
$isDisabled = "";
|
$isDisabled = "";
|
||||||
if (in_array($viewDatas['control']['action'], ['create_form', 'index'])) {
|
|
||||||
if ($entity->getStatus() != $entity::DEFAULT_STATUS)
|
|
||||||
$isDisabled = " disabled";
|
|
||||||
}
|
|
||||||
$attribute = "";
|
$attribute = "";
|
||||||
foreach ($attributes as $attribute_tag => $attribute_value) {
|
foreach ($attributes as $attribute_tag => $attribute_value) {
|
||||||
$attribute .= sprintf(" %s=\"%s\"", $attribute_tag, $attribute_value);
|
$attribute .= sprintf(" %s=\"%s\"", $attribute_tag, $attribute_value);
|
||||||
}
|
}
|
||||||
$title = $entity->getStatus() != $entity::DEFAULT_STATUS ? "X." : "";
|
$title = $entity->getStatus() != $entity::DEFAULT_STATUS ? "사용중." : "";
|
||||||
$title .= $entity->getCustomTitle();
|
$title .= $entity->getCustomTitle();
|
||||||
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $key, $isSelected, $isDisabled, $attribute, $title);
|
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $key, $isSelected, $isDisabled, $attribute, $title);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class ServiceHelper extends CustomerHelper
|
|||||||
foreach ($attributes as $attribute_tag => $attribute_value) {
|
foreach ($attributes as $attribute_tag => $attribute_value) {
|
||||||
$attribute .= sprintf(" %s=\"%s\"", $attribute_tag, $entity instanceof ServerEntity ? $entity->$attribute_value() : $attribute_value);
|
$attribute .= sprintf(" %s=\"%s\"", $attribute_tag, $entity instanceof ServerEntity ? $entity->$attribute_value() : $attribute_value);
|
||||||
}
|
}
|
||||||
$title = $entity->getStatus() != $entity::DEFAULT_STATUS ? "X." : "";
|
$title = $entity->getStatus() != $entity::DEFAULT_STATUS ? "사용중." : "";
|
||||||
$title .= $entity->getCustomTitle();
|
$title .= $entity->getCustomTitle();
|
||||||
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $key, $isSelected, $isDisabled, $attribute, $title);
|
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $key, $isSelected, $isDisabled, $attribute, $title);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class ServerPartHelper extends EquipmentHelper
|
|||||||
foreach ($attributes as $attribute_tag => $attribute_value) {
|
foreach ($attributes as $attribute_tag => $attribute_value) {
|
||||||
$attribute .= sprintf(" %s=\"%s\"", $attribute_tag, $entity instanceof PartEntity ? $entity->$attribute_value() : $attribute_value);
|
$attribute .= sprintf(" %s=\"%s\"", $attribute_tag, $entity instanceof PartEntity ? $entity->$attribute_value() : $attribute_value);
|
||||||
}
|
}
|
||||||
$title = $entity->getStatus() != $entity::DEFAULT_STATUS ? "X." : "";
|
$title = $entity->getStatus() != $entity::DEFAULT_STATUS ? "사용중." : "";
|
||||||
$title .= $entity->getCustomTitle();
|
$title .= $entity->getCustomTitle();
|
||||||
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $key, $isSelected, $isDisabled, $attribute, $title);
|
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $key, $isSelected, $isDisabled, $attribute, $title);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
<?= $viewDatas['service']->getHelper()->getListLabel('site', lang("{$viewDatas['class_path']}.label.site"), $viewDatas) ?>
|
<?= $viewDatas['service']->getHelper()->getListLabel('site', lang("{$viewDatas['class_path']}.label.site"), $viewDatas) ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="index_head_short_column">
|
<th class="index_head_short_column">
|
||||||
<?= $viewDatas['service']->getHelper()->getListLabel('location', lang("{$viewDatas['class_path']}.label.location"), $viewDatas) ?>/
|
<?= $viewDatas['service']->getHelper()->getListLabel('location', lang("{$viewDatas['class_path']}.label.location"), $viewDatas) ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="index_head_short_column">
|
<th class="index_head_short_column">
|
||||||
<?= $viewDatas['service']->getHelper()->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>
|
<?= $viewDatas['service']->getHelper()->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>
|
||||||
@ -126,7 +126,7 @@
|
|||||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||||
// HTTPS 환경
|
// HTTPS 환경
|
||||||
navigator.clipboard.writeText(text)
|
navigator.clipboard.writeText(text)
|
||||||
.then(() => alert(text + " 복사되었습니다."))
|
.then(() => alert(text + "\n 복사되었습니다."))
|
||||||
.catch(err => alert("실패: " + err));
|
.catch(err => alert("실패: " + err));
|
||||||
} else {
|
} else {
|
||||||
// HTTP 환경 fallback
|
// HTTP 환경 fallback
|
||||||
@ -136,7 +136,7 @@
|
|||||||
temp.select();
|
temp.select();
|
||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
document.body.removeChild(temp);
|
document.body.removeChild(temp);
|
||||||
alert(text + " 복사되었습니다.");
|
alert(text + "\n 복사되었습니다.");
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert("복사 실패: " + err);
|
alert("복사 실패: " + err);
|
||||||
@ -144,9 +144,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function copyServerPartsToClipboard() {
|
function copyServerPartsToClipboard() {
|
||||||
// 모든 .serverparts div에서 data-text 속성값 수집
|
// 모든 .serverparts div에서 text-data 속성값 수집
|
||||||
const elements = document.querySelectorAll(".serverparts");
|
const elements = document.querySelectorAll(".serverparts");
|
||||||
const texts = Array.from(elements).map(el => el.getAttribute("data-text") || "");
|
const texts = Array.from(elements).map(el => el.getAttribute("text-data") || "");
|
||||||
|
// console.log(texts);
|
||||||
const combined = texts.join("\n");
|
const combined = texts.join("\n");
|
||||||
copyServerPartToClipboard(combined);
|
copyServerPartToClipboard(combined);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user