add baseUrl param to plugin
This commit is contained in:
parent
2d7812fe48
commit
7a650ebddb
|
@ -93,6 +93,7 @@ define([
|
|||
var plugin = new Asc.CPlugin();
|
||||
plugin.set_Name(item.get('name'));
|
||||
plugin.set_Guid(item.get('guid'));
|
||||
plugin.set_BaseUrl(item.get('baseUrl'));
|
||||
var variations = item.get('variations'),
|
||||
variationsArr = [];
|
||||
variations.forEach(function(itemVar){
|
||||
|
@ -136,9 +137,10 @@ define([
|
|||
});
|
||||
}
|
||||
|
||||
var _baseUrl = (plugin.get_BaseUrl().length == 0) ? me.panelPlugins.pluginsPath : plugin.get_BaseUrl();
|
||||
me.pluginDlg = new Common.Views.PluginDlg({
|
||||
title: plugin.get_Name(),
|
||||
url: me.panelPlugins.pluginsPath + variation.get_Url(),
|
||||
url: _baseUrl + variation.get_Url(),
|
||||
buttons: newBtns,
|
||||
toolcallback: _.bind(this.onToolClose, this)
|
||||
});
|
||||
|
|
|
@ -73,6 +73,7 @@ define([
|
|||
return {
|
||||
id: Common.UI.getId(),
|
||||
name : '',
|
||||
baseUrl : '',
|
||||
guid: Common.UI.getId(),
|
||||
variations: [],
|
||||
currentVariation: 0,
|
||||
|
|
|
@ -75,7 +75,7 @@ define([
|
|||
el: $('#plugins-list'),
|
||||
store: this.storePlugins,
|
||||
enableKeyEvents: false,
|
||||
itemTemplate: _.template('<div id="<%= id %>" class="item-plugins" style="background-image: url(' + this.pluginsPath + '<%= variations[currentVariation].get("icons")[(window.devicePixelRatio > 1) ? 1 : 0] %>); background-position: 0 0;"></div>')
|
||||
itemTemplate: _.template('<div id="<%= id %>" class="item-plugins" style="background-image: url(' + '<% if (baseUrl !=="") { %>' + '<%= baseUrl %>' + '<% } else { %>' + this.pluginsPath + '<% } %>' + '<%= variations[currentVariation].get("icons")[(window.devicePixelRatio > 1) ? 1 : 0] %>); background-position: 0 0;"></div>')
|
||||
});
|
||||
|
||||
this.trigger('render:after', this);
|
||||
|
|
|
@ -1730,6 +1730,7 @@ define([
|
|||
arr.push(new Common.Models.Plugin({
|
||||
name : item.name,
|
||||
guid: item.guid,
|
||||
baseUrl : item.baseUrl,
|
||||
variations: variationsArr,
|
||||
currentVariation: 0
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue