From b21f8bd3ef368563f2debf4e0debfb319ce763ea Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 27 May 2014 14:08:36 -0400
Subject: [PATCH] Implemented image selector dialog for TinyMCE, css fixes in classic skin for TinyMCE4

---
 program/js/app.js |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 43dba14..b0b2cb1 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -539,12 +539,12 @@
 
     // execute all foreign onload scripts
     // @deprecated
-    for (var i in this.onloads) {
-      if (typeof this.onloads[i] === 'string')
-        eval(this.onloads[i]);
-      else if (typeof this.onloads[i] === 'function')
-        this.onloads[i]();
-      }
+    for (n in this.onloads) {
+      if (typeof this.onloads[n] === 'string')
+        eval(this.onloads[n]);
+      else if (typeof this.onloads[n] === 'function')
+        this.onloads[n]();
+    }
 
     // start keep-alive and refresh intervals
     this.start_refresh();
@@ -4010,6 +4010,9 @@
   // called from upload page
   this.add2attachment_list = function(name, att, upload_id)
   {
+    if (upload_id)
+      this.triggerEvent('fileuploaded', {name: name, attachment: att, id: upload_id});
+
     if (!this.gui_objects.attachmentlist)
       return false;
 

--
Gitblit v1.9.1