mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Merge branch 'ent-2886-consolas-visuales-static-graphs-en-metaconsola-carrefour-2' into 'develop'
Fixed static graph without images creation and update previsualization See merge request artica/pandorafms!2068 Former-commit-id: 1af0b86541aa191b15b7595e3a636fddd206944a
This commit is contained in:
commit
5fd4cd346a
@ -3674,9 +3674,10 @@ function insertDB(type, values) {
|
||||
success: function (data) {
|
||||
if (data['correct']) {
|
||||
id = data['id_data'];
|
||||
if((type === 'group_item') || (type === 'icon') || (type === 'static_graph')){
|
||||
values['naturalWidth'] = $('#preview > img')[0].naturalWidth;
|
||||
values['naturalHeight'] = $('#preview > img')[0].naturalHeight;
|
||||
var image_to_show = $('#preview > img')[0];
|
||||
if((type === 'group_item') || (type === 'icon') || (type === 'static_graph' && typeof(image_to_show) !== 'undefined')){
|
||||
values['naturalWidth'] = image_to_show.naturalWidth;
|
||||
values['naturalHeight'] = image_to_show.naturalHeight;
|
||||
}
|
||||
createItem(type, values, id);
|
||||
addItemSelectParents(id, data['text']);
|
||||
@ -4947,6 +4948,9 @@ function showPreviewStaticGraph(staticGraph) {
|
||||
$spinner.prop("src", "../../images/spinner.gif");
|
||||
}
|
||||
|
||||
// If no image configured do not show anything
|
||||
if (staticGraph === null) return;
|
||||
|
||||
$("#preview")
|
||||
.empty()
|
||||
.css('text-align', 'right')
|
||||
|
Loading…
x
Reference in New Issue
Block a user