Commit b4797d4ce36d313717843ab0ffb220375d278878

Authored by bshuttle
1 parent 8184638f

- add delete-catch patch

- use ktLink in notifications
- correct editTransitions
- add "important descriptiveText" CSS class.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4781 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/templating/kt3template.inc.php
@@ -59,8 +59,15 @@ class KTPage { @@ -59,8 +59,15 @@ class KTPage {
59 $this->requireCSSResource("resources/css/kt-ie-icons.css", true); 59 $this->requireCSSResource("resources/css/kt-ie-icons.css", true);
60 /* default js files initialisation */ 60 /* default js files initialisation */
61 $aJS = Array(); 61 $aJS = Array();
  62 + $aJS[] = 'thirdpartyjs/MochiKit/Base.js';
  63 + $aJS[] = 'thirdpartyjs/MochiKit/Iter.js';
  64 + $aJS[] = 'thirdpartyjs/MochiKit/DOM.js';
  65 + $aJS[] = 'resources/js/kt-utility.js';
62 $this->requireJSResources($aJS); 66 $this->requireJSResources($aJS);
63 67
  68 + // this is horrid, but necessary.
  69 + $this->requireJSStandalone('addLoadEvent(partial(initDeleteProtection, "' . _('Are you sure you wish to delete this item?') . '"));');
  70 +
64 /* menu initialisation*/ 71 /* menu initialisation*/
65 // FIXME: how do we want to handle the menu? 72 // FIXME: how do we want to handle the menu?
66 $this->initMenu(); 73 $this->initMenu();
resources/css/kt-framing.css
@@ -293,6 +293,11 @@ a.main_nav_item { @@ -293,6 +293,11 @@ a.main_nav_item {
293 color: #666; 293 color: #666;
294 } 294 }
295 295
  296 +#content .descriptiveText.important {
  297 + padding-left: 25px;
  298 + color: black;
  299 + background: transparent url(../../thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat;
  300 +}
296 301
297 302
298 303
resources/js/kt-utility.js 0 → 100644
  1 +/*
  2 + * general utility functions for KT
  3 + */
  4 +
  5 +function confirmDelete(message) { return confirm(message); }
  6 +
  7 +function initDeleteProtection(message) {
  8 + var fn = partial(confirmDelete, message);
  9 + var elements = getElementsByTagAndClassName('A','ktDelete');
  10 +
  11 + function setClickFunction(fn, node) {
  12 + // addToCallStack(node,'onClick',fn);
  13 + if (isUndefinedOrNull(node.onclick)) {
  14 + node.onclick = fn;
  15 + }
  16 + }
  17 +
  18 + forEach(elements, partial(setClickFunction, fn));
  19 +
  20 +}
0 \ No newline at end of file 21 \ No newline at end of file
templates/kt3/notifications/subscriptions.AddDocument.smarty
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The document "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}. 4 The document "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}.
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}">{i18n}Read Document{/i18n}</a> |  
7 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}Read Document{/i18n}</a> |
  7 + <a href={ktLink base="notify.php" query="`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
8 </div> 8 </div>
9 </dd> 9 </dd>
templates/kt3/notifications/subscriptions.AddFolder.smarty
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The folder "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}. 4 The folder "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}.
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}">{i18n}View New Folder{/i18n}</a> |  
7 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Folder{/i18n}</a> |
  7 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
8 </div> 8 </div>
9 </dd> 9 </dd>
templates/kt3/notifications/subscriptions.ArchiveDocument.smarty
@@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The document "{$info.object_name}" has been archived by an administrator. 4 The document "{$info.object_name}" has been archived by an administrator.
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
7 </div> 7 </div>
8 </dd> 8 </dd>
templates/kt3/notifications/subscriptions.CheckInDocument.smarty
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The document "{$info.object_name}" has been checked in, in the folder "{$info.location_name}". 4 The document "{$info.object_name}" has been checked in, in the folder "{$info.location_name}".
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}">{i18n}View Document{/i18n}</a>  
7 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
  7 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
8 </div> 8 </div>
9 </dd> 9 </dd>
templates/kt3/notifications/subscriptions.CheckOutDocument.smarty
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The document "{$info.object_name}" has been checked out, in the folder "{$info.location_name}". 4 The document "{$info.object_name}" has been checked out, in the folder "{$info.location_name}".
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}">{i18n}View Document{/i18n}</a>  
7 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
  7 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
