ken_nogi/pleasanter/develop/★MSS/★マスターシート/sites/scripts/お客様データファイルを開く.js
Kenichiro NOGI 7176dc33ec pleasanter
2025-07-10 10:15:35 +09:00

53 lines
1.7 KiB
JavaScript

/*
@config : next999.json
@filename : ${psFileBasename}
@title : お客様データファイルを開く
@name :
@siteIds : 189112
@siteTitles : ★マスターシート
@disabled: false
*/
function createOkyakusamFilesButton() {
let div = document.createElement('div');
div.id = 'okyakusamaFilesButton';
div.style.float = "left";
$('#Guide').after(div);
let button = document.createElement('button');
button.type = 'button';
button.id = 'wfViewButton';
button.innerHTML = 'お客様データファイル一覧を開く';
button.setAttribute('onclick', '$p.ex.openOkyakusamaFiles()');
button.style.margin = '5px';
div.append(button);
$('#wfViewButton').button({
icon: 'ui-icon-bookmark'
});
}
$p.ex.openOkyakusamaFiles = function () {
let dataFileId = $("#Results_Class194").val();
let url = '/pleasanter/items/' + dataFileId;
if (dataFileId != '212512' && dataFileId != '') {
let childWindow;
childWindow = window.open(url, 'お客様データファイル', "child", 'left=10,top=10,width=1300,height=760,menubar=no,toolbar=no,location=no,status=no,resizable=yes');
setTimeout(function () {
childWindow.addEventListener("load", function () {
console.log('childWindow is loading');
$('#Application nav', childWindow.document).hide();
$('#Guide', childWindow.document).hide()
//$('#MainCommandsContainer', childWindow.document).hide();
$('#Header', childWindow.document).hide();
$('#RecordSwitchers', childWindow.document).hide();
$('.link-creations', childWindow.document).hide();
}, false);
}, 0);
}
}