Ejemplo n.º 1
0
    //Marked:
    $app['scripts']->add('marked', 'plugins/widgets/map_ex/assets/marked.min.js', array('uikit'));
    //Mailchimp for subscription:
    $app['scripts']->add('mailchimp', 'plugins/widgets/map_ex/assets/jquery.formchimp.min.js', array('uikit'));
    //jQuery form validator http://www.formvalidator.net/:
    $app['scripts']->add('jquery-form-validator', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.20/jquery.form-validator.min.js', array('uikit'));
    //Underscore.js
    $app['scripts']->add('underscore', 'plugins/widgets/map_ex/assets/underscore-min.js', array('uikit'));
    //Semantic version compare
    $app['scripts']->add('versioncompare', 'plugins/widgets/map_ex/assets/versioncompare.min.js', array('uikit'));
    //Marked:
    $app['scripts']->add('replacer', 'plugins/widgets/map_ex/assets/replacer.min.js', array('uikit'));
    //Generating dynamic update script:
    $plugin = new WidgetkitExMapPlugin($app);
    $app['scripts']->add('map_ex.dynamic-updater', $plugin->generateUpdaterJS($app), array(), 'string');
    //Generating dynamic MapEx script:
    $app['scripts']->add('map_ex.dynamic-custom', $plugin->generateMapExJS($app), array(), 'string');
}, 'request' => function ($event, $app) {
    $global = null;
    if (isset($app['request']) && isset($app['request']->request)) {
        $content = $app['request']->request->get('content');
        if (isset($content['data']['_widget']['data']['global'])) {
            $global = $content['data']['_widget']['data']['global'];
        }
    }
    if ($global) {
        //Global is set for valid requests like "Save" and "Save & Close"
        $plugin = new WidgetkitExPlugin($app);
        $plugin->saveGlobalSettings($global);
    }
}));
Ejemplo n.º 2
0
<?php

use WidgetkitEx\MapEx\WidgetkitExPlugin;
$plugin = new WidgetkitExPlugin($app);
?>
<div class="uk-grid uk-grid-divider uk-form uk-form-horizontal" data-uk-grid-margin>
    <div class="uk-width-medium-1-4">

        <div class="wk-panel-marginless">
            <ul class="uk-nav uk-nav-side" data-uk-switcher="{connect:'#nav-content-map'}">
                <li><a href="#">{{'Map' | trans}}</a></li>
                <li><a href="#">{{'Style' | trans}}</a></li>
                <li><a href="#">{{'Media' | trans}}</a></li>
				<li><a href="#">{{'Marker Clustering' | trans}}</a></li>
                <li><a href="#">{{'Content' | trans}}</a></li>
                <li><a href="#">{{'General' | trans}}</a></li>
				<li><a href="#">{{'Global Settings' | trans}}</a></li>
				<li><a href="#">{{'About' | trans}}</a></li>
            </ul>
        </div>

    </div>
    <div class="uk-width-medium-3-4">

        <ul id="nav-content-map" class="uk-switcher">
            <li>

                <h3 class="wk-form-heading">{{'Map' | trans}}</h3>

                <div class="uk-form-row">
                    <span class="uk-form-label" for="wk-width">{{'Width (px)' | trans}}<span  data-uk-tooltip style="margin-top: 5px;" title="{{ 'The width of the widget in pixels or \'auto\'.' | trans}}"><i class="uk-icon uk-icon-question-circle uk-margin-small-left" style="color:#ffb105"></i></span></span>
Ejemplo n.º 3
0
     $debug_item['PinType'] = 'Global custom';
 }
 if (strlen($marker['pin']) > 0) {
     //Checking for absolute URL
     if (substr($marker['pin'], 0, 7) != 'http://' && substr($marker['pin'], 0, 8) != 'https://' && substr($marker['pin'], 0, 2) != '//' && strlen($marker['pin']) > 2) {
         $markerurl;
         if (substr($marker['pin'], 0, 1) != '/') {
             $markerurl = $marker['pin'];
         } else {
             $markerurl = substr($marker['pin'], 1);
         }
         $marker['pin'] = $debug->getWebsiteRootURL() . $markerurl;
     }
     $debug_item['finalPinURL'] = $marker['pin'];
     if ($settings['debug_output']) {
         if (WidgetkitExPlugin::url_exists($marker['pin'])) {
             $debug_item['finalPinURLisValid'] = true;
         } else {
             $debug_item['finalPinURLisValid'] = false;
         }
     }
     if ($pinoverride && is_numeric($item['custom_pin_anchor_x']) && is_numeric($item['custom_pin_anchor_y'])) {
         $marker['anchor_x'] = intval($item['custom_pin_anchor_x']);
         $marker['anchor_y'] = intval($item['custom_pin_anchor_y']);
     } else {
         if (!$pinoverride && is_numeric($settings['custom_pin_anchor_x']) && is_numeric($settings['custom_pin_anchor_y'])) {
             $marker['anchor_x'] = intval($settings['custom_pin_anchor_x']);
             $marker['anchor_y'] = intval($settings['custom_pin_anchor_y']);
         }
     }
 } else {