support for icons in plugin buttons
This commit is contained in:
Родитель
4fa16d62b9
Коммит
a9190e57b9
|
@ -813,7 +813,7 @@ module TDev {
|
|||
macro == "stvalidator" || macro == "stnoprofile" || macro == "stauto" || macro == "sthints" ||
|
||||
macro == "stcode" || macro == "storder" || macro == "stdelete" || macro == "stcheckpoint" || macro == "sthashtags" ||
|
||||
macro == "stnocheers" || macro == "steditormode" || macro == "stnexttutorials" || macro == "stmoretutorials" ||
|
||||
macro == "translations" || macro == "stpixeltracking" || macro == "steventhubstracking"
|
||||
macro == "translations" || macro == "stpixeltracking" || macro == "steventhubstracking" || macro == "icon"
|
||||
) {
|
||||
if (this.designTime)
|
||||
return "{" + macro + (arg ? ":" + Util.htmlEscape(arg) : "") + "}";
|
||||
|
|
|
@ -373,12 +373,13 @@ module TDev.Plugins {
|
|||
Script.editorState.buttonPlugins[si.getGuid()] = 1
|
||||
|
||||
btns.forEach(btn => {
|
||||
var ico = /{icon:([a-z]+)}/.exec(btn.getDescription());
|
||||
p.operations.push(<PluginOperation> {
|
||||
opid: btn.getName(),
|
||||
header: btn.getName(),
|
||||
description: btn.getInlineHelp(),
|
||||
buttonScope: "script",
|
||||
icon: app.iconName(),
|
||||
icon: ico ? ico[1] : app.iconName(),
|
||||
})
|
||||
})
|
||||
// extract profile
|
||||
|
|
|
@ -5364,7 +5364,7 @@
|
|||
divs.push(div('', pull, diff));
|
||||
}
|
||||
|
||||
if (Cloud.lite && sc.jsonScript && sc.jsonScript.userid == Cloud.getUserId()) {
|
||||
if (Cloud.lite && !Cloud.isRestricted() && sc.jsonScript && sc.jsonScript.userid == Cloud.getUserId()) {
|
||||
socialNetworks.forEach(sn => {
|
||||
var metaInput: HTMLInputElement;
|
||||
var meta = div('sdSocialEmbed', HTML.mkImg("svg:" + sn.id + ",black,clip=100"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче