From 5c23a6f03676baaf2a9bd6fac99432e1cf9f1bb7 Mon Sep 17 00:00:00 2001 From: yild Date: Sun, 4 Jan 2026 02:03:51 +0100 Subject: [PATCH] Removed unnecessary files and its uses. Joomla creates standard editor buttons without any other CSS formating styles. --- .../src/Extension/AddAttachment.php | 9 --------- .../media/css/add_attachment_button.css | 20 ------------------- .../media/css/add_attachment_button_rtl.css | 10 ---------- .../css/insert_attachments_token_button.css | 17 ---------------- .../insert_attachments_token_button_rtl.css | 10 ---------- .../Extension/InsertAttachmentsIdToken.php | 9 --------- .../src/Extension/InsertAttachmentsToken.php | 11 ---------- 7 files changed, 86 deletions(-) delete mode 100644 attachments_component/media/css/add_attachment_button.css delete mode 100644 attachments_component/media/css/add_attachment_button_rtl.css delete mode 100644 attachments_component/media/css/insert_attachments_token_button.css delete mode 100644 attachments_component/media/css/insert_attachments_token_button_rtl.css diff --git a/add_attachment_btn_plugin/src/Extension/AddAttachment.php b/add_attachment_btn_plugin/src/Extension/AddAttachment.php index e943b77d..ecd15ac3 100644 --- a/add_attachment_btn_plugin/src/Extension/AddAttachment.php +++ b/add_attachment_btn_plugin/src/Extension/AddAttachment.php @@ -169,17 +169,8 @@ public function onDisplay($name) return; } - // Add the regular css file - HTMLHelper::stylesheet('media/com_attachments/css/attachments_list.css'); - HTMLHelper::stylesheet('media/com_attachments/css/attachments_list_dark.css'); - HTMLHelper::stylesheet('media/com_attachments/css/add_attachment_button.css'); - // Handle RTL styling (if necessary) $lang = $this->app->getLanguage(); - if ($lang->isRTL()) { - HTMLHelper::stylesheet('media/com_attachments/css/attachments_list_rtl.css'); - HTMLHelper::stylesheet('media/com_attachments/css/add_attachment_button_rtl.css'); - } // Load the language file from the frontend $lang->load('com_attachments', JPATH_ADMINISTRATOR . '/components/com_attachments'); diff --git a/attachments_component/media/css/add_attachment_button.css b/attachments_component/media/css/add_attachment_button.css deleted file mode 100644 index d3c15810..00000000 --- a/attachments_component/media/css/add_attachment_button.css +++ /dev/null @@ -1,20 +0,0 @@ -div.button2-left > div.add_attachment -{ - background: url(../images/add_attachment_button.png) no-repeat scroll 100% 0; -} - -div#editor-xtd-buttons i.icon-add_attachment -{ - background: url(../images/add_attachment_button_small.png) no-repeat scroll 100% 0; - vertical-align: middle; - height: 16px; - width: 16px; -} - -div#editor-xtd-buttons i.icon-add_attachment_frontend -{ - background: url(../images/add_attachment_button_small.png) no-repeat scroll 100% 0; - vertical-align: middle; - height: 16px; - width: 16px; -} diff --git a/attachments_component/media/css/add_attachment_button_rtl.css b/attachments_component/media/css/add_attachment_button_rtl.css deleted file mode 100644 index 0a61cb67..00000000 --- a/attachments_component/media/css/add_attachment_button_rtl.css +++ /dev/null @@ -1,10 +0,0 @@ -.button2-left .add_attachment { - background: url(../images/add_attachment_button_rtl.png) 0 0 no-repeat; -} - -div#editor-xtd-buttons div.btn-toolbar i.icon-add_attachment { - background: url(../images/add_attachment_button_small_rtl.png) 0 0 no-repeat; - vertical-align: middle; - height: 16px; - width: 16px; -} diff --git a/attachments_component/media/css/insert_attachments_token_button.css b/attachments_component/media/css/insert_attachments_token_button.css deleted file mode 100644 index 9b7d19f1..00000000 --- a/attachments_component/media/css/insert_attachments_token_button.css +++ /dev/null @@ -1,17 +0,0 @@ -div.button2-left > div.insert_attachments_token { - background: url(../images/insert_attachments_token_button.png) no-repeat scroll 100% 0; -} - -div#editor-xtd-buttons div.btn-toolbar i.icon-insert_attachments_token { - background: url(../images/insert_attachments_token_button_small.png) no-repeat scroll 100% 0; - vertical-align: middle; - height: 16px; - width: 16px; -} - -div#editor-xtd-buttons div.btn-toolbar i.icon-insert_attachments_token_frontend { - background: url(../images/insert_attachments_token_button_small.png) no-repeat scroll 100% 0; - vertical-align: middle; - height: 16px; - width: 16px; -} diff --git a/attachments_component/media/css/insert_attachments_token_button_rtl.css b/attachments_component/media/css/insert_attachments_token_button_rtl.css deleted file mode 100644 index 05196508..00000000 --- a/attachments_component/media/css/insert_attachments_token_button_rtl.css +++ /dev/null @@ -1,10 +0,0 @@ -.button2-left .insert_attachments_token { - background: url(../images/insert_attachments_token_button_rtl.png) 0 0 no-repeat; -} - -div#editor-xtd-buttons div.btn-toolbar i.icon-insert_attachments_token { - background: url(../images/insert_attachments_token_button_small_rtl.png) 0 0 no-repeat; - vertical-align: middle; - height: 16px; - width: 16px; -} diff --git a/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php b/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php index c28e14ac..cd9e8899 100644 --- a/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php +++ b/insert_attachments_id_token_btn_plugin/src/Extension/InsertAttachmentsIdToken.php @@ -108,21 +108,12 @@ public function onDisplay($name, $id) return false; } - // Add the regular css file - HTMLHelper::stylesheet('media/com_attachments/css/attachments_list.css'); - HTMLHelper::stylesheet('media/com_attachments/css/attachments_list_dark.css'); - HTMLHelper::stylesheet('media/com_attachments/css/add_attachment_button.css'); - // Get ready for language things $lang = $this->app->getLanguage(); if (!$lang->load('plg_editors-xtd_insert_attachments_id_token', dirname(__FILE__))) { // If the desired translation is not available, at least load the English $lang->load('plg_editors-xtd_insert_attachments_id_token', JPATH_ADMINISTRATOR, 'en-GB'); } - if ($lang->isRTL()) { - HTMLHelper::stylesheet('media/com_attachments/css/attachments_list_rtl.css'); - HTMLHelper::stylesheet('media/com_attachments/css/add_attachment_button_rtl.css'); - } // Load the language file from the frontend $lang->load('com_attachments', JPATH_ADMINISTRATOR . '/components/com_attachments'); diff --git a/insert_attachments_token_btn_plugin/src/Extension/InsertAttachmentsToken.php b/insert_attachments_token_btn_plugin/src/Extension/InsertAttachmentsToken.php index 6f1e7f5f..ab183020 100644 --- a/insert_attachments_token_btn_plugin/src/Extension/InsertAttachmentsToken.php +++ b/insert_attachments_token_btn_plugin/src/Extension/InsertAttachmentsToken.php @@ -145,17 +145,6 @@ function insertAttachmentsToken(editorName) { $doc->addScriptDeclaration($js); - // Add the regular css file - HTMLHelper::stylesheet('media/com_attachments/css/attachments_list.css'); - HTMLHelper::stylesheet('media/com_attachments/css/attachments_list_dark.css'); - HTMLHelper::stylesheet('media/com_attachments/css/insert_attachments_token_button.css'); - - // Handle RTL styling (if necessary) - if ($lang->isRTL()) { - HTMLHelper::stylesheet('media/com_attachments/css/attachments_list_rtl.css'); - HTMLHelper::stylesheet('media/com_attachments/css/insert_attachments_token_button_rtl.css'); - } - $button = new CMSObject(); $button->modal = false; $button->class = 'btn';