aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--INSTALL.md6
-rwxr-xr-xbuild.sh2
-rw-r--r--composer.json3
-rw-r--r--composer.lock44
-rw-r--r--ratatoeskr/js/backend.js15
-rw-r--r--ratatoeskr/libs/INFO6
-rwxr-xr-xratatoeskr/templates/src/systemtemplates/master.html2
8 files changed, 51 insertions, 28 deletions
diff --git a/.gitignore b/.gitignore
index c04d68f..076eff0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,6 @@ ratatoeskr/templates/src/usertemplates/*
ratatoeskr/templates/transc/*
ratatoeskr/libs/ste
ratatoeskr/libs/kses.php
-ratatoeskr/libs/jquery.min.js
ratatoeskr/config.php
.php_cs.cache
ratatoeskr/vendor/
diff --git a/INSTALL.md b/INSTALL.md
index e9be995..06162fe 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -26,12 +26,6 @@ You need these libraries to run Ratatöskr (it is probably already bundled with
kses can be found at <http://sourceforge.net/projects/kses/>
-2. jQuery
-
- Place jquery.min.js into this folder.
-
- jQuery can be found at <http://jquery.com>
-
Step 3: Copy files to your Webspace
-----------------------------------
diff --git a/build.sh b/build.sh
index 7e3389d..8efe267 100755
--- a/build.sh
+++ b/build.sh
@@ -24,8 +24,6 @@ install_dependencies() {
rm -rf kses-*
rm kses.zip
- wget http://code.jquery.com/jquery.min.js
-
cd ../..
}
diff --git a/composer.json b/composer.json
index fed18c1..0e22b52 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,8 @@
"require": {
"php": ">=7.3",
"r7r/ste": "^2.0.1",
- "michelf/php-markdown": "^1.9"
+ "michelf/php-markdown": "^1.9",
+ "components/jquery": "^3.5"
},
"config": {
"vendor-dir": "ratatoeskr/vendor"
diff --git a/composer.lock b/composer.lock
index 7e40506..ca731cc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,9 +4,51 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "b24fa722b1b134feabc31603beda3933",
+ "content-hash": "9cb5c30495a0e70e4fc6c1368f601408",
"packages": [
{
+ "name": "components/jquery",
+ "version": "3.5.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/components/jquery.git",
+ "reference": "b33e8f0f9a1cb2ae390cf05d766a900b53d2125b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/components/jquery/zipball/b33e8f0f9a1cb2ae390cf05d766a900b53d2125b",
+ "reference": "b33e8f0f9a1cb2ae390cf05d766a900b53d2125b",
+ "shasum": ""
+ },
+ "type": "component",
+ "extra": {
+ "component": {
+ "scripts": [
+ "jquery.js"
+ ],
+ "files": [
+ "jquery.min.js",
+ "jquery.min.map",
+ "jquery.slim.js",
+ "jquery.slim.min.js",
+ "jquery.slim.min.map"
+ ]
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "JS Foundation and other contributors"
+ }
+ ],
+ "description": "jQuery JavaScript Library",
+ "homepage": "http://jquery.com",
+ "time": "2020-05-05T13:21:02+00:00"
+ },
+ {
"name": "michelf/php-markdown",
"version": "1.9.0",
"source": {
diff --git a/ratatoeskr/js/backend.js b/ratatoeskr/js/backend.js
index 8b60c2d..cb276b1 100644
--- a/ratatoeskr/js/backend.js
+++ b/ratatoeskr/js/backend.js
@@ -1,16 +1,11 @@
-$(function()
-{
- $("div.articleeditor-metabar-element h2").addClass("metabar_element_expanded").click(function()
- {
- self = $(this);
- if(self.hasClass("metabar_element_expanded"))
- {
+$(function() {
+ $("div.articleeditor-metabar-element h2").addClass("metabar_element_expanded").on("click", function() {
+ var self = $(this);
+ if (self.hasClass("metabar_element_expanded")) {
self.removeClass("metabar_element_expanded");
self.addClass("metabar_element_collapsed");
$("div.articleeditor-metabar-element-content", self.parent()).hide("fast");
- }
- else
- {
+ } else {
self.removeClass("metabar_element_collapsed");
self.addClass("metabar_element_expanded");
$("div.articleeditor-metabar-element-content", self.parent()).show("fast");
diff --git a/ratatoeskr/libs/INFO b/ratatoeskr/libs/INFO
index f1ef415..e821828 100644
--- a/ratatoeskr/libs/INFO
+++ b/ratatoeskr/libs/INFO
@@ -5,9 +5,3 @@ This directory will hold some libraries Ratatöskr needs.
Place "kses.php" from the archive directly into this directory.
kses can be found at <http://sourceforge.net/projects/kses/>
-
-2. jQuery
-
- Place jquery.min.js into this folder.
-
- jQuery can be found at <http://jquery.com> \ No newline at end of file
diff --git a/ratatoeskr/templates/src/systemtemplates/master.html b/ratatoeskr/templates/src/systemtemplates/master.html
index aa2bf4e..3cf3b73 100755
--- a/ratatoeskr/templates/src/systemtemplates/master.html
+++ b/ratatoeskr/templates/src/systemtemplates/master.html
@@ -32,7 +32,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title><ste:get_translation for="section_$section" />::<ste:escape>$pagetitle</ste:escape> - Ratatöskr</title>
- <script type="text/javascript" src="$rel_path_to_root/ratatoeskr/libs/jquery.min.js"></script>
+ <script type="text/javascript" src="$rel_path_to_root/ratatoeskr/vendor/components/jquery/jquery.min.js"></script>
<script type="text/javascript" src="$rel_path_to_root/ratatoeskr/js/backend.js"></script>
<ste:mktag name="cms_style"><link rel="stylesheet" type="text/css" media="screen" href="$rel_path_to_root/ratatoeskr/cms_style/<ste:tagcontent />" /></ste:mktag>
<ste:cms_style>layout.css</ste:cms_style>