Histórico da Página
HTML |
---|
<div id="myContent"></div> <script type="text/javascript"> var _collapsiblePanel1 = null; createCollapsiblePanel = function(optCollapsiblePanel){ var oCollapsiblePanel = function(optCollapsiblePanel){ this.ID = "collapsiblePanel1"; this.Title = ""; this.MenuInstance = ""; this.Collapsible = false; this.Wrapper = ""; this.Parent = ""; this.Object = ""; this.Status = "OPENED" this.MaxHeight = 0; this.FilterStruct = []; this.FilterStruct["INDICE"] = []; this.FilterStruct["TITULO"] = []; this.FilterStruct["SUBTITULO"] = []; this.FilterStruct["DESCRICAO"] = []; this.FilterStruct["DATA"] = []; this.Collapse = function(){ if(this.Status == "OPENED"){ this.MaxHeight = this.Object.offsetHeight; this.Object.style.height = "45px"; this.Status = "CLOSED"; } else{ this.Status = "OPENED"; this.Object.style.height = this.MaxHeight + "px"; } } this.BuildFilterStructure = function(){ for (var i = 0; i < window.Containers.length; i++){ if(window.Containers[i].Parent.ID == this.ID){ this.FilterStruct.TITULO[window.Containers[i].Title + "_" + i] = window.Containers[i]; this.FilterStruct.SUBTITULO[window.Containers[i].SubTitle + "_" + i] = window.Containers[i]; this.FilterStruct.DESCRICAO[window.Containers[i].Description + "_" + i] = window.Containers[i]; this.FilterStruct.DATA[window.Containers[i].Date + "_" + i] = window.Containers[i]; this.FilterStruct.INDICE[i] = window.Containers[i]; } } } this.ExecuteAction = function(tipo, tipoItem, texto){ this.Object.style.height = "auto"; if(tipo == "FILTRARSIMPLES") this.Filter(tipoItem, texto); else if(tipo == "FILTRARAVANCADO") this.FilterAdv(expressao); else if(tipo == "ORDENAR") this.Order(tipoItem); } this.FilterOrder = function(tipoItem, texto){ var StructASerUtilizado = this.FilterStruct[tipoItem]; if(texto != ""){ var array = []; for(var att in StructASerUtilizado){ StructASerUtilizado[att].Object.style.display = "none"array.push(att); for(var att in StructASerUtilizado){} if(att.toUpperCase().indexOf(texto.toUpperCase()) >= 0array.sort){ StructASerUtilizado[att].Object.style.display = "inline"; array.sort(); } }else{ }//metodo sort customizado else{ } for(var att in StructASerUtilizado)i=0; i<array.length; i++){ this.Object.appendChild(StructASerUtilizado[array[att].Object.style.display = "inline"i]]); } this.MaxHeight = this.Object.offsetHeight; } } this.LoadComponentsFilter = function(optCollapsiblePaneltipoItem, texto){ this.IDvar StructASerUtilizado = optCollapsiblePanel.IDthis.FilterStruct[tipoItem]; this.Title = optCollapsiblePanel.Title; if(texto != ""){ this.MenuInstance = optCollapsiblePanel.MenuInstance; this.Collapsible = optCollapsiblePanel.Collapsible; for(var att in StructASerUtilizado) this.Wrapper StructASerUtilizado[att].Object.style.display = optCollapsiblePanel.Wrapper"none"; _collapsiblePanelObject = document.createElement("div"); for(var att in StructASerUtilizado){ _collapsiblePanelObject.id = this.ID + "_MostExternalDiv" ; if(att.toUpperCase().indexOf(texto.toUpperCase()) >= 0){ _collapsiblePanelObject StructASerUtilizado[att].Object.style.widthdisplay = "100%inline"; _collapsiblePanelObject.style.height = "auto"; } _collapsiblePanelObject.style.overflow = "hidden";} _collapsiblePanelObject.style.margin = "0px";} _collapsiblePanelObject.style.padding = "0px";else{ _collapsiblePanelObject.style.background = "url(http://tdn.totvs.com/download/attachments/243011209/1600cefc.png?version=1&modificationDate=1485184017639&api=v2)"; for(var att in StructASerUtilizado) _collapsiblePanelObject StructASerUtilizado[att].Object.style.webkitTransitiondisplay = "height 1s"; _collapsiblePanelObject.style.mozTransition = "height 1s"; _collapsiblePanelObject.style.transition = "height 1s"; inline"; } _collapsiblePanelObjectHeadthis.MaxHeight = document.createElement("div"); this.Object.offsetHeight; _collapsiblePanelObjectHead.id = _collapsiblePanelObject.id + "_Head"; _collapsiblePanelObjectHead.style.background = "#606060"; _collapsiblePanelObjectHead.style.height = "45px"; _collapsiblePanelObjectHead.style.paddingLeft = "10px";} this.LoadComponents = function(optCollapsiblePanel){ _collapsiblePanelObjectHead.style.color = "#fff" this.ID = optCollapsiblePanel.ID; this.Title = optCollapsiblePanel.Title; _collapsiblePanelObjectHead.style.webkitBoxShadowthis.MenuInstance = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; _collapsiblePanelObjectHead.style.mozBoxShadow = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; optCollapsiblePanel.MenuInstance; this.Collapsible = optCollapsiblePanel.Collapsible; this.Wrapper = optCollapsiblePanel.Wrapper; _collapsiblePanelObject = document.createElement("div"); _collapsiblePanelObject.id = this.ID + "_MostExternalDiv" ; _collapsiblePanelObject.style.width = "100%"; _collapsiblePanelObject.style.height = "auto"; _collapsiblePanelObject.style.overflow = "hidden"; _collapsiblePanelObject.style.margin = "0px"; _collapsiblePanelObject.style.padding = "0px"; _collapsiblePanelObject.style.background = "url(http://tdn.totvs.com/download/attachments/243011209/1600cefc.png?version=1&modificationDate=1485184017639&api=v2)"; _collapsiblePanelObject.style.webkitTransition = "height 1s"; _collapsiblePanelObjectHeadcollapsiblePanelObject.style.boxShadowmozTransition = "height 1s"; _collapsiblePanelObject.style.transition = "height 1s"; _collapsiblePanelObjectHead = document.createElement("div"); _collapsiblePanelObjectHead.id = _collapsiblePanelObject.id + "_Head"; _collapsiblePanelObjectHead.style.background = "#606060"; _collapsiblePanelObjectHead.style.height = "45px"; _collapsiblePanelObjectHead.style.paddingLeft = "10px"; _collapsiblePanelObjectHead.style.color = "#fff"; _collapsiblePanelObjectHead.style.webkitBoxShadow = "3px 3px 10px 3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; rgba(100, 100, 100, 0.7)"; _collapsiblePanelObjectHead.style.mozBoxShadow = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; _collapsiblePanelObjectHead.style.boxShadow = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; _collapsiblePanelObjectHeadTitle = document.createElement("span"); _collapsiblePanelObjectHeadTitle.id = _collapsiblePanelObjectHead.id + "_Title"; _collapsiblePanelObjectHeadTitle.innerHTML = this.Title; _collapsiblePanelObjectHeadTitle.style.width = "336px"; _collapsiblePanelObjectHeadTitle.style.textOverflow = "ellipsis"; _collapsiblePanelObjectHeadTitle.style.fontSize = "20pt"; _collapsiblePanelObjectHeadTitle.style.fontFamily = "Segoe UI, Candara, Bitstream Vera Sans, DejaVu Sans, Bitstream Vera Sans, Trebuchet MS, Verdana, Verdana Ref, sans-serif"; _collapsiblePanelObjectHead.appendChild(_collapsiblePanelObjectHeadTitle); _collapsiblePanelObjectHeadMenu = document.createElement("div"); _collapsiblePanelObjectHeadMenu.id = _collapsiblePanelObjectHead.id + "_Menu"; _collapsiblePanelObjectHeadMenu.style.float = "right"; _collapsiblePanelObjectHeadMenu.style.marginRight = "10px"; _collapsiblePanelObjectHeadMenu.style.marginTop = "8px"; _collapsiblePanelObjectHeadMenu.style.width = "26px"; _collapsiblePanelObjectHeadMenu.style.height = "26px"; _collapsiblePanelObjectHeadMenu.style.border = "1px solid #606060"; _collapsiblePanelObjectHeadMenuImg = document.createElement("img"); _collapsiblePanelObjectHeadMenuImg.id = _collapsiblePanelObjectHeadMenu.id + "_Img"; _collapsiblePanelObjectHeadMenuImg.src = "http://tdn.totvs.com/download/attachments/243011209/menu.png?version=1&modificationDate=1487769415219&api=v2"; _collapsiblePanelObjectHeadMenuImg.style.width = "16px"; _collapsiblePanelObjectHeadMenuImg.style.height = "16px"; _collapsiblePanelObjectHeadMenuImg.style.marginLeft = "5px"; _collapsiblePanelObjectHeadMenuImg.style.marginTop = "5px"; _collapsiblePanelObjectHeadMenu.appendChild(_collapsiblePanelObjectHeadMenuImg); _collapsiblePanelObjectHead.appendChild(_collapsiblePanelObjectHeadMenu); _collapsiblePanelObject.appendChild(_collapsiblePanelObjectHead); document.getElementById(this.Wrapper).appendChild(_collapsiblePanelObject); var _objects = []; var _objectsTable = []; var optTableOptionItem3 = { ID: "TableOptionItem3", Description: "Índice", Type: "INDICE", _collapsiblePanelObjectHeadTitle = document.createElement("span"); HoverAction: function(){ _collapsiblePanelObjectHeadTitle.idthis.style.backgroundColor = _collapsiblePanelObjectHead.id + "_Title"#f6c342"; _collapsiblePanelObjectHeadTitle.innerHTML this.style.cursor = this.Title; "pointer"; _collapsiblePanelObjectHeadTitledocument.getElementById(this.id + "_Description").style.widthcolor = "336px#000"; _collapsiblePanelObjectHeadTitle.style.textOverflow = "ellipsis"; var _input; if(document.getElementById(this.id + "_Input")) _collapsiblePanelObjectHeadTitle.style.fontSize = "20pt"; input = document.getElementById(this.id + "_Input"); _collapsiblePanelObjectHeadTitle.style.fontFamily = "Segoe UI, Candara, Bitstream Vera Sans, DejaVu Sans, Bitstream Vera Sans, Trebuchet MS, Verdana, Verdana Ref, sans-serif"; else _collapsiblePanelObjectHead.appendChild(_collapsiblePanelObjectHeadTitle); _collapsiblePanelObjectHeadMenuinput = document.createElement("divinput"); _collapsiblePanelObjectHeadMenu _input.id = _collapsiblePanelObjectHeadthis.id + "_MenuInput"; _collapsiblePanelObjectHeadMenuinput.style.float = "right"; _collapsiblePanelObjectHeadMenu _input.style.height = "14px"; _input.style.marginRightwidth = "10px100px"; _collapsiblePanelObjectHeadMenuinput.style.marginTopdisplay = "8pxinline"; _collapsiblePanelObjectHeadMenu.style.width = "26px"; var _button; _collapsiblePanelObjectHeadMenu.style.height = "26px"; if(document.getElementById(this.id + "_Button")) _collapsiblePanelObjectHeadMenu.style.border = "1px solid #606060"; _button = document.getElementById(this.id + "_Button"); else _collapsiblePanelObjectHeadMenuImgbutton = document.createElement("imgdiv"); _collapsiblePanelObjectHeadMenuImgbutton.id = _collapsiblePanelObjectHeadMenuthis.id + "_ImgButton"; _collapsiblePanelObjectHeadMenuImgbutton.style.srcfloat = "http://tdn.totvs.com/download/attachments/243011209/menu.png?version=1&modificationDate=1487769415219&api=v2"; right" _button.innerHTML = "Filtrar"; _collapsiblePanelObjectHeadMenuImgbutton.style.widthbackground = "16px#606060"; _collapsiblePanelObjectHeadMenuImgbutton.style.heightcolor = "16px#fff"; _collapsiblePanelObjectHeadMenuImgbutton.style.marginLeftpadding = "0px 5px"; _collapsiblePanelObjectHeadMenuImgbutton.style.marginTopdisplay = "5pxinline"; SetControlEvents(_button, "CLICK", function(){ _collapsiblePanelObjectHeadMenu.appendChild(_collapsiblePanelObjectHeadMenuImg); _collapsiblePanelObjectHead.appendChild(_collapsiblePanelObjectHeadMenu); var _nameObject = this.id.replace("_Button","_Input"); var _typeOptionTable = document.getElementById(this.id.replace("_Button","")).getAttribute("Type"); var _typeOptionTableItem = document.getElementById(this.id.replace("_Button","_Description")).getAttribute("Type"); _collapsiblePanelObject.appendChild(_collapsiblePanelObjectHead); var _filterText = document.getElementById(this.Wrapper_nameObject).appendChild(_collapsiblePanelObject)value; var _objectsinstance = window.CollapsiblePanels[window.CurrentCollapsiblePanel]; var _instance.ExecuteAction(_typeOptionTable, _objectsTable = []; typeOptionTableItem, _filterText); var optTableOptionItem3 = {window.Popins[window.CurrentPopin].Close(); ID: "TableOptionItem3", }); Description: "Índice", Type: "INDICE", HoverAction: function(){ this.style.backgroundColor = "#f6c342"appendChild(_button); this.style.cursor = "pointer"; appendChild(_input); document.getElementById(this.id + "_Description").style.color = "#000"; }, var _input;OutAction: function(event){ if(document.getElementById(this.id + "_Input")) var e = event.toElement || event.relatedTarget; _inputif (e.parentNode == document.getElementById(this.id + "_Input"); this || e == this) { else return; _input = document.createElement("input");} _input.idthis.style.backgroundColor = this.id + "_Input"#909090"; _inputthis.style.floatcursor = "rightdefault"; _inputdocument.getElementById(this.id + "_Description").style.heightcolor = "14px#fff"; _input.style.width = "100px";if(document.getElementById(this.id + "_Input")) _input document.getElementById(this.id + "_Input").style.display = "inlinenone"; var _button; if(document.getElementById(this.id + "_Button")) _button = document.getElementById(this.id + "_Button").style.display = "none"; } else } var _buttonobjectTable3 = document.createElement("div"createTableOptionItem(optTableOptionItem3); _objectsTable.push(_objectTable3); _button.id var optTableOptionItem1 = this.id + "_Button";{ ID: "TableOptionItem1", _button.style.float = "right" Description: "Título", _button.innerHTML = "Filtrar";Type: "TITULO", _button.style.background = "#606060";HoverAction: function(){ _buttonthis.style.colorbackgroundColor = "#fff#f6c342"; _buttonthis.style.paddingcursor = "0px 5pxpointer"; _buttondocument.getElementById(this.id + "_Description").style.displaycolor = "inline#000"; SetControlEvents(_button, "CLICK", function(){var _input; var _nameObject = if(document.getElementById(this.id.replace( + "_Button","_Input")); var _typeOptionTableinput = document.getElementById(this.id.replace("_Button","")).getAttribute("Type" + "_Input"); var _typeOptionTableItem = document.getElementById(this.id.replace("_Button","_Description")).getAttribute("Type");else var _filterTextinput = document.getElementById(_nameObject).value; createElement("input"); var _instance _input.id = window.CollapsiblePanels[window.CurrentCollapsiblePanel]this.id + "_Input"; _instance.ExecuteAction(_typeOptionTable, _typeOptionTableItem, _filterText)input.style.float = "right"; window.Popins[window.CurrentPopin].Close()_input.style.height = "14px"; });_input.style.width = "100px"; _input.style.display = "inline"; var _button; if(document.getElementById(this.appendChild(_button);id + "_Button")) this.appendChild(_input _button = document.getElementById(this.id + "_Button"); else }, OutAction: function(event){_button = document.createElement("div"); var e_button.id = eventthis.toElementid || event.relatedTarget; + "_Button"; if (e.parentNode == this || e == this) { _button.style.float = "right" return; }_button.innerHTML = "Filtrar"; _button.style.background = "#606060"; this_button.style.backgroundColorcolor = "#909090#fff"; this_button.style.cursorpadding = "default0px 5px"; document.getElementById(this.id + "_Description")_button.style.colordisplay = "#fffinline"; if(document.getElementById(this.id + "_Input"))SetControlEvents(_button, "CLICK", function(){ document.getElementById(var _nameObject = this.id + .replace("_Button","_Input").style.display = "none"; if(var _typeOptionTable = document.getElementById(this.id + .replace("_Button","")).getAttribute("Type"); var _typeOptionTableItem = document.getElementById(this.id + .replace("_Button","_Description").style.display = "none";).getAttribute("Type"); }var _filterText = document.getElementById(_nameObject).value; } var _objectTable3instance = createTableOptionItem(optTableOptionItem3); window.CollapsiblePanels[window.CurrentCollapsiblePanel]; _objectsTableinstance.push(_objectTable3); ExecuteAction(_typeOptionTable, _typeOptionTableItem, _filterText); var optTableOptionItem1 = { ID: "TableOptionItem1", window.Popins[window.CurrentPopin].Close(); Description: "Título", }); Type: "TITULO", HoverAction: function(){ this.style.backgroundColor = "#f6c342"; this.style.cursor = "pointer"; appendChild(_button); documentthis.getElementById(this.id + "_Description").style.color = "#000"; appendChild(_input); var _input; }, if(document.getElementById(this.id + "_Input"))OutAction: function(event){ _inputvar e = document.getElementById(this.id + "_Input"); event.toElement || event.relatedTarget; else if (e.parentNode == this || e == this) { _input = document.createElement("input")return; } _input.id = this.id + "_Input"; _inputthis.style.floatbackgroundColor = "right#909090"; _inputthis.style.heightcursor = "14pxdefault"; _inputdocument.getElementById(this.id + "_Description").style.widthcolor = "100px#fff"; _input.style.display = "inline"; if(document.getElementById(this.id + "_Input")) var _buttondocument.getElementById(this.id + "_Input").style.display = "none"; if(document.getElementById(this.id + "_Button")) _button = document.getElementById(this.id + "_Button").style.display = "none"; } else } var _buttonobjectTable1 = document.createElement("div"createTableOptionItem(optTableOptionItem1); _objectsTable.push(_objectTable1); var optTableOptionItem2 = { _button.id = this.id + "_Button";ID: "TableOptionItem2", _button.style.float = "right"Description: "Sub-título", _button.innerHTML =Type: "FiltrarSUBTITULO";, _button.style.background = "#606060";HoverAction: function(){ _buttonthis.style.colorbackgroundColor = "#fff#f6c342"; _buttonthis.style.paddingcursor = "0px 5pxpointer"; _buttondocument.getElementById(this.id + "_Description").style.displaycolor = "inline#000"; SetControlEvents(_button, "CLICK", function(){var _input; var _nameObject = if(document.getElementById(this.id.replace( + "_Button","_Input");) var _typeOptionTableinput = document.getElementById(this.id.replace("_Button","")).getAttribute("Type + "_Input"); else var _typeOptionTableItem _input = document.getElementById(this.id.replacecreateElement("_Button","_Description")).getAttribute("Type")input"); var _filterText = document.getElementById(_nameObject).value; var _instance_input.id = window.CollapsiblePanels[window.CurrentCollapsiblePanel]this.id + "_Input"; _instance.ExecuteAction(_typeOptionTable, _typeOptionTableItem, _filterText)input.style.float = "right"; window.Popins[window.CurrentPopin].Close()_input.style.height = "14px"; });_input.style.width = "100px"; _input.style.display = "inline"; var _button; this.appendChild(_button);if(document.getElementById(this.id + "_Button")) this.appendChild(_input _button = document.getElementById(this.id + "_Button"); },else OutAction: function(event){ var e_button = event.toElement || event.relatedTarget; document.createElement("div"); if (e.parentNode =_button.id = this.id || e == this) { + "_Button"; return; _button.style.float = "right" }_button.innerHTML = "Filtrar"; _button.style.background = "#606060"; this_button.style.backgroundColorcolor = "#909090#fff"; this_button.style.cursorpadding = "default0px 5px"; document.getElementById(this.id + "_Description") _button.style.colordisplay = "#fffinline"; if(document.getElementById(this.id + "_Input"))SetControlEvents(_button, "CLICK", function(){ document.getElementById(var _nameObject = this.id + .replace("_Button","_Input").style.display = "none"; if(var _typeOptionTable = document.getElementById(this.id + .replace("_Button","")).getAttribute("Type"); var _typeOptionTableItem = document.getElementById(this.id + .replace("_Button","_Description")).style.display = "none";getAttribute("Type"); }var _filterText = document.getElementById(_nameObject).value; } var _objectTable1instance = createTableOptionItem(optTableOptionItem1); window.CollapsiblePanels[window.CurrentCollapsiblePanel]; _objectsTableinstance.pushExecuteAction(_objectTable1typeOptionTable, _typeOptionTableItem, _filterText); var optTableOptionItem2 = { ID: "TableOptionItem2",window.Popins[window.CurrentPopin].Close(); Description: "Sub-título", }); Type: "SUBTITULO", HoverAction: function(){ this.style.backgroundColor = "#f6c342"; this.style.cursor = "pointer"; appendChild(_button); documentthis.getElementById(this.id + "_Description").style.color = "#000"; appendChild(_input); }, var _input;OutAction: function(event){ if(document.getElementById(this.id + "_Input")) var e = event.toElement || event.relatedTarget; _inputif (e.parentNode == document.getElementById(this.id + "_Input"); this || e == this) { else return; _input = document.createElement("input");} _input.idthis.style.backgroundColor = this.id + "_Input#909090"; _inputthis.style.floatcursor = "rightdefault"; _inputdocument.getElementById(this.id + "_Description").style.heightcolor = "14px#fff"; _input.style.width = "100px";if(document.getElementById(this.id + "_Input")) _input document.getElementById(this.id + "_Input").style.display = "inline"; var _buttonnone"; if(document.getElementById(this.id + "_Button")) _button = document.getElementById(this.id + "_Button").style.display = "none"; } else } var _buttonobjectTable2 = document.createElement("div"createTableOptionItem(optTableOptionItem2); _objectsTable.push(_objectTable2); _button.id var optTableOptionItem5 = this.id + "_Button";{ _button.style.float = "right"ID: "TableOptionItem5", _button.innerHTML =Description: "FiltrarDescrição";, _button.style.background = "#606060";Type: "DESCRICAO", _button.style.color = "#fff";HoverAction: function(){ _buttonthis.style.paddingbackgroundColor = "0px 5px#f6c342"; _buttonthis.style.displaycursor = "inlinepointer"; SetControlEvents(_button, "CLICK", function(){ document.getElementById(this.id + "_Description").style.color = "#000"; var _nameObject = this.id.replace("_Button","_Input")input; var _typeOptionTable = if(document.getElementById(this.id.replace( + "_Button",Input"")).getAttribute("Type"); var _typeOptionTableIteminput = document.getElementById(this.id.replace( + "_Button","_DescriptionInput")).getAttribute("Type"); else var _filterText _input = document.getElementById(_nameObject).valuecreateElement("input"); var _instance = window.CollapsiblePanels[window.CurrentCollapsiblePanel]; _instance.ExecuteAction(_typeOptionTable, _typeOptionTableItem, _filterText)input.id = this.id + "_Input"; window.Popins[window.CurrentPopin].Close()_input.style.float = "right"; });_input.style.height = "14px"; _input.style.width = "100px"; _input.style.display = "inline"; this.appendChild(var _button); if(document.getElementById(this.appendChild(_input);id + "_Button")) }, _button = document.getElementById(this.id + "_Button"); OutAction: function(event){else var _button e = event.toElement || event.relatedTarget; document.createElement("div"); if (e.parentNode_button.id == this.id || e == this) { + "_Button"; return; _button.style.float = "right" }_button.innerHTML = "Filtrar"; _button.style.background = "#606060"; this_button.style.backgroundColorcolor = "#909090#fff"; this_button.style.cursorpadding = "default0px 5px"; document.getElementById(this.id + "_Description")_button.style.colordisplay = "#fffinline"; if(document.getElementById(this.id + "_Input"))SetControlEvents(_button, "CLICK", function(){ document.getElementById(var _nameObject = this.id + .replace("_Button","_Input").style.display = "none"; if(var _typeOptionTable = document.getElementById(this.id + .replace("_Button","")).getAttribute("Type"); var _typeOptionTableItem = document.getElementById(this.id + .replace("_Button").style.display = "none"; },"_Description")).getAttribute("Type"); } var _objectTable2filterText = createTableOptionItem(optTableOptionItem2)document.getElementById(_nameObject).value; _objectsTable.push(_objectTable2); var optTableOptionItem5_instance = {window.CollapsiblePanels[window.CurrentCollapsiblePanel]; ID: "TableOptionItem5", _instance.ExecuteAction(_typeOptionTable, _typeOptionTableItem, _filterText); Description: "Descrição", window.Popins[window.CurrentPopin].Close(); Type: "DESCRICAO", HoverAction: function(){ }); this.style.backgroundColor = "#f6c342"; this.style.cursor = "pointer"; documentthis.getElementById(this.id + "_Description").style.color = "#000"appendChild(_button); var this.appendChild(_input); }, if(document.getElementById(this.id + "_Input"))OutAction: function(event){ _inputvar e = document.getElementById(this.id + "_Input"); event.toElement || event.relatedTarget; else if (e.parentNode == this || e == this) { _input = document.createElement("input"); return; } _input.id = this.id + "_Input"; _inputthis.style.floatbackgroundColor = "right#909090"; _inputthis.style.heightcursor = "14pxdefault"; _inputdocument.getElementById(this.id + "_Description").style.widthcolor = "100px#fff"; _input.style.display = "inline"; if(document.getElementById(this.id + "_Input")) var _buttondocument.getElementById(this.id + "_Input").style.display = "none"; if(document.getElementById(this.id + "_Button")) _button = document.getElementById(this.id + "_Button").style.display = "none"; } else } var _buttonobjectTable5 = document.createElement("div"createTableOptionItem(optTableOptionItem5); _objectsTable.push(_objectTable5); _button.id var optTableOptionItem4 = this.id + "_Button";{ ID: "TableOptionItem4", _button.style.float = "right"Description: "Data Criação", Type: "DATA", _button.innerHTML = "Filtrar"; HoverAction: function(){ _buttonthis.style.backgroundbackgroundColor = "#606060#f6c342"; _buttonthis.style.colorcursor = "#fffpointer"; _buttondocument.getElementById(this.id + "_Description").style.paddingcolor = "0px 5px#000"; _button.style.display = "inline"; var _input; SetControlEvents(_button, "CLICK", function(){if(document.getElementById(this.id + "_Input")) var _nameObjectinput = document.getElementById(this.id.replace("_Button", + "_Input"); var _typeOptionTable = document.getElementById(this.id.replace("_Button","")).getAttribute("Type");else var _typeOptionTableIteminput = document.getElementById(this.id.replacecreateElement("_Button","_Description")).getAttribute("Type")input"); var _filterText = document.getElementById(_nameObject).value; var _instanceinput.id = window.CollapsiblePanels[window.CurrentCollapsiblePanel]; this.id + "_Input"; _instance.ExecuteAction(_typeOptionTable, _typeOptionTableItem, _filterText)input.style.float = "right"; window.Popins[window.CurrentPopin].Close()_input.style.height = "14px"; });_input.style.width = "100px"; _input.style.display = "inline"; var _button; if(document.getElementById(this.appendChild(_button);id + "_Button")) this.appendChild(_input _button = document.getElementById(this.id + "_Button"); },else OutAction: function(event){ var e_button = event.toElement || event.relatedTarget; document.createElement("div"); if (e.parentNode_button.id == this.id || e == this) { + "_Button"; return; _button.style.float = "right" }_button.innerHTML = "Filtrar"; _button.style.background = "#606060"; this_button.style.backgroundColorcolor = "#909090#fff"; this_button.style.cursorpadding = "default0px 5px"; document.getElementById(this.id + "_Description")_button.style.colordisplay = "#fffinline"; if(document.getElementById(this.id + "_Input"))SetControlEvents(_button, "CLICK", function(){ document.getElementById(var _nameObject = this.id + "_Input").style.display = "none"; .replace("_Button","_Input"); if(var _typeOptionTable = document.getElementById(this.id + .replace("_Button","")).getAttribute("Type"); var _typeOptionTableItem = document.getElementById(this.id + .replace("_Button","_Description").style.display = "none"; } ).getAttribute("Type"); } var _objectTable5filterText = createTableOptionItem(optTableOptionItem5); document.getElementById(_nameObject).value; _objectsTable.push(_objectTable5); var optTableOptionItem4_instance = {window.CollapsiblePanels[window.CurrentCollapsiblePanel]; ID: "TableOptionItem4", Description: "Data Criação",_instance.ExecuteAction(_typeOptionTable, _typeOptionTableItem, _filterText); Type: "DATA", HoverAction: function(){window.Popins[window.CurrentPopin].Close(); this.style.backgroundColor = "#f6c342"; }); this.style.cursor = "pointer"; document.getElementById(this.id + "_Description").style.color = "#000"; var _inputthis.appendChild(_button); if(documentthis.getElementById(this.id + "_Input")) appendChild(_input); _input = document.getElementById(this.id + "_Input"); }, elseOutAction: function(event){ _inputvar e = document.createElement("input"); event.toElement || event.relatedTarget; if (e.parentNode == this || e == this) { _input.id = this.id + "_Input"; return; _input.style.float = "right";} _input.style.height = "14px"; _inputthis.style.widthbackgroundColor = "100px#909090"; _inputthis.style.displaycursor = "inlinedefault"; var _button; if(document.getElementById(this.id + "_ButtonDescription")) _button = document.getElementById(this.id + "_Button"); else.style.color = "#fff"; _button = if(document.createElement("div"); _button.id = getElementById(this.id + "_ButtonInput";)) _buttondocument.getElementById(this.id + "_Input").style.floatdisplay = "rightnone"; _button.innerHTML = "Filtrar";if(document.getElementById(this.id + "_Button")) _button document.getElementById(this.id + "_Button").style.backgrounddisplay = "#606060none"; _button.style.color = "#fff";} } _button.style.paddingvar _objectTable4 = "0px 5px";createTableOptionItem(optTableOptionItem4); _objectsTable.push(_objectTable4); _button.style.display var optTableOption1 = "inline"; { SetControlEvents(_button,ID: "CLICKTableOption1", function(){ Objects: _objectsTable, var _nameObject = this.id.replace("_Button","_Input"); Type: "FILTRARSIMPLES" } var _typeOptionTabletableOption1 = document.getElementById(this.id.replace("_Button","")).getAttribute("Type"); new createTableOption(optTableOption1); var optMenuItem1 = { var _typeOptionTableItem = document.getElementById(this.id.replace("_Button","_Description")).getAttribute("Type"); ID: "MenuItem1", Action: function(){ var _filterTextoptPopin1 = document.getElementById(_nameObject).value;{ var _instance = window.CollapsiblePanels[window.CurrentCollapsiblePanel];ID: "Popin1", _instance.ExecuteAction(_typeOptionTable, _typeOptionTableItem, _filterText);Title: "Filtrar (Simples)", window.Popins[window.CurrentPopin].Close(); Align: "CENTER", Modal: true, }); ObjectContent: _tableOption1.Object } createPopin(optPopin1); var _nameParent = this.appendChild(_buttongetAttribute("Parent"); this.appendChild(_input);var _nameInstance = _nameParent.replace("_MostExternalDiv",""); var _instance = window.Menus[_nameInstance]; }, _instance.Hide(); OutAction: function(event){_instance.Parent.UndoHighlightMenu(); }, var e = event.toElement || event.relatedTarget; Description: "Filtrar (Simples)" } if (e.parentNode var _object1 == this || e == this) { createMenuItem(optMenuItem1); _objects.push(_object1); return; var optMenuItem4 = { ID: "MenuItem4", } Action: function(){ var optPopin4 = { this.style.backgroundColor = "#909090";ID: "Popin4", this.style.cursor = "default"; Title: "Filtrar (Avançado)", document.getElementById(this.id +InnerHTML: "_Description").style.color = "#fff";teste", Align: "CENTER", if(document.getElementById(this.id + "_Input")) Modal: true document.getElementById(this.id + "_Input").style.display = "none";} if(document.getElementById(this.id + "_Button"))createPopin(optPopin4); document.getElementById(this.id + "_Button").style.displayvar _nameParent = this.getAttribute("noneParent"); var _nameInstance = _nameParent.replace("_MostExternalDiv",""); } } var _instance = window.Menus[_nameInstance]; var _objectTable4 = createTableOptionItem(optTableOptionItem4 _instance.Hide(); _objectsTableinstance.Parent.pushUndoHighlightMenu(_objectTable4); var optTableOption1 = {}, IDDescription: "TableOption1Filtrar (Avançado)", Objects: _objectsTable,} Type: "FILTRARSIMPLES"var _object4 = createMenuItem(optMenuItem4); } _objects.push(_object4); var _tableOption1objectsTable2 = new createTableOption(optTableOption1)[]; var optMenuItem1optTableOptionItem6 = { ID: "MenuItem1TableOptionItem6", ActionDescription: function(){"Índice", var optPopin1 = { Type: "INDICE" ID: "Popin1", } Title: "Filtrar (Simples)",var _objectTable6 = createTableOptionItem(optTableOptionItem6); Align: "CENTER",_objectsTable2.push(_objectTable6); Modal: true,var optTableOptionItem7 = { ObjectContentID: _tableOption1.Object"TableOptionItem7", } Description: "Título", createPopin(optPopin1); Type: "TITULO" var _nameParent = this.getAttribute("Parent"); var _nameInstance = _nameParent.replace("_MostExternalDiv",""); } var _instanceobjectTable7 = window.Menus[_nameInstance]createTableOptionItem(optTableOptionItem7); _instanceobjectsTable2.Hidepush(_objectTable7); _instance.Parent.UndoHighlightMenu();var optTableOptionItem8 = { ID: "TableOptionItem8", }Description: "Sub-título", DescriptionType: "Filtrar (Simples)"SUBTITULO" } var _object1objectTable8 = createMenuItemcreateTableOptionItem(optMenuItem1optTableOptionItem8); _objectsobjectsTable2.push(_object1objectTable8); var optMenuItem4optTableOptionItem9 = { ID: "MenuItem4TableOptionItem9", ActionDescription: function(){"Descrição", var optPopin4 = { Type: "DESCRICAO" ID: "Popin4", } Title: "Filtrar (Avançado)", var _objectTable9 = createTableOptionItem(optTableOptionItem9); _objectsTable2.push(_objectTable9); var optTableOptionItem10 = { InnerHTMLID: "testeTableOptionItem10", AlignDescription: "CENTERData Criação", ModalType: true "DATA" } createPopin(optPopin4);} var _nameParentobjectTable10 = this.getAttribute("Parent"createTableOptionItem(optTableOptionItem10); var _nameInstance = _nameParent.replace("_MostExternalDiv",""_objectsTable2.push(_objectTable10); var _instanceoptTableOption2 = window.Menus[_nameInstance]; { _instance.Hide();ID: "TableOption2", _instance.Parent.UndoHighlightMenu(); }Objects: _objectsTable2, DescriptionType: "Filtrar (Avançado)FILTRARSIMPLES" } var _object4tableOption2 = createMenuItem(optMenuItem4); _objects.push(_object4); new createTableOption(optTableOption2); var optMenuItem2 = { ID: "MenuItem2", Action: function(){ var optPopin2 = { ID: "Popin2", Title: "Ordenar", InnerHTMLAlign: "testeCENTER", AlignModal: "CENTER"true, ModalObjectContent: true_tableOption2.Object } createPopin(optPopin2); var _nameParent = this.getAttribute("Parent"); var _nameInstance = _nameParent.replace("_MostExternalDiv",""); var _instance = window.Menus[_nameInstance]; _instance.Hide(); _instance.Parent.UndoHighlightMenu(); }, Description: "Ordenar" } var _object2 = createMenuItem(optMenuItem2); _objects.push(_object2); if(this.Collapsible){ var optMenuItem5 = { ID: "MenuItem5", Action: function(){ var _nameParent = this.getAttribute("Parent"); var _nameInstance = _nameParent.replace("_MostExternalDiv",""); var _instance = window.Menus[_nameInstance]; _instance.Parent.Object.style.height = (_instance.Parent.MaxHeight > 0) ? _instance.Parent.MaxHeight + "px" : _instance.Parent.Object.style.height; _instance.Parent.Collapse(); var _status = _instance.Parent.Status; if(_status == "OPENED") document.getElementById(this.id + "_Description").innerHTML = "Retrair"; else document.getElementById(this.id + "_Description").innerHTML = "Expandir"; _instance.Hide(); _instance.Parent.UndoHighlightMenu(); }, Description: "Retrair" } var _object5 = createMenuItem(optMenuItem5); _objects.push(_object5); } var optMenuItem3 = { ID: "MenuItem3", Action: function(){ var optPopin3 = { ID: "Popin3", Title: "Trocar Visualização", InnerHTML: "teste", Align: "CENTER", Modal: true } createPopin(optPopin3); var _nameParent = this.getAttribute("Parent"); var _nameInstance = _nameParent.replace("_MostExternalDiv",""); var _instance = window.Menus[_nameInstance]; _instance.Hide(); _instance.Parent.UndoHighlightMenu(); }, Description: "Trocar Visualização" } var _object3 = createMenuItem(optMenuItem3); _objects.push(_object3); var optMenu1 = { ID: "Menu1", Objects: _objects, Wrapper: _collapsiblePanelObjectHeadMenu.id } this.MenuInstance = createMenu(optMenu1); this.MenuInstance.Parent = this; this.Object = _collapsiblePanelObject; if(window["CollapsiblePanels"] == undefined) window["CollapsiblePanels"] = []; window.CollapsiblePanels[this.ID] = this; window.CollapsiblePanels[window.CollapsiblePanels.length] = this; window["CurrentCollapsiblePanel"] = this.ID; SetControlEvents(_collapsiblePanelObjectHeadMenu.id, "MOVER", function(){ var __img = this; var _nameInstance = this.id.replace("_MostExternalDiv_Head_Menu", "") var _menu1 = window.CollapsiblePanels[_nameInstance].MenuInstance; if(_menu1.Status == "HIDDEN"){ __img.style.backgroundColor = "#909090"; __img.style.cursor= "pointer"; } }); SetControlEvents(_collapsiblePanelObjectHeadMenu.id, "MOUT", function(){ var __img = this; var _nameInstance = this.id.replace("_MostExternalDiv_Head_Menu", "") var _menu1 = window.CollapsiblePanels[_nameInstance].MenuInstance; if(_menu1.Status == "HIDDEN"){ __img.style.backgroundColor = "#606060"; __img.style.cursor= "default"; } }); SetControlEvents(_collapsiblePanelObjectHeadMenu.id, "CLICK", function(){ var _nameInstance = this.id.replace("_MostExternalDiv_Head_Menu", "") var _menu1 = window.CollapsiblePanels[_nameInstance].MenuInstance; window.CurrentCollapsiblePanel = _nameInstance; _menu1.Show(); var _object = _menu1.Object; _object.style.border = "1px solid #f6c342"; _object.style.width = "168px"; var __img = this; if(_menu1.Status == "OPENED"){ __img.style.backgroundColor = "#909090"; __img.style.cursor= "pointer"; __img.style.border = "1px solid #f6c342"; __img.style.borderBottom = "1px solid #909090" } else{ __img.style.border = "1px solid #606060"; } }); window.onresize = function(){ var _menu1 = window.Menus[window.CurrentMenu]; if(_menu1){ _menu1.Hide(); _menu1.UpdatePosition(_menu1.Object, _menu1.TopBorderObject); _menu1.Parent.UndoHighlightMenu(); } } return this; } this.UndoHighlightMenu = function(){ document.getElementById(this.ID + "_MostExternalDiv_Head_Menu").style.border = "1px solid #606060"; document.getElementById(this.ID + "_MostExternalDiv_Head_Menu").style.backgroundColor = "#606060"; } return this.LoadComponents(optCollapsiblePanel); } return new oCollapsiblePanel(optCollapsiblePanel); } createPopin = function(optPopin){ var oPopin = function(optPopin){ this.ID = "popin1"; this.Title = ""; this.InnerHTML = ""; this.Align = ""; this.Modal = false; this.Object = ""; this.ModalObject = ""; this.Parent = ""; this.ObjectContent = ""; this.LoadComponents = function(optPopin){ var _popinObject = null; var _popinObjectHead = null; var _popinObjectHeadTitle = null; var _popinObjectHeadClose = null; var _popinObjectHeadCloseImg = null; var _popinObjectBody = null; var _popinObjectModal = null; this.ID = optPopin.ID; this.Title = optPopin.Title; this.InnerHTML = optPopin.InnerHTML; this.Align = optPopin.Align; this.Modal = optPopin.Modal; this.ObjectContent = optPopin.ObjectContent; _popinObject = document.createElement("div"); _popinObject.id = this.ID + "_MostExternalDiv"; _popinObject.style.display = "block"; _popinObject.style.position = "absolute"; _popinObject.style.zIndex = "6"; _popinObject.style.width = "400px"; _popinObject.style.height = "300px"; _popinObject.style.top = "50%"; _popinObject.style.left = "50%"; _popinObject.style.marginLeft = "-200px"; _popinObject.style.marginTop = "-150px"; _popinObject.style.backgroundColor = "#909090"; _popinObject.style.border= "1px solid #f6c342"; _popinObject.style.background = "url(http://tdn.totvs.com/download/attachments/243011209/1600cefc.png?version=1&modificationDate=1485184017639&api=v2)"; _popinObject.style.webkitBoxShadow = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; _popinObject.style.mozBoxShadow = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; _popinObject.style.boxShadow = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; _popinObjectModal = document.createElement("div"); _popinObjectModal.id = this.ID + "_MostExternalDiv"; _popinObjectModal.style.display = "block"; _popinObjectModal.style.position = "absolute"; _popinObjectModal.style.zIndex = "5"; _popinObjectModal.style.width = "100%"; _popinObjectModal.style.height = "100%"; _popinObjectModal.style.top = "0px"; _popinObjectModal.style.left = "0px"; _popinObjectModal.style.background = "rgba(0, 0, 0, 0.4)"; if(!this.Modal) _popinObjectModal.style.display = "none"; _popinObjectHead = document.createElement("div"); _popinObjectHead.id = _popinObject.id + "_Head"; _popinObjectHead.style.width = "100%"; _popinObjectHead.style.height = "35px"; _popinObjectHead.style.background = "#606060"; _popinObjectHead.style.paddingTop = "5px"; _popinObjectHead.style.webkitBoxShadow = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; _popinObjectHead.style.mozBoxShadow = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; _popinObjectHead.style.boxShadow = "3px 3px 10px 3px rgba(100, 100, 100, 0.7)"; _popinObject.appendChild(_popinObjectHead); _popinObjectHeadTitle = document.createElement("span"); _popinObjectHeadTitle.id = _popinObjectHead.id + "_Title"; _popinObjectHeadTitle.innerHTML = this.Title; _popinObjectHeadTitle.style.fontFamily = "Segoe UI, Candara, Bitstream Vera Sans, DejaVu Sans, Bitstream Vera Sans, Trebuchet MS, Verdana, Verdana Ref, sans-serif"; _popinObjectHeadTitle.style.fontSize = "14pt"; _popinObjectHeadTitle.style.color = "#fff"; _popinObjectHeadTitle.style.paddingLeft = "10px"; _popinObjectHead.appendChild(_popinObjectHeadTitle); _popinObjectHeadClose = document.createElement("div"); _popinObjectHeadClose.id = _popinObjectHead.id + "_Close"; _popinObjectHeadClose.style.width = "16px"; _popinObjectHeadClose.style.height = "16px"; _popinObjectHeadClose.style.float = "right"; _popinObjectHeadClose.style.marginTop = "5px"; _popinObjectHeadClose.style.marginRight = "10px"; SetControlEvents(_popinObjectHeadClose, "CLICK", function(){ var _nameInstance = this.id.replace("_MostExternalDiv_Head_Close",""); var _instance = window.Popins[_nameInstance]; _instance.Close(); }); SetControlEvents(_popinObjectHeadClose, "MOVER", function(){ this.style.cursor = "pointer"; }); SetControlEvents(_popinObjectHeadClose, "MOUT", function(){ this.style.cursor = "default"; }); _popinObjectHeadCloseImg = document.createElement("img"); _popinObjectHeadCloseImg.id = _popinObjectHeadClose.id + "_Img"; _popinObjectHeadCloseImg.name = _popinObjectHeadClose.id + "_Img"; _popinObjectHeadCloseImg.src = "http://tdn.totvs.com/download/attachments/243011209/close.png?version=1&modificationDate=1487769419003&api=v2"; _popinObjectHeadCloseImg.style.width = "16px"; _popinObjectHeadCloseImg.style.height = "16px"; _popinObjectHead.appendChild(_popinObjectHeadClose); _popinObjectHeadClose.appendChild(_popinObjectHeadCloseImg); _popinObjectBody = document.createElement("div"); _popinObjectBody.id = _popinObject.id + "_Body"; _popinObjectBody.style.backgroundColor = "#fff"; _popinObjectBody.style.margin= "10px"; _popinObjectBody.style.height = "240px"; _popinObjectBody.style.webkitBoxShadow = "3px 3px 3px 0px rgba(100, 100, 100, 0.4)"; _popinObjectBody.style.mozBoxShadow = "3px 3px 3px 0px rgba(100, 100, 100, 0.4)"; _popinObjectBody.style.boxShadow = "3px 3px 3px 0px rgba(100, 100, 100, 0.4)"; if(this.ObjectContent == undefined) _popinObjectBody.innerHTML = this.InnerHTML; else _popinObjectBody.appendChild(this.ObjectContent); _popinObject.appendChild(_popinObjectBody); document.body.appendChild(_popinObject); document.body.appendChild(_popinObjectModal); this.Object = _popinObject; this.ModalObject = _popinObjectModal; if(window["Popins"] == undefined) window["Popins"] = []; window.Popins[this.ID] = this; window.Popins[window.Popins.length] = this; window["CurrentPopin"] = this.ID; return this; } this.Close = function(){ document.body.removeChild(this.Object); document.body.removeChild(this.ModalObject); }; return this.LoadComponents(optPopin); } return new oPopin(optPopin); } createMenu = function(optMenu){ var oMenu = function(optMenu){ this.ID = "menu1"; this.Objects = {}; this.Wrapper = ""; this.Status = "HIDDEN"; this.Object = ""; this.TopBorderObject = ""; this.Parent = ""; this.LoadComponents = function(optMenu){ var _menuObject = null; var _menuObjectContainer = null; this.ID = optMenu.ID; this.Objects = optMenu.Objects; this.Wrapper = optMenu.Wrapper; _menuObjectTopBorder = document.createElement("div"); _menuObjectTopBorder.id = this.ID + "_TopBorder"; _menuObjectTopBorder.style.display = "none"; _menuObjectTopBorder.style.position = "absolute"; _menuObjectTopBorder.style.backgroundColor = "#909090"; _menuObjectTopBorder.style.width = "26px"; _menuObjectTopBorder.style.height = "1px"; _menuObjectTopBorder.style.zIndex = "2"; _menuObject = document.createElement("div"); _menuObject.id = this.ID + "_MostExternalDiv"; _menuObject.style.display = "none"; _menuObject.style.position = "absolute"; _menuObject.style.width = "170px"; _menuObject.style.backgroundColor= "#909090"; _menuObjectContainer = document.createElement("div"); _menuObjectContainer.id = _menuObject.id + "_Container"; _menuObjectContainer.style.width = "150px"; _menuObjectContainer.style.margin = "10px"; for(var i = 0; i < this.Objects.length; i++){ _menuObjectContainer.appendChild(this.Objects[i]); this.Objects[i].setAttribute("Parent", _menuObject.id); } _menuObject.appendChild(_menuObjectContainer); document.getElementById("main").appendChild(_menuObject); document.getElementById(this.Wrapper).appendChild(_menuObjectTopBorder); this.UpdatePosition(_menuObject, _menuObjectTopBorder); this.TopBorderObject = _menuObjectTopBorder; this.Object = _menuObject; if(window["Menus"] == undefined) window["Menus"] = []; window.Menus[this.ID] = this; window.Menus[window.Menus.length] = this; window["CurrentMenu"] = this.ID; return this; } this.UpdatePosition = function(_menuObject, _topBorderObject){ if(_menuObject){ _menuObject.style.left = (document.getElementById(this.Wrapper).offsetLeft - 142) + "px"; _menuObject.style.top = (document.getElementById(this.Wrapper).offsetTop + 26) + "px"; } if(_topBorderObject){ _topBorderObject.style.top = (document.getElementById(this.Wrapper).offsetTop + 26) + "px"; } } this.Show = function(){ if(this.Status == "HIDDEN"){ this.Status = "OPENED"; this.Object.style.display = "block"; this.TopBorderObject.style.display = "block"; } else this.Hide(); }; this.Hide = function(){ if(this.Status == "OPENED"){ this.Status = "HIDDEN"; this.Object.style.display = "none"; this.TopBorderObject.style.display = "none" } }; return this.LoadComponents(optMenu); } return new oMenu(optMenu); } createMenuItem = function(optMenuItem){ var oMenuItem = function(optMenuItem){ this.ID = "menuItem1"; this.Action = ""; this.Description = ""; this.Parent = ""; this.LoadComponents = function(optMenuItem){ var _menuItemObject = null; var _menuItemObjectDescription = null; this.ID = optMenuItem.ID; this.Action = optMenuItem.Action; this.Description = optMenuItem.Description; _menuItemObject = document.createElement("div"); _menuItemObject.id = this.ID + "_MostExternalDiv"; _menuItemObject.style.padding = "5px"; SetControlEvents(_menuItemObject, "MOVER", function(){ this.style.backgroundColor = "#f6c342"; this.style.cursor = "pointer"; document.getElementById(this.id + "_Description").style.color = "#000"; }); SetControlEvents(_menuItemObject, "MOUT", function(){ this.style.backgroundColor = "#909090"; this.style.cursor = "default"; document.getElementById(this.id + "_Description").style.color = "#fff"; }); SetControlEvents(_menuItemObject, "CLICK", this.Action); _menuItemObjectDescription = document.createElement("span"); _menuItemObjectDescription.id = _menuItemObject.id + "_Description"; _menuItemObjectDescription.innerHTML = this.Description; _menuItemObjectDescription.style.fontFamily = "Segoe UI, Candara, Bitstream Vera Sans, DejaVu Sans, Bitstream Vera Sans, Trebuchet MS, Verdana, Verdana Ref, sans-serif"; _menuItemObjectDescription.style.fontSize = "10pt"; _menuItemObjectDescription.style.color = "#fff"; _menuItemObject.appendChild(_menuItemObjectDescription); return _menuItemObject; } return this.LoadComponents(optMenuItem); } return oMenuItem(optMenuItem); } createContainer = function(optContainer){ var oContainer = function(optContainer){ this.ID = "container1"; this.Title = ""; this.SubTitle = ""; this.ImageUrl = ""; this.Description = ""; this.NavigateUrl = ""; this.Wrapper = ""; this.Parent = ""; this.Date = ""; this.Object = ""; this.LoadComponents = function(optContainer){ var _containerObject = null; var _containerObjectTitle = null; var _containerObjectSubTitle = null; var _containerObjectImageBackground = null; var _containerObjectImageBackgroundImg = null; var _containerObjectDescription = null; var _containerObjectSep = null; var _containerObjectMaisInfo = null; var _containerObjectMaisInfoA = null; this.ID = optContainer.ID this.Title = optContainer.Title; this.SubTitle = optContainer.SubTitle; this.ImageUrl = optContainer.ImageUrl; this.Description = optContainer.Description; this.NavigateUrl = optContainer.NavigateUrl; this.Wrapper = optContainer.Wrapper; this.Date = optContainer.Date; this.Parent = optContainer.Parent; _containerObject = document.createElement("div"); _containerObject.id = this.ID + "_MostExternalDiv"; _containerObject.style.width = "250px"; _containerObject.style.height = "auto"; _containerObject.style.background = "#fff"; _containerObject.style.border = "1px solid #c0c0c0"; _containerObject.style.padding = "10px"; _containerObject.style.margin = "10px"; _containerObject.style.float = "left"; _containerObject.style.position = "relative"; _containerObject.style.webkitBoxShadow = "3px 3px 3px 0px rgba(100, 100, 100, 0.4)"; _containerObject.style.mozBoxShadow = "3px 3px 3px 0px rgba(100, 100, 100, 0.4)"; _containerObject.style.boxShadow = "3px 3px 3px 0px rgba(100, 100, 100, 0.4)"; _containerObjectTitle = document.createElement("div"); _containerObjectTitle.id = _containerObject .id + "_Title"; _containerObjectTitle.style.fontFamily = "Segoe UI, Candara, Bitstream Vera Sans, DejaVu Sans, Bitstream Vera Sans, Trebuchet MS, Verdana, Verdana Ref, sans-serif"; _containerObjectTitle.style.fontSize = "16pt"; _containerObjectTitle.style.width = "100%"; _containerObjectTitle.style.height = "30px"; _containerObjectTitle.style.textAlign = "center"; _containerObjectTitle.innerHTML = this.Title; _containerObject.appendChild(_containerObjectTitle); _containerObjectSubTitle = document.createElement("div"); _containerObjectSubTitle.id = _containerObject .id + "_SubTitle"; _containerObjectSubTitle.style.fontFamily = "Segoe UI, Candara, Bitstream Vera Sans, DejaVu Sans, Bitstream Vera Sans, Trebuchet MS, Verdana, Verdana Ref, sans-serif"; _containerObjectSubTitle.style.fontSize = "14pt"; _containerObjectSubTitle.style.width = "100%"; _containerObjectSubTitle.style.height = "35px"; _containerObjectSubTitle.style.textAlign = "center"; _containerObjectSubTitle.innerHTML = this.SubTitle; _containerObject.appendChild(_containerObjectSubTitle); _containerObjectImageBackground = document.createElement("div"); _containerObjectImageBackground.id = _containerObject .id + "_ImageBackground"; _containerObjectImageBackground.style.background = "url('http://365psd.com/images/previews/562/grey-corporate-business-technology-background-free-34160.jpg')"; _containerObjectImageBackground.style.backgroundPosition = "center bottom"; _containerObjectImageBackground.style.width = "100%"; _containerObjectImageBackground.style.height = "100px"; _containerObjectImageBackground.style.position= "relative"; _containerObjectImageBackgroundImg = document.createElement("img"); _containerObjectImageBackgroundImg.id = _containerObjectImageBackground.id + "_img"; _containerObjectImageBackgroundImg.name = _containerObjectImageBackground.id + "_img"; _containerObjectImageBackgroundImg.style.position = "absolute"; _containerObjectImageBackgroundImg.style.top = "15px"; _containerObjectImageBackgroundImg.style.left = "15px"; _containerObjectImageBackgroundImg.src = this.ImageUrl; _containerObjectImageBackground.appendChild(_containerObjectImageBackgroundImg); _containerObject.appendChild(_containerObjectImageBackground); _containerObjectDescription = document.createElement("div"); _containerObjectDescription.id = _containerObject .id + "_Description"; _containerObjectDescription.style.fontFamily = "Segoe UI, Candara, Bitstream Vera Sans, DejaVu Sans, Bitstream Vera Sans, Trebuchet MS, Verdana, Verdana Ref, sans-serif"; _containerObjectDescription.style.fontSize = "12pt"; _containerObjectDescription.style.width = "100%"; _containerObjectDescription.style.height = "135px"; _containerObjectDescription.style.textAlign = "justify"; _containerObjectDescription.innerHTML = this.Description; _containerObject.appendChild(_containerObjectDescription); _containerObjectSep = document.createElement("div"); _containerObjectSep.id = _containerObject .id + "_Sep"; _containerObjectSep.style.width = "100%"; _containerObjectSep.style.height = "1px"; _containerObjectSep.style.backgroundColor = "#c0c0c0"; _containerObjectSep.style.marginTop = "15px"; _containerObject.appendChild(_containerObjectSep); _containerObjectMaisInfo = document.createElement("div"); _containerObjectMaisInfo.id = _containerObject .id + "_MaisInfo"; _containerObjectMaisInfo.style.width = "100%"; _containerObjectMaisInfo.style.height = "20px"; _containerObjectMaisInfo.style.textAlign = "right"; _containerObjectMaisInfo.style.paddingTop = "5px"; _containerObjectMaisInfoA = document.createElement("a"); _containerObjectMaisInfoA.id = _containerObjectMaisInfo.id + "_A"; _containerObjectMaisInfoA.name = _containerObjectMaisInfo.id + "_A"; _containerObjectMaisInfoA.href = this.NavigateUrl; _containerObjectMaisInfoA.text = "Mais [...]"; _containerObjectMaisInfo.appendChild(_containerObjectMaisInfoA); _containerObjectDate = document.createElement("span"); _containerObjectDate.id = _containerObject .id + "_MaisInfo"; _containerObjectDate.style.width = "auto"; _containerObjectDate.style.float = "left"; _containerObjectDate.innerHTML = this.Date; _containerObjectMaisInfo.appendChild(_containerObjectDate); _containerObject.appendChild(_containerObjectMaisInfo); document.getElementById(this.Wrapper).appendChild(_containerObject); this.Object = _containerObject; if(window["Containers"] == undefined) window["Containers"] = []; window.Containers[this.ID] = this; window.Containers[window.Containers.length] = this; window["CurrentContainer"] = this.ID; return this; } return this.LoadComponents(optContainer); } return new oContainer(optContainer); } createTableOption = function(optTableOption){ var oTableOption= function(optTableOption){ this.ID = "tableOption1"; this.Objects = {}; this.Object = ""; this.Parent = ""; this.InnerHTML = ""; this.Type = "" this.LoadComponents = function(optTableOption){ var _tableObject = null; var _tableObjectContainer = null; this.ID = optTableOption.ID; this.Objects = optTableOption.Objects; this.Type = optTableOption.Type; _tableObject = document.createElement("div"); _tableObject.id = this.ID + "_MostExternalDiv"; _tableObject.style.display = "block"; _tableObject.style.position = "absolute"; _tableObject.style.width = "380px"; _tableObject.style.backgroundColor= "#909090"; _tableObjectContainer = document.createElement("div"); _tableObjectContainer.id = _tableObject.id + "_Container"; _tableObjectContainer.style.width = "100%"; for(var i = 0; i < this.Objects.length; i++){ _tableObjectContainer.appendChild(this.Objects[i]); this.Objects[i].setAttribute("Parent", _tableObject.id); this.Objects[i].setAttribute("Type", this.Type); } _tableObject.appendChild(_tableObjectContainer); var _divResult = document.createElement("div"); _divResult.appendChild(_tableObject); this.InnerHTML = _divResult.innerHTML; this.Object = _tableObject; if(window["TableOptions"] == undefined) window["TableOptions"] = []; window.TableOptions[this.ID] = this; window.TableOptions[window.TableOptions.length] = this; window["CurrentTableOption"] = this.ID; return this; } return this.LoadComponents(optTableOption); } return new oTableOption(optTableOption); } createTableOptionItem = function(optTableOptionItem){ var oTableOptionItem = function(optTableOptionItem){ this.ID = "optionTableItem1"; this.Action = ""; this.Description = ""; this.Parent = ""; this.Type = ""; this.HoverAction = ""; this.OutAction = ""; this.LoadComponents = function(optTableOptionItem){ var _optionTableItemObject = null; var _optionTableItemObjectDescription = null; this.ID = optTableOptionItem.ID; this.Action = optTableOptionItem.Action; this.Description = optTableOptionItem.Description; this.Type = optTableOptionItem.Type; this.HoverAction = optTableOptionItem.HoverAction; this.OutAction = optTableOptionItem.OutAction; _optionTableItemObject = document.createElement("div"); _optionTableItemObject.id = this.ID + "_MostExternalDiv"; _optionTableItemObject.style.padding = "5px"; _optionTableItemObject.style.border = "5px solid #fff"; _optionTableItemObject.style.borderBottom = "none"; if(typeof(this.HoverAction) != "function"){ SetControlEvents(_optionTableItemObject, "MOVER", function(){ this.style.backgroundColor = "#f6c342"; this.style.cursor = "pointer"; document.getElementById(this.id + "_Description").style.color = "#000"; }); } else SetControlEvents(_optionTableItemObject, "MOVER", this.HoverAction); if(typeof(this.OutAction) != "function"){ SetControlEvents(_optionTableItemObject, "MOUT", function(event, _outAction){ this.style.backgroundColor = "#909090"; this.style.cursor = "default"; document.getElementById(this.id + "_Description").style.color = "#fff"; }); } else SetControlEvents(_optionTableItemObject, "MOUT", this.OutAction); SetControlEvents(_optionTableItemObject, "CLICK", this.Action); _optionTableItemObjectDescription = document.createElement("span"); _optionTableItemObjectDescription.id = _optionTableItemObject.id + "_Description"; _optionTableItemObjectDescription.innerHTML = this.Description; _optionTableItemObjectDescription.style.fontFamily = "Segoe UI, Candara, Bitstream Vera Sans, DejaVu Sans, Bitstream Vera Sans, Trebuchet MS, Verdana, Verdana Ref, sans-serif"; _optionTableItemObjectDescription.style.fontSize = "10pt"; _optionTableItemObjectDescription.style.color = "#fff"; _optionTableItemObjectDescription.setAttribute("Type", this.Type); _optionTableItemObject.appendChild(_optionTableItemObjectDescription); return _optionTableItemObject; } return this.LoadComponents(optTableOptionItem); } return oTableOptionItem(optTableOptionItem); } Load = function(){ var optCollapsiblePanel1 = { ID: "CollapsiblePanel1", Collapsible: true, Title: "Últimos documentos criados", Wrapper: "myContent" } _collapsiblePanel1 = createCollapsiblePanel(optCollapsiblePanel1); var oContainer1Opt = { ID: "container1", Title: "Expressão", SubTitle: "(Passo a Passo)", ImageUrl: "http://tdn.totvs.com/download/attachments/243011209/expression.png?version=1&modificationDate=1487769009782&api=v2", Description: "O componente expressão tem várias propriedades, e o entendimento das mesmas é necessário para uma correta configuração do componente.", NavigateUrl: "http://tdn.totvs.com/pages/viewpage.action?pageId=270909667", Wrapper: "CollapsiblePanel1_MostExternalDiv", Date: '12/01/2017', Parent: _collapsiblePanel1 } var _container1 = createContainer(oContainer1Opt); var oContainer2Opt = { ID: "container2", Title: "Texto Rico", SubTitle: "(Limitações Design)", ImageUrl: "http://tdn.totvs.com/download/attachments/243011209/richtext.png?version=1&modificationDate=1487769011698&api=v2", Description: "Serão apresentadas nesse documento algumas inconsistências que podem ocorrer, ao se utilizar o componente de Texto Rico (XtraRichText).", NavigateUrl: "", Wrapper: "CollapsiblePanel1_MostExternalDiv", Date: '14/01/2017', Parent: _collapsiblePanel1 } var _container2 = createContainer(oContainer2Opt); var oContainer7Opt = { ID: "container7", Title: "Texto Rico", SubTitle: "(Referências)", ImageUrl: "http://tdn.totvs.com/download/attachments/243011209/richtext.png?version=1&modificationDate=1487769011698&api=v2", Description: "", NavigateUrl: "", Wrapper: "CollapsiblePanel1_MostExternalDiv", Date: '16/01/2017', Parent: _collapsiblePanel1 } var _container7 = createContainer(oContainer7Opt); var oContainer3Opt = { ID: "container3", Title: "Exportação PDF", SubTitle: "(Conformidade e Versões)", ImageUrl: "http://tdn.totvs.com/download/attachments/243011209/pdf.png?version=1&modificationDate=1487769196130&api=v2", Description: "O PDF/A baseia-se na versão 1.4 do PDF de referência da Adobe Systems Inc. e é definido pela norma ISO 19005-1:2005.", NavigateUrl: "", Wrapper: "CollapsiblePanel1_MostExternalDiv", Date: '18/01/2017', Parent: _collapsiblePanel1 } var _container3 = createContainer(oContainer3Opt); var oContainer4Opt = { ID: "container4", Title: "Imagem", SubTitle: "(Exportação Para HTML)", ImageUrl: "http://tdn.totvs.com/download/attachments/243011209/image.png?version=1&modificationDate=1487769196476&api=v2", Description: "1.1 - Ao gerar o relatório, na etapa Tipo de Geração, escolha Exportação Para Arquivo. 1.2 - Na Etapa Tipo de Saída, Escolha o tipo Formato de página da Internet (HTML).", NavigateUrl: "", Wrapper: "CollapsiblePanel1_MostExternalDiv", Date: '20/01/2017', Parent: _collapsiblePanel1 } var _container4 = createContainer(oContainer4Opt); var oContainer5Opt = { ID: "container5", Title: "Controles", SubTitle: "(Prop. Arredondar Valor)", ImageUrl: "http://tdn.totvs.com/download/attachments/243011209/controls.png?version=1&modificationDate=1487769196842&api=v2", Description: "A propriedade Arredondar Valor faz com que valores formatados sejam ou não arredondados. Essa propriedade está presente nos controles do relatório de Texto, Expressão, Fórmula e Totalizador.", NavigateUrl: "", Wrapper: "CollapsiblePanel1_MostExternalDiv", Date: '22/01/2017', Parent: _collapsiblePanel1 } var _container5 = createContainer(oContainer5Opt); var oContainer6Opt = { ID: "container6", Title: "Controles", SubTitle: "(Sobreposição dos controles)", ImageUrl: "http://tdn.totvs.com/download/attachments/243011209/controls.png?version=1&modificationDate=1487769196842&api=v2", Description: "Na versão 14.1 da devex, a sobreposição de campos pode ocasionar falhas na apresentação do design do relatório. Essas falhas ocorrem quando exportamos para HTML, XLS e outros...", NavigateUrl: "", Wrapper: "CollapsiblePanel1_MostExternalDiv", Date: '24/01/2017', Parent: _collapsiblePanel1 } var _container6 = createContainer(oContainer6Opt); _collapsiblePanel1.BuildFilterStructure(); } SetControlEvents = function(_control, _event, _function){ var __control = null; if(typeof(_control) == "object") __control = _control; else __control = document.getElementById(_control); if(_event.toString().toUpperCase() == "CLICK") __control.onclick = _function; else if(_event.toString().toUpperCase() == "MOVER") __control.onmouseover = _function; else if(_event.toString().toUpperCase() == "MOUT") __control.onmouseout = _function; } Load(); _collapsiblePanel1.MaxHeight = _collapsiblePanel1.Object.offsetHeight; _collapsiblePanel1.Object.style.height = _collapsiblePanel1.Object.offsetHeight + "px"; </script> |
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas