Exemplo n.º 1
0
 /**
  * @see SpecialPage::execute
  *
  * @since 2.0
  *
  * @param null|string $subPage
  */
 public function execute($subPage)
 {
     $this->setHeaders();
     $outputPage = $this->getOutput();
     $outputPage->addHtml(MapsGoogleMaps3::getApiScript($this->getLanguage()->getCode(), array('libraries' => 'drawing')));
     $outputPage->addModules('mapeditor');
     $editorHtml = new MapEditorHtml($this->getAttribs());
     $html = $editorHtml->getEditorHtml();
     $outputPage->addHTML($html);
 }
Exemplo n.º 2
0
 /**
  * @since 2.0
  *
  * @param string $coordinates
  * @param string $input_name
  * @param boolean $isMandatory
  * @param boolean $isDisabled
  * @param array $params
  *
  * @return string
  */
 public function getEditorInputOutput($coordinates, $input_name, $isMandatory, $isDisabled, array $params)
 {
     global $wgOut;
     $wgOut->addHTML(MapsGoogleMaps3::getApiScript('en', array('libraries' => 'drawing')));
     $wgOut->addModules('mapeditor');
     $html = Html::element('div', array('id' => 'map-polygon', 'name' => $input_name, 'cols' => 4, 'rows' => 2), $coordinates);
     $editorHtml = new MapEditorHtml($this->getAttribs());
     $html = $html . $editorHtml->getEditorHtml();
     return $html;
 }
Exemplo n.º 3
0
    /**
     * @since 2.0 alspha
     * 
     * @param string $coordinates
     * @param string $input_name
     * @param boolean $is_mandatory
     * @param boolean $is_disabled
     * @param array $field_args
     * 
     * @return string
     */
    public function getEditorInputOutput($coordinates, $input_name, $is_mandatory, $is_disabled, array $params)
    {
        global $wgOut;
        $parameters = array();
        $wgOut->addHtml(MapsGoogleMaps3::getApiScript('en', array('libraries' => 'drawing')));
        $wgOut->addModules('mapeditor');
        $html = '
			<div >
				<textarea id="map-polygon" name="' . htmlspecialchars($input_name) . '" cols="4" rows="2"></textarea>
			</div>';
        $editor = new MapEditor($this->getAttribs());
        $html = $html . $editor->getEditorHtml();
        return $html;
    }