From a026804a36fea88d93192bb2df926272d74fba7d Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Mon, 10 Nov 2008 17:41:10 +0100 Subject: [PATCH] Added new action buttons into sources admin, only avalable for DB sources --- src/admin/sources.php | 6 ++++++ src/include/functions_common.php | 2 ++ src/js/common.js | 27 +++++++++++++++++++++++++- src/lang/de/admin.php | 4 +++- src/lang/en/admin.php | 3 +++ src/lang/pt_BR/admin.php | 4 +++- src/templates/admin/admin_sources.html | 13 ++++++++++--- 7 files changed, 53 insertions(+), 6 deletions(-) diff --git a/src/admin/sources.php b/src/admin/sources.php index a31853f..c7b7ba4 100644 --- a/src/admin/sources.php +++ b/src/admin/sources.php @@ -663,11 +663,17 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) ) { $mySource['SourcesTypeImage'] = $content["MENU_SOURCE_DB"]; $mySource['SourcesTypeText'] = $content["LN_SOURCES_DB"]; + + // Enabled Database Maintenance functions + $mySource['IsDatabaseSource'] = true; } else if ( $mySource['SourceType'] == SOURCE_PDO ) { $mySource['SourcesTypeImage'] = $content["MENU_SOURCE_PDO"]; $mySource['SourcesTypeText'] = $content["LN_SOURCES_PDO"]; + + // Enabled Database Maintenance functions + $mySource['IsDatabaseSource'] = true; } // --- diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 0fc8f16..3937368 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -627,6 +627,8 @@ function InitFrontEndVariables() $content['MENU_INFORMATION'] = $content['BASEPATH'] . "images/icons/information2.png"; $content['MENU_PARSER_DELETE'] = $content['BASEPATH'] . "images/icons/gear_delete.png"; $content['MENU_PARSER_INIT'] = $content['BASEPATH'] . "images/icons/gear_new.png"; + $content['MENU_RECYCLE'] = $content['BASEPATH'] . "images/icons/recycle.png"; + $content['MENU_TRASH'] = $content['BASEPATH'] . "images/icons/garbage_empty.png"; $content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png"; $content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png"; diff --git a/src/js/common.js b/src/js/common.js index d9a03fa..455c762 100644 --- a/src/js/common.js +++ b/src/js/common.js @@ -362,10 +362,35 @@ function HoverPopup( myObjRef, myPopupTitle, HoverContent, OptionalImage ) obj.innerHTML = HoverContent; } +function HoverPopupHelp( myEvent, parentObj, myPopupTitle, HoverContent ) +{ + // Change CSS Class + var objPopup = document.getElementById('popupdetails'); + objPopup.className='popupdetails_popup with_border'; + + // Set title + var obj = document.getElementById("popuptitle"); + obj.innerHTML = myPopupTitle; + + // Set Content + obj = document.getElementById("popupcontent"); + obj.innerHTML = HoverContent; + +// var PopupContentWidth = 0; +/// var middle = PopupContentWidth / 2; + var middle = -5; + + if (myPopupHovering == false && parentObj != null) + { + // Different mouse position capturing in IE! + objPopup.style.top = (event.y+document.body.scrollTop + 24) + 'px'; + objPopup.style.left = (myEvent.clientX - middle) + 'px'; + } +} function HoverPopupMenuHelp( myEvent, parentObj, myPopupTitle, HoverContent ) { - if (szBrowserApp !== "IEXPLORER") + if (szBrowserApp !== "IEXPLORER" ) { // Don't need helper here! return; diff --git a/src/lang/de/admin.php b/src/lang/de/admin.php index e153c17..774d006 100644 --- a/src/lang/de/admin.php +++ b/src/lang/de/admin.php @@ -51,7 +51,9 @@ $content['LN_GEN_GLOBAL'] = "Global"; $content['LN_GEN_USERONLY_LONG'] = "For me only
(Only available to your user)"; $content['LN_GEN_GROUPONLY_LONG'] = "For this group
(Only available to the selected group)"; $content['LN_GEN_GROUPONLYNAME'] = "Group '%1'"; - +$content['LN_ADMIN_POPUPHELP'] = "Details on this function"; +$content['LN_ADMIN_DBSTATS'] = "Show database statistics."; +$content['LN_ADMIN_CLEARDATA'] = "If you need to remove old data records, use this function."; // General Options $content['LN_ADMIN_GLOBFRONTEND'] = "Global frontend options"; diff --git a/src/lang/en/admin.php b/src/lang/en/admin.php index da98e03..dbd0039 100644 --- a/src/lang/en/admin.php +++ b/src/lang/en/admin.php @@ -51,6 +51,9 @@ $content['LN_GEN_GLOBAL'] = "Global"; $content['LN_GEN_USERONLY_LONG'] = "For me only
(Only available to your user)"; $content['LN_GEN_GROUPONLY_LONG'] = "For this group
(Only available to the selected group)"; $content['LN_GEN_GROUPONLYNAME'] = "Group '%1'"; +$content['LN_ADMIN_POPUPHELP'] = "Details on this function"; +$content['LN_ADMIN_DBSTATS'] = "Show database statistics."; +$content['LN_ADMIN_CLEARDATA'] = "If you need to remove old data records, use this function."; // General Options $content['LN_ADMIN_GLOBFRONTEND'] = "Global frontend options"; diff --git a/src/lang/pt_BR/admin.php b/src/lang/pt_BR/admin.php index e153c17..774d006 100644 --- a/src/lang/pt_BR/admin.php +++ b/src/lang/pt_BR/admin.php @@ -51,7 +51,9 @@ $content['LN_GEN_GLOBAL'] = "Global"; $content['LN_GEN_USERONLY_LONG'] = "For me only
(Only available to your user)"; $content['LN_GEN_GROUPONLY_LONG'] = "For this group
(Only available to the selected group)"; $content['LN_GEN_GROUPONLYNAME'] = "Group '%1'"; - +$content['LN_ADMIN_POPUPHELP'] = "Details on this function"; +$content['LN_ADMIN_DBSTATS'] = "Show database statistics."; +$content['LN_ADMIN_CLEARDATA'] = "If you need to remove old data records, use this function."; // General Options $content['LN_ADMIN_GLOBFRONTEND'] = "Global frontend options"; diff --git a/src/templates/admin/admin_sources.html b/src/templates/admin/admin_sources.html index 2e19195..cae9485 100644 --- a/src/templates/admin/admin_sources.html +++ b/src/templates/admin/admin_sources.html @@ -58,8 +58,8 @@ {LN_SOURCES_ID} {LN_SOURCES_NAME} {LN_SOURCES_TYPE} - {LN_SOURCES_ASSIGNTO} - {LN_GEN_ACTIONS} + {LN_SOURCES_ASSIGNTO} + {LN_GEN_ACTIONS} @@ -85,10 +85,17 @@   + + + +   +   + + -  {LN_SOURCES_ADD} +  {LN_SOURCES_ADD}