fixed styles and more

This commit is contained in:
Daniel Barbero 2020-01-09 18:05:21 +01:00
parent a933a091ea
commit 7e4cb02ceb
10 changed files with 148 additions and 72 deletions

View File

@ -1900,14 +1900,17 @@ class Item extends CachedModel
case 'label': case 'label':
// Label. // Label.
// TODO tinyMCE. // TODO tinyMCE.
$inputs[] = ['label' => __('Label')];
$inputs[] = [ $inputs[] = [
'label' => __('Label'), 'id' => 'div-textarea-label',
'id' => 'div-label',
'arguments' => [ 'arguments' => [
'name' => 'label', 'type' => 'textarea',
'type' => 'text', 'rows' => 4,
'value' => $values['label'], 'columns' => 60,
'return' => true, 'name' => 'label',
'value' => $values['label'],
'return' => true,
], ],
]; ];
break; break;

View File

@ -106,6 +106,7 @@ class View extends \HTML
$result = html_print_tabs($tabs); $result = html_print_tabs($tabs);
// TODO:Change other place. // TODO:Change other place.
\ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
$js = '<script> $js = '<script>
$(function() { $(function() {
$tabs = $( "#html-tabs" ).tabs({ $tabs = $( "#html-tabs" ).tabs({
@ -124,6 +125,43 @@ class View extends \HTML
); );
}); });
}, },
load: function( event, ui ) {
console.log(event);
console.log(ui);
tinymce.init({
selector: "#textarea_label",
theme: "advanced",
//content_css: baseUrl + "include/styles/pandora.css",
theme_advanced_font_sizes:
"4pt=.visual_font_size_4pt, " +
"6pt=.visual_font_size_6pt, " +
"8pt=.visual_font_size_8pt, " +
"10pt=.visual_font_size_10pt, " +
"12pt=.visual_font_size_12pt, " +
"14pt=.visual_font_size_14pt, " +
"18pt=.visual_font_size_18pt, " +
"24pt=.visual_font_size_24pt, " +
"28pt=.visual_font_size_28pt, " +
"36pt=.visual_font_size_36pt, " +
"48pt=.visual_font_size_48pt, " +
"60pt=.visual_font_size_60pt, " +
"72pt=.visual_font_size_72pt, " +
"84pt=.visual_font_size_84pt, " +
"96pt=.visual_font_size_96pt, " +
"116pt=.visual_font_size_116pt, " +
"128pt=.visual_font_size_128pt, " +
"140pt=.visual_font_size_140pt, " +
"154pt=.visual_font_size_154pt, " +
"196pt=.visual_font_size_196pt",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_buttons1:
"bold,italic, |,justifyleft, justifycenter, justifyright, |, undo, redo, |, image, link, |, fontselect, forecolor, fontsizeselect, |,code",
theme_advanced_buttons2: "",
theme_advanced_buttons3: "",
theme_advanced_statusbar_location: "none"
});
},
active: 2 active: 2
});'; });';
$js .= '});'; $js .= '});';

View File

