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'] = $("input[name=width]").val();
|
||||||
values['width_data_image'] = $("#data_image_width").val();
|
values['width_data_image'] = $("#data_image_width").val();
|
||||||
if(values['width_data_image'] != 0){
|
if(selectedItem == 'simple_value' || creationItem == 'simple_value'){
|
||||||
values['width'] = values['width_data_image'];
|
if(values['width_data_image'] != 0){
|
||||||
|
values['width'] = values['width_data_image'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
values['height'] = $("input[name=height]").val();
|
values['height'] = $("input[name=height]").val();
|
||||||
values['parent'] = $("select[name=parent]").val();
|
values['parent'] = $("select[name=parent]").val();
|
||||||
|
@ -2989,7 +2991,7 @@ function eventsItems(drag) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(selectedItem == 'simple_value'){
|
if(selectedItem == 'simple_value'){
|
||||||
|
$('#data_image_width').val(event.currentTarget.clientWidth);
|
||||||
var found = $('#'+idItem).find("img");
|
var found = $('#'+idItem).find("img");
|
||||||
|
|
||||||
if(found.length > 0){
|
if(found.length > 0){
|
||||||
|
@ -3344,6 +3346,7 @@ function click_button_toolbox(id) {
|
||||||
$("#period_row." + id).css('display', 'none');
|
$("#period_row." + id).css('display', 'none');
|
||||||
break;
|
break;
|
||||||
case 'label':
|
case 'label':
|
||||||
|
$("#data_image_width").val(100);
|
||||||
toolbuttonActive = creationItem = 'label';
|
toolbuttonActive = creationItem = 'label';
|
||||||
toggle_item_palette();
|
toggle_item_palette();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -314,7 +314,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
||||||
$form_items['module_row']['html'] = '<td align="left">' .
|
$form_items['module_row']['html'] = '<td align="left">' .
|
||||||
__('Module') . '</td>
|
__('Module') . '</td>
|
||||||
<td align="left">' .
|
<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>';
|
</td>';
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue