mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +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) {
|
success: function (data) {
|
||||||
if (data['correct']) {
|
if (data['correct']) {
|
||||||
id = data['id_data'];
|
id = data['id_data'];
|
||||||
if((type === 'group_item') || (type === 'icon') || (type === 'static_graph')){
|
var image_to_show = $('#preview > img')[0];
|
||||||
values['naturalWidth'] = $('#preview > img')[0].naturalWidth;
|
if((type === 'group_item') || (type === 'icon') || (type === 'static_graph' && typeof(image_to_show) !== 'undefined')){
|
||||||
values['naturalHeight'] = $('#preview > img')[0].naturalHeight;
|
values['naturalWidth'] = image_to_show.naturalWidth;
|
||||||
|
values['naturalHeight'] = image_to_show.naturalHeight;
|
||||||
}
|
}
|
||||||
createItem(type, values, id);
|
createItem(type, values, id);
|
||||||
addItemSelectParents(id, data['text']);
|
addItemSelectParents(id, data['text']);
|
||||||
@ -4947,6 +4948,9 @@ function showPreviewStaticGraph(staticGraph) {
|
|||||||
$spinner.prop("src", "../../images/spinner.gif");
|
$spinner.prop("src", "../../images/spinner.gif");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If no image configured do not show anything
|
||||||
|
if (staticGraph === null) return;
|
||||||
|
|
||||||
$("#preview")
|
$("#preview")
|
||||||
.empty()
|
.empty()
|
||||||
.css('text-align', 'right')
|
.css('text-align', 'right')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user