]> gitweb.hamatoma.de Git - gadeku.git/commitdiff
V 0.4.5 Mediawiki: field area button
authorHamatoma <author@hamatoma.de>
Sat, 15 Jun 2024 18:36:54 +0000 (20:36 +0200)
committerHamatoma <author@hamatoma.de>
Sat, 15 Jun 2024 18:37:21 +0000 (20:37 +0200)
- MediaWiki:
  - Funktion %field() Ă„nderung Parameter
  - neu: %area()%
  - neu: %button()%

CHANGELOG.md
app/Helpers/MediaWiki.php
composer.lock

index ead613f5a07c86da5d488e67ddf4ea39e7c7633e..5c4a55d5b9eb0b1f4cbeb43a474626fc13bc3cc0 100644 (file)
@@ -1,3 +1,10 @@
+# V 0.4.5 Mediawiki: field area button
+
+- MediaWiki:
+  - Funktion %field() Ă„nderung Parameter
+  - neu: %area()%
+  - neu: %button()%
+
 # V 0.4.4 MediaWiki, PageController
 
 ## Added
index 10dc48373e7077070834416f2d865b49daa08b80..67cb7bc4490cae0e649b171071d9799aa928ee7b 100644 (file)
@@ -59,17 +59,50 @@ class MediaWiki extends MediaWikiBase
                     $rc = '<del class="lkn-del">' . (count($matches) == 4 ? ($matches[2] . $matches[3]) : $matches[2]) . '</del>';
                     break;
                 case 'field':
+                    // name | width | default | solution1 ; solution2...
                     $name = $matches[2];
                     $value = '';
-                    $size = 8;
+                    $width = 8;
                     if (count($matches) > 3) {
                         $parts = explode('|', substr($matches[3], 1));
-                        $value = $parts[0];
+                        $width = $parts[0];
                         if (count($parts) > 1) {
-                            $size = $parts[1];
+                            $value = $parts[1];
                         }
                     }
-                    $rc = "<input class=\"lkn-field\" name=\"$name\" value=\"$value\" size=\"$size\">";
+                    $rc = "<input class=\"lkn-field\" name=\"$name\" value=\"$value\" size=\"$width\">";
+                    break;
+                case 'area':
+                    // name | width | rows | default | solution1 ; solution2...
+                    $name = $matches[2];
+                    $value = '';
+                    $width = 8;
+                    $rows = 2;
+                    if (count($matches) > 3) {
+                        $parts = explode('|', substr($matches[3], 1));
+                        $width = $parts[0];
+                        if (count($parts) > 1) {
+                            $rows = $parts[1];
+                        }
+                        if (count($parts) > 2) {
+                            $value = htmlentities($parts[2]);
+                        }
+                    }
+                    $rc = "<textarea class=\"lkn-field\" name=\"$name\" \" size=\"$width\" rows=\"$rows\">$value</textarea>";
+                    break;
+                case 'button':
+                    // name | label | classes | options
+                    $name = $matches[2];
+                    $label = $name;
+                    $classes = '';
+                    if (count($matches) > 3) {
+                        $parts = explode('|', substr($matches[3], 1));
+                        $label = htmlentities($parts[0]);
+                        if (count($parts) > 1) {
+                            $classes = $parts[1];
+                        }
+                    }
+                    $rc = "<button class=\"lkn-text-button $classes\">$label</button>";
                     break;
                 case 'icon':
                     $name = $matches[2];
index 9387e1582d3cbfb0d99a3f72d86a2fdd70f858eb..22d54a6eb60c07dcb791addc0912bd31e30005a5 100644 (file)
             "dist": {
                 "type": "path",
                 "url": "../laraknife",
-                "reference": "4a3bfab6a713d8615bc3a37c2c30d8a1014b8b63"
+                "reference": "65bd270a461f140eef0da6d36786a0577eab3385"
             },
             "require-dev": {
                 "phpunit/phpunit": "11.0.x-dev"
         },
         {
             "name": "phpunit/phpunit",
-            "version": "10.5.20",
+            "version": "10.5.21",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3"
+                "reference": "ac837816fa52078f7a5e17ed774f256a72a51af6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/547d314dc24ec1e177720d45c6263fb226cc2ae3",
-                "reference": "547d314dc24ec1e177720d45c6263fb226cc2ae3",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ac837816fa52078f7a5e17ed774f256a72a51af6",
+                "reference": "ac837816fa52078f7a5e17ed774f256a72a51af6",
                 "shasum": ""
             },
             "require": {
             "support": {
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
                 "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.20"
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.21"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2024-04-24T06:32:35+00:00"
+            "time": "2024-06-15T09:13:15+00:00"
         },
         {
             "name": "sebastian/cli-parser",