Jump to content

henning1518

Members
  • Content Count

    23
  • Joined

  • Last visited

  • Days Won

    11

henning1518 last won the day on March 9 2018

henning1518 had the most liked content!

Community Reputation

2 Neutral

About henning1518

  • Rank
    Level 2 Contributor

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. henning1518

    Open/save rootcause form in reading-mode?

    Found a solution from cdtj that changes the ticket status with a button. I adapted it with my needs and know it´s really ugly (Hope it will not causes problems in future): function empty_rootcause() { alert("First enter a rootcause!"); window.localStorage.setItem('rootcause_empty', 'yes'); console.log(localStorage); var status = 'KE'; var query_str = cfgCgi + "?SID=$prop.SID+FID=$prop.FID+OP=UPDATE" + "+FACTORY=cr+PERSID=" + "$args.persistent_id" + "+KEEP.new_status=" + status; browseWithURL(query_str); } function open_rootcause() { <PDM_IF "$args.rootcaue" == "" && "$prop.form_name_3" == "edit"> function emptytrue() { if (currentAction == 0 && localStorage.getItem("rootcause_empty") == "yes") { clearInterval(myInterval); ahdframe.document.getElementsByName('SET.status')[0].value = "$args.KEEP.new_status"; jQuery("label[for='df_5_2']")[0].click(); window.localStorage.removeItem('rootcause_empty'); console.log(localStorage); } } if (('$args.KEEP.new_status' != '') && ('$prop.form_name_3' == 'edit')) { var myInterval = setInterval(emptytrue, 100); } </PDM_IF> } ImgBtnCreate("btnSOLN", "Solution", 'empty_rootcause();', 1, 0); <body class="detailro" onload='loadActions();open_rootcause();' onunload="unloadActions()"> Thanks @cdtj
  2. Hi, is it possible to open the rootcause "selection form" in reading-mode when the rootcause is empty and someone is clicking the SOLN-Button? Button: ImgBtnCreate("btnSOL", "Solution", 'openrootcause();', 1, 0); openrootcause() { <PDM_IF "$args.rootcause" == ""> 1. open rootcause selection 2. Update and save ticket } Thanks a lot
  3. henning1518

    Add sample text to ticket field.

    Reset the description field on click: function resetDescription() { var d = document.main_form.elements["SET.description"]; d.value = ""; } Add event to field: <PDM_MACRO name=dtlTextbox hdr="Description" attr=description colspan=5 keeplinks=yes rows=10 size=120 evt="onclick='resetDescription()'" spellchk=yes srchknow=no make_required=yes keeptags=yes> That should work.
  4. henning1518

    Add sample text to ticket field.

    Hi, to add a default text you can use Javascript: //Add text for a new ticket function standardDescription() { <PDM_IF "$args.id" == "0"> var d = document.main_form.elements["SET.description"]; d.value = "What i have to do?\n\n\nI don´t know!"; </PDM_IF> } Yo have to set the "keeptags=yes" to the description field when you want to use new lines etc.. <PDM_MACRO name=dtlTextbox hdr="Description" attr=description colspan=5 keeplinks=yes rows=10 size=120 spellchk=yes srchknow=no make_required=yes keeptags=yes> Load the function in the body section: <body class="detailro" onload='loadActions();standartDescription();' onunload="unloadActions()"> But i don´t know how you can delete Text with "onfocus()". It may be possible to use the implemented reset function ?
  5. henning1518

    Customize KD captions ?

    Just found it in the Optionmanager....
  6. Hello there, how can i customize the captions for knowledge documents fields in kt_document_view.htmpl or kd_list htmpl ? I looked everywhere but can´t find the right file. Thanks a lot.
  7. I found a solution that works for me: function zgroupauto() { document.main_form.elements["SET.group"].value = "5F3093F261DB11479D828B6338780664"; document.main_form.elements["group_combo_name"].value = "Testgroup"; } <PDM_SET args.CST_defaultgroup=0> <PDM_LIST PREFIX=list WHERE="member=U'$cst.id'" FACTORY="grpmem" SORT="group"> <PDM_IF "$list.group" == "5F3093F261DB11479D828B6338780664"> <PDM_SET args.CST_defaultgroup=1> </PDM_IF> </PDM_LIST> <PDM_IF "$args.CST_defaultgroup" == 1> <body class="detailro" onload="loadActions();zgroupauto();" onunload="unloadActions()"> <PDM_ELSE> <body class="detailro" onload="loadActions();" onunload="unloadActions()"> </PDM_IF> Can i make it better ?
  8. Hi, is it possible to set a default value for the field "Group" (dtlookup) ? My Code: <PDM_SET args.CST_defaultgroup=0> <PDM_LIST PREFIX=list WHERE="member=U'$cst.id'" FACTORY="grpmem" SORT="group"> <PDM_IF "$list.group" == "5F3093F261DB11479D828B6338780664"> <PDM_SET args.CST_defaultgroup=1> </PDM_IF> </PDM_LIST> <PDM_IF "$args.CST_defaultgroup" == 1> <PDM_MACRO name=dtlLookup hdr="Group" attr=group evt="onBlur=\\\"detailSyncEditForms(this)\\\"" make_required=yes > <PDM_ELSE> ..... thanks.
  9. Hi all, is it possible to change the display name or to expand another field of the CI in CMDB-Visualizer? For example: CI-Name --> CI-Name/serialnumber? thanks.
  10. henning1518

    How to add/modify Request Area

    Hi, thats very simple. You have to seperate the new subcategory with a dot. For example: ITAS.AMS for the first entry. For the second entry create a new category with ITAS.ATM PROVIEW. For a third level category: ITAS.AMS.Test
  11. Hi there, is it possible to search over two factories with PDM_LIST? (org and nr)I have to solve the following task: Display all CI`s from the organization that the customer belongs to... (customer --> organization --> nr) With the location it work´s very well: <PDM_LIST PREFIX=list FACTORY=nr WHERE="location.id=U'$args.customer.location.id' and z_zd IS NOT NULL" ESC_STYLE=HTML> <TD VALIGN=TOP class=detailro>$list.model.sym</TD> <TD VALIGN=TOP class=detailro>$list.z_zd.sym</TD> <TD VALIGN=TOP class=detailro>$list.class.type</TD> .... Thank you.
  12. henning1518

    Clear property fields when copying a CR

    That works fine: function zClearProp() { if (location.href.indexOf('METHOD=copy_cr') > 0) { var i; //Maximum porperties for (i=0; i<=22; i++) { document.main_form.elements["SET.prop"+ i +".value"].value = ""; } } } ........ body class="detailro" onload="loadActions();zClearProp();" onunload="unloadActions()">
  13. Hello, when i copy a cr with filled property values, the fields will also filled in the new cr. How can i prevent this? tmplcopy_site.spl? But i don´t now the right syntax. Thanks.
  14. henning1518

    Using jquery to hide row in table

    Thanks that works
  15. Hi, i have a problem to hide rows in a table with jquery. The rows have only a text value. It works perfect with columns. Codesample of table in cmdb_versioning_tab.htmpl: <table width="100%" height="100%" id="cmdbVersionDetails"> ..... <tbody><tr><td class="data" valign="top"><b>123456<b></b></b></td></tr><tr class="table_banded_row"><td class="data" valign="top">Contacts</td><td class="data" valign="top">Last change by</td><td class="data" valign="top">Doe, John</td></tr><tr class="table_row"><td class="data" valign="top">Location</td></tr> .......... </tbody></table> Hide columns: function hideColumns() { var ownerIndex = jq('th:contains("Changed by")').index(); if(ownerIndex != -1) { jq("#cmdbVersionDetails tbody tr").each(function() { jq(this).find("td:eq(" + ownerIndex + ")").remove(); jq(this).find("th:eq(" + ownerIndex + ")").remove(); }); Hide rows: function hideRows() { var ownerIndex = jq('tr:contains("Last changed by")').index(); if(ownerIndex != -1) { jq("#cmdbVersionDetails tbody tr").each(function() { jq(this).find("tr:eq(" + ownerIndex + ")").remove(); }); I've tried many many combinations..........
×