diff --git a/lib/templating/kt3template.inc.php b/lib/templating/kt3template.inc.php index 3ce507e..4aafcb7 100644 --- a/lib/templating/kt3template.inc.php +++ b/lib/templating/kt3template.inc.php @@ -59,8 +59,15 @@ class KTPage { $this->requireCSSResource("resources/css/kt-ie-icons.css", true); /* default js files initialisation */ $aJS = Array(); + $aJS[] = 'thirdpartyjs/MochiKit/Base.js'; + $aJS[] = 'thirdpartyjs/MochiKit/Iter.js'; + $aJS[] = 'thirdpartyjs/MochiKit/DOM.js'; + $aJS[] = 'resources/js/kt-utility.js'; $this->requireJSResources($aJS); + // this is horrid, but necessary. + $this->requireJSStandalone('addLoadEvent(partial(initDeleteProtection, "' . _('Are you sure you wish to delete this item?') . '"));'); + /* menu initialisation*/ // FIXME: how do we want to handle the menu? $this->initMenu(); diff --git a/resources/css/kt-framing.css b/resources/css/kt-framing.css index 33b32de..d95dd87 100644 --- a/resources/css/kt-framing.css +++ b/resources/css/kt-framing.css @@ -293,6 +293,11 @@ a.main_nav_item { color: #666; } +#content .descriptiveText.important { + padding-left: 25px; + color: black; + background: transparent url(../../thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat; +} diff --git a/resources/js/kt-utility.js b/resources/js/kt-utility.js new file mode 100644 index 0000000..1c3e730 --- /dev/null +++ b/resources/js/kt-utility.js @@ -0,0 +1,20 @@ +/* + * general utility functions for KT + */ + +function confirmDelete(message) { return confirm(message); } + +function initDeleteProtection(message) { + var fn = partial(confirmDelete, message); + var elements = getElementsByTagAndClassName('A','ktDelete'); + + function setClickFunction(fn, node) { + // addToCallStack(node,'onClick',fn); + if (isUndefinedOrNull(node.onclick)) { + node.onclick = fn; + } + } + + forEach(elements, partial(setClickFunction, fn)); + +} \ No newline at end of file diff --git a/templates/kt3/notifications/subscriptions.AddDocument.smarty b/templates/kt3/notifications/subscriptions.AddDocument.smarty index 7b8779b..309db14 100644 --- a/templates/kt3/notifications/subscriptions.AddDocument.smarty +++ b/templates/kt3/notifications/subscriptions.AddDocument.smarty @@ -3,7 +3,7 @@ The document "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}.
diff --git a/templates/kt3/notifications/subscriptions.AddFolder.smarty b/templates/kt3/notifications/subscriptions.AddFolder.smarty index 5a72312..7e44298 100644 --- a/templates/kt3/notifications/subscriptions.AddFolder.smarty +++ b/templates/kt3/notifications/subscriptions.AddFolder.smarty @@ -3,7 +3,7 @@ The folder "{$info.object_name}" was added{if ($info.location_name !== null)} to "{$info.location_name}"{/if}. diff --git a/templates/kt3/notifications/subscriptions.ArchiveDocument.smarty b/templates/kt3/notifications/subscriptions.ArchiveDocument.smarty index 9163d8c..1bdd0db 100644 --- a/templates/kt3/notifications/subscriptions.ArchiveDocument.smarty +++ b/templates/kt3/notifications/subscriptions.ArchiveDocument.smarty @@ -3,6 +3,6 @@ The document "{$info.object_name}" has been archived by an administrator. diff --git a/templates/kt3/notifications/subscriptions.CheckInDocument.smarty b/templates/kt3/notifications/subscriptions.CheckInDocument.smarty index 97de650..3b4f5ab 100644 --- a/templates/kt3/notifications/subscriptions.CheckInDocument.smarty +++ b/templates/kt3/notifications/subscriptions.CheckInDocument.smarty @@ -3,7 +3,7 @@ The document "{$info.object_name}" has been checked in, in the folder "{$info.location_name}". diff --git a/templates/kt3/notifications/subscriptions.CheckOutDocument.smarty b/templates/kt3/notifications/subscriptions.CheckOutDocument.smarty index b18484b..bc30b8d 100644 --- a/templates/kt3/notifications/subscriptions.CheckOutDocument.smarty +++ b/templates/kt3/notifications/subscriptions.CheckOutDocument.smarty @@ -3,7 +3,7 @@ The document "{$info.object_name}" has been checked out, in the folder "{$info.location_name}". diff --git a/templates/kt3/notifications/subscriptions.ModifyDocument.smarty b/templates/kt3/notifications/subscriptions.ModifyDocument.smarty index 9e5ce14..5f34b99 100644 --- a/templates/kt3/notifications/subscriptions.ModifyDocument.smarty +++ b/templates/kt3/notifications/subscriptions.ModifyDocument.smarty @@ -3,7 +3,7 @@ The document "{$info.object_name}" has been changed in the folder "{$info.location_name}". diff --git a/templates/kt3/notifications/subscriptions.MoveDocument.smarty b/templates/kt3/notifications/subscriptions.MoveDocument.smarty index 9397a05..17f657e 100644 --- a/templates/kt3/notifications/subscriptions.MoveDocument.smarty +++ b/templates/kt3/notifications/subscriptions.MoveDocument.smarty @@ -3,7 +3,7 @@ The document "{$info.object_name}" has been moved to the folder "{$info.location_name}". diff --git a/templates/kt3/notifications/subscriptions.RemoveChildDocument.smarty b/templates/kt3/notifications/subscriptions.RemoveChildDocument.smarty index 6790440..5722cca 100644 --- a/templates/kt3/notifications/subscriptions.RemoveChildDocument.smarty +++ b/templates/kt3/notifications/subscriptions.RemoveChildDocument.smarty @@ -3,7 +3,7 @@ The document "{$info.object_name}" has been removed from the folder "{$info.location_name}", to which you are subscribed. diff --git a/templates/kt3/notifications/subscriptions.RemoveChildFolder.smarty b/templates/kt3/notifications/subscriptions.RemoveChildFolder.smarty index 1db28db..6f0c1b3 100644 --- a/templates/kt3/notifications/subscriptions.RemoveChildFolder.smarty +++ b/templates/kt3/notifications/subscriptions.RemoveChildFolder.smarty @@ -3,7 +3,7 @@ The folder "{$info.object_name}" was removed{if ($info.location_name !== null)} from "{$info.location_name}"{/if}. diff --git a/templates/kt3/notifications/subscriptions.RemoveSubscribedDocument.smarty b/templates/kt3/notifications/subscriptions.RemoveSubscribedDocument.smarty index 18f90e9..9a43ccf 100644 --- a/templates/kt3/notifications/subscriptions.RemoveSubscribedDocument.smarty +++ b/templates/kt3/notifications/subscriptions.RemoveSubscribedDocument.smarty @@ -3,6 +3,6 @@ The document "{$info.object_name}" to which you were subscribed, has been removed. diff --git a/templates/kt3/notifications/subscriptions.RemoveSubscribedFolder.smarty b/templates/kt3/notifications/subscriptions.RemoveSubscribedFolder.smarty index c4b31cc..c47fabe 100644 --- a/templates/kt3/notifications/subscriptions.RemoveSubscribedFolder.smarty +++ b/templates/kt3/notifications/subscriptions.RemoveSubscribedFolder.smarty @@ -3,6 +3,6 @@ The folder "{$info.object_name}" to which you were subscribed, was removed. diff --git a/templates/kt3/notifications/subscriptions.RestoreDocument.smarty b/templates/kt3/notifications/subscriptions.RestoreDocument.smarty index 661acfc..eb18947 100644 --- a/templates/kt3/notifications/subscriptions.RestoreDocument.smarty +++ b/templates/kt3/notifications/subscriptions.RestoreDocument.smarty @@ -3,6 +3,6 @@ The document "{$info.object_name}" has been restored by an administrator. diff --git a/templates/kt3/notifications/subscriptions.generic.smarty b/templates/kt3/notifications/subscriptions.generic.smarty index d1dc1c1..379e3f7 100644 --- a/templates/kt3/notifications/subscriptions.generic.smarty +++ b/templates/kt3/notifications/subscriptions.generic.smarty @@ -1,6 +1,6 @@