41 $this->manager->getPage()->addStyle(
'libs/bootstrap-5.1.3-dist/css/bootstrap.min.css');
42 $this->manager->getPage()->addStyle(
'libs/font-awesome-4.7.0/css/font-awesome.min.css');
43 $this->manager->getPage()->addStyle(
'libs/AdminLTE-2.4.0-rc/css/AdminLTE.min.css');
44 $this->manager->getPage()->addStyle(
'libs/AdminLTE-2.4.0-rc/css/skins/_all-skins.min.css');
45 $this->manager->getPage()->addStyle(
'select2.css');
46 $this->manager->getPage()->addStyle(
'bootstrap-datepicker.min.css');
47 $this->manager->getPage()->addStyle(
'miolo.css');
48 $this->manager->getPage()->addStyle(
'libs/fine-uploader/fine-uploader-new.css');
49 $this->manager->getPage()->addStyle(
'../../extensions/codemirror-5.37.0/lib/codemirror.css');
50 $this->manager->getPage()->addStyle(
'../../extensions/codemirror-5.37.0/theme/mbo.css');
51 $this->manager->getPage()->addStyle(
'../../extensions/codemirror-5.37.0/addon/hint/show-hint.css');
52 $this->manager->getPage()->addStyle(
'jquery.floatingscroll.css');
54 $this->manager->getPage()->addScript(
'push.min.js');
55 $this->manager->getPage()->addScript(
'jquery-3.6.3.min.js');
56 $this->manager->getPage()->addScript(
'typeahead.js');
57 $this->manager->getPage()->addScript(
'fine-uploader/fine-uploader.js');
58 $this->manager->getPage()->addScript(
'bootstrap-datepicker.js');
59 $this->manager->getPage()->addScript(
'jquery.maskMoney.min.js');
60 $this->manager->getPage()->addScript(
'select2.js');
61 $this->manager->getPage()->addScript(
'../extensions/codemirror-5.37.0/lib/codemirror.js');
62 $this->manager->getPage()->addScript(
'../extensions/codemirror-5.37.0/mode/sql/sql.js');
63 $this->manager->getPage()->addScript(
'../extensions/codemirror-5.37.0/mode/xml/xml.js');
64 $this->manager->getPage()->addScript(
'../extensions/codemirror-5.37.0/mode/php/php.js');
65 $this->manager->getPage()->addScript(
'../extensions/codemirror-5.37.0/mode/clike/clike.js');
66 $this->manager->getPage()->addScript(
'../extensions/codemirror-5.37.0/mode/javascript/javascript.js');
67 $this->manager->getPage()->addScript(
'../extensions/codemirror-5.37.0/addon/edit/matchbrackets.js');
68 $this->manager->getPage()->addScript(
'../extensions/codemirror-5.37.0/addon/hint/show-hint.js');
69 $this->manager->getPage()->addScript(
'../extensions/codemirror-5.37.0/addon/hint/sql-hint.js');
70 $this->manager->getPage()->addScript(
'libs/bootstrap-5.1.3-dist/js/bootstrap.bundle.min.js');
71 $this->manager->getPage()->addScript(
'libs/AdminLTE-2.4.0-rc/js/adminlte.min.js');
72 $this->manager->getPage()->addScript(
"sweetalert.min.js");
73 $this->manager->getPage()->addScript(
'keycloak/keycloak.js');
74 $this->manager->getPage()->addScript(
'keycloaklogin.js');
75 $this->manager->getPage()->addScript(
'ckeditor5/build/ckeditor.js');
76 $this->manager->getPage()->addJsCode(
"const ck_editors = new Map();");
77 $this->manager->getPage()->addScript(
'dojoroot/config.js');
78 $this->manager->getPage()->addScript(
'dojoroot/dojo/dojo.js');
79 $this->manager->getPage()->addScript(
'jquery.floatingscroll.js');
81 if ( strlen((
string) $this->manager->getConf(
'theme.client')) )
83 $this->manager->getPage()->addStyle( $this->manager->getConf(
'theme.client') .
'.css' );
88 $ui = $this->manager->GetUI();
131 $menu =
new SMainMenu(
'mioloMainMenu');
132 $this->
setElement(
'top', $menu,
'm-container-top');
134 $action = $this->manager->getPage()->action;
135 $formID = $this->manager->getPage()->name;
136 $loadingMessage = _M(
'Carregando',
'sagu2');
139 $statusBar =
new SStatusBar();
140 $this->SetElement(
'bottom', $statusBar,
'm-container-bottom');
143 if ( $this->manager->GetConf(
'options.mainmenu') == 2 )
145 $idModule =
'm-container-module';
146 $idMenu =
'm-container-dhtmlmenu';
148 else if ( $this->manager->GetConf(
'options.mainmenu') == 3 )
151 $idModule =
'm-container-module2';
156 $idMenu =
'm-container-menu';
159 $this->SetElementId(
'menus', $idMenu);
162 $idContent = ( ($this->manager->GetConf(
'options.mainmenu') == 2) || ($this->manager->GetConf(
'options.mainmenu') == 3) ) ?
'm-container-content-full' :
'm-container-content';
163 $this->SetElementId(
'content', $idContent);
166<script type=
"text/javascript">
168MIOLO_configureHistory(
"$action");
169dojo.addOnLoad(MIOLO_initHistory);
172<div
id=
"divSaguMessages" style=
"display: none;">
173 <div
id=
"divSaguMessagesContent"></div>
176<div
id=
"m-loading-message-bg" onclick=
"javascript:hideLoadingDiv()"></div>
177<div
id=
"m-loading-message" onclick=
"javascript:hideLoadingDiv()">
179<div
class=
"sk-circle">
180 <div
class=
"sk-circle1 sk-child"></div>
181 <div
class=
"sk-circle2 sk-child"></div>
182 <div
class=
"sk-circle3 sk-child"></div>
183 <div
class=
"sk-circle4 sk-child"></div>
184 <div
class=
"sk-circle5 sk-child"></div>
185 <div
class=
"sk-circle6 sk-child"></div>
186 <div
class=
"sk-circle7 sk-child"></div>
187 <div
class=
"sk-circle8 sk-child"></div>
188 <div
class=
"sk-circle9 sk-child"></div>
189 <div
class=
"sk-circle10 sk-child"></div>
190 <div
class=
"sk-circle11 sk-child"></div>
191 <div
class=
"sk-circle12 sk-child"></div>
193<div
id=
"m-loading-message-text">$loadingMessage...</div>
197<div
id=
"{$formID}__scripts" dojoType=
"dojox.layout.ContentPane" layoutAlign=
"client" executeScripts=
"true" cleanContent=
"true">
199<div
id=
"$formID" dojoType=
"dojox.layout.ContentPane" layoutAlign=
"client" executeScripts=
"true" cleanContent=
"true">
203 $html .=
"<div class=\"wrapper\">";
204 $html .=
"<header class=\"main-header\">";
205 $html .= $this->GenerateElement(
'top');
206 $html .=
"</header>";
208 $menu = $this->GenerateElement(
'menu');
211 $contentCss = (trim($menu) !=
'<div id="menu" class=""></div>') ?
"content-wrapper" :
null;
213 $html .=
"<div class=\"$contentCss\">";
214 $this->SetElementId(
'toolbar',
'm-toolbar btn-toolbar');
215 $html .= $tb = $this->GenerateElement(
'toolbar');
217 $html .=
'<div id="extContent">';
218 $html .= $this->GenerateElement(
'content') . SDatabase::getDebugTable();
219 $html .=
'</div></div>';
221 $html .=
'<div id="extBottom" style="z-index: 1000; visibility: visible; position: fixed; bottom:0; width: 100%">';
222 $html .= $this->GenerateElement(
'bottom');
223 $html .=
'</div></div>';
226<script type="text/javascript">
233 //Try adicionado porque no Firefox window.parent.location.href retorna uma exessão
237 if ( window.parent.location && window.parent.location.href == undefined )
239 document.body.className = "site";
246 document.body.className = "site";
252function hideLoadingDiv()
254 var bg = document.getElementById("m-loading-message-bg");
255 var fg = document.getElementById("m-loading-message");
259 bg.style.display = "none";
264 fg.style.display = "none";
270function ajustarVisualizacaoDoTema() {
272 // $("[rel=\'tooltip\']").tooltip();
274 // Ajusta calendários
275 setTimeout(function(){$("div.m-input-calendar input").datepicker();}, 1000);
277 // Visualização de controls na subdetail
278 $(".m-basegroup .m-caption").children(".m-caption-required").hide();
279 $(".m-basegroup .m-caption").children(".m-caption-required").each(function(index, value) {
280 var label = $(this).text();
281 $(this).parent().addClass("m-caption-required");
282 $(this).parent().text(label+":");
285 // Dois pontos repetidos nos labels
286 $(".m-basegroup .m-caption").each(function(index, value) {
287 if ($(this).text().slice(-2) == "::") {
288 $(this).text($(this).text().slice(0, -1));
293 $(".m-hint").parent().css("position", "relative");
294 $("span .m-hint:only-child, div .m-hint:only-child").parent().css("width", "0.1%");
296 // Ajusta o posicionamento do item ativo no menu
298 if ($(".active").length > 0) {
299 topScrollPx = $(".active").last().offset().top - ($(".main-sidebar").last().css("height").replace(/[^-\d\.]/g, "") / 2) + 18;
300 if ($(".main-sidebar").scrollTop() > 0) {
301 topScrollPx = $(".main-sidebar").scrollTop();
305 $(".main-sidebar").animate({
306 scrollTop: topScrollPx
309 // Controla a sessão do expandido do menu
310 $(document).on("expanded.pushMenu", function() {
311 document.cookie = "menuExpandido=true";
312 setTimeout(function() { try{ $(".m-grid-body.table").stickyTableHeaders(); } catch (e) {}}, 300);
314 $(document).on("collapsed.pushMenu", function() {
315 document.cookie = "menuExpandido=false";
316 setTimeout(function() { try{ $(".m-grid-body.table").stickyTableHeaders(); } catch (e) {}}, 300);
318 if (getCookie("menuExpandido") === "false") {
319 $("body").addClass("sidebar-collapse");
323function getCookie(cname) {
324 var name = cname + "=";
325 var decodedCookie = decodeURIComponent(document.cookie);
326 var ca = decodedCookie.split(\';\');
327 for(var i = 0; i <ca.length; i++) {
329 while (c.charAt(0) == \' \') {
332 if (c.indexOf(name) == 0) {
333 return c.substring(name.length, c.length);
339$( document ).ready(function() {
340 ajustarVisualizacaoDoTema();
347 return $this->painter->div(
new Div(
'm-container', $html));