dbmsv2 init...1

This commit is contained in:
choi.jh 2025-09-15 14:34:16 +09:00
parent 5a3b04a0e9
commit 24ad28b024
4 changed files with 9 additions and 12 deletions

View File

@ -234,15 +234,11 @@ class CommonHelper
foreach ($viewDatas['control']['field_optons'][$field] as $key => $entity) {
$isSelected = $key == $value ? ' selected' : '';
$isDisabled = "";
if (in_array($viewDatas['control']['action'], ['create_form', 'index'])) {
if ($entity->getStatus() != $entity::DEFAULT_STATUS)
$isDisabled = " disabled";
}
$attribute = "";
foreach ($attributes as $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();
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $key, $isSelected, $isDisabled, $attribute, $title);
}

View File

@ -29,7 +29,7 @@ class ServiceHelper extends CustomerHelper
foreach ($attributes as $attribute_tag => $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();
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $key, $isSelected, $isDisabled, $attribute, $title);
}

View File

@ -29,7 +29,7 @@ class ServerPartHelper extends EquipmentHelper
foreach ($attributes as $attribute_tag => $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();
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $key, $isSelected, $isDisabled, $attribute, $title);
}

View File

@ -38,7 +38,7 @@
<?= $viewDatas['service']->getHelper()->getListLabel('site', lang("{$viewDatas['class_path']}.label.site"), $viewDatas) ?>
</th>
<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 class="index_head_short_column">
<?= $viewDatas['service']->getHelper()->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>
@ -126,7 +126,7 @@
if (navigator.clipboard && navigator.clipboard.writeText) {
// HTTPS 환경
navigator.clipboard.writeText(text)
.then(() => alert(text + " 복사되었습니다."))
.then(() => alert(text + "\n 복사되었습니다."))
.catch(err => alert("실패: " + err));
} else {
// HTTP 환경 fallback
@ -136,7 +136,7 @@
temp.select();
document.execCommand("copy");
document.body.removeChild(temp);
alert(text + " 복사되었습니다.");
alert(text + "\n 복사되었습니다.");
}
} catch (err) {
alert("복사 실패: " + err);
@ -144,9 +144,10 @@
}
function copyServerPartsToClipboard() {
// 모든 .serverparts div에서 data-text 속성값 수집
// 모든 .serverparts div에서 text-data 속성값 수집
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");
copyServerPartToClipboard(combined);
}