浏览代码

Updated editor, removed IE8/IE9 support

markseu 7 年之前
父节点
当前提交
328d116f70
共有 3 个文件被更改,包括 8 次插入10 次删除
  1. 1 1
      system/plugins/edit.css
  2. 5 7
      system/plugins/edit.js
  3. 2 2
      system/plugins/edit.php

+ 1 - 1
system/plugins/edit.css

@@ -1,5 +1,5 @@
 /* Edit plugin, https://github.com/datenstrom/yellow-plugins/tree/master/edit */
-/* Copyright (c) 2013-2017 Datenstrom, https://datenstrom.se */
+/* Copyright (c) 2013-2018 Datenstrom, https://datenstrom.se */
 /* This file may be used and distributed under the terms of the public license. */
 
 .yellow-bar { position:relative; overflow:hidden; line-height:2em; margin-bottom:10px; }

+ 5 - 7
system/plugins/edit.js

@@ -1,5 +1,5 @@
 // Edit plugin, https://github.com/datenstrom/yellow-plugins/tree/master/edit
-// Copyright (c) 2013-2017 Datenstrom, https://datenstrom.se
+// Copyright (c) 2013-2018 Datenstrom, https://datenstrom.se
 // This file may be used and distributed under the terms of the public license.
 
 var yellow =
@@ -537,17 +537,15 @@ yellow.toolbox =
 	// Add element class
 	addClass: function(element, name)
 	{
-		var string = element.className + " " + name;
-		element.className = string.replace(/^\s+|\s+$/, "");
+		element.classList.add(name);
 	},
-
+	
 	// Remove element class
 	removeClass: function(element, name)
 	{
-		var string = (" " + element.className + " ").replace(" " + name + " ", " ");
-		element.className = string.replace(/^\s+|\s+$/, "");
+		element.classList.remove(name);
 	},
-	
+
 	// Add attribute information
 	addValue: function(selector, name, value)
 	{

+ 2 - 2
system/plugins/edit.php

@@ -1,11 +1,11 @@
 <?php
 // Edit plugin, https://github.com/datenstrom/yellow-plugins/tree/master/edit
-// Copyright (c) 2013-2017 Datenstrom, https://datenstrom.se
+// Copyright (c) 2013-2018 Datenstrom, https://datenstrom.se
 // This file may be used and distributed under the terms of the public license.
 
 class YellowEdit
 {
-	const VERSION = "0.7.6";
+	const VERSION = "0.7.7";
 	var $yellow;			//access to API
 	var $response;			//web response
 	var $users;				//user accounts