ProcesEditor.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. <?php
  2. Lib::loadClass('RouteBase');
  3. Lib::loadClass('ProcesHelper');
  4. Lib::loadClass('Config');
  5. Lib::loadClass('UI');
  6. Lib::loadClass('Request');
  7. class Route_UrlAction_ProcesEditor extends RouteBase {// TODO: UrlActionBase @see Route_UrlAction
  8. public function handleAuth() {
  9. if (!User::logged()) {
  10. //throw new HttpException('Unauthorized', 401);
  11. User::authByRequest();
  12. }
  13. // zapisać jsona w sesji
  14. }
  15. public function defaultAction() {
  16. UI::gora();
  17. UI::menu();
  18. try {
  19. $id = V::get('id', 0, $_REQUEST, 'int');
  20. if ($id <= 0) throw new Exception("Wrong ID");
  21. $this->showEditor($id);
  22. } catch (Exception $e) {
  23. UI::alert('danger', "Error: " . $e->getMessage());
  24. }
  25. UI::dol();
  26. }
  27. public function showEditor($id) {
  28. echo '<link rel="stylesheet" type="text/css" href="static/sweetalert2.min.css">';
  29. $this->showEditorCss();
  30. echo "<div id=wrapper class=toggled>";
  31. echo "<div id='sidebar-wrapper'><div id=side>";
  32. echo "";
  33. echo "</div></div>";
  34. echo "<div id='page-content-wrapper'><div class=col-xs-1 id=left style='width:40px;'>";
  35. echo "<button class='lButton btn btn-default' id=btnZasoby><p>Zasoby</p></button><button class='lButton btn btn-default' style=top:315px; id=btnProcesy><p>Procesy</p></button>";
  36. echo "</div><div class=col-xs-11 id=main>";
  37. echo '<center>Uruchamianie aplikacji.</center>';
  38. echo "</div></div>";
  39. echo "<div class=clearfix></div>";
  40. echo "</div>";
  41. echo "<script>var BASE_URL = '".Request::getPathUri()."';var mainProces_id = ".$id.";</script>";
  42. echo '<script src="static/sweetalert2.min.js"></script>';
  43. echo '<script src="static/procesEditor.js?'.time().'"></script>';
  44. }
  45. public function showEditorCss() {
  46. ?>
  47. <style type="text/css">
  48. .activeDrop{
  49. background-color:#f1f1f1;
  50. }
  51. #left{
  52. padding:0px;
  53. }
  54. .sDescAdd, .hDescAdd, .step{
  55. padding-left:10px;
  56. }
  57. .lButton{
  58. position:fixed;
  59. top:150px;
  60. padding:0px;
  61. outline:none;
  62. margin:0px;
  63. width: 40px;
  64. height:160px;
  65. z-index:30;
  66. border-top-left-radius: 0px;
  67. border-bottom-left-radius: 0px;
  68. }
  69. .lButton p
  70. {
  71. margin-bottom:-50px;
  72. -moz-transform:rotate(-90deg);
  73. -ms-transform:rotate(-90deg);
  74. -o-transform:rotate(-90deg);
  75. -webkit-transform:rotate(-90deg);
  76. }
  77. .ico {
  78. float: right;
  79. margin-top: 10px;
  80. margin-left: 5px;
  81. cursor: pointer;
  82. }
  83. .options {
  84. min-width: 120px;
  85. width: auto !important;
  86. width: 120px;
  87. }
  88. #wrapper {
  89. padding-left: 0;
  90. -webkit-transition: all 0.5s ease;
  91. -moz-transition: all 0.5s ease;
  92. -o-transition: all 0.5s ease;
  93. transition: all 0.5s ease;
  94. }
  95. #wrapper.toggled {
  96. padding-left: 300px;
  97. }
  98. #side {
  99. padding: 15px;
  100. height: 100%;
  101. border-top-style:solid;
  102. border-top-width:1px;
  103. border-right-style: solid;
  104. border-color: #A61C2E;
  105. border-width: 2px;
  106. }
  107. ul {
  108. list-style: none;
  109. }
  110. #advCon{
  111. width:870px;
  112. min-width:100%;
  113. }
  114. .detailsTable{
  115. color:grey;
  116. float:left;
  117. display:inline;
  118. text-align:center;
  119. margin-left:5px;
  120. height:23px;
  121. }
  122. .detailsTable2{
  123. color:grey;
  124. display:block;
  125. font-size:0.8em;
  126. text-align:left;
  127. margin-left:5px;
  128. height:23px;
  129. }
  130. .textTable{
  131. float:left;
  132. width:200px;
  133. text-overflow:ellipsis;
  134. white-space:nowrap;
  135. overflow:hidden;
  136. cursor:pointer;
  137. display:inline-block;
  138. }
  139. .anim-refresh {
  140. -animation: spin .7s infinite linear;
  141. -webkit-animation: spin2 .7s infinite linear;
  142. }
  143. @-webkit-keyframes spin2 {
  144. from { -webkit-transform: rotate(0deg);}
  145. to { -webkit-transform: rotate(360deg);}
  146. }
  147. @keyframes spin {
  148. from { transform: scale(1) rotate(0deg);}
  149. to { transform: scale(1) rotate(360deg);}
  150. }
  151. .list-group-item{
  152. cursor:pointer;
  153. }
  154. .list-group-item:hover{
  155. background-color:#eeeeee;
  156. }
  157. .list-group-item:hover .glyphicon{
  158. opacity:1 !important;
  159. }
  160. .textTable2{
  161. float:left;
  162. width:230px;
  163. text-overflow:ellipsis;
  164. white-space:nowrap;
  165. overflow:hidden;
  166. cursor:pointer;
  167. display:inline-block;
  168. }
  169. .pbody{
  170. padding-left:20px;
  171. padding-right:20px;
  172. text-align:justify;
  173. }
  174. .singleAdv{
  175. float:left;
  176. height:100%;
  177. width:290px;
  178. }
  179. #side #adv{
  180. }
  181. #side #ulcon, #side #ulproc, #side #adv {
  182. background-color: white;
  183. overflow-y: scroll;
  184. height: 70% !important;
  185. border-style:solid;
  186. border-width:1px;
  187. border-color:grey;
  188. margin-top: 10px;
  189. border-radius: 5px;
  190. padding-bottom: 10px;
  191. border-style: solid;
  192. border-width: 1px;
  193. border-color: #e5e5e5;
  194. color: black;
  195. padding-left: 0px;
  196. font-family: tahoma;
  197. font-size: 13px;
  198. }
  199. .selectedAdv{
  200. background-color:#e4e4e4;
  201. }
  202. .selectedAdv:hover{
  203. background-color:#e4e4e4;
  204. }
  205. #side .dragStyle {
  206. padding-left: 8px;
  207. padding-top: 4px;
  208. padding-bottom: 4px;
  209. border-bottom-style: dotted;
  210. border-width: 1px;
  211. cursor: pointer;
  212. border-color: #e5e5e5;
  213. background-color: white;
  214. display: block;
  215. }
  216. #side .showMore {
  217. padding-left: 2px;
  218. padding-top: 4px;
  219. padding-bottom: 4px;
  220. border-width: 1px;
  221. border-color: #e5e5e5;
  222. }
  223. #side .gIco {
  224. padding-left: 2px;
  225. padding-top: 4px;
  226. padding-bottom: 4px;
  227. border-width: 1px;
  228. border-color: #e5e5e5;
  229. cursor: pointer;
  230. }
  231. #side .hov,
  232. #side .grad {
  233. cursor: pointer;
  234. }
  235. #side .click {
  236. float: left;
  237. color: grey;
  238. font-size: 10px;
  239. cursor: pointer;
  240. }
  241. .delRes,
  242. .btnEdit,
  243. .hdesc,
  244. .sdesc {
  245. cursor: pointer;
  246. }
  247. .goto{
  248. padding-left:10px;
  249. }
  250. #side .tabelaName {
  251. white-space: nowrap;
  252. margin-right: 10px;
  253. overflow: hidden;
  254. width: 350px;
  255. float: left;
  256. text-overflow: ellipsis;
  257. display: block;
  258. cursor: pointer;
  259. }
  260. #side .hov:hover {
  261. background-color: #e5e5e5;
  262. }
  263. #sidebar-wrapper {
  264. position: fixed;
  265. left: 300px;
  266. width: 0;
  267. height: 100%;
  268. color: white;
  269. margin-left: -300px;
  270. overflow-y: auto;
  271. background: #222;
  272. -webkit-transition: all 0.5s ease;
  273. -moz-transition: all 0.5s ease;
  274. -o-transition: all 0.5s ease;
  275. transition: all 0.5s ease;
  276. }
  277. #wrapper.toggled #sidebar-wrapper {
  278. width: 300px;
  279. }
  280. #page-content-wrapper {
  281. width: 100%;
  282. position: absolute;
  283. z-index:0 !important;
  284. padding-top: 15px;
  285. padding-left:0px !important;
  286. }
  287. #wrapper.toggled #page-content-wrapper {
  288. position: absolute;
  289. margin-right: -300px;
  290. }
  291. #wrapper {
  292. padding-left: 300px;
  293. }
  294. #wrapper.toggled {
  295. padding-left: 0 !important;
  296. }
  297. #sidebar-wrapper {
  298. width: 300px;
  299. }
  300. #wrapper.toggled #sidebar-wrapper {
  301. width: 0 !important;
  302. }
  303. #page-content-wrapper {
  304. padding: 20px;
  305. position: relative;
  306. }
  307. #wrapper.toggled #page-content-wrapper {
  308. position: relative;
  309. margin-right: 0;
  310. }
  311. .drop {
  312. margin-top: 10px;
  313. }
  314. .sdesc{
  315. margin-bottom:10px;
  316. }
  317. .hdesc textarea,
  318. .sdesc textarea {
  319. min-width: 100%;
  320. padding: 10px;
  321. }
  322. .step,
  323. .sDescAdd {
  324. margin-top:5px;
  325. color: grey;
  326. cursor: pointer;
  327. display:block;
  328. }
  329. .sDescAdd:hover{
  330. color:black;
  331. }
  332. .goto{
  333. }
  334. .editGoto{
  335. cursor:pointer;
  336. }
  337. .sdesc {
  338. display: block;
  339. }
  340. .hDescAdd {
  341. cursor: pointer;
  342. }
  343. #saveBtn {} .changable {
  344. padding-left: 10px;
  345. }
  346. .changed {
  347. border-left-style: solid;
  348. border-width: 3px;
  349. border-color: #ffc107;
  350. padding-left: 7px;
  351. }
  352. .del {
  353. }
  354. .liRes:hover{
  355. background-color:#fafafa;
  356. }
  357. span.glyphicon{
  358. opacity:0.6;
  359. cursor:pointer;
  360. margin-left:3px;
  361. }
  362. span.glyphicon:hover{
  363. opacity:1;
  364. }
  365. .delRes:hover{
  366. color:red;
  367. }
  368. .delGoto:hover{
  369. color:red;
  370. cursor:pointer;
  371. }
  372. .del:hover{
  373. color:red;
  374. }
  375. .ids {
  376. color: grey;
  377. font-size: 12px;
  378. }
  379. .more {
  380. margin-left: 15px;
  381. }
  382. .resSelected {
  383. background-color: #d3d3d3;
  384. }
  385. </style>
  386. <?php
  387. }
  388. }