a:20:{s:9:"#provides";s:32:"dojox.editor.plugins.UploadImage";s:9:"#resource";s:29:"editor/plugins/UploadImage.js";s:9:"#requires";a:2:{i:0;a:3:{i:0;s:6:"common";i:1;s:21:"dijit._editor._Plugin";i:2;s:5:"dijit";}i:1;a:2:{i:0;s:6:"common";i:1;s:23:"dojox.form.FileUploader";}}s:32:"dojox.editor.plugins.UploadImage";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:21:"dijit._editor._Plugin";}s:4:"call";a:1:{i:0;s:21:"dijit._editor._Plugin";}}s:7:"summary";s:174:"Adds an icon to the Editor toolbar that when clicked, opens a system dialog Although the toolbar icon is a tiny "image" the uploader could be used for any file type";s:9:"classlike";b:1;}s:45:"dojox.editor.plugins.UploadImage.tempImageUrl";a:2:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:7:"summary";s:0:"";}s:48:"dojox.editor.plugins.UploadImage.iconClassPrefix";a:2:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:7:"summary";s:0:"";}s:50:"dojox.editor.plugins.UploadImage.useDefaultCommand";a:2:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:7:"summary";s:0:"";}s:42:"dojox.editor.plugins.UploadImage.uploadUrl";a:2:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:7:"summary";s:0:"";}s:42:"dojox.editor.plugins.UploadImage.fileInput";a:3:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:8:"instance";s:32:"dojox.editor.plugins.UploadImage";s:7:"summary";s:0:"";}s:38:"dojox.editor.plugins.UploadImage.label";a:2:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:7:"summary";s:0:"";}s:44:"dojox.editor.plugins.UploadImage._initButton";a:5:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:4:"type";s:8:"Function";s:6:"source";s:214:" this.command = "uploadImage"; this.editor.commands[this.command] = "Upload Image"; this.inherited("_initButton", arguments); delete this.command; setTimeout(dojo.hitch(this, "createFileInput"), 200);";s:7:"private";b:1;s:7:"summary";s:0:"";}s:48:"dojox.editor.plugins.UploadImage.createFileInput";a:4:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:4:"type";s:8:"Function";s:6:"source";s:532:" var fileMask = [ ["Jpeg File", "*.jpg;*.jpeg"], ["GIF File", "*.gif"], ["PNG File", "*.png"], ["All Images", "*.jpg;*.jpeg;*.gif;*.png"] ]; console.warn("downloadPath:", this.downloadPath); this.fileInput = new dojox.form.FileUploader({isDebug:true,button:this.button, uploadUrl:this.uploadUrl, uploadOnChange:true, selectMultipleFiles:false, fileMask:fileMask}); dojo.connect(this.fileInput, "onChange", this, "insertTempImage"); dojo.connect(this.fileInput, "onComplete", this, "onComplete");";s:7:"summary";s:0:"";}s:43:"dojox.editor.plugins.UploadImage.onComplete";a:5:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"data";a:1:{s:4:"type";s:0:"";}s:6:"ioArgs";a:1:{s:4:"type";s:0:"";}s:9:"widgetRef";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:528:" data = data[0]; // Image is ready to insert var tmpImgNode = dojo.withGlobal(this.editor.window, "byId", dojo, [this.currentImageId]); var file; // download path is mainly used so we can access a PHP script // not relative to this file. The server *should* return a qualified path. if(this.downloadPath){ file = this.downloadPath+data.name }else{ file = data.file; } tmpImgNode.src = file; if(data.width){ tmpImgNode.width = data.width; tmpImgNode.height = data.height; }";s:7:"summary";s:0:"";}s:48:"dojox.editor.plugins.UploadImage.insertTempImage";a:4:{s:9:"prototype";s:32:"dojox.editor.plugins.UploadImage";s:4:"type";s:8:"Function";s:6:"source";s:2357:"dojo.provide("dojox.editor.plugins.UploadImage"); dojo.require("dijit._editor._Plugin"); dojo.require("dojox.form.FileUploader"); dojo.experimental("dojox.editor.plugins.UploadImage"); dojo.declare("dojox.editor.plugins.UploadImage", dijit._editor._Plugin, { //summary: // Adds an icon to the Editor toolbar that when clicked, opens a system dialog // Although the toolbar icon is a tiny "image" the uploader could be used for // any file type tempImageUrl: "", iconClassPrefix: "editorIcon", useDefaultCommand: false, uploadUrl: "", fileInput:null, label:"Mike", _initButton: function(){ this.command = "uploadImage"; this.editor.commands[this.command] = "Upload Image"; this.inherited("_initButton", arguments); delete this.command; setTimeout(dojo.hitch(this, "createFileInput"), 200); }, createFileInput: function(){ var fileMask = [ ["Jpeg File", "*.jpg;*.jpeg"], ["GIF File", "*.gif"], ["PNG File", "*.png"], ["All Images", "*.jpg;*.jpeg;*.gif;*.png"] ]; console.warn("downloadPath:", this.downloadPath); this.fileInput = new dojox.form.FileUploader({isDebug:true,button:this.button, uploadUrl:this.uploadUrl, uploadOnChange:true, selectMultipleFiles:false, fileMask:fileMask}); dojo.connect(this.fileInput, "onChange", this, "insertTempImage"); dojo.connect(this.fileInput, "onComplete", this, "onComplete"); }, onComplete: function(data,ioArgs,widgetRef){ data = data[0]; // Image is ready to insert var tmpImgNode = dojo.withGlobal(this.editor.window, "byId", dojo, [this.currentImageId]); var file; // download path is mainly used so we can access a PHP script // not relative to this file. The server *should* return a qualified path. if(this.downloadPath){ file = this.downloadPath+data.name }else{ file = data.file; } tmpImgNode.src = file; if(data.width){ tmpImgNode.width = data.width; tmpImgNode.height = data.height; } }, insertTempImage: function(){ // inserting a "busy" image to show something is hapening // during upload and download of the image. this.currentImageId = "img_"+(new Date().getTime()); var iTxt = ''; this.editor.execCommand('inserthtml', iTxt);";s:7:"summary";s:0:"";}s:40:"dojox.editor.plugins.UploadImage.command";a:2:{s:8:"instance";s:32:"dojox.editor.plugins.UploadImage";s:7:"summary";s:0:"";}s:47:"dojox.editor.plugins.UploadImage.currentImageId";a:2:{s:8:"instance";s:32:"dojox.editor.plugins.UploadImage";s:7:"summary";s:0:"";}s:8:"o.plugin";a:1:{s:7:"summary";s:0:"";}s:20:"dojox.editor.plugins";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:12:"dojox.editor";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}