@ -25,7 +25,19 @@ div#vc-controls img.vc-qr {
margin-right: 8px; margin-right: 8px;
} }
#menu_tab_frame_view {
margin-bottom: 0px;
}
#edit-vc {
display: flex;
flex-direction: row;
align-items: center;
margin-bottom: 5px;
}
.visual-console-edit-controls { .visual-console-edit-controls {
flex: 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
@ -34,6 +46,14 @@ div#vc-controls img.vc-qr {
margin: 4px; margin: 4px;
} }
.visual-console-copy-delete {
margin-right: 20px;
}
#edit-vc label {
flex: inherit;
}
input.vs_button_ghost { input.vs_button_ghost {
background-color: transparent; background-color: transparent;
border: 1px solid #82b92e; border: 1px solid #82b92e;
@ -51,144 +71,153 @@ input.vs_button_ghost {
margin-top: 13px; margin-top: 13px;
} }
input.visual_editor_button_toolbox { input.visual_editor_button_toolbox {
padding-right: 15px; padding-right: 20px;
padding-top: 10px; padding-top: 12px;
margin-top: 5px; padding-bottom: 12px;
border: none;
border-bottom: 3px solid transparent;
padding-left: 20px;
border-radius: initial;
} }
button.sub:hover,
input.sub:hover {
border: 0px;
border-bottom: 3px solid #82b92e;
}
button.sub[disabled],
input.sub[disabled] {
border-color: transparent;
}
input.delete_min { input.delete_min {
background: #fefefe url(../../images/cross.png) no-repeat center; background: url(../../images/cross.png) no-repeat center;
} }
input.delete_min[disabled] { input.delete_min[disabled] {
background: #fefefe url(../../images/cross.disabled.png) no-repeat center; background: url(../../images/cross.disabled.png) no-repeat center;
} }
input.graph_min { input.graph_min {
background: #fefefe url(../../images/chart_curve.png) no-repeat center; background: url(../../images/chart_curve.png) no-repeat center;
} }
input.graph_min[disabled] { input.graph_min[disabled] {
background: #fefefe url(../../images/chart_curve.disabled.png) no-repeat background: url(../../images/chart_curve.disabled.png) no-repeat center;
center;
} }
input.bars_graph_min { input.bars_graph_min {
background: #fefefe url(../../images/icono-barras-arriba.png) no-repeat center; background: url(../../images/icono-barras-arriba.png) no-repeat center;
} }
input.bars_graph_min[disabled] { input.bars_graph_min[disabled] {
background: #fefefe url(../../images/icono-barras-arriba.disabled.png) background: url(../../images/icono-barras-arriba.disabled.png) no-repeat
no-repeat center; center;
} }
input.percentile_min { input.percentile_min {
background: #fefefe url(../../images/chart_bar.png) no-repeat center; background: url(../../images/chart_bar.png) no-repeat center;
} }
input.percentile_min[disabled] { input.percentile_min[disabled] {
background: #fefefe url(../../images/chart_bar.disabled.png) no-repeat center; background: url(../../images/chart_bar.disabled.png) no-repeat center;
} }
input.percentile_item_min { input.percentile_item_min {
background: #fefefe url(../../images/percentile_item.png) no-repeat center; background: url(../../images/percentile_item.png) no-repeat center;
} }
input.percentile_item_min[disabled] { input.percentile_item_min[disabled] {
background: #fefefe url(../../images/percentile_item.disabled.png) no-repeat background: url(../../images/percentile_item.disabled.png) no-repeat center;
center;
} }
input.auto_sla_graph_min { input.auto_sla_graph_min {
background: #fefefe url(../../images/auto_sla_graph.png) no-repeat center; background: url(../../images/auto_sla_graph.png) no-repeat center;
} }
input.auto_sla_graph_min[disabled] { input.auto_sla_graph_min[disabled] {
background: #fefefe url(../../images/auto_sla_graph.disabled.png) no-repeat background: url(../../images/auto_sla_graph.disabled.png) no-repeat center;
center;
} }
input.donut_graph_min { input.donut_graph_min {
background: #fefefe url(../../images/icono-quesito.png) no-repeat center; background: url(../../images/icono-quesito.png) no-repeat center;
} }
input.donut_graph_min[disabled] { input.donut_graph_min[disabled] {
background: #fefefe url(../../images/icono-quesito.disabled.png) no-repeat background: url(../../images/icono-quesito.disabled.png) no-repeat center;
center;
} }
input.binary_min { input.binary_min {
background: #fefefe url(../../images/binary.png) no-repeat center; background: url(../../images/binary.png) no-repeat center;
} }
input.binary_min[disabled] { input.binary_min[disabled] {
background: #fefefe url(../../images/binary.disabled.png) no-repeat center; background: url(../../images/binary.disabled.png) no-repeat center;
} }
input.camera_min { input.camera_min {
background: #fefefe url(../../images/camera.png) no-repeat center; background: url(../../images/camera.png) no-repeat center;
} }
input.camera_min[disabled] { input.camera_min[disabled] {
background: #fefefe url(../../images/camera.disabled.png) no-repeat center; background: url(../../images/camera.disabled.png) no-repeat center;
} }
input.config_min { input.config_min {
background: #fefefe url(../../images/config.png) no-repeat center; background: url(../../images/config.png) no-repeat center;
} }
input.config_min[disabled] { input.config_min[disabled] {
background: #fefefe url(../../images/config.disabled.png) no-repeat center; background: url(../../images/config.disabled.png) no-repeat center;
} }
input.label_min { input.label_min {
background: #fefefe url(../../images/tag_red.png) no-repeat center; background: url(../../images/tag_red.png) no-repeat center;
} }
input.label_min[disabled] { input.label_min[disabled] {
background: #fefefe url(../../images/tag_red.disabled.png) no-repeat center; background: url(../../images/tag_red.disabled.png) no-repeat center;
} }
input.icon_min { input.icon_min {
background: #fefefe url(../../images/photo.png) no-repeat center; background: url(../../images/photo.png) no-repeat center;
} }
input.icon_min[disabled] { input.icon_min[disabled] {
background: #fefefe url(../../images/photo.disabled.png) no-repeat center; background: url(../../images/photo.disabled.png) no-repeat center;
} }
input.clock_min { input.clock_min {
background: #fefefe url(../../images/clock-tab.png) no-repeat center; background: url(../../images/clock-tab.png) no-repeat center;
} }
input.clock_min[disabled] { input.clock_min[disabled] {
background: #fefefe url(../../images/clock-tab.disabled.png) no-repeat center; background: url(../../images/clock-tab.disabled.png) no-repeat center;
} }
input.box_item { input.box_item {
background: #fefefe url(../../images/box_item.png) no-repeat center; background: url(../../images/box_item.png) no-repeat center;
} }
input.box_item[disabled] { input.box_item[disabled] {
background: #fefefe url(../../images/box_item.disabled.png) no-repeat center; background: url(../../images/box_item.disabled.png) no-repeat center;
} }
input.line_item { input.line_item {
background: #fefefe url(../../images/line_item.png) no-repeat center; background: url(../../images/line_item.png) no-repeat center;
} }
input.line_item[disabled] { input.line_item[disabled] {
background: #fefefe url(../../images/line_item.disabled.png) no-repeat center; background: url(../../images/line_item.disabled.png) no-repeat center;
} }
input.copy_item { input.copy_item {
background: #fefefe url(../../images/copy_visualmap.png) no-repeat center; background: url(../../images/copy_visualmap.png) no-repeat center;
} }
input.copy_item[disabled] { input.copy_item[disabled] {
background: #fefefe url(../../images/copy_visualmap.disabled.png) no-repeat background: url(../../images/copy_visualmap.disabled.png) no-repeat center;
center;
} }
input.grid_min { input.grid_min {
background: #fefefe url(../../images/grid.png) no-repeat center; background: url(../../images/grid.png) no-repeat center;
} }
input.grid_min[disabled] { input.grid_min[disabled] {
background: #fefefe url(../../images/grid.disabled.png) no-repeat center; background: url(../../images/grid.disabled.png) no-repeat center;
} }
input.save_min { input.save_min {
background: #fefefe url(../../images/file.png) no-repeat center; background: url(../../images/file.png) no-repeat center;
} }
input.save_min[disabled] { input.save_min[disabled] {
background: #fefefe url(../../images/file.disabled.png) no-repeat center; background: url(../../images/file.disabled.png) no-repeat center;
} }
input.service_min { input.service_min {
background: #fefefe url(../../images/box.png) no-repeat center; background: url(../../images/box.png) no-repeat center;
} }
input.service_min[disabled] { input.service_min[disabled] {
background: #fefefe url(../../images/box.disabled.png) no-repeat center; background: url(../../images/box.disabled.png) no-repeat center;
} }
input.group_item_min { input.group_item_min {
background: #fefefe url(../../images/group_green.png) no-repeat center; background: url(../../images/group_green.png) no-repeat center;
} }
input.group_item_min[disabled] { input.group_item_min[disabled] {
background: #fefefe url(../../images/group_green.disabled.png) no-repeat background: url(../../images/group_green.disabled.png) no-repeat center;
center;
} }
input.color_cloud_min { input.color_cloud_min {
background: #fefefe url(../../images/color_cloud_item.png) no-repeat center; background: url(../../images/color_cloud_item.png) no-repeat center;
} }
input.color_cloud_min[disabled] { input.color_cloud_min[disabled] {
background: #fefefe url(../../images/color_cloud_item.disabled.png) no-repeat background: url(../../images/color_cloud_item.disabled.png) no-repeat center;
center;
} }
div#cont { div#cont {

View File

@ -548,6 +548,12 @@ li#li-image-item label img {
width: inherit; width: inherit;
} }
.discovery.modal li#div-textarea-label > label {
-webkit-box-flex: inherit;
-ms-flex: inherit;
flex: inherit;
}
/* Styles for the solid icons */ /* Styles for the solid icons */
.fa { .fa {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -205,12 +205,7 @@ if (!is_metaconsole()) {
} }
if ($pure === false) { if ($pure === false) {
echo '<div class="visual-console-edit-controls">'; echo '<div id ="edit-vc">';
echo '<span>'.__('Move and resize mode').'</span>';
echo '<span>';
echo html_print_checkbox_switch('edit-mode', 1, false, true);
echo '</span>';
echo '</div>';
echo '<div id ="edit-controls" class="visual-console-edit-controls" style="visibility:hidden">'; echo '<div id ="edit-controls" class="visual-console-edit-controls" style="visibility:hidden">';
echo '<div>'; echo '<div>';
visual_map_print_button_editor_refactor( visual_map_print_button_editor_refactor(
@ -285,7 +280,7 @@ if ($pure === false) {
); );
// TODO: SERVICE. // TODO: SERVICE.
echo '</div>'; echo '</div>';
echo '<div>'; echo '<div class="visual-console-copy-delete">';
visual_map_print_button_editor_refactor( visual_map_print_button_editor_refactor(
'button_delete', 'button_delete',
__('Delete Item'), __('Delete Item'),
@ -300,7 +295,8 @@ if ($pure === false) {
); );
echo '</div>'; echo '</div>';
echo '</div>'; echo '</div>';
echo '<br />'; echo html_print_checkbox_switch('edit-mode', 1, false, true);
echo '</div>';
} }
echo '<div id="visual-console-container"></div>'; echo '<div id="visual-console-container"></div>';

View File

@ -384,7 +384,7 @@ export default class Line extends Item<LineProps> {
startCircle.style.width = `${this.circleRadius * 2}px`; startCircle.style.width = `${this.circleRadius * 2}px`;
startCircle.style.height = `${this.circleRadius * 2}px`; startCircle.style.height = `${this.circleRadius * 2}px`;
startCircle.style.borderRadius = "50%"; startCircle.style.borderRadius = "50%";
startCircle.style.backgroundColor = "white"; startCircle.style.backgroundColor = `${color}`;
startCircle.style.position = "absolute"; startCircle.style.position = "absolute";
startCircle.style.left = startIsLeft startCircle.style.left = startIsLeft
? `-${this.circleRadius}px` ? `-${this.circleRadius}px`
@ -400,7 +400,7 @@ export default class Line extends Item<LineProps> {
endCircle.style.width = `${this.circleRadius * 2}px`; endCircle.style.width = `${this.circleRadius * 2}px`;
endCircle.style.height = `${this.circleRadius * 2}px`; endCircle.style.height = `${this.circleRadius * 2}px`;
endCircle.style.borderRadius = "50%"; endCircle.style.borderRadius = "50%";
endCircle.style.backgroundColor = "black"; endCircle.style.backgroundColor = `${color}`;
endCircle.style.position = "absolute"; endCircle.style.position = "absolute";
endCircle.style.left = startIsLeft endCircle.style.left = startIsLeft
? `${width + lineWidth - 8}px` ? `${width + lineWidth - 8}px`

View File

@ -426,3 +426,7 @@ li#li-image-item label img {
max-width: 230px; max-width: 230px;
width: inherit; width: inherit;
} }
.discovery.modal li#div-textarea-label > label {
flex: inherit;
}