Plugin Directory

Changeset 1586463


Ignore:
Timestamp:
02/01/2017 12:25:51 PM (9 years ago)
Author:
ionutmorariu
Message:

ADD: markers fields

Location:
scale-lite-tools/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scale-lite-tools/trunk/assets/css/admin.sl-dasboard.css

    r1586452 r1586463  
    8282  border: 1px dashed black;
    8383}
     84.slt-map-markers-container,
    8485.slt-map-address-container {
    8586  display: flex;
    8687}
     88.slt-map-markers {
     89  flex-grow: 1;
     90}
  • scale-lite-tools/trunk/inc/sl-google-maps/class-slt-gmap-meta-fields.php

    r1586462 r1586463  
    2020    array(
    2121      'id' => 'map-latitude',
    22       'label' => 'Lat coordinate',
     22      'label' => 'Latitude',
    2323      'type' => 'text',
    2424    ),
    2525    array(
    2626      'id' => 'map-longitude',
    27       'label' => 'Long coordinate',
     27      'label' => 'Longitude',
    2828      'type' => 'text',
    2929    ),
     
    138138                    <textarea placeholder="%s" class="large-text" id="%s" name="%s" rows="4">%s</textarea><p class="description">Paste here an address, then click preview map. If you only have one marker, map will be centered there. If you have multiple markers double click on preview map to update coordinates where your map will be centered.</p>
    139139                  </div>
    140                   <input name="save" type="button" class="button button-primary button-large" id="slt-preview" value="Preview map">
     140                  <input name="slt-preview" type="button" class="button button-primary button-large" id="slt-preview" value="Preview map">
     141                </div>
     142
     143                ',
     144                $field['placeholder'],
     145                $field['id'],
     146                $field['id'],
     147                $db_value
     148              );
     149              break;
     150            case 'map-markers':
     151              ($field['placeholder']) ? $field['placeholder']:'';
     152              $input = sprintf(
     153                '<div class="slt-map-markers-container">
     154                  <div class="slt-map-markers">
     155                    <textarea placeholder="%s" class="large-text" id="%s" name="%s" rows="4">%s</textarea><p class="description">Marker IDs that will be added to the map.</p>
     156                  </div>
     157                  <input name="slt-add-marker" type="button" class="button button-primary button-large" id="slt-add-marker" value="Add marker to map">
    141158                </div>
    142159
     
    184201              $input = sprintf(
    185202                '<input %s id="%s" name="%s" type="%s" value="%s"><p class="description">Height of the map in pixels. e.g. 550</p>',
     203                $field['type'] !== 'color' ? 'class="semi-large-text"' : '',
     204                $field['id'],
     205                $field['id'],
     206                $field['type'],
     207                $db_value
     208              );
     209              break;
     210            case 'map-latitude':
     211              $input = sprintf(
     212                '<input %s id="%s" name="%s" type="%s" value="%s"><p class="description">Latitude coordinate of where your map will be centered</p>',
     213                $field['type'] !== 'color' ? 'class="semi-large-text"' : '',
     214                $field['id'],
     215                $field['id'],
     216                $field['type'],
     217                $db_value
     218              );
     219              break;
     220            case 'map-longitude':
     221              $input = sprintf(
     222                '<input %s id="%s" name="%s" type="%s" value="%s"><p class="description">Longitude coordinate of where your map will be centered</p>',
    186223                $field['type'] !== 'color' ? 'class="semi-large-text"' : '',
    187224                $field['id'],
Note: See TracChangeset for help on using the changeset viewer.