Fix restore element width when press double click over data image simple_value - #412
This commit is contained in:
parent
ef0e6a2093
commit
31a8995176
|
@ -576,8 +576,10 @@ function readFields() {
|
|||
}
|
||||
values['width'] = $("input[name=width]").val();
|
||||
values['width_data_image'] = $("#data_image_width").val();
|
||||
if(values['width_data_image'] != 0){
|
||||
values['width'] = values['width_data_image'];
|
||||
if(selectedItem == 'simple_value' || creationItem == 'simple_value'){
|
||||
if(values['width_data_image'] != 0){
|
||||
values['width'] = values['width_data_image'];
|
||||
}
|
||||
}
|
||||
values['height'] = $("input[name=height]").val();
|
||||
values['parent'] = $("select[name=parent]").val();
|
||||
|
@ -2989,7 +2991,7 @@ function eventsItems(drag) {
|
|||
}
|
||||
|
||||
if(selectedItem == 'simple_value'){
|
||||
|
||||
$('#data_image_width').val(event.currentTarget.clientWidth);
|
||||
var found = $('#'+idItem).find("img");
|
||||
|
||||
if(found.length > 0){
|
||||
|
@ -3344,6 +3346,7 @@ function click_button_toolbox(id) {
|
|||
$("#period_row." + id).css('display', 'none');
|
||||
break;
|
||||
case 'label':
|
||||
$("#data_image_width").val(100);
|
||||
toolbuttonActive = creationItem = 'label';
|
||||
toggle_item_palette();
|
||||
break;
|
||||
|
|
|
@ -314,7 +314,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||
$form_items['module_row']['html'] = '<td align="left">' .
|
||||
__('Module') . '</td>
|
||||
<td align="left">' .
|
||||
html_print_select(array(), 'module', '', '', __('Any'), 0, true). '<div id="data_image_container" style="display:none;"><span id="data_image_check_label" style="margin-left:20px;">'.__("Data image").': </span><span id="data_image_check">Off</span><span id="data_image_width_label"> - Width: </span><input style="margin-left:5px;width:40px;" type="number" id="data_image_width" value="100"></input></div>
|
||||
html_print_select(array(), 'module', '', '', __('Any'), 0, true). '<div id="data_image_container" style="display:none;"><span id="data_image_check_label" style="margin-left:20px;">'.__("Data image").': </span><span id="data_image_check">Off</span><span id="data_image_width_label"> - Width: </span><input style="margin-left:5px;width:40px;" type="number" min="0" id="data_image_width" value="100"></input></div>
|
||||
</td>';
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue