Selaa lähdekoodia

fixed procesy5 missing Menu - fiexed layout gora - used UI

Piotr Labudda 7 vuotta sitten
vanhempi
commit
ce7eb049db
6 muutettua tiedostoa jossa 74 lisäystä ja 113 poistoa
  1. 31 80
      SE/procesy5.php
  2. 0 1
      SE/se-lib/TableAjax.php
  3. 8 5
      SE/se-lib/UI.php
  4. 3 1
      SE/se-lib/tmpl/_layout_gora.php
  5. 0 1
      SE/static/p5UI/main.css
  6. 32 25
      SE/stuff/main.css

+ 31 - 80
SE/procesy5.php

@@ -48,7 +48,6 @@ require_once APP_PATH_ROOT . DS . 'procesy' . DS . 'ext_ids.php';
 require_once APP_PATH_ROOT . DS . 'procesy' . DS . 'search.php';// CRM_SEARCH
 require_once APP_PATH_ROOT . DS . 'procesy' . DS . 'search.php';// CRM_SEARCH
 // TODO: if (App::is_ajax_request())
 // TODO: if (App::is_ajax_request())
 require_once APP_PATH_ROOT . DS . 'procesy' . DS . 'ajax.php';
 require_once APP_PATH_ROOT . DS . 'procesy' . DS . 'ajax.php';
-require_once APP_PATH_ROOT . DS . 'se-lib' . DS . 'SE_Layout.php';// CRM_SEARCH
 
 
 
 
 //   ==========  SESSION set default session values  ==============
 //   ==========  SESSION set default session values  ==============
@@ -155,39 +154,31 @@ function User_procesy5_check_access() {
 
 
 function lay_procesy_gora() {
 function lay_procesy_gora() {
 
 
-	$title = SE_Layout::getTitle().' procesy';
+	$title = UI::getTitle().' procesy';
 	if (($id_proces = V::get('id_proces', 0, $_GET, 'int')) > 0) {
 	if (($id_proces = V::get('id_proces', 0, $_GET, 'int')) > 0) {
 		$title = "Proces {{$id_proces}}";
 		$title = "Proces {{$id_proces}}";
 	}
 	}
-?><!DOCTYPE html>
-<html>
-<head>
-	<meta charset="utf-8" />
-	<title><?php echo $title; ?></title>
-	<link rel="shortcut icon" type="image/x-icon" href="./favicon.png?v=0.1">
-	<meta name="author" content="Piotr Labudda <piotrl86@gmail.com>" />
-	<link rel="stylesheet" href="stuff/bootstrap/css/bootstrap.min.css" type="text/css" />
-	<link rel="stylesheet" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.4.custom.min.css" type="text/css">
-	<link rel="stylesheet" href="stuff/main.css" type="text/css" />
-	<style type="text/css">
-body { <?php echo UI::fixFooterPosition('body_style'); ?> }
-	</style>
-	<style type="text/css">
-.popover-with-html .popover-heading {display:none;}
-.popover-with-html .popover-body {display:none;}
-	</style>
-	<script src="stuff/jquery-2.1.0.min.js"></script>
-	<script src="stuff/jquery-plugins.js"></script>
-	<script src="stuff/bootstrap/js/bootstrap.min.js"></script>
-	<script src="stuff/jquery-ui-1.10.4.custom.min.js"></script>
-	<script>
+
+	ob_start();
+	App::show_head_css();
+	App::show_head_js();
+	$app_css_js = ob_get_clean();
+
+	UI::gora([
+		'title' => $title,
+		'childrens' => implode("\n", [
+			UI::h('style', [ 'type' => "text/css" ], 	"
+				.popover-with-html .popover-heading {display:none;}
+				.popover-with-html .popover-body {display:none;}
+			"),
+			'<script>
 jQuery(document).ready(function(){
 jQuery(document).ready(function(){
 	jQuery(".popover-with-html").popover({
 	jQuery(".popover-with-html").popover({
 		html: true,
 		html: true,
-		trigger: 'hover',
+		trigger: "hover",
 		animation: false,
 		animation: false,
-		container: 'body',
-		placement: 'top',
+		container: "body",
+		placement: "top",
 		content: function() {
 		content: function() {
 			return jQuery(this).children(".popover-body").html();
 			return jQuery(this).children(".popover-body").html();
 		},
 		},
@@ -196,56 +187,19 @@ jQuery(document).ready(function(){
 		}
 		}
 	});
 	});
 });
 });
-	</script>
-	<link rel="stylesheet" href="stuff/jquery.selectize/css/selectize.bootstrap3.css" type="text/css" />
-	<script src="stuff/jquery.selectize/js/standalone/selectize.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;
+			</script>',
+			$app_css_js,
+			lay_procesy_css(),
+		]),
+	]);
+	echo "\n";
 }
 }
-	</style>
-	<?php
-		lay_procesy_css();
-		App::show_head_css();
-		App::show_head_js();
-		S::timeout_update_js();
-	echo'</head>'."\n";
-	echo'<body>'."\n";
+if ('YES' != V::get('HEADER_NOT_INIT', '', $_REQUEST)) {
+	lay_procesy_gora();
 }
 }
-if ('YES' != V::get('HEADER_NOT_INIT', '', $_REQUEST))
-lay_procesy_gora();
 
 
 function ECHOO($VAR) {
 function ECHOO($VAR) {
-echo "$VAR";
+	echo "$VAR";
 }
 }
 
 
 
 
@@ -1585,7 +1539,7 @@ function lay_procesy_dol() {
 	if (1 == V::get('HIDE_PANEL', 0, $_REQUEST, 'int')) {
 	if (1 == V::get('HIDE_PANEL', 0, $_REQUEST, 'int')) {
 		return;
 		return;
 	}
 	}
-	SE_Layout::dol();
+	UI::dol();
 }
 }
 
 
 
 
