MCPcopy
hub / github.com/webpack/webpack / _setCalculationButton

Function _setCalculationButton

test/configCases/inner-graph/issue-11678/module.js:2309–2351  ·  view source on GitHub ↗
(positionTypeId)

Source from the content-addressed store, hash-verified

2307 }
2308}
2309function _setCalculationButton(positionTypeId) {
2310 let showButton = true,
2311 showButtonInTab = 1;
2312 switch (_getModuleName()) {
2313 case ModuleNameEnum.JOB:
2314
2315 showButtonInTab = 1;
2316 break;
2317 case ModuleNameEnum.SIHEADER:
2318
2319 showButtonInTab = 1;
2320 break;
2321 case ModuleNameEnum.CEHEADER:
2322
2323 showButtonInTab = 1;
2324 break;
2325 default:
2326 break;
2327 }
2328 switch (positionTypeId) {
2329 case POSITIONTYPES.TEXT:
2330 showButton = false;
2331 break;
2332 case POSITIONTYPES.SUBTOTAL:
2333 showButton = false;
2334 break;
2335 default:
2336
2337 break;
2338 }
2339 if (showButton) {
2340
2341 new UiButton(
2342 TC.showCalculation,
2343 "showCalcBtn",
2344 async function () {
2345
2346 await _showCalculationDialog();
2347 },
2348 "calculator"
2349 ).appendHTML("#" + _formObject.getPageId(showButtonInTab));
2350 }
2351}
2352function _setEnhanceButton(positionTypeId) {
2353 let showButton = true,
2354 showButtonInTab = 1;

Callers 2

_showFormFunction · 0.85

Calls 2

_getModuleNameFunction · 0.85
_showCalculationDialogFunction · 0.85

Tested by

no test coverage detected