Example #1
0
 /**
   Output the standard scale display box
   @return None
 */
 protected function scale_box()
 {
     ?>
     <div id="scalebox">
         <div id="scaleTop" class="coloredArea"> 
         <?php 
     echo _("weight");
     ?>
         </div>
         <div id="scaleBottom">
         <?php 
     echo DisplayLib::scaledisplaymsg();
     ?>
 
         </div>
         <div id="scaleIconBox">
         <?php 
     echo DisplayLib::drawNotifications();
     ?>
         </div>
     </div>
     <?php 
 }
Example #2
0
            }
        } else {
            $arr = array('main_frame' => false, 'target' => '.baseHeight', 'output' => DisplayLib::inputUnknown());
            $json = $arr;
            if (is_object($sd)) {
                $sd->WriteToScale('errorBeep');
            }
        }
    }
}
CoreLocal::set("msgrepeat", 0);
if (empty($json)) {
    echo "{}";
} else {
    if (isset($json['redraw_footer']) && $json['redraw_footer'] !== False) {
        $json['redraw_footer'] = DisplayLib::printfooter();
    }
    if (isset($json['scale']) && $json['scale'] !== False) {
        $display = DisplayLib::scaledisplaymsg($json['scale']);
        if (is_array($display)) {
            $json['scale'] = $display['display'];
        } else {
            $json['scale'] = $display;
        }
        $term_display = DisplayLib::drawNotifications();
        if (!empty($term_display)) {
            $json['term'] = $term_display;
        }
    }
    echo JsonLib::array_to_json($json);
}