@@ -1598,8 +1552,7 @@ function lay_procesy_user_panel() {
 		return;
 		return;
 	}
 	}
 
 
-	Lib::loadClass('SE_Layout');
-	SE_Layout::menu();
+	UI::menu();
 	return;
 	return;
 
 
 	echo "\n".'<div id="GORA">'."\n";
 	echo "\n".'<div id="GORA">'."\n";
@@ -1668,8 +1621,7 @@ foreach ($menu as $k_task => $v_menu) {
 
 
 
 
 function lay_procesy_css() {
 function lay_procesy_css() {
-	echo'<style type="text/css">';
-echo"
+	return '<style type="text/css">' . "\n" . "
 body { margin:0; font-size:small; }
 body { margin:0; font-size:small; }
 #body_content { padding:10px; }
 #body_content { padding:10px; }
 #body_content h1{ margin:13px 0;color:#000; }
 #body_content h1{ margin:13px 0;color:#000; }
@@ -1801,8 +1753,7 @@ a.btn-sm {font-size:x-small;}
 .user-menu-tree {color:#666;font-weight:normal;}
 .user-menu-tree {color:#666;font-weight:normal;}
 .user-menu-PROCES_INIT {color:#f00;font-weight:bold;}
 .user-menu-PROCES_INIT {color:#f00;font-weight:bold;}
 
 
-";
-	echo'</style>' . "\n";
+" . '</style>' . "\n";
 }
 }
 
 
 
 

+ 0 - 1
SE/se-lib/TableAjax.php

@@ -255,7 +255,6 @@ class TableAjax extends ViewAjax {
 
 
 		if ($tblAjaxMap) $tblAjaxMap->printCSS();
 		if ($tblAjaxMap) $tblAjaxMap->printCSS();
 		if ($tblAjaxMap) $tblAjaxMap->printJS();
 		if ($tblAjaxMap) $tblAjaxMap->printJS();
-		echo UI::h('script', ['src'=>"stuff/jquery-ui-1.10.4.custom.min.js"]);
 		echo UI::h('script', ['src'=>"static/sweetalert2.min.js"]);
 		echo UI::h('script', ['src'=>"static/sweetalert2.min.js"]);
 		echo UI::h('script', ['src'=>"static/jquery.doubleScroll.js"]);
 		echo UI::h('script', ['src'=>"static/jquery.doubleScroll.js"]);
 		echo UI::h('link', ['rel'=>"stylesheet", 'type'=>"text/css", 'href'=>"stuff/jquery-ui-smoothness/jquery-ui-1.10.4.custom.min.css"]);
 		echo UI::h('link', ['rel'=>"stylesheet", 'type'=>"text/css", 'href'=>"stuff/jquery-ui-smoothness/jquery-ui-1.10.4.custom.min.css"]);

+ 8 - 5
SE/se-lib/UI.php

@@ -17,13 +17,13 @@ class UI {
 		return $title;
 		return $title;
 	}
 	}
 
 
-	public static function gora() {
-		UI::startHtml();
+	public static function gora($params = []) {
+		UI::startHtml($params);
 	}
 	}
 
 
-	public static function startHtml() {
+	public static function startHtml($params = []) { // @params: { title: string, childrens: string }
 		Lib::loadClass('S');
 		Lib::loadClass('S');
-		UI::loadTemplate('_layout_gora');
+		UI::loadTemplate('_layout_gora', $params);
 	}
 	}
 
 
 	public static function dol() {
 	public static function dol() {
@@ -36,6 +36,7 @@ class UI {
 		switch ($type) {
 		switch ($type) {
 			case 'footer_style': return 'position:absolute; bottom:0; left:0; width:100%; ';
 			case 'footer_style': return 'position:absolute; bottom:0; left:0; width:100%; ';
 			case 'body_style': return 'position:relative; padding-bottom:32px;';
 			case 'body_style': return 'position:relative; padding-bottom:32px;';
+			case 'body_css_style': return 'body { position:relative; padding-bottom:32px }';
 			case 'footer_js_tag': return "\n<script>document.body.style.minHeight = '' + (window.innerHeight - 2) + 'px';</script>";
 			case 'footer_js_tag': return "\n<script>document.body.style.minHeight = '' + (window.innerHeight - 2) + 'px';</script>";
 		}
 		}
 	}
 	}
@@ -278,7 +279,6 @@ class UI {
 		echo "})(window)" . "\n";
 		echo "})(window)" . "\n";
 		UI::endTag('script', "\n");
 		UI::endTag('script', "\n");
 	}
 	}
-
 	public static function inlineRawJS($jsFile) {
 	public static function inlineRawJS($jsFile) {
 		if (!file_exists($jsFile)) throw new Exception("js file '" . basename($jsFile) . "' not exists!");
 		if (!file_exists($jsFile)) throw new Exception("js file '" . basename($jsFile) . "' not exists!");
 		UI::startTag('script', [], "\n");
 		UI::startTag('script', [], "\n");
@@ -291,6 +291,9 @@ class UI {
 		echo file_get_contents($cssFile);
 		echo file_get_contents($cssFile);
 		UI::endTag('style', "\n");
 		UI::endTag('style', "\n");
 	}
 	}
+	public static function inlineRawCSS($cssContent) {
+		echo UI::h('style', [ 'type' => "text/css" ], $cssContent) . "\n";
+	}
 
 
 	public static function includeView($viewPath, $data = array()) {
 	public static function includeView($viewPath, $data = array()) {
 		if (!file_exists($viewPath)) throw new Exception("view file '" . basename($viewPath) . "' not exists!");
 		if (!file_exists($viewPath)) throw new Exception("view file '" . basename($viewPath) . "' not exists!");

+ 3 - 1
SE/se-lib/tmpl/_layout_gora.php

@@ -2,7 +2,7 @@
 <html>
 <html>
 <head>
 <head>
 	<meta charset="utf-8" />
 	<meta charset="utf-8" />
-	<title><?php echo self::getTitle(); ?></title>
+	<title><?php echo (!empty($title)) ? $title : self::getTitle(); ?></title>
 	<link rel="shortcut icon" type="image/x-icon" href="./favicon.png?v=0.1">
 	<link rel="shortcut icon" type="image/x-icon" href="./favicon.png?v=0.1">
 	<meta name="author" content="Piotr Labudda <piotrl86@gmail.com>" />
 	<meta name="author" content="Piotr Labudda <piotrl86@gmail.com>" />
 	<link rel="stylesheet" href="stuff/bootstrap/css/bootstrap.min.css" type="text/css" />
 	<link rel="stylesheet" href="stuff/bootstrap/css/bootstrap.min.css" type="text/css" />
@@ -11,6 +11,7 @@
 	<link rel="stylesheet" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.4.custom.min.css" type="text/css">
 	<link rel="stylesheet" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.4.custom.min.css" type="text/css">
 <?php
 <?php
 	UI::inlineCSS(APP_PATH_WWW . '/static/p5UI/main.css');
 	UI::inlineCSS(APP_PATH_WWW . '/static/p5UI/main.css');
+	UI::inlineRawCSS(UI::fixFooterPosition('body_css_style'));
 	UI::inlineRawJS(APP_PATH_WWW . '/static/object-assign-polyfill.js');
 	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/fetch-polyfill.min.js');
 	UI::inlineRawJS(APP_PATH_WWW . '/static/promise-polyfill.min.js');
 	UI::inlineRawJS(APP_PATH_WWW . '/static/promise-polyfill.min.js');
@@ -60,4 +61,5 @@
 	]);
 	]);
 ?>
 ?>
 	<?php Theme::head(); ?>
 	<?php Theme::head(); ?>
+	<?= (!empty($childrens)) ? $childrens : ''; ?>
 </head><body style="position:relative; padding-bottom:30px">
 </head><body style="position:relative; padding-bottom:30px">

+ 0 - 1
SE/static/p5UI/main.css

@@ -1,5 +1,4 @@
 body { margin:0; font-size:12px; line-height:18px; }
 body { margin:0; font-size:12px; line-height:18px; }
-body { <?php echo UI::fixFooterPosition('body_style'); ?> }
 
 
 #SE-menu { font-size:13px }
 #SE-menu { font-size:13px }
 #SE-menu { min-height:36px }
 #SE-menu { min-height:36px }

+ 32 - 25
SE/stuff/main.css

@@ -1,35 +1,38 @@
 body { margin:0; font-size:12px; line-height:18px; }
 body { margin:0; font-size:12px; line-height:18px; }
 
 
-#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;}
+#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.tbl-row-0,
-.tbl-view tbody tr.row-0 {background:#f3f3f3;}
+.tbl-view tbody tr.row-0 { background:#f3f3f3 }
 .tbl-view tbody tr.tbl-row-1,
 .tbl-view tbody tr.tbl-row-1,
-.tbl-view tbody tr.row-1 {background:#fff;}
-.tbl-view input[type=text] {margin:0;padding:0;}
+.tbl-view tbody tr.row-1 { background:#fff }
+.tbl-view input[type=text] { margin:0; padding:0 }
 
 
 .se-main-menu {}
 .se-main-menu {}
-.se-main-menu td:hover {background-color:#f3f3f3;}
+.se-main-menu td:hover { background-color:#f3f3f3 }
+
+.red { color:#f00 }
+.green { color:#0f0 }
+.blue { color:#00f }
 
 
-.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;}
 .dropdown-menu a em {font-size:0.9em; color:#bbb;}
 
 
@@ -40,3 +43,7 @@ body { margin:0; font-size:12px; line-height:18px; }
 .label-A_STATUS-DELETED  { background:#e0e0e0; color:#808080; 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_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; }
 .label-A_STATUS-OFF_HARD { background:#eee;    color:#808080; text-align:center; text-shadow:none; }
+
+caption { font-size:medium }
+
+.input-xs { height:22px; font-size:12px; line-height:1.2em; padding:3px 8px; }