Bläddra i källkod

Updated edit extension

markseu 5 år sedan
förälder
incheckning
0499868f52
3 ändrade filer med 5 tillägg och 1 borttagningar
  1. 4 0
      system/extensions/edit.js
  2. 1 1
      system/extensions/edit.php
  3. BIN
      system/extensions/install-languages.zip

+ 4 - 0
system/extensions/edit.js

@@ -825,6 +825,10 @@ yellow.edit = {
             request.open("POST", window.location.pathname, true);
             request.onload = function() { if (this.status==200) { thisObject.uploadFileDone.call(thisObject, elementText, this.responseText); } else { thisObject.uploadFileError.call(thisObject, elementText, this.responseText); } };
             request.send(formData);
+        } else {
+            var textError = extensions.indexOf(extension)!=-1 ? "file too big!" : "format not supported!";
+            var textNew = "[Can't upload file '"+file.name+"', "+textError+"]";
+            yellow.editor.setMarkdown(elementText, textNew, "insert");
         }
     },
     

+ 1 - 1
system/extensions/edit.php

@@ -4,7 +4,7 @@
 // This file may be used and distributed under the terms of the public license.
 
 class YellowEdit {
-    const VERSION = "0.8.15";
+    const VERSION = "0.8.16";
     const TYPE = "feature";
     public $yellow;         //access to API
     public $response;       //web response

BIN
system/extensions/install-languages.zip