8 </div> 8 </div>
9 </dd> 9 </dd>
templates/kt3/notifications/subscriptions.ModifyDocument.smarty
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The document "{$info.object_name}" has been changed in the folder "{$info.location_name}". 4 The document "{$info.object_name}" has been changed in the folder "{$info.location_name}".
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}">{i18n}View Document{/i18n}</a>  
7 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Document{/i18n}</a>
  7 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
8 </div> 8 </div>
9 </dd> 9 </dd>
templates/kt3/notifications/subscriptions.MoveDocument.smarty
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The document "{$info.object_name}" has been moved to the folder "{$info.location_name}". 4 The document "{$info.object_name}" has been moved to the folder "{$info.location_name}".
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}">{i18n}View New Location{/i18n}</a>  
7 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View New Location{/i18n}</a>
  7 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
8 </div> 8 </div>
9 </dd> 9 </dd>
templates/kt3/notifications/subscriptions.RemoveChildDocument.smarty
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The document "{$info.object_name}" has been removed from the folder "{$info.location_name}", to which you are subscribed. 4 The document "{$info.object_name}" has been removed from the folder "{$info.location_name}", to which you are subscribed.
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}">{i18n}View Folder{/i18n}</a>  
7 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Folder{/i18n}</a>
  7 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
8 </div> 8 </div>
9 </dd> 9 </dd>
templates/kt3/notifications/subscriptions.RemoveChildFolder.smarty
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The folder "{$info.object_name}" was removed{if ($info.location_name !== null)} from "{$info.location_name}"{/if}. 4 The folder "{$info.object_name}" was removed{if ($info.location_name !== null)} from "{$info.location_name}"{/if}.
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}">{i18n}View Folder{/i18n}</a> |  
7 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`"}">{i18n}View Folder{/i18n}</a> |
  7 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
8 </div> 8 </div>
9 </dd> 9 </dd>
templates/kt3/notifications/subscriptions.RemoveSubscribedDocument.smarty
@@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The document "{$info.object_name}" to which you were subscribed, has been removed. 4 The document "{$info.object_name}" to which you were subscribed, has been removed.
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
7 </div> 7 </div>
8 </dd> 8 </dd>
templates/kt3/notifications/subscriptions.RemoveSubscribedFolder.smarty
@@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The folder "{$info.object_name}" to which you were subscribed, was removed. 4 The folder "{$info.object_name}" to which you were subscribed, was removed.
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
7 </div> 7 </div>
8 </dd> 8 </dd>
templates/kt3/notifications/subscriptions.RestoreDocument.smarty
@@ -3,6 +3,6 @@ @@ -3,6 +3,6 @@
3 <!-- could break this up. --> 3 <!-- could break this up. -->
4 The document "{$info.object_name}" has been restored by an administrator. 4 The document "{$info.object_name}" has been restored by an administrator.
5 <div class="actionoptions"> 5 <div class="actionoptions">
6 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 6 + <a href={ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
7 </div> 7 </div>
8 </dd> 8 </dd>
templates/kt3/notifications/subscriptions.generic.smarty
1 <dt class="actionitem subscription">{$info.title}</dt> 1 <dt class="actionitem subscription">{$info.title}</dt>
2 <dd class="actionmessage"> 2 <dd class="actionmessage">
3 <div class="actionoptions"> 3 <div class="actionoptions">
4 - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}&notify_action=clear">{i18n}Clear Alert{/i18n}</a> 4 + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`&notify_action=clear"}">{i18n}Clear Alert{/i18n}</a>
5 </div> 5 </div>
6 </dd> 6 </dd>
templates/ktcore/workflow/editTransition.smarty
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <fieldset> 5 <fieldset>
6 <legend>{i18n}Edit transition properties{/i18n}</legend> 6 <legend>{i18n}Edit transition properties{/i18n}</legend>
7 7
8 -<p class="helpText">{i18n}Select the target state of the transition, and 8 +<p class="descriptiveText">{i18n}Select the target state of the transition, and
9 select the permission, group, and/or role necessary to perform the 9 select the permission, group, and/or role necessary to perform the
10 transition. Selecting more than one of permission, group, or role will 10 transition. Selecting more than one of permission, group, or role will
11 require that the user wishing to perform the transition fulfil every 11 require that the user wishing to perform the transition fulfil every