| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- <?php
- Lib::loadClass('RouteBase');
- Lib::loadClass('ProcesHelper');
- Lib::loadClass('Config');
- Lib::loadClass('UI');
- Lib::loadClass('Request');
- class Route_UrlAction_ProcesEditor extends RouteBase {// TODO: UrlActionBase @see Route_UrlAction
- public function handleAuth() {
- if (!User::logged()) {
- //throw new HttpException('Unauthorized', 401);
- User::authByRequest();
- }
- // zapisać jsona w sesji
- }
- public function defaultAction() {
- UI::gora();
- UI::menu();
- try {
- $id = V::get('id', 0, $_REQUEST, 'int');
- if ($id <= 0) throw new Exception("Wrong ID");
- $this->showEditor($id);
- } catch (Exception $e) {
- UI::alert('danger', "Error: " . $e->getMessage());
- }
- UI::dol();
- }
- 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 "WYSUWANY DIV Z BOKU";
- echo "</div></div>";
- echo "<div id='page-content-wrapper'><div id=main>";
- echo 'DIV GŁÓWNY';
- 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"></script>';
- }
- public function showEditorCss() {
- ?>
- <style type="text/css">
- .ico {
- float: right;
- margin-top: 10px;
- margin-left: 5px;
- cursor: pointer;
- }
- .options {
- min-width: 120px;
- width: auto !important;
- width: 120px;
- }
- #wrapper {
- padding-left: 0;
- -webkit-transition: all 0.5s ease;
- -moz-transition: all 0.5s ease;
- -o-transition: all 0.5s ease;
- transition: all 0.5s ease;
- }
- #wrapper.toggled {
- padding-left: 300px;
- }
- #side {
- padding: 15px;
- height: 100%;
- border-right-style: solid;
- border-color: #A61C2E;
- border-width: 2px;
- }
- ul {
- list-style: none;
- }
- #side #ulcon {
- background-color: white;
- overflow-y: scroll;
- height: 70% !important;
- margin-top: 10px;
- border-radius: 5px;
- padding-top: 10px;
- padding-bottom: 10px;
- border-style: solid;
- border-width: 1px;
- border-color: #e5e5e5;
- color: black;
- padding-left: 0px;
- font-family: tahoma;
- font-size: 13px;
- }
- #side .drag {
- padding-left: 8px;
- padding-top: 4px;
- padding-bottom: 4px;
- border-bottom-style: dotted;
- border-width: 1px;
- cursor: pointer;
- border-color: #e5e5e5;
- background-color: white;
- display: block;
- }
- #side .showMore {
- padding-left: 2px;
- padding-top: 4px;
- padding-bottom: 4px;
- border-width: 1px;
- border-color: #e5e5e5;
- }
- #side .gIco {
- padding-left: 2px;
- padding-top: 4px;
- padding-bottom: 4px;
- border-width: 1px;
- border-color: #e5e5e5;
- cursor: pointer;
- }
- #side .hov,
- #side .grad {
- cursor: pointer;
- }
- #side .click {
- float: left;
- color: grey;
- font-size: 10px;
- cursor: pointer;
- }
- .delRes,
- .btnEdit,
- .hdesc,
- .sdesc {
- cursor: pointer;
- }
- #side .tabelaName {
- white-space: nowrap;
- margin-right: 10px;
- overflow: hidden;
- width: 150px;
- float: left;
- text-overflow: ellipsis;
- display: block;
- cursor: pointer;
- }
- #side .hov:hover {
- background-color: #e5e5e5;
- }
- #sidebar-wrapper {
- position: fixed;
- left: 300px;
- width: 0;
- height: 100%;
- color: white;
- margin-left: -300px;
- overflow-y: auto;
- background: #222;
- -webkit-transition: all 0.5s ease;
- -moz-transition: all 0.5s ease;
- -o-transition: all 0.5s ease;
- transition: all 0.5s ease;
- }
- #wrapper.toggled #sidebar-wrapper {
- width: 300px;
- }
- #page-content-wrapper {
- width: 100%;
- position: absolute;
- padding: 15px;
- }
- #wrapper.toggled #page-content-wrapper {
- position: absolute;
- margin-right: -300px;
- }
- @media(min-width:1px) {
- #wrapper {
- padding-left: 300px;
- }
- #wrapper.toggled {
- padding-left: 0;
- }
- #sidebar-wrapper {
- width: 300px;
- }
- #wrapper.toggled #sidebar-wrapper {
- width: 0;
- }
- #page-content-wrapper {
- padding: 20px;
- position: relative;
- }
- #wrapper.toggled #page-content-wrapper {
- position: relative;
- margin-right: 0;
- }
- .drop {
- margin-top: 10px;
- }
- .hdesc textarea,
- .sdesc textarea {
- min-width: 100%;
- padding: 10px;
- }
- .step,
- .sDescAdd {
- color: grey;
- cursor: pointer;
- }
- .sdesc {
- display: block;
- }
- .hDescAdd {
- cursor: pointer;
- color: grey;
- }
- #saveBtn {} .changable {
- padding-left: 10px;
- }
- .changed {
- border-left-style: solid;
- border-width: 3px;
- border-color: #ffc107;
- padding-left: 7px;
- }
- .del {
- color: red;
- }
- .ids {
- color: grey;
- font-size: 12px;
- }
- .more {
- margin-left: 15px;
- }
- .resSelected {
- background-color: #d3d3d3;
- }
- </style>
- <?php
- }
- }
|