index.phtml
3.9 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
/**
* @var $model N2SystemFontModel
*/
$sets = $model->getSets();
N2FontRenderer::$sets[] = $sets[0]['id'];
$fonts = array();
foreach (array_unique(N2FontRenderer::$sets) AS $setId) {
$fonts[$setId] = $model->getVisuals($setId);
}
$fontSettings = N2Fonts::loadSettings();
N2JS::addFirstCode("
new NextendFontManager({
setsIdentifier: '" . $model->type . "set',
sets: " . json_encode($sets) . ",
visuals: " . json_encode($fonts) . ",
renderer: {
pre: '" . N2FontRenderer::$pre . "',
usedFonts: " . json_encode(N2FontRenderer::$fonts) . ",
modes: " . json_encode(N2FontRenderer::$mode) . "
},
ajaxUrl: '" . $this->appType->router->createAjaxUrl(array('font/index')) . "',
defaultFamily: " . json_encode($fontSettings['default-family']) . "
});
");
?>
<div class="n2-form-tab ">
<div class="n2-heading-controls n2-content-box-title-bg">
<div class="n2-table n2-table-fixed">
<div class="n2-tr">
<div class="n2-td n2-h2">
<?php n2_e('Font settings'); ?>
</div>
<div class="n2-td n2-last n2-visual-editor-tabs">
<a href="#"
class="n2-button n2-button-normal n2-button-m n2-radius-s n2-button-grey n2-vm n2-editor-clear-tab n2-h5 n2-uc"
style="display: none;"><?php n2_e('Clear tab'); ?></a>
<div class="n2-form-element-radio-tab">
<div class="n2-radio-option n2-h4 n2-first n2-last n2-active">
#0
</div>
<input type="hidden" autocomplete="off" value="0" name="n2-font-editor-tabs"
id="n2-font-editor-tabs">
</div>
</div>
</div>
</div>
</div>
<div>
<?php
$model->renderForm();
?>
</div>
</div>
<div class="n2-form-tab n2-editor-preview-box">
<div class="n2-heading-controls n2-content-box-title-bg">
<div class="n2-table n2-table-fixed">
<div class="n2-tr">
<div class="n2-td n2-h2">
<?php n2_e('Preview'); ?>
</div>
<div class="n2-td n2-last n2-visual-editor-preview-tab">
<div class="n2-form-element-radio-tab n2-expert">
<div class="n2-radio-option n2-h4 n2-first n2-last n2-active">
<?php n2_e('Default'); ?>
</div>
<input type="hidden" autocomplete="off" value="0" name="n2-font-editor-preview-mode"
id="n2-font-editor-preview-mode">
</div>
<div class="n2-editor-background-color">
<div style="" class="n2-form-element-text n2-form-element-color n2-border-radius">
<div class="n2-sp-replacer">
<div class="n2-sp-preview">
<div class="n2-sp-preview-inner"></div>
</div>
<div class="n2-sp-dd">▲</div>
</div>
<input type="text" autocomplete="off" class="n2-h5" value="ced3d5"
name="n2-font-editor-background-color" id="n2-font-editor-background-color">
</div>
</div>
</div>
</div>
</div>
</div>
<div id="n2-font-editor-preview">
</div>
</div>
<?php
$model->renderFormExtra();
?>