From a81993b6d41265eda36d5dbd1e016e1c03caf2d9 Mon Sep 17 00:00:00 2001 From: Luke Fromhold Date: Thu, 18 Jul 2024 08:15:34 +1000 Subject: [PATCH] Initial commit --- LICENSE | 28 ++++++++++++++++++++++++++++ _config/config.yml | 3 +++ client/inlinetabset.css | 11 +++++++++++ composer.json | 30 ++++++++++++++++++++++++++++++ src/Forms/InlineTabSet.php | 10 ++++++++++ 5 files changed, 82 insertions(+) create mode 100644 LICENSE create mode 100644 _config/config.yml create mode 100644 client/inlinetabset.css create mode 100644 composer.json create mode 100644 src/Forms/InlineTabSet.php diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2e01ef5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2024, Fromhold.io + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/_config/config.yml b/_config/config.yml new file mode 100644 index 0000000..fdac8e3 --- /dev/null +++ b/_config/config.yml @@ -0,0 +1,3 @@ +--- +Name: fromholdio-inlinetabset +--- diff --git a/client/inlinetabset.css b/client/inlinetabset.css new file mode 100644 index 0000000..ca1c1e6 --- /dev/null +++ b/client/inlinetabset.css @@ -0,0 +1,11 @@ +.inlinetabset .ui-tabs-nav { + border-bottom: 1px solid #c1cad9 !important; + margin-top: 0 !important; + display: flex !important; +} +.inlinetabset .grid-field { + margin-top: calc(-1.5385rem / 2) !important; +} +.inlinetabset .grid-field .toolbar--content { + margin-top: 0 !important; +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..bda5564 --- /dev/null +++ b/composer.json @@ -0,0 +1,30 @@ +{ + "name": "fromholdio/silverstripe-inlinetabset", + "type": "silverstripe-vendormodule", + "description": "", + "license": "BSD-3-Clause", + "keywords": ["silverstripe"], + "homepage": "https://github.com/fromholdio/silverstripe-inlinetabset", + "support": { + "issues": "https://github.com/fromholdio/silverstripe-inlinetabset/issues" + }, + "authors": [{ + "name": "Luke Fromhold", + "homepage": "https://fromhold.io" + }], + "require": { + "silverstripe/cms": "^5.0" + }, + "extra": { + "expose": [ + "client" + ] + }, + "autoload": { + "psr-4": { + "Fromholdio\\InlineTabSet\\": "src/" + } + }, + "prefer-stable": true, + "minimum-stability": "dev" +} diff --git a/src/Forms/InlineTabSet.php b/src/Forms/InlineTabSet.php new file mode 100644 index 0000000..43ef147 --- /dev/null +++ b/src/Forms/InlineTabSet.php @@ -0,0 +1,10 @@ +