241 lines
11 KiB
Plaintext
241 lines
11 KiB
Plaintext
|
||
<cfsilent><!--- *** http://www.bennadel.com/blog/457-a-case-against-coldfusion-custom-tag-page-wrappers.htm--->
|
||
<cfimport prefix="layout" taglib="../layout"/>
|
||
<cfimport prefix="c" taglib="../lib/controls"/>
|
||
|
||
<cfparam name="ATTRIBUTES.section" type="string"/>
|
||
<cfparam name="ATTRIBUTES.closeForm" type="boolean" default="No"/>
|
||
|
||
<cfparam name="title" default=""/><!---заголовок страницы, отображаемый в теле например, <h1>--->
|
||
<cfparam name="pageTitle" default="Спецификации"/><!---заголовок окна браузера, в теге <title>--->
|
||
<cfparam name="controls" default=""/>
|
||
|
||
</cfsilent><cfsilent>
|
||
<!---Тег layout:page проглатывает собственный контент, и вместо него после закрытия выводит разметку на основании атрибутов (при открытии тега он формирует переменные - фрагменты разметки - по шаблону) и вложенных тегов layout:attribute (которые по закрытии тега на самом деле перезаписывают переменные в layout:page).
|
||
Вложенные теги удобны, чтобы передавать читабельную разметку, а не строку в кавычках.--->
|
||
<cfif thisTag.executionMode IS "start">
|
||
<!--- Формируется значение переменной controls--->
|
||
<!--- Но оно может быть переопределено вызовом layout:attribute в теле тега <layout:page>--->
|
||
<cfif #ATTRIBUTES.section# EQ "header">
|
||
<cfparam name="ATTRIBUTES.pageInfo" type="struct"/><!--- инициализируется вызывающей страницей --->
|
||
<cfsavecontent variable="controls">
|
||
<cfoutput>
|
||
<cfswitch expression=#ATTRIBUTES.pageInfo.getType()#>
|
||
<cfcase value="ls">
|
||
<layout:filter_link filterUrl="#ATTRIBUTES.pageInfo.entity#_filter.cfm" filter=#ATTRIBUTES.pageInfo.settings.filter# fwx="#ATTRIBUTES.pageInfo.track.fwx#" />
|
||
</cfcase>
|
||
<cfcase value="detail">
|
||
<layout:detail_buttons backUrl="#ATTRIBUTES.pageInfo.track.backUrl#" enable="#ATTRIBUTES.pageInfo.writePermitted()#"/>
|
||
<!---<cfset ATTRIBUTES.form="1"/>--->
|
||
</cfcase>
|
||
<cfcase value="filter">
|
||
<layout:filter_buttons backUrl="#ATTRIBUTES.pageInfo.track.backUrl#"/>
|
||
<!---<cfset ATTRIBUTES.form="1"/>--->
|
||
</cfcase><!--- *** not implemented
|
||
<cfcase value="del">
|
||
<layout:del_buttons backUrl="#ATTRIBUTES.pageInfo.track.backUrl#"/>
|
||
<cfset ATTRIBUTES.form="1"/>
|
||
</cfcase>--->
|
||
<cfdefaultcase>
|
||
<!---<cfthrow message="Unsupported page type" detail="Supported page types are ls, detail, filter, del"/>--->
|
||
</cfdefaultcase>
|
||
</cfswitch>
|
||
<!---<layout:language_switch/>--->
|
||
</cfoutput>
|
||
</cfsavecontent>
|
||
</cfif>
|
||
</cfif>
|
||
<!--- Переменную (фрагмент разметки) title по традиции заполняем в вызывающей странице через layout:attribute--->
|
||
</cfsilent><!---
|
||
|
||
<!---*******************************************--->
|
||
---><cfif thisTag.executionMode IS "end"><!---
|
||
---><cfsilent>
|
||
<!---никакая разметка из тела даннного тега не выводится,
|
||
вместо этого по закрытии тега им генерируется собственный контент--->
|
||
<!---внутри тега на странице определяются его параметры, некорректно названные атрибутами--->
|
||
<cfset thisTag.generatedContent=""/><!---
|
||
---></cfsilent><!---
|
||
---><cfswitch expression=#ATTRIBUTES.section#><!---
|
||
---><cfcase value="header"><cfsilent>
|
||
|
||
</cfsilent><!--- ----------------------------------------------------------------------------
|
||
---------------------------------------------------------------------------------------------
|
||
---------------------------------------------------------------------------------------------
|
||
---><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html lang="en" xml:lang="en" xmlns= "http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/><!--- this should be the first line in head --->
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||
|
||
<script type="text/javascript">
|
||
var timerStart = Date.now();
|
||
</script>
|
||
<!---<cfquery name="qUsr" datasource="#request.DS#">
|
||
select login, firstname, middlename, lastname from worker where id='#request.usr_id#'
|
||
</cfquery>--->
|
||
<title><cfoutput>#pageTitle#</cfoutput></title>
|
||
<link rel="shortcut icon" href="img/favicon.ico"/>
|
||
|
||
<!--- <link rel="stylesheet" href="style/fontawesome-all.css"/> --->
|
||
<link rel="stylesheet" type="text/css" href="style/web.css"/>
|
||
<!--- override layout header style --->
|
||
<!--- <cfswitch expression=#request.STAND#>
|
||
<cfcase value="DEV">
|
||
<style>.title, .main-controls {background-color:#aaf}</style>
|
||
</cfcase>
|
||
<cfcase value="TEST">
|
||
<style>.title, .main-controls {background-color:#9e9}</style>
|
||
</cfcase>
|
||
<cfcase value="PROD">
|
||
<style>.title, .main-controls {background-color:#faa}</style>
|
||
</cfcase>
|
||
<cfdefaultcase>
|
||
<style>.title, .main-controls {background-color:#aaa}</style><!--- без изменений --->
|
||
</cfdefaultcase>
|
||
</cfswitch> --->
|
||
|
||
|
||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||
<script type="text/javascript" src="js/jquery.searchabledropdown.js"></script>
|
||
|
||
<script>
|
||
function resetListsById(id){
|
||
for (var i = 0, j = arguments.length; i < j; i++) {
|
||
try {
|
||
document.getElementById(arguments[i]).selectedIndex=-1;
|
||
} catch (e) {}
|
||
}
|
||
}
|
||
|
||
window.onload=function(){document.body.style.cursor='default';}
|
||
</script>
|
||
</head>
|
||
|
||
<body style="cursor:wait;"><a name="up"></a>
|
||
|
||
<div class="page">
|
||
<div class="page-main">
|
||
<div class="menu noprint" style="margin:0; padding:0;/*border:1px solid red;*/">
|
||
<div class="fixed-menu" style="width:145px; height:100%; padding:0 0 0 0; --border:1px solid blue;" />
|
||
<a name="up"></a>
|
||
|
||
<!---<a id="lime_ref" href="http://root" style="display:inline-block; margin: 0; padding: 0 6px; height: 30px; width: 48px; margin: 5px 0 0 0;" title="Home"><img src="img/alarm-arrow-up-icon.png" style="margin: 0; padding: 0; height: 30px; margin: 5px 0 0 0;"/></a>
|
||
--->
|
||
|
||
<!--- <div style="width:20px; height:30px; margin: 5px; background: url('img/logo0.png') 0 0 no-repeat; background-size:contain; display:inline-block;"></div>--->
|
||
<div style="width:138px; height:30px; margin: 5px 0 0 5px; background: url('img/logo0.png') 0 0 no-repeat; background-size:contain; display:inline-block; -border:1px solid red;">
|
||
<p class="b r" style="color:white; margin:0 10px 10px 10px; font-size:130%;">
|
||
Спецификации
|
||
</p>
|
||
</div>
|
||
<p style="color:lightgray; margin:10px 12px; text-align:right;">
|
||
|
||
<cfoutput>v.#request.APP_VERSION#</cfoutput>
|
||
</p>
|
||
<style>
|
||
.menu-items-container::-webkit-scrollbar {width: 10px; margin:10px;}
|
||
}
|
||
.menu-items-container::-webkit-scrollbar-track {
|
||
background-color: lightgray;
|
||
}
|
||
.menu-items-container::-webkit-scrollbar-thumb {
|
||
--background-color: rgb(97,127,136);/*lightgray*/;
|
||
--border-radius: 2px;
|
||
--border: 1px solid white;
|
||
}
|
||
</style>
|
||
<div class="menu-items-container" style="width:100%; height:100%; overflow:auto; scrollbar-width:thin; --border:1px solid green;">
|
||
<cfmodule template="../inc/menu.cfm" fwx="#ATTRIBUTES.pageInfo.track.fwx#" thisUrl="#ATTRIBUTES.pageInfo.track.thisUrl#"/>
|
||
<br/>
|
||
<br/>
|
||
<br/>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
<!-- content -->
|
||
<div class="content">
|
||
|
||
<cfif isInstanceOf(ATTRIBUTES.pageInfo, "form_page_info")>
|
||
<cfoutput>
|
||
<form name="#ATTRIBUTES.pageInfo.formName#" action="#ATTRIBUTES.pageInfo.formAction#" method="#ATTRIBUTES.pageInfo.formMethod#" <!---style="height:100%;"---><cfif len(ATTRIBUTES.pageInfo.formEncType)> enctype="#ATTRIBUTES.pageInfo.formEncType#"</cfif>><!--- height:100% is required to make inner elements fill the container vertically ---><!--- but if we close the form in the middle of the page, layout is broken --->
|
||
</cfoutput>
|
||
</cfif>
|
||
|
||
<div class="header">
|
||
<div class="control-bar">
|
||
<!--- <div style="display:table-cell; width:23px; background: #ccc/*rgb(117,147,156)*/; border: 1px solid #bbb;"> --->
|
||
<!--- <div style="display:table-cell; width:23px; background: #0078c9; border: 1px solid #000;"> --->
|
||
<!--- <div style="display:table-cell; width:23px; background: #07b; border: 1px solid #000;"></div> --->
|
||
<!--- <div style="display:table-cell; width:3px;"></div> --->
|
||
<div class="title">
|
||
<cfoutput>#title#</cfoutput>
|
||
</div>
|
||
<div class="main-controls">
|
||
<cfoutput>#controls#</cfoutput>
|
||
</div>
|
||
</div><!--- control-bar --->
|
||
</div>
|
||
|
||
<div class="layout_vspacer"></div>
|
||
|
||
|
||
<cfif len(ATTRIBUTES.pageInfo.status.errorState)>
|
||
<span style="color:red"><cfoutput>#ATTRIBUTES.pageInfo.status.errorMessage#</cfoutput></span>
|
||
<cfexit method="exittag"/>
|
||
</cfif>
|
||
|
||
<!-- content -->
|
||
</cfcase><cfcase value="extension"><!--- -------------------------------------------------------------------------------------------- --->
|
||
<cfif ATTRIBUTES.closeForm></form></cfif>
|
||
</cfcase><cfcase value="footer"><!--- -------------------------------------------------------------------------------------------- --->
|
||
<!--/content -->
|
||
<cfif ATTRIBUTES.closeForm></form></cfif>
|
||
|
||
</div>
|
||
<!--/content -->
|
||
|
||
</div><!--- page main --->
|
||
|
||
<div class="page-footer noprint">
|
||
<div style="display:table-cell; padding:.5em; background-color:#555;">
|
||
<cftry>
|
||
<cfset pageTimeMs=GetTickCount()-request.startTickCount/>
|
||
<cfoutput><span title="page generation time">#pageTimeMs# ms</span></cfoutput>
|
||
<cfcatch type="any">request.startTickCount undefined</cfcatch>
|
||
</cftry>
|
||
<span id="load-time" title="page loading time"></span>
|
||
<script type="text/javascript">
|
||
window.onload=function() {
|
||
document.body.style.cursor='default';
|
||
document.getElementById("load-time").innerHTML = (Date.now()-timerStart) + " ms";
|
||
};
|
||
<!---alert(document.documentMode);// IE troubles --->
|
||
</script>
|
||
</div>
|
||
<div style="display:table-cell; padding: 3px;">
|
||
<div class="footer">
|
||
<cftry>
|
||
<cflock scope="session" type="readonly" timeout="3">
|
||
<cfif len(session.authentication_source)>
|
||
<cfoutput>authentication:#session.authentication_source#</cfoutput>
|
||
</cfif>
|
||
</cflock><cfcatch type="ANY"></cfcatch></cftry>
|
||
<a href="#up" class="up">вверх</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div><!--- page --->
|
||
|
||
<!--- fixed-menu class is defined at the bottom of page, so in case of unhandled error menu is not fixed --->
|
||
<style>
|
||
div.fixed-menu { position:fixed;}
|
||
</style>
|
||
|
||
</body>
|
||
</html><!---
|
||
---></cfcase><cfdefaultcase><cfthrow message="Unsupported 'section' attribute value" detail="Supported section values are 'header','extension','footer'"></cfdefaultcase></cfswitch><!---
|
||
---></cfif>
|