示例#1
0
 public function get_html()
 {
     if (!empty($this->fields)) {
         return parent::get_html();
     }
     return node::create('span');
 }
 public function get_html()
 {
     $this->set_disabled();
     if ($this->OSGB36_lng && $this->OSGB36_lat) {
         $this->post_fields_text = a::create('a.button', ['onClick' => 'javascript:map.planner.add_point_full(' . $this->WGS84_lat . ', ' . $this->WGS84_lng . ');'], 'Add to map');
     }
     return parent::get_html();
 }
示例#3
0
 public function get_html()
 {
     \core::$inline_script[] = '$("#' . $this->id . ' #layout").change(function() {
         if($(this).val() == 2) {
             $("#' . $this->id . ' #pilot").attr("disabled", false);
         } else {
             $("#' . $this->id . ' #pilot").attr("disabled", true);
         }
     });';
     return parent::get_html();
 }
示例#4
0
 public function get_html()
 {
     \core::$inline_script[] = '
         var $form = $("#add_field_form");
         $form.find("#add_field_form_field_link_module").hide();
         $form.find("#add_field_form_field_link_field").hide();
         $form.find("[name=type]").change(function() {
             if($(this).val() == 8 || $(this).val() == 9) {
                  $form.find("#add_field_form_field_link_module").show();
                  $form.find("#add_field_form_field_link_field").show();
             } else {
                  $form.find("#add_field_form_field_link_module").hide();
                  $form.find("#add_field_form_field_link_field").hide();
             }
         });
     ';
     return parent::get_html();
 }
示例#5
0
 public function get_html()
 {
     $html = parent::get_html();
     $script = '';
     if (!isset($this->kml) || empty($this->kml)) {
         $script .= '$("#kml_calc").hide();';
     }
     if (!isset($this->coords) || !$this->coords) {
         $script .= '$("#add_flight_box .fieldset_1").hide();';
     }
     if (ajax) {
         ajax::add_script($script);
     } else {
         \core::$inline_script[] = $script;
     }
     return $html;
 }