Commit 42943f3805f3191c80d2515b750b03c243dad70a

Authored by bshuttle
1 parent 505ac394

- use inline links better (manageStates)

- catch a links inside ktDelete spans
- allow search to work on groups.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4785 c91229c3-7414-0410-bfa2-8a42b809f60b
resources/js/kt-utility.js
@@ -10,6 +10,11 @@ function initDeleteProtection(message) { @@ -10,6 +10,11 @@ function initDeleteProtection(message) {
10 10
11 function setClickFunction(fn, node) { 11 function setClickFunction(fn, node) {
12 // addToCallStack(node,'onClick',fn); 12 // addToCallStack(node,'onClick',fn);
  13 + if (node.tagName == 'SPAN') {
  14 + var ahrefs = node.getElementsByTagName('A');
  15 + if (ahrefs.length == 1) { node = ahrefs[0]; }
  16 + else { return null; }
  17 + }
13 if (isUndefinedOrNull(node.onclick)) { 18 if (isUndefinedOrNull(node.onclick)) {
14 node.onclick = fn; 19 node.onclick = fn;
15 } 20 }
@@ -17,4 +22,8 @@ function initDeleteProtection(message) { @@ -17,4 +22,8 @@ function initDeleteProtection(message) {
17 22
18 forEach(elements, partial(setClickFunction, fn)); 23 forEach(elements, partial(setClickFunction, fn));
19 24
  25 + elements = getElementsByTagAndClassName('SPAN', 'ktDelete');
  26 +
  27 + forEach(elements, partial(setClickFunction, fn));
  28 +
20 } 29 }
21 \ No newline at end of file 30 \ No newline at end of file
templates/ktcore/principals/groupadmin.smarty
@@ -8,6 +8,7 @@ number of different users at once.{/i18n}</p> @@ -8,6 +8,7 @@ number of different users at once.{/i18n}</p>
8 </fieldset> 8 </fieldset>
9 <!-- we roll both in here. --> 9 <!-- we roll both in here. -->
10 <form action="{$smarty.server.PHP_SELF}" method="POST"> 10 <form action="{$smarty.server.PHP_SELF}" method="POST">
  11 +<input type="hidden" name="do_search" value="1" />
11 <fieldset> 12 <fieldset>
12 <legend>{i18n}Search for groups{/i18n}</legend> 13 <legend>{i18n}Search for groups{/i18n}</legend>
13 <p class="descriptiveText">{i18n}Since there may be many groups in the 14 <p class="descriptiveText">{i18n}Since there may be many groups in the
templates/ktcore/workflow/manageStates.smarty
@@ -13,9 +13,8 @@ while the workflow has no documents or document-versions assigned to the workflo @@ -13,9 +13,8 @@ while the workflow has no documents or document-versions assigned to the workflo
13 <legend>Create a new state</legend> 13 <legend>Create a new state</legend>
14 <p class="descriptiveText">A critical part of workflow is the creation of 14 <p class="descriptiveText">A critical part of workflow is the creation of
15 various different states for documents.</p> 15 various different states for documents.</p>
16 -<a href="{addQS}action=createState&fWorkflowId={$oWorkflow->getId()}{/addQS}"  
17 - class="ktAction ktInline ktAdd">{i18n}Create a new state{/i18n}</a>  
18 -<a href="{addQS}action=createState&fWorkflowId={$oWorkflow->getId()}{/addQS}">{i18n}Create a new state{/i18n}</a> 16 +<span class="ktActionLink ktAdd"><a href="{addQS}action=createState&fWorkflowId={$oWorkflow->getId()}{/addQS}"
  17 + >{i18n}Create a new state{/i18n}</a></span>
19 18
20 </fieldset> 19 </fieldset>
21 20