Commit b4797d4ce36d313717843ab0ffb220375d278878
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
Showing
17 changed files
with
54 additions
and
22 deletions
lib/templating/kt3template.inc.php
| ... | ... | @@ -59,8 +59,15 @@ class KTPage { |
| 59 | 59 | $this->requireCSSResource("resources/css/kt-ie-icons.css", true); |
| 60 | 60 | /* default js files initialisation */ |
| 61 | 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 | 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 | 71 | /* menu initialisation*/ |
| 65 | 72 | // FIXME: how do we want to handle the menu? |
| 66 | 73 | $this->initMenu(); | ... | ... |
resources/css/kt-framing.css
| ... | ... | @@ -293,6 +293,11 @@ a.main_nav_item { |
| 293 | 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 | 21 | \ No newline at end of file | ... | ... |
templates/kt3/notifications/subscriptions.AddDocument.smarty
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The document "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}. |
| 5 | 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}¬ify_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`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 8 | 8 | </div> |
| 9 | 9 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.AddFolder.smarty
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The folder "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}. |
| 5 | 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}¬ify_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`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 8 | 8 | </div> |
| 9 | 9 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.ArchiveDocument.smarty
| ... | ... | @@ -3,6 +3,6 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The document "{$info.object_name}" has been archived by an administrator. |
| 5 | 5 | <div class="actionoptions"> |
| 6 | - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}¬ify_action=clear">{i18n}Clear Alert{/i18n}</a> | |
| 6 | + <a href={ktLink base="notify.php" query="id=`$info.notify_id`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 7 | 7 | </div> |
| 8 | 8 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.CheckInDocument.smarty
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The document "{$info.object_name}" has been checked in, in the folder "{$info.location_name}". |
| 5 | 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}¬ify_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`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 8 | 8 | </div> |
| 9 | 9 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.CheckOutDocument.smarty
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The document "{$info.object_name}" has been checked out, in the folder "{$info.location_name}". |
| 5 | 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}¬ify_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`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 8 | 8 | </div> |
| 9 | 9 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.ModifyDocument.smarty
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The document "{$info.object_name}" has been changed in the folder "{$info.location_name}". |
| 5 | 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}¬ify_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`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 8 | 8 | </div> |
| 9 | 9 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.MoveDocument.smarty
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The document "{$info.object_name}" has been moved to the folder "{$info.location_name}". |
| 5 | 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}¬ify_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`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 8 | 8 | </div> |
| 9 | 9 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.RemoveChildDocument.smarty
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The document "{$info.object_name}" has been removed from the folder "{$info.location_name}", to which you are subscribed. |
| 5 | 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}¬ify_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`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 8 | 8 | </div> |
| 9 | 9 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.RemoveChildFolder.smarty
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The folder "{$info.object_name}" was removed{if ($info.location_name !== null)} from "{$info.location_name}"{/if}. |
| 5 | 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}¬ify_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`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 8 | 8 | </div> |
| 9 | 9 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.RemoveSubscribedDocument.smarty
| ... | ... | @@ -3,6 +3,6 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The document "{$info.object_name}" to which you were subscribed, has been removed. |
| 5 | 5 | <div class="actionoptions"> |
| 6 | - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}¬ify_action=clear">{i18n}Clear Alert{/i18n}</a> | |
| 6 | + <a href={ktLink base="notify.php" query="id=`$info.notify_id`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 7 | 7 | </div> |
| 8 | 8 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.RemoveSubscribedFolder.smarty
| ... | ... | @@ -3,6 +3,6 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The folder "{$info.object_name}" to which you were subscribed, was removed. |
| 5 | 5 | <div class="actionoptions"> |
| 6 | - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}¬ify_action=clear">{i18n}Clear Alert{/i18n}</a> | |
| 6 | + <a href={ktLink base="notify.php" query="id=`$info.notify_id`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 7 | 7 | </div> |
| 8 | 8 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.RestoreDocument.smarty
| ... | ... | @@ -3,6 +3,6 @@ |
| 3 | 3 | <!-- could break this up. --> |
| 4 | 4 | The document "{$info.object_name}" has been restored by an administrator. |
| 5 | 5 | <div class="actionoptions"> |
| 6 | - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}¬ify_action=clear">{i18n}Clear Alert{/i18n}</a> | |
| 6 | + <a href={ktLink base="notify.php" query="id=`$info.notify_id`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 7 | 7 | </div> |
| 8 | 8 | </dd> | ... | ... |
templates/kt3/notifications/subscriptions.generic.smarty
| 1 | 1 | <dt class="actionitem subscription">{$info.title}</dt> |
| 2 | 2 | <dd class="actionmessage"> |
| 3 | 3 | <div class="actionoptions"> |
| 4 | - <a href="{$absoluteRootUrl}/notify.php?id={$info.notify_id}¬ify_action=clear">{i18n}Clear Alert{/i18n}</a> | |
| 4 | + <a href="{ktLink base="notify.php" query="id=`$info.notify_id`¬ify_action=clear"}">{i18n}Clear Alert{/i18n}</a> | |
| 5 | 5 | </div> |
| 6 | 6 | </dd> | ... | ... |
templates/ktcore/workflow/editTransition.smarty
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | <fieldset> |
| 6 | 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 | 9 | select the permission, group, and/or role necessary to perform the |
| 10 | 10 | transition. Selecting more than one of permission, group, or role will |
| 11 | 11 | require that the user wishing to perform the transition fulfil every | ... | ... |