-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.js
49 lines (40 loc) · 1.55 KB
/
plugin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
GENTICS.Aloha.Help = new GENTICS.Aloha.Plugin('com.gentics.aloha.plugins.Help');
GENTICS.Aloha.Help.languages = ['en', 'ru'];
GENTICS.Aloha.Help.url = "https://github.com/alohaeditor/Aloha-Editor/wiki";
GENTICS.Aloha.Help.width = 640;
GENTICS.Aloha.Help.height = 480;
GENTICS.Aloha.Help.init = function () {
var that = this;
if (GENTICS.Aloha.Help.settings.url != undefined) {
GENTICS.Aloha.Help.url = GENTICS.Aloha.Help.settings.url
}
if (GENTICS.Aloha.Help.settings.width != undefined) {
GENTICS.Aloha.Help.width = GENTICS.Aloha.Help.settings.width
}
if (GENTICS.Aloha.Help.settings.height != undefined) {
GENTICS.Aloha.Help.height = GENTICS.Aloha.Help.settings.height
}
var stylePath = GENTICS.Aloha.settings.base + '/plugins/com.gentics.aloha.plugins.Help/css/Help.css';
jQuery('<link rel="stylesheet" />').attr('href', stylePath).appendTo('head');
var helpButton = new GENTICS.Aloha.ui.Button({
"iconClass" : "GENTICS_button_help",
"size" : "small",
"onclick": function () {
new Ext.Window({
title: 'Help',
width: GENTICS.Aloha.Help.width,
height: GENTICS.Aloha.Help.height,
html: '<iframe style="overflow:auto;width:100%;height:100%;" frameborder="0" src="'+ GENTICS.Aloha.Help.url +'"></iframe>',
plain: true,
style: {zIndex: '11111 !important'},
shadow: false,
border: false
}).show();
}
});
GENTICS.Aloha.FloatingMenu.addButton(
"GENTICS.Aloha.continuoustext",
helpButton,
that.i18n("floatingmenu.tab.format"), 2
);
};