|
|
@@ -56,32 +56,25 @@ class Route_UrlAction_ProcesEditor extends RouteBase {// TODO: UrlActionBase @se
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function getSingleResAjaxReponseCallback(){
|
|
|
+ if (!isset($_POST['data'])) throw new Exception("data is not set.");
|
|
|
+ $data = $_POST['data'];
|
|
|
+ $sqlWhereIdIn = array();
|
|
|
+ foreach ($data as $value) {
|
|
|
+ $sqlWhereIdIn[] = DB::getPDO()->quote($value, PDO::PARAM_INT);
|
|
|
+ }
|
|
|
+ $sqlWhereIdIn = (!empty($sqlWhereIdIn)) ? "g.ID in(" . implode(", ", $sqlWhereIdIn) . ")" : "1=1";
|
|
|
+ $rows = DB::getPDO()->fetchAll("
|
|
|
+ select g.*, p1.ID as p1_ID, p1.DESC as p1_DESC,p2.ID as p2_ID, p2.DESC as p2_DESC, p3.ID as p3_ID, p3.DESC as p3_DESC
|
|
|
+ from CRM_LISTA_ZASOBOW g
|
|
|
+ left join CRM_LISTA_ZASOBOW p1 on(p1.ID = g.PARENT_ID)
|
|
|
+ left join CRM_LISTA_ZASOBOW p2 on(p2.ID = p1.PARENT_ID)
|
|
|
+ left join CRM_LISTA_ZASOBOW p3 on(p3.ID = p2.PARENT_ID)
|
|
|
+ where {$sqlWhereIdIn}");
|
|
|
+ return $rows;
|
|
|
+ }
|
|
|
public function getSingleResAjaxAction(){
|
|
|
-
|
|
|
- try {
|
|
|
- if (!isset($_POST['data'])) throw new Exception("data is not set.");
|
|
|
- $data = $_POST['data'];
|
|
|
- $sqlWhereIdIn = array();
|
|
|
- foreach ($data as $value) {
|
|
|
- $sqlWhereIdIn[] = DB::getPDO()->quote($value, PDO::PARAM_INT);
|
|
|
- }
|
|
|
- $sqlWhereIdIn = (!empty($sqlWhereIdIn)) ? "g.ID in(" . implode(", ", $sqlWhereIdIn) . ")" : "1=1";
|
|
|
- $rows = DB::getPDO()->fetchAll("
|
|
|
- select g.*, p1.ID as p1_ID, p1.DESC as p1_DESC,p2.ID as p2_ID, p2.DESC as p2_DESC, p3.ID as p3_ID, p3.DESC as p3_DESC
|
|
|
- from CRM_LISTA_ZASOBOW g
|
|
|
- left join CRM_LISTA_ZASOBOW p1 on(p1.ID = g.PARENT_ID)
|
|
|
- left join CRM_LISTA_ZASOBOW p2 on(p2.ID = p1.PARENT_ID)
|
|
|
- left join CRM_LISTA_ZASOBOW p3 on(p3.ID = p2.PARENT_ID)
|
|
|
- where {$sqlWhereIdIn}");
|
|
|
- Response::sendJsonExit($rows);
|
|
|
-
|
|
|
- } catch (Exception $e) {
|
|
|
- UI::alert('danger', "Error: " . $e->getMessage());
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ Response::sendTryCatchJson(array($this, 'getSingleResAjaxReponseCallback'));
|
|
|
}
|
|
|
|
|
|
public function handleAuth() {
|
|
|
@@ -110,25 +103,23 @@ class Route_UrlAction_ProcesEditor extends RouteBase {// TODO: UrlActionBase @se
|
|
|
public function showEditor($id) {
|
|
|
echo '<link rel="stylesheet" type="text/css" href="static/sweetalert2.min.css">';
|
|
|
$this->showEditorCss();
|
|
|
-
|
|
|
- echo "<div id=wrapper class=toggled>";
|
|
|
- echo "<div id='sidebar-wrapper'><div id=side>";
|
|
|
-
|
|
|
- echo "";
|
|
|
- echo "</div></div>";
|
|
|
- echo "<div id='page-content-wrapper'><div class=col-xs-1 id=left style='width:40px;'>";
|
|
|
- echo "<button class='lButton btn btn-default' id=btnZasoby style=top:150px; ><p>Zasoby</p></button><button class='lButton btn btn-default' style=top:315px; id=btnProcesy><p>Procesy</p></button>";
|
|
|
- echo "</div><div class=col-xs-11 id=main>";
|
|
|
-
|
|
|
- echo '<center>Uruchamianie aplikacji.</center>';
|
|
|
-
|
|
|
- echo "</div></div>";
|
|
|
-
|
|
|
- echo "<div class=clearfix></div>";
|
|
|
- echo "</div>";
|
|
|
- echo "<script>var BASE_URL = '".Request::getPathUri()."';var mainProces_id = ".$id.";</script>";
|
|
|
- echo '<script src="static/sweetalert2.min.js"></script>';
|
|
|
- echo '<script src="static/procesEditor.js?'.time().'"></script>';
|
|
|
+?>
|
|
|
+ <div id="wrapper" class="toggled" style="overflow:hidden">
|
|
|
+ <div id='sidebar-wrapper'><div id="side"></div></div>
|
|
|
+ <div id='page-content-wrapper'>
|
|
|
+ <div id="left" style='width:40px;'>
|
|
|
+ <button class='lButton btn btn-default' id="btnZasoby" style="top:150px"><p>Zasoby</p></button>
|
|
|
+ <button class='lButton btn btn-default' style="top:315px" id="btnProcesy"><p>Procesy</p></button>
|
|
|
+ </div>
|
|
|
+ <div id="main" style="margin-left:40px">
|
|
|
+ <center>Uruchamianie aplikacji.</center>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <script>var BASE_URL = '<?= Request::getPathUri(); ?>';var mainProces_id = <?= $id; ?>;</script>
|
|
|
+ <script src="static/sweetalert2.min.js"></script>
|
|
|
+ <script src="static/procesEditor.js?'.time().'"></script>
|
|
|
+<?php
|
|
|
}
|
|
|
|
|
|
public function showEditorCss() {
|
|
|
@@ -190,11 +181,6 @@ class Route_UrlAction_ProcesEditor extends RouteBase {// TODO: UrlActionBase @se
|
|
|
margin-left: 5px;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
-.options {
|
|
|
- min-width: 120px;
|
|
|
- width: auto !important;
|
|
|
- width: 120px;
|
|
|
-}
|
|
|
#wrapper {
|
|
|
padding-left: 0;
|
|
|
-webkit-transition: all 0.5s ease;
|
|
|
@@ -471,6 +457,7 @@ width:290px;
|
|
|
color: grey;
|
|
|
cursor: pointer;
|
|
|
display:block;
|
|
|
+ font-size:10px;
|
|
|
}
|
|
|
|
|
|
.sDescAdd:hover{
|