support for icons in plugin buttons

This commit is contained in:
Peli de Halleux 2015-05-12 23:13:24 -07:00
Родитель 4fa16d62b9
Коммит a9190e57b9
3 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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"),