Merge branch '984-Meter-fondo-de-imagen-de-cuadros-grises-blancos-para-textarea-de-etiquetas-de-texto-en-la-consola-visual' into 'develop'

Change vconsole label editor background color when rightclick on it - #984

See merge request !586
This commit is contained in:
vgilc 2017-06-20 11:31:26 +02:00
commit 72202ae357
2 changed files with 29 additions and 2 deletions

View File

@ -84,6 +84,28 @@ function visual_map_main() {
//Fixed to wait the load of images.
$(window).load(function() {
// Begin - Background label color changer
$( "#text-label_ifr" ).contents().find( "body" ).bind("contextmenu", function(e) {
e.preventDefault();
});
$( "#text-label_ifr" ).contents().find( "body" ).mousedown(function(e){
if(e.which == 3)
{
if($( "#text-label_ifr" ).contents().find( "body" ).css('background-color') == 'rgb(211, 211, 211)'){
$( "#text-label_ifr" ).contents().find( "body" ).css('background-color','white');
}
else{
$( "#text-label_ifr" ).contents().find( "body" ).css('background-color','lightgray');
}
}
});
// End - Background label color changer
$('#radiobtn0001').click(function(){
$("#custom_graph option[value=0]").prop("selected", true);
});
@ -930,7 +952,8 @@ function toggle_item_palette() {
});
$( "#text-label_ifr" ).contents().find( "p" ).css("line-height",$('#lineheight').val());
$( "#text-label_ifr" ).contents().find( "span" ).css("line-height",$('#lineheight').val());
$( "#text-label_ifr" ).contents().find( "span" ).css("line-height",$('#lineheight').val());
$( "#text-label_ifr" ).contents().find( "body" ).css("background","lightgray");
}
}

View File

@ -186,7 +186,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
</div>
</td>
<td align="left" style="">' .
html_print_input_text('label', '', '', 20, 200, true) . '</td>';
html_print_input_text('label', '', '', 20, 200, true) . '
<span id="advice_label" style="font-style:italic;z-index:3;display:inline;margin-top:0px;float:right;margin-right:100px;">
'.__("Click right mouse button to change background label editor color").'
</span>
</td>';
$form_items['image_row'] = array();