Retour à la documentation
/**
* @class spw.widgets.SpwFileDownloader
*/
define(["dojo/_base/declare","spw/api/SpwBaseWidget", "dojo/i18n!./nls/SpwFileDownloader"], function(declare, SpwBaseWidget, labels){
var SpwFileDownloader = null;
SpwFileDownloader = declare("spw.widgets.SpwFileDownloader", [SpwBaseWidget], /** @lends spw.widgets.SpwFileDownloader.prototype */{
fileUrl: null,
/**
* @constructs
* @param config
*/
constructor: function (config) {
this.widgetTitle = labels.widgetTitle;
this.iconClass = "spwFileDownloaderDefaultIcon";
this.fileUrl = "";
},
onActivate: function () {
window.open(this.fileUrl);
}
});
return SpwFileDownloader;
});