mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Adapt new items to meta
This commit is contained in:
parent
4cb4a699a5
commit
8980edf2ad
@ -201,7 +201,23 @@ echo "</form>";
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
|
|
||||||
|
var metaconsole = null;
|
||||||
|
function is_metaconsole() {
|
||||||
|
if (metaconsole === null)
|
||||||
|
metaconsole = $("input[name='metaconsole']").val();
|
||||||
|
|
||||||
|
if (metaconsole != 0)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var url_hack_metaconsole = '';
|
||||||
|
if (is_metaconsole()) {
|
||||||
|
url_hack_metaconsole = '../../';
|
||||||
|
}
|
||||||
|
|
||||||
$("#modsize").click(function(event){
|
$("#modsize").click(function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
@ -260,7 +276,7 @@ $(document).ready (function () {
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
original_image=new Image();
|
original_image=new Image();
|
||||||
original_image.src='images/console/background/'+$('#background').val();
|
original_image.src= url_hack_metaconsole + 'images/console/background/'+$('#background').val();
|
||||||
if (parseInt(original_image.width) < 1024){
|
if (parseInt(original_image.width) < 1024){
|
||||||
alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px');
|
alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px');
|
||||||
$('input[name=width]').val('1024');
|
$('input[name=width]').val('1024');
|
||||||
@ -310,7 +326,7 @@ $(document).ready (function () {
|
|||||||
var size_changer_state = false;
|
var size_changer_state = false;
|
||||||
|
|
||||||
$("#background").change(function() {
|
$("#background").change(function() {
|
||||||
$('#imagen2').attr('src','images/console/background/'+$('#background').val());
|
$('#imagen2').attr('src', url_hack_metaconsole + 'images/console/background/'+$('#background').val());
|
||||||
$('#imagen2').width(230);
|
$('#imagen2').width(230);
|
||||||
$('#imagen2').show();
|
$('#imagen2').show();
|
||||||
});
|
});
|
||||||
@ -323,7 +339,7 @@ $(document).ready (function () {
|
|||||||
|
|
||||||
$("#background").mouseout(function() {
|
$("#background").mouseout(function() {
|
||||||
if(size_changer_state){
|
if(size_changer_state){
|
||||||
$('#imagen').attr('src','images/console/background/'+$('#background').val());
|
$('#imagen').attr('src',url_hack_metaconsole + 'images/console/background/'+$('#background').val());
|
||||||
$('input[name=width]').val($('#imagen').width());
|
$('input[name=width]').val($('#imagen').width());
|
||||||
$('input[name=height]').val($('#imagen').height());
|
$('input[name=height]').val($('#imagen').height());
|
||||||
$('#preimagew').html($('#imagen').width());
|
$('#preimagew').html($('#imagen').width());
|
||||||
|
@ -1429,12 +1429,22 @@ function visual_map_print_item($mode = "read", $layoutData,
|
|||||||
$unit_text = "%";
|
$unit_text = "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_parameter('action') == 'edit') {
|
if (get_parameter('action') == 'edit' || (get_parameter('operation') == 'edit_visualmap')) {
|
||||||
if ($width == 0) {
|
if($width == 0){
|
||||||
$img = '<img src="images/console/signes/percentil.png" style="width:130px;height:30px;'.$imgpos.'">';
|
if ($layoutData['id_metaconsole'] != 0) {
|
||||||
|
$img = '<img src="' . '../../' . 'images/console/signes/percentil.png" style="width:130px;height:30px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$img = '<img src="images/console/signes/percentil.png" style="width:130px;height:30px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else{
|
||||||
$img = '<img src="images/console/signes/percentil.png" style="width:'.$width.'px;height:30px;'.$imgpos.'">';
|
if ($layoutData['id_metaconsole'] != 0) {
|
||||||
|
$img = '<img src="' . '../../' . '/images/console/signes/percentil.png" style="width:'.$width.'px;height:30px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$img = '<img src="images/console/signes/percentil.png" style="width:'.$width.'px;height:30px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -1457,12 +1467,22 @@ function visual_map_print_item($mode = "read", $layoutData,
|
|||||||
$unit_text = "%";
|
$unit_text = "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(get_parameter('action') == 'edit'){
|
if(get_parameter('action') == 'edit' || (get_parameter('operation') == 'edit_visualmap')){
|
||||||
if($width == 0){
|
if($width == 0){
|
||||||
$img = '<img src="images/console/signes/percentil_bubble.png" style="width:130px;height:130px;'.$imgpos.'">';
|
if ($layoutData['id_metaconsole'] != 0) {
|
||||||
|
$img = '<img src="' . '../../' . 'images/console/signes/percentil_bubble.png">';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$img = '<img src="images/console/signes/percentil_bubble.png">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$img = '<img src="images/console/signes/percentil_bubble.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
if ($layoutData['id_metaconsole'] != 0) {
|
||||||
|
$img = '<img src="' . '../../' . '/images/console/signes/percentil_bubble.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$img = '<img src="images/console/signes/percentil_bubble.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -1478,12 +1498,22 @@ function visual_map_print_item($mode = "read", $layoutData,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case CIRCULAR_PROGRESS_BAR:
|
case CIRCULAR_PROGRESS_BAR:
|
||||||
if(get_parameter('action') == 'edit'){
|
if(get_parameter('action') == 'edit' || (get_parameter('operation') == 'edit_visualmap')){
|
||||||
if($width == 0){
|
if($width == 0){
|
||||||
$img = '<img src="images/console/signes/circular-progress-bar.png" style="width:130px;height:130px;'.$imgpos.'">';
|
if ($layoutData['id_metaconsole'] != 0) {
|
||||||
|
$img = '<img src="' . '../../' . 'images/console/signes/circular-progress-bar.png">';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$img = '<img src="images/console/signes/circular-progress-bar.png">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$img = '<img src="images/console/signes/circular-progress-bar.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
if ($layoutData['id_metaconsole'] != 0) {
|
||||||
|
$img = '<img src="' . '../../' . '/images/console/signes/circular-progress-bar.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$img = '<img src="images/console/signes/circular-progress-bar.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1511,12 +1541,22 @@ function visual_map_print_item($mode = "read", $layoutData,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case CIRCULAR_INTERIOR_PROGRESS_BAR:
|
case CIRCULAR_INTERIOR_PROGRESS_BAR:
|
||||||
if(get_parameter('action') == 'edit'){
|
if(get_parameter('action') == 'edit' || (get_parameter('operation') == 'edit_visualmap')){
|
||||||
if($width == 0){
|
if($width == 0){
|
||||||
$img = '<img src="images/console/signes/circular-progress-bar-interior.png" style="width:130px;height:130px;'.$imgpos.'">';
|
if ($layoutData['id_metaconsole'] != 0) {
|
||||||
|
$img = '<img src="' . '../../' . 'images/console/signes/circular-progress-bar-interior.png">';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$img = '<img src="images/console/signes/circular-progress-bar-interior.png">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$img = '<img src="images/console/signes/circular-progress-bar-interior.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
if ($layoutData['id_metaconsole'] != 0) {
|
||||||
|
$img = '<img src="' . '../../' . '/images/console/signes/circular-progress-bar-interior.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$img = '<img src="images/console/signes/circular-progress-bar-interior.png" style="width:'.$width.'px;height:'.$width.'px;'.$imgpos.'">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -24,10 +24,16 @@ function include_javascript_d3 ($return = false) {
|
|||||||
if (!$is_include_javascript) {
|
if (!$is_include_javascript) {
|
||||||
$is_include_javascript = true;
|
$is_include_javascript = true;
|
||||||
|
|
||||||
$output .= '<script type="text/javascript" src="' . $config['homeurl'] . 'include/javascript/d3.3.5.14.js" charset="utf-8"></script>';
|
if (is_metaconsole()) {
|
||||||
$output .= '<script type="text/javascript" src="' . $config['homeurl'] . 'include/graphs/pandora.d3.js" charset="utf-8"></script>';
|
$output .= '<script type="text/javascript" src="' . '../../' . 'include/javascript/d3.3.5.14.js" charset="utf-8"></script>';
|
||||||
|
$output .= '<script type="text/javascript" src="' . '../../' . 'include/graphs/pandora.d3.js" charset="utf-8"></script>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$output .= '<script type="text/javascript" src="' . $config['homeurl'] . 'include/javascript/d3.3.5.14.js" charset="utf-8"></script>';
|
||||||
|
$output .= '<script type="text/javascript" src="' . $config['homeurl'] . 'include/graphs/pandora.d3.js" charset="utf-8"></script>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$return)
|
if (!$return)
|
||||||
echo $output;
|
echo $output;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user