|
|
@@ -12,60 +12,12 @@
|
|
|
<link rel="stylesheet" href="stuff/jquery.selectize/css/selectize.bootstrap3.css" type="text/css" />
|
|
|
<link rel="stylesheet" href="stuff/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" type="text/css" />
|
|
|
<link rel="stylesheet" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.4.custom.min.css" type="text/css">
|
|
|
- <style type="text/css">
|
|
|
-body { margin:0; font-size:12px; line-height:18px; }
|
|
|
-body { <?php echo UI::fixFooterPosition('body_style'); ?> }
|
|
|
-
|
|
|
-#SE-menu { font-size:13px }
|
|
|
-#SE-menu { min-height:36px }
|
|
|
-#SE-menu > .container-fluid { padding:0 }
|
|
|
-#SE-menu .navbar { margin-bottom:0 }
|
|
|
-#SE-menu .navbar-form { margin-top:0; margin-bottom:0 }
|
|
|
-#SE-menu .nav > li > a { padding: 8px 10px 8px }
|
|
|
-#SE-menu { -webkit-border-radius:0; -moz-border-radius:0; border-radius:0 }
|
|
|
-#SE-menu-sub { border-bottom:2px solid #C53000; background:#eee }
|
|
|
-#SE-menu-sub .btn { margin:4px 2px }
|
|
|
-
|
|
|
-#SE-menu .bookmark-item-rem { opacity:0.5 }
|
|
|
-#SE-menu .bookmark-item-add { opacity:0.5 }
|
|
|
-#SE-menu .bookmark-item-rem:hover { opacity:1 }
|
|
|
-#SE-menu .bookmark-item-add:hover { opacity:1 }
|
|
|
-
|
|
|
-.tbl-view td { border-color:#eee }
|
|
|
-.tbl-view thead td { background:#f3f3f3 }
|
|
|
-.tbl-view tbody tr:hover td { background:#E6FFE6 }
|
|
|
-.tbl-view tbody tr.tbl-row-0,
|
|
|
-.tbl-view tbody tr.row-0 { background:#f3f3f3 }
|
|
|
-.tbl-view tbody tr.tbl-row-1,
|
|
|
-.tbl-view tbody tr.row-1 { background:#fff }
|
|
|
-.tbl-view input[type=text] { margin:0; padding:0 }
|
|
|
-
|
|
|
-.se-main-menu {}
|
|
|
-.se-main-menu td:hover { background-color:#f3f3f3 }
|
|
|
-
|
|
|
-.red { color:#f00 }
|
|
|
-.green { color:#0f0 }
|
|
|
-.blue { color:#00f }
|
|
|
-
|
|
|
-.hover-gray { color:#d3d3d3 }
|
|
|
-.hover-gray:hover { color:#808080 }
|
|
|
-
|
|
|
-.dropdown-menu a em {font-size:0.9em; color:#bbb;}
|
|
|
-
|
|
|
-.label-A_STATUS-NORMAL { background:#aeffae; color:#555; text-align:center; text-shadow:none; }
|
|
|
-.label-A_STATUS-WAITING { background:#ffd2ff; color:#555; text-align:center; text-shadow:none; }
|
|
|
-.label-A_STATUS-MONITOR { background:#cccaff; color:#555; text-align:center; text-shadow:none; }
|
|
|
-.label-A_STATUS-WARNING { background:#ffbaba; color:#555; text-align:center; text-shadow:none; }
|
|
|
-.label-A_STATUS-DELETED { background:#e0e0e0; color:#808080; text-align:center; text-shadow:none; }
|
|
|
-.label-A_STATUS-OFF_SOFT { background:#fce3b7; color:#808080; text-align:center; text-shadow:none; }
|
|
|
-.label-A_STATUS-OFF_HARD { background:#eee; color:#808080; text-align:center; text-shadow:none; }
|
|
|
-
|
|
|
-caption { font-size:medium }
|
|
|
- </style>
|
|
|
-
|
|
|
- <script src="static/fetch-polyfill.min.js"></script>
|
|
|
- <script src="static/promise-polyfill.min.js"></script>
|
|
|
-
|
|
|
+<?php
|
|
|
+ UI::inlineCSS(APP_PATH_WWW . '/static/p5UI/main.css');
|
|
|
+ UI::inlineRawJS(APP_PATH_WWW . '/static/object-assign-polyfill.js');
|
|
|
+ UI::inlineRawJS(APP_PATH_WWW . '/static/fetch-polyfill.min.js');
|
|
|
+ UI::inlineRawJS(APP_PATH_WWW . '/static/promise-polyfill.min.js');
|
|
|
+?>
|
|
|
<script src="stuff/jquery-2.1.0.min.js"></script>
|
|
|
<script src="stuff/jquery-plugins.js"></script>
|
|
|
<script src="stuff/jquery.form.js"></script>
|
|
|
@@ -82,41 +34,6 @@ caption { font-size:medium }
|
|
|
<script src="stuff/lodash.min.js?_v=4.6.1"></script>
|
|
|
<script src="stuff/superagent.js"></script>
|
|
|
<script src="stuff/validate.min.js"></script>
|
|
|
- <style type="text/css">
|
|
|
-.typepsecial .selectize-input { width:366px; padding:4px 6px; }
|
|
|
-.typepsecial .selectize-control::before {
|
|
|
- -moz-transition: opacity 0.2s;
|
|
|
- -webkit-transition: opacity 0.2s;
|
|
|
- transition: opacity 0.2s;
|
|
|
- content: ' ';
|
|
|
- z-index: 2;
|
|
|
- position: absolute;
|
|
|
- display: block;
|
|
|
- top: 12px;
|
|
|
- right: 34px;
|
|
|
- width: 16px;
|
|
|
- height: 16px;
|
|
|
- background: url(stuff/i/loading.gif);
|
|
|
- background-size: 16px 16px;
|
|
|
- opacity: 0;
|
|
|
-}
|
|
|
-.typepsecial .selectize-control.loading::before {
|
|
|
- opacity: 0.4;
|
|
|
-}
|
|
|
-.typepsecial .selectize-control.single .selectize-input {
|
|
|
- color: #333;
|
|
|
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
|
|
- background-color: #fff;
|
|
|
- background-image: none;
|
|
|
- background-repeat: none;
|
|
|
- border-color: #ccc;
|
|
|
- filter: none;
|
|
|
- -webkit-box-shadow: none;
|
|
|
- -moz-box-shadow: none;
|
|
|
- box-shadow: none;
|
|
|
-}
|
|
|
-
|
|
|
- </style>
|
|
|
<?php S::printTimeoutUpdateJs(); ?>
|
|
|
<?php if (DBG::isActive()) : ?>
|
|
|
<script>
|
|
|
@@ -125,404 +42,17 @@ caption { font-size:medium }
|
|
|
});
|
|
|
</script>
|
|
|
<?php endif; ?>
|
|
|
-<script>
|
|
|
-if (typeof Object.assign != 'function') {
|
|
|
- (function () {
|
|
|
- Object.assign = function (target) {
|
|
|
- 'use strict';
|
|
|
- // We must check against these specific cases.
|
|
|
- if (target === undefined || target === null) {
|
|
|
- throw new TypeError('Cannot convert undefined or null to object');
|
|
|
- }
|
|
|
-
|
|
|
- var output = Object(target);
|
|
|
- for (var index = 1; index < arguments.length; index++) {
|
|
|
- var source = arguments[index];
|
|
|
- if (source !== undefined && source !== null) {
|
|
|
- for (var nextKey in source) {
|
|
|
- if (source.hasOwnProperty(nextKey)) {
|
|
|
- output[nextKey] = source[nextKey];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return output;
|
|
|
- };
|
|
|
- })();
|
|
|
-}
|
|
|
-</script>
|
|
|
-<style type="text/css">
|
|
|
- .p5UI__dropdown-wrap { display:inline-block; position:relative }
|
|
|
- .p5UI__dropdown-btn { position:relative }
|
|
|
- .p5UI__dropdown-btn:hover { }
|
|
|
- .p5UI__dropdown-content { display:none; position:absolute; overflow:auto; min-width:230px; z-index: 1 }
|
|
|
- .p5UI__dropdown-show { display:block }
|
|
|
- .p5UI__dropdown-input { border-box:box-sizing; width:100% }
|
|
|
-</style>
|
|
|
-<script>
|
|
|
-function p5UI__dropdown(e, n, position, render) {// @position = ('right top', 'left top', 'left bottom', 'right bottom')
|
|
|
- // e.stopPropagation()
|
|
|
- // e.preventDefault()
|
|
|
- var btnNode = n
|
|
|
- var node = n.nextSibling
|
|
|
- node.classList.toggle('p5UI__dropdown-show')
|
|
|
- // console.log('>>> p5UI__dropdown...', {btnNode: btnNode, node: node, 'has show class': node.classList.contains('p5UI__dropdown-show')})
|
|
|
- var position = position
|
|
|
- if (node.classList.contains('p5UI__dropdown-show')) {
|
|
|
- switch (position) {
|
|
|
- case 'right top': node.style.bottom = '50px'; node.style.right = '100px'; break; // TODO ...
|
|
|
- case 'left top': node.style.top = 0; node.style.left = '100px'; break; // TODO ...
|
|
|
- case 'right bottom': node.style.left = '' + btnNode.offsetWidth + 'px'; node.style.top = 0; break; // TODO ...
|
|
|
- case 'left bottom': node.style.right = '' + btnNode.offsetWidth + 'px'; node.style.top = 0; break;
|
|
|
- }
|
|
|
- node.p5UI__onClickOutsideCallback = p5UI__dropdown__onClickOutsideCallback(node, btnNode)
|
|
|
- node.p5UI__unbindClickOutsideCallback = p5UI__dropdown__unbindClickOutsideCallback(node)
|
|
|
- if (!document.addEventListener && document.attachEvent) {
|
|
|
- document.attachEvent('onclick', node.p5UI__onClickOutsideCallback);
|
|
|
- // document.attachEvent('keydown', this._closeModalKorespInfoIfHitEscape);
|
|
|
- } else {
|
|
|
- document.addEventListener('click', node.p5UI__onClickOutsideCallback);
|
|
|
- // document.addEventListener('keydown', this._closeModalKorespInfoIfHitEscape);
|
|
|
- }
|
|
|
- if ('function' === typeof render) render(n, node)
|
|
|
- // node.firstChild.focus() // TODO: find input
|
|
|
- } else {
|
|
|
- if ('function' === typeof node.p5UI__unbindClickOutsideCallback) {
|
|
|
- node.p5UI__unbindClickOutsideCallback()
|
|
|
- delete node.p5UI__onClickOutsideCallback
|
|
|
- delete node.p5UI__unbindClickOutsideCallback
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-function p5UI__dropdown__unbindClickOutsideCallback(n) {
|
|
|
- var node = n
|
|
|
- return function __p5UI__dropdown__unbindClickOutsideCallback(e) {
|
|
|
- // console.log('p5UI__dropdown__unbindClickOutsideCallback', {
|
|
|
- // 'opened': node.classList.contains('p5UI__dropdown-show'),
|
|
|
- // 'node': node,
|
|
|
- // 'typeof node.p5UI__onClickOutsideCallback': typeof node.p5UI__onClickOutsideCallback
|
|
|
- // })
|
|
|
- // console.trace()
|
|
|
- if (!document.removeEventListener && document.detachEvent) {
|
|
|
- document.detachEvent('onclick', node.p5UI__onClickOutsideCallback)
|
|
|
- // document.detachEvent('keydown', this._closeModalKorespInfoIfHitEscape)
|
|
|
- } else {
|
|
|
- document.removeEventListener('click', node.p5UI__onClickOutsideCallback)
|
|
|
- // document.removeEventListener('keydown', this._closeModalKorespInfoIfHitEscape)
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-function p5UI__dropdown__onClickOutsideCallback(n, btn) {
|
|
|
- var node = n
|
|
|
- var btnNode = btn
|
|
|
- // console.log('define p5UI__dropdown__onClickOutsideCallback...')
|
|
|
- return function __p5UI__dropdown__onClickOutsideCallback(e) {
|
|
|
- // console.log('p5UI__dropdown__onClickOutsideCallback', {
|
|
|
- // 'opened': node.classList.contains('p5UI__dropdown-show'),
|
|
|
- // 'clickedOutside(node)': p5UI__clickedOutsideElement(node, e),
|
|
|
- // 'clickedOutside(btnNode)': p5UI__clickedOutsideElement(btnNode, e),
|
|
|
- // 'typeof node.p5UI__onClickOutsideCallback': typeof node.p5UI__onClickOutsideCallback,
|
|
|
- // 'typeof node.p5UI__unbindClickOutsideCallback': typeof node.p5UI__unbindClickOutsideCallback,
|
|
|
- // })
|
|
|
- if (!node.classList.contains('p5UI__dropdown-show')) return
|
|
|
- if (node.p5UI__unbindClickOutsideCallback && 'function' == typeof node.p5UI__unbindClickOutsideCallback) {
|
|
|
- if (p5UI__clickedOutsideElement(node, e) && p5UI__clickedOutsideElement(btnNode, e)) {
|
|
|
- node.classList.remove('p5UI__dropdown-show')
|
|
|
- node.p5UI__unbindClickOutsideCallback()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-</script>
|
|
|
-<script>
|
|
|
-function p5UI__Clickable(n, eventNamespace, props) {
|
|
|
- var dbg = <?php echo (DBG::isActive())? 1 : 0; ?>;
|
|
|
- var eventNamespace = eventNamespace || 'p5UI__Clickable';
|
|
|
- var $n = jQuery(n);
|
|
|
- var state = {
|
|
|
- baseCssClassNames: n.className,
|
|
|
- props: props
|
|
|
- };
|
|
|
- jQuery(document).trigger(eventNamespace+':click', [n, state]);
|
|
|
-}
|
|
|
-
|
|
|
-function p5UI__ButtonAjax(n, eventNamespace, props) {
|
|
|
- var dbg = <?php echo (DBG::isActive())? 1 : 0; ?>;
|
|
|
- var eventNamespace = eventNamespace || 'p5UI__ButtonAjax';
|
|
|
- var $n = jQuery(n);
|
|
|
- var state = {
|
|
|
- baseCssClassNames: n.className,
|
|
|
- href: props.href
|
|
|
- };
|
|
|
- jQuery(document).trigger(eventNamespace+':click', [n, state]);
|
|
|
- if ($n.hasClass('disabled')) {// bootstrap already prevent this action
|
|
|
- if(dbg)console.log('WARNING: btn disabled - waiting for response - Cancel?');
|
|
|
- return false;
|
|
|
- }
|
|
|
- $n.removeClass('btn-primary').addClass('btn-default disabled btn-loading');
|
|
|
-
|
|
|
- var req = superagent
|
|
|
- .post(props.href)
|
|
|
- .type('json') // header ĺapplication/x-www-form-urlencoded' requires type('form');
|
|
|
- .send(props.data)
|
|
|
- .set('Accept', 'application/json')
|
|
|
- .end(function(err, res) {
|
|
|
- if(dbg)console.log('DBG: res:', res, 'res.body:', res.body);
|
|
|
- $n.removeClass('btn-default disabled btn-loading').addClass(state.baseCssClassNames);
|
|
|
- var payload;
|
|
|
- if (err || !res.ok || 'application/json' !== res.type) {
|
|
|
- payload = {type: 'warning', msg: res.body.msg || 'Request error', body: res.body};
|
|
|
- } else {
|
|
|
- payload = {type: res.body.type || 'success', msg: res.body.msg || '', body: res.body};
|
|
|
- }
|
|
|
- jQuery(document).trigger('DBG:notify', payload);
|
|
|
- jQuery(document).trigger(eventNamespace+':ajaxLoaded', [n, payload]);
|
|
|
- req = null;
|
|
|
- });
|
|
|
-
|
|
|
- // setTimeout(function() {
|
|
|
- // console.log('Test click p5UI__ButtonAjax - setTimeOut', $n, state);
|
|
|
- // jQuery(document).trigger('p5UI__ButtonAjax:ajaxLoaded', [n, state]);
|
|
|
- // $n.removeClass('btn-default disabled btn-loading').addClass(state.baseCssClassNames);
|
|
|
- // }, 1000);
|
|
|
- return false;
|
|
|
-}
|
|
|
-
|
|
|
-function p5UI__ajaxLinkClick(n, href, data) {
|
|
|
- if (!n || !href) return true;
|
|
|
-
|
|
|
- var dbg = <?php echo (DBG::isActive())? 1 : 0; ?>;
|
|
|
- var $n = jQuery(n);
|
|
|
- if ($n.hasClass('disabled')) {// bootstrap already prevent this action
|
|
|
- if(dbg)console.log('WARNING: btn disabled - waiting for response - Cancel?');
|
|
|
- return false;
|
|
|
- }
|
|
|
- $n.removeClass('btn-primary').addClass('disabled btn-loading');
|
|
|
-
|
|
|
- var req = superagent
|
|
|
- .post(href)
|
|
|
- .type('json') // header ĺapplication/x-www-form-urlencoded' requires type('form');
|
|
|
- .send(data)
|
|
|
- .set('Accept', 'application/json')
|
|
|
- .end(function(err, res) {
|
|
|
- if(dbg)console.log('DBG: res:', res, 'res.body:', res.body);
|
|
|
- $n.removeClass('disabled btn-loading').addClass(state.baseCssClassNames);
|
|
|
- var payload;
|
|
|
- if (err || !res.ok || 'application/json' !== res.type) {
|
|
|
- payload = {type: 'warning', msg: res.body.msg || 'Request error', body: res.body};
|
|
|
- } else {
|
|
|
- payload = {type: 'success', msg: res.body.msg || '', body: res.body};
|
|
|
- }
|
|
|
- if(dbg)console.log('DBG: before p5UI__notifyAjaxCallback:', payload);
|
|
|
- p5UI__notifyAjaxCallback(payload);
|
|
|
- if(dbg)console.log('DBG: before actions:', payload.body.actions);
|
|
|
- if (payload.body.actions) {
|
|
|
- for (i in payload.body.actions) {
|
|
|
- p5UI__execAction(payload.body.actions[i]);
|
|
|
- }
|
|
|
- }
|
|
|
- req = null;
|
|
|
- });
|
|
|
- return false;
|
|
|
-}
|
|
|
-
|
|
|
-function p5UI__execAction(action) {
|
|
|
- var dbg = <?php echo (DBG::isActive())? 1 : 0; ?>;
|
|
|
- if(dbg)console.log('DBG: action:', action);
|
|
|
- if ('jsFunction' in action) {
|
|
|
- if (action['jsFunction'] in window) {
|
|
|
- if(dbg)console.log('TODO: exec "window[\''+action['jsFunction']+'\']( '+action['args']+' )"');
|
|
|
- window[ action['jsFunction'] ]( action['args'] );
|
|
|
- }
|
|
|
- else {
|
|
|
- if(dbg)console.log('BUG: jsFunction not exists "'+action['jsFunction']+'"');
|
|
|
- }
|
|
|
- } else {
|
|
|
- if(dbg)console.log('TODO: action', action);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-function p5UI__notifyAjaxCallback(data) {
|
|
|
- var notify = {};
|
|
|
- notify.type = (data && data.type)? data.type : '';
|
|
|
- notify.msg = (data && data.msg)? data.msg : '';
|
|
|
- switch (notify.type) {
|
|
|
- case 'success':
|
|
|
- if (!notify.msg) notify.msg = 'OK';
|
|
|
- break;
|
|
|
- case 'info':
|
|
|
- if (!notify.msg) notify.msg = '';
|
|
|
- break;
|
|
|
- case 'error':
|
|
|
- if (!notify.msg) notify.msg = 'Wystąpiły błędy';
|
|
|
- break;
|
|
|
- case 'warning':
|
|
|
- notify.type = 'warn';
|
|
|
- if (!notify.msg) notify.msg = 'Wystąpiły błędy';
|
|
|
- break;
|
|
|
- default:
|
|
|
- notify.msg = 'Nieznany błąd';
|
|
|
- if (data && data.errorCode) notify.msg += ' ' + data.errorCode;
|
|
|
- notify.type = '';
|
|
|
- }
|
|
|
- jQuery.notify(notify.msg, notify.type);
|
|
|
-}
|
|
|
-
|
|
|
-function p5UI__clickedOutsideElement(element, event) {
|
|
|
- // offsetParent - first parentNode with position: (relative | absolute)
|
|
|
- var eventTarget = (event.target)? event.target : event.srcElement;
|
|
|
- while (eventTarget != null) {
|
|
|
- // console.log('Outside:', {'eventTarget': eventTarget, 'eventTarget.offsetParent': eventTarget.offsetParent, 'eventTarget.parentNode': eventTarget.parentNode});
|
|
|
- if (eventTarget === element) return false;
|
|
|
- eventTarget = eventTarget.offsetParent;
|
|
|
- }
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-function p5Utils__parseFloatOrZero(strToParse) {
|
|
|
- if (!strToParse) return 0
|
|
|
- if ("string" === typeof strToParse) {
|
|
|
- strToParse = strToParse.replace(/,/g, '.')
|
|
|
- strToParse = strToParse.replace(/ /g, '')
|
|
|
- }
|
|
|
- var floatVal = parseFloat(strToParse)
|
|
|
- return (!isNaN(floatVal))? floatVal : 0
|
|
|
-}
|
|
|
-
|
|
|
-function p5Utils__pricePrint(value, defaultValue) {
|
|
|
- return p5Utils__pricePrintFormat(value, defaultValue, '.', ',');
|
|
|
-}
|
|
|
-
|
|
|
-function p5Utils__pricePrintPL(value, defaultValue) {
|
|
|
- return p5Utils__pricePrintFormat(value, defaultValue, ',', ' ');
|
|
|
-}
|
|
|
-
|
|
|
-function p5Utils__pricePrintFormat(value, defaultValue, decPoint, thousands_sep) {
|
|
|
- if (undefined === defaultValue) defaultValue = '';
|
|
|
- if (!value && value !== 0 && value !== '0') return defaultValue;
|
|
|
- if ("number" === typeof value) {
|
|
|
- } else if ("string" === typeof value) {
|
|
|
- value = p5Utils__parseFloatOrZero(value);
|
|
|
- if (isNaN(value)) {
|
|
|
- return defaultValue;
|
|
|
- }
|
|
|
- } else {
|
|
|
- return defaultValue;
|
|
|
- }
|
|
|
- var valueParts = value.toFixed(2).split('.'),
|
|
|
- firstPart = valueParts[0],
|
|
|
- secondPart = valueParts[1],
|
|
|
- parts = [],
|
|
|
- minus = ''
|
|
|
- ;
|
|
|
- if ('-' === firstPart.substr(0, 1)) {
|
|
|
- minus = '-';
|
|
|
- firstPart = firstPart.substr(1);
|
|
|
- }
|
|
|
- var len = firstPart.length,
|
|
|
- str = firstPart,
|
|
|
- i = 0
|
|
|
- ;
|
|
|
- //console.log('pricePrint(value:'+value+'). valueParts', valueParts, 'len', len);
|
|
|
- //console.log('pricePrint(value:'+value+'). START parts', parts, 'len', len, 'str', str);
|
|
|
- while (len > 3) {
|
|
|
- parts.unshift(str.substr(-3));
|
|
|
- len -= 3;
|
|
|
- str = str.substr(0, len);
|
|
|
- //console.log('pricePrint(value:'+value+'). LOOP-'+i+' parts', parts, 'len', len, 'str', str);
|
|
|
- i++;
|
|
|
- }
|
|
|
- if (len > 0) {
|
|
|
- //console.log('pricePrint(value:'+value+'). PRE END parts', parts, 'len', len, 'str', str);
|
|
|
- parts.unshift(str);
|
|
|
- }
|
|
|
- //console.log('pricePrint(value:'+value+'). END parts', parts, 'len', len, 'str', str);
|
|
|
- return '' + minus + parts.join(thousands_sep) + decPoint + secondPart;
|
|
|
-}
|
|
|
-
|
|
|
-function p5Utils__clearNode(node) {
|
|
|
- if (!node || !node.lastChild) return;
|
|
|
- var lastNode;
|
|
|
- while (lastNode = node.lastChild) node.removeChild(lastNode);
|
|
|
-}
|
|
|
-
|
|
|
-function p5Utils__nodeStyle(node, style) {
|
|
|
- if (!node || !style) return;
|
|
|
- for (i in style) node.style[i] = style[i];
|
|
|
-}
|
|
|
- </script>
|
|
|
- <script>
|
|
|
-function initDateTimePicker(node) {
|
|
|
- node.find('.se_type-date').parent().datetimepicker({
|
|
|
- format: "YYYY-MM-DD"
|
|
|
- , locale: 'pl'
|
|
|
- , showTodayButton: true
|
|
|
- });
|
|
|
- node.find('.se_type-datetime').parent().datetimepicker({
|
|
|
- format: 'YYYY-MM-DD HH:mm'
|
|
|
- , locale: 'pl'
|
|
|
- });
|
|
|
- node.find('.se_type-time').parent().datetimepicker({
|
|
|
- format: 'HH:mm:ss'
|
|
|
- , locale: 'pl'
|
|
|
- });
|
|
|
-}
|
|
|
-jQuery(document).ready(function(){
|
|
|
- initDateTimePicker(jQuery(document));
|
|
|
-});
|
|
|
-
|
|
|
-function ClearAllFind() {
|
|
|
- var ElementsObj=document.forms["FILTER_SEARCH"] ;
|
|
|
- var ElementsArr=ElementsObj.elements ;
|
|
|
-
|
|
|
- for (var myprop in ElementsArr){
|
|
|
-
|
|
|
- if(ElementsArr[myprop]) {
|
|
|
- if((ElementsArr[myprop].type=="text")||(ElementsArr[myprop].type=="select-one")){
|
|
|
- var MyEval="var My"+ElementsArr[myprop].name+"=document.getElementById('"+ElementsArr[myprop].name+"\');";
|
|
|
- eval(MyEval);
|
|
|
- var MyEval="My"+ElementsArr[myprop].name+".value=\"%\"";
|
|
|
- eval(MyEval);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-function resetForm(n) {
|
|
|
- for (i = 0; i < n.form.elements.length; i++) {
|
|
|
- switch (n.form.elements[i].type.toLowerCase()){
|
|
|
- case 'text':
|
|
|
- n.form.elements[i].value='%';
|
|
|
- break;
|
|
|
- case 'select-one':
|
|
|
-// n.form.elements[i].options[0].selected = true;
|
|
|
-// break;
|
|
|
- case 'select-multiple':
|
|
|
- for (z = 0; z < n.form.elements[i].options.length; z++) {
|
|
|
- n.form.elements[i].options[z].selected = false;
|
|
|
- if (n.form.elements[i].options[z].hasAttribute('selected')) {
|
|
|
- n.form.elements[i].options[z].removeAttribute('selected');
|
|
|
- }
|
|
|
- }
|
|
|
- // select first element
|
|
|
- n.form.elements[i].options[0].selected = true;
|
|
|
- n.form.elements[i].options[0].setAttribute('selected', 'selected');
|
|
|
- break;
|
|
|
- default:
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
-}
|
|
|
- </script>
|
|
|
-
|
|
|
- <?php UI::hButtonAjaxJsFunction(); ?>
|
|
|
-
|
|
|
- <style type="text/css">
|
|
|
-.hidden-dbg { display:none; color:silver; }
|
|
|
-.show-hidden-dbg .hidden-dbg { display:inline; }
|
|
|
- </style>
|
|
|
+<?php
|
|
|
+ UI::inlineCSS(APP_PATH_WWW . '/static/p5UI/typespecial-fix.css');
|
|
|
+ UI::inlineJS(APP_PATH_WWW . '/static/p5UI/utils.js');
|
|
|
+ UI::inlineJS(APP_PATH_WWW . '/static/p5UI/clickedOutsideElement.js');
|
|
|
+ UI::inlineCSS(APP_PATH_WWW . '/static/p5UI/dropdown.css');
|
|
|
+ UI::inlineJS(APP_PATH_WWW . '/static/p5UI/dropdown.js');
|
|
|
+ UI::inlineJS(APP_PATH_WWW . '/static/p5UI/clickable.js'); // , [ 'DBG' => DBG::isActive() ]);
|
|
|
+ UI::inlineJS(APP_PATH_WWW . '/static/p5UI/ajax.js');
|
|
|
+ UI::inlineJS(APP_PATH_WWW . '/static/p5UI/legacy.js');
|
|
|
+ UI::hButtonAjaxJsFunction();
|
|
|
+?>
|
|
|
<?php if (User::hasAccess('dbg')) : ?>
|
|
|
<script>
|
|
|
jQuery(document).bind('keydown', 'alt+shift+`', function(){
|
|
|
@@ -533,5 +63,4 @@ jQuery(document).bind('keyup', 'alt+shift+`', function(){
|
|
|
});
|
|
|
</script>
|
|
|
<?php endif; ?>
|
|
|
-
|
|
|
</head><body>
|