Version Description
- 2017/11/17
- updates for WP 4.9
- continuing with translation
Download this release
Release Info
Developer | WebFactory |
Plugin | Google Maps Widget – Ultimate Google Maps Plugin |
Version | 3.65 |
Comparing to | |
See all releases |
Code changes from version 3.60 to 3.65
- assets/banner-1544x500.png +0 -0
- assets/banner-772x250.png +0 -0
- assets/icon-128x128.png +0 -0
- assets/icon-256x256.png +0 -0
- assets/screenshot-1.png +0 -0
- assets/screenshot-2.png +0 -0
- assets/screenshot-3.png +0 -0
- assets/screenshot-4.png +0 -0
- assets/screenshot-5.png +0 -0
- assets/screenshot-6.png +0 -0
- {trunk/css → css}/gmw-admin.css +8 -0
- {tags/3.35/css → css}/gmw.css +1 -1
- {tags/1.92/css → css}/index.php +0 -0
- {tags/3.0/css → css}/select2.min.css +0 -0
- tags/3.35/gmw-tracking.php → gmw-tracking.php +0 -0
- tags/3.58/gmw-widget.php → gmw-widget.php +2 -2
- trunk/google-maps-widget.php → google-maps-widget.php +1 -1
- {tags/3.0/images → images}/colorbox/dark/border.png +0 -0
- {tags/3.0/images → images}/colorbox/dark/controls.png +0 -0
- {tags/3.0/images → images}/colorbox/dark/loading_background.png +0 -0
- {tags/3.0/images → images}/colorbox/dark/overlay.png +0 -0
- {tags/3.0/images → images}/colorbox/loading.gif +0 -0
- {tags/3.0/images → images}/gmw-logo-pro-dialog.png +0 -0
- {tags/3.0/images → images}/gmw-logo-pro.png +0 -0
- {tags/3.0/images → images}/gmw-logo.png +0 -0
- {tags/3.40/images → images}/icon-agency.png +0 -0
- {tags/3.25/images → images}/icon-trial.png +0 -0
- {tags/3.25/images → images}/icon-unlimited.png +0 -0
- {tags/3.25/images → images}/icon-yearly.png +0 -0
- {tags/1.92/images → images}/index.php +0 -0
- {tags/3.0/images → images}/spinner.gif +0 -0
- tags/1.92/index.php → index.php +0 -0
- {tags/3.35/js → js}/gmw-admin-plugins.js +0 -0
- {tags/3.45/js → js}/gmw-admin-pointers.js +0 -0
- {trunk/js → js}/gmw-admin.js +0 -0
- {tags/3.35/js → js}/gmw.js +0 -0
- {tags/1.92/js → js}/index.php +0 -0
- {tags/3.0/js → js}/jquery.colorbox.min.js +0 -0
- {tags/3.0/js → js}/select2.min.js +0 -0
- {tags/0.90/lang → lang}/google-maps-widget-de_DE.mo +0 -0
- {tags/1.50/lang → lang}/google-maps-widget-es_ES.mo +0 -0
- {tags/0.95/lang → lang}/google-maps-widget-fr_FR.mo +0 -0
- {tags/1.86/lang → lang}/google-maps-widget-hr.mo +0 -0
- {tags/1.30/lang → lang}/google-maps-widget-nl_NL.mo +0 -0
- {tags/2.45/lang → lang}/google-maps-widget-ru_RU.mo +0 -0
- {tags/1.90/lang → lang}/google-maps-widget-sr_RS.mo +0 -0
- {tags/0.80/lang → lang}/google-maps-widget-sv_SE.mo +0 -0
- {tags/1.55/lang → lang}/google-maps-widget-uk_UK.mo +0 -0
- {tags/1.0/lang → lang}/google-maps-widget-zh_CN.mo +0 -0
- {tags/1.05/lang → lang}/google-maps-widget-zh_TW.mo +0 -0
- {tags/3.05/lang → lang}/google-maps-widget.pot +0 -0
- {tags/1.92/lang → lang}/index.php +0 -0
- tags/0.1/license.txt → license.txt +0 -0
- trunk/readme.txt → readme.txt +7 -2
- tags/0.1/gmw-widget.php +0 -137
- tags/0.1/google-maps-widget.php +0 -135
- tags/0.1/js/gmw.js +0 -35
- tags/0.1/readme.txt +0 -59
- tags/0.1/screenshot-1.png +0 -0
- tags/0.1/screenshot-2.png +0 -0
- tags/0.11/gmw-widget.php +0 -143
- tags/0.11/google-maps-widget.php +0 -135
- tags/0.11/js/gmw.js +0 -35
- tags/0.11/license.txt +0 -280
- tags/0.11/readme.txt +0 -67
- tags/0.11/screenshot-1.png +0 -0
- tags/0.11/screenshot-2.png +0 -0
- tags/0.12/gmw-widget.php +0 -162
- tags/0.12/google-maps-widget.php +0 -135
- tags/0.12/js/gmw.js +0 -35
- tags/0.12/license.txt +0 -280
- tags/0.12/readme.txt +0 -75
- tags/0.12/screenshot-1.png +0 -0
- tags/0.12/screenshot-2.png +0 -0
- tags/0.13/gmw-widget.php +0 -176
- tags/0.13/google-maps-widget.php +0 -135
- tags/0.13/js/gmw.js +0 -35
- tags/0.13/license.txt +0 -280
- tags/0.13/readme.txt +0 -83
- tags/0.13/screenshot-1.png +0 -0
- tags/0.13/screenshot-2.png +0 -0
- tags/0.2/css/gmw-admin.css +0 -69
- tags/0.2/gmw-widget.php +0 -202
- tags/0.2/google-maps-widget.php +0 -170
- tags/0.2/js/gmw-admin.js +0 -12
- tags/0.2/js/gmw.js +0 -42
- tags/0.2/license.txt +0 -280
- tags/0.2/readme.txt +0 -105
- tags/0.2/screenshot-1.png +0 -0
- tags/0.2/screenshot-2.png +0 -0
- tags/0.2/screenshot-3.png +0 -0
- tags/0.2/screenshot-4.png +0 -0
- tags/0.21/css/gmw-admin.css +0 -69
- tags/0.21/gmw-widget.php +0 -202
- tags/0.21/google-maps-widget.php +0 -170
- tags/0.21/js/gmw-admin.js +0 -12
- tags/0.21/js/gmw.js +0 -42
- tags/0.21/license.txt +0 -280
- tags/0.21/readme.txt +0 -105
- tags/0.21/screenshot-1.png +0 -0
- tags/0.21/screenshot-2.png +0 -0
- tags/0.21/screenshot-3.png +0 -0
- tags/0.21/screenshot-4.png +0 -0
- tags/0.22/css/gmw-admin.css +0 -69
- tags/0.22/gmw-widget.php +0 -202
- tags/0.22/google-maps-widget.php +0 -171
- tags/0.22/js/gmw-admin.js +0 -30
- tags/0.22/js/gmw.js +0 -40
- tags/0.22/js/jquery.cookie.js +0 -89
- tags/0.22/license.txt +0 -280
- tags/0.22/readme.txt +0 -111
- tags/0.22/screenshot-1.png +0 -0
- tags/0.22/screenshot-2.png +0 -0
- tags/0.22/screenshot-3.png +0 -0
- tags/0.22/screenshot-4.png +0 -0
- tags/0.23/css/gmw-admin.css +0 -69
- tags/0.23/gmw-widget.php +0 -202
- tags/0.23/google-maps-widget.php +0 -171
- tags/0.23/js/gmw-admin.js +0 -30
- tags/0.23/js/gmw.js +0 -40
- tags/0.23/js/jquery.cookie.js +0 -89
- tags/0.23/license.txt +0 -280
- tags/0.23/readme.txt +0 -111
- tags/0.23/screenshot-1.png +0 -0
- tags/0.23/screenshot-2.png +0 -0
- tags/0.23/screenshot-3.png +0 -0
- tags/0.23/screenshot-4.png +0 -0
- tags/0.3/css/gmw-admin.css +0 -69
- tags/0.3/css/gmw.css +0 -274
- tags/0.3/gmw-widget.php +0 -219
- tags/0.3/google-maps-widget.php +0 -177
- tags/0.3/images/blank.gif +0 -0
- tags/0.3/images/fancybox_loading.gif +0 -0
- tags/0.3/images/fancybox_overlay.png +0 -0
- tags/0.3/images/fancybox_sprite.png +0 -0
- tags/0.3/js/gmw-admin.js +0 -30
- tags/0.3/js/gmw.js +0 -21
- tags/0.3/js/jquery.cookie.js +0 -89
- tags/0.3/js/jquery.fancybox.pack.js +0 -44
- tags/0.3/license.txt +0 -280
- tags/0.3/readme.txt +0 -125
- tags/0.3/screenshot-1.png +0 -0
- tags/0.3/screenshot-2.png +0 -0
- tags/0.3/screenshot-3.png +0 -0
- tags/0.3/screenshot-4.png +0 -0
- tags/0.35/css/gmw-admin.css +0 -69
- tags/0.35/css/gmw.css +0 -306
- tags/0.35/gmw-widget.php +0 -225
- tags/0.35/google-maps-widget.php +0 -177
- tags/0.35/images/blank.gif +0 -0
- tags/0.35/images/fancybox_loading.gif +0 -0
- tags/0.35/images/fancybox_overlay.png +0 -0
- tags/0.35/images/fancybox_sprite.png +0 -0
- tags/0.35/js/gmw-admin.js +0 -30
- tags/0.35/js/gmw.js +0 -22
- tags/0.35/js/jquery.cookie.js +0 -89
- tags/0.35/js/jquery.fancybox.pack.js +0 -44
- tags/0.35/license.txt +0 -280
- tags/0.35/readme.txt +0 -136
- tags/0.35/screenshot-1.png +0 -0
- tags/0.35/screenshot-2.png +0 -0
- tags/0.35/screenshot-3.png +0 -0
- tags/0.35/screenshot-4.png +0 -0
- tags/0.36/css/gmw-admin.css +0 -69
- tags/0.36/css/gmw.css +0 -306
- tags/0.36/gmw-widget.php +0 -225
- tags/0.36/google-maps-widget.php +0 -177
- tags/0.36/images/blank.gif +0 -0
- tags/0.36/images/fancybox_loading.gif +0 -0
- tags/0.36/images/fancybox_overlay.png +0 -0
- tags/0.36/images/fancybox_sprite.png +0 -0
- tags/0.36/js/gmw-admin.js +0 -30
- tags/0.36/js/gmw.js +0 -22
- tags/0.36/js/jquery.cookie.js +0 -89
- tags/0.36/js/jquery.fancybox.pack.js +0 -44
- tags/0.36/license.txt +0 -280
- tags/0.36/readme.txt +0 -136
- tags/0.36/screenshot-1.png +0 -0
- tags/0.36/screenshot-2.png +0 -0
- tags/0.36/screenshot-3.png +0 -0
- tags/0.36/screenshot-4.png +0 -0
- tags/0.37/css/gmw-admin.css +0 -69
- tags/0.37/css/gmw.css +0 -306
- tags/0.37/gmw-widget.php +0 -225
- tags/0.37/google-maps-widget.php +0 -177
- tags/0.37/images/blank.gif +0 -0
- tags/0.37/images/fancybox_loading.gif +0 -0
- tags/0.37/images/fancybox_overlay.png +0 -0
- tags/0.37/images/fancybox_sprite.png +0 -0
- tags/0.37/js/gmw-admin.js +0 -30
- tags/0.37/js/gmw.js +0 -22
- tags/0.37/js/jquery.cookie.js +0 -89
- tags/0.37/js/jquery.fancybox.pack.js +0 -44
- tags/0.37/license.txt +0 -280
- tags/0.37/readme.txt +0 -140
- tags/0.37/screenshot-1.png +0 -0
- tags/0.37/screenshot-2.png +0 -0
- tags/0.37/screenshot-3.png +0 -0
- tags/0.37/screenshot-4.png +0 -0
- tags/0.4/css/gmw-admin.css +0 -69
- tags/0.4/css/gmw.css +0 -306
- tags/0.4/gmw-widget.php +0 -225
- tags/0.4/google-maps-widget.php +0 -175
- tags/0.4/images/blank.gif +0 -0
- tags/0.4/images/fancybox_loading.gif +0 -0
- tags/0.4/images/fancybox_overlay.png +0 -0
- tags/0.4/images/fancybox_sprite.png +0 -0
- tags/0.4/js/gmw-admin.js +0 -30
- tags/0.4/js/gmw.js +0 -22
- tags/0.4/js/jquery.cookie.js +0 -89
- tags/0.4/js/jquery.fancybox.pack.js +0 -44
- tags/0.4/license.txt +0 -280
- tags/0.4/readme.txt +0 -144
- tags/0.4/screenshot-1.png +0 -0
- tags/0.4/screenshot-2.png +0 -0
- tags/0.4/screenshot-3.png +0 -0
- tags/0.4/screenshot-4.png +0 -0
- tags/0.41/css/gmw-admin.css +0 -69
- tags/0.41/css/gmw.css +0 -306
- tags/0.41/gmw-widget.php +0 -225
- tags/0.41/google-maps-widget.php +0 -175
- tags/0.41/images/blank.gif +0 -0
- tags/0.41/images/fancybox_loading.gif +0 -0
- tags/0.41/images/fancybox_overlay.png +0 -0
- tags/0.41/images/fancybox_sprite.png +0 -0
- tags/0.41/js/gmw-admin.js +0 -30
- tags/0.41/js/gmw.js +0 -22
- tags/0.41/js/jquery.cookie.js +0 -89
- tags/0.41/js/jquery.fancybox.pack.js +0 -44
- tags/0.41/license.txt +0 -280
- tags/0.41/readme.txt +0 -148
- tags/0.50/css/gmw-admin.css +0 -71
- tags/0.50/css/gmw.css +0 -306
- tags/0.50/gmw-widget.php +0 -225
- tags/0.50/google-maps-widget.php +0 -175
- tags/0.50/images/blank.gif +0 -0
- tags/0.50/images/fancybox_loading.gif +0 -0
- tags/0.50/images/fancybox_overlay.png +0 -0
- tags/0.50/images/fancybox_sprite.png +0 -0
- tags/0.50/index.php +0 -3
- tags/0.50/js/gmw-admin.js +0 -30
- tags/0.50/js/gmw.js +0 -22
- tags/0.50/js/jquery.cookie.js +0 -89
- tags/0.50/js/jquery.fancybox.pack.js +0 -44
- tags/0.50/license.txt +0 -280
- tags/0.50/readme.txt +0 -152
- tags/0.55/css/gmw-admin.css +0 -71
- tags/0.55/css/gmw.css +0 -306
- tags/0.55/gmw-widget.php +0 -243
- tags/0.55/google-maps-widget.php +0 -175
- tags/0.55/images/blank.gif +0 -0
- tags/0.55/images/fancybox_loading.gif +0 -0
- tags/0.55/images/fancybox_overlay.png +0 -0
- tags/0.55/images/fancybox_sprite.png +0 -0
- tags/0.55/index.php +0 -3
- tags/0.55/js/gmw-admin.js +0 -30
- tags/0.55/js/gmw.js +0 -22
- tags/0.55/js/jquery.cookie.js +0 -89
- tags/0.55/js/jquery.fancybox.pack.js +0 -45
- tags/0.55/license.txt +0 -280
- tags/0.55/readme.txt +0 -158
- tags/0.60/css/gmw-admin.css +0 -71
- tags/0.60/css/gmw.css +0 -306
- tags/0.60/gmw-widget.php +0 -252
- tags/0.60/google-maps-widget.php +0 -221
- tags/0.60/images/blank.gif +0 -0
- tags/0.60/images/fancybox_loading.gif +0 -0
- tags/0.60/images/fancybox_overlay.png +0 -0
- tags/0.60/images/fancybox_sprite.png +0 -0
- tags/0.60/index.php +0 -3
- tags/0.60/js/gmw-admin.js +0 -30
- tags/0.60/js/gmw.js +0 -22
- tags/0.60/js/jquery.cookie.js +0 -89
- tags/0.60/js/jquery.fancybox.pack.js +0 -45
- tags/0.60/license.txt +0 -280
- tags/0.60/readme.txt +0 -162
- tags/0.65/css/gmw-admin.css +0 -71
- tags/0.65/css/gmw.css +0 -306
- tags/0.65/gmw-widget.php +0 -243
assets/banner-1544x500.png
DELETED
Binary file
|
assets/banner-772x250.png
DELETED
Binary file
|
assets/icon-128x128.png
DELETED
Binary file
|
assets/icon-256x256.png
DELETED
Binary file
|
assets/screenshot-1.png
DELETED
Binary file
|
assets/screenshot-2.png
DELETED
Binary file
|
assets/screenshot-3.png
DELETED
Binary file
|
assets/screenshot-4.png
DELETED
Binary file
|
assets/screenshot-5.png
DELETED
Binary file
|
assets/screenshot-6.png
DELETED
Binary file
|
{trunk/css → css}/gmw-admin.css
RENAMED
@@ -104,6 +104,14 @@
|
|
104 |
width: 100%;
|
105 |
}
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
.gmw-tabs input {
|
108 |
max-width: 330px;
|
109 |
}
|
104 |
width: 100%;
|
105 |
}
|
106 |
|
107 |
+
.gmw-tabs .widefat {
|
108 |
+
max-width: 99%;
|
109 |
+
}
|
110 |
+
|
111 |
+
.gmw-tabs input:invalid {
|
112 |
+
border: 1px solid red;
|
113 |
+
}
|
114 |
+
|
115 |
.gmw-tabs input {
|
116 |
max-width: 330px;
|
117 |
}
|
{tags/3.35/css → css}/gmw.css
RENAMED
@@ -30,7 +30,7 @@
|
|
30 |
#cboxWrapper {max-width:none;}
|
31 |
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
32 |
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
33 |
-
#cboxContent{position:relative;}
|
34 |
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
|
35 |
#cboxTitle{margin:0;}
|
36 |
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
|
30 |
#cboxWrapper {max-width:none;}
|
31 |
#cboxOverlay{position:fixed; width:100%; height:100%;}
|
32 |
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
|
33 |
+
#cboxContent{position:relative; float: left !important; }
|
34 |
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
|
35 |
#cboxTitle{margin:0;}
|
36 |
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
|
{tags/1.92/css → css}/index.php
RENAMED
File without changes
|
{tags/3.0/css → css}/select2.min.css
RENAMED
File without changes
|
tags/3.35/gmw-tracking.php → gmw-tracking.php
RENAMED
File without changes
|
tags/3.58/gmw-widget.php → gmw-widget.php
RENAMED
@@ -245,7 +245,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
245 |
echo '</select></p>';
|
246 |
|
247 |
echo '<p class="gmw_thumb_pin_type_custom"><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_img') . '">' . __('Pin Image URL', 'google-maps-widget') . ':</label>';
|
248 |
-
echo '<input data-tooltip="Enter the full URL to the image, starting with http://. Image has to be publicly accessible and with size up to 64x64px. Https and localhosts are *not* supported." placeholder="http://" type="
|
249 |
echo '</p>';
|
250 |
|
251 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_link_type') . '">' . __('Link To', 'google-maps-widget') . ':</label>';
|
@@ -254,7 +254,7 @@ class GoogleMapsWidget extends WP_Widget {
|
|
254 |
echo '</select></p>';
|
255 |
|
256 |
echo '<p class="gmw_thumb_link_section"><label class="gmw-label" for="' . $this->get_field_id('thumb_link') . '">' . __('Custom URL', 'google-maps-widget') . ':</label>';
|
257 |
-
echo '<input data-tooltip="Make sure the URL starts with http:// if it leads to a different site." placeholder="http://" class="regular-text" id="' . $this->get_field_id('thumb_link') . '" name="' . $this->get_field_name('thumb_link') . '" type="url" value="' . esc_attr($thumb_link) . '"
|
258 |
echo '</p>';
|
259 |
|
260 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_format') . '">' . __('Image Format', 'google-maps-widget') . ':</label>';
|
245 |
echo '</select></p>';
|
246 |
|
247 |
echo '<p class="gmw_thumb_pin_type_custom"><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_img') . '">' . __('Pin Image URL', 'google-maps-widget') . ':</label>';
|
248 |
+
echo '<input data-tooltip="Enter the full URL to the image, starting with http://. Image has to be publicly accessible and with size up to 64x64px. Https and localhosts are *not* supported." placeholder="http://" type="url" class="regular-text" id="' . $this->get_field_id('thumb_pin_img') . '" name="' . $this->get_field_name('thumb_pin_img') . '" value="' . esc_attr($thumb_pin_img) . '">';
|
249 |
echo '</p>';
|
250 |
|
251 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_link_type') . '">' . __('Link To', 'google-maps-widget') . ':</label>';
|
254 |
echo '</select></p>';
|
255 |
|
256 |
echo '<p class="gmw_thumb_link_section"><label class="gmw-label" for="' . $this->get_field_id('thumb_link') . '">' . __('Custom URL', 'google-maps-widget') . ':</label>';
|
257 |
+
echo '<input data-tooltip="Make sure the URL starts with http:// if it leads to a different site." placeholder="http://" class="regular-text" id="' . $this->get_field_id('thumb_link') . '" name="' . $this->get_field_name('thumb_link') . '" type="url" value="' . esc_attr($thumb_link) . '">';
|
258 |
echo '</p>';
|
259 |
|
260 |
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_format') . '">' . __('Image Format', 'google-maps-widget') . ':</label>';
|
trunk/google-maps-widget.php → google-maps-widget.php
RENAMED
@@ -4,7 +4,7 @@ Plugin Name: Google Maps Widget
|
|
4 |
Plugin URI: http://www.gmapswidget.com/
|
5 |
Description: Display a single image super-fast loading Google map in a widget. A larger, full featured map is available in a lightbox. Includes a user-friendly interface and numerous appearance options.
|
6 |
Author: Web Factory Ltd
|
7 |
-
Version: 3.
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
4 |
Plugin URI: http://www.gmapswidget.com/
|
5 |
Description: Display a single image super-fast loading Google map in a widget. A larger, full featured map is available in a lightbox. Includes a user-friendly interface and numerous appearance options.
|
6 |
Author: Web Factory Ltd
|
7 |
+
Version: 3.65
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: google-maps-widget
|
10 |
Domain Path: lang
|
{tags/3.0/images → images}/colorbox/dark/border.png
RENAMED
File without changes
|
{tags/3.0/images → images}/colorbox/dark/controls.png
RENAMED
File without changes
|
{tags/3.0/images → images}/colorbox/dark/loading_background.png
RENAMED
File without changes
|
{tags/3.0/images → images}/colorbox/dark/overlay.png
RENAMED
File without changes
|
{tags/3.0/images → images}/colorbox/loading.gif
RENAMED
File without changes
|
{tags/3.0/images → images}/gmw-logo-pro-dialog.png
RENAMED
File without changes
|
{tags/3.0/images → images}/gmw-logo-pro.png
RENAMED
File without changes
|
{tags/3.0/images → images}/gmw-logo.png
RENAMED
File without changes
|
{tags/3.40/images → images}/icon-agency.png
RENAMED
File without changes
|
{tags/3.25/images → images}/icon-trial.png
RENAMED
File without changes
|
{tags/3.25/images → images}/icon-unlimited.png
RENAMED
File without changes
|
{tags/3.25/images → images}/icon-yearly.png
RENAMED
File without changes
|
{tags/1.92/images → images}/index.php
RENAMED
File without changes
|
{tags/3.0/images → images}/spinner.gif
RENAMED
File without changes
|
tags/1.92/index.php → index.php
RENAMED
File without changes
|
{tags/3.35/js → js}/gmw-admin-plugins.js
RENAMED
File without changes
|
{tags/3.45/js → js}/gmw-admin-pointers.js
RENAMED
File without changes
|
{trunk/js → js}/gmw-admin.js
RENAMED
File without changes
|
{tags/3.35/js → js}/gmw.js
RENAMED
File without changes
|
{tags/1.92/js → js}/index.php
RENAMED
File without changes
|
{tags/3.0/js → js}/jquery.colorbox.min.js
RENAMED
File without changes
|
{tags/3.0/js → js}/select2.min.js
RENAMED
File without changes
|
{tags/0.90/lang → lang}/google-maps-widget-de_DE.mo
RENAMED
File without changes
|
{tags/1.50/lang → lang}/google-maps-widget-es_ES.mo
RENAMED
File without changes
|
{tags/0.95/lang → lang}/google-maps-widget-fr_FR.mo
RENAMED
File without changes
|
{tags/1.86/lang → lang}/google-maps-widget-hr.mo
RENAMED
File without changes
|
{tags/1.30/lang → lang}/google-maps-widget-nl_NL.mo
RENAMED
File without changes
|
{tags/2.45/lang → lang}/google-maps-widget-ru_RU.mo
RENAMED
File without changes
|
{tags/1.90/lang → lang}/google-maps-widget-sr_RS.mo
RENAMED
File without changes
|
{tags/0.80/lang → lang}/google-maps-widget-sv_SE.mo
RENAMED
File without changes
|
{tags/1.55/lang → lang}/google-maps-widget-uk_UK.mo
RENAMED
File without changes
|
{tags/1.0/lang → lang}/google-maps-widget-zh_CN.mo
RENAMED
File without changes
|
{tags/1.05/lang → lang}/google-maps-widget-zh_TW.mo
RENAMED
File without changes
|
{tags/3.05/lang → lang}/google-maps-widget.pot
RENAMED
File without changes
|
{tags/1.92/lang → lang}/index.php
RENAMED
File without changes
|
tags/0.1/license.txt → license.txt
RENAMED
File without changes
|
trunk/readme.txt → readme.txt
RENAMED
@@ -4,8 +4,8 @@ Tags: google maps, google map, gmap, maps, map widget
|
|
4 |
License: GPLv2 or later
|
5 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
6 |
Requires at least: 4.0
|
7 |
-
Tested up to: 4.
|
8 |
-
Stable tag: 3.
|
9 |
Requires PHP: 5.2
|
10 |
|
11 |
Tired of buggy and slow Google Maps plugins taking hours to setup? With GMW you'll have a perfect map with a thumbnail and lightbox in minutes!
|
@@ -154,6 +154,11 @@ Read the <a href="http://wordpress.org/support/plugin/google-maps-widget">suppor
|
|
154 |
|
155 |
== Changelog ==
|
156 |
|
|
|
|
|
|
|
|
|
|
|
157 |
= 3.60 =
|
158 |
* 2017/09/04
|
159 |
* minor improvements
|
4 |
License: GPLv2 or later
|
5 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
6 |
Requires at least: 4.0
|
7 |
+
Tested up to: 4.9
|
8 |
+
Stable tag: 3.65
|
9 |
Requires PHP: 5.2
|
10 |
|
11 |
Tired of buggy and slow Google Maps plugins taking hours to setup? With GMW you'll have a perfect map with a thumbnail and lightbox in minutes!
|
154 |
|
155 |
== Changelog ==
|
156 |
|
157 |
+
= 3.65 =
|
158 |
+
* 2017/11/17
|
159 |
+
* updates for WP 4.9
|
160 |
+
* continuing with translation
|
161 |
+
|
162 |
= 3.60 =
|
163 |
* 2017/09/04
|
164 |
* minor improvements
|
tags/0.1/gmw-widget.php
DELETED
@@ -1,137 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_width' => 250,
|
21 |
-
'thumb_height' => 250,
|
22 |
-
'thumb_type' => 'roadmap',
|
23 |
-
'lightbox_width' => 550,
|
24 |
-
'lightbox_height' => 550,
|
25 |
-
'lightbox_type' => 'roadmap',
|
26 |
-
'footer' => '',
|
27 |
-
'zoom_thumb' => '13',
|
28 |
-
'zoom_big' => '14'));
|
29 |
-
$title = $instance['title'];
|
30 |
-
$footer = $instance['footer'];
|
31 |
-
$address = $instance['address'];
|
32 |
-
$thumb_width = $instance['thumb_width'];
|
33 |
-
$thumb_height = $instance['thumb_height'];
|
34 |
-
$thumb_type = $instance['thumb_type'];
|
35 |
-
$lightbox_width = $instance['lightbox_width'];
|
36 |
-
$lightbox_height = $instance['lightbox_height'];
|
37 |
-
$lightbox_type = $instance['lightbox_type'];
|
38 |
-
$zoom_thumb = $instance['zoom_thumb'];
|
39 |
-
$zoom_big = $instance['zoom_big'];
|
40 |
-
|
41 |
-
$map_types = array(array('val' => 'roadmap', 'label' => 'Road map'),
|
42 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
43 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
44 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
45 |
-
|
46 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
47 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
48 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
49 |
-
}
|
50 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
51 |
-
|
52 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
53 |
-
|
54 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
55 |
-
|
56 |
-
echo '<p><label for="' . $this->get_field_id('thumb_width') . '">Thumbnail Size: </label>';
|
57 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
58 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
59 |
-
echo '</p>';
|
60 |
-
|
61 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_width') . '">Lightbox Size: </label>';
|
62 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
63 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
64 |
-
echo '</p>';
|
65 |
-
|
66 |
-
echo '<p><label for="' . $this->get_field_id('zoom_thumb') . '">Zoom Level for Thumbnail Map: </label>';
|
67 |
-
echo '<select id="' . $this->get_field_id('zoom_thumb') . '" name="' . $this->get_field_name('zoom_thumb') . '">';
|
68 |
-
GMW::create_select_options($zoom_levels, $zoom_thumb);
|
69 |
-
echo '</select></p>';
|
70 |
-
|
71 |
-
echo '<p><label for="' . $this->get_field_id('zoom_big') . '">Zoom Level for Lightbox Map: </label>';
|
72 |
-
echo '<select id="' . $this->get_field_id('zoom_big') . '" name="' . $this->get_field_name('zoom_big') . '">';
|
73 |
-
GMW::create_select_options($zoom_levels, $zoom_big);
|
74 |
-
echo '</select></p>';
|
75 |
-
|
76 |
-
echo '<p><label for="' . $this->get_field_id('thumb_type') . '">Thumbnail Map Type: </label>';
|
77 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
78 |
-
GMW::create_select_options($map_types, $thumb_type);
|
79 |
-
echo '</select></p>';
|
80 |
-
|
81 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_type') . '">Lightbox Map Type: </label>';
|
82 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
83 |
-
GMW::create_select_options($map_types, $lightbox_type);
|
84 |
-
echo '</select></p>';
|
85 |
-
|
86 |
-
echo '<p><label for="' . $this->get_field_id('footer') . '">Lightbox Footer Text:</label>';
|
87 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('footer') . '" name="' . $this->get_field_name('footer') . '">'. $footer . '</textarea></p>';
|
88 |
-
}
|
89 |
-
|
90 |
-
function update($new_instance, $old_instance) {
|
91 |
-
$instance = $old_instance;
|
92 |
-
|
93 |
-
$instance['title'] = $new_instance['title'];
|
94 |
-
$instance['address'] = $new_instance['address'];
|
95 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
96 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
97 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
98 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
99 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
100 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
101 |
-
$instance['zoom_thumb'] = $new_instance['zoom_thumb'];
|
102 |
-
$instance['zoom_big'] = $new_instance['zoom_big'];
|
103 |
-
$instance['footer'] = $new_instance['footer'];
|
104 |
-
|
105 |
-
return $instance;
|
106 |
-
}
|
107 |
-
|
108 |
-
function widget($args, $instance) {
|
109 |
-
$out = $tmp = '';
|
110 |
-
|
111 |
-
extract($args, EXTR_SKIP);
|
112 |
-
self::$widgets[] = array('title' => $instance['title'],
|
113 |
-
'footer' => $instance['footer'],
|
114 |
-
'address' => $instance['address'],
|
115 |
-
'zoom_big' => $instance['zoom_big'],
|
116 |
-
'id' => $widget_id);
|
117 |
-
|
118 |
-
$out .= $before_widget;
|
119 |
-
|
120 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
121 |
-
if (!empty($title)) {
|
122 |
-
$out .= $before_title . $title . $after_title;
|
123 |
-
}
|
124 |
-
|
125 |
-
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
126 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
127 |
-
urlencode($instance['address']) . '&zoom=' . $instance['zoom_thumb'] .
|
128 |
-
'&size=' .$instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] . '&sensor=false&scale=2&markers=color:red%7Clabel:A%7C' .
|
129 |
-
urlencode($instance['address']) . '"></a>';
|
130 |
-
$tmp .= '</p>';
|
131 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
132 |
-
|
133 |
-
$out .= $after_widget;
|
134 |
-
|
135 |
-
echo $out;
|
136 |
-
}
|
137 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1/google-maps-widget.php
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://google-maps-widget.webfactoryltd.com/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.1
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
define('GOOGLE_MAPS_WIDGET_CORE_VER', '0.1');
|
17 |
-
require_once 'gmw-widget.php';
|
18 |
-
|
19 |
-
class GMW {
|
20 |
-
function init() {
|
21 |
-
if (is_admin()) {
|
22 |
-
// check if minimal required WP version is used
|
23 |
-
self::check_wp_version(3.2);
|
24 |
-
|
25 |
-
// aditional links in plugin description
|
26 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
27 |
-
array(__CLASS__, 'plugin_action_links'));
|
28 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
29 |
-
} else {
|
30 |
-
// enqueue frontend scripts
|
31 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
32 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
33 |
-
}
|
34 |
-
} // init
|
35 |
-
|
36 |
-
|
37 |
-
// initialize widgets
|
38 |
-
function widgets_init() {
|
39 |
-
register_widget('GoogleMapsWidget');
|
40 |
-
} // widgets_init
|
41 |
-
|
42 |
-
|
43 |
-
// add settings link to plugins page
|
44 |
-
function plugin_action_links($links) {
|
45 |
-
$settings_link = '<a href="widgets.php" title="Configure Google Maps Widget">Widgets</a>';
|
46 |
-
array_unshift($links, $settings_link);
|
47 |
-
|
48 |
-
return $links;
|
49 |
-
} // plugin_action_links
|
50 |
-
|
51 |
-
|
52 |
-
// add links to plugin's description in plugins table
|
53 |
-
function plugin_meta_links($links, $file) {
|
54 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
55 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
56 |
-
|
57 |
-
if ($file == plugin_basename(__FILE__)) {
|
58 |
-
//$links[] = $documentation_link;
|
59 |
-
$links[] = $support_link;
|
60 |
-
}
|
61 |
-
|
62 |
-
return $links;
|
63 |
-
} // plugin_meta_links
|
64 |
-
|
65 |
-
|
66 |
-
// check if user has the minimal WP version required by the plugin
|
67 |
-
function check_wp_version($min_version) {
|
68 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
69 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
70 |
-
}
|
71 |
-
} // check_wp_version
|
72 |
-
|
73 |
-
|
74 |
-
// display error message if WP version is too low
|
75 |
-
function min_version_error() {
|
76 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
77 |
-
} // min_version_error
|
78 |
-
|
79 |
-
|
80 |
-
// print dialogs markup in footer
|
81 |
-
function dialogs_markup() {
|
82 |
-
$out = '';
|
83 |
-
$widgets = GoogleMapsWidget::$widgets;
|
84 |
-
|
85 |
-
if (!$widgets) {
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
|
89 |
-
foreach ($widgets as $widget) {
|
90 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-iframe-url="http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=A&iwd=1&mrt=loc&t=m&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['zoom_big']) . '" id="dialog-' . $widget['id'] . '" title="' . $widget['title'] . '">';
|
91 |
-
$out .= '<div class="gmw-map"></div>';
|
92 |
-
if ($widget['footer']) {
|
93 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
94 |
-
}
|
95 |
-
$out .= "</div>\n";
|
96 |
-
} // foreach $widgets
|
97 |
-
|
98 |
-
echo $out;
|
99 |
-
} // run_scroller
|
100 |
-
|
101 |
-
|
102 |
-
// enqueue frontend scripts if necessary
|
103 |
-
function enqueue_scripts() {
|
104 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
105 |
-
wp_enqueue_style('wp-jquery-ui-dialog');
|
106 |
-
wp_enqueue_script('jquery-ui-dialog');
|
107 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), '1.0');
|
108 |
-
}
|
109 |
-
} // enqueue_scripts
|
110 |
-
|
111 |
-
|
112 |
-
// helper function for creating dropdowns
|
113 |
-
function create_select_options($options, $selected = null, $output = true) {
|
114 |
-
$out = "\n";
|
115 |
-
|
116 |
-
foreach ($options as $tmp) {
|
117 |
-
if ($selected == $tmp['val']) {
|
118 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
119 |
-
} else {
|
120 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
121 |
-
}
|
122 |
-
} // foreach
|
123 |
-
|
124 |
-
if ($output) {
|
125 |
-
echo $out;
|
126 |
-
} else {
|
127 |
-
return $out;
|
128 |
-
}
|
129 |
-
} // create_select_options
|
130 |
-
} // class GMW
|
131 |
-
|
132 |
-
|
133 |
-
// hook everything up
|
134 |
-
add_action('init', array('GMW', 'init'));
|
135 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1/js/gmw.js
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.google-maps-widget a.widget-map').click(function() {
|
8 |
-
$($(this).attr('href')).dialog('option', {} ).dialog('open');
|
9 |
-
return false;
|
10 |
-
});
|
11 |
-
|
12 |
-
$('.gmw-dialog').dialog({ 'dialogClass': 'wp-dialog',
|
13 |
-
'modal': true,
|
14 |
-
'resizable': false,
|
15 |
-
'zIndex': 9999,
|
16 |
-
'minWidth': 650,
|
17 |
-
'minHeight': 500,
|
18 |
-
'hide': { effect: 'drop', direction: "down" },
|
19 |
-
'open': function(event, ui) { renderMap(event, ui); fixDialogClose(event, ui); },
|
20 |
-
'close': function(event, ui) { $('#wrap').show(); },
|
21 |
-
'show': 'fade',
|
22 |
-
'autoOpen': false,
|
23 |
-
'closeOnEscape': true
|
24 |
-
});
|
25 |
-
}); // onload
|
26 |
-
|
27 |
-
function renderMap(event, ui) {
|
28 |
-
dialog_id = '#' + event.target.id;
|
29 |
-
map_url = jQuery(dialog_id).attr('data-iframe-url');
|
30 |
-
jQuery('.gmw-map', dialog_id).html('<iframe width="650" height="500" src="' + map_url + '"></iframe>');
|
31 |
-
} // renderMap
|
32 |
-
|
33 |
-
function fixDialogClose(event, ui) {
|
34 |
-
jQuery('.ui-widget-overlay').bind('click', function(){ jQuery('#' + event.target.id).dialog('close'); });
|
35 |
-
} // fixDialogClose
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1/readme.txt
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.1
|
9 |
-
|
10 |
-
Display a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
More features coming soon! So far widget has these options:
|
15 |
-
|
16 |
-
* title
|
17 |
-
* address
|
18 |
-
* thumbnail map width/height
|
19 |
-
* thumbnail map zoom level
|
20 |
-
* thumbnail map type
|
21 |
-
* lightbox zoom level
|
22 |
-
* lightbox map zoom level
|
23 |
-
* lightbox map type
|
24 |
-
* lightbox footer text
|
25 |
-
|
26 |
-
|
27 |
-
== Installation ==
|
28 |
-
|
29 |
-
Follow the usuall routine;
|
30 |
-
|
31 |
-
1. Download the plugin.
|
32 |
-
2. Unzip it and upload to wp-content/plugin/
|
33 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
34 |
-
4. Configure the plugin under Appearance - Widgets
|
35 |
-
|
36 |
-
|
37 |
-
== Frequently Asked Questions ==
|
38 |
-
|
39 |
-
= Who is this plugin for =
|
40 |
-
|
41 |
-
For just about anyone who needs a map on their site.
|
42 |
-
|
43 |
-
|
44 |
-
== Screenshots ==
|
45 |
-
|
46 |
-
1. Small map is shown as a widget and since it's just one image loads super-fast
|
47 |
-
2. Larger map with all features is available in the lightbox
|
48 |
-
|
49 |
-
== Changelog ==
|
50 |
-
|
51 |
-
= 0.1 =
|
52 |
-
* 2012/08/03
|
53 |
-
* Initial release.
|
54 |
-
|
55 |
-
|
56 |
-
== Upgrade Notice ==
|
57 |
-
|
58 |
-
= 0.1 =
|
59 |
-
Initial release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.1/screenshot-1.png
DELETED
Binary file
|
tags/0.1/screenshot-2.png
DELETED
Binary file
|
tags/0.11/gmw-widget.php
DELETED
@@ -1,143 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_width' => 250,
|
21 |
-
'thumb_height' => 250,
|
22 |
-
'thumb_type' => 'roadmap',
|
23 |
-
'thumb_zoom' => '13',
|
24 |
-
'lightbox_width' => 550,
|
25 |
-
'lightbox_height' => 550,
|
26 |
-
'lightbox_type' => 'roadmap',
|
27 |
-
'lightbox_zoom' => '14',
|
28 |
-
'footer' => ''));
|
29 |
-
$title = $instance['title'];
|
30 |
-
$footer = $instance['footer'];
|
31 |
-
$address = $instance['address'];
|
32 |
-
$thumb_width = $instance['thumb_width'];
|
33 |
-
$thumb_height = $instance['thumb_height'];
|
34 |
-
$thumb_type = $instance['thumb_type'];
|
35 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
36 |
-
$lightbox_width = $instance['lightbox_width'];
|
37 |
-
$lightbox_height = $instance['lightbox_height'];
|
38 |
-
$lightbox_type = $instance['lightbox_type'];
|
39 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
40 |
-
|
41 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road map'),
|
42 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
43 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
44 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
45 |
-
|
46 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road map'),
|
47 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
48 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
49 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
50 |
-
|
51 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
52 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
53 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
54 |
-
}
|
55 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
56 |
-
|
57 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
58 |
-
|
59 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
60 |
-
|
61 |
-
echo '<p><label for="' . $this->get_field_id('thumb_width') . '">Thumbnail Map Size: </label>';
|
62 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
63 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
64 |
-
echo '</p>';
|
65 |
-
|
66 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_width') . '">Lightbox Map Size: </label>';
|
67 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
68 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
69 |
-
echo '</p>';
|
70 |
-
|
71 |
-
echo '<p><label for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level for Thumbnail Map: </label>';
|
72 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
73 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
74 |
-
echo '</select></p>';
|
75 |
-
|
76 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level for Lightbox Map: </label>';
|
77 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
78 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
79 |
-
echo '</select></p>';
|
80 |
-
|
81 |
-
echo '<p><label for="' . $this->get_field_id('thumb_type') . '">Thumbnail Map Type: </label>';
|
82 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
83 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
84 |
-
echo '</select></p>';
|
85 |
-
|
86 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_type') . '">Lightbox Map Type: </label>';
|
87 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
88 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
89 |
-
echo '</select></p>';
|
90 |
-
|
91 |
-
echo '<p><label for="' . $this->get_field_id('footer') . '">Lightbox Footer Text:</label>';
|
92 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('footer') . '" name="' . $this->get_field_name('footer') . '">'. $footer . '</textarea></p>';
|
93 |
-
}
|
94 |
-
|
95 |
-
function update($new_instance, $old_instance) {
|
96 |
-
$instance = $old_instance;
|
97 |
-
|
98 |
-
$instance['title'] = $new_instance['title'];
|
99 |
-
$instance['address'] = $new_instance['address'];
|
100 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
101 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
102 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
103 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
104 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
105 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
106 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
107 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
108 |
-
$instance['footer'] = $new_instance['footer'];
|
109 |
-
|
110 |
-
return $instance;
|
111 |
-
}
|
112 |
-
|
113 |
-
function widget($args, $instance) {
|
114 |
-
$out = $tmp = '';
|
115 |
-
|
116 |
-
extract($args, EXTR_SKIP);
|
117 |
-
self::$widgets[] = array('title' => $instance['title'],
|
118 |
-
'footer' => $instance['footer'],
|
119 |
-
'address' => $instance['address'],
|
120 |
-
'lightbox_zoom' => $instance['lightbox_zoom'],
|
121 |
-
'lightbox_type' => $instance['lightbox_type'],
|
122 |
-
'id' => $widget_id);
|
123 |
-
|
124 |
-
$out .= $before_widget;
|
125 |
-
|
126 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
127 |
-
if (!empty($title)) {
|
128 |
-
$out .= $before_title . $title . $after_title;
|
129 |
-
}
|
130 |
-
|
131 |
-
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
132 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
133 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
134 |
-
'&size=' .$instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] . '&sensor=false&scale=2&markers=color:red%7Clabel:A%7C' .
|
135 |
-
urlencode($instance['address']) . '"></a>';
|
136 |
-
$tmp .= '</p>';
|
137 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
138 |
-
|
139 |
-
$out .= $after_widget;
|
140 |
-
|
141 |
-
echo $out;
|
142 |
-
}
|
143 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.11/google-maps-widget.php
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.11
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
define('GOOGLE_MAPS_WIDGET_CORE_VER', '0.1');
|
17 |
-
require_once 'gmw-widget.php';
|
18 |
-
|
19 |
-
class GMW {
|
20 |
-
function init() {
|
21 |
-
if (is_admin()) {
|
22 |
-
// check if minimal required WP version is used
|
23 |
-
self::check_wp_version(3.2);
|
24 |
-
|
25 |
-
// aditional links in plugin description
|
26 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
27 |
-
array(__CLASS__, 'plugin_action_links'));
|
28 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
29 |
-
} else {
|
30 |
-
// enqueue frontend scripts
|
31 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
32 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
33 |
-
}
|
34 |
-
} // init
|
35 |
-
|
36 |
-
|
37 |
-
// initialize widgets
|
38 |
-
function widgets_init() {
|
39 |
-
register_widget('GoogleMapsWidget');
|
40 |
-
} // widgets_init
|
41 |
-
|
42 |
-
|
43 |
-
// add settings link to plugins page
|
44 |
-
function plugin_action_links($links) {
|
45 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
46 |
-
array_unshift($links, $settings_link);
|
47 |
-
|
48 |
-
return $links;
|
49 |
-
} // plugin_action_links
|
50 |
-
|
51 |
-
|
52 |
-
// add links to plugin's description in plugins table
|
53 |
-
function plugin_meta_links($links, $file) {
|
54 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
55 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
56 |
-
|
57 |
-
if ($file == plugin_basename(__FILE__)) {
|
58 |
-
//$links[] = $documentation_link;
|
59 |
-
$links[] = $support_link;
|
60 |
-
}
|
61 |
-
|
62 |
-
return $links;
|
63 |
-
} // plugin_meta_links
|
64 |
-
|
65 |
-
|
66 |
-
// check if user has the minimal WP version required by the plugin
|
67 |
-
function check_wp_version($min_version) {
|
68 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
69 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
70 |
-
}
|
71 |
-
} // check_wp_version
|
72 |
-
|
73 |
-
|
74 |
-
// display error message if WP version is too low
|
75 |
-
function min_version_error() {
|
76 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
77 |
-
} // min_version_error
|
78 |
-
|
79 |
-
|
80 |
-
// print dialogs markup in footer
|
81 |
-
function dialogs_markup() {
|
82 |
-
$out = '';
|
83 |
-
$widgets = GoogleMapsWidget::$widgets;
|
84 |
-
|
85 |
-
if (!$widgets) {
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
|
89 |
-
foreach ($widgets as $widget) {
|
90 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-iframe-url="http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=A&iwd=1&mrt=loc&t=' . $widget['lightbox_type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['lightbox_zoom']) . '" id="dialog-' . $widget['id'] . '" title="' . $widget['title'] . '">';
|
91 |
-
$out .= '<div class="gmw-map"></div>';
|
92 |
-
if ($widget['footer']) {
|
93 |
-
$out .= '<div class="gmw-footer" style="padding: 5px;"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
94 |
-
}
|
95 |
-
$out .= "</div>\n";
|
96 |
-
} // foreach $widgets
|
97 |
-
|
98 |
-
echo $out;
|
99 |
-
} // run_scroller
|
100 |
-
|
101 |
-
|
102 |
-
// enqueue frontend scripts if necessary
|
103 |
-
function enqueue_scripts() {
|
104 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
105 |
-
wp_enqueue_style('wp-jquery-ui-dialog');
|
106 |
-
wp_enqueue_script('jquery-ui-dialog');
|
107 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), '1.0');
|
108 |
-
}
|
109 |
-
} // enqueue_scripts
|
110 |
-
|
111 |
-
|
112 |
-
// helper function for creating dropdowns
|
113 |
-
function create_select_options($options, $selected = null, $output = true) {
|
114 |
-
$out = "\n";
|
115 |
-
|
116 |
-
foreach ($options as $tmp) {
|
117 |
-
if ($selected == $tmp['val']) {
|
118 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
119 |
-
} else {
|
120 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
121 |
-
}
|
122 |
-
} // foreach
|
123 |
-
|
124 |
-
if ($output) {
|
125 |
-
echo $out;
|
126 |
-
} else {
|
127 |
-
return $out;
|
128 |
-
}
|
129 |
-
} // create_select_options
|
130 |
-
} // class GMW
|
131 |
-
|
132 |
-
|
133 |
-
// hook everything up
|
134 |
-
add_action('init', array('GMW', 'init'));
|
135 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.11/js/gmw.js
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.google-maps-widget a.widget-map').click(function() {
|
8 |
-
$($(this).attr('href')).dialog('option', {} ).dialog('open');
|
9 |
-
return false;
|
10 |
-
});
|
11 |
-
|
12 |
-
$('.gmw-dialog').dialog({ 'dialogClass': 'wp-dialog',
|
13 |
-
'modal': true,
|
14 |
-
'resizable': false,
|
15 |
-
'zIndex': 9999,
|
16 |
-
'minWidth': 650,
|
17 |
-
'minHeight': 500,
|
18 |
-
'hide': { effect: 'drop', direction: "down" },
|
19 |
-
'open': function(event, ui) { renderMap(event, ui); fixDialogClose(event, ui); },
|
20 |
-
'close': function(event, ui) { $('#wrap').show(); },
|
21 |
-
'show': 'fade',
|
22 |
-
'autoOpen': false,
|
23 |
-
'closeOnEscape': true
|
24 |
-
});
|
25 |
-
}); // onload
|
26 |
-
|
27 |
-
function renderMap(event, ui) {
|
28 |
-
dialog_id = '#' + event.target.id;
|
29 |
-
map_url = jQuery(dialog_id).attr('data-iframe-url');
|
30 |
-
jQuery('.gmw-map', dialog_id).html('<iframe width="650" height="500" src="' + map_url + '"></iframe>');
|
31 |
-
} // renderMap
|
32 |
-
|
33 |
-
function fixDialogClose(event, ui) {
|
34 |
-
jQuery('.ui-widget-overlay').bind('click', function(){ jQuery('#' + event.target.id).dialog('close'); });
|
35 |
-
} // fixDialogClose
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.11/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.11/readme.txt
DELETED
@@ -1,67 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.11
|
9 |
-
|
10 |
-
Display a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
More features and demo coming in a few days! Till then the widget has these options:
|
15 |
-
|
16 |
-
* title
|
17 |
-
* address
|
18 |
-
* thumbnail map width/height
|
19 |
-
* thumbnail map zoom level
|
20 |
-
* thumbnail map type
|
21 |
-
* lightbox map width/height
|
22 |
-
* lightbox map zoom level
|
23 |
-
* lightbox map type
|
24 |
-
* lightbox footer text
|
25 |
-
|
26 |
-
|
27 |
-
== Installation ==
|
28 |
-
|
29 |
-
Follow the usual routine;
|
30 |
-
|
31 |
-
1. Download the plugin.
|
32 |
-
2. Unzip it and upload to wp-content/plugin/
|
33 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
34 |
-
4. Configure the plugin under Appearance - Widgets
|
35 |
-
|
36 |
-
|
37 |
-
== Frequently Asked Questions ==
|
38 |
-
|
39 |
-
= Who is this plugin for? =
|
40 |
-
|
41 |
-
For just about anyone who needs a map on their site.
|
42 |
-
|
43 |
-
= It's not working!!! Arrrrrrrrr =
|
44 |
-
|
45 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
46 |
-
If you can figure it out open a thread in the support forums.
|
47 |
-
|
48 |
-
== Screenshots ==
|
49 |
-
|
50 |
-
1. Small map is shown as a widget and since it's just one image loads super-fast
|
51 |
-
2. Larger map with all features is available in the lightbox
|
52 |
-
|
53 |
-
== Changelog ==
|
54 |
-
|
55 |
-
= 0.11 =
|
56 |
-
* 2012/08/03
|
57 |
-
* Fixed a few minor bugs.
|
58 |
-
|
59 |
-
= 0.1 =
|
60 |
-
* 2012/08/03
|
61 |
-
* Initial release.
|
62 |
-
|
63 |
-
|
64 |
-
== Upgrade Notice ==
|
65 |
-
|
66 |
-
= 0.1 =
|
67 |
-
Initial release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.11/screenshot-1.png
DELETED
Binary file
|
tags/0.11/screenshot-2.png
DELETED
Binary file
|
tags/0.12/gmw-widget.php
DELETED
@@ -1,162 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_width' => 250,
|
22 |
-
'thumb_height' => 250,
|
23 |
-
'thumb_type' => 'roadmap',
|
24 |
-
'thumb_zoom' => '13',
|
25 |
-
'lightbox_width' => 550,
|
26 |
-
'lightbox_height' => 550,
|
27 |
-
'lightbox_type' => 'roadmap',
|
28 |
-
'lightbox_zoom' => '14',
|
29 |
-
'footer' => ''));
|
30 |
-
$title = $instance['title'];
|
31 |
-
$footer = $instance['footer'];
|
32 |
-
$address = $instance['address'];
|
33 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
34 |
-
$thumb_width = $instance['thumb_width'];
|
35 |
-
$thumb_height = $instance['thumb_height'];
|
36 |
-
$thumb_type = $instance['thumb_type'];
|
37 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
38 |
-
$lightbox_width = $instance['lightbox_width'];
|
39 |
-
$lightbox_height = $instance['lightbox_height'];
|
40 |
-
$lightbox_type = $instance['lightbox_type'];
|
41 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
42 |
-
|
43 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road map'),
|
44 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
45 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
46 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
47 |
-
|
48 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road map'),
|
49 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
50 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
51 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
52 |
-
|
53 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
54 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
55 |
-
array('val' => 'green', 'label' => 'Green'),
|
56 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
57 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
58 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
59 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
60 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
61 |
-
array('val' => 'red', 'label' => 'Red'),
|
62 |
-
array('val' => 'white', 'label' => 'White'));
|
63 |
-
|
64 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
65 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
66 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
67 |
-
}
|
68 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
69 |
-
|
70 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
71 |
-
|
72 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
73 |
-
|
74 |
-
echo '<p><label for="' . $this->get_field_id('thumb_pin_color') . '">Thumbnail Map Pin Color: </label>';
|
75 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
76 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
77 |
-
echo '</select></p>';
|
78 |
-
|
79 |
-
echo '<p><label for="' . $this->get_field_id('thumb_width') . '">Thumbnail Map Size: </label>';
|
80 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
81 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
82 |
-
echo '</p>';
|
83 |
-
|
84 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_width') . '">Lightbox Map Size: </label>';
|
85 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
86 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
87 |
-
echo '</p>';
|
88 |
-
|
89 |
-
echo '<p><label for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level for Thumbnail Map: </label>';
|
90 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
91 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
92 |
-
echo '</select></p>';
|
93 |
-
|
94 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level for Lightbox Map: </label>';
|
95 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
96 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
97 |
-
echo '</select></p>';
|
98 |
-
|
99 |
-
echo '<p><label for="' . $this->get_field_id('thumb_type') . '">Thumbnail Map Type: </label>';
|
100 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
101 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
102 |
-
echo '</select></p>';
|
103 |
-
|
104 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_type') . '">Lightbox Map Type: </label>';
|
105 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
106 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
107 |
-
echo '</select></p>';
|
108 |
-
|
109 |
-
echo '<p><label for="' . $this->get_field_id('footer') . '">Lightbox Footer Text:</label>';
|
110 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('footer') . '" name="' . $this->get_field_name('footer') . '">'. $footer . '</textarea></p>';
|
111 |
-
}
|
112 |
-
|
113 |
-
function update($new_instance, $old_instance) {
|
114 |
-
$instance = $old_instance;
|
115 |
-
|
116 |
-
$instance['title'] = $new_instance['title'];
|
117 |
-
$instance['address'] = $new_instance['address'];
|
118 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
119 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
120 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
121 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
122 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
123 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
124 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
125 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
126 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
127 |
-
$instance['footer'] = $new_instance['footer'];
|
128 |
-
|
129 |
-
return $instance;
|
130 |
-
}
|
131 |
-
|
132 |
-
function widget($args, $instance) {
|
133 |
-
$out = $tmp = '';
|
134 |
-
|
135 |
-
extract($args, EXTR_SKIP);
|
136 |
-
self::$widgets[] = array('title' => $instance['title'],
|
137 |
-
'footer' => $instance['footer'],
|
138 |
-
'address' => $instance['address'],
|
139 |
-
'lightbox_zoom' => $instance['lightbox_zoom'],
|
140 |
-
'lightbox_type' => $instance['lightbox_type'],
|
141 |
-
'id' => $widget_id);
|
142 |
-
|
143 |
-
$out .= $before_widget;
|
144 |
-
|
145 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
146 |
-
if (!empty($title)) {
|
147 |
-
$out .= $before_title . $title . $after_title;
|
148 |
-
}
|
149 |
-
|
150 |
-
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
151 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
152 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
153 |
-
'&size=' .$instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] . '&sensor=false&scale=2&markers=color:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
154 |
-
urlencode($instance['address']) . '"></a>';
|
155 |
-
$tmp .= '</p>';
|
156 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
157 |
-
|
158 |
-
$out .= $after_widget;
|
159 |
-
|
160 |
-
echo $out;
|
161 |
-
}
|
162 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.12/google-maps-widget.php
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.12
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
define('GOOGLE_MAPS_WIDGET_CORE_VER', '0.1');
|
17 |
-
require_once 'gmw-widget.php';
|
18 |
-
|
19 |
-
class GMW {
|
20 |
-
function init() {
|
21 |
-
if (is_admin()) {
|
22 |
-
// check if minimal required WP version is used
|
23 |
-
self::check_wp_version(3.2);
|
24 |
-
|
25 |
-
// aditional links in plugin description
|
26 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
27 |
-
array(__CLASS__, 'plugin_action_links'));
|
28 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
29 |
-
} else {
|
30 |
-
// enqueue frontend scripts
|
31 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
32 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
33 |
-
}
|
34 |
-
} // init
|
35 |
-
|
36 |
-
|
37 |
-
// initialize widgets
|
38 |
-
function widgets_init() {
|
39 |
-
register_widget('GoogleMapsWidget');
|
40 |
-
} // widgets_init
|
41 |
-
|
42 |
-
|
43 |
-
// add settings link to plugins page
|
44 |
-
function plugin_action_links($links) {
|
45 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
46 |
-
array_unshift($links, $settings_link);
|
47 |
-
|
48 |
-
return $links;
|
49 |
-
} // plugin_action_links
|
50 |
-
|
51 |
-
|
52 |
-
// add links to plugin's description in plugins table
|
53 |
-
function plugin_meta_links($links, $file) {
|
54 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
55 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
56 |
-
|
57 |
-
if ($file == plugin_basename(__FILE__)) {
|
58 |
-
//$links[] = $documentation_link;
|
59 |
-
$links[] = $support_link;
|
60 |
-
}
|
61 |
-
|
62 |
-
return $links;
|
63 |
-
} // plugin_meta_links
|
64 |
-
|
65 |
-
|
66 |
-
// check if user has the minimal WP version required by the plugin
|
67 |
-
function check_wp_version($min_version) {
|
68 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
69 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
70 |
-
}
|
71 |
-
} // check_wp_version
|
72 |
-
|
73 |
-
|
74 |
-
// display error message if WP version is too low
|
75 |
-
function min_version_error() {
|
76 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
77 |
-
} // min_version_error
|
78 |
-
|
79 |
-
|
80 |
-
// print dialogs markup in footer
|
81 |
-
function dialogs_markup() {
|
82 |
-
$out = '';
|
83 |
-
$widgets = GoogleMapsWidget::$widgets;
|
84 |
-
|
85 |
-
if (!$widgets) {
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
|
89 |
-
foreach ($widgets as $widget) {
|
90 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-iframe-url="http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=A&iwd=1&mrt=loc&t=' . $widget['lightbox_type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['lightbox_zoom']) . '" id="dialog-' . $widget['id'] . '" title="' . $widget['title'] . '">';
|
91 |
-
$out .= '<div class="gmw-map"></div>';
|
92 |
-
if ($widget['footer']) {
|
93 |
-
$out .= '<div class="gmw-footer" style="padding: 5px;"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
94 |
-
}
|
95 |
-
$out .= "</div>\n";
|
96 |
-
} // foreach $widgets
|
97 |
-
|
98 |
-
echo $out;
|
99 |
-
} // run_scroller
|
100 |
-
|
101 |
-
|
102 |
-
// enqueue frontend scripts if necessary
|
103 |
-
function enqueue_scripts() {
|
104 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
105 |
-
wp_enqueue_style('wp-jquery-ui-dialog');
|
106 |
-
wp_enqueue_script('jquery-ui-dialog');
|
107 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), '1.0');
|
108 |
-
}
|
109 |
-
} // enqueue_scripts
|
110 |
-
|
111 |
-
|
112 |
-
// helper function for creating dropdowns
|
113 |
-
function create_select_options($options, $selected = null, $output = true) {
|
114 |
-
$out = "\n";
|
115 |
-
|
116 |
-
foreach ($options as $tmp) {
|
117 |
-
if ($selected == $tmp['val']) {
|
118 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
119 |
-
} else {
|
120 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
121 |
-
}
|
122 |
-
} // foreach
|
123 |
-
|
124 |
-
if ($output) {
|
125 |
-
echo $out;
|
126 |
-
} else {
|
127 |
-
return $out;
|
128 |
-
}
|
129 |
-
} // create_select_options
|
130 |
-
} // class GMW
|
131 |
-
|
132 |
-
|
133 |
-
// hook everything up
|
134 |
-
add_action('init', array('GMW', 'init'));
|
135 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.12/js/gmw.js
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.google-maps-widget a.widget-map').click(function() {
|
8 |
-
$($(this).attr('href')).dialog('option', {} ).dialog('open');
|
9 |
-
return false;
|
10 |
-
});
|
11 |
-
|
12 |
-
$('.gmw-dialog').dialog({ 'dialogClass': 'wp-dialog',
|
13 |
-
'modal': true,
|
14 |
-
'resizable': false,
|
15 |
-
'zIndex': 9999,
|
16 |
-
'minWidth': 650,
|
17 |
-
'minHeight': 500,
|
18 |
-
'hide': { effect: 'drop', direction: "down" },
|
19 |
-
'open': function(event, ui) { renderMap(event, ui); fixDialogClose(event, ui); },
|
20 |
-
'close': function(event, ui) { $('#wrap').show(); },
|
21 |
-
'show': 'fade',
|
22 |
-
'autoOpen': false,
|
23 |
-
'closeOnEscape': true
|
24 |
-
});
|
25 |
-
}); // onload
|
26 |
-
|
27 |
-
function renderMap(event, ui) {
|
28 |
-
dialog_id = '#' + event.target.id;
|
29 |
-
map_url = jQuery(dialog_id).attr('data-iframe-url');
|
30 |
-
jQuery('.gmw-map', dialog_id).html('<iframe width="650" height="500" src="' + map_url + '"></iframe>');
|
31 |
-
} // renderMap
|
32 |
-
|
33 |
-
function fixDialogClose(event, ui) {
|
34 |
-
jQuery('.ui-widget-overlay').bind('click', function(){ jQuery('#' + event.target.id).dialog('close'); });
|
35 |
-
} // fixDialogClose
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.12/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.12/readme.txt
DELETED
@@ -1,75 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.12
|
9 |
-
|
10 |
-
Display a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
More features, videos and demos are coming in a few days! Till then here's the widget's features list:
|
15 |
-
|
16 |
-
* title
|
17 |
-
* address
|
18 |
-
* thumbnail map pin color
|
19 |
-
* thumbnail map width/height
|
20 |
-
* thumbnail map zoom level
|
21 |
-
* thumbnail map type
|
22 |
-
* lightbox map width/height
|
23 |
-
* lightbox map zoom level
|
24 |
-
* lightbox map type
|
25 |
-
* lightbox footer text
|
26 |
-
|
27 |
-
|
28 |
-
There are no additional JS libraries included; GMW uses jQuery and jQuery UI Dialog bundled with WP. There are also no CSS files, but will be in the future 'cause we want to make the dialog look nicer :)
|
29 |
-
|
30 |
-
== Installation ==
|
31 |
-
|
32 |
-
Follow the usual routine;
|
33 |
-
|
34 |
-
1. Download the plugin.
|
35 |
-
2. Unzip it and upload to wp-content/plugin/
|
36 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
37 |
-
4. Configure the plugin under Appearance - Widgets
|
38 |
-
|
39 |
-
|
40 |
-
== Frequently Asked Questions ==
|
41 |
-
|
42 |
-
= Who is this plugin for? =
|
43 |
-
|
44 |
-
For just about anyone who needs a map on their site.
|
45 |
-
|
46 |
-
= It's not working!!! Arrrrrrrrr =
|
47 |
-
|
48 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
49 |
-
If you can figure it out open a thread in the support forums.
|
50 |
-
|
51 |
-
== Screenshots ==
|
52 |
-
|
53 |
-
1. Small map is shown as a widget and since it's just one image loads super-fast
|
54 |
-
2. Larger map with all features is available in the lightbox
|
55 |
-
|
56 |
-
== Changelog ==
|
57 |
-
|
58 |
-
= 0.12 =
|
59 |
-
* 2012/08/07
|
60 |
-
* Added pin color for thumbnail map
|
61 |
-
* Fixed a few minor bugs
|
62 |
-
|
63 |
-
= 0.11 =
|
64 |
-
* 2012/08/06
|
65 |
-
* Fixed a few minor bugs
|
66 |
-
|
67 |
-
= 0.1 =
|
68 |
-
* 2012/08/03
|
69 |
-
* Initial release
|
70 |
-
|
71 |
-
|
72 |
-
== Upgrade Notice ==
|
73 |
-
|
74 |
-
= 0.1 =
|
75 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.12/screenshot-1.png
DELETED
Binary file
|
tags/0.12/screenshot-2.png
DELETED
Binary file
|
tags/0.13/gmw-widget.php
DELETED
@@ -1,176 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'footer' => ''));
|
31 |
-
$title = $instance['title'];
|
32 |
-
$footer = $instance['footer'];
|
33 |
-
$address = $instance['address'];
|
34 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
35 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
36 |
-
$thumb_width = $instance['thumb_width'];
|
37 |
-
$thumb_height = $instance['thumb_height'];
|
38 |
-
$thumb_type = $instance['thumb_type'];
|
39 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
40 |
-
$lightbox_width = $instance['lightbox_width'];
|
41 |
-
$lightbox_height = $instance['lightbox_height'];
|
42 |
-
$lightbox_type = $instance['lightbox_type'];
|
43 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
44 |
-
|
45 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road map'),
|
46 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
47 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
48 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
49 |
-
|
50 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road map'),
|
51 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
52 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
53 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
54 |
-
|
55 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
56 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
57 |
-
array('val' => 'green', 'label' => 'Green'),
|
58 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
59 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
60 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
61 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
62 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
63 |
-
array('val' => 'red', 'label' => 'Red'),
|
64 |
-
array('val' => 'white', 'label' => 'White'));
|
65 |
-
|
66 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
67 |
-
array('val' => 'small', 'label' => 'Small'),
|
68 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
69 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
70 |
-
|
71 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
72 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
73 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
74 |
-
}
|
75 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
76 |
-
|
77 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
78 |
-
|
79 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
80 |
-
|
81 |
-
echo '<p><label for="' . $this->get_field_id('thumb_pin_color') . '">Thumbnail Map Pin Color: </label>';
|
82 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
83 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
84 |
-
echo '</select></p>';
|
85 |
-
|
86 |
-
echo '<p><label for="' . $this->get_field_id('thumb_pin_size') . '">Thumbnail Map Pin Size: </label>';
|
87 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
88 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
89 |
-
echo '</select></p>';
|
90 |
-
|
91 |
-
echo '<p><label for="' . $this->get_field_id('thumb_width') . '">Thumbnail Map Size: </label>';
|
92 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
93 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
94 |
-
echo '</p>';
|
95 |
-
|
96 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_width') . '">Lightbox Map Size: </label>';
|
97 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
98 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
99 |
-
echo '</p>';
|
100 |
-
|
101 |
-
echo '<p><label for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level for Thumbnail Map: </label>';
|
102 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
103 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
104 |
-
echo '</select></p>';
|
105 |
-
|
106 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level for Lightbox Map: </label>';
|
107 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
108 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
109 |
-
echo '</select></p>';
|
110 |
-
|
111 |
-
echo '<p><label for="' . $this->get_field_id('thumb_type') . '">Thumbnail Map Type: </label>';
|
112 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
113 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
114 |
-
echo '</select></p>';
|
115 |
-
|
116 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_type') . '">Lightbox Map Type: </label>';
|
117 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
118 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
119 |
-
echo '</select></p>';
|
120 |
-
|
121 |
-
echo '<p><label for="' . $this->get_field_id('footer') . '">Lightbox Footer Text:</label>';
|
122 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('footer') . '" name="' . $this->get_field_name('footer') . '">'. $footer . '</textarea></p>';
|
123 |
-
}
|
124 |
-
|
125 |
-
function update($new_instance, $old_instance) {
|
126 |
-
$instance = $old_instance;
|
127 |
-
|
128 |
-
$instance['title'] = $new_instance['title'];
|
129 |
-
$instance['address'] = $new_instance['address'];
|
130 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
131 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
132 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
133 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
134 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
135 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
136 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
137 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
138 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
139 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
140 |
-
$instance['footer'] = $new_instance['footer'];
|
141 |
-
|
142 |
-
return $instance;
|
143 |
-
}
|
144 |
-
|
145 |
-
function widget($args, $instance) {
|
146 |
-
$out = $tmp = '';
|
147 |
-
|
148 |
-
extract($args, EXTR_SKIP);
|
149 |
-
self::$widgets[] = array('title' => $instance['title'],
|
150 |
-
'footer' => $instance['footer'],
|
151 |
-
'address' => $instance['address'],
|
152 |
-
'lightbox_zoom' => $instance['lightbox_zoom'],
|
153 |
-
'lightbox_type' => $instance['lightbox_type'],
|
154 |
-
'id' => $widget_id);
|
155 |
-
|
156 |
-
$out .= $before_widget;
|
157 |
-
|
158 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
159 |
-
if (!empty($title)) {
|
160 |
-
$out .= $before_title . $title . $after_title;
|
161 |
-
}
|
162 |
-
|
163 |
-
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
164 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
165 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
166 |
-
'&size=' .$instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
167 |
-
'&sensor=false&scale=2&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
168 |
-
urlencode($instance['address']) . '"></a>';
|
169 |
-
$tmp .= '</p>';
|
170 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
171 |
-
|
172 |
-
$out .= $after_widget;
|
173 |
-
|
174 |
-
echo $out;
|
175 |
-
}
|
176 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.13/google-maps-widget.php
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.13
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
define('GOOGLE_MAPS_WIDGET_CORE_VER', '0.1');
|
17 |
-
require_once 'gmw-widget.php';
|
18 |
-
|
19 |
-
class GMW {
|
20 |
-
function init() {
|
21 |
-
if (is_admin()) {
|
22 |
-
// check if minimal required WP version is used
|
23 |
-
self::check_wp_version(3.2);
|
24 |
-
|
25 |
-
// aditional links in plugin description
|
26 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
27 |
-
array(__CLASS__, 'plugin_action_links'));
|
28 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
29 |
-
} else {
|
30 |
-
// enqueue frontend scripts
|
31 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
32 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
33 |
-
}
|
34 |
-
} // init
|
35 |
-
|
36 |
-
|
37 |
-
// initialize widgets
|
38 |
-
function widgets_init() {
|
39 |
-
register_widget('GoogleMapsWidget');
|
40 |
-
} // widgets_init
|
41 |
-
|
42 |
-
|
43 |
-
// add settings link to plugins page
|
44 |
-
function plugin_action_links($links) {
|
45 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
46 |
-
array_unshift($links, $settings_link);
|
47 |
-
|
48 |
-
return $links;
|
49 |
-
} // plugin_action_links
|
50 |
-
|
51 |
-
|
52 |
-
// add links to plugin's description in plugins table
|
53 |
-
function plugin_meta_links($links, $file) {
|
54 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
55 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
56 |
-
|
57 |
-
if ($file == plugin_basename(__FILE__)) {
|
58 |
-
//$links[] = $documentation_link;
|
59 |
-
$links[] = $support_link;
|
60 |
-
}
|
61 |
-
|
62 |
-
return $links;
|
63 |
-
} // plugin_meta_links
|
64 |
-
|
65 |
-
|
66 |
-
// check if user has the minimal WP version required by the plugin
|
67 |
-
function check_wp_version($min_version) {
|
68 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
69 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
70 |
-
}
|
71 |
-
} // check_wp_version
|
72 |
-
|
73 |
-
|
74 |
-
// display error message if WP version is too low
|
75 |
-
function min_version_error() {
|
76 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
77 |
-
} // min_version_error
|
78 |
-
|
79 |
-
|
80 |
-
// print dialogs markup in footer
|
81 |
-
function dialogs_markup() {
|
82 |
-
$out = '';
|
83 |
-
$widgets = GoogleMapsWidget::$widgets;
|
84 |
-
|
85 |
-
if (!$widgets) {
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
|
89 |
-
foreach ($widgets as $widget) {
|
90 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-iframe-url="http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=A&iwd=1&mrt=loc&t=' . $widget['lightbox_type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['lightbox_zoom']) . '" id="dialog-' . $widget['id'] . '" title="' . $widget['title'] . '">';
|
91 |
-
$out .= '<div class="gmw-map"></div>';
|
92 |
-
if ($widget['footer']) {
|
93 |
-
$out .= '<div class="gmw-footer" style="padding: 5px;"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
94 |
-
}
|
95 |
-
$out .= "</div>\n";
|
96 |
-
} // foreach $widgets
|
97 |
-
|
98 |
-
echo $out;
|
99 |
-
} // run_scroller
|
100 |
-
|
101 |
-
|
102 |
-
// enqueue frontend scripts if necessary
|
103 |
-
function enqueue_scripts() {
|
104 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
105 |
-
wp_enqueue_style('wp-jquery-ui-dialog');
|
106 |
-
wp_enqueue_script('jquery-ui-dialog');
|
107 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), '1.0');
|
108 |
-
}
|
109 |
-
} // enqueue_scripts
|
110 |
-
|
111 |
-
|
112 |
-
// helper function for creating dropdowns
|
113 |
-
function create_select_options($options, $selected = null, $output = true) {
|
114 |
-
$out = "\n";
|
115 |
-
|
116 |
-
foreach ($options as $tmp) {
|
117 |
-
if ($selected == $tmp['val']) {
|
118 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
119 |
-
} else {
|
120 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
121 |
-
}
|
122 |
-
} // foreach
|
123 |
-
|
124 |
-
if ($output) {
|
125 |
-
echo $out;
|
126 |
-
} else {
|
127 |
-
return $out;
|
128 |
-
}
|
129 |
-
} // create_select_options
|
130 |
-
} // class GMW
|
131 |
-
|
132 |
-
|
133 |
-
// hook everything up
|
134 |
-
add_action('init', array('GMW', 'init'));
|
135 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.13/js/gmw.js
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.google-maps-widget a.widget-map').click(function() {
|
8 |
-
$($(this).attr('href')).dialog('option', {} ).dialog('open');
|
9 |
-
return false;
|
10 |
-
});
|
11 |
-
|
12 |
-
$('.gmw-dialog').dialog({ 'dialogClass': 'wp-dialog',
|
13 |
-
'modal': true,
|
14 |
-
'resizable': false,
|
15 |
-
'zIndex': 9999,
|
16 |
-
'minWidth': 650,
|
17 |
-
'minHeight': 500,
|
18 |
-
'hide': { effect: 'drop', direction: "down" },
|
19 |
-
'open': function(event, ui) { renderMap(event, ui); fixDialogClose(event, ui); },
|
20 |
-
'close': function(event, ui) { $('#wrap').show(); },
|
21 |
-
'show': 'fade',
|
22 |
-
'autoOpen': false,
|
23 |
-
'closeOnEscape': true
|
24 |
-
});
|
25 |
-
}); // onload
|
26 |
-
|
27 |
-
function renderMap(event, ui) {
|
28 |
-
dialog_id = '#' + event.target.id;
|
29 |
-
map_url = jQuery(dialog_id).attr('data-iframe-url');
|
30 |
-
jQuery('.gmw-map', dialog_id).html('<iframe width="650" height="500" src="' + map_url + '"></iframe>');
|
31 |
-
} // renderMap
|
32 |
-
|
33 |
-
function fixDialogClose(event, ui) {
|
34 |
-
jQuery('.ui-widget-overlay').bind('click', function(){ jQuery('#' + event.target.id).dialog('close'); });
|
35 |
-
} // fixDialogClose
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.13/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.13/readme.txt
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.13
|
9 |
-
|
10 |
-
Display a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
More features, videos and demos are coming in a few days! Till then here's the widget's features list:
|
15 |
-
|
16 |
-
* title
|
17 |
-
* address
|
18 |
-
* thumbnail map pin color
|
19 |
-
* thumbnail map pin size
|
20 |
-
* thumbnail map width/height
|
21 |
-
* thumbnail map zoom level
|
22 |
-
* thumbnail map type
|
23 |
-
* lightbox map width/height
|
24 |
-
* lightbox map zoom level
|
25 |
-
* lightbox map type
|
26 |
-
* lightbox footer text
|
27 |
-
|
28 |
-
|
29 |
-
There are no additional JS libraries included; GMW uses jQuery and jQuery UI Dialog bundled with WP. There are also no CSS files, but will be in the future 'cause we want to make the dialog look nicer :)
|
30 |
-
|
31 |
-
== Installation ==
|
32 |
-
|
33 |
-
Follow the usual routine;
|
34 |
-
|
35 |
-
1. Download the plugin.
|
36 |
-
2. Unzip it and upload to wp-content/plugin/
|
37 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
38 |
-
4. Configure the plugin under Appearance - Widgets
|
39 |
-
|
40 |
-
|
41 |
-
== Frequently Asked Questions ==
|
42 |
-
|
43 |
-
= Who is this plugin for? =
|
44 |
-
|
45 |
-
For just about anyone who needs a map on their site.
|
46 |
-
|
47 |
-
= It's not working!!! Arrrrrrrrr =
|
48 |
-
|
49 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
50 |
-
If you can figure it out open a thread in the support forums.
|
51 |
-
|
52 |
-
== Screenshots ==
|
53 |
-
|
54 |
-
1. Small map is shown as a widget and since it's just one image loads super-fast
|
55 |
-
2. Larger map with all features is available in the lightbox
|
56 |
-
|
57 |
-
== Changelog ==
|
58 |
-
|
59 |
-
= 0.13 =
|
60 |
-
* 2012/08/09
|
61 |
-
* Added pin size for thumbnail map
|
62 |
-
|
63 |
-
= 0.12 =
|
64 |
-
* 2012/08/07
|
65 |
-
* Added pin color for thumbnail map
|
66 |
-
* Fixed a few minor bugs
|
67 |
-
|
68 |
-
= 0.11 =
|
69 |
-
* 2012/08/06
|
70 |
-
* Fixed a few minor bugs
|
71 |
-
|
72 |
-
= 0.1 =
|
73 |
-
* 2012/08/03
|
74 |
-
* Initial release
|
75 |
-
|
76 |
-
|
77 |
-
== Upgrade Notice ==
|
78 |
-
|
79 |
-
= 0.1x =
|
80 |
-
Upgrade without any fear :)
|
81 |
-
|
82 |
-
= 0.1 =
|
83 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.13/screenshot-1.png
DELETED
Binary file
|
tags/0.13/screenshot-2.png
DELETED
Binary file
|
tags/0.2/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.2/gmw-widget.php
DELETED
@@ -1,202 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_header' => '',
|
32 |
-
'lightbox_footer' => ''));
|
33 |
-
|
34 |
-
$title = $instance['title'];
|
35 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
36 |
-
$lightbox_header = $instance['lightbox_header'];
|
37 |
-
$address = $instance['address'];
|
38 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
39 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
40 |
-
$thumb_width = $instance['thumb_width'];
|
41 |
-
$thumb_height = $instance['thumb_height'];
|
42 |
-
$thumb_type = $instance['thumb_type'];
|
43 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
44 |
-
$lightbox_width = $instance['lightbox_width'];
|
45 |
-
$lightbox_height = $instance['lightbox_height'];
|
46 |
-
$lightbox_type = $instance['lightbox_type'];
|
47 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
48 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
49 |
-
|
50 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
51 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
52 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
53 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
54 |
-
|
55 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
56 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
57 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
58 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
59 |
-
|
60 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
61 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
62 |
-
array('val' => 'green', 'label' => 'Green'),
|
63 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
64 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
65 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
66 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
67 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
68 |
-
array('val' => 'red', 'label' => 'Red'),
|
69 |
-
array('val' => 'white', 'label' => 'White'));
|
70 |
-
|
71 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
72 |
-
array('val' => 'small', 'label' => 'Small'),
|
73 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
74 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
75 |
-
|
76 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
77 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
78 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
79 |
-
}
|
80 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
81 |
-
|
82 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
83 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
84 |
-
|
85 |
-
echo '<div class="gmw-tabs"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
86 |
-
echo '<div id="gmw-thumb">';
|
87 |
-
|
88 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
89 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
90 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
91 |
-
echo ' px</p>';
|
92 |
-
|
93 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
94 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
95 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
96 |
-
echo '</select></p>';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
99 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
100 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
101 |
-
echo '</select></p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
105 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
110 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '</div>'; // thumbnail tab
|
114 |
-
echo '<div id="gmw-lightbox">';
|
115 |
-
|
116 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
117 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
118 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
119 |
-
echo ' px</p>';
|
120 |
-
|
121 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
122 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
123 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
124 |
-
echo '</select></p>';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
127 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
128 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
129 |
-
echo '</select></p>';
|
130 |
-
|
131 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
132 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
133 |
-
echo '</p>';
|
134 |
-
|
135 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
136 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
137 |
-
|
138 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
139 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
140 |
-
|
141 |
-
echo '</div>'; // lightbox tab
|
142 |
-
echo '</div>'; // tabs
|
143 |
-
}
|
144 |
-
|
145 |
-
function update($new_instance, $old_instance) {
|
146 |
-
$instance = $old_instance;
|
147 |
-
|
148 |
-
$instance['title'] = $new_instance['title'];
|
149 |
-
$instance['address'] = $new_instance['address'];
|
150 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
151 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
152 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
153 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
154 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
155 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
156 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
157 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
158 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
159 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
160 |
-
$instance['lightbox_bubble'] = (int) @$new_instance['lightbox_bubble'];
|
161 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
162 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
163 |
-
|
164 |
-
return $instance;
|
165 |
-
}
|
166 |
-
|
167 |
-
function widget($args, $instance) {
|
168 |
-
$out = $tmp = '';
|
169 |
-
|
170 |
-
extract($args, EXTR_SKIP);
|
171 |
-
self::$widgets[] = array('title' => $instance['title'],
|
172 |
-
'width' => $instance['lightbox_width'],
|
173 |
-
'height' => $instance['lightbox_height'],
|
174 |
-
'footer' => $instance['lightbox_footer'],
|
175 |
-
'header' => $instance['lightbox_header'],
|
176 |
-
'address' => $instance['address'],
|
177 |
-
'zoom' => $instance['lightbox_zoom'],
|
178 |
-
'type' => $instance['lightbox_type'],
|
179 |
-
'bubble' => $instance['lightbox_bubble'],
|
180 |
-
'id' => $widget_id);
|
181 |
-
|
182 |
-
$out .= $before_widget;
|
183 |
-
|
184 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
185 |
-
if (!empty($title)) {
|
186 |
-
$out .= $before_title . $title . $after_title;
|
187 |
-
}
|
188 |
-
|
189 |
-
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
190 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
191 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
192 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
193 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
194 |
-
urlencode($instance['address']) . '"></a>';
|
195 |
-
$tmp .= '</p>';
|
196 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
197 |
-
|
198 |
-
$out .= $after_widget;
|
199 |
-
|
200 |
-
echo $out;
|
201 |
-
}
|
202 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.2/google-maps-widget.php
DELETED
@@ -1,170 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.2
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
define('GOOGLE_MAPS_WIDGET_CORE_VER', '0.2');
|
17 |
-
require_once 'gmw-widget.php';
|
18 |
-
|
19 |
-
class GMW {
|
20 |
-
function init() {
|
21 |
-
if (is_admin()) {
|
22 |
-
// check if minimal required WP version is used
|
23 |
-
self::check_wp_version(3.2);
|
24 |
-
|
25 |
-
// aditional links in plugin description
|
26 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
27 |
-
array(__CLASS__, 'plugin_action_links'));
|
28 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
29 |
-
|
30 |
-
// enqueue admin scripts
|
31 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
32 |
-
} else {
|
33 |
-
// enqueue frontend scripts
|
34 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
35 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
36 |
-
}
|
37 |
-
} // init
|
38 |
-
|
39 |
-
|
40 |
-
// initialize widgets
|
41 |
-
function widgets_init() {
|
42 |
-
register_widget('GoogleMapsWidget');
|
43 |
-
} // widgets_init
|
44 |
-
|
45 |
-
|
46 |
-
// add settings link to plugins page
|
47 |
-
function plugin_action_links($links) {
|
48 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
49 |
-
array_unshift($links, $settings_link);
|
50 |
-
|
51 |
-
return $links;
|
52 |
-
} // plugin_action_links
|
53 |
-
|
54 |
-
|
55 |
-
// add links to plugin's description in plugins table
|
56 |
-
function plugin_meta_links($links, $file) {
|
57 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
58 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
59 |
-
|
60 |
-
if ($file == plugin_basename(__FILE__)) {
|
61 |
-
//$links[] = $documentation_link;
|
62 |
-
$links[] = $support_link;
|
63 |
-
}
|
64 |
-
|
65 |
-
return $links;
|
66 |
-
} // plugin_meta_links
|
67 |
-
|
68 |
-
|
69 |
-
// check if user has the minimal WP version required by the plugin
|
70 |
-
function check_wp_version($min_version) {
|
71 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
72 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
73 |
-
}
|
74 |
-
} // check_wp_version
|
75 |
-
|
76 |
-
|
77 |
-
// display error message if WP version is too low
|
78 |
-
function min_version_error() {
|
79 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
80 |
-
} // min_version_error
|
81 |
-
|
82 |
-
|
83 |
-
// print dialogs markup in footer
|
84 |
-
function dialogs_markup() {
|
85 |
-
$out = '';
|
86 |
-
$widgets = GoogleMapsWidget::$widgets;
|
87 |
-
|
88 |
-
if (!$widgets) {
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
|
92 |
-
foreach ($widgets as $widget) {
|
93 |
-
if ($widget['bubble']) {
|
94 |
-
$iwloc = 'addr';
|
95 |
-
} else {
|
96 |
-
$iwloc = 'near';
|
97 |
-
}
|
98 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-iframe-url="http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['zoom']) . '" id="dialog-' . $widget['id'] . '" title="' . $widget['title'] . '">';
|
99 |
-
if ($widget['header']) {
|
100 |
-
$out .= '<div class="gmw-header" style="padding: 5px;"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
101 |
-
}
|
102 |
-
$out .= '<div class="gmw-map"></div>';
|
103 |
-
if ($widget['footer']) {
|
104 |
-
$out .= '<div class="gmw-footer" style="padding: 5px;"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
105 |
-
}
|
106 |
-
$out .= "</div>\n";
|
107 |
-
} // foreach $widgets
|
108 |
-
|
109 |
-
echo $out;
|
110 |
-
} // run_scroller
|
111 |
-
|
112 |
-
|
113 |
-
// enqueue frontend scripts if necessary
|
114 |
-
function enqueue_scripts() {
|
115 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
116 |
-
wp_enqueue_style('wp-jquery-ui-dialog');
|
117 |
-
wp_enqueue_script('jquery-ui-dialog');
|
118 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), '1.0');
|
119 |
-
}
|
120 |
-
} // enqueue_scripts
|
121 |
-
|
122 |
-
|
123 |
-
// enqueue CSS and JS scripts on widgets page
|
124 |
-
function admin_enqueue_scripts() {
|
125 |
-
if (self::is_plugin_admin_page()) {
|
126 |
-
$plugin_url = plugin_dir_url(__FILE__);
|
127 |
-
|
128 |
-
wp_enqueue_script('jquery-ui-tabs');
|
129 |
-
wp_enqueue_script('gmw-admin', $plugin_url . 'js/gmw-admin.js', array(), '1.0', true);
|
130 |
-
wp_enqueue_style('gmw-admin', $plugin_url . 'css/gmw-admin.css', array(), '1.0');
|
131 |
-
} // if
|
132 |
-
} // admin_enqueue_scripts
|
133 |
-
|
134 |
-
|
135 |
-
// check if plugin's admin page is shown
|
136 |
-
function is_plugin_admin_page() {
|
137 |
-
$current_screen = get_current_screen();
|
138 |
-
|
139 |
-
if ($current_screen->id == 'widgets') {
|
140 |
-
return true;
|
141 |
-
} else {
|
142 |
-
return false;
|
143 |
-
}
|
144 |
-
} // is_plugin_admin_page
|
145 |
-
|
146 |
-
|
147 |
-
// helper function for creating dropdowns
|
148 |
-
function create_select_options($options, $selected = null, $output = true) {
|
149 |
-
$out = "\n";
|
150 |
-
|
151 |
-
foreach ($options as $tmp) {
|
152 |
-
if ($selected == $tmp['val']) {
|
153 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
154 |
-
} else {
|
155 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
156 |
-
}
|
157 |
-
} // foreach
|
158 |
-
|
159 |
-
if ($output) {
|
160 |
-
echo $out;
|
161 |
-
} else {
|
162 |
-
return $out;
|
163 |
-
}
|
164 |
-
} // create_select_options
|
165 |
-
} // class GMW
|
166 |
-
|
167 |
-
|
168 |
-
// hook everything up
|
169 |
-
add_action('init', array('GMW', 'init'));
|
170 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.2/js/gmw-admin.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').tabs();
|
8 |
-
|
9 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
10 |
-
$('.gmw-tabs').tabs();
|
11 |
-
});
|
12 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.2/js/gmw.js
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.google-maps-widget a.widget-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
|
12 |
-
dialog.dialog('option', {'minWidth': map_width, 'minHeight': map_height,} ).dialog('open');
|
13 |
-
|
14 |
-
return false;
|
15 |
-
});
|
16 |
-
|
17 |
-
$('.gmw-dialog').dialog({ 'dialogClass': 'wp-dialog',
|
18 |
-
'modal': true,
|
19 |
-
'resizable': false,
|
20 |
-
'zIndex': 9999,
|
21 |
-
'minWidth': 550,
|
22 |
-
'minHeight': 550,
|
23 |
-
'hide': 'fade',
|
24 |
-
'open': function(event, ui) { renderMap(event, ui); fixDialogClose(event, ui); },
|
25 |
-
'show': 'fade',
|
26 |
-
'autoOpen': false,
|
27 |
-
'closeOnEscape': true
|
28 |
-
});
|
29 |
-
}); // onload
|
30 |
-
|
31 |
-
function renderMap(event, ui) {
|
32 |
-
dialog_id = '#' + event.target.id;
|
33 |
-
map_url = jQuery(dialog_id).attr('data-iframe-url');
|
34 |
-
map_width = jQuery(dialog_id).attr('data-map-width');
|
35 |
-
map_height = jQuery(dialog_id).attr('data-map-height');
|
36 |
-
|
37 |
-
jQuery('.gmw-map', dialog_id).html('<iframe width="' + map_width + '" height="' + map_height + '" src="' + map_url + '"></iframe>');
|
38 |
-
} // renderMap
|
39 |
-
|
40 |
-
function fixDialogClose(event, ui) {
|
41 |
-
jQuery('.ui-widget-overlay').on('click', function(){ jQuery('.gmw-dialog').dialog('close'); });
|
42 |
-
} // fixDialogClose
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.2/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.2/readme.txt
DELETED
@@ -1,105 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.2
|
9 |
-
|
10 |
-
Display a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
More features, videos and demos are coming in a few days! Till then here's the widget's features list:
|
15 |
-
|
16 |
-
**General widget options**
|
17 |
-
|
18 |
-
* title
|
19 |
-
* address
|
20 |
-
|
21 |
-
**Thumbnail map options**
|
22 |
-
|
23 |
-
* map size - width & height
|
24 |
-
* map type - road, satellite, map or hybrid
|
25 |
-
* pin color
|
26 |
-
* pin size
|
27 |
-
* zoom level
|
28 |
-
|
29 |
-
**Lightbox map options**
|
30 |
-
|
31 |
-
* map size - width & height
|
32 |
-
* map type - road, satellite, map or hybrid
|
33 |
-
* zoom level
|
34 |
-
* show/hide address bubble
|
35 |
-
* header text
|
36 |
-
* footer text
|
37 |
-
|
38 |
-
There are no additional JS libraries included; GMW uses jQuery and jQuery UI Dialog bundled with WP. There are also no extra CSS files included. We do plan to add them in the future to provide map and dialog themes.
|
39 |
-
|
40 |
-
== Installation ==
|
41 |
-
|
42 |
-
Follow the usual routine;
|
43 |
-
|
44 |
-
1. Download the plugin.
|
45 |
-
2. Unzip it and upload to wp-content/plugin/
|
46 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
47 |
-
4. Configure the plugin under Appearance - Widgets
|
48 |
-
|
49 |
-
|
50 |
-
== Frequently Asked Questions ==
|
51 |
-
|
52 |
-
= Who is this plugin for? =
|
53 |
-
|
54 |
-
For just about anyone who needs a map on their site.
|
55 |
-
|
56 |
-
= It's not working!!! Arrrrrrrrr =
|
57 |
-
|
58 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
59 |
-
If you can figure it out open a thread in the support forums.
|
60 |
-
|
61 |
-
== Screenshots ==
|
62 |
-
|
63 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
64 |
-
2. Larger map with all features is available in the lightbox
|
65 |
-
3. Widget options - thumbnail map
|
66 |
-
4. Widget options - lightbox map
|
67 |
-
|
68 |
-
== Changelog ==
|
69 |
-
|
70 |
-
= 0.2 =
|
71 |
-
* 2012/08/28
|
72 |
-
* Complete GUI rewrite
|
73 |
-
* Added header text option
|
74 |
-
* Added address bubble visibility option
|
75 |
-
* Fixed thumbnail map scaling bug
|
76 |
-
* Fixed lightbox map size bug
|
77 |
-
|
78 |
-
= 0.13 =
|
79 |
-
* 2012/08/09
|
80 |
-
* Added pin size for thumbnail map
|
81 |
-
|
82 |
-
= 0.12 =
|
83 |
-
* 2012/08/07
|
84 |
-
* Added pin color for thumbnail map
|
85 |
-
* Fixed a few minor bugs
|
86 |
-
|
87 |
-
= 0.11 =
|
88 |
-
* 2012/08/06
|
89 |
-
* Fixed a few minor bugs
|
90 |
-
|
91 |
-
= 0.1 =
|
92 |
-
* 2012/08/03
|
93 |
-
* Initial release
|
94 |
-
|
95 |
-
|
96 |
-
== Upgrade Notice ==
|
97 |
-
|
98 |
-
= 0.2 =
|
99 |
-
Due to variable name change footer text will be reset
|
100 |
-
|
101 |
-
= 0.1x =
|
102 |
-
Upgrade without any fear :)
|
103 |
-
|
104 |
-
= 0.1 =
|
105 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.2/screenshot-1.png
DELETED
Binary file
|
tags/0.2/screenshot-2.png
DELETED
Binary file
|
tags/0.2/screenshot-3.png
DELETED
Binary file
|
tags/0.2/screenshot-4.png
DELETED
Binary file
|
tags/0.21/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.21/gmw-widget.php
DELETED
@@ -1,202 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_header' => '',
|
32 |
-
'lightbox_footer' => ''));
|
33 |
-
|
34 |
-
$title = $instance['title'];
|
35 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
36 |
-
$lightbox_header = $instance['lightbox_header'];
|
37 |
-
$address = $instance['address'];
|
38 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
39 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
40 |
-
$thumb_width = $instance['thumb_width'];
|
41 |
-
$thumb_height = $instance['thumb_height'];
|
42 |
-
$thumb_type = $instance['thumb_type'];
|
43 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
44 |
-
$lightbox_width = $instance['lightbox_width'];
|
45 |
-
$lightbox_height = $instance['lightbox_height'];
|
46 |
-
$lightbox_type = $instance['lightbox_type'];
|
47 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
48 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
49 |
-
|
50 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
51 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
52 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
53 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
54 |
-
|
55 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
56 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
57 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
58 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
59 |
-
|
60 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
61 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
62 |
-
array('val' => 'green', 'label' => 'Green'),
|
63 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
64 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
65 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
66 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
67 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
68 |
-
array('val' => 'red', 'label' => 'Red'),
|
69 |
-
array('val' => 'white', 'label' => 'White'));
|
70 |
-
|
71 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
72 |
-
array('val' => 'small', 'label' => 'Small'),
|
73 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
74 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
75 |
-
|
76 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
77 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
78 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
79 |
-
}
|
80 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
81 |
-
|
82 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
83 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
84 |
-
|
85 |
-
echo '<div class="gmw-tabs"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
86 |
-
echo '<div id="gmw-thumb">';
|
87 |
-
|
88 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
89 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
90 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
91 |
-
echo ' px</p>';
|
92 |
-
|
93 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
94 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
95 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
96 |
-
echo '</select></p>';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
99 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
100 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
101 |
-
echo '</select></p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
105 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
110 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '</div>'; // thumbnail tab
|
114 |
-
echo '<div id="gmw-lightbox">';
|
115 |
-
|
116 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
117 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
118 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
119 |
-
echo ' px</p>';
|
120 |
-
|
121 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
122 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
123 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
124 |
-
echo '</select></p>';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
127 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
128 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
129 |
-
echo '</select></p>';
|
130 |
-
|
131 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
132 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
133 |
-
echo '</p>';
|
134 |
-
|
135 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
136 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
137 |
-
|
138 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
139 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
140 |
-
|
141 |
-
echo '</div>'; // lightbox tab
|
142 |
-
echo '</div>'; // tabs
|
143 |
-
}
|
144 |
-
|
145 |
-
function update($new_instance, $old_instance) {
|
146 |
-
$instance = $old_instance;
|
147 |
-
|
148 |
-
$instance['title'] = $new_instance['title'];
|
149 |
-
$instance['address'] = $new_instance['address'];
|
150 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
151 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
152 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
153 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
154 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
155 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
156 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
157 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
158 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
159 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
160 |
-
$instance['lightbox_bubble'] = (int) @$new_instance['lightbox_bubble'];
|
161 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
162 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
163 |
-
|
164 |
-
return $instance;
|
165 |
-
}
|
166 |
-
|
167 |
-
function widget($args, $instance) {
|
168 |
-
$out = $tmp = '';
|
169 |
-
|
170 |
-
extract($args, EXTR_SKIP);
|
171 |
-
self::$widgets[] = array('title' => $instance['title'],
|
172 |
-
'width' => $instance['lightbox_width'],
|
173 |
-
'height' => $instance['lightbox_height'],
|
174 |
-
'footer' => $instance['lightbox_footer'],
|
175 |
-
'header' => $instance['lightbox_header'],
|
176 |
-
'address' => $instance['address'],
|
177 |
-
'zoom' => $instance['lightbox_zoom'],
|
178 |
-
'type' => $instance['lightbox_type'],
|
179 |
-
'bubble' => $instance['lightbox_bubble'],
|
180 |
-
'id' => $widget_id);
|
181 |
-
|
182 |
-
$out .= $before_widget;
|
183 |
-
|
184 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
185 |
-
if (!empty($title)) {
|
186 |
-
$out .= $before_title . $title . $after_title;
|
187 |
-
}
|
188 |
-
|
189 |
-
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
190 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
191 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
192 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
193 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
194 |
-
urlencode($instance['address']) . '"></a>';
|
195 |
-
$tmp .= '</p>';
|
196 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
197 |
-
|
198 |
-
$out .= $after_widget;
|
199 |
-
|
200 |
-
echo $out;
|
201 |
-
}
|
202 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.21/google-maps-widget.php
DELETED
@@ -1,170 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.21
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
define('GOOGLE_MAPS_WIDGET_CORE_VER', '0.2');
|
17 |
-
require_once 'gmw-widget.php';
|
18 |
-
|
19 |
-
class GMW {
|
20 |
-
function init() {
|
21 |
-
if (is_admin()) {
|
22 |
-
// check if minimal required WP version is used
|
23 |
-
self::check_wp_version(3.2);
|
24 |
-
|
25 |
-
// aditional links in plugin description
|
26 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
27 |
-
array(__CLASS__, 'plugin_action_links'));
|
28 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
29 |
-
|
30 |
-
// enqueue admin scripts
|
31 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
32 |
-
} else {
|
33 |
-
// enqueue frontend scripts
|
34 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
35 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
36 |
-
}
|
37 |
-
} // init
|
38 |
-
|
39 |
-
|
40 |
-
// initialize widgets
|
41 |
-
function widgets_init() {
|
42 |
-
register_widget('GoogleMapsWidget');
|
43 |
-
} // widgets_init
|
44 |
-
|
45 |
-
|
46 |
-
// add settings link to plugins page
|
47 |
-
function plugin_action_links($links) {
|
48 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
49 |
-
array_unshift($links, $settings_link);
|
50 |
-
|
51 |
-
return $links;
|
52 |
-
} // plugin_action_links
|
53 |
-
|
54 |
-
|
55 |
-
// add links to plugin's description in plugins table
|
56 |
-
function plugin_meta_links($links, $file) {
|
57 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
58 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
59 |
-
|
60 |
-
if ($file == plugin_basename(__FILE__)) {
|
61 |
-
//$links[] = $documentation_link;
|
62 |
-
$links[] = $support_link;
|
63 |
-
}
|
64 |
-
|
65 |
-
return $links;
|
66 |
-
} // plugin_meta_links
|
67 |
-
|
68 |
-
|
69 |
-
// check if user has the minimal WP version required by the plugin
|
70 |
-
function check_wp_version($min_version) {
|
71 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
72 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
73 |
-
}
|
74 |
-
} // check_wp_version
|
75 |
-
|
76 |
-
|
77 |
-
// display error message if WP version is too low
|
78 |
-
function min_version_error() {
|
79 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
80 |
-
} // min_version_error
|
81 |
-
|
82 |
-
|
83 |
-
// print dialogs markup in footer
|
84 |
-
function dialogs_markup() {
|
85 |
-
$out = '';
|
86 |
-
$widgets = GoogleMapsWidget::$widgets;
|
87 |
-
|
88 |
-
if (!$widgets) {
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
|
92 |
-
foreach ($widgets as $widget) {
|
93 |
-
if ($widget['bubble']) {
|
94 |
-
$iwloc = 'addr';
|
95 |
-
} else {
|
96 |
-
$iwloc = 'near';
|
97 |
-
}
|
98 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-iframe-url="http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['zoom']) . '" id="dialog-' . $widget['id'] . '" title="' . $widget['title'] . '">';
|
99 |
-
if ($widget['header']) {
|
100 |
-
$out .= '<div class="gmw-header" style="padding: 5px;"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
101 |
-
}
|
102 |
-
$out .= '<div class="gmw-map"></div>';
|
103 |
-
if ($widget['footer']) {
|
104 |
-
$out .= '<div class="gmw-footer" style="padding: 5px;"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
105 |
-
}
|
106 |
-
$out .= "</div>\n";
|
107 |
-
} // foreach $widgets
|
108 |
-
|
109 |
-
echo $out;
|
110 |
-
} // run_scroller
|
111 |
-
|
112 |
-
|
113 |
-
// enqueue frontend scripts if necessary
|
114 |
-
function enqueue_scripts() {
|
115 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
116 |
-
wp_enqueue_style('wp-jquery-ui-dialog');
|
117 |
-
wp_enqueue_script('jquery-ui-dialog');
|
118 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), '1.0');
|
119 |
-
}
|
120 |
-
} // enqueue_scripts
|
121 |
-
|
122 |
-
|
123 |
-
// enqueue CSS and JS scripts on widgets page
|
124 |
-
function admin_enqueue_scripts() {
|
125 |
-
if (self::is_plugin_admin_page()) {
|
126 |
-
$plugin_url = plugin_dir_url(__FILE__);
|
127 |
-
|
128 |
-
wp_enqueue_script('jquery-ui-tabs');
|
129 |
-
wp_enqueue_script('gmw-admin', $plugin_url . 'js/gmw-admin.js', array(), '1.0', true);
|
130 |
-
wp_enqueue_style('gmw-admin', $plugin_url . 'css/gmw-admin.css', array(), '1.0');
|
131 |
-
} // if
|
132 |
-
} // admin_enqueue_scripts
|
133 |
-
|
134 |
-
|
135 |
-
// check if plugin's admin page is shown
|
136 |
-
function is_plugin_admin_page() {
|
137 |
-
$current_screen = get_current_screen();
|
138 |
-
|
139 |
-
if ($current_screen->id == 'widgets') {
|
140 |
-
return true;
|
141 |
-
} else {
|
142 |
-
return false;
|
143 |
-
}
|
144 |
-
} // is_plugin_admin_page
|
145 |
-
|
146 |
-
|
147 |
-
// helper function for creating dropdowns
|
148 |
-
function create_select_options($options, $selected = null, $output = true) {
|
149 |
-
$out = "\n";
|
150 |
-
|
151 |
-
foreach ($options as $tmp) {
|
152 |
-
if ($selected == $tmp['val']) {
|
153 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
154 |
-
} else {
|
155 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
156 |
-
}
|
157 |
-
} // foreach
|
158 |
-
|
159 |
-
if ($output) {
|
160 |
-
echo $out;
|
161 |
-
} else {
|
162 |
-
return $out;
|
163 |
-
}
|
164 |
-
} // create_select_options
|
165 |
-
} // class GMW
|
166 |
-
|
167 |
-
|
168 |
-
// hook everything up
|
169 |
-
add_action('init', array('GMW', 'init'));
|
170 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.21/js/gmw-admin.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').tabs();
|
8 |
-
|
9 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
10 |
-
$('.gmw-tabs').tabs();
|
11 |
-
});
|
12 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.21/js/gmw.js
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.google-maps-widget a.widget-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
|
12 |
-
dialog.dialog('option', {'minWidth': map_width, 'minHeight': map_height,} ).dialog('open');
|
13 |
-
|
14 |
-
return false;
|
15 |
-
});
|
16 |
-
|
17 |
-
$('.gmw-dialog').dialog({ 'dialogClass': 'wp-dialog',
|
18 |
-
'modal': true,
|
19 |
-
'resizable': false,
|
20 |
-
'zIndex': 9999,
|
21 |
-
'minWidth': 550,
|
22 |
-
'minHeight': 550,
|
23 |
-
'hide': 'fade',
|
24 |
-
'open': function(event, ui) { renderMap(event, ui); fixDialogClose(event, ui); },
|
25 |
-
'show': 'fade',
|
26 |
-
'autoOpen': false,
|
27 |
-
'closeOnEscape': true
|
28 |
-
});
|
29 |
-
}); // onload
|
30 |
-
|
31 |
-
function renderMap(event, ui) {
|
32 |
-
dialog_id = '#' + event.target.id;
|
33 |
-
map_url = jQuery(dialog_id).attr('data-iframe-url');
|
34 |
-
map_width = jQuery(dialog_id).attr('data-map-width');
|
35 |
-
map_height = jQuery(dialog_id).attr('data-map-height');
|
36 |
-
|
37 |
-
jQuery('.gmw-map', dialog_id).html('<iframe width="' + map_width + '" height="' + map_height + '" src="' + map_url + '"></iframe>');
|
38 |
-
} // renderMap
|
39 |
-
|
40 |
-
function fixDialogClose(event, ui) {
|
41 |
-
jQuery('.ui-widget-overlay').on('click', function(){ jQuery('.gmw-dialog').dialog('close'); });
|
42 |
-
} // fixDialogClose
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.21/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.21/readme.txt
DELETED
@@ -1,105 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.21
|
9 |
-
|
10 |
-
Display a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
More features, videos and demos are coming in a few days! Till then here's the widget's features list. Give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
**General widget options**
|
17 |
-
|
18 |
-
* title
|
19 |
-
* address
|
20 |
-
|
21 |
-
**Thumbnail map options**
|
22 |
-
|
23 |
-
* map size - width & height
|
24 |
-
* map type - road, satellite, map or hybrid
|
25 |
-
* pin color
|
26 |
-
* pin size
|
27 |
-
* zoom level
|
28 |
-
|
29 |
-
**Lightbox map options**
|
30 |
-
|
31 |
-
* map size - width & height
|
32 |
-
* map type - road, satellite, map or hybrid
|
33 |
-
* zoom level
|
34 |
-
* show/hide address bubble
|
35 |
-
* header text
|
36 |
-
* footer text
|
37 |
-
|
38 |
-
There are no additional JS libraries included; GMW uses jQuery and jQuery UI Dialog bundled with WP. There are also no extra CSS files included. We do plan to add them in the future to provide map and dialog themes.
|
39 |
-
|
40 |
-
== Installation ==
|
41 |
-
|
42 |
-
Follow the usual routine;
|
43 |
-
|
44 |
-
1. Download the plugin.
|
45 |
-
2. Unzip it and upload to wp-content/plugin/
|
46 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
47 |
-
4. Configure the plugin under Appearance - Widgets
|
48 |
-
|
49 |
-
|
50 |
-
== Frequently Asked Questions ==
|
51 |
-
|
52 |
-
= Who is this plugin for? =
|
53 |
-
|
54 |
-
For just about anyone who needs a map on their site.
|
55 |
-
|
56 |
-
= It's not working!!! Arrrrrrrrr =
|
57 |
-
|
58 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
59 |
-
If you can figure it out open a thread in the support forums.
|
60 |
-
|
61 |
-
== Screenshots ==
|
62 |
-
|
63 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
64 |
-
2. Larger map with all features is available in the lightbox
|
65 |
-
3. Widget options - thumbnail map
|
66 |
-
4. Widget options - lightbox map
|
67 |
-
|
68 |
-
== Changelog ==
|
69 |
-
|
70 |
-
= 0.2 =
|
71 |
-
* 2012/08/28
|
72 |
-
* Complete GUI rewrite
|
73 |
-
* Added header text option
|
74 |
-
* Added address bubble visibility option
|
75 |
-
* Fixed thumbnail map scaling bug
|
76 |
-
* Fixed lightbox map size bug
|
77 |
-
|
78 |
-
= 0.13 =
|
79 |
-
* 2012/08/09
|
80 |
-
* Added pin size for thumbnail map
|
81 |
-
|
82 |
-
= 0.12 =
|
83 |
-
* 2012/08/07
|
84 |
-
* Added pin color for thumbnail map
|
85 |
-
* Fixed a few minor bugs
|
86 |
-
|
87 |
-
= 0.11 =
|
88 |
-
* 2012/08/06
|
89 |
-
* Fixed a few minor bugs
|
90 |
-
|
91 |
-
= 0.1 =
|
92 |
-
* 2012/08/03
|
93 |
-
* Initial release
|
94 |
-
|
95 |
-
|
96 |
-
== Upgrade Notice ==
|
97 |
-
|
98 |
-
= 0.2 =
|
99 |
-
Due to variable name change footer text will be reset
|
100 |
-
|
101 |
-
= 0.1x =
|
102 |
-
Upgrade without any fear :)
|
103 |
-
|
104 |
-
= 0.1 =
|
105 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.21/screenshot-1.png
DELETED
Binary file
|
tags/0.21/screenshot-2.png
DELETED
Binary file
|
tags/0.21/screenshot-3.png
DELETED
Binary file
|
tags/0.21/screenshot-4.png
DELETED
Binary file
|
tags/0.22/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.22/gmw-widget.php
DELETED
@@ -1,202 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_header' => '',
|
32 |
-
'lightbox_footer' => ''));
|
33 |
-
|
34 |
-
$title = $instance['title'];
|
35 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
36 |
-
$lightbox_header = $instance['lightbox_header'];
|
37 |
-
$address = $instance['address'];
|
38 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
39 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
40 |
-
$thumb_width = $instance['thumb_width'];
|
41 |
-
$thumb_height = $instance['thumb_height'];
|
42 |
-
$thumb_type = $instance['thumb_type'];
|
43 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
44 |
-
$lightbox_width = $instance['lightbox_width'];
|
45 |
-
$lightbox_height = $instance['lightbox_height'];
|
46 |
-
$lightbox_type = $instance['lightbox_type'];
|
47 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
48 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
49 |
-
|
50 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
51 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
52 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
53 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
54 |
-
|
55 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
56 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
57 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
58 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
59 |
-
|
60 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
61 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
62 |
-
array('val' => 'green', 'label' => 'Green'),
|
63 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
64 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
65 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
66 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
67 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
68 |
-
array('val' => 'red', 'label' => 'Red'),
|
69 |
-
array('val' => 'white', 'label' => 'White'));
|
70 |
-
|
71 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
72 |
-
array('val' => 'small', 'label' => 'Small'),
|
73 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
74 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
75 |
-
|
76 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
77 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
78 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
79 |
-
}
|
80 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
81 |
-
|
82 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
83 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
84 |
-
|
85 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
86 |
-
echo '<div id="gmw-thumb">';
|
87 |
-
|
88 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
89 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
90 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
91 |
-
echo ' px</p>';
|
92 |
-
|
93 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
94 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
95 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
96 |
-
echo '</select></p>';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
99 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
100 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
101 |
-
echo '</select></p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
105 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
110 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '</div>'; // thumbnail tab
|
114 |
-
echo '<div id="gmw-lightbox">';
|
115 |
-
|
116 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
117 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
118 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
119 |
-
echo ' px</p>';
|
120 |
-
|
121 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
122 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
123 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
124 |
-
echo '</select></p>';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
127 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
128 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
129 |
-
echo '</select></p>';
|
130 |
-
|
131 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
132 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
133 |
-
echo '</p>';
|
134 |
-
|
135 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
136 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
137 |
-
|
138 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
139 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
140 |
-
|
141 |
-
echo '</div>'; // lightbox tab
|
142 |
-
echo '</div>'; // tabs
|
143 |
-
}
|
144 |
-
|
145 |
-
function update($new_instance, $old_instance) {
|
146 |
-
$instance = $old_instance;
|
147 |
-
|
148 |
-
$instance['title'] = $new_instance['title'];
|
149 |
-
$instance['address'] = $new_instance['address'];
|
150 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
151 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
152 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
153 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
154 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
155 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
156 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
157 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
158 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
159 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
160 |
-
$instance['lightbox_bubble'] = (int) @$new_instance['lightbox_bubble'];
|
161 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
162 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
163 |
-
|
164 |
-
return $instance;
|
165 |
-
}
|
166 |
-
|
167 |
-
function widget($args, $instance) {
|
168 |
-
$out = $tmp = '';
|
169 |
-
|
170 |
-
extract($args, EXTR_SKIP);
|
171 |
-
self::$widgets[] = array('title' => $instance['title'],
|
172 |
-
'width' => $instance['lightbox_width'],
|
173 |
-
'height' => $instance['lightbox_height'],
|
174 |
-
'footer' => $instance['lightbox_footer'],
|
175 |
-
'header' => $instance['lightbox_header'],
|
176 |
-
'address' => $instance['address'],
|
177 |
-
'zoom' => $instance['lightbox_zoom'],
|
178 |
-
'type' => $instance['lightbox_type'],
|
179 |
-
'bubble' => $instance['lightbox_bubble'],
|
180 |
-
'id' => $widget_id);
|
181 |
-
|
182 |
-
$out .= $before_widget;
|
183 |
-
|
184 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
185 |
-
if (!empty($title)) {
|
186 |
-
$out .= $before_title . $title . $after_title;
|
187 |
-
}
|
188 |
-
|
189 |
-
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
190 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
191 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
192 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
193 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
194 |
-
urlencode($instance['address']) . '"></a>';
|
195 |
-
$tmp .= '</p>';
|
196 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
197 |
-
|
198 |
-
$out .= $after_widget;
|
199 |
-
|
200 |
-
echo $out;
|
201 |
-
}
|
202 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.22/google-maps-widget.php
DELETED
@@ -1,171 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.22
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
define('GOOGLE_MAPS_WIDGET_CORE_VER', '0.2');
|
17 |
-
require_once 'gmw-widget.php';
|
18 |
-
|
19 |
-
class GMW {
|
20 |
-
function init() {
|
21 |
-
if (is_admin()) {
|
22 |
-
// check if minimal required WP version is used
|
23 |
-
self::check_wp_version(3.2);
|
24 |
-
|
25 |
-
// aditional links in plugin description
|
26 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
27 |
-
array(__CLASS__, 'plugin_action_links'));
|
28 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
29 |
-
|
30 |
-
// enqueue admin scripts
|
31 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
32 |
-
} else {
|
33 |
-
// enqueue frontend scripts
|
34 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
35 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
36 |
-
}
|
37 |
-
} // init
|
38 |
-
|
39 |
-
|
40 |
-
// initialize widgets
|
41 |
-
function widgets_init() {
|
42 |
-
register_widget('GoogleMapsWidget');
|
43 |
-
} // widgets_init
|
44 |
-
|
45 |
-
|
46 |
-
// add settings link to plugins page
|
47 |
-
function plugin_action_links($links) {
|
48 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
49 |
-
array_unshift($links, $settings_link);
|
50 |
-
|
51 |
-
return $links;
|
52 |
-
} // plugin_action_links
|
53 |
-
|
54 |
-
|
55 |
-
// add links to plugin's description in plugins table
|
56 |
-
function plugin_meta_links($links, $file) {
|
57 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
58 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
59 |
-
|
60 |
-
if ($file == plugin_basename(__FILE__)) {
|
61 |
-
//$links[] = $documentation_link;
|
62 |
-
$links[] = $support_link;
|
63 |
-
}
|
64 |
-
|
65 |
-
return $links;
|
66 |
-
} // plugin_meta_links
|
67 |
-
|
68 |
-
|
69 |
-
// check if user has the minimal WP version required by the plugin
|
70 |
-
function check_wp_version($min_version) {
|
71 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
72 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
73 |
-
}
|
74 |
-
} // check_wp_version
|
75 |
-
|
76 |
-
|
77 |
-
// display error message if WP version is too low
|
78 |
-
function min_version_error() {
|
79 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
80 |
-
} // min_version_error
|
81 |
-
|
82 |
-
|
83 |
-
// print dialogs markup in footer
|
84 |
-
function dialogs_markup() {
|
85 |
-
$out = '';
|
86 |
-
$widgets = GoogleMapsWidget::$widgets;
|
87 |
-
|
88 |
-
if (!$widgets) {
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
|
92 |
-
foreach ($widgets as $widget) {
|
93 |
-
if ($widget['bubble']) {
|
94 |
-
$iwloc = 'addr';
|
95 |
-
} else {
|
96 |
-
$iwloc = 'near';
|
97 |
-
}
|
98 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-iframe-url="http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['zoom']) . '" id="dialog-' . $widget['id'] . '" title="' . $widget['title'] . '">';
|
99 |
-
if ($widget['header']) {
|
100 |
-
$out .= '<div class="gmw-header" style="padding: 5px;"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
101 |
-
}
|
102 |
-
$out .= '<div class="gmw-map"></div>';
|
103 |
-
if ($widget['footer']) {
|
104 |
-
$out .= '<div class="gmw-footer" style="padding: 5px;"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
105 |
-
}
|
106 |
-
$out .= "</div>\n";
|
107 |
-
} // foreach $widgets
|
108 |
-
|
109 |
-
echo $out;
|
110 |
-
} // run_scroller
|
111 |
-
|
112 |
-
|
113 |
-
// enqueue frontend scripts if necessary
|
114 |
-
function enqueue_scripts() {
|
115 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
116 |
-
wp_enqueue_style('wp-jquery-ui-dialog');
|
117 |
-
wp_enqueue_script('jquery-ui-dialog');
|
118 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), '1.0');
|
119 |
-
}
|
120 |
-
} // enqueue_scripts
|
121 |
-
|
122 |
-
|
123 |
-
// enqueue CSS and JS scripts on widgets page
|
124 |
-
function admin_enqueue_scripts() {
|
125 |
-
if (self::is_plugin_admin_page()) {
|
126 |
-
$plugin_url = plugin_dir_url(__FILE__);
|
127 |
-
|
128 |
-
wp_enqueue_script('jquery-ui-tabs');
|
129 |
-
wp_enqueue_script('sn-cookie', $plugin_url . 'js/jquery.cookie.js', array('jquery'), '1.0', true);
|
130 |
-
wp_enqueue_script('gmw-admin', $plugin_url . 'js/gmw-admin.js', array(), '1.0', true);
|
131 |
-
wp_enqueue_style('gmw-admin', $plugin_url . 'css/gmw-admin.css', array(), '1.0');
|
132 |
-
} // if
|
133 |
-
} // admin_enqueue_scripts
|
134 |
-
|
135 |
-
|
136 |
-
// check if plugin's admin page is shown
|
137 |
-
function is_plugin_admin_page() {
|
138 |
-
$current_screen = get_current_screen();
|
139 |
-
|
140 |
-
if ($current_screen->id == 'widgets') {
|
141 |
-
return true;
|
142 |
-
} else {
|
143 |
-
return false;
|
144 |
-
}
|
145 |
-
} // is_plugin_admin_page
|
146 |
-
|
147 |
-
|
148 |
-
// helper function for creating dropdowns
|
149 |
-
function create_select_options($options, $selected = null, $output = true) {
|
150 |
-
$out = "\n";
|
151 |
-
|
152 |
-
foreach ($options as $tmp) {
|
153 |
-
if ($selected == $tmp['val']) {
|
154 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
155 |
-
} else {
|
156 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
157 |
-
}
|
158 |
-
} // foreach
|
159 |
-
|
160 |
-
if ($output) {
|
161 |
-
echo $out;
|
162 |
-
} else {
|
163 |
-
return $out;
|
164 |
-
}
|
165 |
-
} // create_select_options
|
166 |
-
} // class GMW
|
167 |
-
|
168 |
-
|
169 |
-
// hook everything up
|
170 |
-
add_action('init', array('GMW', 'init'));
|
171 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.22/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.22/js/gmw.js
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.google-maps-widget a.widget-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
|
12 |
-
dialog.dialog('option', {'width': map_width, 'minHeight': map_height}).dialog('open');
|
13 |
-
|
14 |
-
return false;
|
15 |
-
});
|
16 |
-
|
17 |
-
$('.gmw-dialog').dialog({ 'dialogClass': 'wp-dialog',
|
18 |
-
'modal': true,
|
19 |
-
'resizable': false,
|
20 |
-
'zIndex': 9999,
|
21 |
-
'hide': 'fade',
|
22 |
-
'open': function(event, ui) { renderMap(event, ui); fixDialogClose(event, ui); },
|
23 |
-
'show': 'fade',
|
24 |
-
'autoOpen': false,
|
25 |
-
'closeOnEscape': true
|
26 |
-
});
|
27 |
-
}); // onload
|
28 |
-
|
29 |
-
function renderMap(event, ui) {
|
30 |
-
dialog_id = '#' + event.target.id;
|
31 |
-
map_url = jQuery(dialog_id).attr('data-iframe-url');
|
32 |
-
map_width = jQuery(dialog_id).attr('data-map-width');
|
33 |
-
map_height = jQuery(dialog_id).attr('data-map-height');
|
34 |
-
|
35 |
-
jQuery('.gmw-map', dialog_id).html('<iframe width="' + map_width + '" height="' + map_height + '" src="' + map_url + '"></iframe>');
|
36 |
-
} // renderMap
|
37 |
-
|
38 |
-
function fixDialogClose(event, ui) {
|
39 |
-
jQuery('.ui-widget-overlay').on('click', function(){ jQuery('.gmw-dialog').dialog('close'); });
|
40 |
-
} // fixDialogClose
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.22/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.22/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.22/readme.txt
DELETED
@@ -1,111 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.22
|
9 |
-
|
10 |
-
Display a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
More features, videos and demos are coming in a few days! Till then here's the widget's features list. Give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
**General widget options**
|
17 |
-
|
18 |
-
* title
|
19 |
-
* address
|
20 |
-
|
21 |
-
**Thumbnail map options**
|
22 |
-
|
23 |
-
* map size - width & height
|
24 |
-
* map type - road, satellite, map or hybrid
|
25 |
-
* pin color
|
26 |
-
* pin size
|
27 |
-
* zoom level
|
28 |
-
|
29 |
-
**Lightbox map options**
|
30 |
-
|
31 |
-
* map size - width & height
|
32 |
-
* map type - road, satellite, map or hybrid
|
33 |
-
* zoom level
|
34 |
-
* show/hide address bubble
|
35 |
-
* header text
|
36 |
-
* footer text
|
37 |
-
|
38 |
-
There are no additional JS libraries included; GMW uses jQuery and jQuery UI Dialog bundled with WP. There are also no extra CSS files included. We do plan to add them in the future to provide map and dialog themes.
|
39 |
-
|
40 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a href="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
41 |
-
|
42 |
-
== Installation ==
|
43 |
-
|
44 |
-
Follow the usual routine;
|
45 |
-
|
46 |
-
1. Download the plugin.
|
47 |
-
2. Unzip it and upload to wp-content/plugin/
|
48 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
49 |
-
4. Configure the plugin under Appearance - Widgets
|
50 |
-
|
51 |
-
|
52 |
-
== Frequently Asked Questions ==
|
53 |
-
|
54 |
-
= Who is this plugin for? =
|
55 |
-
|
56 |
-
For just about anyone who needs a map on their site.
|
57 |
-
|
58 |
-
= It's not working!!! Arrrrrrrrr =
|
59 |
-
|
60 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
61 |
-
If you can figure it out open a thread in the support forums.
|
62 |
-
|
63 |
-
== Screenshots ==
|
64 |
-
|
65 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
66 |
-
2. Larger map with all features is available in the lightbox
|
67 |
-
3. Widget options - thumbnail map
|
68 |
-
4. Widget options - lightbox map
|
69 |
-
|
70 |
-
== Changelog ==
|
71 |
-
|
72 |
-
= 0.22 =
|
73 |
-
* 2012/08/31
|
74 |
-
* Fixed small JS related GUI bug
|
75 |
-
|
76 |
-
= 0.2 =
|
77 |
-
* 2012/08/28
|
78 |
-
* Complete GUI rewrite
|
79 |
-
* Added header text option
|
80 |
-
* Added address bubble visibility option
|
81 |
-
* Fixed thumbnail map scaling bug
|
82 |
-
* Fixed lightbox map size bug
|
83 |
-
|
84 |
-
= 0.13 =
|
85 |
-
* 2012/08/09
|
86 |
-
* Added pin size for thumbnail map
|
87 |
-
|
88 |
-
= 0.12 =
|
89 |
-
* 2012/08/07
|
90 |
-
* Added pin color for thumbnail map
|
91 |
-
* Fixed a few minor bugs
|
92 |
-
|
93 |
-
= 0.11 =
|
94 |
-
* 2012/08/06
|
95 |
-
* Fixed a few minor bugs
|
96 |
-
|
97 |
-
= 0.1 =
|
98 |
-
* 2012/08/03
|
99 |
-
* Initial release
|
100 |
-
|
101 |
-
|
102 |
-
== Upgrade Notice ==
|
103 |
-
|
104 |
-
= 0.2 =
|
105 |
-
Due to variable name change footer text will be reset
|
106 |
-
|
107 |
-
= 0.1x =
|
108 |
-
Upgrade without any fear :)
|
109 |
-
|
110 |
-
= 0.1 =
|
111 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.22/screenshot-1.png
DELETED
Binary file
|
tags/0.22/screenshot-2.png
DELETED
Binary file
|
tags/0.22/screenshot-3.png
DELETED
Binary file
|
tags/0.22/screenshot-4.png
DELETED
Binary file
|
tags/0.23/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.23/gmw-widget.php
DELETED
@@ -1,202 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_header' => '',
|
32 |
-
'lightbox_footer' => ''));
|
33 |
-
|
34 |
-
$title = $instance['title'];
|
35 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
36 |
-
$lightbox_header = $instance['lightbox_header'];
|
37 |
-
$address = $instance['address'];
|
38 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
39 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
40 |
-
$thumb_width = $instance['thumb_width'];
|
41 |
-
$thumb_height = $instance['thumb_height'];
|
42 |
-
$thumb_type = $instance['thumb_type'];
|
43 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
44 |
-
$lightbox_width = $instance['lightbox_width'];
|
45 |
-
$lightbox_height = $instance['lightbox_height'];
|
46 |
-
$lightbox_type = $instance['lightbox_type'];
|
47 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
48 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
49 |
-
|
50 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
51 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
52 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
53 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
54 |
-
|
55 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
56 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
57 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
58 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
59 |
-
|
60 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
61 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
62 |
-
array('val' => 'green', 'label' => 'Green'),
|
63 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
64 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
65 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
66 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
67 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
68 |
-
array('val' => 'red', 'label' => 'Red'),
|
69 |
-
array('val' => 'white', 'label' => 'White'));
|
70 |
-
|
71 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
72 |
-
array('val' => 'small', 'label' => 'Small'),
|
73 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
74 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
75 |
-
|
76 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
77 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
78 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
79 |
-
}
|
80 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
81 |
-
|
82 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
83 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
84 |
-
|
85 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
86 |
-
echo '<div id="gmw-thumb">';
|
87 |
-
|
88 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
89 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
90 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
91 |
-
echo ' px</p>';
|
92 |
-
|
93 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
94 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
95 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
96 |
-
echo '</select></p>';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
99 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
100 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
101 |
-
echo '</select></p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
105 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
110 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '</div>'; // thumbnail tab
|
114 |
-
echo '<div id="gmw-lightbox">';
|
115 |
-
|
116 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
117 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
118 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
119 |
-
echo ' px</p>';
|
120 |
-
|
121 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
122 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
123 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
124 |
-
echo '</select></p>';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
127 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
128 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
129 |
-
echo '</select></p>';
|
130 |
-
|
131 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
132 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
133 |
-
echo '</p>';
|
134 |
-
|
135 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
136 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
137 |
-
|
138 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
139 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
140 |
-
|
141 |
-
echo '</div>'; // lightbox tab
|
142 |
-
echo '</div>'; // tabs
|
143 |
-
}
|
144 |
-
|
145 |
-
function update($new_instance, $old_instance) {
|
146 |
-
$instance = $old_instance;
|
147 |
-
|
148 |
-
$instance['title'] = $new_instance['title'];
|
149 |
-
$instance['address'] = $new_instance['address'];
|
150 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
151 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
152 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
153 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
154 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
155 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
156 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
157 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
158 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
159 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
160 |
-
$instance['lightbox_bubble'] = (int) @$new_instance['lightbox_bubble'];
|
161 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
162 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
163 |
-
|
164 |
-
return $instance;
|
165 |
-
}
|
166 |
-
|
167 |
-
function widget($args, $instance) {
|
168 |
-
$out = $tmp = '';
|
169 |
-
|
170 |
-
extract($args, EXTR_SKIP);
|
171 |
-
self::$widgets[] = array('title' => $instance['title'],
|
172 |
-
'width' => $instance['lightbox_width'],
|
173 |
-
'height' => $instance['lightbox_height'],
|
174 |
-
'footer' => $instance['lightbox_footer'],
|
175 |
-
'header' => $instance['lightbox_header'],
|
176 |
-
'address' => $instance['address'],
|
177 |
-
'zoom' => $instance['lightbox_zoom'],
|
178 |
-
'type' => $instance['lightbox_type'],
|
179 |
-
'bubble' => $instance['lightbox_bubble'],
|
180 |
-
'id' => $widget_id);
|
181 |
-
|
182 |
-
$out .= $before_widget;
|
183 |
-
|
184 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
185 |
-
if (!empty($title)) {
|
186 |
-
$out .= $before_title . $title . $after_title;
|
187 |
-
}
|
188 |
-
|
189 |
-
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
190 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
191 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
192 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
193 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
194 |
-
urlencode($instance['address']) . '"></a>';
|
195 |
-
$tmp .= '</p>';
|
196 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
197 |
-
|
198 |
-
$out .= $after_widget;
|
199 |
-
|
200 |
-
echo $out;
|
201 |
-
}
|
202 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.23/google-maps-widget.php
DELETED
@@ -1,171 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.23
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
define('GOOGLE_MAPS_WIDGET_CORE_VER', '0.2');
|
17 |
-
require_once 'gmw-widget.php';
|
18 |
-
|
19 |
-
class GMW {
|
20 |
-
function init() {
|
21 |
-
if (is_admin()) {
|
22 |
-
// check if minimal required WP version is used
|
23 |
-
self::check_wp_version(3.2);
|
24 |
-
|
25 |
-
// aditional links in plugin description
|
26 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
27 |
-
array(__CLASS__, 'plugin_action_links'));
|
28 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
29 |
-
|
30 |
-
// enqueue admin scripts
|
31 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
32 |
-
} else {
|
33 |
-
// enqueue frontend scripts
|
34 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
35 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
36 |
-
}
|
37 |
-
} // init
|
38 |
-
|
39 |
-
|
40 |
-
// initialize widgets
|
41 |
-
function widgets_init() {
|
42 |
-
register_widget('GoogleMapsWidget');
|
43 |
-
} // widgets_init
|
44 |
-
|
45 |
-
|
46 |
-
// add settings link to plugins page
|
47 |
-
function plugin_action_links($links) {
|
48 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
49 |
-
array_unshift($links, $settings_link);
|
50 |
-
|
51 |
-
return $links;
|
52 |
-
} // plugin_action_links
|
53 |
-
|
54 |
-
|
55 |
-
// add links to plugin's description in plugins table
|
56 |
-
function plugin_meta_links($links, $file) {
|
57 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
58 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
59 |
-
|
60 |
-
if ($file == plugin_basename(__FILE__)) {
|
61 |
-
//$links[] = $documentation_link;
|
62 |
-
$links[] = $support_link;
|
63 |
-
}
|
64 |
-
|
65 |
-
return $links;
|
66 |
-
} // plugin_meta_links
|
67 |
-
|
68 |
-
|
69 |
-
// check if user has the minimal WP version required by the plugin
|
70 |
-
function check_wp_version($min_version) {
|
71 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
72 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
73 |
-
}
|
74 |
-
} // check_wp_version
|
75 |
-
|
76 |
-
|
77 |
-
// display error message if WP version is too low
|
78 |
-
function min_version_error() {
|
79 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
80 |
-
} // min_version_error
|
81 |
-
|
82 |
-
|
83 |
-
// print dialogs markup in footer
|
84 |
-
function dialogs_markup() {
|
85 |
-
$out = '';
|
86 |
-
$widgets = GoogleMapsWidget::$widgets;
|
87 |
-
|
88 |
-
if (!$widgets) {
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
|
92 |
-
foreach ($widgets as $widget) {
|
93 |
-
if ($widget['bubble']) {
|
94 |
-
$iwloc = 'addr';
|
95 |
-
} else {
|
96 |
-
$iwloc = 'near';
|
97 |
-
}
|
98 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-iframe-url="http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['zoom']) . '" id="dialog-' . $widget['id'] . '" title="' . $widget['title'] . '">';
|
99 |
-
if ($widget['header']) {
|
100 |
-
$out .= '<div class="gmw-header" style="padding: 5px;"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
101 |
-
}
|
102 |
-
$out .= '<div class="gmw-map"></div>';
|
103 |
-
if ($widget['footer']) {
|
104 |
-
$out .= '<div class="gmw-footer" style="padding: 5px;"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
105 |
-
}
|
106 |
-
$out .= "</div>\n";
|
107 |
-
} // foreach $widgets
|
108 |
-
|
109 |
-
echo $out;
|
110 |
-
} // run_scroller
|
111 |
-
|
112 |
-
|
113 |
-
// enqueue frontend scripts if necessary
|
114 |
-
function enqueue_scripts() {
|
115 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
116 |
-
wp_enqueue_style('wp-jquery-ui-dialog');
|
117 |
-
wp_enqueue_script('jquery-ui-dialog');
|
118 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), '1.0');
|
119 |
-
}
|
120 |
-
} // enqueue_scripts
|
121 |
-
|
122 |
-
|
123 |
-
// enqueue CSS and JS scripts on widgets page
|
124 |
-
function admin_enqueue_scripts() {
|
125 |
-
if (self::is_plugin_admin_page()) {
|
126 |
-
$plugin_url = plugin_dir_url(__FILE__);
|
127 |
-
|
128 |
-
wp_enqueue_script('jquery-ui-tabs');
|
129 |
-
wp_enqueue_script('sn-cookie', $plugin_url . 'js/jquery.cookie.js', array('jquery'), '1.0', true);
|
130 |
-
wp_enqueue_script('gmw-admin', $plugin_url . 'js/gmw-admin.js', array(), '1.0', true);
|
131 |
-
wp_enqueue_style('gmw-admin', $plugin_url . 'css/gmw-admin.css', array(), '1.0');
|
132 |
-
} // if
|
133 |
-
} // admin_enqueue_scripts
|
134 |
-
|
135 |
-
|
136 |
-
// check if plugin's admin page is shown
|
137 |
-
function is_plugin_admin_page() {
|
138 |
-
$current_screen = get_current_screen();
|
139 |
-
|
140 |
-
if ($current_screen->id == 'widgets') {
|
141 |
-
return true;
|
142 |
-
} else {
|
143 |
-
return false;
|
144 |
-
}
|
145 |
-
} // is_plugin_admin_page
|
146 |
-
|
147 |
-
|
148 |
-
// helper function for creating dropdowns
|
149 |
-
function create_select_options($options, $selected = null, $output = true) {
|
150 |
-
$out = "\n";
|
151 |
-
|
152 |
-
foreach ($options as $tmp) {
|
153 |
-
if ($selected == $tmp['val']) {
|
154 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
155 |
-
} else {
|
156 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
157 |
-
}
|
158 |
-
} // foreach
|
159 |
-
|
160 |
-
if ($output) {
|
161 |
-
echo $out;
|
162 |
-
} else {
|
163 |
-
return $out;
|
164 |
-
}
|
165 |
-
} // create_select_options
|
166 |
-
} // class GMW
|
167 |
-
|
168 |
-
|
169 |
-
// hook everything up
|
170 |
-
add_action('init', array('GMW', 'init'));
|
171 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.23/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.23/js/gmw.js
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.google-maps-widget a.widget-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
|
12 |
-
dialog.dialog('option', {'width': map_width, 'minHeight': map_height}).dialog('open');
|
13 |
-
|
14 |
-
return false;
|
15 |
-
});
|
16 |
-
|
17 |
-
$('.gmw-dialog').dialog({ 'dialogClass': 'wp-dialog',
|
18 |
-
'modal': true,
|
19 |
-
'resizable': false,
|
20 |
-
'zIndex': 9999,
|
21 |
-
'hide': 'fade',
|
22 |
-
'open': function(event, ui) { renderMap(event, ui); fixDialogClose(event, ui); },
|
23 |
-
'show': 'fade',
|
24 |
-
'autoOpen': false,
|
25 |
-
'closeOnEscape': true
|
26 |
-
});
|
27 |
-
}); // onload
|
28 |
-
|
29 |
-
function renderMap(event, ui) {
|
30 |
-
dialog_id = '#' + event.target.id;
|
31 |
-
map_url = jQuery(dialog_id).attr('data-iframe-url');
|
32 |
-
map_width = jQuery(dialog_id).attr('data-map-width');
|
33 |
-
map_height = jQuery(dialog_id).attr('data-map-height');
|
34 |
-
|
35 |
-
jQuery('.gmw-map', dialog_id).html('<iframe width="' + map_width + '" height="' + map_height + '" src="' + map_url + '"></iframe>');
|
36 |
-
} // renderMap
|
37 |
-
|
38 |
-
function fixDialogClose(event, ui) {
|
39 |
-
jQuery('.ui-widget-overlay').on('click', function(){ jQuery('.gmw-dialog').dialog('close'); });
|
40 |
-
} // fixDialogClose
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.23/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.23/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.23/readme.txt
DELETED
@@ -1,111 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.23
|
9 |
-
|
10 |
-
Display a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
More features, videos and demos are coming in a few days! Till then here's the widget's features list. Give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
**General widget options**
|
17 |
-
|
18 |
-
* title
|
19 |
-
* address
|
20 |
-
|
21 |
-
**Thumbnail map options**
|
22 |
-
|
23 |
-
* map size - width & height
|
24 |
-
* map type - road, satellite, map or hybrid
|
25 |
-
* pin color
|
26 |
-
* pin size
|
27 |
-
* zoom level
|
28 |
-
|
29 |
-
**Lightbox map options**
|
30 |
-
|
31 |
-
* map size - width & height
|
32 |
-
* map type - road, satellite, map or hybrid
|
33 |
-
* zoom level
|
34 |
-
* show/hide address bubble
|
35 |
-
* header text
|
36 |
-
* footer text
|
37 |
-
|
38 |
-
There are no additional JS libraries included; GMW uses jQuery and jQuery UI Dialog bundled with WP. There are also no extra CSS files included. We do plan to add them in the future to provide map and dialog themes.
|
39 |
-
|
40 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
41 |
-
|
42 |
-
== Installation ==
|
43 |
-
|
44 |
-
Follow the usual routine;
|
45 |
-
|
46 |
-
1. Download the plugin.
|
47 |
-
2. Unzip it and upload to wp-content/plugin/
|
48 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
49 |
-
4. Configure the plugin under Appearance - Widgets
|
50 |
-
|
51 |
-
|
52 |
-
== Frequently Asked Questions ==
|
53 |
-
|
54 |
-
= Who is this plugin for? =
|
55 |
-
|
56 |
-
For just about anyone who needs a map on their site.
|
57 |
-
|
58 |
-
= It's not working!!! Arrrrrrrrr =
|
59 |
-
|
60 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
61 |
-
If you can figure it out open a thread in the support forums.
|
62 |
-
|
63 |
-
== Screenshots ==
|
64 |
-
|
65 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
66 |
-
2. Larger map with all features is available in the lightbox
|
67 |
-
3. Widget options - thumbnail map
|
68 |
-
4. Widget options - lightbox map
|
69 |
-
|
70 |
-
== Changelog ==
|
71 |
-
|
72 |
-
= 0.22 =
|
73 |
-
* 2012/08/31
|
74 |
-
* Fixed small JS related GUI bug
|
75 |
-
|
76 |
-
= 0.2 =
|
77 |
-
* 2012/08/28
|
78 |
-
* Complete GUI rewrite
|
79 |
-
* Added header text option
|
80 |
-
* Added address bubble visibility option
|
81 |
-
* Fixed thumbnail map scaling bug
|
82 |
-
* Fixed lightbox map size bug
|
83 |
-
|
84 |
-
= 0.13 =
|
85 |
-
* 2012/08/09
|
86 |
-
* Added pin size for thumbnail map
|
87 |
-
|
88 |
-
= 0.12 =
|
89 |
-
* 2012/08/07
|
90 |
-
* Added pin color for thumbnail map
|
91 |
-
* Fixed a few minor bugs
|
92 |
-
|
93 |
-
= 0.11 =
|
94 |
-
* 2012/08/06
|
95 |
-
* Fixed a few minor bugs
|
96 |
-
|
97 |
-
= 0.1 =
|
98 |
-
* 2012/08/03
|
99 |
-
* Initial release
|
100 |
-
|
101 |
-
|
102 |
-
== Upgrade Notice ==
|
103 |
-
|
104 |
-
= 0.2 =
|
105 |
-
Due to variable name change footer text will be reset
|
106 |
-
|
107 |
-
= 0.1x =
|
108 |
-
Upgrade without any fear :)
|
109 |
-
|
110 |
-
= 0.1 =
|
111 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.23/screenshot-1.png
DELETED
Binary file
|
tags/0.23/screenshot-2.png
DELETED
Binary file
|
tags/0.23/screenshot-3.png
DELETED
Binary file
|
tags/0.23/screenshot-4.png
DELETED
Binary file
|
tags/0.3/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/css/gmw.css
DELETED
@@ -1,274 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/gmw-widget.php
DELETED
@@ -1,219 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_skin' => '',
|
32 |
-
'lightbox_title' => '1',
|
33 |
-
'lightbox_header' => '',
|
34 |
-
'lightbox_footer' => ''));
|
35 |
-
|
36 |
-
$title = $instance['title'];
|
37 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
38 |
-
$lightbox_header = $instance['lightbox_header'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$lightbox_width = $instance['lightbox_width'];
|
47 |
-
$lightbox_height = $instance['lightbox_height'];
|
48 |
-
$lightbox_type = $instance['lightbox_type'];
|
49 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
50 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
51 |
-
$lightbox_title = $instance['lightbox_title'];
|
52 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
53 |
-
|
54 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
55 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
56 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
57 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
58 |
-
|
59 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
60 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
61 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
62 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
63 |
-
|
64 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
65 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
66 |
-
array('val' => 'green', 'label' => 'Green'),
|
67 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
68 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
69 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
70 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
71 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
72 |
-
array('val' => 'red', 'label' => 'Red'),
|
73 |
-
array('val' => 'white', 'label' => 'White'));
|
74 |
-
|
75 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
76 |
-
array('val' => 'small', 'label' => 'Small'),
|
77 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
78 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
79 |
-
|
80 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
81 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
82 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
83 |
-
}
|
84 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
85 |
-
|
86 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'Default');
|
87 |
-
|
88 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
89 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
90 |
-
|
91 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
92 |
-
echo '<div id="gmw-thumb">';
|
93 |
-
|
94 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
95 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
96 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
97 |
-
echo ' px</p>';
|
98 |
-
|
99 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
100 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
101 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
102 |
-
echo '</select></p>';
|
103 |
-
|
104 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
105 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
106 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
107 |
-
echo '</select></p>';
|
108 |
-
|
109 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
110 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
111 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
112 |
-
echo '</select></p>';
|
113 |
-
|
114 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
115 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
116 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
117 |
-
echo '</select></p>';
|
118 |
-
|
119 |
-
echo '</div>'; // thumbnail tab
|
120 |
-
echo '<div id="gmw-lightbox">';
|
121 |
-
|
122 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
123 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
124 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
125 |
-
echo ' px</p>';
|
126 |
-
|
127 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
128 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
129 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
130 |
-
echo '</select></p>';
|
131 |
-
|
132 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
133 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
134 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
135 |
-
echo '</select></p>';
|
136 |
-
|
137 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
138 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
139 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
140 |
-
echo '</select></p>';
|
141 |
-
|
142 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
143 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
144 |
-
echo '</p>';
|
145 |
-
|
146 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
147 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
148 |
-
echo '</p>';
|
149 |
-
|
150 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
151 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
152 |
-
|
153 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
154 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
155 |
-
|
156 |
-
echo '</div>'; // lightbox tab
|
157 |
-
echo '</div>'; // tabs
|
158 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
159 |
-
}
|
160 |
-
|
161 |
-
function update($new_instance, $old_instance) {
|
162 |
-
$instance = $old_instance;
|
163 |
-
|
164 |
-
$instance['title'] = $new_instance['title'];
|
165 |
-
$instance['address'] = $new_instance['address'];
|
166 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
167 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
168 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
169 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
170 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
171 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
172 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
173 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
174 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
175 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
176 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
177 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
178 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
179 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
180 |
-
|
181 |
-
return $instance;
|
182 |
-
}
|
183 |
-
|
184 |
-
function widget($args, $instance) {
|
185 |
-
$out = $tmp = '';
|
186 |
-
|
187 |
-
extract($args, EXTR_SKIP);
|
188 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
189 |
-
'width' => $instance['lightbox_width'],
|
190 |
-
'height' => $instance['lightbox_height'],
|
191 |
-
'footer' => $instance['lightbox_footer'],
|
192 |
-
'header' => $instance['lightbox_header'],
|
193 |
-
'address' => $instance['address'],
|
194 |
-
'zoom' => $instance['lightbox_zoom'],
|
195 |
-
'type' => $instance['lightbox_type'],
|
196 |
-
'bubble' => $instance['lightbox_bubble'],
|
197 |
-
'id' => $widget_id);
|
198 |
-
|
199 |
-
$out .= $before_widget;
|
200 |
-
|
201 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
202 |
-
if (!empty($title)) {
|
203 |
-
$out .= $before_title . $title . $after_title;
|
204 |
-
}
|
205 |
-
|
206 |
-
$tmp .= '<p><a class="widget-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
207 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
208 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
209 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
210 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
211 |
-
urlencode($instance['address']) . '"></a>';
|
212 |
-
$tmp .= '</p>';
|
213 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
214 |
-
|
215 |
-
$out .= $after_widget;
|
216 |
-
|
217 |
-
echo $out;
|
218 |
-
}
|
219 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/google-maps-widget.php
DELETED
@@ -1,177 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.3
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
define('GMW_VER', '0.2');
|
18 |
-
require 'gmw-widget.php';
|
19 |
-
|
20 |
-
|
21 |
-
class GMW {
|
22 |
-
function init() {
|
23 |
-
if (is_admin()) {
|
24 |
-
// check if minimal required WP version is used
|
25 |
-
self::check_wp_version(3.2);
|
26 |
-
|
27 |
-
// aditional links in plugin description
|
28 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
29 |
-
array(__CLASS__, 'plugin_action_links'));
|
30 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
31 |
-
|
32 |
-
// enqueue admin scripts
|
33 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
34 |
-
} else {
|
35 |
-
// enqueue frontend scripts
|
36 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
37 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
38 |
-
}
|
39 |
-
} // init
|
40 |
-
|
41 |
-
|
42 |
-
// initialize widgets
|
43 |
-
function widgets_init() {
|
44 |
-
register_widget('GoogleMapsWidget');
|
45 |
-
} // widgets_init
|
46 |
-
|
47 |
-
|
48 |
-
// add settings link to plugins page
|
49 |
-
function plugin_action_links($links) {
|
50 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
51 |
-
array_unshift($links, $settings_link);
|
52 |
-
|
53 |
-
return $links;
|
54 |
-
} // plugin_action_links
|
55 |
-
|
56 |
-
|
57 |
-
// add links to plugin's description in plugins table
|
58 |
-
function plugin_meta_links($links, $file) {
|
59 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
60 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
61 |
-
|
62 |
-
if ($file == plugin_basename(__FILE__)) {
|
63 |
-
//$links[] = $documentation_link;
|
64 |
-
$links[] = $support_link;
|
65 |
-
}
|
66 |
-
|
67 |
-
return $links;
|
68 |
-
} // plugin_meta_links
|
69 |
-
|
70 |
-
|
71 |
-
// check if user has the minimal WP version required by the plugin
|
72 |
-
function check_wp_version($min_version) {
|
73 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
74 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
75 |
-
}
|
76 |
-
} // check_wp_version
|
77 |
-
|
78 |
-
|
79 |
-
// display error message if WP version is too low
|
80 |
-
function min_version_error() {
|
81 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
82 |
-
} // min_version_error
|
83 |
-
|
84 |
-
|
85 |
-
// print dialogs markup in footer
|
86 |
-
function dialogs_markup() {
|
87 |
-
$out = '';
|
88 |
-
$widgets = GoogleMapsWidget::$widgets;
|
89 |
-
|
90 |
-
if (!$widgets) {
|
91 |
-
wp_dequeue_script('gmw');
|
92 |
-
wp_dequeue_script('gmw-fancybox');
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
foreach ($widgets as $widget) {
|
97 |
-
if ($widget['bubble']) {
|
98 |
-
$iwloc = 'addr';
|
99 |
-
} else {
|
100 |
-
$iwloc = 'near';
|
101 |
-
}
|
102 |
-
$map_url = 'http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['zoom']) . '';
|
103 |
-
|
104 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-iframe-url="' . $map_url . '" id="dialog-' . $widget['id'] . '" title="' . $widget['title'] . '">';
|
105 |
-
if ($widget['header']) {
|
106 |
-
$out .= '<div class="gmw-header"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
107 |
-
}
|
108 |
-
$out .= '<div class="gmw-map"></div>';
|
109 |
-
if ($widget['footer']) {
|
110 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
111 |
-
}
|
112 |
-
$out .= "</div>\n";
|
113 |
-
} // foreach $widgets
|
114 |
-
|
115 |
-
echo $out;
|
116 |
-
} // run_scroller
|
117 |
-
|
118 |
-
|
119 |
-
// enqueue frontend scripts if necessary
|
120 |
-
function enqueue_scripts() {
|
121 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
122 |
-
wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
|
123 |
-
wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
|
124 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
|
125 |
-
}
|
126 |
-
} // enqueue_scripts
|
127 |
-
|
128 |
-
|
129 |
-
// enqueue CSS and JS scripts on widgets page
|
130 |
-
function admin_enqueue_scripts() {
|
131 |
-
if (self::is_plugin_admin_page()) {
|
132 |
-
$plugin_url = plugin_dir_url(__FILE__);
|
133 |
-
|
134 |
-
wp_enqueue_script('jquery-ui-tabs');
|
135 |
-
wp_enqueue_script('sn-cookie', $plugin_url . 'js/jquery.cookie.js', array('jquery'), GMW_VER, true);
|
136 |
-
wp_enqueue_script('gmw-admin', $plugin_url . 'js/gmw-admin.js', array(), GMW_VER, true);
|
137 |
-
wp_enqueue_style('gmw-admin', $plugin_url . 'css/gmw-admin.css', array(), GMW_VER);
|
138 |
-
} // if
|
139 |
-
} // admin_enqueue_scripts
|
140 |
-
|
141 |
-
|
142 |
-
// check if plugin's admin page is shown
|
143 |
-
function is_plugin_admin_page() {
|
144 |
-
$current_screen = get_current_screen();
|
145 |
-
|
146 |
-
if ($current_screen->id == 'widgets') {
|
147 |
-
return true;
|
148 |
-
} else {
|
149 |
-
return false;
|
150 |
-
}
|
151 |
-
} // is_plugin_admin_page
|
152 |
-
|
153 |
-
|
154 |
-
// helper function for creating dropdowns
|
155 |
-
function create_select_options($options, $selected = null, $output = true) {
|
156 |
-
$out = "\n";
|
157 |
-
|
158 |
-
foreach ($options as $tmp) {
|
159 |
-
if ($selected == $tmp['val']) {
|
160 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
161 |
-
} else {
|
162 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
163 |
-
}
|
164 |
-
} // foreach
|
165 |
-
|
166 |
-
if ($output) {
|
167 |
-
echo $out;
|
168 |
-
} else {
|
169 |
-
return $out;
|
170 |
-
}
|
171 |
-
} // create_select_options
|
172 |
-
} // class GMW
|
173 |
-
|
174 |
-
|
175 |
-
// hook everything up
|
176 |
-
add_action('init', array('GMW', 'init'));
|
177 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/images/blank.gif
DELETED
Binary file
|
tags/0.3/images/fancybox_loading.gif
DELETED
Binary file
|
tags/0.3/images/fancybox_overlay.png
DELETED
Binary file
|
tags/0.3/images/fancybox_sprite.png
DELETED
Binary file
|
tags/0.3/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/js/gmw.js
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.google-maps-widget a.widget-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
map_url = dialog.attr('data-iframe-url');
|
12 |
-
map_title = dialog.attr('title');
|
13 |
-
|
14 |
-
var content = $(dialog.html());
|
15 |
-
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
16 |
-
|
17 |
-
$.fancybox( {'type': 'html', 'content': content, 'title': map_title, 'autoSize': true, 'minWidth': map_width, 'minHeight': map_height } );
|
18 |
-
|
19 |
-
return false;
|
20 |
-
});
|
21 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/js/jquery.fancybox.pack.js
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
2 |
-
(function(u,p,f,q){var o=f(u),n=f(p),b=f.fancybox=function(){b.open.apply(this,arguments)},z=null,m=p.createTouch!==q,x=function(a){return a&&a.hasOwnProperty&&a instanceof f},s=function(a){return a&&"string"===f.type(a)},C=function(a){return s(a)&&0<a.indexOf("%")},k=function(a,c){var e=parseInt(a,10);c&&C(a)&&(e*=b.getViewport()[c]/100);return Math.ceil(e)},v=function(a,b){return k(a,b)+"px"};f.extend(b,{version:"2.1.0",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,
|
3 |
-
maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!m,autoCenter:!m,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},
|
4 |
-
prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0"'+
|
5 |
-
(f.browser.msie?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",
|
6 |
-
openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{closeClick:!0,speedOut:200,showEarly:!0,css:{}},title:{type:"float"}},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},
|
7 |
-
group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,c){if(a&&(f.isPlainObject(c)||(c={}),!1!==b.close(!0)))return f.isArray(a)||(a=x(a)?f(a).get():[a]),f.each(a,function(e,d){var j={},g,h,i,l,k;"object"===f.type(d)&&(d.nodeType&&(d=f(d)),x(d)?(j={href:d.attr("href"),title:d.attr("title"),isDom:!0,element:d},f.metadata&&
|
8 |
-
f.extend(!0,j,d.metadata())):j=d);g=c.href||j.href||(s(d)?d:null);h=c.title!==q?c.title:j.title||"";l=(i=c.content||j.content)?"html":c.type||j.type;!l&&j.isDom&&(l=d.data("fancybox-type"),l||(l=(l=d.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));if(s(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":s(d)&&(l="html",i=d)),"ajax"===l))k=g.split(/\s+/,2),g=k.shift(),k=k.shift();i||("inline"===l?g?i=f(s(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=d):"html"===l?
|
9 |
-
i=g:!l&&(!g&&j.isDom)&&(l="inline",i=d));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,c),c.keys!==q&&(b.opts.keys=c.keys?f.extend({},b.defaults.keys,c.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0).trigger("onReset").remove(),b.current||
|
10 |
-
b.trigger("afterClose"),b.coming=null)},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),"fixed"===b.wrap.css("position")&&b.wrap.css(b._getPosition(!0)),b.transitions[b.current.closeMethod]()))},play:function(a){var c=function(){clearTimeout(b.player.timer)},
|
11 |
-
e=function(){c();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},d=function(){c();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":d,"beforeLoad.player":c}),e(),b.trigger("onPlayStart")}else d()},next:function(a){var c=b.current;
|
12 |
-
c&&(s(a)||(a=c.direction.next),b.jumpto(c.index+1,a,"next"))},prev:function(a){var c=b.current;c&&(s(a)||(a=c.direction.prev),b.jumpto(c.index-1,a,"prev"))},jumpto:function(a,c,e){var d=b.current;if(d&&(a=k(a),b.direction=c||d.direction[a>=d.index?"next":"prev"],b.router=e||"jumpto",d.loop&&(0>a&&(a=d.group.length+a%d.group.length),a%=d.group.length),d.group[a]!==q))b.cancel(),b._start(a)},reposition:function(a,c){var e;b.isOpen&&(e=b._getPosition(c),a&&"scroll"===a.type?(delete e.position,b.wrap.stop(!0,
|
13 |
-
!0).animate(e,200)):b.wrap.css(e))},update:function(a){var c=a&&a.type,e=!c||"orientationchange"===c;e&&(clearTimeout(z),z=null);if(b.isOpen&&!z){if(e||m)b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate");z=setTimeout(function(){var d=b.current;if(d){b.wrap.removeClass("fancybox-tmp");c!=="scroll"&&b._setDimension();c==="scroll"&&d.canShrink||b.reposition(a);b.trigger("onUpdate");z=null}},m?500:e?20:300)}},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?
|
14 |
-
a:!b.current.fitToView,b.update())},hideLoading:function(){n.unbind("keypress.fb");f("#fancybox-loading").remove()},showLoading:function(){var a,c;b.hideLoading();n.bind("keypress.fb",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");b.defaults.fixed||(c=b.getViewport(),a.css({position:"absolute",top:0.5*c.h+c.y,left:0.5*c.w+c.x}))},getViewport:function(){var a=b.current?b.current.locked:!1,
|
15 |
-
c={x:o.scrollLeft(),y:o.scrollTop()};a?(c.w=a[0].clientWidth,c.h=a[0].clientHeight):(c.w=m&&u.innerWidth?u.innerWidth:o.width(),c.h=m&&u.innerHeight?u.innerHeight:o.height());return c},unbindEvents:function(){b.wrap&&x(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");o.unbind(".fb")},bindEvents:function(){var a=b.current,c;a&&(o.bind("orientationchange.fb"+(m?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(c=a.keys)&&n.bind("keydown.fb",function(e){var d=e.which||e.keyCode,j=e.target||
|
16 |
-
e.srcElement;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(c,function(c,j){if(1<a.group.length&&j[d]!==q)return b[c](j[d]),e.preventDefault(),!1;if(-1<f.inArray(d,j))return b[c](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(c,d,j,g){for(var h=f(c.target||null),i=!1;h.length&&!i&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)i=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
|
17 |
-
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==d&&!i&&1<b.group.length&&!a.canShrink){if(0<g||0<j)b.prev(0<g?"down":"left");else if(0>g||0>j)b.next(0>g?"up":"right");c.preventDefault()}}))},trigger:function(a,c){var e,d=c||b.coming||b.current;if(d){f.isFunction(d[a])&&(e=d[a].apply(d,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;"onCancel"===a&&!b.isOpened&&(b.isActive=!1);d.helpers&&f.each(d.helpers,
|
18 |
-
function(c,e){if(e&&b.helpers[c]&&f.isFunction(b.helpers[c][a]))b.helpers[c][a](e,d)});f.event.trigger(a+".fb")}},isImage:function(a){return s(a)&&a.match(/\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$/i)},isSWF:function(a){return s(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var c={},e,d,a=k(a);e=b.group[a]||null;if(!e)return!1;c=f.extend(!0,{},b.opts,e);e=c.margin;d=c.padding;"number"===f.type(e)&&(c.margin=[e,e,e,e]);"number"===f.type(d)&&(c.padding=[d,d,d,d]);c.modal&&f.extend(!0,c,
|
19 |
-
{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});c.autoSize&&(c.autoWidth=c.autoHeight=!0);"auto"===c.width&&(c.autoWidth=!0);"auto"===c.height&&(c.autoHeight=!0);c.group=b.group;c.index=a;b.coming=c;if(!1===b.trigger("beforeLoad"))b.coming=null;else{d=c.type;e=c.href;if(!d)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===d||"swf"===d)c.autoHeight=c.autoWidth=
|
20 |
-
!1,c.scrolling="visible";"image"===d&&(c.aspectRatio=!0);"iframe"===d&&m&&(c.scrolling="scroll");c.wrap=f(c.tpl.wrap).addClass("fancybox-"+(m?"mobile":"desktop")+" fancybox-type-"+d+" fancybox-tmp "+c.wrapCSS).appendTo(c.parent);f.extend(c,{skin:f(".fancybox-skin",c.wrap),outer:f(".fancybox-outer",c.wrap),inner:f(".fancybox-inner",c.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){c.skin.css("padding"+b,v(c.padding[a]))});b.trigger("onReady");if("inline"===d||"html"===d){if(!c.content||
|
21 |
-
!c.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===d?b._loadImage():"ajax"===d?b._loadAjax():"iframe"===d?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width;b.coming.height=this.height;
|
22 |
-
b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;(a.complete===q||!a.complete)&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(c,e){"success"===e&&(a.content=c,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,c=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",
|
23 |
-
m?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),c.one("load",function(){f(this).data("ready",1);m||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=c.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,c=b.current,
|
24 |
-
e=a.length,d=c.preload?Math.min(c.preload,e-1):0,f,g;for(g=1;g<=d;g+=1)f=a[(c.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,c=b.current,e,d,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,c))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{c&&(b.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove(),"fixed"===c.wrap.css("position")&&c.wrap.css(b._getPosition(!0)));
|
25 |
-
b.unbindEvents();e=a.content;d=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:c});g=a.href;switch(d){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):x(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
26 |
-
false)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e=e+('<param name="'+a+'" value="'+b+'"></param>');h=h+(" "+a+'="'+b+'"')}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!x(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
27 |
-
a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();a.wrap.removeClass("fancybox-tmp");a.pos=f.extend({},a.dim,b._getPosition(!0));b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(c.prevMethod)b.transitions[c.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),c=0,e=!1,d=!1,e=b.wrap,j=b.skin,g=b.inner,h=
|
28 |
-
b.current,d=h.width,i=h.height,l=h.minWidth,t=h.minHeight,m=h.maxWidth,n=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,w=h.margin,o=w[1]+w[3],p=w[0]+w[2],x,r,u,A,y,D,z,B,E;e.add(j).add(g).width("auto").height("auto");w=j.outerWidth(!0)-j.width();x=j.outerHeight(!0)-j.height();r=o+w;u=p+x;A=C(d)?(a.w-r)*k(d)/100:d;y=C(i)?(a.h-u)*k(i)/100:i;if("iframe"===h.type){if(E=h.content,h.autoHeight&&1===E.data("ready"))try{E[0].contentWindow.document.location&&(g.width(A).height(9999),D=E.contents().find("body"),
|
29 |
-
q&&D.css("overflow-x","hidden"),y=D.height())}catch(F){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(A),h.autoHeight||g.height(y),h.autoWidth&&(A=g.width()),h.autoHeight&&(y=g.height()),g.removeClass("fancybox-tmp");d=k(A);i=k(y);B=A/y;l=k(C(l)?k(l,"w")-r:l);m=k(C(m)?k(m,"w")-r:m);t=k(C(t)?k(t,"h")-u:t);n=k(C(n)?k(n,"h")-u:n);D=m;z=n;o=a.w-o;p=a.h-p;if(h.aspectRatio){if(d>m&&(d=m,i=d/B),i>n&&(i=n,d=i*B),d<l&&(d=l,i=d/B),i<t)i=t,d=i*B}else d=Math.max(l,Math.min(d,
|
30 |
-
m)),i=Math.max(t,Math.min(i,n));if(h.fitToView)if(m=Math.min(a.w-r,m),n=Math.min(a.h-u,n),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height(),h.aspectRatio)for(;(a>o||r>p)&&(d>l&&i>t)&&!(19<c++);)i=Math.max(t,Math.min(n,i-10)),d=i*B,d<l&&(d=l,i=d/B),d>m&&(d=m,i=d/B),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height();else d=Math.max(l,Math.min(d,d-(a-o))),i=Math.max(t,Math.min(i,i-(r-p)));q&&("auto"===s&&i<y&&d+w+q<o)&&(d+=q);g.width(k(d)).height(k(i));e.width(k(d+
|
31 |
-
w));a=e.width();r=e.height();e=(a>o||r>p)&&d>l&&i>t;d=h.aspectRatio?d<D&&i<z&&d<A&&i<y:(d<D||i<z)&&(d<A||i<y);f.extend(h,{dim:{width:v(a),height:v(r)},origWidth:A,origHeight:y,canShrink:e,canExpand:d,wPadding:w,hPadding:x,wrapSpace:r-j.outerHeight(!0),skinSpace:j.height()-i});!E&&(h.autoHeight&&i>t&&i<n&&!d)&&g.height("auto")},_getPosition:function(a){var c=b.current,e=b.getViewport(),d=c.margin,f=b.wrap.width()+d[1]+d[3],g=b.wrap.height()+d[0]+d[2],d={position:"absolute",top:d[0],left:d[3]};c.autoCenter&&
|
32 |
-
c.fixed&&!a&&g<=e.h&&f<=e.w?d.position="fixed":c.locked||(d.top+=e.y,d.left+=e.x);d.top=v(Math.max(d.top,d.top+(e.h-g)*c.topRatio));d.left=v(Math.max(d.left,d.left+(e.w-f)*c.leftRatio));return d},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.addClass("fancybox-opened").css("overflow","visible"),b.reposition(),(a.closeClick||a.nextClick)&&b.inner.css("cursor","pointer").bind("click.fb",function(c){if(!f(c.target).is("a")&&!f(c.target).parent().is("a"))b[a.closeClick?"close":
|
33 |
-
"next"]()}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",b.close),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1)?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(){var a=b.current;f(".fancybox-wrap").stop(!0).trigger("onReset").remove();
|
34 |
-
f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,c=a.element,e=a.orig,d={},f=50,g=50,h=a.hPadding,i=a.wPadding,l=b.getViewport();!e&&(a.isDom&&c.is(":visible"))&&(e=c.find("img:first"),e.length||(e=c));x(e)?(d=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(d.top=l.y+(l.h-g)*a.topRatio,d.left=l.x+(l.w-f)*
|
35 |
-
a.leftRatio);a.locked&&(d.top-=l.y,d.left-=l.x);return d={top:v(d.top-h*a.topRatio),left:v(d.left-i*a.leftRatio),width:v(f+i),height:v(g+h)}},step:function(a,c){var e,d,f=c.prop;d=b.current;var g=d.wrapSpace,h=d.skinSpace;if("width"===f||"height"===f)e=c.end===c.start?1:(a-c.start)/(c.end-c.start),b.isClosing&&(e=1-e),d="width"===f?d.wPadding:d.hPadding,d=a-d,b.skin[f](k("width"===f?d:d-g*e)),b.inner[f](k("width"===f?d:d-g*e-h*e))},zoomIn:function(){var a=b.current,c=a.pos,e=a.openEffect,d="elastic"===
|
36 |
-
e,j=f.extend({opacity:1},c);delete j.position;d?(c=this.getOrigPosition(),a.openOpacity&&(c.opacity=0.1)):"fade"===e&&(c.opacity=0.1);b.wrap.css(c).animate(j,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:d?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,c=a.closeEffect,e="elastic"===c,d={opacity:0.1};e&&(d=this.getOrigPosition(),a.closeOpacity&&(d.opacity=0.1));b.wrap.animate(d,{duration:"none"===c?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,
|
37 |
-
complete:b._afterZoomOut})},changeIn:function(){var a=b.current,c=a.nextEffect,e=a.pos,d={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===c&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=v(k(e[g])-200),d[g]="+=200px"):(e[g]=v(k(e[g])+200),d[g]="-=200px"));"none"===c?b._afterZoomIn():b.wrap.css(e).animate(d,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,c=a.prevEffect,e={opacity:0.1},d=b.direction;"elastic"===c&&
|
38 |
-
(e["down"===d||"up"===d?"top":"left"]=("up"===d||"left"===d?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===c?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={overlay:null,update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=Math.max(p.documentElement.offsetWidth,p.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>o.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,
|
39 |
-
b){f(".fancybox-overlay").stop(!0,!0);this.overlay||f.extend(this,{overlay:f('<div class="fancybox-overlay"></div>').appendTo(b.parent),margin:n.height()>o.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,el:p.all&&!p.querySelector?f("html"):f("body")});b.fixed&&!m&&(this.overlay.addClass("fancybox-overlay-fixed"),b.autoCenter&&(this.overlay.append(b.wrap),b.locked=this.overlay));!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,c){var e=
|
40 |
-
this.overlay.unbind(".fb").width("auto").height("auto").css(a.css);a.closeClick&&e.bind("click.fb",function(a){f(a.target).hasClass("fancybox-overlay")&&b.close()});c.fixed&&!m?c.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+c.scrollbarWidth)):this.update();e.show()},onUpdate:function(a,b){(!b.fixed||m)&&this.update()},afterClose:function(a){var c=this,a=a.speedOut||0;c.overlay&&!b.isActive&&c.overlay.fadeOut(a||0,function(){f("body").css("margin-right",
|
41 |
-
c.margin);c.el.removeClass("fancybox-lock");c.overlay.remove();c.overlay=null})}};b.helpers.title={beforeShow:function(a){var c=b.current.title,e=a.type;if(s(c)&&""!==f.trim(c)){c=f('<div class="fancybox-title fancybox-title-'+e+'-wrap">'+c+"</div>");switch(e){case "inside":e=b.skin;break;case "outside":e=b.wrap;break;case "over":e=b.inner;break;default:e=b.skin,c.appendTo("body").width(c.width()).wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(k(c.css("margin-bottom")))}"top"===
|
42 |
-
a.position?c.prependTo(e):c.appendTo(e)}}};f.fn.fancybox=function(a){var c,e=f(this),d=this.selector||"",j=function(g){var h=f(this).blur(),i=c,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel",k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=d.length?f(d):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};c=a.index||0;!d||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",
|
43 |
-
j):n.undelegate(d,"click.fb-start").delegate(d+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);return this};n.ready(function(){f.scrollbarWidth===q&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===q){var a=f.support,c=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===c[0].offsetTop||
|
44 |
-
15===c[0].offsetTop;c.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/readme.txt
DELETED
@@ -1,125 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.1
|
8 |
-
Stable tag: 0.3
|
9 |
-
|
10 |
-
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
More features, videos and demos are coming up on a daily basis! Till then here are the widget's features. Give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
**General widget options**
|
17 |
-
|
18 |
-
* title
|
19 |
-
* address
|
20 |
-
|
21 |
-
**Thumbnail map options**
|
22 |
-
|
23 |
-
* map size - width & height
|
24 |
-
* map type - road, satellite, map or hybrid
|
25 |
-
* pin color
|
26 |
-
* pin size
|
27 |
-
* zoom level
|
28 |
-
|
29 |
-
**Lightbox map options**
|
30 |
-
|
31 |
-
* map size - width & height
|
32 |
-
* map type - road, satellite, map or hybrid
|
33 |
-
* zoom level
|
34 |
-
* show/hide address bubble
|
35 |
-
* show/hide map title
|
36 |
-
* header text
|
37 |
-
* footer text
|
38 |
-
|
39 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
40 |
-
|
41 |
-
The plugin was voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian.
|
42 |
-
|
43 |
-
== Installation ==
|
44 |
-
|
45 |
-
Follow the usual routine;
|
46 |
-
|
47 |
-
1. Open WP admin - Plugins - Add New
|
48 |
-
2. Enter "Google Maps Widget" under search and hit Enter
|
49 |
-
3. Plugin will show up as the first on the list, click "Install Now"
|
50 |
-
|
51 |
-
Or if needed, upload manually;
|
52 |
-
|
53 |
-
1. Download the plugin.
|
54 |
-
2. Unzip it and upload to wp-content/plugin/
|
55 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
56 |
-
4. Configure the plugin under Appearance - Widgets
|
57 |
-
|
58 |
-
|
59 |
-
== Frequently Asked Questions ==
|
60 |
-
|
61 |
-
= Who is this plugin for? =
|
62 |
-
|
63 |
-
For just about anyone who needs a map on their site.
|
64 |
-
|
65 |
-
= It's not working!!! Arrrrrrrrr =
|
66 |
-
|
67 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
68 |
-
If you can figure it out open a thread in the support forums.
|
69 |
-
|
70 |
-
== Screenshots ==
|
71 |
-
|
72 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
73 |
-
2. Larger map with all features is available in the lightbox
|
74 |
-
3. Widget options - thumbnail map
|
75 |
-
4. Widget options - lightbox map
|
76 |
-
|
77 |
-
== Changelog ==
|
78 |
-
|
79 |
-
= 0.3 =
|
80 |
-
* 2012/09/04
|
81 |
-
* lightbox script changed from jQuery UI Dialog to <a href="http://fancyapps.com/fancybox/">fancyBox2</a>
|
82 |
-
* added "show map title on lightbox" option
|
83 |
-
* significant speed improvements
|
84 |
-
* preparations for lightbox skins
|
85 |
-
|
86 |
-
= 0.22 =
|
87 |
-
* 2012/08/31
|
88 |
-
* Fixed small JS related GUI bug
|
89 |
-
|
90 |
-
= 0.2 =
|
91 |
-
* 2012/08/28
|
92 |
-
* Complete GUI rewrite
|
93 |
-
* Added header text option
|
94 |
-
* Added address bubble visibility option
|
95 |
-
* Fixed thumbnail map scaling bug
|
96 |
-
* Fixed lightbox map size bug
|
97 |
-
|
98 |
-
= 0.13 =
|
99 |
-
* 2012/08/09
|
100 |
-
* Added pin size for thumbnail map
|
101 |
-
|
102 |
-
= 0.12 =
|
103 |
-
* 2012/08/07
|
104 |
-
* Added pin color for thumbnail map
|
105 |
-
* Fixed a few minor bugs
|
106 |
-
|
107 |
-
= 0.11 =
|
108 |
-
* 2012/08/06
|
109 |
-
* Fixed a few minor bugs
|
110 |
-
|
111 |
-
= 0.1 =
|
112 |
-
* 2012/08/03
|
113 |
-
* Initial release
|
114 |
-
|
115 |
-
|
116 |
-
== Upgrade Notice ==
|
117 |
-
|
118 |
-
= 0.2 =
|
119 |
-
Due to variable name changes footer text will be reset
|
120 |
-
|
121 |
-
= 0.1x =
|
122 |
-
Upgrade without any fear :)
|
123 |
-
|
124 |
-
= 0.1 =
|
125 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.3/screenshot-1.png
DELETED
Binary file
|
tags/0.3/screenshot-2.png
DELETED
Binary file
|
tags/0.3/screenshot-3.png
DELETED
Binary file
|
tags/0.3/screenshot-4.png
DELETED
Binary file
|
tags/0.35/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/css/gmw.css
DELETED
@@ -1,306 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
275 |
-
|
276 |
-
/* lightbox skins */
|
277 |
-
.black-rounded .fancybox-skin {
|
278 |
-
background: black;
|
279 |
-
}
|
280 |
-
.black-rounded .fancybox-title-float-wrap .child {
|
281 |
-
background: black;
|
282 |
-
}
|
283 |
-
|
284 |
-
.white-square .fancybox-skin {
|
285 |
-
-webkit-border-radius: 0;
|
286 |
-
-moz-border-radius: 0;
|
287 |
-
border-radius: 0;
|
288 |
-
}
|
289 |
-
.white-square .fancybox-title-float-wrap .child {
|
290 |
-
-webkit-border-radius: 0;
|
291 |
-
-moz-border-radius: 0;
|
292 |
-
border-radius: 0;
|
293 |
-
}
|
294 |
-
|
295 |
-
.black-square .fancybox-skin {
|
296 |
-
background: black;
|
297 |
-
-webkit-border-radius: 0;
|
298 |
-
-moz-border-radius: 0;
|
299 |
-
border-radius: 0;
|
300 |
-
}
|
301 |
-
.black-square .fancybox-title-float-wrap .child {
|
302 |
-
background: black;
|
303 |
-
-webkit-border-radius: 0;
|
304 |
-
-moz-border-radius: 0;
|
305 |
-
border-radius: 0;
|
306 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/gmw-widget.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_skin' => '',
|
32 |
-
'lightbox_title' => '1',
|
33 |
-
'lightbox_header' => '',
|
34 |
-
'lightbox_footer' => ''));
|
35 |
-
|
36 |
-
$title = $instance['title'];
|
37 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
38 |
-
$lightbox_header = $instance['lightbox_header'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$lightbox_width = $instance['lightbox_width'];
|
47 |
-
$lightbox_height = $instance['lightbox_height'];
|
48 |
-
$lightbox_type = $instance['lightbox_type'];
|
49 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
50 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
51 |
-
$lightbox_title = $instance['lightbox_title'];
|
52 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
53 |
-
|
54 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
55 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
56 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
57 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
58 |
-
|
59 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
60 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
61 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
62 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
63 |
-
|
64 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
65 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
66 |
-
array('val' => 'green', 'label' => 'Green'),
|
67 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
68 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
69 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
70 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
71 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
72 |
-
array('val' => 'red', 'label' => 'Red'),
|
73 |
-
array('val' => 'white', 'label' => 'White'));
|
74 |
-
|
75 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
76 |
-
array('val' => 'small', 'label' => 'Small'),
|
77 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
78 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
79 |
-
|
80 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
81 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
82 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
83 |
-
}
|
84 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
85 |
-
|
86 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'White with rounded corners (default)');
|
87 |
-
$lightbox_skins[] = array('val' => 'black-rounded', 'label' => 'Black with rounded corners');
|
88 |
-
$lightbox_skins[] = array('val' => 'white-square', 'label' => 'White with square corners');
|
89 |
-
$lightbox_skins[] = array('val' => 'black-square', 'label' => 'Black with square corners');
|
90 |
-
|
91 |
-
|
92 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
93 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
94 |
-
|
95 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
96 |
-
echo '<div id="gmw-thumb">';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
99 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
100 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
101 |
-
echo ' px</p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
105 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
110 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
114 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
115 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
116 |
-
echo '</select></p>';
|
117 |
-
|
118 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
119 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
120 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
121 |
-
echo '</select></p>';
|
122 |
-
|
123 |
-
echo '</div>'; // thumbnail tab
|
124 |
-
echo '<div id="gmw-lightbox">';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
127 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
128 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
129 |
-
echo ' px</p>';
|
130 |
-
|
131 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
132 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
133 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
134 |
-
echo '</select></p>';
|
135 |
-
|
136 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
137 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
138 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
139 |
-
echo '</select></p>';
|
140 |
-
|
141 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
142 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
143 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
144 |
-
echo '</select></p>';
|
145 |
-
|
146 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
147 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
148 |
-
echo '</p>';
|
149 |
-
|
150 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
151 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
152 |
-
echo '</p>';
|
153 |
-
|
154 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
155 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
156 |
-
|
157 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
158 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
159 |
-
|
160 |
-
echo '</div>'; // lightbox tab
|
161 |
-
echo '</div>'; // tabs
|
162 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
163 |
-
}
|
164 |
-
|
165 |
-
function update($new_instance, $old_instance) {
|
166 |
-
$instance = $old_instance;
|
167 |
-
|
168 |
-
$instance['title'] = $new_instance['title'];
|
169 |
-
$instance['address'] = $new_instance['address'];
|
170 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
171 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
172 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
173 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
174 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
175 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
176 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
177 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
178 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
179 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
180 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
181 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
182 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
183 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
184 |
-
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
185 |
-
|
186 |
-
return $instance;
|
187 |
-
}
|
188 |
-
|
189 |
-
function widget($args, $instance) {
|
190 |
-
$out = $tmp = '';
|
191 |
-
|
192 |
-
extract($args, EXTR_SKIP);
|
193 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
194 |
-
'width' => $instance['lightbox_width'],
|
195 |
-
'height' => $instance['lightbox_height'],
|
196 |
-
'footer' => $instance['lightbox_footer'],
|
197 |
-
'header' => $instance['lightbox_header'],
|
198 |
-
'address' => $instance['address'],
|
199 |
-
'zoom' => $instance['lightbox_zoom'],
|
200 |
-
'type' => $instance['lightbox_type'],
|
201 |
-
'skin' => $instance['lightbox_skin'],
|
202 |
-
'bubble' => $instance['lightbox_bubble'],
|
203 |
-
'id' => $widget_id);
|
204 |
-
|
205 |
-
$out .= $before_widget;
|
206 |
-
|
207 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
208 |
-
if (!empty($title)) {
|
209 |
-
$out .= $before_title . $title . $after_title;
|
210 |
-
}
|
211 |
-
|
212 |
-
$tmp .= '<p><a class="gmw-thumbnail-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
213 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
214 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
215 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
216 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
217 |
-
urlencode($instance['address']) . '"></a>';
|
218 |
-
$tmp .= '</p>';
|
219 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
220 |
-
|
221 |
-
$out .= $after_widget;
|
222 |
-
|
223 |
-
echo $out;
|
224 |
-
}
|
225 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/google-maps-widget.php
DELETED
@@ -1,177 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.35
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
define('GMW_VER', '0.35');
|
18 |
-
require 'gmw-widget.php';
|
19 |
-
|
20 |
-
|
21 |
-
class GMW {
|
22 |
-
function init() {
|
23 |
-
if (is_admin()) {
|
24 |
-
// check if minimal required WP version is used
|
25 |
-
self::check_wp_version(3.2);
|
26 |
-
|
27 |
-
// aditional links in plugin description
|
28 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
29 |
-
array(__CLASS__, 'plugin_action_links'));
|
30 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
31 |
-
|
32 |
-
// enqueue admin scripts
|
33 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
34 |
-
} else {
|
35 |
-
// enqueue frontend scripts
|
36 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
37 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
38 |
-
}
|
39 |
-
} // init
|
40 |
-
|
41 |
-
|
42 |
-
// initialize widgets
|
43 |
-
function widgets_init() {
|
44 |
-
register_widget('GoogleMapsWidget');
|
45 |
-
} // widgets_init
|
46 |
-
|
47 |
-
|
48 |
-
// add settings link to plugins page
|
49 |
-
function plugin_action_links($links) {
|
50 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
51 |
-
array_unshift($links, $settings_link);
|
52 |
-
|
53 |
-
return $links;
|
54 |
-
} // plugin_action_links
|
55 |
-
|
56 |
-
|
57 |
-
// add links to plugin's description in plugins table
|
58 |
-
function plugin_meta_links($links, $file) {
|
59 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
60 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
61 |
-
|
62 |
-
if ($file == plugin_basename(__FILE__)) {
|
63 |
-
//$links[] = $documentation_link;
|
64 |
-
$links[] = $support_link;
|
65 |
-
}
|
66 |
-
|
67 |
-
return $links;
|
68 |
-
} // plugin_meta_links
|
69 |
-
|
70 |
-
|
71 |
-
// check if user has the minimal WP version required by the plugin
|
72 |
-
function check_wp_version($min_version) {
|
73 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
74 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
75 |
-
}
|
76 |
-
} // check_wp_version
|
77 |
-
|
78 |
-
|
79 |
-
// display error message if WP version is too low
|
80 |
-
function min_version_error() {
|
81 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
82 |
-
} // min_version_error
|
83 |
-
|
84 |
-
|
85 |
-
// print dialogs markup in footer
|
86 |
-
function dialogs_markup() {
|
87 |
-
$out = '';
|
88 |
-
$widgets = GoogleMapsWidget::$widgets;
|
89 |
-
|
90 |
-
if (!$widgets) {
|
91 |
-
wp_dequeue_script('gmw');
|
92 |
-
wp_dequeue_script('gmw-fancybox');
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
foreach ($widgets as $widget) {
|
97 |
-
if ($widget['bubble']) {
|
98 |
-
$iwloc = 'addr';
|
99 |
-
} else {
|
100 |
-
$iwloc = 'near';
|
101 |
-
}
|
102 |
-
$map_url = 'http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['zoom']) . '';
|
103 |
-
|
104 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-map-skin="' . $widget['skin'] . '" data-map-iframe-url="' . $map_url . '" id="dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '">';
|
105 |
-
if ($widget['header']) {
|
106 |
-
$out .= '<div class="gmw-header"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
107 |
-
}
|
108 |
-
$out .= '<div class="gmw-map"></div>';
|
109 |
-
if ($widget['footer']) {
|
110 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
111 |
-
}
|
112 |
-
$out .= "</div>\n";
|
113 |
-
} // foreach $widgets
|
114 |
-
|
115 |
-
echo $out;
|
116 |
-
} // run_scroller
|
117 |
-
|
118 |
-
|
119 |
-
// enqueue frontend scripts if necessary
|
120 |
-
function enqueue_scripts() {
|
121 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
122 |
-
wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
|
123 |
-
wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
|
124 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
|
125 |
-
}
|
126 |
-
} // enqueue_scripts
|
127 |
-
|
128 |
-
|
129 |
-
// enqueue CSS and JS scripts on widgets page
|
130 |
-
function admin_enqueue_scripts() {
|
131 |
-
if (self::is_plugin_admin_page()) {
|
132 |
-
$plugin_url = plugin_dir_url(__FILE__);
|
133 |
-
|
134 |
-
wp_enqueue_script('jquery-ui-tabs');
|
135 |
-
wp_enqueue_script('sn-cookie', $plugin_url . 'js/jquery.cookie.js', array('jquery'), GMW_VER, true);
|
136 |
-
wp_enqueue_script('gmw-admin', $plugin_url . 'js/gmw-admin.js', array(), GMW_VER, true);
|
137 |
-
wp_enqueue_style('gmw-admin', $plugin_url . 'css/gmw-admin.css', array(), GMW_VER);
|
138 |
-
} // if
|
139 |
-
} // admin_enqueue_scripts
|
140 |
-
|
141 |
-
|
142 |
-
// check if plugin's admin page is shown
|
143 |
-
function is_plugin_admin_page() {
|
144 |
-
$current_screen = get_current_screen();
|
145 |
-
|
146 |
-
if ($current_screen->id == 'widgets') {
|
147 |
-
return true;
|
148 |
-
} else {
|
149 |
-
return false;
|
150 |
-
}
|
151 |
-
} // is_plugin_admin_page
|
152 |
-
|
153 |
-
|
154 |
-
// helper function for creating dropdowns
|
155 |
-
function create_select_options($options, $selected = null, $output = true) {
|
156 |
-
$out = "\n";
|
157 |
-
|
158 |
-
foreach ($options as $tmp) {
|
159 |
-
if ($selected == $tmp['val']) {
|
160 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
161 |
-
} else {
|
162 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
163 |
-
}
|
164 |
-
} // foreach
|
165 |
-
|
166 |
-
if ($output) {
|
167 |
-
echo $out;
|
168 |
-
} else {
|
169 |
-
return $out;
|
170 |
-
}
|
171 |
-
} // create_select_options
|
172 |
-
} // class GMW
|
173 |
-
|
174 |
-
|
175 |
-
// hook everything up
|
176 |
-
add_action('init', array('GMW', 'init'));
|
177 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/images/blank.gif
DELETED
Binary file
|
tags/0.35/images/fancybox_loading.gif
DELETED
Binary file
|
tags/0.35/images/fancybox_overlay.png
DELETED
Binary file
|
tags/0.35/images/fancybox_sprite.png
DELETED
Binary file
|
tags/0.35/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/js/gmw.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('a.gmw-thumbnail-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
map_url = dialog.attr('data-map-iframe-url');
|
12 |
-
map_title = dialog.attr('title');
|
13 |
-
map_skin = dialog.attr('data-map-skin');
|
14 |
-
|
15 |
-
var content = $(dialog.html());
|
16 |
-
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
17 |
-
|
18 |
-
$.fancybox( { 'wrapCSS': map_skin, 'type': 'html', 'content': content, 'title': map_title, 'autoSize': true, 'minWidth': map_width, 'minHeight': map_height } );
|
19 |
-
|
20 |
-
return false;
|
21 |
-
});
|
22 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/js/jquery.fancybox.pack.js
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
2 |
-
(function(u,p,f,q){var o=f(u),n=f(p),b=f.fancybox=function(){b.open.apply(this,arguments)},z=null,m=p.createTouch!==q,x=function(a){return a&&a.hasOwnProperty&&a instanceof f},s=function(a){return a&&"string"===f.type(a)},C=function(a){return s(a)&&0<a.indexOf("%")},k=function(a,c){var e=parseInt(a,10);c&&C(a)&&(e*=b.getViewport()[c]/100);return Math.ceil(e)},v=function(a,b){return k(a,b)+"px"};f.extend(b,{version:"2.1.0",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,
|
3 |
-
maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!m,autoCenter:!m,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},
|
4 |
-
prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0"'+
|
5 |
-
(f.browser.msie?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",
|
6 |
-
openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{closeClick:!0,speedOut:200,showEarly:!0,css:{}},title:{type:"float"}},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},
|
7 |
-
group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,c){if(a&&(f.isPlainObject(c)||(c={}),!1!==b.close(!0)))return f.isArray(a)||(a=x(a)?f(a).get():[a]),f.each(a,function(e,d){var j={},g,h,i,l,k;"object"===f.type(d)&&(d.nodeType&&(d=f(d)),x(d)?(j={href:d.attr("href"),title:d.attr("title"),isDom:!0,element:d},f.metadata&&
|
8 |
-
f.extend(!0,j,d.metadata())):j=d);g=c.href||j.href||(s(d)?d:null);h=c.title!==q?c.title:j.title||"";l=(i=c.content||j.content)?"html":c.type||j.type;!l&&j.isDom&&(l=d.data("fancybox-type"),l||(l=(l=d.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));if(s(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":s(d)&&(l="html",i=d)),"ajax"===l))k=g.split(/\s+/,2),g=k.shift(),k=k.shift();i||("inline"===l?g?i=f(s(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=d):"html"===l?
|
9 |
-
i=g:!l&&(!g&&j.isDom)&&(l="inline",i=d));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,c),c.keys!==q&&(b.opts.keys=c.keys?f.extend({},b.defaults.keys,c.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0).trigger("onReset").remove(),b.current||
|
10 |
-
b.trigger("afterClose"),b.coming=null)},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),"fixed"===b.wrap.css("position")&&b.wrap.css(b._getPosition(!0)),b.transitions[b.current.closeMethod]()))},play:function(a){var c=function(){clearTimeout(b.player.timer)},
|
11 |
-
e=function(){c();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},d=function(){c();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":d,"beforeLoad.player":c}),e(),b.trigger("onPlayStart")}else d()},next:function(a){var c=b.current;
|
12 |
-
c&&(s(a)||(a=c.direction.next),b.jumpto(c.index+1,a,"next"))},prev:function(a){var c=b.current;c&&(s(a)||(a=c.direction.prev),b.jumpto(c.index-1,a,"prev"))},jumpto:function(a,c,e){var d=b.current;if(d&&(a=k(a),b.direction=c||d.direction[a>=d.index?"next":"prev"],b.router=e||"jumpto",d.loop&&(0>a&&(a=d.group.length+a%d.group.length),a%=d.group.length),d.group[a]!==q))b.cancel(),b._start(a)},reposition:function(a,c){var e;b.isOpen&&(e=b._getPosition(c),a&&"scroll"===a.type?(delete e.position,b.wrap.stop(!0,
|
13 |
-
!0).animate(e,200)):b.wrap.css(e))},update:function(a){var c=a&&a.type,e=!c||"orientationchange"===c;e&&(clearTimeout(z),z=null);if(b.isOpen&&!z){if(e||m)b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate");z=setTimeout(function(){var d=b.current;if(d){b.wrap.removeClass("fancybox-tmp");c!=="scroll"&&b._setDimension();c==="scroll"&&d.canShrink||b.reposition(a);b.trigger("onUpdate");z=null}},m?500:e?20:300)}},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?
|
14 |
-
a:!b.current.fitToView,b.update())},hideLoading:function(){n.unbind("keypress.fb");f("#fancybox-loading").remove()},showLoading:function(){var a,c;b.hideLoading();n.bind("keypress.fb",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");b.defaults.fixed||(c=b.getViewport(),a.css({position:"absolute",top:0.5*c.h+c.y,left:0.5*c.w+c.x}))},getViewport:function(){var a=b.current?b.current.locked:!1,
|
15 |
-
c={x:o.scrollLeft(),y:o.scrollTop()};a?(c.w=a[0].clientWidth,c.h=a[0].clientHeight):(c.w=m&&u.innerWidth?u.innerWidth:o.width(),c.h=m&&u.innerHeight?u.innerHeight:o.height());return c},unbindEvents:function(){b.wrap&&x(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");o.unbind(".fb")},bindEvents:function(){var a=b.current,c;a&&(o.bind("orientationchange.fb"+(m?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(c=a.keys)&&n.bind("keydown.fb",function(e){var d=e.which||e.keyCode,j=e.target||
|
16 |
-
e.srcElement;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(c,function(c,j){if(1<a.group.length&&j[d]!==q)return b[c](j[d]),e.preventDefault(),!1;if(-1<f.inArray(d,j))return b[c](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(c,d,j,g){for(var h=f(c.target||null),i=!1;h.length&&!i&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)i=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
|
17 |
-
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==d&&!i&&1<b.group.length&&!a.canShrink){if(0<g||0<j)b.prev(0<g?"down":"left");else if(0>g||0>j)b.next(0>g?"up":"right");c.preventDefault()}}))},trigger:function(a,c){var e,d=c||b.coming||b.current;if(d){f.isFunction(d[a])&&(e=d[a].apply(d,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;"onCancel"===a&&!b.isOpened&&(b.isActive=!1);d.helpers&&f.each(d.helpers,
|
18 |
-
function(c,e){if(e&&b.helpers[c]&&f.isFunction(b.helpers[c][a]))b.helpers[c][a](e,d)});f.event.trigger(a+".fb")}},isImage:function(a){return s(a)&&a.match(/\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$/i)},isSWF:function(a){return s(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var c={},e,d,a=k(a);e=b.group[a]||null;if(!e)return!1;c=f.extend(!0,{},b.opts,e);e=c.margin;d=c.padding;"number"===f.type(e)&&(c.margin=[e,e,e,e]);"number"===f.type(d)&&(c.padding=[d,d,d,d]);c.modal&&f.extend(!0,c,
|
19 |
-
{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});c.autoSize&&(c.autoWidth=c.autoHeight=!0);"auto"===c.width&&(c.autoWidth=!0);"auto"===c.height&&(c.autoHeight=!0);c.group=b.group;c.index=a;b.coming=c;if(!1===b.trigger("beforeLoad"))b.coming=null;else{d=c.type;e=c.href;if(!d)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===d||"swf"===d)c.autoHeight=c.autoWidth=
|
20 |
-
!1,c.scrolling="visible";"image"===d&&(c.aspectRatio=!0);"iframe"===d&&m&&(c.scrolling="scroll");c.wrap=f(c.tpl.wrap).addClass("fancybox-"+(m?"mobile":"desktop")+" fancybox-type-"+d+" fancybox-tmp "+c.wrapCSS).appendTo(c.parent);f.extend(c,{skin:f(".fancybox-skin",c.wrap),outer:f(".fancybox-outer",c.wrap),inner:f(".fancybox-inner",c.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){c.skin.css("padding"+b,v(c.padding[a]))});b.trigger("onReady");if("inline"===d||"html"===d){if(!c.content||
|
21 |
-
!c.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===d?b._loadImage():"ajax"===d?b._loadAjax():"iframe"===d?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width;b.coming.height=this.height;
|
22 |
-
b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;(a.complete===q||!a.complete)&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(c,e){"success"===e&&(a.content=c,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,c=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",
|
23 |
-
m?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),c.one("load",function(){f(this).data("ready",1);m||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=c.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,c=b.current,
|
24 |
-
e=a.length,d=c.preload?Math.min(c.preload,e-1):0,f,g;for(g=1;g<=d;g+=1)f=a[(c.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,c=b.current,e,d,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,c))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{c&&(b.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove(),"fixed"===c.wrap.css("position")&&c.wrap.css(b._getPosition(!0)));
|
25 |
-
b.unbindEvents();e=a.content;d=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:c});g=a.href;switch(d){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):x(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
26 |
-
false)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e=e+('<param name="'+a+'" value="'+b+'"></param>');h=h+(" "+a+'="'+b+'"')}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!x(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
27 |
-
a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();a.wrap.removeClass("fancybox-tmp");a.pos=f.extend({},a.dim,b._getPosition(!0));b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(c.prevMethod)b.transitions[c.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),c=0,e=!1,d=!1,e=b.wrap,j=b.skin,g=b.inner,h=
|
28 |
-
b.current,d=h.width,i=h.height,l=h.minWidth,t=h.minHeight,m=h.maxWidth,n=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,w=h.margin,o=w[1]+w[3],p=w[0]+w[2],x,r,u,A,y,D,z,B,E;e.add(j).add(g).width("auto").height("auto");w=j.outerWidth(!0)-j.width();x=j.outerHeight(!0)-j.height();r=o+w;u=p+x;A=C(d)?(a.w-r)*k(d)/100:d;y=C(i)?(a.h-u)*k(i)/100:i;if("iframe"===h.type){if(E=h.content,h.autoHeight&&1===E.data("ready"))try{E[0].contentWindow.document.location&&(g.width(A).height(9999),D=E.contents().find("body"),
|
29 |
-
q&&D.css("overflow-x","hidden"),y=D.height())}catch(F){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(A),h.autoHeight||g.height(y),h.autoWidth&&(A=g.width()),h.autoHeight&&(y=g.height()),g.removeClass("fancybox-tmp");d=k(A);i=k(y);B=A/y;l=k(C(l)?k(l,"w")-r:l);m=k(C(m)?k(m,"w")-r:m);t=k(C(t)?k(t,"h")-u:t);n=k(C(n)?k(n,"h")-u:n);D=m;z=n;o=a.w-o;p=a.h-p;if(h.aspectRatio){if(d>m&&(d=m,i=d/B),i>n&&(i=n,d=i*B),d<l&&(d=l,i=d/B),i<t)i=t,d=i*B}else d=Math.max(l,Math.min(d,
|
30 |
-
m)),i=Math.max(t,Math.min(i,n));if(h.fitToView)if(m=Math.min(a.w-r,m),n=Math.min(a.h-u,n),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height(),h.aspectRatio)for(;(a>o||r>p)&&(d>l&&i>t)&&!(19<c++);)i=Math.max(t,Math.min(n,i-10)),d=i*B,d<l&&(d=l,i=d/B),d>m&&(d=m,i=d/B),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height();else d=Math.max(l,Math.min(d,d-(a-o))),i=Math.max(t,Math.min(i,i-(r-p)));q&&("auto"===s&&i<y&&d+w+q<o)&&(d+=q);g.width(k(d)).height(k(i));e.width(k(d+
|
31 |
-
w));a=e.width();r=e.height();e=(a>o||r>p)&&d>l&&i>t;d=h.aspectRatio?d<D&&i<z&&d<A&&i<y:(d<D||i<z)&&(d<A||i<y);f.extend(h,{dim:{width:v(a),height:v(r)},origWidth:A,origHeight:y,canShrink:e,canExpand:d,wPadding:w,hPadding:x,wrapSpace:r-j.outerHeight(!0),skinSpace:j.height()-i});!E&&(h.autoHeight&&i>t&&i<n&&!d)&&g.height("auto")},_getPosition:function(a){var c=b.current,e=b.getViewport(),d=c.margin,f=b.wrap.width()+d[1]+d[3],g=b.wrap.height()+d[0]+d[2],d={position:"absolute",top:d[0],left:d[3]};c.autoCenter&&
|
32 |
-
c.fixed&&!a&&g<=e.h&&f<=e.w?d.position="fixed":c.locked||(d.top+=e.y,d.left+=e.x);d.top=v(Math.max(d.top,d.top+(e.h-g)*c.topRatio));d.left=v(Math.max(d.left,d.left+(e.w-f)*c.leftRatio));return d},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.addClass("fancybox-opened").css("overflow","visible"),b.reposition(),(a.closeClick||a.nextClick)&&b.inner.css("cursor","pointer").bind("click.fb",function(c){if(!f(c.target).is("a")&&!f(c.target).parent().is("a"))b[a.closeClick?"close":
|
33 |
-
"next"]()}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",b.close),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1)?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(){var a=b.current;f(".fancybox-wrap").stop(!0).trigger("onReset").remove();
|
34 |
-
f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,c=a.element,e=a.orig,d={},f=50,g=50,h=a.hPadding,i=a.wPadding,l=b.getViewport();!e&&(a.isDom&&c.is(":visible"))&&(e=c.find("img:first"),e.length||(e=c));x(e)?(d=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(d.top=l.y+(l.h-g)*a.topRatio,d.left=l.x+(l.w-f)*
|
35 |
-
a.leftRatio);a.locked&&(d.top-=l.y,d.left-=l.x);return d={top:v(d.top-h*a.topRatio),left:v(d.left-i*a.leftRatio),width:v(f+i),height:v(g+h)}},step:function(a,c){var e,d,f=c.prop;d=b.current;var g=d.wrapSpace,h=d.skinSpace;if("width"===f||"height"===f)e=c.end===c.start?1:(a-c.start)/(c.end-c.start),b.isClosing&&(e=1-e),d="width"===f?d.wPadding:d.hPadding,d=a-d,b.skin[f](k("width"===f?d:d-g*e)),b.inner[f](k("width"===f?d:d-g*e-h*e))},zoomIn:function(){var a=b.current,c=a.pos,e=a.openEffect,d="elastic"===
|
36 |
-
e,j=f.extend({opacity:1},c);delete j.position;d?(c=this.getOrigPosition(),a.openOpacity&&(c.opacity=0.1)):"fade"===e&&(c.opacity=0.1);b.wrap.css(c).animate(j,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:d?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,c=a.closeEffect,e="elastic"===c,d={opacity:0.1};e&&(d=this.getOrigPosition(),a.closeOpacity&&(d.opacity=0.1));b.wrap.animate(d,{duration:"none"===c?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,
|
37 |
-
complete:b._afterZoomOut})},changeIn:function(){var a=b.current,c=a.nextEffect,e=a.pos,d={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===c&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=v(k(e[g])-200),d[g]="+=200px"):(e[g]=v(k(e[g])+200),d[g]="-=200px"));"none"===c?b._afterZoomIn():b.wrap.css(e).animate(d,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,c=a.prevEffect,e={opacity:0.1},d=b.direction;"elastic"===c&&
|
38 |
-
(e["down"===d||"up"===d?"top":"left"]=("up"===d||"left"===d?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===c?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={overlay:null,update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=Math.max(p.documentElement.offsetWidth,p.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>o.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,
|
39 |
-
b){f(".fancybox-overlay").stop(!0,!0);this.overlay||f.extend(this,{overlay:f('<div class="fancybox-overlay"></div>').appendTo(b.parent),margin:n.height()>o.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,el:p.all&&!p.querySelector?f("html"):f("body")});b.fixed&&!m&&(this.overlay.addClass("fancybox-overlay-fixed"),b.autoCenter&&(this.overlay.append(b.wrap),b.locked=this.overlay));!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,c){var e=
|
40 |
-
this.overlay.unbind(".fb").width("auto").height("auto").css(a.css);a.closeClick&&e.bind("click.fb",function(a){f(a.target).hasClass("fancybox-overlay")&&b.close()});c.fixed&&!m?c.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+c.scrollbarWidth)):this.update();e.show()},onUpdate:function(a,b){(!b.fixed||m)&&this.update()},afterClose:function(a){var c=this,a=a.speedOut||0;c.overlay&&!b.isActive&&c.overlay.fadeOut(a||0,function(){f("body").css("margin-right",
|
41 |
-
c.margin);c.el.removeClass("fancybox-lock");c.overlay.remove();c.overlay=null})}};b.helpers.title={beforeShow:function(a){var c=b.current.title,e=a.type;if(s(c)&&""!==f.trim(c)){c=f('<div class="fancybox-title fancybox-title-'+e+'-wrap">'+c+"</div>");switch(e){case "inside":e=b.skin;break;case "outside":e=b.wrap;break;case "over":e=b.inner;break;default:e=b.skin,c.appendTo("body").width(c.width()).wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(k(c.css("margin-bottom")))}"top"===
|
42 |
-
a.position?c.prependTo(e):c.appendTo(e)}}};f.fn.fancybox=function(a){var c,e=f(this),d=this.selector||"",j=function(g){var h=f(this).blur(),i=c,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel",k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=d.length?f(d):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};c=a.index||0;!d||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",
|
43 |
-
j):n.undelegate(d,"click.fb-start").delegate(d+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);return this};n.ready(function(){f.scrollbarWidth===q&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===q){var a=f.support,c=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===c[0].offsetTop||
|
44 |
-
15===c[0].offsetTop;c.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/readme.txt
DELETED
@@ -1,136 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.2
|
8 |
-
Stable tag: 0.35
|
9 |
-
|
10 |
-
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Check out the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
17 |
-
|
18 |
-
**General widget options**
|
19 |
-
|
20 |
-
* title
|
21 |
-
* address
|
22 |
-
|
23 |
-
**Thumbnail map options**
|
24 |
-
|
25 |
-
* map size - width & height
|
26 |
-
* map type - road, satellite, map or hybrid
|
27 |
-
* pin color
|
28 |
-
* pin size
|
29 |
-
* zoom level
|
30 |
-
|
31 |
-
**Lightbox map options**
|
32 |
-
|
33 |
-
* map size - width & height
|
34 |
-
* map type - road, satellite, map or hybrid
|
35 |
-
* zoom level
|
36 |
-
* skin
|
37 |
-
* show/hide address bubble
|
38 |
-
* show/hide map title
|
39 |
-
* header text
|
40 |
-
* footer text
|
41 |
-
|
42 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
43 |
-
|
44 |
-
The plugin was voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian.
|
45 |
-
|
46 |
-
== Installation ==
|
47 |
-
|
48 |
-
Follow the usual routine;
|
49 |
-
|
50 |
-
1. Open WP admin - Plugins - Add New
|
51 |
-
2. Enter "Google Maps Widget" under search and hit Enter
|
52 |
-
3. Plugin will show up as the first on the list, click "Install Now"
|
53 |
-
|
54 |
-
Or if needed, upload manually;
|
55 |
-
|
56 |
-
1. Download the plugin.
|
57 |
-
2. Unzip it and upload to wp-content/plugin/
|
58 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
59 |
-
4. Configure the plugin under Appearance - Widgets
|
60 |
-
|
61 |
-
|
62 |
-
== Frequently Asked Questions ==
|
63 |
-
|
64 |
-
= Who is this plugin for? =
|
65 |
-
|
66 |
-
For just about anyone who needs a map on their site.
|
67 |
-
|
68 |
-
= It's not working!!! Arrrrrrrrr =
|
69 |
-
|
70 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
71 |
-
If you can figure it out open a thread in the support forums.
|
72 |
-
|
73 |
-
== Screenshots ==
|
74 |
-
|
75 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
76 |
-
2. Larger map with all features is available in the lightbox
|
77 |
-
3. Widget options - thumbnail map
|
78 |
-
4. Widget options - lightbox map
|
79 |
-
|
80 |
-
== Changelog ==
|
81 |
-
|
82 |
-
= 0.35 =
|
83 |
-
* 2012/09/28
|
84 |
-
* added 4 skins for lightbox
|
85 |
-
|
86 |
-
= 0.31 =
|
87 |
-
* 2012/09/14
|
88 |
-
* fix for bad themes which don't respect proper sidebar markup
|
89 |
-
|
90 |
-
= 0.3 =
|
91 |
-
* 2012/09/04
|
92 |
-
* lightbox script changed from jQuery UI Dialog to <a href="http://fancyapps.com/fancybox/">fancyBox2</a>
|
93 |
-
* added "show map title on lightbox" option
|
94 |
-
* significant speed improvements
|
95 |
-
* preparations for lightbox skins
|
96 |
-
|
97 |
-
= 0.22 =
|
98 |
-
* 2012/08/31
|
99 |
-
* Fixed small JS related GUI bug
|
100 |
-
|
101 |
-
= 0.2 =
|
102 |
-
* 2012/08/28
|
103 |
-
* Complete GUI rewrite
|
104 |
-
* Added header text option
|
105 |
-
* Added address bubble visibility option
|
106 |
-
* Fixed thumbnail map scaling bug
|
107 |
-
* Fixed lightbox map size bug
|
108 |
-
|
109 |
-
= 0.13 =
|
110 |
-
* 2012/08/09
|
111 |
-
* Added pin size for thumbnail map
|
112 |
-
|
113 |
-
= 0.12 =
|
114 |
-
* 2012/08/07
|
115 |
-
* Added pin color for thumbnail map
|
116 |
-
* Fixed a few minor bugs
|
117 |
-
|
118 |
-
= 0.11 =
|
119 |
-
* 2012/08/06
|
120 |
-
* Fixed a few minor bugs
|
121 |
-
|
122 |
-
= 0.1 =
|
123 |
-
* 2012/08/03
|
124 |
-
* Initial release
|
125 |
-
|
126 |
-
|
127 |
-
== Upgrade Notice ==
|
128 |
-
|
129 |
-
= 0.2 =
|
130 |
-
Due to variable name changes footer text will be reset
|
131 |
-
|
132 |
-
= 0.1x =
|
133 |
-
Upgrade without any fear :)
|
134 |
-
|
135 |
-
= 0.1 =
|
136 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.35/screenshot-1.png
DELETED
Binary file
|
tags/0.35/screenshot-2.png
DELETED
Binary file
|
tags/0.35/screenshot-3.png
DELETED
Binary file
|
tags/0.35/screenshot-4.png
DELETED
Binary file
|
tags/0.36/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/css/gmw.css
DELETED
@@ -1,306 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
275 |
-
|
276 |
-
/* lightbox skins */
|
277 |
-
.black-rounded .fancybox-skin {
|
278 |
-
background: black;
|
279 |
-
}
|
280 |
-
.black-rounded .fancybox-title-float-wrap .child {
|
281 |
-
background: black;
|
282 |
-
}
|
283 |
-
|
284 |
-
.white-square .fancybox-skin {
|
285 |
-
-webkit-border-radius: 0;
|
286 |
-
-moz-border-radius: 0;
|
287 |
-
border-radius: 0;
|
288 |
-
}
|
289 |
-
.white-square .fancybox-title-float-wrap .child {
|
290 |
-
-webkit-border-radius: 0;
|
291 |
-
-moz-border-radius: 0;
|
292 |
-
border-radius: 0;
|
293 |
-
}
|
294 |
-
|
295 |
-
.black-square .fancybox-skin {
|
296 |
-
background: black;
|
297 |
-
-webkit-border-radius: 0;
|
298 |
-
-moz-border-radius: 0;
|
299 |
-
border-radius: 0;
|
300 |
-
}
|
301 |
-
.black-square .fancybox-title-float-wrap .child {
|
302 |
-
background: black;
|
303 |
-
-webkit-border-radius: 0;
|
304 |
-
-moz-border-radius: 0;
|
305 |
-
border-radius: 0;
|
306 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/gmw-widget.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_skin' => '',
|
32 |
-
'lightbox_title' => '1',
|
33 |
-
'lightbox_header' => '',
|
34 |
-
'lightbox_footer' => ''));
|
35 |
-
|
36 |
-
$title = $instance['title'];
|
37 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
38 |
-
$lightbox_header = $instance['lightbox_header'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$lightbox_width = $instance['lightbox_width'];
|
47 |
-
$lightbox_height = $instance['lightbox_height'];
|
48 |
-
$lightbox_type = $instance['lightbox_type'];
|
49 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
50 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
51 |
-
$lightbox_title = $instance['lightbox_title'];
|
52 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
53 |
-
|
54 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
55 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
56 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
57 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
58 |
-
|
59 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
60 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
61 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
62 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
63 |
-
|
64 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
65 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
66 |
-
array('val' => 'green', 'label' => 'Green'),
|
67 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
68 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
69 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
70 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
71 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
72 |
-
array('val' => 'red', 'label' => 'Red'),
|
73 |
-
array('val' => 'white', 'label' => 'White'));
|
74 |
-
|
75 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
76 |
-
array('val' => 'small', 'label' => 'Small'),
|
77 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
78 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
79 |
-
|
80 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
81 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
82 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
83 |
-
}
|
84 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
85 |
-
|
86 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'White with rounded corners (default)');
|
87 |
-
$lightbox_skins[] = array('val' => 'black-rounded', 'label' => 'Black with rounded corners');
|
88 |
-
$lightbox_skins[] = array('val' => 'white-square', 'label' => 'White with square corners');
|
89 |
-
$lightbox_skins[] = array('val' => 'black-square', 'label' => 'Black with square corners');
|
90 |
-
|
91 |
-
|
92 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
93 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
94 |
-
|
95 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
96 |
-
echo '<div id="gmw-thumb">';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
99 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
100 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
101 |
-
echo ' px</p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
105 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
110 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
114 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
115 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
116 |
-
echo '</select></p>';
|
117 |
-
|
118 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
119 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
120 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
121 |
-
echo '</select></p>';
|
122 |
-
|
123 |
-
echo '</div>'; // thumbnail tab
|
124 |
-
echo '<div id="gmw-lightbox">';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
127 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
128 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
129 |
-
echo ' px</p>';
|
130 |
-
|
131 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
132 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
133 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
134 |
-
echo '</select></p>';
|
135 |
-
|
136 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
137 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
138 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
139 |
-
echo '</select></p>';
|
140 |
-
|
141 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
142 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
143 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
144 |
-
echo '</select></p>';
|
145 |
-
|
146 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
147 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
148 |
-
echo '</p>';
|
149 |
-
|
150 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
151 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
152 |
-
echo '</p>';
|
153 |
-
|
154 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
155 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
156 |
-
|
157 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
158 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
159 |
-
|
160 |
-
echo '</div>'; // lightbox tab
|
161 |
-
echo '</div>'; // tabs
|
162 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
163 |
-
}
|
164 |
-
|
165 |
-
function update($new_instance, $old_instance) {
|
166 |
-
$instance = $old_instance;
|
167 |
-
|
168 |
-
$instance['title'] = $new_instance['title'];
|
169 |
-
$instance['address'] = $new_instance['address'];
|
170 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
171 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
172 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
173 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
174 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
175 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
176 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
177 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
178 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
179 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
180 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
181 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
182 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
183 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
184 |
-
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
185 |
-
|
186 |
-
return $instance;
|
187 |
-
}
|
188 |
-
|
189 |
-
function widget($args, $instance) {
|
190 |
-
$out = $tmp = '';
|
191 |
-
|
192 |
-
extract($args, EXTR_SKIP);
|
193 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
194 |
-
'width' => $instance['lightbox_width'],
|
195 |
-
'height' => $instance['lightbox_height'],
|
196 |
-
'footer' => $instance['lightbox_footer'],
|
197 |
-
'header' => $instance['lightbox_header'],
|
198 |
-
'address' => $instance['address'],
|
199 |
-
'zoom' => $instance['lightbox_zoom'],
|
200 |
-
'type' => $instance['lightbox_type'],
|
201 |
-
'skin' => $instance['lightbox_skin'],
|
202 |
-
'bubble' => $instance['lightbox_bubble'],
|
203 |
-
'id' => $widget_id);
|
204 |
-
|
205 |
-
$out .= $before_widget;
|
206 |
-
|
207 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
208 |
-
if (!empty($title)) {
|
209 |
-
$out .= $before_title . $title . $after_title;
|
210 |
-
}
|
211 |
-
|
212 |
-
$tmp .= '<p><a class="gmw-thumbnail-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
213 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
214 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
215 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
216 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
217 |
-
urlencode($instance['address']) . '"></a>';
|
218 |
-
$tmp .= '</p>';
|
219 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
220 |
-
|
221 |
-
$out .= $after_widget;
|
222 |
-
|
223 |
-
echo $out;
|
224 |
-
}
|
225 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/google-maps-widget.php
DELETED
@@ -1,177 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.36
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
define('GMW_VER', '0.36');
|
18 |
-
require 'gmw-widget.php';
|
19 |
-
|
20 |
-
|
21 |
-
class GMW {
|
22 |
-
function init() {
|
23 |
-
if (is_admin()) {
|
24 |
-
// check if minimal required WP version is used
|
25 |
-
self::check_wp_version(3.2);
|
26 |
-
|
27 |
-
// aditional links in plugin description
|
28 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
29 |
-
array(__CLASS__, 'plugin_action_links'));
|
30 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
31 |
-
|
32 |
-
// enqueue admin scripts
|
33 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
34 |
-
} else {
|
35 |
-
// enqueue frontend scripts
|
36 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
37 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
38 |
-
}
|
39 |
-
} // init
|
40 |
-
|
41 |
-
|
42 |
-
// initialize widgets
|
43 |
-
function widgets_init() {
|
44 |
-
register_widget('GoogleMapsWidget');
|
45 |
-
} // widgets_init
|
46 |
-
|
47 |
-
|
48 |
-
// add settings link to plugins page
|
49 |
-
function plugin_action_links($links) {
|
50 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
51 |
-
array_unshift($links, $settings_link);
|
52 |
-
|
53 |
-
return $links;
|
54 |
-
} // plugin_action_links
|
55 |
-
|
56 |
-
|
57 |
-
// add links to plugin's description in plugins table
|
58 |
-
function plugin_meta_links($links, $file) {
|
59 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
60 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
61 |
-
|
62 |
-
if ($file == plugin_basename(__FILE__)) {
|
63 |
-
//$links[] = $documentation_link;
|
64 |
-
$links[] = $support_link;
|
65 |
-
}
|
66 |
-
|
67 |
-
return $links;
|
68 |
-
} // plugin_meta_links
|
69 |
-
|
70 |
-
|
71 |
-
// check if user has the minimal WP version required by the plugin
|
72 |
-
function check_wp_version($min_version) {
|
73 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
74 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
75 |
-
}
|
76 |
-
} // check_wp_version
|
77 |
-
|
78 |
-
|
79 |
-
// display error message if WP version is too low
|
80 |
-
function min_version_error() {
|
81 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
82 |
-
} // min_version_error
|
83 |
-
|
84 |
-
|
85 |
-
// print dialogs markup in footer
|
86 |
-
function dialogs_markup() {
|
87 |
-
$out = '';
|
88 |
-
$widgets = GoogleMapsWidget::$widgets;
|
89 |
-
|
90 |
-
if (!$widgets) {
|
91 |
-
wp_dequeue_script('gmw');
|
92 |
-
wp_dequeue_script('gmw-fancybox');
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
foreach ($widgets as $widget) {
|
97 |
-
if ($widget['bubble']) {
|
98 |
-
$iwloc = 'addr';
|
99 |
-
} else {
|
100 |
-
$iwloc = 'near';
|
101 |
-
}
|
102 |
-
$map_url = 'http://maps.google.co.uk/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['zoom']) . '';
|
103 |
-
|
104 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-map-skin="' . $widget['skin'] . '" data-map-iframe-url="' . $map_url . '" id="dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '">';
|
105 |
-
if ($widget['header']) {
|
106 |
-
$out .= '<div class="gmw-header"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
107 |
-
}
|
108 |
-
$out .= '<div class="gmw-map"></div>';
|
109 |
-
if ($widget['footer']) {
|
110 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
111 |
-
}
|
112 |
-
$out .= "</div>\n";
|
113 |
-
} // foreach $widgets
|
114 |
-
|
115 |
-
echo $out;
|
116 |
-
} // run_scroller
|
117 |
-
|
118 |
-
|
119 |
-
// enqueue frontend scripts if necessary
|
120 |
-
function enqueue_scripts() {
|
121 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
122 |
-
wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
|
123 |
-
wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
|
124 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
|
125 |
-
}
|
126 |
-
} // enqueue_scripts
|
127 |
-
|
128 |
-
|
129 |
-
// enqueue CSS and JS scripts on widgets page
|
130 |
-
function admin_enqueue_scripts() {
|
131 |
-
if (self::is_plugin_admin_page()) {
|
132 |
-
$plugin_url = plugin_dir_url(__FILE__);
|
133 |
-
|
134 |
-
wp_enqueue_script('jquery-ui-tabs');
|
135 |
-
wp_enqueue_script('sn-cookie', $plugin_url . 'js/jquery.cookie.js', array('jquery'), GMW_VER, true);
|
136 |
-
wp_enqueue_script('gmw-admin', $plugin_url . 'js/gmw-admin.js', array(), GMW_VER, true);
|
137 |
-
wp_enqueue_style('gmw-admin', $plugin_url . 'css/gmw-admin.css', array(), GMW_VER);
|
138 |
-
} // if
|
139 |
-
} // admin_enqueue_scripts
|
140 |
-
|
141 |
-
|
142 |
-
// check if plugin's admin page is shown
|
143 |
-
function is_plugin_admin_page() {
|
144 |
-
$current_screen = get_current_screen();
|
145 |
-
|
146 |
-
if ($current_screen->id == 'widgets') {
|
147 |
-
return true;
|
148 |
-
} else {
|
149 |
-
return false;
|
150 |
-
}
|
151 |
-
} // is_plugin_admin_page
|
152 |
-
|
153 |
-
|
154 |
-
// helper function for creating dropdowns
|
155 |
-
function create_select_options($options, $selected = null, $output = true) {
|
156 |
-
$out = "\n";
|
157 |
-
|
158 |
-
foreach ($options as $tmp) {
|
159 |
-
if ($selected == $tmp['val']) {
|
160 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
161 |
-
} else {
|
162 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
163 |
-
}
|
164 |
-
} // foreach
|
165 |
-
|
166 |
-
if ($output) {
|
167 |
-
echo $out;
|
168 |
-
} else {
|
169 |
-
return $out;
|
170 |
-
}
|
171 |
-
} // create_select_options
|
172 |
-
} // class GMW
|
173 |
-
|
174 |
-
|
175 |
-
// hook everything up
|
176 |
-
add_action('init', array('GMW', 'init'));
|
177 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/images/blank.gif
DELETED
Binary file
|
tags/0.36/images/fancybox_loading.gif
DELETED
Binary file
|
tags/0.36/images/fancybox_overlay.png
DELETED
Binary file
|
tags/0.36/images/fancybox_sprite.png
DELETED
Binary file
|
tags/0.36/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/js/gmw.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('a.gmw-thumbnail-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
map_url = dialog.attr('data-map-iframe-url');
|
12 |
-
map_title = dialog.attr('title');
|
13 |
-
map_skin = dialog.attr('data-map-skin');
|
14 |
-
|
15 |
-
var content = $(dialog.html());
|
16 |
-
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
17 |
-
|
18 |
-
$.fancybox( { 'wrapCSS': map_skin, 'type': 'html', 'content': content, 'title': map_title, 'autoSize': true, 'minWidth': map_width, 'minHeight': map_height } );
|
19 |
-
|
20 |
-
return false;
|
21 |
-
});
|
22 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/js/jquery.fancybox.pack.js
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
2 |
-
(function(u,p,f,q){var o=f(u),n=f(p),b=f.fancybox=function(){b.open.apply(this,arguments)},z=null,m=p.createTouch!==q,x=function(a){return a&&a.hasOwnProperty&&a instanceof f},s=function(a){return a&&"string"===f.type(a)},C=function(a){return s(a)&&0<a.indexOf("%")},k=function(a,c){var e=parseInt(a,10);c&&C(a)&&(e*=b.getViewport()[c]/100);return Math.ceil(e)},v=function(a,b){return k(a,b)+"px"};f.extend(b,{version:"2.1.0",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,
|
3 |
-
maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!m,autoCenter:!m,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},
|
4 |
-
prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0"'+
|
5 |
-
(f.browser.msie?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",
|
6 |
-
openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{closeClick:!0,speedOut:200,showEarly:!0,css:{}},title:{type:"float"}},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},
|
7 |
-
group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,c){if(a&&(f.isPlainObject(c)||(c={}),!1!==b.close(!0)))return f.isArray(a)||(a=x(a)?f(a).get():[a]),f.each(a,function(e,d){var j={},g,h,i,l,k;"object"===f.type(d)&&(d.nodeType&&(d=f(d)),x(d)?(j={href:d.attr("href"),title:d.attr("title"),isDom:!0,element:d},f.metadata&&
|
8 |
-
f.extend(!0,j,d.metadata())):j=d);g=c.href||j.href||(s(d)?d:null);h=c.title!==q?c.title:j.title||"";l=(i=c.content||j.content)?"html":c.type||j.type;!l&&j.isDom&&(l=d.data("fancybox-type"),l||(l=(l=d.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));if(s(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":s(d)&&(l="html",i=d)),"ajax"===l))k=g.split(/\s+/,2),g=k.shift(),k=k.shift();i||("inline"===l?g?i=f(s(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=d):"html"===l?
|
9 |
-
i=g:!l&&(!g&&j.isDom)&&(l="inline",i=d));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,c),c.keys!==q&&(b.opts.keys=c.keys?f.extend({},b.defaults.keys,c.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0).trigger("onReset").remove(),b.current||
|
10 |
-
b.trigger("afterClose"),b.coming=null)},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),"fixed"===b.wrap.css("position")&&b.wrap.css(b._getPosition(!0)),b.transitions[b.current.closeMethod]()))},play:function(a){var c=function(){clearTimeout(b.player.timer)},
|
11 |
-
e=function(){c();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},d=function(){c();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":d,"beforeLoad.player":c}),e(),b.trigger("onPlayStart")}else d()},next:function(a){var c=b.current;
|
12 |
-
c&&(s(a)||(a=c.direction.next),b.jumpto(c.index+1,a,"next"))},prev:function(a){var c=b.current;c&&(s(a)||(a=c.direction.prev),b.jumpto(c.index-1,a,"prev"))},jumpto:function(a,c,e){var d=b.current;if(d&&(a=k(a),b.direction=c||d.direction[a>=d.index?"next":"prev"],b.router=e||"jumpto",d.loop&&(0>a&&(a=d.group.length+a%d.group.length),a%=d.group.length),d.group[a]!==q))b.cancel(),b._start(a)},reposition:function(a,c){var e;b.isOpen&&(e=b._getPosition(c),a&&"scroll"===a.type?(delete e.position,b.wrap.stop(!0,
|
13 |
-
!0).animate(e,200)):b.wrap.css(e))},update:function(a){var c=a&&a.type,e=!c||"orientationchange"===c;e&&(clearTimeout(z),z=null);if(b.isOpen&&!z){if(e||m)b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate");z=setTimeout(function(){var d=b.current;if(d){b.wrap.removeClass("fancybox-tmp");c!=="scroll"&&b._setDimension();c==="scroll"&&d.canShrink||b.reposition(a);b.trigger("onUpdate");z=null}},m?500:e?20:300)}},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?
|
14 |
-
a:!b.current.fitToView,b.update())},hideLoading:function(){n.unbind("keypress.fb");f("#fancybox-loading").remove()},showLoading:function(){var a,c;b.hideLoading();n.bind("keypress.fb",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");b.defaults.fixed||(c=b.getViewport(),a.css({position:"absolute",top:0.5*c.h+c.y,left:0.5*c.w+c.x}))},getViewport:function(){var a=b.current?b.current.locked:!1,
|
15 |
-
c={x:o.scrollLeft(),y:o.scrollTop()};a?(c.w=a[0].clientWidth,c.h=a[0].clientHeight):(c.w=m&&u.innerWidth?u.innerWidth:o.width(),c.h=m&&u.innerHeight?u.innerHeight:o.height());return c},unbindEvents:function(){b.wrap&&x(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");o.unbind(".fb")},bindEvents:function(){var a=b.current,c;a&&(o.bind("orientationchange.fb"+(m?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(c=a.keys)&&n.bind("keydown.fb",function(e){var d=e.which||e.keyCode,j=e.target||
|
16 |
-
e.srcElement;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(c,function(c,j){if(1<a.group.length&&j[d]!==q)return b[c](j[d]),e.preventDefault(),!1;if(-1<f.inArray(d,j))return b[c](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(c,d,j,g){for(var h=f(c.target||null),i=!1;h.length&&!i&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)i=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
|
17 |
-
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==d&&!i&&1<b.group.length&&!a.canShrink){if(0<g||0<j)b.prev(0<g?"down":"left");else if(0>g||0>j)b.next(0>g?"up":"right");c.preventDefault()}}))},trigger:function(a,c){var e,d=c||b.coming||b.current;if(d){f.isFunction(d[a])&&(e=d[a].apply(d,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;"onCancel"===a&&!b.isOpened&&(b.isActive=!1);d.helpers&&f.each(d.helpers,
|
18 |
-
function(c,e){if(e&&b.helpers[c]&&f.isFunction(b.helpers[c][a]))b.helpers[c][a](e,d)});f.event.trigger(a+".fb")}},isImage:function(a){return s(a)&&a.match(/\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$/i)},isSWF:function(a){return s(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var c={},e,d,a=k(a);e=b.group[a]||null;if(!e)return!1;c=f.extend(!0,{},b.opts,e);e=c.margin;d=c.padding;"number"===f.type(e)&&(c.margin=[e,e,e,e]);"number"===f.type(d)&&(c.padding=[d,d,d,d]);c.modal&&f.extend(!0,c,
|
19 |
-
{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});c.autoSize&&(c.autoWidth=c.autoHeight=!0);"auto"===c.width&&(c.autoWidth=!0);"auto"===c.height&&(c.autoHeight=!0);c.group=b.group;c.index=a;b.coming=c;if(!1===b.trigger("beforeLoad"))b.coming=null;else{d=c.type;e=c.href;if(!d)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===d||"swf"===d)c.autoHeight=c.autoWidth=
|
20 |
-
!1,c.scrolling="visible";"image"===d&&(c.aspectRatio=!0);"iframe"===d&&m&&(c.scrolling="scroll");c.wrap=f(c.tpl.wrap).addClass("fancybox-"+(m?"mobile":"desktop")+" fancybox-type-"+d+" fancybox-tmp "+c.wrapCSS).appendTo(c.parent);f.extend(c,{skin:f(".fancybox-skin",c.wrap),outer:f(".fancybox-outer",c.wrap),inner:f(".fancybox-inner",c.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){c.skin.css("padding"+b,v(c.padding[a]))});b.trigger("onReady");if("inline"===d||"html"===d){if(!c.content||
|
21 |
-
!c.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===d?b._loadImage():"ajax"===d?b._loadAjax():"iframe"===d?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width;b.coming.height=this.height;
|
22 |
-
b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;(a.complete===q||!a.complete)&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(c,e){"success"===e&&(a.content=c,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,c=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",
|
23 |
-
m?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),c.one("load",function(){f(this).data("ready",1);m||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=c.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,c=b.current,
|
24 |
-
e=a.length,d=c.preload?Math.min(c.preload,e-1):0,f,g;for(g=1;g<=d;g+=1)f=a[(c.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,c=b.current,e,d,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,c))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{c&&(b.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove(),"fixed"===c.wrap.css("position")&&c.wrap.css(b._getPosition(!0)));
|
25 |
-
b.unbindEvents();e=a.content;d=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:c});g=a.href;switch(d){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):x(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
26 |
-
false)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e=e+('<param name="'+a+'" value="'+b+'"></param>');h=h+(" "+a+'="'+b+'"')}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!x(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
27 |
-
a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();a.wrap.removeClass("fancybox-tmp");a.pos=f.extend({},a.dim,b._getPosition(!0));b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(c.prevMethod)b.transitions[c.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),c=0,e=!1,d=!1,e=b.wrap,j=b.skin,g=b.inner,h=
|
28 |
-
b.current,d=h.width,i=h.height,l=h.minWidth,t=h.minHeight,m=h.maxWidth,n=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,w=h.margin,o=w[1]+w[3],p=w[0]+w[2],x,r,u,A,y,D,z,B,E;e.add(j).add(g).width("auto").height("auto");w=j.outerWidth(!0)-j.width();x=j.outerHeight(!0)-j.height();r=o+w;u=p+x;A=C(d)?(a.w-r)*k(d)/100:d;y=C(i)?(a.h-u)*k(i)/100:i;if("iframe"===h.type){if(E=h.content,h.autoHeight&&1===E.data("ready"))try{E[0].contentWindow.document.location&&(g.width(A).height(9999),D=E.contents().find("body"),
|
29 |
-
q&&D.css("overflow-x","hidden"),y=D.height())}catch(F){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(A),h.autoHeight||g.height(y),h.autoWidth&&(A=g.width()),h.autoHeight&&(y=g.height()),g.removeClass("fancybox-tmp");d=k(A);i=k(y);B=A/y;l=k(C(l)?k(l,"w")-r:l);m=k(C(m)?k(m,"w")-r:m);t=k(C(t)?k(t,"h")-u:t);n=k(C(n)?k(n,"h")-u:n);D=m;z=n;o=a.w-o;p=a.h-p;if(h.aspectRatio){if(d>m&&(d=m,i=d/B),i>n&&(i=n,d=i*B),d<l&&(d=l,i=d/B),i<t)i=t,d=i*B}else d=Math.max(l,Math.min(d,
|
30 |
-
m)),i=Math.max(t,Math.min(i,n));if(h.fitToView)if(m=Math.min(a.w-r,m),n=Math.min(a.h-u,n),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height(),h.aspectRatio)for(;(a>o||r>p)&&(d>l&&i>t)&&!(19<c++);)i=Math.max(t,Math.min(n,i-10)),d=i*B,d<l&&(d=l,i=d/B),d>m&&(d=m,i=d/B),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height();else d=Math.max(l,Math.min(d,d-(a-o))),i=Math.max(t,Math.min(i,i-(r-p)));q&&("auto"===s&&i<y&&d+w+q<o)&&(d+=q);g.width(k(d)).height(k(i));e.width(k(d+
|
31 |
-
w));a=e.width();r=e.height();e=(a>o||r>p)&&d>l&&i>t;d=h.aspectRatio?d<D&&i<z&&d<A&&i<y:(d<D||i<z)&&(d<A||i<y);f.extend(h,{dim:{width:v(a),height:v(r)},origWidth:A,origHeight:y,canShrink:e,canExpand:d,wPadding:w,hPadding:x,wrapSpace:r-j.outerHeight(!0),skinSpace:j.height()-i});!E&&(h.autoHeight&&i>t&&i<n&&!d)&&g.height("auto")},_getPosition:function(a){var c=b.current,e=b.getViewport(),d=c.margin,f=b.wrap.width()+d[1]+d[3],g=b.wrap.height()+d[0]+d[2],d={position:"absolute",top:d[0],left:d[3]};c.autoCenter&&
|
32 |
-
c.fixed&&!a&&g<=e.h&&f<=e.w?d.position="fixed":c.locked||(d.top+=e.y,d.left+=e.x);d.top=v(Math.max(d.top,d.top+(e.h-g)*c.topRatio));d.left=v(Math.max(d.left,d.left+(e.w-f)*c.leftRatio));return d},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.addClass("fancybox-opened").css("overflow","visible"),b.reposition(),(a.closeClick||a.nextClick)&&b.inner.css("cursor","pointer").bind("click.fb",function(c){if(!f(c.target).is("a")&&!f(c.target).parent().is("a"))b[a.closeClick?"close":
|
33 |
-
"next"]()}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",b.close),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1)?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(){var a=b.current;f(".fancybox-wrap").stop(!0).trigger("onReset").remove();
|
34 |
-
f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,c=a.element,e=a.orig,d={},f=50,g=50,h=a.hPadding,i=a.wPadding,l=b.getViewport();!e&&(a.isDom&&c.is(":visible"))&&(e=c.find("img:first"),e.length||(e=c));x(e)?(d=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(d.top=l.y+(l.h-g)*a.topRatio,d.left=l.x+(l.w-f)*
|
35 |
-
a.leftRatio);a.locked&&(d.top-=l.y,d.left-=l.x);return d={top:v(d.top-h*a.topRatio),left:v(d.left-i*a.leftRatio),width:v(f+i),height:v(g+h)}},step:function(a,c){var e,d,f=c.prop;d=b.current;var g=d.wrapSpace,h=d.skinSpace;if("width"===f||"height"===f)e=c.end===c.start?1:(a-c.start)/(c.end-c.start),b.isClosing&&(e=1-e),d="width"===f?d.wPadding:d.hPadding,d=a-d,b.skin[f](k("width"===f?d:d-g*e)),b.inner[f](k("width"===f?d:d-g*e-h*e))},zoomIn:function(){var a=b.current,c=a.pos,e=a.openEffect,d="elastic"===
|
36 |
-
e,j=f.extend({opacity:1},c);delete j.position;d?(c=this.getOrigPosition(),a.openOpacity&&(c.opacity=0.1)):"fade"===e&&(c.opacity=0.1);b.wrap.css(c).animate(j,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:d?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,c=a.closeEffect,e="elastic"===c,d={opacity:0.1};e&&(d=this.getOrigPosition(),a.closeOpacity&&(d.opacity=0.1));b.wrap.animate(d,{duration:"none"===c?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,
|
37 |
-
complete:b._afterZoomOut})},changeIn:function(){var a=b.current,c=a.nextEffect,e=a.pos,d={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===c&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=v(k(e[g])-200),d[g]="+=200px"):(e[g]=v(k(e[g])+200),d[g]="-=200px"));"none"===c?b._afterZoomIn():b.wrap.css(e).animate(d,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,c=a.prevEffect,e={opacity:0.1},d=b.direction;"elastic"===c&&
|
38 |
-
(e["down"===d||"up"===d?"top":"left"]=("up"===d||"left"===d?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===c?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={overlay:null,update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=Math.max(p.documentElement.offsetWidth,p.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>o.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,
|
39 |
-
b){f(".fancybox-overlay").stop(!0,!0);this.overlay||f.extend(this,{overlay:f('<div class="fancybox-overlay"></div>').appendTo(b.parent),margin:n.height()>o.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,el:p.all&&!p.querySelector?f("html"):f("body")});b.fixed&&!m&&(this.overlay.addClass("fancybox-overlay-fixed"),b.autoCenter&&(this.overlay.append(b.wrap),b.locked=this.overlay));!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,c){var e=
|
40 |
-
this.overlay.unbind(".fb").width("auto").height("auto").css(a.css);a.closeClick&&e.bind("click.fb",function(a){f(a.target).hasClass("fancybox-overlay")&&b.close()});c.fixed&&!m?c.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+c.scrollbarWidth)):this.update();e.show()},onUpdate:function(a,b){(!b.fixed||m)&&this.update()},afterClose:function(a){var c=this,a=a.speedOut||0;c.overlay&&!b.isActive&&c.overlay.fadeOut(a||0,function(){f("body").css("margin-right",
|
41 |
-
c.margin);c.el.removeClass("fancybox-lock");c.overlay.remove();c.overlay=null})}};b.helpers.title={beforeShow:function(a){var c=b.current.title,e=a.type;if(s(c)&&""!==f.trim(c)){c=f('<div class="fancybox-title fancybox-title-'+e+'-wrap">'+c+"</div>");switch(e){case "inside":e=b.skin;break;case "outside":e=b.wrap;break;case "over":e=b.inner;break;default:e=b.skin,c.appendTo("body").width(c.width()).wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(k(c.css("margin-bottom")))}"top"===
|
42 |
-
a.position?c.prependTo(e):c.appendTo(e)}}};f.fn.fancybox=function(a){var c,e=f(this),d=this.selector||"",j=function(g){var h=f(this).blur(),i=c,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel",k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=d.length?f(d):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};c=a.index||0;!d||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",
|
43 |
-
j):n.undelegate(d,"click.fb-start").delegate(d+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);return this};n.ready(function(){f.scrollbarWidth===q&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===q){var a=f.support,c=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===c[0].offsetTop||
|
44 |
-
15===c[0].offsetTop;c.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/readme.txt
DELETED
@@ -1,136 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.2
|
8 |
-
Stable tag: 0.36
|
9 |
-
|
10 |
-
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Check out the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
17 |
-
|
18 |
-
**General widget options**
|
19 |
-
|
20 |
-
* title
|
21 |
-
* address
|
22 |
-
|
23 |
-
**Thumbnail map options**
|
24 |
-
|
25 |
-
* map size - width & height
|
26 |
-
* map type - road, satellite, map or hybrid
|
27 |
-
* pin color
|
28 |
-
* pin size
|
29 |
-
* zoom level
|
30 |
-
|
31 |
-
**Lightbox map options**
|
32 |
-
|
33 |
-
* map size - width & height
|
34 |
-
* map type - road, satellite, map or hybrid
|
35 |
-
* zoom level
|
36 |
-
* skin
|
37 |
-
* show/hide address bubble
|
38 |
-
* show/hide map title
|
39 |
-
* header text
|
40 |
-
* footer text
|
41 |
-
|
42 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
43 |
-
|
44 |
-
The plugin was voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian.
|
45 |
-
|
46 |
-
== Installation ==
|
47 |
-
|
48 |
-
Follow the usual routine;
|
49 |
-
|
50 |
-
1. Open WP admin - Plugins - Add New
|
51 |
-
2. Enter "Google Maps Widget" under search and hit Enter
|
52 |
-
3. Plugin will show up as the first on the list, click "Install Now"
|
53 |
-
|
54 |
-
Or if needed, upload manually;
|
55 |
-
|
56 |
-
1. Download the plugin.
|
57 |
-
2. Unzip it and upload to wp-content/plugin/
|
58 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
59 |
-
4. Configure the plugin under Appearance - Widgets
|
60 |
-
|
61 |
-
|
62 |
-
== Frequently Asked Questions ==
|
63 |
-
|
64 |
-
= Who is this plugin for? =
|
65 |
-
|
66 |
-
For just about anyone who needs a map on their site.
|
67 |
-
|
68 |
-
= It's not working!!! Arrrrrrrrr =
|
69 |
-
|
70 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
71 |
-
If you can figure it out open a thread in the support forums.
|
72 |
-
|
73 |
-
== Screenshots ==
|
74 |
-
|
75 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
76 |
-
2. Larger map with all features is available in the lightbox
|
77 |
-
3. Widget options - thumbnail map
|
78 |
-
4. Widget options - lightbox map
|
79 |
-
|
80 |
-
== Changelog ==
|
81 |
-
|
82 |
-
= 0.35 =
|
83 |
-
* 2012/09/28
|
84 |
-
* added 4 skins for lightbox
|
85 |
-
|
86 |
-
= 0.31 =
|
87 |
-
* 2012/09/14
|
88 |
-
* fix for bad themes which don't respect proper sidebar markup
|
89 |
-
|
90 |
-
= 0.3 =
|
91 |
-
* 2012/09/04
|
92 |
-
* lightbox script changed from jQuery UI Dialog to <a href="http://fancyapps.com/fancybox/">fancyBox2</a>
|
93 |
-
* added "show map title on lightbox" option
|
94 |
-
* significant speed improvements
|
95 |
-
* preparations for lightbox skins
|
96 |
-
|
97 |
-
= 0.22 =
|
98 |
-
* 2012/08/31
|
99 |
-
* Fixed small JS related GUI bug
|
100 |
-
|
101 |
-
= 0.2 =
|
102 |
-
* 2012/08/28
|
103 |
-
* Complete GUI rewrite
|
104 |
-
* Added header text option
|
105 |
-
* Added address bubble visibility option
|
106 |
-
* Fixed thumbnail map scaling bug
|
107 |
-
* Fixed lightbox map size bug
|
108 |
-
|
109 |
-
= 0.13 =
|
110 |
-
* 2012/08/09
|
111 |
-
* Added pin size for thumbnail map
|
112 |
-
|
113 |
-
= 0.12 =
|
114 |
-
* 2012/08/07
|
115 |
-
* Added pin color for thumbnail map
|
116 |
-
* Fixed a few minor bugs
|
117 |
-
|
118 |
-
= 0.11 =
|
119 |
-
* 2012/08/06
|
120 |
-
* Fixed a few minor bugs
|
121 |
-
|
122 |
-
= 0.1 =
|
123 |
-
* 2012/08/03
|
124 |
-
* Initial release
|
125 |
-
|
126 |
-
|
127 |
-
== Upgrade Notice ==
|
128 |
-
|
129 |
-
= 0.2 =
|
130 |
-
Due to variable name changes footer text will be reset
|
131 |
-
|
132 |
-
= 0.1x =
|
133 |
-
Upgrade without any fear :)
|
134 |
-
|
135 |
-
= 0.1 =
|
136 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.36/screenshot-1.png
DELETED
Binary file
|
tags/0.36/screenshot-2.png
DELETED
Binary file
|
tags/0.36/screenshot-3.png
DELETED
Binary file
|
tags/0.36/screenshot-4.png
DELETED
Binary file
|
tags/0.37/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/css/gmw.css
DELETED
@@ -1,306 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
275 |
-
|
276 |
-
/* lightbox skins */
|
277 |
-
.black-rounded .fancybox-skin {
|
278 |
-
background: black;
|
279 |
-
}
|
280 |
-
.black-rounded .fancybox-title-float-wrap .child {
|
281 |
-
background: black;
|
282 |
-
}
|
283 |
-
|
284 |
-
.white-square .fancybox-skin {
|
285 |
-
-webkit-border-radius: 0;
|
286 |
-
-moz-border-radius: 0;
|
287 |
-
border-radius: 0;
|
288 |
-
}
|
289 |
-
.white-square .fancybox-title-float-wrap .child {
|
290 |
-
-webkit-border-radius: 0;
|
291 |
-
-moz-border-radius: 0;
|
292 |
-
border-radius: 0;
|
293 |
-
}
|
294 |
-
|
295 |
-
.black-square .fancybox-skin {
|
296 |
-
background: black;
|
297 |
-
-webkit-border-radius: 0;
|
298 |
-
-moz-border-radius: 0;
|
299 |
-
border-radius: 0;
|
300 |
-
}
|
301 |
-
.black-square .fancybox-title-float-wrap .child {
|
302 |
-
background: black;
|
303 |
-
-webkit-border-radius: 0;
|
304 |
-
-moz-border-radius: 0;
|
305 |
-
border-radius: 0;
|
306 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/gmw-widget.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_skin' => '',
|
32 |
-
'lightbox_title' => '1',
|
33 |
-
'lightbox_header' => '',
|
34 |
-
'lightbox_footer' => ''));
|
35 |
-
|
36 |
-
$title = $instance['title'];
|
37 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
38 |
-
$lightbox_header = $instance['lightbox_header'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$lightbox_width = $instance['lightbox_width'];
|
47 |
-
$lightbox_height = $instance['lightbox_height'];
|
48 |
-
$lightbox_type = $instance['lightbox_type'];
|
49 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
50 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
51 |
-
$lightbox_title = $instance['lightbox_title'];
|
52 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
53 |
-
|
54 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
55 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
56 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
57 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
58 |
-
|
59 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
60 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
61 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
62 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
63 |
-
|
64 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
65 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
66 |
-
array('val' => 'green', 'label' => 'Green'),
|
67 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
68 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
69 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
70 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
71 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
72 |
-
array('val' => 'red', 'label' => 'Red'),
|
73 |
-
array('val' => 'white', 'label' => 'White'));
|
74 |
-
|
75 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
76 |
-
array('val' => 'small', 'label' => 'Small'),
|
77 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
78 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
79 |
-
|
80 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
81 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
82 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
83 |
-
}
|
84 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
85 |
-
|
86 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'White with rounded corners (default)');
|
87 |
-
$lightbox_skins[] = array('val' => 'black-rounded', 'label' => 'Black with rounded corners');
|
88 |
-
$lightbox_skins[] = array('val' => 'white-square', 'label' => 'White with square corners');
|
89 |
-
$lightbox_skins[] = array('val' => 'black-square', 'label' => 'Black with square corners');
|
90 |
-
|
91 |
-
|
92 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
93 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
94 |
-
|
95 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
96 |
-
echo '<div id="gmw-thumb">';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
99 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
100 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
101 |
-
echo ' px</p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
105 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
110 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
114 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
115 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
116 |
-
echo '</select></p>';
|
117 |
-
|
118 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
119 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
120 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
121 |
-
echo '</select></p>';
|
122 |
-
|
123 |
-
echo '</div>'; // thumbnail tab
|
124 |
-
echo '<div id="gmw-lightbox">';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
127 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
128 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
129 |
-
echo ' px</p>';
|
130 |
-
|
131 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
132 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
133 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
134 |
-
echo '</select></p>';
|
135 |
-
|
136 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
137 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
138 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
139 |
-
echo '</select></p>';
|
140 |
-
|
141 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
142 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
143 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
144 |
-
echo '</select></p>';
|
145 |
-
|
146 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
147 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
148 |
-
echo '</p>';
|
149 |
-
|
150 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
151 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
152 |
-
echo '</p>';
|
153 |
-
|
154 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
155 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
156 |
-
|
157 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
158 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
159 |
-
|
160 |
-
echo '</div>'; // lightbox tab
|
161 |
-
echo '</div>'; // tabs
|
162 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
163 |
-
}
|
164 |
-
|
165 |
-
function update($new_instance, $old_instance) {
|
166 |
-
$instance = $old_instance;
|
167 |
-
|
168 |
-
$instance['title'] = $new_instance['title'];
|
169 |
-
$instance['address'] = $new_instance['address'];
|
170 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
171 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
172 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
173 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
174 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
175 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
176 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
177 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
178 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
179 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
180 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
181 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
182 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
183 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
184 |
-
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
185 |
-
|
186 |
-
return $instance;
|
187 |
-
}
|
188 |
-
|
189 |
-
function widget($args, $instance) {
|
190 |
-
$out = $tmp = '';
|
191 |
-
|
192 |
-
extract($args, EXTR_SKIP);
|
193 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
194 |
-
'width' => $instance['lightbox_width'],
|
195 |
-
'height' => $instance['lightbox_height'],
|
196 |
-
'footer' => $instance['lightbox_footer'],
|
197 |
-
'header' => $instance['lightbox_header'],
|
198 |
-
'address' => $instance['address'],
|
199 |
-
'zoom' => $instance['lightbox_zoom'],
|
200 |
-
'type' => $instance['lightbox_type'],
|
201 |
-
'skin' => $instance['lightbox_skin'],
|
202 |
-
'bubble' => $instance['lightbox_bubble'],
|
203 |
-
'id' => $widget_id);
|
204 |
-
|
205 |
-
$out .= $before_widget;
|
206 |
-
|
207 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
208 |
-
if (!empty($title)) {
|
209 |
-
$out .= $before_title . $title . $after_title;
|
210 |
-
}
|
211 |
-
|
212 |
-
$tmp .= '<p><a class="gmw-thumbnail-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
213 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
214 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
215 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
216 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
217 |
-
urlencode($instance['address']) . '"></a>';
|
218 |
-
$tmp .= '</p>';
|
219 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
220 |
-
|
221 |
-
$out .= $after_widget;
|
222 |
-
|
223 |
-
echo $out;
|
224 |
-
}
|
225 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/google-maps-widget.php
DELETED
@@ -1,177 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.37
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
define('GMW_VER', '0.37');
|
18 |
-
require 'gmw-widget.php';
|
19 |
-
|
20 |
-
|
21 |
-
class GMW {
|
22 |
-
function init() {
|
23 |
-
if (is_admin()) {
|
24 |
-
// check if minimal required WP version is used
|
25 |
-
self::check_wp_version(3.2);
|
26 |
-
|
27 |
-
// aditional links in plugin description
|
28 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
29 |
-
array(__CLASS__, 'plugin_action_links'));
|
30 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
31 |
-
|
32 |
-
// enqueue admin scripts
|
33 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
34 |
-
} else {
|
35 |
-
// enqueue frontend scripts
|
36 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
37 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
38 |
-
}
|
39 |
-
} // init
|
40 |
-
|
41 |
-
|
42 |
-
// initialize widgets
|
43 |
-
function widgets_init() {
|
44 |
-
register_widget('GoogleMapsWidget');
|
45 |
-
} // widgets_init
|
46 |
-
|
47 |
-
|
48 |
-
// add settings link to plugins page
|
49 |
-
function plugin_action_links($links) {
|
50 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
51 |
-
array_unshift($links, $settings_link);
|
52 |
-
|
53 |
-
return $links;
|
54 |
-
} // plugin_action_links
|
55 |
-
|
56 |
-
|
57 |
-
// add links to plugin's description in plugins table
|
58 |
-
function plugin_meta_links($links, $file) {
|
59 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
60 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
61 |
-
|
62 |
-
if ($file == plugin_basename(__FILE__)) {
|
63 |
-
//$links[] = $documentation_link;
|
64 |
-
$links[] = $support_link;
|
65 |
-
}
|
66 |
-
|
67 |
-
return $links;
|
68 |
-
} // plugin_meta_links
|
69 |
-
|
70 |
-
|
71 |
-
// check if user has the minimal WP version required by the plugin
|
72 |
-
function check_wp_version($min_version) {
|
73 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
74 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
75 |
-
}
|
76 |
-
} // check_wp_version
|
77 |
-
|
78 |
-
|
79 |
-
// display error message if WP version is too low
|
80 |
-
function min_version_error() {
|
81 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
82 |
-
} // min_version_error
|
83 |
-
|
84 |
-
|
85 |
-
// print dialogs markup in footer
|
86 |
-
function dialogs_markup() {
|
87 |
-
$out = '';
|
88 |
-
$widgets = GoogleMapsWidget::$widgets;
|
89 |
-
|
90 |
-
if (!$widgets) {
|
91 |
-
wp_dequeue_script('gmw');
|
92 |
-
wp_dequeue_script('gmw-fancybox');
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
foreach ($widgets as $widget) {
|
97 |
-
if ($widget['bubble']) {
|
98 |
-
$iwloc = 'addr';
|
99 |
-
} else {
|
100 |
-
$iwloc = 'near';
|
101 |
-
}
|
102 |
-
$map_url = 'http://maps.google.com/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode($widget['address']) . '&z=' . urlencode($widget['zoom']) . '';
|
103 |
-
|
104 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-map-skin="' . $widget['skin'] . '" data-map-iframe-url="' . $map_url . '" id="dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '">';
|
105 |
-
if ($widget['header']) {
|
106 |
-
$out .= '<div class="gmw-header"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
107 |
-
}
|
108 |
-
$out .= '<div class="gmw-map"></div>';
|
109 |
-
if ($widget['footer']) {
|
110 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
111 |
-
}
|
112 |
-
$out .= "</div>\n";
|
113 |
-
} // foreach $widgets
|
114 |
-
|
115 |
-
echo $out;
|
116 |
-
} // run_scroller
|
117 |
-
|
118 |
-
|
119 |
-
// enqueue frontend scripts if necessary
|
120 |
-
function enqueue_scripts() {
|
121 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
122 |
-
wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
|
123 |
-
wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
|
124 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
|
125 |
-
}
|
126 |
-
} // enqueue_scripts
|
127 |
-
|
128 |
-
|
129 |
-
// enqueue CSS and JS scripts on widgets page
|
130 |
-
function admin_enqueue_scripts() {
|
131 |
-
if (self::is_plugin_admin_page()) {
|
132 |
-
$plugin_url = plugin_dir_url(__FILE__);
|
133 |
-
|
134 |
-
wp_enqueue_script('jquery-ui-tabs');
|
135 |
-
wp_enqueue_script('sn-cookie', $plugin_url . 'js/jquery.cookie.js', array('jquery'), GMW_VER, true);
|
136 |
-
wp_enqueue_script('gmw-admin', $plugin_url . 'js/gmw-admin.js', array(), GMW_VER, true);
|
137 |
-
wp_enqueue_style('gmw-admin', $plugin_url . 'css/gmw-admin.css', array(), GMW_VER);
|
138 |
-
} // if
|
139 |
-
} // admin_enqueue_scripts
|
140 |
-
|
141 |
-
|
142 |
-
// check if plugin's admin page is shown
|
143 |
-
function is_plugin_admin_page() {
|
144 |
-
$current_screen = get_current_screen();
|
145 |
-
|
146 |
-
if ($current_screen->id == 'widgets') {
|
147 |
-
return true;
|
148 |
-
} else {
|
149 |
-
return false;
|
150 |
-
}
|
151 |
-
} // is_plugin_admin_page
|
152 |
-
|
153 |
-
|
154 |
-
// helper function for creating dropdowns
|
155 |
-
function create_select_options($options, $selected = null, $output = true) {
|
156 |
-
$out = "\n";
|
157 |
-
|
158 |
-
foreach ($options as $tmp) {
|
159 |
-
if ($selected == $tmp['val']) {
|
160 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
161 |
-
} else {
|
162 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
163 |
-
}
|
164 |
-
} // foreach
|
165 |
-
|
166 |
-
if ($output) {
|
167 |
-
echo $out;
|
168 |
-
} else {
|
169 |
-
return $out;
|
170 |
-
}
|
171 |
-
} // create_select_options
|
172 |
-
} // class GMW
|
173 |
-
|
174 |
-
|
175 |
-
// hook everything up
|
176 |
-
add_action('init', array('GMW', 'init'));
|
177 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/images/blank.gif
DELETED
Binary file
|
tags/0.37/images/fancybox_loading.gif
DELETED
Binary file
|
tags/0.37/images/fancybox_overlay.png
DELETED
Binary file
|
tags/0.37/images/fancybox_sprite.png
DELETED
Binary file
|
tags/0.37/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/js/gmw.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('a.gmw-thumbnail-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
map_url = dialog.attr('data-map-iframe-url');
|
12 |
-
map_title = dialog.attr('title');
|
13 |
-
map_skin = dialog.attr('data-map-skin');
|
14 |
-
|
15 |
-
var content = $(dialog.html());
|
16 |
-
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
17 |
-
|
18 |
-
$.fancybox( { 'wrapCSS': map_skin, 'type': 'html', 'content': content, 'title': map_title, 'autoSize': true, 'minWidth': map_width, 'minHeight': map_height } );
|
19 |
-
|
20 |
-
return false;
|
21 |
-
});
|
22 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/js/jquery.fancybox.pack.js
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
2 |
-
(function(u,p,f,q){var o=f(u),n=f(p),b=f.fancybox=function(){b.open.apply(this,arguments)},z=null,m=p.createTouch!==q,x=function(a){return a&&a.hasOwnProperty&&a instanceof f},s=function(a){return a&&"string"===f.type(a)},C=function(a){return s(a)&&0<a.indexOf("%")},k=function(a,c){var e=parseInt(a,10);c&&C(a)&&(e*=b.getViewport()[c]/100);return Math.ceil(e)},v=function(a,b){return k(a,b)+"px"};f.extend(b,{version:"2.1.0",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,
|
3 |
-
maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!m,autoCenter:!m,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},
|
4 |
-
prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0"'+
|
5 |
-
(f.browser.msie?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",
|
6 |
-
openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{closeClick:!0,speedOut:200,showEarly:!0,css:{}},title:{type:"float"}},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},
|
7 |
-
group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,c){if(a&&(f.isPlainObject(c)||(c={}),!1!==b.close(!0)))return f.isArray(a)||(a=x(a)?f(a).get():[a]),f.each(a,function(e,d){var j={},g,h,i,l,k;"object"===f.type(d)&&(d.nodeType&&(d=f(d)),x(d)?(j={href:d.attr("href"),title:d.attr("title"),isDom:!0,element:d},f.metadata&&
|
8 |
-
f.extend(!0,j,d.metadata())):j=d);g=c.href||j.href||(s(d)?d:null);h=c.title!==q?c.title:j.title||"";l=(i=c.content||j.content)?"html":c.type||j.type;!l&&j.isDom&&(l=d.data("fancybox-type"),l||(l=(l=d.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));if(s(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":s(d)&&(l="html",i=d)),"ajax"===l))k=g.split(/\s+/,2),g=k.shift(),k=k.shift();i||("inline"===l?g?i=f(s(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=d):"html"===l?
|
9 |
-
i=g:!l&&(!g&&j.isDom)&&(l="inline",i=d));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,c),c.keys!==q&&(b.opts.keys=c.keys?f.extend({},b.defaults.keys,c.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0).trigger("onReset").remove(),b.current||
|
10 |
-
b.trigger("afterClose"),b.coming=null)},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),"fixed"===b.wrap.css("position")&&b.wrap.css(b._getPosition(!0)),b.transitions[b.current.closeMethod]()))},play:function(a){var c=function(){clearTimeout(b.player.timer)},
|
11 |
-
e=function(){c();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},d=function(){c();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":d,"beforeLoad.player":c}),e(),b.trigger("onPlayStart")}else d()},next:function(a){var c=b.current;
|
12 |
-
c&&(s(a)||(a=c.direction.next),b.jumpto(c.index+1,a,"next"))},prev:function(a){var c=b.current;c&&(s(a)||(a=c.direction.prev),b.jumpto(c.index-1,a,"prev"))},jumpto:function(a,c,e){var d=b.current;if(d&&(a=k(a),b.direction=c||d.direction[a>=d.index?"next":"prev"],b.router=e||"jumpto",d.loop&&(0>a&&(a=d.group.length+a%d.group.length),a%=d.group.length),d.group[a]!==q))b.cancel(),b._start(a)},reposition:function(a,c){var e;b.isOpen&&(e=b._getPosition(c),a&&"scroll"===a.type?(delete e.position,b.wrap.stop(!0,
|
13 |
-
!0).animate(e,200)):b.wrap.css(e))},update:function(a){var c=a&&a.type,e=!c||"orientationchange"===c;e&&(clearTimeout(z),z=null);if(b.isOpen&&!z){if(e||m)b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate");z=setTimeout(function(){var d=b.current;if(d){b.wrap.removeClass("fancybox-tmp");c!=="scroll"&&b._setDimension();c==="scroll"&&d.canShrink||b.reposition(a);b.trigger("onUpdate");z=null}},m?500:e?20:300)}},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?
|
14 |
-
a:!b.current.fitToView,b.update())},hideLoading:function(){n.unbind("keypress.fb");f("#fancybox-loading").remove()},showLoading:function(){var a,c;b.hideLoading();n.bind("keypress.fb",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");b.defaults.fixed||(c=b.getViewport(),a.css({position:"absolute",top:0.5*c.h+c.y,left:0.5*c.w+c.x}))},getViewport:function(){var a=b.current?b.current.locked:!1,
|
15 |
-
c={x:o.scrollLeft(),y:o.scrollTop()};a?(c.w=a[0].clientWidth,c.h=a[0].clientHeight):(c.w=m&&u.innerWidth?u.innerWidth:o.width(),c.h=m&&u.innerHeight?u.innerHeight:o.height());return c},unbindEvents:function(){b.wrap&&x(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");o.unbind(".fb")},bindEvents:function(){var a=b.current,c;a&&(o.bind("orientationchange.fb"+(m?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(c=a.keys)&&n.bind("keydown.fb",function(e){var d=e.which||e.keyCode,j=e.target||
|
16 |
-
e.srcElement;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(c,function(c,j){if(1<a.group.length&&j[d]!==q)return b[c](j[d]),e.preventDefault(),!1;if(-1<f.inArray(d,j))return b[c](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(c,d,j,g){for(var h=f(c.target||null),i=!1;h.length&&!i&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)i=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
|
17 |
-
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==d&&!i&&1<b.group.length&&!a.canShrink){if(0<g||0<j)b.prev(0<g?"down":"left");else if(0>g||0>j)b.next(0>g?"up":"right");c.preventDefault()}}))},trigger:function(a,c){var e,d=c||b.coming||b.current;if(d){f.isFunction(d[a])&&(e=d[a].apply(d,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;"onCancel"===a&&!b.isOpened&&(b.isActive=!1);d.helpers&&f.each(d.helpers,
|
18 |
-
function(c,e){if(e&&b.helpers[c]&&f.isFunction(b.helpers[c][a]))b.helpers[c][a](e,d)});f.event.trigger(a+".fb")}},isImage:function(a){return s(a)&&a.match(/\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$/i)},isSWF:function(a){return s(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var c={},e,d,a=k(a);e=b.group[a]||null;if(!e)return!1;c=f.extend(!0,{},b.opts,e);e=c.margin;d=c.padding;"number"===f.type(e)&&(c.margin=[e,e,e,e]);"number"===f.type(d)&&(c.padding=[d,d,d,d]);c.modal&&f.extend(!0,c,
|
19 |
-
{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});c.autoSize&&(c.autoWidth=c.autoHeight=!0);"auto"===c.width&&(c.autoWidth=!0);"auto"===c.height&&(c.autoHeight=!0);c.group=b.group;c.index=a;b.coming=c;if(!1===b.trigger("beforeLoad"))b.coming=null;else{d=c.type;e=c.href;if(!d)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===d||"swf"===d)c.autoHeight=c.autoWidth=
|
20 |
-
!1,c.scrolling="visible";"image"===d&&(c.aspectRatio=!0);"iframe"===d&&m&&(c.scrolling="scroll");c.wrap=f(c.tpl.wrap).addClass("fancybox-"+(m?"mobile":"desktop")+" fancybox-type-"+d+" fancybox-tmp "+c.wrapCSS).appendTo(c.parent);f.extend(c,{skin:f(".fancybox-skin",c.wrap),outer:f(".fancybox-outer",c.wrap),inner:f(".fancybox-inner",c.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){c.skin.css("padding"+b,v(c.padding[a]))});b.trigger("onReady");if("inline"===d||"html"===d){if(!c.content||
|
21 |
-
!c.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===d?b._loadImage():"ajax"===d?b._loadAjax():"iframe"===d?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width;b.coming.height=this.height;
|
22 |
-
b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;(a.complete===q||!a.complete)&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(c,e){"success"===e&&(a.content=c,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,c=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",
|
23 |
-
m?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),c.one("load",function(){f(this).data("ready",1);m||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=c.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,c=b.current,
|
24 |
-
e=a.length,d=c.preload?Math.min(c.preload,e-1):0,f,g;for(g=1;g<=d;g+=1)f=a[(c.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,c=b.current,e,d,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,c))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{c&&(b.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove(),"fixed"===c.wrap.css("position")&&c.wrap.css(b._getPosition(!0)));
|
25 |
-
b.unbindEvents();e=a.content;d=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:c});g=a.href;switch(d){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):x(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
26 |
-
false)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e=e+('<param name="'+a+'" value="'+b+'"></param>');h=h+(" "+a+'="'+b+'"')}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!x(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
27 |
-
a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();a.wrap.removeClass("fancybox-tmp");a.pos=f.extend({},a.dim,b._getPosition(!0));b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(c.prevMethod)b.transitions[c.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),c=0,e=!1,d=!1,e=b.wrap,j=b.skin,g=b.inner,h=
|
28 |
-
b.current,d=h.width,i=h.height,l=h.minWidth,t=h.minHeight,m=h.maxWidth,n=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,w=h.margin,o=w[1]+w[3],p=w[0]+w[2],x,r,u,A,y,D,z,B,E;e.add(j).add(g).width("auto").height("auto");w=j.outerWidth(!0)-j.width();x=j.outerHeight(!0)-j.height();r=o+w;u=p+x;A=C(d)?(a.w-r)*k(d)/100:d;y=C(i)?(a.h-u)*k(i)/100:i;if("iframe"===h.type){if(E=h.content,h.autoHeight&&1===E.data("ready"))try{E[0].contentWindow.document.location&&(g.width(A).height(9999),D=E.contents().find("body"),
|
29 |
-
q&&D.css("overflow-x","hidden"),y=D.height())}catch(F){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(A),h.autoHeight||g.height(y),h.autoWidth&&(A=g.width()),h.autoHeight&&(y=g.height()),g.removeClass("fancybox-tmp");d=k(A);i=k(y);B=A/y;l=k(C(l)?k(l,"w")-r:l);m=k(C(m)?k(m,"w")-r:m);t=k(C(t)?k(t,"h")-u:t);n=k(C(n)?k(n,"h")-u:n);D=m;z=n;o=a.w-o;p=a.h-p;if(h.aspectRatio){if(d>m&&(d=m,i=d/B),i>n&&(i=n,d=i*B),d<l&&(d=l,i=d/B),i<t)i=t,d=i*B}else d=Math.max(l,Math.min(d,
|
30 |
-
m)),i=Math.max(t,Math.min(i,n));if(h.fitToView)if(m=Math.min(a.w-r,m),n=Math.min(a.h-u,n),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height(),h.aspectRatio)for(;(a>o||r>p)&&(d>l&&i>t)&&!(19<c++);)i=Math.max(t,Math.min(n,i-10)),d=i*B,d<l&&(d=l,i=d/B),d>m&&(d=m,i=d/B),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height();else d=Math.max(l,Math.min(d,d-(a-o))),i=Math.max(t,Math.min(i,i-(r-p)));q&&("auto"===s&&i<y&&d+w+q<o)&&(d+=q);g.width(k(d)).height(k(i));e.width(k(d+
|
31 |
-
w));a=e.width();r=e.height();e=(a>o||r>p)&&d>l&&i>t;d=h.aspectRatio?d<D&&i<z&&d<A&&i<y:(d<D||i<z)&&(d<A||i<y);f.extend(h,{dim:{width:v(a),height:v(r)},origWidth:A,origHeight:y,canShrink:e,canExpand:d,wPadding:w,hPadding:x,wrapSpace:r-j.outerHeight(!0),skinSpace:j.height()-i});!E&&(h.autoHeight&&i>t&&i<n&&!d)&&g.height("auto")},_getPosition:function(a){var c=b.current,e=b.getViewport(),d=c.margin,f=b.wrap.width()+d[1]+d[3],g=b.wrap.height()+d[0]+d[2],d={position:"absolute",top:d[0],left:d[3]};c.autoCenter&&
|
32 |
-
c.fixed&&!a&&g<=e.h&&f<=e.w?d.position="fixed":c.locked||(d.top+=e.y,d.left+=e.x);d.top=v(Math.max(d.top,d.top+(e.h-g)*c.topRatio));d.left=v(Math.max(d.left,d.left+(e.w-f)*c.leftRatio));return d},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.addClass("fancybox-opened").css("overflow","visible"),b.reposition(),(a.closeClick||a.nextClick)&&b.inner.css("cursor","pointer").bind("click.fb",function(c){if(!f(c.target).is("a")&&!f(c.target).parent().is("a"))b[a.closeClick?"close":
|
33 |
-
"next"]()}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",b.close),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1)?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(){var a=b.current;f(".fancybox-wrap").stop(!0).trigger("onReset").remove();
|
34 |
-
f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,c=a.element,e=a.orig,d={},f=50,g=50,h=a.hPadding,i=a.wPadding,l=b.getViewport();!e&&(a.isDom&&c.is(":visible"))&&(e=c.find("img:first"),e.length||(e=c));x(e)?(d=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(d.top=l.y+(l.h-g)*a.topRatio,d.left=l.x+(l.w-f)*
|
35 |
-
a.leftRatio);a.locked&&(d.top-=l.y,d.left-=l.x);return d={top:v(d.top-h*a.topRatio),left:v(d.left-i*a.leftRatio),width:v(f+i),height:v(g+h)}},step:function(a,c){var e,d,f=c.prop;d=b.current;var g=d.wrapSpace,h=d.skinSpace;if("width"===f||"height"===f)e=c.end===c.start?1:(a-c.start)/(c.end-c.start),b.isClosing&&(e=1-e),d="width"===f?d.wPadding:d.hPadding,d=a-d,b.skin[f](k("width"===f?d:d-g*e)),b.inner[f](k("width"===f?d:d-g*e-h*e))},zoomIn:function(){var a=b.current,c=a.pos,e=a.openEffect,d="elastic"===
|
36 |
-
e,j=f.extend({opacity:1},c);delete j.position;d?(c=this.getOrigPosition(),a.openOpacity&&(c.opacity=0.1)):"fade"===e&&(c.opacity=0.1);b.wrap.css(c).animate(j,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:d?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,c=a.closeEffect,e="elastic"===c,d={opacity:0.1};e&&(d=this.getOrigPosition(),a.closeOpacity&&(d.opacity=0.1));b.wrap.animate(d,{duration:"none"===c?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,
|
37 |
-
complete:b._afterZoomOut})},changeIn:function(){var a=b.current,c=a.nextEffect,e=a.pos,d={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===c&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=v(k(e[g])-200),d[g]="+=200px"):(e[g]=v(k(e[g])+200),d[g]="-=200px"));"none"===c?b._afterZoomIn():b.wrap.css(e).animate(d,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,c=a.prevEffect,e={opacity:0.1},d=b.direction;"elastic"===c&&
|
38 |
-
(e["down"===d||"up"===d?"top":"left"]=("up"===d||"left"===d?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===c?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={overlay:null,update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=Math.max(p.documentElement.offsetWidth,p.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>o.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,
|
39 |
-
b){f(".fancybox-overlay").stop(!0,!0);this.overlay||f.extend(this,{overlay:f('<div class="fancybox-overlay"></div>').appendTo(b.parent),margin:n.height()>o.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,el:p.all&&!p.querySelector?f("html"):f("body")});b.fixed&&!m&&(this.overlay.addClass("fancybox-overlay-fixed"),b.autoCenter&&(this.overlay.append(b.wrap),b.locked=this.overlay));!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,c){var e=
|
40 |
-
this.overlay.unbind(".fb").width("auto").height("auto").css(a.css);a.closeClick&&e.bind("click.fb",function(a){f(a.target).hasClass("fancybox-overlay")&&b.close()});c.fixed&&!m?c.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+c.scrollbarWidth)):this.update();e.show()},onUpdate:function(a,b){(!b.fixed||m)&&this.update()},afterClose:function(a){var c=this,a=a.speedOut||0;c.overlay&&!b.isActive&&c.overlay.fadeOut(a||0,function(){f("body").css("margin-right",
|
41 |
-
c.margin);c.el.removeClass("fancybox-lock");c.overlay.remove();c.overlay=null})}};b.helpers.title={beforeShow:function(a){var c=b.current.title,e=a.type;if(s(c)&&""!==f.trim(c)){c=f('<div class="fancybox-title fancybox-title-'+e+'-wrap">'+c+"</div>");switch(e){case "inside":e=b.skin;break;case "outside":e=b.wrap;break;case "over":e=b.inner;break;default:e=b.skin,c.appendTo("body").width(c.width()).wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(k(c.css("margin-bottom")))}"top"===
|
42 |
-
a.position?c.prependTo(e):c.appendTo(e)}}};f.fn.fancybox=function(a){var c,e=f(this),d=this.selector||"",j=function(g){var h=f(this).blur(),i=c,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel",k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=d.length?f(d):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};c=a.index||0;!d||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",
|
43 |
-
j):n.undelegate(d,"click.fb-start").delegate(d+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);return this};n.ready(function(){f.scrollbarWidth===q&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===q){var a=f.support,c=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===c[0].offsetTop||
|
44 |
-
15===c[0].offsetTop;c.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/readme.txt
DELETED
@@ -1,140 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.2
|
8 |
-
Stable tag: 0.37
|
9 |
-
|
10 |
-
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Check out the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
17 |
-
|
18 |
-
**General widget options**
|
19 |
-
|
20 |
-
* title
|
21 |
-
* address
|
22 |
-
|
23 |
-
**Thumbnail map options**
|
24 |
-
|
25 |
-
* map size - width & height
|
26 |
-
* map type - road, satellite, map or hybrid
|
27 |
-
* pin color
|
28 |
-
* pin size
|
29 |
-
* zoom level
|
30 |
-
|
31 |
-
**Lightbox map options**
|
32 |
-
|
33 |
-
* map size - width & height
|
34 |
-
* map type - road, satellite, map or hybrid
|
35 |
-
* zoom level
|
36 |
-
* skin
|
37 |
-
* show/hide address bubble
|
38 |
-
* show/hide map title
|
39 |
-
* header text
|
40 |
-
* footer text
|
41 |
-
|
42 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
43 |
-
|
44 |
-
The plugin was voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian.
|
45 |
-
|
46 |
-
== Installation ==
|
47 |
-
|
48 |
-
Follow the usual routine;
|
49 |
-
|
50 |
-
1. Open WP admin - Plugins - Add New
|
51 |
-
2. Enter "Google Maps Widget" under search and hit Enter
|
52 |
-
3. Plugin will show up as the first on the list, click "Install Now"
|
53 |
-
|
54 |
-
Or if needed, upload manually;
|
55 |
-
|
56 |
-
1. Download the plugin.
|
57 |
-
2. Unzip it and upload to wp-content/plugin/
|
58 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
59 |
-
4. Configure the plugin under Appearance - Widgets
|
60 |
-
|
61 |
-
|
62 |
-
== Frequently Asked Questions ==
|
63 |
-
|
64 |
-
= Who is this plugin for? =
|
65 |
-
|
66 |
-
For just about anyone who needs a map on their site.
|
67 |
-
|
68 |
-
= It's not working!!! Arrrrrrrrr =
|
69 |
-
|
70 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
71 |
-
If you can figure it out open a thread in the support forums.
|
72 |
-
|
73 |
-
== Screenshots ==
|
74 |
-
|
75 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
76 |
-
2. Larger map with all features is available in the lightbox
|
77 |
-
3. Widget options - thumbnail map
|
78 |
-
4. Widget options - lightbox map
|
79 |
-
|
80 |
-
== Changelog ==
|
81 |
-
|
82 |
-
= 0.37 =
|
83 |
-
* 2012/11/19
|
84 |
-
* fixed bug to use google.com instead of google.co.uk
|
85 |
-
|
86 |
-
= 0.35 =
|
87 |
-
* 2012/09/28
|
88 |
-
* added 4 skins for lightbox
|
89 |
-
|
90 |
-
= 0.31 =
|
91 |
-
* 2012/09/14
|
92 |
-
* fix for bad themes which don't respect proper sidebar markup
|
93 |
-
|
94 |
-
= 0.3 =
|
95 |
-
* 2012/09/04
|
96 |
-
* lightbox script changed from jQuery UI Dialog to <a href="http://fancyapps.com/fancybox/">fancyBox2</a>
|
97 |
-
* added "show map title on lightbox" option
|
98 |
-
* significant speed improvements
|
99 |
-
* preparations for lightbox skins
|
100 |
-
|
101 |
-
= 0.22 =
|
102 |
-
* 2012/08/31
|
103 |
-
* Fixed small JS related GUI bug
|
104 |
-
|
105 |
-
= 0.2 =
|
106 |
-
* 2012/08/28
|
107 |
-
* Complete GUI rewrite
|
108 |
-
* Added header text option
|
109 |
-
* Added address bubble visibility option
|
110 |
-
* Fixed thumbnail map scaling bug
|
111 |
-
* Fixed lightbox map size bug
|
112 |
-
|
113 |
-
= 0.13 =
|
114 |
-
* 2012/08/09
|
115 |
-
* Added pin size for thumbnail map
|
116 |
-
|
117 |
-
= 0.12 =
|
118 |
-
* 2012/08/07
|
119 |
-
* Added pin color for thumbnail map
|
120 |
-
* Fixed a few minor bugs
|
121 |
-
|
122 |
-
= 0.11 =
|
123 |
-
* 2012/08/06
|
124 |
-
* Fixed a few minor bugs
|
125 |
-
|
126 |
-
= 0.1 =
|
127 |
-
* 2012/08/03
|
128 |
-
* Initial release
|
129 |
-
|
130 |
-
|
131 |
-
== Upgrade Notice ==
|
132 |
-
|
133 |
-
= 0.2 =
|
134 |
-
Due to variable name changes footer text will be reset
|
135 |
-
|
136 |
-
= 0.1x =
|
137 |
-
Upgrade without any fear :)
|
138 |
-
|
139 |
-
= 0.1 =
|
140 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.37/screenshot-1.png
DELETED
Binary file
|
tags/0.37/screenshot-2.png
DELETED
Binary file
|
tags/0.37/screenshot-3.png
DELETED
Binary file
|
tags/0.37/screenshot-4.png
DELETED
Binary file
|
tags/0.4/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/css/gmw.css
DELETED
@@ -1,306 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
275 |
-
|
276 |
-
/* lightbox skins */
|
277 |
-
.black-rounded .fancybox-skin {
|
278 |
-
background: black;
|
279 |
-
}
|
280 |
-
.black-rounded .fancybox-title-float-wrap .child {
|
281 |
-
background: black;
|
282 |
-
}
|
283 |
-
|
284 |
-
.white-square .fancybox-skin {
|
285 |
-
-webkit-border-radius: 0;
|
286 |
-
-moz-border-radius: 0;
|
287 |
-
border-radius: 0;
|
288 |
-
}
|
289 |
-
.white-square .fancybox-title-float-wrap .child {
|
290 |
-
-webkit-border-radius: 0;
|
291 |
-
-moz-border-radius: 0;
|
292 |
-
border-radius: 0;
|
293 |
-
}
|
294 |
-
|
295 |
-
.black-square .fancybox-skin {
|
296 |
-
background: black;
|
297 |
-
-webkit-border-radius: 0;
|
298 |
-
-moz-border-radius: 0;
|
299 |
-
border-radius: 0;
|
300 |
-
}
|
301 |
-
.black-square .fancybox-title-float-wrap .child {
|
302 |
-
background: black;
|
303 |
-
-webkit-border-radius: 0;
|
304 |
-
-moz-border-radius: 0;
|
305 |
-
border-radius: 0;
|
306 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/gmw-widget.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_skin' => '',
|
32 |
-
'lightbox_title' => '1',
|
33 |
-
'lightbox_header' => '',
|
34 |
-
'lightbox_footer' => ''));
|
35 |
-
|
36 |
-
$title = $instance['title'];
|
37 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
38 |
-
$lightbox_header = $instance['lightbox_header'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$lightbox_width = $instance['lightbox_width'];
|
47 |
-
$lightbox_height = $instance['lightbox_height'];
|
48 |
-
$lightbox_type = $instance['lightbox_type'];
|
49 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
50 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
51 |
-
$lightbox_title = $instance['lightbox_title'];
|
52 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
53 |
-
|
54 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
55 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
56 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
57 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
58 |
-
|
59 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
60 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
61 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
62 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
63 |
-
|
64 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
65 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
66 |
-
array('val' => 'green', 'label' => 'Green'),
|
67 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
68 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
69 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
70 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
71 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
72 |
-
array('val' => 'red', 'label' => 'Red'),
|
73 |
-
array('val' => 'white', 'label' => 'White'));
|
74 |
-
|
75 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
76 |
-
array('val' => 'small', 'label' => 'Small'),
|
77 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
78 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
79 |
-
|
80 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
81 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
82 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
83 |
-
}
|
84 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
85 |
-
|
86 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'White with rounded corners (default)');
|
87 |
-
$lightbox_skins[] = array('val' => 'black-rounded', 'label' => 'Black with rounded corners');
|
88 |
-
$lightbox_skins[] = array('val' => 'white-square', 'label' => 'White with square corners');
|
89 |
-
$lightbox_skins[] = array('val' => 'black-square', 'label' => 'Black with square corners');
|
90 |
-
|
91 |
-
|
92 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
93 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
94 |
-
|
95 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
96 |
-
echo '<div id="gmw-thumb">';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
99 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
100 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
101 |
-
echo ' px</p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
105 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
110 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
114 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
115 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
116 |
-
echo '</select></p>';
|
117 |
-
|
118 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
119 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
120 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
121 |
-
echo '</select></p>';
|
122 |
-
|
123 |
-
echo '</div>'; // thumbnail tab
|
124 |
-
echo '<div id="gmw-lightbox">';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
127 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
128 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
129 |
-
echo ' px</p>';
|
130 |
-
|
131 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
132 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
133 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
134 |
-
echo '</select></p>';
|
135 |
-
|
136 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
137 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
138 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
139 |
-
echo '</select></p>';
|
140 |
-
|
141 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
142 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
143 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
144 |
-
echo '</select></p>';
|
145 |
-
|
146 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
147 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
148 |
-
echo '</p>';
|
149 |
-
|
150 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
151 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
152 |
-
echo '</p>';
|
153 |
-
|
154 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
155 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
156 |
-
|
157 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
158 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
159 |
-
|
160 |
-
echo '</div>'; // lightbox tab
|
161 |
-
echo '</div>'; // tabs
|
162 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
163 |
-
}
|
164 |
-
|
165 |
-
function update($new_instance, $old_instance) {
|
166 |
-
$instance = $old_instance;
|
167 |
-
|
168 |
-
$instance['title'] = $new_instance['title'];
|
169 |
-
$instance['address'] = $new_instance['address'];
|
170 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
171 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
172 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
173 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
174 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
175 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
176 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
177 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
178 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
179 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
180 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
181 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
182 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
183 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
184 |
-
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
185 |
-
|
186 |
-
return $instance;
|
187 |
-
}
|
188 |
-
|
189 |
-
function widget($args, $instance) {
|
190 |
-
$out = $tmp = '';
|
191 |
-
|
192 |
-
extract($args, EXTR_SKIP);
|
193 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
194 |
-
'width' => $instance['lightbox_width'],
|
195 |
-
'height' => $instance['lightbox_height'],
|
196 |
-
'footer' => $instance['lightbox_footer'],
|
197 |
-
'header' => $instance['lightbox_header'],
|
198 |
-
'address' => $instance['address'],
|
199 |
-
'zoom' => $instance['lightbox_zoom'],
|
200 |
-
'type' => $instance['lightbox_type'],
|
201 |
-
'skin' => $instance['lightbox_skin'],
|
202 |
-
'bubble' => $instance['lightbox_bubble'],
|
203 |
-
'id' => $widget_id);
|
204 |
-
|
205 |
-
$out .= $before_widget;
|
206 |
-
|
207 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
208 |
-
if (!empty($title)) {
|
209 |
-
$out .= $before_title . $title . $after_title;
|
210 |
-
}
|
211 |
-
|
212 |
-
$tmp .= '<p><a class="gmw-thumbnail-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
213 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
214 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
215 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
216 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
217 |
-
urlencode($instance['address']) . '"></a>';
|
218 |
-
$tmp .= '</p>';
|
219 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
220 |
-
|
221 |
-
$out .= $after_widget;
|
222 |
-
|
223 |
-
echo $out;
|
224 |
-
}
|
225 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/google-maps-widget.php
DELETED
@@ -1,175 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.4
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
define('GMW_VER', '0.4');
|
18 |
-
require 'gmw-widget.php';
|
19 |
-
|
20 |
-
|
21 |
-
class GMW {
|
22 |
-
function init() {
|
23 |
-
if (is_admin()) {
|
24 |
-
// check if minimal required WP version is used
|
25 |
-
self::check_wp_version(3.2);
|
26 |
-
|
27 |
-
// aditional links in plugin description
|
28 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
29 |
-
array(__CLASS__, 'plugin_action_links'));
|
30 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
31 |
-
|
32 |
-
// enqueue admin scripts
|
33 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
34 |
-
} else {
|
35 |
-
// enqueue frontend scripts
|
36 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
37 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
38 |
-
}
|
39 |
-
} // init
|
40 |
-
|
41 |
-
|
42 |
-
// initialize widgets
|
43 |
-
function widgets_init() {
|
44 |
-
register_widget('GoogleMapsWidget');
|
45 |
-
} // widgets_init
|
46 |
-
|
47 |
-
|
48 |
-
// add settings link to plugins page
|
49 |
-
function plugin_action_links($links) {
|
50 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
51 |
-
array_unshift($links, $settings_link);
|
52 |
-
|
53 |
-
return $links;
|
54 |
-
} // plugin_action_links
|
55 |
-
|
56 |
-
|
57 |
-
// add links to plugin's description in plugins table
|
58 |
-
function plugin_meta_links($links, $file) {
|
59 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
60 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
61 |
-
|
62 |
-
if ($file == plugin_basename(__FILE__)) {
|
63 |
-
//$links[] = $documentation_link;
|
64 |
-
$links[] = $support_link;
|
65 |
-
}
|
66 |
-
|
67 |
-
return $links;
|
68 |
-
} // plugin_meta_links
|
69 |
-
|
70 |
-
|
71 |
-
// check if user has the minimal WP version required by the plugin
|
72 |
-
function check_wp_version($min_version) {
|
73 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
74 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
75 |
-
}
|
76 |
-
} // check_wp_version
|
77 |
-
|
78 |
-
|
79 |
-
// display error message if WP version is too low
|
80 |
-
function min_version_error() {
|
81 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
82 |
-
} // min_version_error
|
83 |
-
|
84 |
-
|
85 |
-
// print dialogs markup in footer
|
86 |
-
function dialogs_markup() {
|
87 |
-
$out = '';
|
88 |
-
$widgets = GoogleMapsWidget::$widgets;
|
89 |
-
|
90 |
-
if (!$widgets) {
|
91 |
-
wp_dequeue_script('gmw');
|
92 |
-
wp_dequeue_script('gmw-fancybox');
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
foreach ($widgets as $widget) {
|
97 |
-
if ($widget['bubble']) {
|
98 |
-
$iwloc = 'addr';
|
99 |
-
} else {
|
100 |
-
$iwloc = 'near';
|
101 |
-
}
|
102 |
-
$map_url = 'http://maps.google.com/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode(remove_accents($widget['address'])) . '&z=' . urlencode($widget['zoom']) . '';
|
103 |
-
|
104 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-map-skin="' . $widget['skin'] . '" data-map-iframe-url="' . $map_url . '" id="dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '">';
|
105 |
-
if ($widget['header']) {
|
106 |
-
$out .= '<div class="gmw-header"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
107 |
-
}
|
108 |
-
$out .= '<div class="gmw-map"></div>';
|
109 |
-
if ($widget['footer']) {
|
110 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
111 |
-
}
|
112 |
-
$out .= "</div>\n";
|
113 |
-
} // foreach $widgets
|
114 |
-
|
115 |
-
echo $out;
|
116 |
-
} // run_scroller
|
117 |
-
|
118 |
-
|
119 |
-
// enqueue frontend scripts if necessary
|
120 |
-
function enqueue_scripts() {
|
121 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
122 |
-
wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
|
123 |
-
wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
|
124 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
|
125 |
-
}
|
126 |
-
} // enqueue_scripts
|
127 |
-
|
128 |
-
|
129 |
-
// enqueue CSS and JS scripts on widgets page
|
130 |
-
function admin_enqueue_scripts() {
|
131 |
-
if (self::is_plugin_admin_page()) {
|
132 |
-
wp_enqueue_script('jquery-ui-tabs');
|
133 |
-
wp_enqueue_script('gmw-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array('jquery'), GMW_VER, true);
|
134 |
-
wp_enqueue_script('gmw-admin', plugins_url('js/gmw-admin.js', __FILE__), array('jquery'), GMW_VER, true);
|
135 |
-
wp_enqueue_style('gmw-admin', plugins_url('css/gmw-admin.css', __FILE__), array(), GMW_VER);
|
136 |
-
} // if
|
137 |
-
} // admin_enqueue_scripts
|
138 |
-
|
139 |
-
|
140 |
-
// check if plugin's admin page is shown
|
141 |
-
function is_plugin_admin_page() {
|
142 |
-
$current_screen = get_current_screen();
|
143 |
-
|
144 |
-
if ($current_screen->id == 'widgets') {
|
145 |
-
return true;
|
146 |
-
} else {
|
147 |
-
return false;
|
148 |
-
}
|
149 |
-
} // is_plugin_admin_page
|
150 |
-
|
151 |
-
|
152 |
-
// helper function for creating dropdowns
|
153 |
-
function create_select_options($options, $selected = null, $output = true) {
|
154 |
-
$out = "\n";
|
155 |
-
|
156 |
-
foreach ($options as $tmp) {
|
157 |
-
if ($selected == $tmp['val']) {
|
158 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
159 |
-
} else {
|
160 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
161 |
-
}
|
162 |
-
} // foreach
|
163 |
-
|
164 |
-
if ($output) {
|
165 |
-
echo $out;
|
166 |
-
} else {
|
167 |
-
return $out;
|
168 |
-
}
|
169 |
-
} // create_select_options
|
170 |
-
} // class GMW
|
171 |
-
|
172 |
-
|
173 |
-
// hook everything up
|
174 |
-
add_action('init', array('GMW', 'init'));
|
175 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/images/blank.gif
DELETED
Binary file
|
tags/0.4/images/fancybox_loading.gif
DELETED
Binary file
|
tags/0.4/images/fancybox_overlay.png
DELETED
Binary file
|
tags/0.4/images/fancybox_sprite.png
DELETED
Binary file
|
tags/0.4/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/js/gmw.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('a.gmw-thumbnail-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
map_url = dialog.attr('data-map-iframe-url');
|
12 |
-
map_title = dialog.attr('title');
|
13 |
-
map_skin = dialog.attr('data-map-skin');
|
14 |
-
|
15 |
-
var content = $(dialog.html());
|
16 |
-
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
17 |
-
|
18 |
-
$.fancybox( { 'wrapCSS': map_skin, 'type': 'html', 'content': content, 'title': map_title, 'autoSize': true, 'minWidth': map_width, 'minHeight': map_height } );
|
19 |
-
|
20 |
-
return false;
|
21 |
-
});
|
22 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/js/jquery.fancybox.pack.js
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
2 |
-
(function(u,p,f,q){var o=f(u),n=f(p),b=f.fancybox=function(){b.open.apply(this,arguments)},z=null,m=p.createTouch!==q,x=function(a){return a&&a.hasOwnProperty&&a instanceof f},s=function(a){return a&&"string"===f.type(a)},C=function(a){return s(a)&&0<a.indexOf("%")},k=function(a,c){var e=parseInt(a,10);c&&C(a)&&(e*=b.getViewport()[c]/100);return Math.ceil(e)},v=function(a,b){return k(a,b)+"px"};f.extend(b,{version:"2.1.0",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,
|
3 |
-
maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!m,autoCenter:!m,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},
|
4 |
-
prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0"'+
|
5 |
-
(f.browser.msie?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",
|
6 |
-
openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{closeClick:!0,speedOut:200,showEarly:!0,css:{}},title:{type:"float"}},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},
|
7 |
-
group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,c){if(a&&(f.isPlainObject(c)||(c={}),!1!==b.close(!0)))return f.isArray(a)||(a=x(a)?f(a).get():[a]),f.each(a,function(e,d){var j={},g,h,i,l,k;"object"===f.type(d)&&(d.nodeType&&(d=f(d)),x(d)?(j={href:d.attr("href"),title:d.attr("title"),isDom:!0,element:d},f.metadata&&
|
8 |
-
f.extend(!0,j,d.metadata())):j=d);g=c.href||j.href||(s(d)?d:null);h=c.title!==q?c.title:j.title||"";l=(i=c.content||j.content)?"html":c.type||j.type;!l&&j.isDom&&(l=d.data("fancybox-type"),l||(l=(l=d.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));if(s(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":s(d)&&(l="html",i=d)),"ajax"===l))k=g.split(/\s+/,2),g=k.shift(),k=k.shift();i||("inline"===l?g?i=f(s(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=d):"html"===l?
|
9 |
-
i=g:!l&&(!g&&j.isDom)&&(l="inline",i=d));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,c),c.keys!==q&&(b.opts.keys=c.keys?f.extend({},b.defaults.keys,c.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0).trigger("onReset").remove(),b.current||
|
10 |
-
b.trigger("afterClose"),b.coming=null)},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),"fixed"===b.wrap.css("position")&&b.wrap.css(b._getPosition(!0)),b.transitions[b.current.closeMethod]()))},play:function(a){var c=function(){clearTimeout(b.player.timer)},
|
11 |
-
e=function(){c();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},d=function(){c();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":d,"beforeLoad.player":c}),e(),b.trigger("onPlayStart")}else d()},next:function(a){var c=b.current;
|
12 |
-
c&&(s(a)||(a=c.direction.next),b.jumpto(c.index+1,a,"next"))},prev:function(a){var c=b.current;c&&(s(a)||(a=c.direction.prev),b.jumpto(c.index-1,a,"prev"))},jumpto:function(a,c,e){var d=b.current;if(d&&(a=k(a),b.direction=c||d.direction[a>=d.index?"next":"prev"],b.router=e||"jumpto",d.loop&&(0>a&&(a=d.group.length+a%d.group.length),a%=d.group.length),d.group[a]!==q))b.cancel(),b._start(a)},reposition:function(a,c){var e;b.isOpen&&(e=b._getPosition(c),a&&"scroll"===a.type?(delete e.position,b.wrap.stop(!0,
|
13 |
-
!0).animate(e,200)):b.wrap.css(e))},update:function(a){var c=a&&a.type,e=!c||"orientationchange"===c;e&&(clearTimeout(z),z=null);if(b.isOpen&&!z){if(e||m)b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate");z=setTimeout(function(){var d=b.current;if(d){b.wrap.removeClass("fancybox-tmp");c!=="scroll"&&b._setDimension();c==="scroll"&&d.canShrink||b.reposition(a);b.trigger("onUpdate");z=null}},m?500:e?20:300)}},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?
|
14 |
-
a:!b.current.fitToView,b.update())},hideLoading:function(){n.unbind("keypress.fb");f("#fancybox-loading").remove()},showLoading:function(){var a,c;b.hideLoading();n.bind("keypress.fb",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");b.defaults.fixed||(c=b.getViewport(),a.css({position:"absolute",top:0.5*c.h+c.y,left:0.5*c.w+c.x}))},getViewport:function(){var a=b.current?b.current.locked:!1,
|
15 |
-
c={x:o.scrollLeft(),y:o.scrollTop()};a?(c.w=a[0].clientWidth,c.h=a[0].clientHeight):(c.w=m&&u.innerWidth?u.innerWidth:o.width(),c.h=m&&u.innerHeight?u.innerHeight:o.height());return c},unbindEvents:function(){b.wrap&&x(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");o.unbind(".fb")},bindEvents:function(){var a=b.current,c;a&&(o.bind("orientationchange.fb"+(m?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(c=a.keys)&&n.bind("keydown.fb",function(e){var d=e.which||e.keyCode,j=e.target||
|
16 |
-
e.srcElement;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(c,function(c,j){if(1<a.group.length&&j[d]!==q)return b[c](j[d]),e.preventDefault(),!1;if(-1<f.inArray(d,j))return b[c](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(c,d,j,g){for(var h=f(c.target||null),i=!1;h.length&&!i&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)i=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
|
17 |
-
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==d&&!i&&1<b.group.length&&!a.canShrink){if(0<g||0<j)b.prev(0<g?"down":"left");else if(0>g||0>j)b.next(0>g?"up":"right");c.preventDefault()}}))},trigger:function(a,c){var e,d=c||b.coming||b.current;if(d){f.isFunction(d[a])&&(e=d[a].apply(d,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;"onCancel"===a&&!b.isOpened&&(b.isActive=!1);d.helpers&&f.each(d.helpers,
|
18 |
-
function(c,e){if(e&&b.helpers[c]&&f.isFunction(b.helpers[c][a]))b.helpers[c][a](e,d)});f.event.trigger(a+".fb")}},isImage:function(a){return s(a)&&a.match(/\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$/i)},isSWF:function(a){return s(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var c={},e,d,a=k(a);e=b.group[a]||null;if(!e)return!1;c=f.extend(!0,{},b.opts,e);e=c.margin;d=c.padding;"number"===f.type(e)&&(c.margin=[e,e,e,e]);"number"===f.type(d)&&(c.padding=[d,d,d,d]);c.modal&&f.extend(!0,c,
|
19 |
-
{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});c.autoSize&&(c.autoWidth=c.autoHeight=!0);"auto"===c.width&&(c.autoWidth=!0);"auto"===c.height&&(c.autoHeight=!0);c.group=b.group;c.index=a;b.coming=c;if(!1===b.trigger("beforeLoad"))b.coming=null;else{d=c.type;e=c.href;if(!d)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===d||"swf"===d)c.autoHeight=c.autoWidth=
|
20 |
-
!1,c.scrolling="visible";"image"===d&&(c.aspectRatio=!0);"iframe"===d&&m&&(c.scrolling="scroll");c.wrap=f(c.tpl.wrap).addClass("fancybox-"+(m?"mobile":"desktop")+" fancybox-type-"+d+" fancybox-tmp "+c.wrapCSS).appendTo(c.parent);f.extend(c,{skin:f(".fancybox-skin",c.wrap),outer:f(".fancybox-outer",c.wrap),inner:f(".fancybox-inner",c.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){c.skin.css("padding"+b,v(c.padding[a]))});b.trigger("onReady");if("inline"===d||"html"===d){if(!c.content||
|
21 |
-
!c.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===d?b._loadImage():"ajax"===d?b._loadAjax():"iframe"===d?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width;b.coming.height=this.height;
|
22 |
-
b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;(a.complete===q||!a.complete)&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(c,e){"success"===e&&(a.content=c,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,c=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",
|
23 |
-
m?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),c.one("load",function(){f(this).data("ready",1);m||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=c.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,c=b.current,
|
24 |
-
e=a.length,d=c.preload?Math.min(c.preload,e-1):0,f,g;for(g=1;g<=d;g+=1)f=a[(c.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,c=b.current,e,d,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,c))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{c&&(b.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove(),"fixed"===c.wrap.css("position")&&c.wrap.css(b._getPosition(!0)));
|
25 |
-
b.unbindEvents();e=a.content;d=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:c});g=a.href;switch(d){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):x(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
26 |
-
false)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e=e+('<param name="'+a+'" value="'+b+'"></param>');h=h+(" "+a+'="'+b+'"')}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!x(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
27 |
-
a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();a.wrap.removeClass("fancybox-tmp");a.pos=f.extend({},a.dim,b._getPosition(!0));b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(c.prevMethod)b.transitions[c.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),c=0,e=!1,d=!1,e=b.wrap,j=b.skin,g=b.inner,h=
|
28 |
-
b.current,d=h.width,i=h.height,l=h.minWidth,t=h.minHeight,m=h.maxWidth,n=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,w=h.margin,o=w[1]+w[3],p=w[0]+w[2],x,r,u,A,y,D,z,B,E;e.add(j).add(g).width("auto").height("auto");w=j.outerWidth(!0)-j.width();x=j.outerHeight(!0)-j.height();r=o+w;u=p+x;A=C(d)?(a.w-r)*k(d)/100:d;y=C(i)?(a.h-u)*k(i)/100:i;if("iframe"===h.type){if(E=h.content,h.autoHeight&&1===E.data("ready"))try{E[0].contentWindow.document.location&&(g.width(A).height(9999),D=E.contents().find("body"),
|
29 |
-
q&&D.css("overflow-x","hidden"),y=D.height())}catch(F){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(A),h.autoHeight||g.height(y),h.autoWidth&&(A=g.width()),h.autoHeight&&(y=g.height()),g.removeClass("fancybox-tmp");d=k(A);i=k(y);B=A/y;l=k(C(l)?k(l,"w")-r:l);m=k(C(m)?k(m,"w")-r:m);t=k(C(t)?k(t,"h")-u:t);n=k(C(n)?k(n,"h")-u:n);D=m;z=n;o=a.w-o;p=a.h-p;if(h.aspectRatio){if(d>m&&(d=m,i=d/B),i>n&&(i=n,d=i*B),d<l&&(d=l,i=d/B),i<t)i=t,d=i*B}else d=Math.max(l,Math.min(d,
|
30 |
-
m)),i=Math.max(t,Math.min(i,n));if(h.fitToView)if(m=Math.min(a.w-r,m),n=Math.min(a.h-u,n),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height(),h.aspectRatio)for(;(a>o||r>p)&&(d>l&&i>t)&&!(19<c++);)i=Math.max(t,Math.min(n,i-10)),d=i*B,d<l&&(d=l,i=d/B),d>m&&(d=m,i=d/B),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height();else d=Math.max(l,Math.min(d,d-(a-o))),i=Math.max(t,Math.min(i,i-(r-p)));q&&("auto"===s&&i<y&&d+w+q<o)&&(d+=q);g.width(k(d)).height(k(i));e.width(k(d+
|
31 |
-
w));a=e.width();r=e.height();e=(a>o||r>p)&&d>l&&i>t;d=h.aspectRatio?d<D&&i<z&&d<A&&i<y:(d<D||i<z)&&(d<A||i<y);f.extend(h,{dim:{width:v(a),height:v(r)},origWidth:A,origHeight:y,canShrink:e,canExpand:d,wPadding:w,hPadding:x,wrapSpace:r-j.outerHeight(!0),skinSpace:j.height()-i});!E&&(h.autoHeight&&i>t&&i<n&&!d)&&g.height("auto")},_getPosition:function(a){var c=b.current,e=b.getViewport(),d=c.margin,f=b.wrap.width()+d[1]+d[3],g=b.wrap.height()+d[0]+d[2],d={position:"absolute",top:d[0],left:d[3]};c.autoCenter&&
|
32 |
-
c.fixed&&!a&&g<=e.h&&f<=e.w?d.position="fixed":c.locked||(d.top+=e.y,d.left+=e.x);d.top=v(Math.max(d.top,d.top+(e.h-g)*c.topRatio));d.left=v(Math.max(d.left,d.left+(e.w-f)*c.leftRatio));return d},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.addClass("fancybox-opened").css("overflow","visible"),b.reposition(),(a.closeClick||a.nextClick)&&b.inner.css("cursor","pointer").bind("click.fb",function(c){if(!f(c.target).is("a")&&!f(c.target).parent().is("a"))b[a.closeClick?"close":
|
33 |
-
"next"]()}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",b.close),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1)?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(){var a=b.current;f(".fancybox-wrap").stop(!0).trigger("onReset").remove();
|
34 |
-
f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,c=a.element,e=a.orig,d={},f=50,g=50,h=a.hPadding,i=a.wPadding,l=b.getViewport();!e&&(a.isDom&&c.is(":visible"))&&(e=c.find("img:first"),e.length||(e=c));x(e)?(d=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(d.top=l.y+(l.h-g)*a.topRatio,d.left=l.x+(l.w-f)*
|
35 |
-
a.leftRatio);a.locked&&(d.top-=l.y,d.left-=l.x);return d={top:v(d.top-h*a.topRatio),left:v(d.left-i*a.leftRatio),width:v(f+i),height:v(g+h)}},step:function(a,c){var e,d,f=c.prop;d=b.current;var g=d.wrapSpace,h=d.skinSpace;if("width"===f||"height"===f)e=c.end===c.start?1:(a-c.start)/(c.end-c.start),b.isClosing&&(e=1-e),d="width"===f?d.wPadding:d.hPadding,d=a-d,b.skin[f](k("width"===f?d:d-g*e)),b.inner[f](k("width"===f?d:d-g*e-h*e))},zoomIn:function(){var a=b.current,c=a.pos,e=a.openEffect,d="elastic"===
|
36 |
-
e,j=f.extend({opacity:1},c);delete j.position;d?(c=this.getOrigPosition(),a.openOpacity&&(c.opacity=0.1)):"fade"===e&&(c.opacity=0.1);b.wrap.css(c).animate(j,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:d?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,c=a.closeEffect,e="elastic"===c,d={opacity:0.1};e&&(d=this.getOrigPosition(),a.closeOpacity&&(d.opacity=0.1));b.wrap.animate(d,{duration:"none"===c?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,
|
37 |
-
complete:b._afterZoomOut})},changeIn:function(){var a=b.current,c=a.nextEffect,e=a.pos,d={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===c&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=v(k(e[g])-200),d[g]="+=200px"):(e[g]=v(k(e[g])+200),d[g]="-=200px"));"none"===c?b._afterZoomIn():b.wrap.css(e).animate(d,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,c=a.prevEffect,e={opacity:0.1},d=b.direction;"elastic"===c&&
|
38 |
-
(e["down"===d||"up"===d?"top":"left"]=("up"===d||"left"===d?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===c?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={overlay:null,update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=Math.max(p.documentElement.offsetWidth,p.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>o.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,
|
39 |
-
b){f(".fancybox-overlay").stop(!0,!0);this.overlay||f.extend(this,{overlay:f('<div class="fancybox-overlay"></div>').appendTo(b.parent),margin:n.height()>o.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,el:p.all&&!p.querySelector?f("html"):f("body")});b.fixed&&!m&&(this.overlay.addClass("fancybox-overlay-fixed"),b.autoCenter&&(this.overlay.append(b.wrap),b.locked=this.overlay));!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,c){var e=
|
40 |
-
this.overlay.unbind(".fb").width("auto").height("auto").css(a.css);a.closeClick&&e.bind("click.fb",function(a){f(a.target).hasClass("fancybox-overlay")&&b.close()});c.fixed&&!m?c.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+c.scrollbarWidth)):this.update();e.show()},onUpdate:function(a,b){(!b.fixed||m)&&this.update()},afterClose:function(a){var c=this,a=a.speedOut||0;c.overlay&&!b.isActive&&c.overlay.fadeOut(a||0,function(){f("body").css("margin-right",
|
41 |
-
c.margin);c.el.removeClass("fancybox-lock");c.overlay.remove();c.overlay=null})}};b.helpers.title={beforeShow:function(a){var c=b.current.title,e=a.type;if(s(c)&&""!==f.trim(c)){c=f('<div class="fancybox-title fancybox-title-'+e+'-wrap">'+c+"</div>");switch(e){case "inside":e=b.skin;break;case "outside":e=b.wrap;break;case "over":e=b.inner;break;default:e=b.skin,c.appendTo("body").width(c.width()).wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(k(c.css("margin-bottom")))}"top"===
|
42 |
-
a.position?c.prependTo(e):c.appendTo(e)}}};f.fn.fancybox=function(a){var c,e=f(this),d=this.selector||"",j=function(g){var h=f(this).blur(),i=c,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel",k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=d.length?f(d):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};c=a.index||0;!d||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",
|
43 |
-
j):n.undelegate(d,"click.fb-start").delegate(d+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);return this};n.ready(function(){f.scrollbarWidth===q&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===q){var a=f.support,c=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===c[0].offsetTop||
|
44 |
-
15===c[0].offsetTop;c.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/readme.txt
DELETED
@@ -1,144 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.2
|
8 |
-
Stable tag: 0.4
|
9 |
-
|
10 |
-
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Check out the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
17 |
-
|
18 |
-
**General widget options**
|
19 |
-
|
20 |
-
* title
|
21 |
-
* address
|
22 |
-
|
23 |
-
**Thumbnail map options**
|
24 |
-
|
25 |
-
* map size - width & height
|
26 |
-
* map type - road, satellite, map or hybrid
|
27 |
-
* pin color
|
28 |
-
* pin size
|
29 |
-
* zoom level
|
30 |
-
|
31 |
-
**Lightbox map options**
|
32 |
-
|
33 |
-
* map size - width & height
|
34 |
-
* map type - road, satellite, map or hybrid
|
35 |
-
* zoom level
|
36 |
-
* skin
|
37 |
-
* show/hide address bubble
|
38 |
-
* show/hide map title
|
39 |
-
* header text
|
40 |
-
* footer text
|
41 |
-
|
42 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
43 |
-
|
44 |
-
The plugin was voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian.
|
45 |
-
|
46 |
-
== Installation ==
|
47 |
-
|
48 |
-
Follow the usual routine;
|
49 |
-
|
50 |
-
1. Open WP admin - Plugins - Add New
|
51 |
-
2. Enter "Google Maps Widget" under search and hit Enter
|
52 |
-
3. Plugin will show up as the first on the list, click "Install Now"
|
53 |
-
|
54 |
-
Or if needed, upload manually;
|
55 |
-
|
56 |
-
1. Download the plugin.
|
57 |
-
2. Unzip it and upload to wp-content/plugin/
|
58 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
59 |
-
4. Configure the plugin under Appearance - Widgets
|
60 |
-
|
61 |
-
|
62 |
-
== Frequently Asked Questions ==
|
63 |
-
|
64 |
-
= Who is this plugin for? =
|
65 |
-
|
66 |
-
For just about anyone who needs a map on their site.
|
67 |
-
|
68 |
-
= It's not working!!! Arrrrrrrrr =
|
69 |
-
|
70 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
71 |
-
If you can figure it out open a thread in the support forums.
|
72 |
-
|
73 |
-
== Screenshots ==
|
74 |
-
|
75 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
76 |
-
2. Larger map with all features is available in the lightbox
|
77 |
-
3. Widget options - thumbnail map
|
78 |
-
4. Widget options - lightbox map
|
79 |
-
|
80 |
-
== Changelog ==
|
81 |
-
|
82 |
-
= 0.4 =
|
83 |
-
* 2012/11/28
|
84 |
-
* fixed non UTF-8 address bug
|
85 |
-
|
86 |
-
= 0.37 =
|
87 |
-
* 2012/11/19
|
88 |
-
* fixed bug to use google.com instead of google.co.uk
|
89 |
-
|
90 |
-
= 0.35 =
|
91 |
-
* 2012/09/28
|
92 |
-
* added 4 skins for lightbox
|
93 |
-
|
94 |
-
= 0.31 =
|
95 |
-
* 2012/09/14
|
96 |
-
* fix for bad themes which don't respect proper sidebar markup
|
97 |
-
|
98 |
-
= 0.3 =
|
99 |
-
* 2012/09/04
|
100 |
-
* lightbox script changed from jQuery UI Dialog to <a href="http://fancyapps.com/fancybox/">fancyBox2</a>
|
101 |
-
* added "show map title on lightbox" option
|
102 |
-
* significant speed improvements
|
103 |
-
* preparations for lightbox skins
|
104 |
-
|
105 |
-
= 0.22 =
|
106 |
-
* 2012/08/31
|
107 |
-
* Fixed small JS related GUI bug
|
108 |
-
|
109 |
-
= 0.2 =
|
110 |
-
* 2012/08/28
|
111 |
-
* Complete GUI rewrite
|
112 |
-
* Added header text option
|
113 |
-
* Added address bubble visibility option
|
114 |
-
* Fixed thumbnail map scaling bug
|
115 |
-
* Fixed lightbox map size bug
|
116 |
-
|
117 |
-
= 0.13 =
|
118 |
-
* 2012/08/09
|
119 |
-
* Added pin size for thumbnail map
|
120 |
-
|
121 |
-
= 0.12 =
|
122 |
-
* 2012/08/07
|
123 |
-
* Added pin color for thumbnail map
|
124 |
-
* Fixed a few minor bugs
|
125 |
-
|
126 |
-
= 0.11 =
|
127 |
-
* 2012/08/06
|
128 |
-
* Fixed a few minor bugs
|
129 |
-
|
130 |
-
= 0.1 =
|
131 |
-
* 2012/08/03
|
132 |
-
* Initial release
|
133 |
-
|
134 |
-
|
135 |
-
== Upgrade Notice ==
|
136 |
-
|
137 |
-
= 0.2 =
|
138 |
-
Due to variable name changes footer text will be reset
|
139 |
-
|
140 |
-
= 0.1x =
|
141 |
-
Upgrade without any fear :)
|
142 |
-
|
143 |
-
= 0.1 =
|
144 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.4/screenshot-1.png
DELETED
Binary file
|
tags/0.4/screenshot-2.png
DELETED
Binary file
|
tags/0.4/screenshot-3.png
DELETED
Binary file
|
tags/0.4/screenshot-4.png
DELETED
Binary file
|
tags/0.41/css/gmw-admin.css
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
30 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
31 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
32 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
33 |
-
|
34 |
-
.ui-tabs .ui-tabs-nav li a {
|
35 |
-
font-weight: 200;
|
36 |
-
line-height: 32px;
|
37 |
-
color: #AAAAAA;
|
38 |
-
padding: 0 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
.ui-tabs ul.ui-tabs-nav li {
|
42 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
43 |
-
border-radius: 3px 3px 0 0;
|
44 |
-
border-style: solid;
|
45 |
-
border-width: 1px 1px 0;
|
46 |
-
color: #AAAAAA;
|
47 |
-
display: inline-block;
|
48 |
-
font-size: 12px;
|
49 |
-
line-height: 16px;
|
50 |
-
margin: 0 0 -1px 10px;
|
51 |
-
text-decoration: none;
|
52 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
53 |
-
}
|
54 |
-
|
55 |
-
ul.ui-tabs-nav{
|
56 |
-
float: left;
|
57 |
-
border-bottom: 1px solid #CCCCCC;
|
58 |
-
padding-bottom: 0;
|
59 |
-
width: 100%;
|
60 |
-
margin-bottom: 20px !important
|
61 |
-
}
|
62 |
-
|
63 |
-
.ui-state-hover a, .ui-state-active a {
|
64 |
-
color: #464646 !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
.ui-state-hover a {
|
68 |
-
color: #D54E21 !important;
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.41/css/gmw.css
DELETED
@@ -1,306 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
275 |
-
|
276 |
-
/* lightbox skins */
|
277 |
-
.black-rounded .fancybox-skin {
|
278 |
-
background: black;
|
279 |
-
}
|
280 |
-
.black-rounded .fancybox-title-float-wrap .child {
|
281 |
-
background: black;
|
282 |
-
}
|
283 |
-
|
284 |
-
.white-square .fancybox-skin {
|
285 |
-
-webkit-border-radius: 0;
|
286 |
-
-moz-border-radius: 0;
|
287 |
-
border-radius: 0;
|
288 |
-
}
|
289 |
-
.white-square .fancybox-title-float-wrap .child {
|
290 |
-
-webkit-border-radius: 0;
|
291 |
-
-moz-border-radius: 0;
|
292 |
-
border-radius: 0;
|
293 |
-
}
|
294 |
-
|
295 |
-
.black-square .fancybox-skin {
|
296 |
-
background: black;
|
297 |
-
-webkit-border-radius: 0;
|
298 |
-
-moz-border-radius: 0;
|
299 |
-
border-radius: 0;
|
300 |
-
}
|
301 |
-
.black-square .fancybox-title-float-wrap .child {
|
302 |
-
background: black;
|
303 |
-
-webkit-border-radius: 0;
|
304 |
-
-moz-border-radius: 0;
|
305 |
-
border-radius: 0;
|
306 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.41/gmw-widget.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_skin' => '',
|
32 |
-
'lightbox_title' => '1',
|
33 |
-
'lightbox_header' => '',
|
34 |
-
'lightbox_footer' => ''));
|
35 |
-
|
36 |
-
$title = $instance['title'];
|
37 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
38 |
-
$lightbox_header = $instance['lightbox_header'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$lightbox_width = $instance['lightbox_width'];
|
47 |
-
$lightbox_height = $instance['lightbox_height'];
|
48 |
-
$lightbox_type = $instance['lightbox_type'];
|
49 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
50 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
51 |
-
$lightbox_title = $instance['lightbox_title'];
|
52 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
53 |
-
|
54 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
55 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
56 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
57 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
58 |
-
|
59 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
60 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
61 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
62 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
63 |
-
|
64 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
65 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
66 |
-
array('val' => 'green', 'label' => 'Green'),
|
67 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
68 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
69 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
70 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
71 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
72 |
-
array('val' => 'red', 'label' => 'Red'),
|
73 |
-
array('val' => 'white', 'label' => 'White'));
|
74 |
-
|
75 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
76 |
-
array('val' => 'small', 'label' => 'Small'),
|
77 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
78 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
79 |
-
|
80 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
81 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
82 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
83 |
-
}
|
84 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
85 |
-
|
86 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'White with rounded corners (default)');
|
87 |
-
$lightbox_skins[] = array('val' => 'black-rounded', 'label' => 'Black with rounded corners');
|
88 |
-
$lightbox_skins[] = array('val' => 'white-square', 'label' => 'White with square corners');
|
89 |
-
$lightbox_skins[] = array('val' => 'black-square', 'label' => 'Black with square corners');
|
90 |
-
|
91 |
-
|
92 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
93 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
94 |
-
|
95 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
96 |
-
echo '<div id="gmw-thumb">';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
99 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
100 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
101 |
-
echo ' px</p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
105 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
110 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
114 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
115 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
116 |
-
echo '</select></p>';
|
117 |
-
|
118 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
119 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
120 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
121 |
-
echo '</select></p>';
|
122 |
-
|
123 |
-
echo '</div>'; // thumbnail tab
|
124 |
-
echo '<div id="gmw-lightbox">';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
127 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
128 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
129 |
-
echo ' px</p>';
|
130 |
-
|
131 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
132 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
133 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
134 |
-
echo '</select></p>';
|
135 |
-
|
136 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
137 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
138 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
139 |
-
echo '</select></p>';
|
140 |
-
|
141 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
142 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
143 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
144 |
-
echo '</select></p>';
|
145 |
-
|
146 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
147 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
148 |
-
echo '</p>';
|
149 |
-
|
150 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
151 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
152 |
-
echo '</p>';
|
153 |
-
|
154 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
155 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
156 |
-
|
157 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
158 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
159 |
-
|
160 |
-
echo '</div>'; // lightbox tab
|
161 |
-
echo '</div>'; // tabs
|
162 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
163 |
-
}
|
164 |
-
|
165 |
-
function update($new_instance, $old_instance) {
|
166 |
-
$instance = $old_instance;
|
167 |
-
|
168 |
-
$instance['title'] = $new_instance['title'];
|
169 |
-
$instance['address'] = $new_instance['address'];
|
170 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
171 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
172 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
173 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
174 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
175 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
176 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
177 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
178 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
179 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
180 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
181 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
182 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
183 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
184 |
-
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
185 |
-
|
186 |
-
return $instance;
|
187 |
-
}
|
188 |
-
|
189 |
-
function widget($args, $instance) {
|
190 |
-
$out = $tmp = '';
|
191 |
-
|
192 |
-
extract($args, EXTR_SKIP);
|
193 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
194 |
-
'width' => $instance['lightbox_width'],
|
195 |
-
'height' => $instance['lightbox_height'],
|
196 |
-
'footer' => $instance['lightbox_footer'],
|
197 |
-
'header' => $instance['lightbox_header'],
|
198 |
-
'address' => $instance['address'],
|
199 |
-
'zoom' => $instance['lightbox_zoom'],
|
200 |
-
'type' => $instance['lightbox_type'],
|
201 |
-
'skin' => $instance['lightbox_skin'],
|
202 |
-
'bubble' => $instance['lightbox_bubble'],
|
203 |
-
'id' => $widget_id);
|
204 |
-
|
205 |
-
$out .= $before_widget;
|
206 |
-
|
207 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
208 |
-
if (!empty($title)) {
|
209 |
-
$out .= $before_title . $title . $after_title;
|
210 |
-
}
|
211 |
-
|
212 |
-
$tmp .= '<p><a class="gmw-thumbnail-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
213 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
214 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
215 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
216 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
217 |
-
urlencode($instance['address']) . '"></a>';
|
218 |
-
$tmp .= '</p>';
|
219 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
220 |
-
|
221 |
-
$out .= $after_widget;
|
222 |
-
|
223 |
-
echo $out;
|
224 |
-
}
|
225 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.41/google-maps-widget.php
DELETED
@@ -1,175 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.41
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
define('GMW_VER', '0.41');
|
18 |
-
require 'gmw-widget.php';
|
19 |
-
|
20 |
-
|
21 |
-
class GMW {
|
22 |
-
function init() {
|
23 |
-
if (is_admin()) {
|
24 |
-
// check if minimal required WP version is used
|
25 |
-
self::check_wp_version(3.2);
|
26 |
-
|
27 |
-
// aditional links in plugin description
|
28 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
29 |
-
array(__CLASS__, 'plugin_action_links'));
|
30 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
31 |
-
|
32 |
-
// enqueue admin scripts
|
33 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
34 |
-
} else {
|
35 |
-
// enqueue frontend scripts
|
36 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
37 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
38 |
-
}
|
39 |
-
} // init
|
40 |
-
|
41 |
-
|
42 |
-
// initialize widgets
|
43 |
-
function widgets_init() {
|
44 |
-
register_widget('GoogleMapsWidget');
|
45 |
-
} // widgets_init
|
46 |
-
|
47 |
-
|
48 |
-
// add settings link to plugins page
|
49 |
-
function plugin_action_links($links) {
|
50 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
51 |
-
array_unshift($links, $settings_link);
|
52 |
-
|
53 |
-
return $links;
|
54 |
-
} // plugin_action_links
|
55 |
-
|
56 |
-
|
57 |
-
// add links to plugin's description in plugins table
|
58 |
-
function plugin_meta_links($links, $file) {
|
59 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
60 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
61 |
-
|
62 |
-
if ($file == plugin_basename(__FILE__)) {
|
63 |
-
//$links[] = $documentation_link;
|
64 |
-
$links[] = $support_link;
|
65 |
-
}
|
66 |
-
|
67 |
-
return $links;
|
68 |
-
} // plugin_meta_links
|
69 |
-
|
70 |
-
|
71 |
-
// check if user has the minimal WP version required by the plugin
|
72 |
-
function check_wp_version($min_version) {
|
73 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
74 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
75 |
-
}
|
76 |
-
} // check_wp_version
|
77 |
-
|
78 |
-
|
79 |
-
// display error message if WP version is too low
|
80 |
-
function min_version_error() {
|
81 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
82 |
-
} // min_version_error
|
83 |
-
|
84 |
-
|
85 |
-
// print dialogs markup in footer
|
86 |
-
function dialogs_markup() {
|
87 |
-
$out = '';
|
88 |
-
$widgets = GoogleMapsWidget::$widgets;
|
89 |
-
|
90 |
-
if (!$widgets) {
|
91 |
-
wp_dequeue_script('gmw');
|
92 |
-
wp_dequeue_script('gmw-fancybox');
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
foreach ($widgets as $widget) {
|
97 |
-
if ($widget['bubble']) {
|
98 |
-
$iwloc = 'addr';
|
99 |
-
} else {
|
100 |
-
$iwloc = 'near';
|
101 |
-
}
|
102 |
-
$map_url = 'http://maps.google.com/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode(remove_accents($widget['address'])) . '&z=' . urlencode($widget['zoom']) . '';
|
103 |
-
|
104 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-map-skin="' . $widget['skin'] . '" data-map-iframe-url="' . $map_url . '" id="dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '">';
|
105 |
-
if ($widget['header']) {
|
106 |
-
$out .= '<div class="gmw-header"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
107 |
-
}
|
108 |
-
$out .= '<div class="gmw-map"></div>';
|
109 |
-
if ($widget['footer']) {
|
110 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
111 |
-
}
|
112 |
-
$out .= "</div>\n";
|
113 |
-
} // foreach $widgets
|
114 |
-
|
115 |
-
echo $out;
|
116 |
-
} // run_scroller
|
117 |
-
|
118 |
-
|
119 |
-
// enqueue frontend scripts if necessary
|
120 |
-
function enqueue_scripts() {
|
121 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
122 |
-
wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
|
123 |
-
wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
|
124 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
|
125 |
-
}
|
126 |
-
} // enqueue_scripts
|
127 |
-
|
128 |
-
|
129 |
-
// enqueue CSS and JS scripts on widgets page
|
130 |
-
function admin_enqueue_scripts() {
|
131 |
-
if (self::is_plugin_admin_page()) {
|
132 |
-
wp_enqueue_script('jquery-ui-tabs');
|
133 |
-
wp_enqueue_script('gmw-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array('jquery'), GMW_VER, true);
|
134 |
-
wp_enqueue_script('gmw-admin', plugins_url('js/gmw-admin.js', __FILE__), array('jquery'), GMW_VER, true);
|
135 |
-
wp_enqueue_style('gmw-admin', plugins_url('css/gmw-admin.css', __FILE__), array(), GMW_VER);
|
136 |
-
} // if
|
137 |
-
} // admin_enqueue_scripts
|
138 |
-
|
139 |
-
|
140 |
-
// check if plugin's admin page is shown
|
141 |
-
function is_plugin_admin_page() {
|
142 |
-
$current_screen = get_current_screen();
|
143 |
-
|
144 |
-
if ($current_screen->id == 'widgets') {
|
145 |
-
return true;
|
146 |
-
} else {
|
147 |
-
return false;
|
148 |
-
}
|
149 |
-
} // is_plugin_admin_page
|
150 |
-
|
151 |
-
|
152 |
-
// helper function for creating dropdowns
|
153 |
-
function create_select_options($options, $selected = null, $output = true) {
|
154 |
-
$out = "\n";
|
155 |
-
|
156 |
-
foreach ($options as $tmp) {
|
157 |
-
if ($selected == $tmp['val']) {
|
158 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
159 |
-
} else {
|
160 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
161 |
-
}
|
162 |
-
} // foreach
|
163 |
-
|
164 |
-
if ($output) {
|
165 |
-
echo $out;
|
166 |
-
} else {
|
167 |
-
return $out;
|
168 |
-
}
|
169 |
-
} // create_select_options
|
170 |
-
} // class GMW
|
171 |
-
|
172 |
-
|
173 |
-
// hook everything up
|
174 |
-
add_action('init', array('GMW', 'init'));
|
175 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.41/images/blank.gif
DELETED
Binary file
|
tags/0.41/images/fancybox_loading.gif
DELETED
Binary file
|
tags/0.41/images/fancybox_overlay.png
DELETED
Binary file
|
tags/0.41/images/fancybox_sprite.png
DELETED
Binary file
|
tags/0.41/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.41/js/gmw.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('a.gmw-thumbnail-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
map_url = dialog.attr('data-map-iframe-url');
|
12 |
-
map_title = dialog.attr('title');
|
13 |
-
map_skin = dialog.attr('data-map-skin');
|
14 |
-
|
15 |
-
var content = $(dialog.html());
|
16 |
-
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
17 |
-
|
18 |
-
$.fancybox( { 'wrapCSS': map_skin, 'type': 'html', 'content': content, 'title': map_title, 'autoSize': true, 'minWidth': map_width, 'minHeight': map_height } );
|
19 |
-
|
20 |
-
return false;
|
21 |
-
});
|
22 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.41/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.41/js/jquery.fancybox.pack.js
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
2 |
-
(function(u,p,f,q){var o=f(u),n=f(p),b=f.fancybox=function(){b.open.apply(this,arguments)},z=null,m=p.createTouch!==q,x=function(a){return a&&a.hasOwnProperty&&a instanceof f},s=function(a){return a&&"string"===f.type(a)},C=function(a){return s(a)&&0<a.indexOf("%")},k=function(a,c){var e=parseInt(a,10);c&&C(a)&&(e*=b.getViewport()[c]/100);return Math.ceil(e)},v=function(a,b){return k(a,b)+"px"};f.extend(b,{version:"2.1.0",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,
|
3 |
-
maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!m,autoCenter:!m,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},
|
4 |
-
prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0"'+
|
5 |
-
(f.browser.msie?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",
|
6 |
-
openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{closeClick:!0,speedOut:200,showEarly:!0,css:{}},title:{type:"float"}},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},
|
7 |
-
group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,c){if(a&&(f.isPlainObject(c)||(c={}),!1!==b.close(!0)))return f.isArray(a)||(a=x(a)?f(a).get():[a]),f.each(a,function(e,d){var j={},g,h,i,l,k;"object"===f.type(d)&&(d.nodeType&&(d=f(d)),x(d)?(j={href:d.attr("href"),title:d.attr("title"),isDom:!0,element:d},f.metadata&&
|
8 |
-
f.extend(!0,j,d.metadata())):j=d);g=c.href||j.href||(s(d)?d:null);h=c.title!==q?c.title:j.title||"";l=(i=c.content||j.content)?"html":c.type||j.type;!l&&j.isDom&&(l=d.data("fancybox-type"),l||(l=(l=d.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));if(s(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":s(d)&&(l="html",i=d)),"ajax"===l))k=g.split(/\s+/,2),g=k.shift(),k=k.shift();i||("inline"===l?g?i=f(s(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=d):"html"===l?
|
9 |
-
i=g:!l&&(!g&&j.isDom)&&(l="inline",i=d));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,c),c.keys!==q&&(b.opts.keys=c.keys?f.extend({},b.defaults.keys,c.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0).trigger("onReset").remove(),b.current||
|
10 |
-
b.trigger("afterClose"),b.coming=null)},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),"fixed"===b.wrap.css("position")&&b.wrap.css(b._getPosition(!0)),b.transitions[b.current.closeMethod]()))},play:function(a){var c=function(){clearTimeout(b.player.timer)},
|
11 |
-
e=function(){c();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},d=function(){c();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":d,"beforeLoad.player":c}),e(),b.trigger("onPlayStart")}else d()},next:function(a){var c=b.current;
|
12 |
-
c&&(s(a)||(a=c.direction.next),b.jumpto(c.index+1,a,"next"))},prev:function(a){var c=b.current;c&&(s(a)||(a=c.direction.prev),b.jumpto(c.index-1,a,"prev"))},jumpto:function(a,c,e){var d=b.current;if(d&&(a=k(a),b.direction=c||d.direction[a>=d.index?"next":"prev"],b.router=e||"jumpto",d.loop&&(0>a&&(a=d.group.length+a%d.group.length),a%=d.group.length),d.group[a]!==q))b.cancel(),b._start(a)},reposition:function(a,c){var e;b.isOpen&&(e=b._getPosition(c),a&&"scroll"===a.type?(delete e.position,b.wrap.stop(!0,
|
13 |
-
!0).animate(e,200)):b.wrap.css(e))},update:function(a){var c=a&&a.type,e=!c||"orientationchange"===c;e&&(clearTimeout(z),z=null);if(b.isOpen&&!z){if(e||m)b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate");z=setTimeout(function(){var d=b.current;if(d){b.wrap.removeClass("fancybox-tmp");c!=="scroll"&&b._setDimension();c==="scroll"&&d.canShrink||b.reposition(a);b.trigger("onUpdate");z=null}},m?500:e?20:300)}},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?
|
14 |
-
a:!b.current.fitToView,b.update())},hideLoading:function(){n.unbind("keypress.fb");f("#fancybox-loading").remove()},showLoading:function(){var a,c;b.hideLoading();n.bind("keypress.fb",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");b.defaults.fixed||(c=b.getViewport(),a.css({position:"absolute",top:0.5*c.h+c.y,left:0.5*c.w+c.x}))},getViewport:function(){var a=b.current?b.current.locked:!1,
|
15 |
-
c={x:o.scrollLeft(),y:o.scrollTop()};a?(c.w=a[0].clientWidth,c.h=a[0].clientHeight):(c.w=m&&u.innerWidth?u.innerWidth:o.width(),c.h=m&&u.innerHeight?u.innerHeight:o.height());return c},unbindEvents:function(){b.wrap&&x(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");o.unbind(".fb")},bindEvents:function(){var a=b.current,c;a&&(o.bind("orientationchange.fb"+(m?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(c=a.keys)&&n.bind("keydown.fb",function(e){var d=e.which||e.keyCode,j=e.target||
|
16 |
-
e.srcElement;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(c,function(c,j){if(1<a.group.length&&j[d]!==q)return b[c](j[d]),e.preventDefault(),!1;if(-1<f.inArray(d,j))return b[c](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(c,d,j,g){for(var h=f(c.target||null),i=!1;h.length&&!i&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)i=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
|
17 |
-
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==d&&!i&&1<b.group.length&&!a.canShrink){if(0<g||0<j)b.prev(0<g?"down":"left");else if(0>g||0>j)b.next(0>g?"up":"right");c.preventDefault()}}))},trigger:function(a,c){var e,d=c||b.coming||b.current;if(d){f.isFunction(d[a])&&(e=d[a].apply(d,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;"onCancel"===a&&!b.isOpened&&(b.isActive=!1);d.helpers&&f.each(d.helpers,
|
18 |
-
function(c,e){if(e&&b.helpers[c]&&f.isFunction(b.helpers[c][a]))b.helpers[c][a](e,d)});f.event.trigger(a+".fb")}},isImage:function(a){return s(a)&&a.match(/\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$/i)},isSWF:function(a){return s(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var c={},e,d,a=k(a);e=b.group[a]||null;if(!e)return!1;c=f.extend(!0,{},b.opts,e);e=c.margin;d=c.padding;"number"===f.type(e)&&(c.margin=[e,e,e,e]);"number"===f.type(d)&&(c.padding=[d,d,d,d]);c.modal&&f.extend(!0,c,
|
19 |
-
{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});c.autoSize&&(c.autoWidth=c.autoHeight=!0);"auto"===c.width&&(c.autoWidth=!0);"auto"===c.height&&(c.autoHeight=!0);c.group=b.group;c.index=a;b.coming=c;if(!1===b.trigger("beforeLoad"))b.coming=null;else{d=c.type;e=c.href;if(!d)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===d||"swf"===d)c.autoHeight=c.autoWidth=
|
20 |
-
!1,c.scrolling="visible";"image"===d&&(c.aspectRatio=!0);"iframe"===d&&m&&(c.scrolling="scroll");c.wrap=f(c.tpl.wrap).addClass("fancybox-"+(m?"mobile":"desktop")+" fancybox-type-"+d+" fancybox-tmp "+c.wrapCSS).appendTo(c.parent);f.extend(c,{skin:f(".fancybox-skin",c.wrap),outer:f(".fancybox-outer",c.wrap),inner:f(".fancybox-inner",c.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){c.skin.css("padding"+b,v(c.padding[a]))});b.trigger("onReady");if("inline"===d||"html"===d){if(!c.content||
|
21 |
-
!c.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===d?b._loadImage():"ajax"===d?b._loadAjax():"iframe"===d?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width;b.coming.height=this.height;
|
22 |
-
b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;(a.complete===q||!a.complete)&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(c,e){"success"===e&&(a.content=c,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,c=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",
|
23 |
-
m?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),c.one("load",function(){f(this).data("ready",1);m||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=c.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,c=b.current,
|
24 |
-
e=a.length,d=c.preload?Math.min(c.preload,e-1):0,f,g;for(g=1;g<=d;g+=1)f=a[(c.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,c=b.current,e,d,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,c))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{c&&(b.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove(),"fixed"===c.wrap.css("position")&&c.wrap.css(b._getPosition(!0)));
|
25 |
-
b.unbindEvents();e=a.content;d=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:c});g=a.href;switch(d){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):x(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
26 |
-
false)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e=e+('<param name="'+a+'" value="'+b+'"></param>');h=h+(" "+a+'="'+b+'"')}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!x(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
27 |
-
a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();a.wrap.removeClass("fancybox-tmp");a.pos=f.extend({},a.dim,b._getPosition(!0));b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(c.prevMethod)b.transitions[c.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),c=0,e=!1,d=!1,e=b.wrap,j=b.skin,g=b.inner,h=
|
28 |
-
b.current,d=h.width,i=h.height,l=h.minWidth,t=h.minHeight,m=h.maxWidth,n=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,w=h.margin,o=w[1]+w[3],p=w[0]+w[2],x,r,u,A,y,D,z,B,E;e.add(j).add(g).width("auto").height("auto");w=j.outerWidth(!0)-j.width();x=j.outerHeight(!0)-j.height();r=o+w;u=p+x;A=C(d)?(a.w-r)*k(d)/100:d;y=C(i)?(a.h-u)*k(i)/100:i;if("iframe"===h.type){if(E=h.content,h.autoHeight&&1===E.data("ready"))try{E[0].contentWindow.document.location&&(g.width(A).height(9999),D=E.contents().find("body"),
|
29 |
-
q&&D.css("overflow-x","hidden"),y=D.height())}catch(F){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(A),h.autoHeight||g.height(y),h.autoWidth&&(A=g.width()),h.autoHeight&&(y=g.height()),g.removeClass("fancybox-tmp");d=k(A);i=k(y);B=A/y;l=k(C(l)?k(l,"w")-r:l);m=k(C(m)?k(m,"w")-r:m);t=k(C(t)?k(t,"h")-u:t);n=k(C(n)?k(n,"h")-u:n);D=m;z=n;o=a.w-o;p=a.h-p;if(h.aspectRatio){if(d>m&&(d=m,i=d/B),i>n&&(i=n,d=i*B),d<l&&(d=l,i=d/B),i<t)i=t,d=i*B}else d=Math.max(l,Math.min(d,
|
30 |
-
m)),i=Math.max(t,Math.min(i,n));if(h.fitToView)if(m=Math.min(a.w-r,m),n=Math.min(a.h-u,n),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height(),h.aspectRatio)for(;(a>o||r>p)&&(d>l&&i>t)&&!(19<c++);)i=Math.max(t,Math.min(n,i-10)),d=i*B,d<l&&(d=l,i=d/B),d>m&&(d=m,i=d/B),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height();else d=Math.max(l,Math.min(d,d-(a-o))),i=Math.max(t,Math.min(i,i-(r-p)));q&&("auto"===s&&i<y&&d+w+q<o)&&(d+=q);g.width(k(d)).height(k(i));e.width(k(d+
|
31 |
-
w));a=e.width();r=e.height();e=(a>o||r>p)&&d>l&&i>t;d=h.aspectRatio?d<D&&i<z&&d<A&&i<y:(d<D||i<z)&&(d<A||i<y);f.extend(h,{dim:{width:v(a),height:v(r)},origWidth:A,origHeight:y,canShrink:e,canExpand:d,wPadding:w,hPadding:x,wrapSpace:r-j.outerHeight(!0),skinSpace:j.height()-i});!E&&(h.autoHeight&&i>t&&i<n&&!d)&&g.height("auto")},_getPosition:function(a){var c=b.current,e=b.getViewport(),d=c.margin,f=b.wrap.width()+d[1]+d[3],g=b.wrap.height()+d[0]+d[2],d={position:"absolute",top:d[0],left:d[3]};c.autoCenter&&
|
32 |
-
c.fixed&&!a&&g<=e.h&&f<=e.w?d.position="fixed":c.locked||(d.top+=e.y,d.left+=e.x);d.top=v(Math.max(d.top,d.top+(e.h-g)*c.topRatio));d.left=v(Math.max(d.left,d.left+(e.w-f)*c.leftRatio));return d},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.addClass("fancybox-opened").css("overflow","visible"),b.reposition(),(a.closeClick||a.nextClick)&&b.inner.css("cursor","pointer").bind("click.fb",function(c){if(!f(c.target).is("a")&&!f(c.target).parent().is("a"))b[a.closeClick?"close":
|
33 |
-
"next"]()}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",b.close),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1)?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(){var a=b.current;f(".fancybox-wrap").stop(!0).trigger("onReset").remove();
|
34 |
-
f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,c=a.element,e=a.orig,d={},f=50,g=50,h=a.hPadding,i=a.wPadding,l=b.getViewport();!e&&(a.isDom&&c.is(":visible"))&&(e=c.find("img:first"),e.length||(e=c));x(e)?(d=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(d.top=l.y+(l.h-g)*a.topRatio,d.left=l.x+(l.w-f)*
|
35 |
-
a.leftRatio);a.locked&&(d.top-=l.y,d.left-=l.x);return d={top:v(d.top-h*a.topRatio),left:v(d.left-i*a.leftRatio),width:v(f+i),height:v(g+h)}},step:function(a,c){var e,d,f=c.prop;d=b.current;var g=d.wrapSpace,h=d.skinSpace;if("width"===f||"height"===f)e=c.end===c.start?1:(a-c.start)/(c.end-c.start),b.isClosing&&(e=1-e),d="width"===f?d.wPadding:d.hPadding,d=a-d,b.skin[f](k("width"===f?d:d-g*e)),b.inner[f](k("width"===f?d:d-g*e-h*e))},zoomIn:function(){var a=b.current,c=a.pos,e=a.openEffect,d="elastic"===
|
36 |
-
e,j=f.extend({opacity:1},c);delete j.position;d?(c=this.getOrigPosition(),a.openOpacity&&(c.opacity=0.1)):"fade"===e&&(c.opacity=0.1);b.wrap.css(c).animate(j,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:d?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,c=a.closeEffect,e="elastic"===c,d={opacity:0.1};e&&(d=this.getOrigPosition(),a.closeOpacity&&(d.opacity=0.1));b.wrap.animate(d,{duration:"none"===c?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,
|
37 |
-
complete:b._afterZoomOut})},changeIn:function(){var a=b.current,c=a.nextEffect,e=a.pos,d={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===c&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=v(k(e[g])-200),d[g]="+=200px"):(e[g]=v(k(e[g])+200),d[g]="-=200px"));"none"===c?b._afterZoomIn():b.wrap.css(e).animate(d,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,c=a.prevEffect,e={opacity:0.1},d=b.direction;"elastic"===c&&
|
38 |
-
(e["down"===d||"up"===d?"top":"left"]=("up"===d||"left"===d?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===c?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={overlay:null,update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=Math.max(p.documentElement.offsetWidth,p.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>o.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,
|
39 |
-
b){f(".fancybox-overlay").stop(!0,!0);this.overlay||f.extend(this,{overlay:f('<div class="fancybox-overlay"></div>').appendTo(b.parent),margin:n.height()>o.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,el:p.all&&!p.querySelector?f("html"):f("body")});b.fixed&&!m&&(this.overlay.addClass("fancybox-overlay-fixed"),b.autoCenter&&(this.overlay.append(b.wrap),b.locked=this.overlay));!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,c){var e=
|
40 |
-
this.overlay.unbind(".fb").width("auto").height("auto").css(a.css);a.closeClick&&e.bind("click.fb",function(a){f(a.target).hasClass("fancybox-overlay")&&b.close()});c.fixed&&!m?c.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+c.scrollbarWidth)):this.update();e.show()},onUpdate:function(a,b){(!b.fixed||m)&&this.update()},afterClose:function(a){var c=this,a=a.speedOut||0;c.overlay&&!b.isActive&&c.overlay.fadeOut(a||0,function(){f("body").css("margin-right",
|
41 |
-
c.margin);c.el.removeClass("fancybox-lock");c.overlay.remove();c.overlay=null})}};b.helpers.title={beforeShow:function(a){var c=b.current.title,e=a.type;if(s(c)&&""!==f.trim(c)){c=f('<div class="fancybox-title fancybox-title-'+e+'-wrap">'+c+"</div>");switch(e){case "inside":e=b.skin;break;case "outside":e=b.wrap;break;case "over":e=b.inner;break;default:e=b.skin,c.appendTo("body").width(c.width()).wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(k(c.css("margin-bottom")))}"top"===
|
42 |
-
a.position?c.prependTo(e):c.appendTo(e)}}};f.fn.fancybox=function(a){var c,e=f(this),d=this.selector||"",j=function(g){var h=f(this).blur(),i=c,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel",k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=d.length?f(d):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};c=a.index||0;!d||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",
|
43 |
-
j):n.undelegate(d,"click.fb-start").delegate(d+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);return this};n.ready(function(){f.scrollbarWidth===q&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===q){var a=f.support,c=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===c[0].offsetTop||
|
44 |
-
15===c[0].offsetTop;c.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.41/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.41/readme.txt
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.4.2
|
8 |
-
Stable tag: 0.41
|
9 |
-
|
10 |
-
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Check out the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
17 |
-
|
18 |
-
**General widget options**
|
19 |
-
|
20 |
-
* title
|
21 |
-
* address
|
22 |
-
|
23 |
-
**Thumbnail map options**
|
24 |
-
|
25 |
-
* map size - width & height
|
26 |
-
* map type - road, satellite, map or hybrid
|
27 |
-
* pin color
|
28 |
-
* pin size
|
29 |
-
* zoom level
|
30 |
-
|
31 |
-
**Lightbox map options**
|
32 |
-
|
33 |
-
* map size - width & height
|
34 |
-
* map type - road, satellite, map or hybrid
|
35 |
-
* zoom level
|
36 |
-
* skin
|
37 |
-
* show/hide address bubble
|
38 |
-
* show/hide map title
|
39 |
-
* header text
|
40 |
-
* footer text
|
41 |
-
|
42 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
43 |
-
|
44 |
-
The plugin was voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian.
|
45 |
-
|
46 |
-
== Installation ==
|
47 |
-
|
48 |
-
Follow the usual routine;
|
49 |
-
|
50 |
-
1. Open WP admin - Plugins - Add New
|
51 |
-
2. Enter "Google Maps Widget" under search and hit Enter
|
52 |
-
3. Plugin will show up as the first on the list, click "Install Now"
|
53 |
-
|
54 |
-
Or if needed, upload manually;
|
55 |
-
|
56 |
-
1. Download the plugin.
|
57 |
-
2. Unzip it and upload to wp-content/plugin/
|
58 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
59 |
-
4. Configure the plugin under Appearance - Widgets
|
60 |
-
|
61 |
-
|
62 |
-
== Frequently Asked Questions ==
|
63 |
-
|
64 |
-
= Who is this plugin for? =
|
65 |
-
|
66 |
-
For just about anyone who needs a map on their site.
|
67 |
-
|
68 |
-
= It's not working!!! Arrrrrrrrr =
|
69 |
-
|
70 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
71 |
-
If you can figure it out open a thread in the support forums.
|
72 |
-
|
73 |
-
== Screenshots ==
|
74 |
-
|
75 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
76 |
-
2. Larger map with all features is available in the lightbox
|
77 |
-
3. Widget options - thumbnail map
|
78 |
-
4. Widget options - lightbox map
|
79 |
-
|
80 |
-
== Changelog ==
|
81 |
-
|
82 |
-
= 0.41 =
|
83 |
-
* 2012/12/03
|
84 |
-
* removed screenshots from plugin package
|
85 |
-
|
86 |
-
= 0.4 =
|
87 |
-
* 2012/11/28
|
88 |
-
* fixed non UTF-8 address bug
|
89 |
-
|
90 |
-
= 0.37 =
|
91 |
-
* 2012/11/19
|
92 |
-
* fixed bug to use google.com instead of google.co.uk
|
93 |
-
|
94 |
-
= 0.35 =
|
95 |
-
* 2012/09/28
|
96 |
-
* added 4 skins for lightbox
|
97 |
-
|
98 |
-
= 0.31 =
|
99 |
-
* 2012/09/14
|
100 |
-
* fix for bad themes which don't respect proper sidebar markup
|
101 |
-
|
102 |
-
= 0.3 =
|
103 |
-
* 2012/09/04
|
104 |
-
* lightbox script changed from jQuery UI Dialog to <a href="http://fancyapps.com/fancybox/">fancyBox2</a>
|
105 |
-
* added "show map title on lightbox" option
|
106 |
-
* significant speed improvements
|
107 |
-
* preparations for lightbox skins
|
108 |
-
|
109 |
-
= 0.22 =
|
110 |
-
* 2012/08/31
|
111 |
-
* Fixed small JS related GUI bug
|
112 |
-
|
113 |
-
= 0.2 =
|
114 |
-
* 2012/08/28
|
115 |
-
* Complete GUI rewrite
|
116 |
-
* Added header text option
|
117 |
-
* Added address bubble visibility option
|
118 |
-
* Fixed thumbnail map scaling bug
|
119 |
-
* Fixed lightbox map size bug
|
120 |
-
|
121 |
-
= 0.13 =
|
122 |
-
* 2012/08/09
|
123 |
-
* Added pin size for thumbnail map
|
124 |
-
|
125 |
-
= 0.12 =
|
126 |
-
* 2012/08/07
|
127 |
-
* Added pin color for thumbnail map
|
128 |
-
* Fixed a few minor bugs
|
129 |
-
|
130 |
-
= 0.11 =
|
131 |
-
* 2012/08/06
|
132 |
-
* Fixed a few minor bugs
|
133 |
-
|
134 |
-
= 0.1 =
|
135 |
-
* 2012/08/03
|
136 |
-
* Initial release
|
137 |
-
|
138 |
-
|
139 |
-
== Upgrade Notice ==
|
140 |
-
|
141 |
-
= 0.2 =
|
142 |
-
Due to variable name changes footer text will be reset
|
143 |
-
|
144 |
-
= 0.1x =
|
145 |
-
Upgrade without any fear :)
|
146 |
-
|
147 |
-
= 0.1 =
|
148 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/css/gmw-admin.css
DELETED
@@ -1,71 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
30 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-active a { outline: none;}
|
31 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
32 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
33 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
34 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
35 |
-
|
36 |
-
.ui-tabs .ui-tabs-nav li a {
|
37 |
-
font-weight: 200;
|
38 |
-
line-height: 32px;
|
39 |
-
color: #AAAAAA;
|
40 |
-
padding: 0 15px;
|
41 |
-
}
|
42 |
-
|
43 |
-
.ui-tabs ul.ui-tabs-nav li {
|
44 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
45 |
-
border-radius: 3px 3px 0 0;
|
46 |
-
border-style: solid;
|
47 |
-
border-width: 1px 1px 0;
|
48 |
-
color: #AAAAAA;
|
49 |
-
display: inline-block;
|
50 |
-
font-size: 12px;
|
51 |
-
line-height: 16px;
|
52 |
-
margin: 0 0 -1px 10px;
|
53 |
-
text-decoration: none;
|
54 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
55 |
-
}
|
56 |
-
|
57 |
-
ul.ui-tabs-nav{
|
58 |
-
float: left;
|
59 |
-
border-bottom: 1px solid #CCCCCC;
|
60 |
-
padding-bottom: 0;
|
61 |
-
width: 100%;
|
62 |
-
margin-bottom: 20px !important
|
63 |
-
}
|
64 |
-
|
65 |
-
.ui-state-hover a, .ui-state-active a {
|
66 |
-
color: #464646 !important;
|
67 |
-
}
|
68 |
-
|
69 |
-
.ui-state-hover a {
|
70 |
-
color: #D54E21 !important;
|
71 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/css/gmw.css
DELETED
@@ -1,306 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
275 |
-
|
276 |
-
/* lightbox skins */
|
277 |
-
.black-rounded .fancybox-skin {
|
278 |
-
background: black;
|
279 |
-
}
|
280 |
-
.black-rounded .fancybox-title-float-wrap .child {
|
281 |
-
background: black;
|
282 |
-
}
|
283 |
-
|
284 |
-
.white-square .fancybox-skin {
|
285 |
-
-webkit-border-radius: 0;
|
286 |
-
-moz-border-radius: 0;
|
287 |
-
border-radius: 0;
|
288 |
-
}
|
289 |
-
.white-square .fancybox-title-float-wrap .child {
|
290 |
-
-webkit-border-radius: 0;
|
291 |
-
-moz-border-radius: 0;
|
292 |
-
border-radius: 0;
|
293 |
-
}
|
294 |
-
|
295 |
-
.black-square .fancybox-skin {
|
296 |
-
background: black;
|
297 |
-
-webkit-border-radius: 0;
|
298 |
-
-moz-border-radius: 0;
|
299 |
-
border-radius: 0;
|
300 |
-
}
|
301 |
-
.black-square .fancybox-title-float-wrap .child {
|
302 |
-
background: black;
|
303 |
-
-webkit-border-radius: 0;
|
304 |
-
-moz-border-radius: 0;
|
305 |
-
border-radius: 0;
|
306 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/gmw-widget.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => 250,
|
23 |
-
'thumb_height' => 250,
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'lightbox_width' => 550,
|
27 |
-
'lightbox_height' => 550,
|
28 |
-
'lightbox_type' => 'roadmap',
|
29 |
-
'lightbox_zoom' => '14',
|
30 |
-
'lightbox_bubble' => '1',
|
31 |
-
'lightbox_skin' => '',
|
32 |
-
'lightbox_title' => '1',
|
33 |
-
'lightbox_header' => '',
|
34 |
-
'lightbox_footer' => ''));
|
35 |
-
|
36 |
-
$title = $instance['title'];
|
37 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
38 |
-
$lightbox_header = $instance['lightbox_header'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$lightbox_width = $instance['lightbox_width'];
|
47 |
-
$lightbox_height = $instance['lightbox_height'];
|
48 |
-
$lightbox_type = $instance['lightbox_type'];
|
49 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
50 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
51 |
-
$lightbox_title = $instance['lightbox_title'];
|
52 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
53 |
-
|
54 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
55 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
56 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
57 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
58 |
-
|
59 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
60 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
61 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
62 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
63 |
-
|
64 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
65 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
66 |
-
array('val' => 'green', 'label' => 'Green'),
|
67 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
68 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
69 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
70 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
71 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
72 |
-
array('val' => 'red', 'label' => 'Red'),
|
73 |
-
array('val' => 'white', 'label' => 'White'));
|
74 |
-
|
75 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
76 |
-
array('val' => 'small', 'label' => 'Small'),
|
77 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
78 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
79 |
-
|
80 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
81 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
82 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
83 |
-
}
|
84 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
85 |
-
|
86 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'White with rounded corners (default)');
|
87 |
-
$lightbox_skins[] = array('val' => 'black-rounded', 'label' => 'Black with rounded corners');
|
88 |
-
$lightbox_skins[] = array('val' => 'white-square', 'label' => 'White with square corners');
|
89 |
-
$lightbox_skins[] = array('val' => 'black-square', 'label' => 'Black with square corners');
|
90 |
-
|
91 |
-
|
92 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
93 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
94 |
-
|
95 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
96 |
-
echo '<div id="gmw-thumb">';
|
97 |
-
|
98 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
99 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
100 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
101 |
-
echo ' px</p>';
|
102 |
-
|
103 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
104 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
105 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
106 |
-
echo '</select></p>';
|
107 |
-
|
108 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
109 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
110 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
111 |
-
echo '</select></p>';
|
112 |
-
|
113 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
114 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
115 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
116 |
-
echo '</select></p>';
|
117 |
-
|
118 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
119 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
120 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
121 |
-
echo '</select></p>';
|
122 |
-
|
123 |
-
echo '</div>'; // thumbnail tab
|
124 |
-
echo '<div id="gmw-lightbox">';
|
125 |
-
|
126 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
127 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
128 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
129 |
-
echo ' px</p>';
|
130 |
-
|
131 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
132 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
133 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
134 |
-
echo '</select></p>';
|
135 |
-
|
136 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
137 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
138 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
139 |
-
echo '</select></p>';
|
140 |
-
|
141 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
142 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
143 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
144 |
-
echo '</select></p>';
|
145 |
-
|
146 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
147 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
148 |
-
echo '</p>';
|
149 |
-
|
150 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
151 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
152 |
-
echo '</p>';
|
153 |
-
|
154 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
155 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
156 |
-
|
157 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
158 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
159 |
-
|
160 |
-
echo '</div>'; // lightbox tab
|
161 |
-
echo '</div>'; // tabs
|
162 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
163 |
-
}
|
164 |
-
|
165 |
-
function update($new_instance, $old_instance) {
|
166 |
-
$instance = $old_instance;
|
167 |
-
|
168 |
-
$instance['title'] = $new_instance['title'];
|
169 |
-
$instance['address'] = $new_instance['address'];
|
170 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
171 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
172 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
173 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
174 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
175 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
176 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
177 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
178 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
179 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
180 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
181 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
182 |
-
$instance['lightbox_footer'] = $new_instance['lightbox_footer'];
|
183 |
-
$instance['lightbox_header'] = $new_instance['lightbox_header'];
|
184 |
-
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
185 |
-
|
186 |
-
return $instance;
|
187 |
-
}
|
188 |
-
|
189 |
-
function widget($args, $instance) {
|
190 |
-
$out = $tmp = '';
|
191 |
-
|
192 |
-
extract($args, EXTR_SKIP);
|
193 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
194 |
-
'width' => $instance['lightbox_width'],
|
195 |
-
'height' => $instance['lightbox_height'],
|
196 |
-
'footer' => $instance['lightbox_footer'],
|
197 |
-
'header' => $instance['lightbox_header'],
|
198 |
-
'address' => $instance['address'],
|
199 |
-
'zoom' => $instance['lightbox_zoom'],
|
200 |
-
'type' => $instance['lightbox_type'],
|
201 |
-
'skin' => $instance['lightbox_skin'],
|
202 |
-
'bubble' => $instance['lightbox_bubble'],
|
203 |
-
'id' => $widget_id);
|
204 |
-
|
205 |
-
$out .= $before_widget;
|
206 |
-
|
207 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
208 |
-
if (!empty($title)) {
|
209 |
-
$out .= $before_title . $title . $after_title;
|
210 |
-
}
|
211 |
-
|
212 |
-
$tmp .= '<p><a class="gmw-thumbnail-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
213 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
214 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
215 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
216 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
217 |
-
urlencode($instance['address']) . '"></a>';
|
218 |
-
$tmp .= '</p>';
|
219 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
220 |
-
|
221 |
-
$out .= $after_widget;
|
222 |
-
|
223 |
-
echo $out;
|
224 |
-
}
|
225 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/google-maps-widget.php
DELETED
@@ -1,175 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.50
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
define('GMW_VER', '0.50');
|
18 |
-
require 'gmw-widget.php';
|
19 |
-
|
20 |
-
|
21 |
-
class GMW {
|
22 |
-
function init() {
|
23 |
-
if (is_admin()) {
|
24 |
-
// check if minimal required WP version is used
|
25 |
-
self::check_wp_version(3.2);
|
26 |
-
|
27 |
-
// aditional links in plugin description
|
28 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
29 |
-
array(__CLASS__, 'plugin_action_links'));
|
30 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
31 |
-
|
32 |
-
// enqueue admin scripts
|
33 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
34 |
-
} else {
|
35 |
-
// enqueue frontend scripts
|
36 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
37 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
38 |
-
}
|
39 |
-
} // init
|
40 |
-
|
41 |
-
|
42 |
-
// initialize widgets
|
43 |
-
function widgets_init() {
|
44 |
-
register_widget('GoogleMapsWidget');
|
45 |
-
} // widgets_init
|
46 |
-
|
47 |
-
|
48 |
-
// add settings link to plugins page
|
49 |
-
function plugin_action_links($links) {
|
50 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
51 |
-
array_unshift($links, $settings_link);
|
52 |
-
|
53 |
-
return $links;
|
54 |
-
} // plugin_action_links
|
55 |
-
|
56 |
-
|
57 |
-
// add links to plugin's description in plugins table
|
58 |
-
function plugin_meta_links($links, $file) {
|
59 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
60 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
61 |
-
|
62 |
-
if ($file == plugin_basename(__FILE__)) {
|
63 |
-
//$links[] = $documentation_link;
|
64 |
-
$links[] = $support_link;
|
65 |
-
}
|
66 |
-
|
67 |
-
return $links;
|
68 |
-
} // plugin_meta_links
|
69 |
-
|
70 |
-
|
71 |
-
// check if user has the minimal WP version required by the plugin
|
72 |
-
function check_wp_version($min_version) {
|
73 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
74 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
75 |
-
}
|
76 |
-
} // check_wp_version
|
77 |
-
|
78 |
-
|
79 |
-
// display error message if WP version is too low
|
80 |
-
function min_version_error() {
|
81 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
82 |
-
} // min_version_error
|
83 |
-
|
84 |
-
|
85 |
-
// print dialogs markup in footer
|
86 |
-
function dialogs_markup() {
|
87 |
-
$out = '';
|
88 |
-
$widgets = GoogleMapsWidget::$widgets;
|
89 |
-
|
90 |
-
if (!$widgets) {
|
91 |
-
wp_dequeue_script('gmw');
|
92 |
-
wp_dequeue_script('gmw-fancybox');
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
foreach ($widgets as $widget) {
|
97 |
-
if ($widget['bubble']) {
|
98 |
-
$iwloc = 'addr';
|
99 |
-
} else {
|
100 |
-
$iwloc = 'near';
|
101 |
-
}
|
102 |
-
$map_url = 'http://maps.google.com/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode(remove_accents($widget['address'])) . '&z=' . urlencode($widget['zoom']) . '';
|
103 |
-
|
104 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-map-skin="' . $widget['skin'] . '" data-map-iframe-url="' . $map_url . '" id="dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '">';
|
105 |
-
if ($widget['header']) {
|
106 |
-
$out .= '<div class="gmw-header"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
107 |
-
}
|
108 |
-
$out .= '<div class="gmw-map"></div>';
|
109 |
-
if ($widget['footer']) {
|
110 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
111 |
-
}
|
112 |
-
$out .= "</div>\n";
|
113 |
-
} // foreach $widgets
|
114 |
-
|
115 |
-
echo $out;
|
116 |
-
} // run_scroller
|
117 |
-
|
118 |
-
|
119 |
-
// enqueue frontend scripts if necessary
|
120 |
-
function enqueue_scripts() {
|
121 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
122 |
-
wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
|
123 |
-
wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
|
124 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
|
125 |
-
}
|
126 |
-
} // enqueue_scripts
|
127 |
-
|
128 |
-
|
129 |
-
// enqueue CSS and JS scripts on widgets page
|
130 |
-
function admin_enqueue_scripts() {
|
131 |
-
if (self::is_plugin_admin_page()) {
|
132 |
-
wp_enqueue_script('jquery-ui-tabs');
|
133 |
-
wp_enqueue_script('gmw-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array('jquery'), GMW_VER, true);
|
134 |
-
wp_enqueue_script('gmw-admin', plugins_url('js/gmw-admin.js', __FILE__), array('jquery'), GMW_VER, true);
|
135 |
-
wp_enqueue_style('gmw-admin', plugins_url('css/gmw-admin.css', __FILE__), array(), GMW_VER);
|
136 |
-
} // if
|
137 |
-
} // admin_enqueue_scripts
|
138 |
-
|
139 |
-
|
140 |
-
// check if plugin's admin page is shown
|
141 |
-
function is_plugin_admin_page() {
|
142 |
-
$current_screen = get_current_screen();
|
143 |
-
|
144 |
-
if ($current_screen->id == 'widgets') {
|
145 |
-
return true;
|
146 |
-
} else {
|
147 |
-
return false;
|
148 |
-
}
|
149 |
-
} // is_plugin_admin_page
|
150 |
-
|
151 |
-
|
152 |
-
// helper function for creating dropdowns
|
153 |
-
function create_select_options($options, $selected = null, $output = true) {
|
154 |
-
$out = "\n";
|
155 |
-
|
156 |
-
foreach ($options as $tmp) {
|
157 |
-
if ($selected == $tmp['val']) {
|
158 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
159 |
-
} else {
|
160 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
161 |
-
}
|
162 |
-
} // foreach
|
163 |
-
|
164 |
-
if ($output) {
|
165 |
-
echo $out;
|
166 |
-
} else {
|
167 |
-
return $out;
|
168 |
-
}
|
169 |
-
} // create_select_options
|
170 |
-
} // class GMW
|
171 |
-
|
172 |
-
|
173 |
-
// hook everything up
|
174 |
-
add_action('init', array('GMW', 'init'));
|
175 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/images/blank.gif
DELETED
Binary file
|
tags/0.50/images/fancybox_loading.gif
DELETED
Binary file
|
tags/0.50/images/fancybox_overlay.png
DELETED
Binary file
|
tags/0.50/images/fancybox_sprite.png
DELETED
Binary file
|
tags/0.50/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
?>
|
|
|
|
|
|
tags/0.50/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/js/gmw.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('a.gmw-thumbnail-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
map_url = dialog.attr('data-map-iframe-url');
|
12 |
-
map_title = dialog.attr('title');
|
13 |
-
map_skin = dialog.attr('data-map-skin');
|
14 |
-
|
15 |
-
var content = $(dialog.html());
|
16 |
-
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
17 |
-
|
18 |
-
$.fancybox( { 'wrapCSS': map_skin, 'type': 'html', 'content': content, 'title': map_title, 'autoSize': true, 'minWidth': map_width, 'minHeight': map_height } );
|
19 |
-
|
20 |
-
return false;
|
21 |
-
});
|
22 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/js/jquery.fancybox.pack.js
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
2 |
-
(function(u,p,f,q){var o=f(u),n=f(p),b=f.fancybox=function(){b.open.apply(this,arguments)},z=null,m=p.createTouch!==q,x=function(a){return a&&a.hasOwnProperty&&a instanceof f},s=function(a){return a&&"string"===f.type(a)},C=function(a){return s(a)&&0<a.indexOf("%")},k=function(a,c){var e=parseInt(a,10);c&&C(a)&&(e*=b.getViewport()[c]/100);return Math.ceil(e)},v=function(a,b){return k(a,b)+"px"};f.extend(b,{version:"2.1.0",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,
|
3 |
-
maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!m,autoCenter:!m,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},
|
4 |
-
prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0"'+
|
5 |
-
(f.browser.msie?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",
|
6 |
-
openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{closeClick:!0,speedOut:200,showEarly:!0,css:{}},title:{type:"float"}},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},
|
7 |
-
group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,c){if(a&&(f.isPlainObject(c)||(c={}),!1!==b.close(!0)))return f.isArray(a)||(a=x(a)?f(a).get():[a]),f.each(a,function(e,d){var j={},g,h,i,l,k;"object"===f.type(d)&&(d.nodeType&&(d=f(d)),x(d)?(j={href:d.attr("href"),title:d.attr("title"),isDom:!0,element:d},f.metadata&&
|
8 |
-
f.extend(!0,j,d.metadata())):j=d);g=c.href||j.href||(s(d)?d:null);h=c.title!==q?c.title:j.title||"";l=(i=c.content||j.content)?"html":c.type||j.type;!l&&j.isDom&&(l=d.data("fancybox-type"),l||(l=(l=d.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));if(s(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":s(d)&&(l="html",i=d)),"ajax"===l))k=g.split(/\s+/,2),g=k.shift(),k=k.shift();i||("inline"===l?g?i=f(s(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=d):"html"===l?
|
9 |
-
i=g:!l&&(!g&&j.isDom)&&(l="inline",i=d));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,c),c.keys!==q&&(b.opts.keys=c.keys?f.extend({},b.defaults.keys,c.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0).trigger("onReset").remove(),b.current||
|
10 |
-
b.trigger("afterClose"),b.coming=null)},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),"fixed"===b.wrap.css("position")&&b.wrap.css(b._getPosition(!0)),b.transitions[b.current.closeMethod]()))},play:function(a){var c=function(){clearTimeout(b.player.timer)},
|
11 |
-
e=function(){c();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},d=function(){c();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":d,"beforeLoad.player":c}),e(),b.trigger("onPlayStart")}else d()},next:function(a){var c=b.current;
|
12 |
-
c&&(s(a)||(a=c.direction.next),b.jumpto(c.index+1,a,"next"))},prev:function(a){var c=b.current;c&&(s(a)||(a=c.direction.prev),b.jumpto(c.index-1,a,"prev"))},jumpto:function(a,c,e){var d=b.current;if(d&&(a=k(a),b.direction=c||d.direction[a>=d.index?"next":"prev"],b.router=e||"jumpto",d.loop&&(0>a&&(a=d.group.length+a%d.group.length),a%=d.group.length),d.group[a]!==q))b.cancel(),b._start(a)},reposition:function(a,c){var e;b.isOpen&&(e=b._getPosition(c),a&&"scroll"===a.type?(delete e.position,b.wrap.stop(!0,
|
13 |
-
!0).animate(e,200)):b.wrap.css(e))},update:function(a){var c=a&&a.type,e=!c||"orientationchange"===c;e&&(clearTimeout(z),z=null);if(b.isOpen&&!z){if(e||m)b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate");z=setTimeout(function(){var d=b.current;if(d){b.wrap.removeClass("fancybox-tmp");c!=="scroll"&&b._setDimension();c==="scroll"&&d.canShrink||b.reposition(a);b.trigger("onUpdate");z=null}},m?500:e?20:300)}},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?
|
14 |
-
a:!b.current.fitToView,b.update())},hideLoading:function(){n.unbind("keypress.fb");f("#fancybox-loading").remove()},showLoading:function(){var a,c;b.hideLoading();n.bind("keypress.fb",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");b.defaults.fixed||(c=b.getViewport(),a.css({position:"absolute",top:0.5*c.h+c.y,left:0.5*c.w+c.x}))},getViewport:function(){var a=b.current?b.current.locked:!1,
|
15 |
-
c={x:o.scrollLeft(),y:o.scrollTop()};a?(c.w=a[0].clientWidth,c.h=a[0].clientHeight):(c.w=m&&u.innerWidth?u.innerWidth:o.width(),c.h=m&&u.innerHeight?u.innerHeight:o.height());return c},unbindEvents:function(){b.wrap&&x(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");o.unbind(".fb")},bindEvents:function(){var a=b.current,c;a&&(o.bind("orientationchange.fb"+(m?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(c=a.keys)&&n.bind("keydown.fb",function(e){var d=e.which||e.keyCode,j=e.target||
|
16 |
-
e.srcElement;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(c,function(c,j){if(1<a.group.length&&j[d]!==q)return b[c](j[d]),e.preventDefault(),!1;if(-1<f.inArray(d,j))return b[c](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(c,d,j,g){for(var h=f(c.target||null),i=!1;h.length&&!i&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)i=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
|
17 |
-
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==d&&!i&&1<b.group.length&&!a.canShrink){if(0<g||0<j)b.prev(0<g?"down":"left");else if(0>g||0>j)b.next(0>g?"up":"right");c.preventDefault()}}))},trigger:function(a,c){var e,d=c||b.coming||b.current;if(d){f.isFunction(d[a])&&(e=d[a].apply(d,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;"onCancel"===a&&!b.isOpened&&(b.isActive=!1);d.helpers&&f.each(d.helpers,
|
18 |
-
function(c,e){if(e&&b.helpers[c]&&f.isFunction(b.helpers[c][a]))b.helpers[c][a](e,d)});f.event.trigger(a+".fb")}},isImage:function(a){return s(a)&&a.match(/\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$/i)},isSWF:function(a){return s(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var c={},e,d,a=k(a);e=b.group[a]||null;if(!e)return!1;c=f.extend(!0,{},b.opts,e);e=c.margin;d=c.padding;"number"===f.type(e)&&(c.margin=[e,e,e,e]);"number"===f.type(d)&&(c.padding=[d,d,d,d]);c.modal&&f.extend(!0,c,
|
19 |
-
{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});c.autoSize&&(c.autoWidth=c.autoHeight=!0);"auto"===c.width&&(c.autoWidth=!0);"auto"===c.height&&(c.autoHeight=!0);c.group=b.group;c.index=a;b.coming=c;if(!1===b.trigger("beforeLoad"))b.coming=null;else{d=c.type;e=c.href;if(!d)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===d||"swf"===d)c.autoHeight=c.autoWidth=
|
20 |
-
!1,c.scrolling="visible";"image"===d&&(c.aspectRatio=!0);"iframe"===d&&m&&(c.scrolling="scroll");c.wrap=f(c.tpl.wrap).addClass("fancybox-"+(m?"mobile":"desktop")+" fancybox-type-"+d+" fancybox-tmp "+c.wrapCSS).appendTo(c.parent);f.extend(c,{skin:f(".fancybox-skin",c.wrap),outer:f(".fancybox-outer",c.wrap),inner:f(".fancybox-inner",c.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){c.skin.css("padding"+b,v(c.padding[a]))});b.trigger("onReady");if("inline"===d||"html"===d){if(!c.content||
|
21 |
-
!c.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===d?b._loadImage():"ajax"===d?b._loadAjax():"iframe"===d?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width;b.coming.height=this.height;
|
22 |
-
b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;(a.complete===q||!a.complete)&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(c,e){"success"===e&&(a.content=c,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,c=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",
|
23 |
-
m?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),c.one("load",function(){f(this).data("ready",1);m||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=c.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,c=b.current,
|
24 |
-
e=a.length,d=c.preload?Math.min(c.preload,e-1):0,f,g;for(g=1;g<=d;g+=1)f=a[(c.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,c=b.current,e,d,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,c))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{c&&(b.trigger("beforeChange",c),c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove(),"fixed"===c.wrap.css("position")&&c.wrap.css(b._getPosition(!0)));
|
25 |
-
b.unbindEvents();e=a.content;d=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:c});g=a.href;switch(d){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):x(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
26 |
-
false)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e=e+('<param name="'+a+'" value="'+b+'"></param>');h=h+(" "+a+'="'+b+'"')}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!x(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
27 |
-
a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();a.wrap.removeClass("fancybox-tmp");a.pos=f.extend({},a.dim,b._getPosition(!0));b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(c.prevMethod)b.transitions[c.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),c=0,e=!1,d=!1,e=b.wrap,j=b.skin,g=b.inner,h=
|
28 |
-
b.current,d=h.width,i=h.height,l=h.minWidth,t=h.minHeight,m=h.maxWidth,n=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,w=h.margin,o=w[1]+w[3],p=w[0]+w[2],x,r,u,A,y,D,z,B,E;e.add(j).add(g).width("auto").height("auto");w=j.outerWidth(!0)-j.width();x=j.outerHeight(!0)-j.height();r=o+w;u=p+x;A=C(d)?(a.w-r)*k(d)/100:d;y=C(i)?(a.h-u)*k(i)/100:i;if("iframe"===h.type){if(E=h.content,h.autoHeight&&1===E.data("ready"))try{E[0].contentWindow.document.location&&(g.width(A).height(9999),D=E.contents().find("body"),
|
29 |
-
q&&D.css("overflow-x","hidden"),y=D.height())}catch(F){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(A),h.autoHeight||g.height(y),h.autoWidth&&(A=g.width()),h.autoHeight&&(y=g.height()),g.removeClass("fancybox-tmp");d=k(A);i=k(y);B=A/y;l=k(C(l)?k(l,"w")-r:l);m=k(C(m)?k(m,"w")-r:m);t=k(C(t)?k(t,"h")-u:t);n=k(C(n)?k(n,"h")-u:n);D=m;z=n;o=a.w-o;p=a.h-p;if(h.aspectRatio){if(d>m&&(d=m,i=d/B),i>n&&(i=n,d=i*B),d<l&&(d=l,i=d/B),i<t)i=t,d=i*B}else d=Math.max(l,Math.min(d,
|
30 |
-
m)),i=Math.max(t,Math.min(i,n));if(h.fitToView)if(m=Math.min(a.w-r,m),n=Math.min(a.h-u,n),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height(),h.aspectRatio)for(;(a>o||r>p)&&(d>l&&i>t)&&!(19<c++);)i=Math.max(t,Math.min(n,i-10)),d=i*B,d<l&&(d=l,i=d/B),d>m&&(d=m,i=d/B),g.width(k(d)).height(k(i)),e.width(k(d+w)),a=e.width(),r=e.height();else d=Math.max(l,Math.min(d,d-(a-o))),i=Math.max(t,Math.min(i,i-(r-p)));q&&("auto"===s&&i<y&&d+w+q<o)&&(d+=q);g.width(k(d)).height(k(i));e.width(k(d+
|
31 |
-
w));a=e.width();r=e.height();e=(a>o||r>p)&&d>l&&i>t;d=h.aspectRatio?d<D&&i<z&&d<A&&i<y:(d<D||i<z)&&(d<A||i<y);f.extend(h,{dim:{width:v(a),height:v(r)},origWidth:A,origHeight:y,canShrink:e,canExpand:d,wPadding:w,hPadding:x,wrapSpace:r-j.outerHeight(!0),skinSpace:j.height()-i});!E&&(h.autoHeight&&i>t&&i<n&&!d)&&g.height("auto")},_getPosition:function(a){var c=b.current,e=b.getViewport(),d=c.margin,f=b.wrap.width()+d[1]+d[3],g=b.wrap.height()+d[0]+d[2],d={position:"absolute",top:d[0],left:d[3]};c.autoCenter&&
|
32 |
-
c.fixed&&!a&&g<=e.h&&f<=e.w?d.position="fixed":c.locked||(d.top+=e.y,d.left+=e.x);d.top=v(Math.max(d.top,d.top+(e.h-g)*c.topRatio));d.left=v(Math.max(d.left,d.left+(e.w-f)*c.leftRatio));return d},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.addClass("fancybox-opened").css("overflow","visible"),b.reposition(),(a.closeClick||a.nextClick)&&b.inner.css("cursor","pointer").bind("click.fb",function(c){if(!f(c.target).is("a")&&!f(c.target).parent().is("a"))b[a.closeClick?"close":
|
33 |
-
"next"]()}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",b.close),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1)?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(){var a=b.current;f(".fancybox-wrap").stop(!0).trigger("onReset").remove();
|
34 |
-
f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,c=a.element,e=a.orig,d={},f=50,g=50,h=a.hPadding,i=a.wPadding,l=b.getViewport();!e&&(a.isDom&&c.is(":visible"))&&(e=c.find("img:first"),e.length||(e=c));x(e)?(d=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(d.top=l.y+(l.h-g)*a.topRatio,d.left=l.x+(l.w-f)*
|
35 |
-
a.leftRatio);a.locked&&(d.top-=l.y,d.left-=l.x);return d={top:v(d.top-h*a.topRatio),left:v(d.left-i*a.leftRatio),width:v(f+i),height:v(g+h)}},step:function(a,c){var e,d,f=c.prop;d=b.current;var g=d.wrapSpace,h=d.skinSpace;if("width"===f||"height"===f)e=c.end===c.start?1:(a-c.start)/(c.end-c.start),b.isClosing&&(e=1-e),d="width"===f?d.wPadding:d.hPadding,d=a-d,b.skin[f](k("width"===f?d:d-g*e)),b.inner[f](k("width"===f?d:d-g*e-h*e))},zoomIn:function(){var a=b.current,c=a.pos,e=a.openEffect,d="elastic"===
|
36 |
-
e,j=f.extend({opacity:1},c);delete j.position;d?(c=this.getOrigPosition(),a.openOpacity&&(c.opacity=0.1)):"fade"===e&&(c.opacity=0.1);b.wrap.css(c).animate(j,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:d?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,c=a.closeEffect,e="elastic"===c,d={opacity:0.1};e&&(d=this.getOrigPosition(),a.closeOpacity&&(d.opacity=0.1));b.wrap.animate(d,{duration:"none"===c?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,
|
37 |
-
complete:b._afterZoomOut})},changeIn:function(){var a=b.current,c=a.nextEffect,e=a.pos,d={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===c&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=v(k(e[g])-200),d[g]="+=200px"):(e[g]=v(k(e[g])+200),d[g]="-=200px"));"none"===c?b._afterZoomIn():b.wrap.css(e).animate(d,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,c=a.prevEffect,e={opacity:0.1},d=b.direction;"elastic"===c&&
|
38 |
-
(e["down"===d||"up"===d?"top":"left"]=("up"===d||"left"===d?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===c?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={overlay:null,update:function(){var a="100%",b;this.overlay.width(a).height("100%");f.browser.msie?(b=Math.max(p.documentElement.offsetWidth,p.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>o.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,
|
39 |
-
b){f(".fancybox-overlay").stop(!0,!0);this.overlay||f.extend(this,{overlay:f('<div class="fancybox-overlay"></div>').appendTo(b.parent),margin:n.height()>o.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,el:p.all&&!p.querySelector?f("html"):f("body")});b.fixed&&!m&&(this.overlay.addClass("fancybox-overlay-fixed"),b.autoCenter&&(this.overlay.append(b.wrap),b.locked=this.overlay));!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,c){var e=
|
40 |
-
this.overlay.unbind(".fb").width("auto").height("auto").css(a.css);a.closeClick&&e.bind("click.fb",function(a){f(a.target).hasClass("fancybox-overlay")&&b.close()});c.fixed&&!m?c.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+c.scrollbarWidth)):this.update();e.show()},onUpdate:function(a,b){(!b.fixed||m)&&this.update()},afterClose:function(a){var c=this,a=a.speedOut||0;c.overlay&&!b.isActive&&c.overlay.fadeOut(a||0,function(){f("body").css("margin-right",
|
41 |
-
c.margin);c.el.removeClass("fancybox-lock");c.overlay.remove();c.overlay=null})}};b.helpers.title={beforeShow:function(a){var c=b.current.title,e=a.type;if(s(c)&&""!==f.trim(c)){c=f('<div class="fancybox-title fancybox-title-'+e+'-wrap">'+c+"</div>");switch(e){case "inside":e=b.skin;break;case "outside":e=b.wrap;break;case "over":e=b.inner;break;default:e=b.skin,c.appendTo("body").width(c.width()).wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(k(c.css("margin-bottom")))}"top"===
|
42 |
-
a.position?c.prependTo(e):c.appendTo(e)}}};f.fn.fancybox=function(a){var c,e=f(this),d=this.selector||"",j=function(g){var h=f(this).blur(),i=c,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel",k=h.get(0)[j]),k&&(""!==k&&"nofollow"!==k)&&(h=d.length?f(d):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};c=a.index||0;!d||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",
|
43 |
-
j):n.undelegate(d,"click.fb-start").delegate(d+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);return this};n.ready(function(){f.scrollbarWidth===q&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===q){var a=f.support,c=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===c[0].offsetTop||
|
44 |
-
15===c[0].offsetTop;c.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.50/readme.txt
DELETED
@@ -1,152 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.5
|
8 |
-
Stable tag: 0.50
|
9 |
-
|
10 |
-
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Check out the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
17 |
-
|
18 |
-
**General widget options**
|
19 |
-
|
20 |
-
* title
|
21 |
-
* address
|
22 |
-
|
23 |
-
**Thumbnail map options**
|
24 |
-
|
25 |
-
* map size - width & height
|
26 |
-
* map type - road, satellite, map or hybrid
|
27 |
-
* pin color
|
28 |
-
* pin size
|
29 |
-
* zoom level
|
30 |
-
|
31 |
-
**Lightbox map options**
|
32 |
-
|
33 |
-
* map size - width & height
|
34 |
-
* map type - road, satellite, map or hybrid
|
35 |
-
* zoom level
|
36 |
-
* skin
|
37 |
-
* show/hide address bubble
|
38 |
-
* show/hide map title
|
39 |
-
* header text
|
40 |
-
* footer text
|
41 |
-
|
42 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
43 |
-
|
44 |
-
The plugin was voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian.
|
45 |
-
|
46 |
-
== Installation ==
|
47 |
-
|
48 |
-
Follow the usual routine;
|
49 |
-
|
50 |
-
1. Open WP admin - Plugins - Add New
|
51 |
-
2. Enter "Google Maps Widget" under search and hit Enter
|
52 |
-
3. Plugin will show up as the first on the list, click "Install Now"
|
53 |
-
|
54 |
-
Or if needed, upload manually;
|
55 |
-
|
56 |
-
1. Download the plugin.
|
57 |
-
2. Unzip it and upload to wp-content/plugin/
|
58 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
59 |
-
4. Configure the plugin under Appearance - Widgets
|
60 |
-
|
61 |
-
|
62 |
-
== Frequently Asked Questions ==
|
63 |
-
|
64 |
-
= Who is this plugin for? =
|
65 |
-
|
66 |
-
For just about anyone who needs a map on their site.
|
67 |
-
|
68 |
-
= It's not working!!! Arrrrrrrrr =
|
69 |
-
|
70 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
71 |
-
If you can figure it out open a thread in the support forums.
|
72 |
-
|
73 |
-
== Screenshots ==
|
74 |
-
|
75 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
76 |
-
2. Larger map with all features is available in the lightbox
|
77 |
-
3. Widget options - thumbnail map
|
78 |
-
4. Widget options - lightbox map
|
79 |
-
|
80 |
-
== Changelog ==
|
81 |
-
|
82 |
-
= 0.5 =
|
83 |
-
* 2012/12/12
|
84 |
-
* small WP 3.5 compatibility fixes
|
85 |
-
|
86 |
-
= 0.41 =
|
87 |
-
* 2012/12/03
|
88 |
-
* removed screenshots from plugin package
|
89 |
-
|
90 |
-
= 0.4 =
|
91 |
-
* 2012/11/28
|
92 |
-
* fixed non UTF-8 address bug
|
93 |
-
|
94 |
-
= 0.37 =
|
95 |
-
* 2012/11/19
|
96 |
-
* fixed bug to use google.com instead of google.co.uk
|
97 |
-
|
98 |
-
= 0.35 =
|
99 |
-
* 2012/09/28
|
100 |
-
* added 4 skins for lightbox
|
101 |
-
|
102 |
-
= 0.31 =
|
103 |
-
* 2012/09/14
|
104 |
-
* fix for bad themes which don't respect proper sidebar markup
|
105 |
-
|
106 |
-
= 0.3 =
|
107 |
-
* 2012/09/04
|
108 |
-
* lightbox script changed from jQuery UI Dialog to <a href="http://fancyapps.com/fancybox/">fancyBox2</a>
|
109 |
-
* added "show map title on lightbox" option
|
110 |
-
* significant speed improvements
|
111 |
-
* preparations for lightbox skins
|
112 |
-
|
113 |
-
= 0.22 =
|
114 |
-
* 2012/08/31
|
115 |
-
* Fixed small JS related GUI bug
|
116 |
-
|
117 |
-
= 0.2 =
|
118 |
-
* 2012/08/28
|
119 |
-
* Complete GUI rewrite
|
120 |
-
* Added header text option
|
121 |
-
* Added address bubble visibility option
|
122 |
-
* Fixed thumbnail map scaling bug
|
123 |
-
* Fixed lightbox map size bug
|
124 |
-
|
125 |
-
= 0.13 =
|
126 |
-
* 2012/08/09
|
127 |
-
* Added pin size for thumbnail map
|
128 |
-
|
129 |
-
= 0.12 =
|
130 |
-
* 2012/08/07
|
131 |
-
* Added pin color for thumbnail map
|
132 |
-
* Fixed a few minor bugs
|
133 |
-
|
134 |
-
= 0.11 =
|
135 |
-
* 2012/08/06
|
136 |
-
* Fixed a few minor bugs
|
137 |
-
|
138 |
-
= 0.1 =
|
139 |
-
* 2012/08/03
|
140 |
-
* Initial release
|
141 |
-
|
142 |
-
|
143 |
-
== Upgrade Notice ==
|
144 |
-
|
145 |
-
= 0.2 =
|
146 |
-
Due to variable name changes footer text will be reset
|
147 |
-
|
148 |
-
= 0.1x =
|
149 |
-
Upgrade without any fear :)
|
150 |
-
|
151 |
-
= 0.1 =
|
152 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/css/gmw-admin.css
DELETED
@@ -1,71 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
30 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-active a { outline: none;}
|
31 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
32 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
33 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
34 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
35 |
-
|
36 |
-
.ui-tabs .ui-tabs-nav li a {
|
37 |
-
font-weight: 200;
|
38 |
-
line-height: 32px;
|
39 |
-
color: #AAAAAA;
|
40 |
-
padding: 0 15px;
|
41 |
-
}
|
42 |
-
|
43 |
-
.ui-tabs ul.ui-tabs-nav li {
|
44 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
45 |
-
border-radius: 3px 3px 0 0;
|
46 |
-
border-style: solid;
|
47 |
-
border-width: 1px 1px 0;
|
48 |
-
color: #AAAAAA;
|
49 |
-
display: inline-block;
|
50 |
-
font-size: 12px;
|
51 |
-
line-height: 16px;
|
52 |
-
margin: 0 0 -1px 10px;
|
53 |
-
text-decoration: none;
|
54 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
55 |
-
}
|
56 |
-
|
57 |
-
ul.ui-tabs-nav{
|
58 |
-
float: left;
|
59 |
-
border-bottom: 1px solid #CCCCCC;
|
60 |
-
padding-bottom: 0;
|
61 |
-
width: 100%;
|
62 |
-
margin-bottom: 20px !important
|
63 |
-
}
|
64 |
-
|
65 |
-
.ui-state-hover a, .ui-state-active a {
|
66 |
-
color: #464646 !important;
|
67 |
-
}
|
68 |
-
|
69 |
-
.ui-state-hover a {
|
70 |
-
color: #D54E21 !important;
|
71 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/css/gmw.css
DELETED
@@ -1,306 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
275 |
-
|
276 |
-
/* lightbox skins */
|
277 |
-
.black-rounded .fancybox-skin {
|
278 |
-
background: black;
|
279 |
-
}
|
280 |
-
.black-rounded .fancybox-title-float-wrap .child {
|
281 |
-
background: black;
|
282 |
-
}
|
283 |
-
|
284 |
-
.white-square .fancybox-skin {
|
285 |
-
-webkit-border-radius: 0;
|
286 |
-
-moz-border-radius: 0;
|
287 |
-
border-radius: 0;
|
288 |
-
}
|
289 |
-
.white-square .fancybox-title-float-wrap .child {
|
290 |
-
-webkit-border-radius: 0;
|
291 |
-
-moz-border-radius: 0;
|
292 |
-
border-radius: 0;
|
293 |
-
}
|
294 |
-
|
295 |
-
.black-square .fancybox-skin {
|
296 |
-
background: black;
|
297 |
-
-webkit-border-radius: 0;
|
298 |
-
-moz-border-radius: 0;
|
299 |
-
border-radius: 0;
|
300 |
-
}
|
301 |
-
.black-square .fancybox-title-float-wrap .child {
|
302 |
-
background: black;
|
303 |
-
-webkit-border-radius: 0;
|
304 |
-
-moz-border-radius: 0;
|
305 |
-
border-radius: 0;
|
306 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/gmw-widget.php
DELETED
@@ -1,243 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => '250',
|
23 |
-
'thumb_height' => '250',
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'thumb_header' => '',
|
27 |
-
'thumb_footer' => '',
|
28 |
-
'lightbox_width' => '550',
|
29 |
-
'lightbox_height' => '550',
|
30 |
-
'lightbox_type' => 'roadmap',
|
31 |
-
'lightbox_zoom' => '14',
|
32 |
-
'lightbox_bubble' => '1',
|
33 |
-
'lightbox_skin' => '',
|
34 |
-
'lightbox_title' => '1',
|
35 |
-
'lightbox_header' => '',
|
36 |
-
'lightbox_footer' => ''));
|
37 |
-
|
38 |
-
$title = $instance['title'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$thumb_header = $instance['thumb_header'];
|
47 |
-
$thumb_footer = $instance['thumb_footer'];
|
48 |
-
$lightbox_width = $instance['lightbox_width'];
|
49 |
-
$lightbox_height = $instance['lightbox_height'];
|
50 |
-
$lightbox_type = $instance['lightbox_type'];
|
51 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
52 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
53 |
-
$lightbox_title = $instance['lightbox_title'];
|
54 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
55 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
56 |
-
$lightbox_header = $instance['lightbox_header'];
|
57 |
-
|
58 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
59 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
60 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
61 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
62 |
-
|
63 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
64 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
65 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
66 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
67 |
-
|
68 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
69 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
70 |
-
array('val' => 'green', 'label' => 'Green'),
|
71 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
72 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
73 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
74 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
75 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
76 |
-
array('val' => 'red', 'label' => 'Red'),
|
77 |
-
array('val' => 'white', 'label' => 'White'));
|
78 |
-
|
79 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
80 |
-
array('val' => 'small', 'label' => 'Small'),
|
81 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
82 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
83 |
-
|
84 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
85 |
-
for ($tmp = 1; $tmp <= 20; $tmp++) {
|
86 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
87 |
-
}
|
88 |
-
$zoom_levels[] = array('val' => '21', 'label' => '21 - street view');
|
89 |
-
|
90 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'White with rounded corners (default)');
|
91 |
-
$lightbox_skins[] = array('val' => 'black-rounded', 'label' => 'Black with rounded corners');
|
92 |
-
$lightbox_skins[] = array('val' => 'white-square', 'label' => 'White with square corners');
|
93 |
-
$lightbox_skins[] = array('val' => 'black-square', 'label' => 'Black with square corners');
|
94 |
-
|
95 |
-
|
96 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
97 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
98 |
-
|
99 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
100 |
-
echo '<div id="gmw-thumb">';
|
101 |
-
|
102 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
103 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
104 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
105 |
-
echo ' px</p>';
|
106 |
-
|
107 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
108 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
109 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
110 |
-
echo '</select></p>';
|
111 |
-
|
112 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
113 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
114 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
115 |
-
echo '</select></p>';
|
116 |
-
|
117 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
118 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
119 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
120 |
-
echo '</select></p>';
|
121 |
-
|
122 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
123 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
124 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
125 |
-
echo '</select></p>';
|
126 |
-
|
127 |
-
echo '<p><label for="' . $this->get_field_id('thumb_header') . '">Text Above Map:</label>';
|
128 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('thumb_header') . '" name="' . $this->get_field_name('thumb_header') . '">'. $thumb_header . '</textarea></p>';
|
129 |
-
|
130 |
-
echo '<p><label for="' . $this->get_field_id('thumb_footer') . '">Text Below Map:</label>';
|
131 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('thumb_footer') . '" name="' . $this->get_field_name('thumb_footer') . '">'. $thumb_footer . '</textarea></p>';
|
132 |
-
|
133 |
-
echo '</div>'; // thumbnail tab
|
134 |
-
echo '<div id="gmw-lightbox">';
|
135 |
-
|
136 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
137 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
138 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
139 |
-
echo ' px</p>';
|
140 |
-
|
141 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
142 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
143 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
144 |
-
echo '</select></p>';
|
145 |
-
|
146 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
147 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
148 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
149 |
-
echo '</select></p>';
|
150 |
-
|
151 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
152 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
153 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
154 |
-
echo '</select></p>';
|
155 |
-
|
156 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
157 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
158 |
-
echo '</p>';
|
159 |
-
|
160 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
161 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
162 |
-
echo '</p>';
|
163 |
-
|
164 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
165 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
166 |
-
|
167 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
168 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
169 |
-
|
170 |
-
echo '</div>'; // lightbox tab
|
171 |
-
echo '</div>'; // tabs
|
172 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
173 |
-
}
|
174 |
-
|
175 |
-
function update($new_instance, $old_instance) {
|
176 |
-
$instance = $old_instance;
|
177 |
-
|
178 |
-
$instance['title'] = $new_instance['title'];
|
179 |
-
$instance['address'] = $new_instance['address'];
|
180 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
181 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
182 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
183 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
184 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
185 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
186 |
-
$instance['thumb_header'] = trim($new_instance['thumb_header']);
|
187 |
-
$instance['thumb_footer'] = trim($new_instance['thumb_footer']);
|
188 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
189 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
190 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
191 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
192 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
193 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
194 |
-
$instance['lightbox_header'] = trim($new_instance['lightbox_header']);
|
195 |
-
$instance['lightbox_footer'] = trim($new_instance['lightbox_footer']);
|
196 |
-
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
197 |
-
|
198 |
-
return $instance;
|
199 |
-
}
|
200 |
-
|
201 |
-
function widget($args, $instance) {
|
202 |
-
$out = $tmp = '';
|
203 |
-
|
204 |
-
extract($args, EXTR_SKIP);
|
205 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
206 |
-
'width' => $instance['lightbox_width'],
|
207 |
-
'height' => $instance['lightbox_height'],
|
208 |
-
'footer' => $instance['lightbox_footer'],
|
209 |
-
'header' => $instance['lightbox_header'],
|
210 |
-
'address' => $instance['address'],
|
211 |
-
'zoom' => $instance['lightbox_zoom'],
|
212 |
-
'type' => $instance['lightbox_type'],
|
213 |
-
'skin' => $instance['lightbox_skin'],
|
214 |
-
'bubble' => $instance['lightbox_bubble'],
|
215 |
-
'id' => $widget_id);
|
216 |
-
|
217 |
-
$out .= $before_widget;
|
218 |
-
|
219 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
220 |
-
if (!empty($title)) {
|
221 |
-
$out .= $before_title . $title . $after_title;
|
222 |
-
}
|
223 |
-
|
224 |
-
if ($instance['thumb_header']) {
|
225 |
-
$tmp .= wpautop($instance['thumb_header']);
|
226 |
-
}
|
227 |
-
$tmp .= '<p><a class="gmw-thumbnail-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
228 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
229 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
230 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
231 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
232 |
-
urlencode($instance['address']) . '"></a>';
|
233 |
-
$tmp .= '</p>';
|
234 |
-
if ($instance['thumb_footer']) {
|
235 |
-
$tmp .= wpautop($instance['thumb_footer']);
|
236 |
-
}
|
237 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
238 |
-
|
239 |
-
$out .= $after_widget;
|
240 |
-
|
241 |
-
echo $out;
|
242 |
-
}
|
243 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/google-maps-widget.php
DELETED
@@ -1,175 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.55
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
define('GMW_VER', '0.50');
|
18 |
-
require 'gmw-widget.php';
|
19 |
-
|
20 |
-
|
21 |
-
class GMW {
|
22 |
-
function init() {
|
23 |
-
if (is_admin()) {
|
24 |
-
// check if minimal required WP version is used
|
25 |
-
self::check_wp_version(3.2);
|
26 |
-
|
27 |
-
// aditional links in plugin description
|
28 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
29 |
-
array(__CLASS__, 'plugin_action_links'));
|
30 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
31 |
-
|
32 |
-
// enqueue admin scripts
|
33 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
34 |
-
} else {
|
35 |
-
// enqueue frontend scripts
|
36 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
37 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
38 |
-
}
|
39 |
-
} // init
|
40 |
-
|
41 |
-
|
42 |
-
// initialize widgets
|
43 |
-
function widgets_init() {
|
44 |
-
register_widget('GoogleMapsWidget');
|
45 |
-
} // widgets_init
|
46 |
-
|
47 |
-
|
48 |
-
// add settings link to plugins page
|
49 |
-
function plugin_action_links($links) {
|
50 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
51 |
-
array_unshift($links, $settings_link);
|
52 |
-
|
53 |
-
return $links;
|
54 |
-
} // plugin_action_links
|
55 |
-
|
56 |
-
|
57 |
-
// add links to plugin's description in plugins table
|
58 |
-
function plugin_meta_links($links, $file) {
|
59 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
60 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
61 |
-
|
62 |
-
if ($file == plugin_basename(__FILE__)) {
|
63 |
-
//$links[] = $documentation_link;
|
64 |
-
$links[] = $support_link;
|
65 |
-
}
|
66 |
-
|
67 |
-
return $links;
|
68 |
-
} // plugin_meta_links
|
69 |
-
|
70 |
-
|
71 |
-
// check if user has the minimal WP version required by the plugin
|
72 |
-
function check_wp_version($min_version) {
|
73 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
74 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
75 |
-
}
|
76 |
-
} // check_wp_version
|
77 |
-
|
78 |
-
|
79 |
-
// display error message if WP version is too low
|
80 |
-
function min_version_error() {
|
81 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
82 |
-
} // min_version_error
|
83 |
-
|
84 |
-
|
85 |
-
// print dialogs markup in footer
|
86 |
-
function dialogs_markup() {
|
87 |
-
$out = '';
|
88 |
-
$widgets = GoogleMapsWidget::$widgets;
|
89 |
-
|
90 |
-
if (!$widgets) {
|
91 |
-
wp_dequeue_script('gmw');
|
92 |
-
wp_dequeue_script('gmw-fancybox');
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
foreach ($widgets as $widget) {
|
97 |
-
if ($widget['bubble']) {
|
98 |
-
$iwloc = 'addr';
|
99 |
-
} else {
|
100 |
-
$iwloc = 'near';
|
101 |
-
}
|
102 |
-
$map_url = 'http://maps.google.com/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode(remove_accents($widget['address'])) . '&z=' . urlencode($widget['zoom']) . '';
|
103 |
-
|
104 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-map-skin="' . $widget['skin'] . '" data-map-iframe-url="' . $map_url . '" id="dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '">';
|
105 |
-
if ($widget['header']) {
|
106 |
-
$out .= '<div class="gmw-header"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
107 |
-
}
|
108 |
-
$out .= '<div class="gmw-map"></div>';
|
109 |
-
if ($widget['footer']) {
|
110 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
111 |
-
}
|
112 |
-
$out .= "</div>\n";
|
113 |
-
} // foreach $widgets
|
114 |
-
|
115 |
-
echo $out;
|
116 |
-
} // run_scroller
|
117 |
-
|
118 |
-
|
119 |
-
// enqueue frontend scripts if necessary
|
120 |
-
function enqueue_scripts() {
|
121 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
122 |
-
wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
|
123 |
-
wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
|
124 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
|
125 |
-
}
|
126 |
-
} // enqueue_scripts
|
127 |
-
|
128 |
-
|
129 |
-
// enqueue CSS and JS scripts on widgets page
|
130 |
-
function admin_enqueue_scripts() {
|
131 |
-
if (self::is_plugin_admin_page()) {
|
132 |
-
wp_enqueue_script('jquery-ui-tabs');
|
133 |
-
wp_enqueue_script('gmw-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array('jquery'), GMW_VER, true);
|
134 |
-
wp_enqueue_script('gmw-admin', plugins_url('js/gmw-admin.js', __FILE__), array('jquery'), GMW_VER, true);
|
135 |
-
wp_enqueue_style('gmw-admin', plugins_url('css/gmw-admin.css', __FILE__), array(), GMW_VER);
|
136 |
-
} // if
|
137 |
-
} // admin_enqueue_scripts
|
138 |
-
|
139 |
-
|
140 |
-
// check if plugin's admin page is shown
|
141 |
-
function is_plugin_admin_page() {
|
142 |
-
$current_screen = get_current_screen();
|
143 |
-
|
144 |
-
if ($current_screen->id == 'widgets') {
|
145 |
-
return true;
|
146 |
-
} else {
|
147 |
-
return false;
|
148 |
-
}
|
149 |
-
} // is_plugin_admin_page
|
150 |
-
|
151 |
-
|
152 |
-
// helper function for creating dropdowns
|
153 |
-
function create_select_options($options, $selected = null, $output = true) {
|
154 |
-
$out = "\n";
|
155 |
-
|
156 |
-
foreach ($options as $tmp) {
|
157 |
-
if ($selected == $tmp['val']) {
|
158 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
159 |
-
} else {
|
160 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
161 |
-
}
|
162 |
-
} // foreach
|
163 |
-
|
164 |
-
if ($output) {
|
165 |
-
echo $out;
|
166 |
-
} else {
|
167 |
-
return $out;
|
168 |
-
}
|
169 |
-
} // create_select_options
|
170 |
-
} // class GMW
|
171 |
-
|
172 |
-
|
173 |
-
// hook everything up
|
174 |
-
add_action('init', array('GMW', 'init'));
|
175 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/images/blank.gif
DELETED
Binary file
|
tags/0.55/images/fancybox_loading.gif
DELETED
Binary file
|
tags/0.55/images/fancybox_overlay.png
DELETED
Binary file
|
tags/0.55/images/fancybox_sprite.png
DELETED
Binary file
|
tags/0.55/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
?>
|
|
|
|
|
|
tags/0.55/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/js/gmw.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('a.gmw-thumbnail-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
map_url = dialog.attr('data-map-iframe-url');
|
12 |
-
map_title = dialog.attr('title');
|
13 |
-
map_skin = dialog.attr('data-map-skin');
|
14 |
-
|
15 |
-
var content = $(dialog.html());
|
16 |
-
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
17 |
-
|
18 |
-
$.fancybox( { 'wrapCSS': map_skin, 'type': 'html', 'content': content, 'title': map_title, 'autoSize': true, 'minWidth': map_width, 'minHeight': map_height } );
|
19 |
-
|
20 |
-
return false;
|
21 |
-
});
|
22 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/js/jquery.fancybox.pack.js
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
/*! fancyBox v2.1.4 fancyapps.com | fancyapps.com/fancybox/#license */
|
2 |
-
(function(C,z,f,r){var q=f(C),n=f(z),b=f.fancybox=function(){b.open.apply(this,arguments)},H=navigator.userAgent.match(/msie/),w=null,s=z.createTouch!==r,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},F=function(a){return p(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&F(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},x=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.4",defaults:{padding:15,margin:20,width:800,
|
3 |
-
height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",
|
4 |
-
34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
|
5 |
-
(H?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
|
6 |
-
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
|
7 |
-
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
|
8 |
-
c.metadata())):k=c);g=d.href||k.href||(p(c)?c:null);h=d.title!==r?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));p(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":p(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(p(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
|
9 |
-
k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==r&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
|
10 |
-
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
|
11 |
-
setTimeout(b.next,b.current.playSpeed))},c=function(){d();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":c,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(p(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},
|
12 |
-
prev:function(a){var d=b.current;d&&(p(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==r&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},
|
13 |
-
e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(w),w=null);b.isOpen&&!w&&(w=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),w=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),
|
14 |
-
b.trigger("onUpdate")),b.update())},hideLoading:function(){n.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");n.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||
|
15 |
-
!1,d={x:q.scrollLeft(),y:q.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&C.innerWidth?C.innerWidth:q.width(),d.h=s&&C.innerHeight?C.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&n.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=
|
16 |
-
e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==r)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&
|
17 |
-
"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,
|
18 |
-
e){e&&(b.helpers[d]&&f.isFunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isImage:function(a){return p(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(a){return p(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&
|
19 |
-
(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=
|
20 |
-
!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady");
|
21 |
-
if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=
|
22 |
-
this.width;b.coming.height=this.height;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,
|
23 |
-
(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=
|
24 |
-
b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();
|
25 |
-
e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
26 |
-
!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
27 |
-
a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,
|
28 |
-
v=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,p=l(y[1]+y[3]),r=l(y[0]+y[2]),z,A,t,D,B,G,C,E,w;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=l(k.outerWidth(!0)-k.width());z=l(k.outerHeight(!0)-k.height());A=p+y;t=r+z;D=F(c)?(a.w-A)*l(c)/100:c;B=F(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(w=h.content,h.autoHeight&&1===w.data("ready"))try{w[0].contentWindow.document.location&&(g.width(D).height(9999),G=w.contents().find("body"),q&&G.css("overflow-x",
|
29 |
-
"hidden"),B=G.height())}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=l(D);j=l(B);E=D/B;m=l(F(m)?l(m,"w")-A:m);n=l(F(n)?l(n,"w")-A:n);u=l(F(u)?l(u,"h")-t:u);v=l(F(v)?l(v,"h")-t:v);G=n;C=v;h.fitToView&&(n=Math.min(a.w-A,n),v=Math.min(a.h-t,v));A=a.w-p;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/E)),j>v&&(j=v,c=l(j*E)),c<m&&(c=m,j=l(c/E)),j<u&&
|
30 |
-
(j=u,c=l(j*E))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,v)));if(h.fitToView)if(g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height(),h.aspectRatio)for(;(a>A||p>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(v,j-10)),c=l(j*E),c<m&&(c=m,j=l(c/E)),c>n&&(c=n,j=l(c/E)),g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height();else c=Math.max(m,Math.min(c,c-(a-A))),j=Math.max(u,Math.min(j,j-(p-r)));q&&("auto"===s&&j<B&&c+y+
|
31 |
-
q<A)&&(c+=q);g.width(c).height(j);e.width(c+y);a=e.width();p=e.height();e=(a>A||p>r)&&c>m&&j>u;c=h.aspectRatio?c<G&&j<C&&c<D&&j<B:(c<G||j<C)&&(c<D||j<B);f.extend(h,{dim:{width:x(a),height:x(p)},origWidth:D,origHeight:B,canShrink:e,canExpand:c,wPadding:y,hPadding:z,wrapSpace:p-k.outerHeight(!0),skinSpace:k.height()-j});!w&&(h.autoHeight&&j>u&&j<v&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",
|
32 |
-
top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=x(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=x(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&
|
33 |
-
(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
|
34 |
-
a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
|
35 |
-
(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:x(c.top-h*a.topRatio),left:x(c.left-j*a.leftRatio),width:x(f+j),height:x(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
|
36 |
-
f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
|
37 |
-
{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=x(l(e[g])-200),c[g]="+=200px"):(e[g]=x(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
|
38 |
-
b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=f('<div class="fancybox-overlay"></div>').appendTo("body");
|
39 |
-
this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){f(a.target).hasClass("fancybox-overlay")&&(b.isActive?b.close():d.close())});this.overlay.css(a.css).show()},
|
40 |
-
close:function(){f(".fancybox-overlay").remove();q.unbind("resize.overlay");this.overlay=null;!1!==this.margin&&(f("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeClass("fancybox-lock")},update:function(){var a="100%",b;this.overlay.width(a).height("100%");H?(b=Math.max(z.documentElement.offsetWidth,z.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>q.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,b){f(".fancybox-overlay").stop(!0,
|
41 |
-
!0);this.overlay||(this.margin=n.height()>q.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,this.el=z.all&&!z.querySelector?f("html"):f("body"),this.create(a));a.locked&&this.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",l(this.margin)+b.scrollbarWidth));this.open(a)},onUpdate:function(){this.fixed||
|
42 |
-
this.update()},afterClose:function(a){this.overlay&&!b.isActive&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(p(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),
|
43 |
-
H&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+
|
44 |
-
'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):n.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};n.ready(function(){f.scrollbarWidth===r&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),
|
45 |
-
b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===r){var a=f.support,d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.55/readme.txt
DELETED
@@ -1,158 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.5
|
8 |
-
Stable tag: 0.55
|
9 |
-
|
10 |
-
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Check out the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
17 |
-
|
18 |
-
**General widget options**
|
19 |
-
|
20 |
-
* title
|
21 |
-
* address
|
22 |
-
|
23 |
-
**Thumbnail map options**
|
24 |
-
|
25 |
-
* map size - width & height
|
26 |
-
* map type - road, satellite, map or hybrid
|
27 |
-
* pin color
|
28 |
-
* pin size
|
29 |
-
* zoom level
|
30 |
-
|
31 |
-
**Lightbox map options**
|
32 |
-
|
33 |
-
* map size - width & height
|
34 |
-
* map type - road, satellite, map or hybrid
|
35 |
-
* zoom level
|
36 |
-
* skin
|
37 |
-
* show/hide address bubble
|
38 |
-
* show/hide map title
|
39 |
-
* header text
|
40 |
-
* footer text
|
41 |
-
|
42 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
43 |
-
|
44 |
-
The plugin was voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian.
|
45 |
-
|
46 |
-
== Installation ==
|
47 |
-
|
48 |
-
Follow the usual routine;
|
49 |
-
|
50 |
-
1. Open WP admin - Plugins - Add New
|
51 |
-
2. Enter "Google Maps Widget" under search and hit Enter
|
52 |
-
3. Plugin will show up as the first on the list, click "Install Now"
|
53 |
-
|
54 |
-
Or if needed, upload manually;
|
55 |
-
|
56 |
-
1. Download the plugin.
|
57 |
-
2. Unzip it and upload to wp-content/plugin/
|
58 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
59 |
-
4. Configure the plugin under Appearance - Widgets
|
60 |
-
|
61 |
-
|
62 |
-
== Frequently Asked Questions ==
|
63 |
-
|
64 |
-
= Who is this plugin for? =
|
65 |
-
|
66 |
-
For just about anyone who needs a map on their site.
|
67 |
-
|
68 |
-
= It's not working!!! Arrrrrrrrr =
|
69 |
-
|
70 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
71 |
-
If you can figure it out open a thread in the support forums.
|
72 |
-
|
73 |
-
== Screenshots ==
|
74 |
-
|
75 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
76 |
-
2. Larger map with all features is available in the lightbox
|
77 |
-
3. Widget options - thumbnail map
|
78 |
-
4. Widget options - lightbox map
|
79 |
-
|
80 |
-
== Changelog ==
|
81 |
-
|
82 |
-
= 0.55 =
|
83 |
-
* 2013/04/05
|
84 |
-
* added 2 new options - text above and below thumbnail map
|
85 |
-
* updated fancyBox JS to the latest version
|
86 |
-
* minor code improvements
|
87 |
-
|
88 |
-
= 0.50 =
|
89 |
-
* 2012/12/12
|
90 |
-
* small WP 3.5 compatibility fixes
|
91 |
-
|
92 |
-
= 0.41 =
|
93 |
-
* 2012/12/03
|
94 |
-
* removed screenshots from plugin package
|
95 |
-
|
96 |
-
= 0.4 =
|
97 |
-
* 2012/11/28
|
98 |
-
* fixed non UTF-8 address bug
|
99 |
-
|
100 |
-
= 0.37 =
|
101 |
-
* 2012/11/19
|
102 |
-
* fixed bug to use google.com instead of google.co.uk
|
103 |
-
|
104 |
-
= 0.35 =
|
105 |
-
* 2012/09/28
|
106 |
-
* added 4 skins for lightbox
|
107 |
-
|
108 |
-
= 0.31 =
|
109 |
-
* 2012/09/14
|
110 |
-
* fix for bad themes which don't respect proper sidebar markup
|
111 |
-
|
112 |
-
= 0.3 =
|
113 |
-
* 2012/09/04
|
114 |
-
* lightbox script changed from jQuery UI Dialog to <a href="http://fancyapps.com/fancybox/">fancyBox2</a>
|
115 |
-
* added "show map title on lightbox" option
|
116 |
-
* significant speed improvements
|
117 |
-
* preparations for lightbox skins
|
118 |
-
|
119 |
-
= 0.22 =
|
120 |
-
* 2012/08/31
|
121 |
-
* Fixed small JS related GUI bug
|
122 |
-
|
123 |
-
= 0.2 =
|
124 |
-
* 2012/08/28
|
125 |
-
* Complete GUI rewrite
|
126 |
-
* Added header text option
|
127 |
-
* Added address bubble visibility option
|
128 |
-
* Fixed thumbnail map scaling bug
|
129 |
-
* Fixed lightbox map size bug
|
130 |
-
|
131 |
-
= 0.13 =
|
132 |
-
* 2012/08/09
|
133 |
-
* Added pin size for thumbnail map
|
134 |
-
|
135 |
-
= 0.12 =
|
136 |
-
* 2012/08/07
|
137 |
-
* Added pin color for thumbnail map
|
138 |
-
* Fixed a few minor bugs
|
139 |
-
|
140 |
-
= 0.11 =
|
141 |
-
* 2012/08/06
|
142 |
-
* Fixed a few minor bugs
|
143 |
-
|
144 |
-
= 0.1 =
|
145 |
-
* 2012/08/03
|
146 |
-
* Initial release
|
147 |
-
|
148 |
-
|
149 |
-
== Upgrade Notice ==
|
150 |
-
|
151 |
-
= 0.2 =
|
152 |
-
Due to variable name changes footer text will be reset
|
153 |
-
|
154 |
-
= 0.1x =
|
155 |
-
Upgrade without any fear :)
|
156 |
-
|
157 |
-
= 0.1 =
|
158 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/css/gmw-admin.css
DELETED
@@ -1,71 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
30 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-active a { outline: none;}
|
31 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
32 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
33 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
34 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
35 |
-
|
36 |
-
.ui-tabs .ui-tabs-nav li a {
|
37 |
-
font-weight: 200;
|
38 |
-
line-height: 32px;
|
39 |
-
color: #AAAAAA;
|
40 |
-
padding: 0 15px;
|
41 |
-
}
|
42 |
-
|
43 |
-
.ui-tabs ul.ui-tabs-nav li {
|
44 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
45 |
-
border-radius: 3px 3px 0 0;
|
46 |
-
border-style: solid;
|
47 |
-
border-width: 1px 1px 0;
|
48 |
-
color: #AAAAAA;
|
49 |
-
display: inline-block;
|
50 |
-
font-size: 12px;
|
51 |
-
line-height: 16px;
|
52 |
-
margin: 0 0 -1px 10px;
|
53 |
-
text-decoration: none;
|
54 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
55 |
-
}
|
56 |
-
|
57 |
-
ul.ui-tabs-nav{
|
58 |
-
float: left;
|
59 |
-
border-bottom: 1px solid #CCCCCC;
|
60 |
-
padding-bottom: 0;
|
61 |
-
width: 100%;
|
62 |
-
margin-bottom: 20px !important
|
63 |
-
}
|
64 |
-
|
65 |
-
.ui-state-hover a, .ui-state-active a {
|
66 |
-
color: #464646 !important;
|
67 |
-
}
|
68 |
-
|
69 |
-
.ui-state-hover a {
|
70 |
-
color: #D54E21 !important;
|
71 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/css/gmw.css
DELETED
@@ -1,306 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
275 |
-
|
276 |
-
/* lightbox skins */
|
277 |
-
.black-rounded .fancybox-skin {
|
278 |
-
background: black;
|
279 |
-
}
|
280 |
-
.black-rounded .fancybox-title-float-wrap .child {
|
281 |
-
background: black;
|
282 |
-
}
|
283 |
-
|
284 |
-
.white-square .fancybox-skin {
|
285 |
-
-webkit-border-radius: 0;
|
286 |
-
-moz-border-radius: 0;
|
287 |
-
border-radius: 0;
|
288 |
-
}
|
289 |
-
.white-square .fancybox-title-float-wrap .child {
|
290 |
-
-webkit-border-radius: 0;
|
291 |
-
-moz-border-radius: 0;
|
292 |
-
border-radius: 0;
|
293 |
-
}
|
294 |
-
|
295 |
-
.black-square .fancybox-skin {
|
296 |
-
background: black;
|
297 |
-
-webkit-border-radius: 0;
|
298 |
-
-moz-border-radius: 0;
|
299 |
-
border-radius: 0;
|
300 |
-
}
|
301 |
-
.black-square .fancybox-title-float-wrap .child {
|
302 |
-
background: black;
|
303 |
-
-webkit-border-radius: 0;
|
304 |
-
-moz-border-radius: 0;
|
305 |
-
border-radius: 0;
|
306 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/gmw-widget.php
DELETED
@@ -1,252 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => '250',
|
23 |
-
'thumb_height' => '250',
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'thumb_header' => '',
|
27 |
-
'thumb_footer' => '',
|
28 |
-
'lightbox_width' => '550',
|
29 |
-
'lightbox_height' => '550',
|
30 |
-
'lightbox_type' => 'roadmap',
|
31 |
-
'lightbox_zoom' => '14',
|
32 |
-
'lightbox_bubble' => '1',
|
33 |
-
'lightbox_skin' => '',
|
34 |
-
'lightbox_title' => '1',
|
35 |
-
'lightbox_header' => '',
|
36 |
-
'lightbox_footer' => ''));
|
37 |
-
|
38 |
-
$title = $instance['title'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$thumb_header = $instance['thumb_header'];
|
47 |
-
$thumb_footer = $instance['thumb_footer'];
|
48 |
-
$lightbox_width = $instance['lightbox_width'];
|
49 |
-
$lightbox_height = $instance['lightbox_height'];
|
50 |
-
$lightbox_type = $instance['lightbox_type'];
|
51 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
52 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
53 |
-
$lightbox_title = $instance['lightbox_title'];
|
54 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
55 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
56 |
-
$lightbox_header = $instance['lightbox_header'];
|
57 |
-
|
58 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
59 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
60 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
61 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
62 |
-
|
63 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
64 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
65 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
66 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
67 |
-
|
68 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
69 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
70 |
-
array('val' => 'green', 'label' => 'Green'),
|
71 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
72 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
73 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
74 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
75 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
76 |
-
array('val' => 'red', 'label' => 'Red'),
|
77 |
-
array('val' => 'white', 'label' => 'White'));
|
78 |
-
|
79 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
80 |
-
array('val' => 'small', 'label' => 'Small'),
|
81 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
82 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
83 |
-
|
84 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
85 |
-
for ($tmp = 1; $tmp <= 21; $tmp++) {
|
86 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
87 |
-
}
|
88 |
-
|
89 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'White with rounded corners (default)');
|
90 |
-
$lightbox_skins[] = array('val' => 'black-rounded', 'label' => 'Black with rounded corners');
|
91 |
-
$lightbox_skins[] = array('val' => 'white-square', 'label' => 'White with square corners');
|
92 |
-
$lightbox_skins[] = array('val' => 'black-square', 'label' => 'Black with square corners');
|
93 |
-
|
94 |
-
|
95 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
96 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
97 |
-
|
98 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
99 |
-
echo '<div id="gmw-thumb">';
|
100 |
-
|
101 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
102 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
103 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
104 |
-
echo ' px</p>';
|
105 |
-
|
106 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
107 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
108 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
109 |
-
echo '</select></p>';
|
110 |
-
|
111 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
112 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
113 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
114 |
-
echo '</select></p>';
|
115 |
-
|
116 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
117 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
118 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
119 |
-
echo '</select></p>';
|
120 |
-
|
121 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
122 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
123 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
124 |
-
echo '</select></p>';
|
125 |
-
|
126 |
-
echo '<p><label for="' . $this->get_field_id('thumb_header') . '">Text Above Map:</label>';
|
127 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('thumb_header') . '" name="' . $this->get_field_name('thumb_header') . '">'. $thumb_header . '</textarea></p>';
|
128 |
-
|
129 |
-
echo '<p><label for="' . $this->get_field_id('thumb_footer') . '">Text Below Map:</label>';
|
130 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('thumb_footer') . '" name="' . $this->get_field_name('thumb_footer') . '">'. $thumb_footer . '</textarea></p>';
|
131 |
-
|
132 |
-
echo '</div>'; // thumbnail tab
|
133 |
-
echo '<div id="gmw-lightbox">';
|
134 |
-
|
135 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
136 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
137 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
138 |
-
echo ' px</p>';
|
139 |
-
|
140 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
141 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
142 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
143 |
-
echo '</select></p>';
|
144 |
-
|
145 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
146 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
147 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
148 |
-
echo '</select></p>';
|
149 |
-
|
150 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
151 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
152 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
153 |
-
echo '</select></p>';
|
154 |
-
|
155 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
156 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
157 |
-
echo '</p>';
|
158 |
-
|
159 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
160 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
161 |
-
echo '</p>';
|
162 |
-
|
163 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
164 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
165 |
-
|
166 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
167 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
168 |
-
|
169 |
-
echo '</div>'; // lightbox tab
|
170 |
-
echo '</div>'; // tabs
|
171 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
172 |
-
}
|
173 |
-
|
174 |
-
function update($new_instance, $old_instance) {
|
175 |
-
$instance = $old_instance;
|
176 |
-
|
177 |
-
$instance['title'] = $new_instance['title'];
|
178 |
-
$instance['address'] = $new_instance['address'];
|
179 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
180 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
181 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
182 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
183 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
184 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
185 |
-
$instance['thumb_header'] = trim($new_instance['thumb_header']);
|
186 |
-
$instance['thumb_footer'] = trim($new_instance['thumb_footer']);
|
187 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
188 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
189 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
190 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
191 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
192 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
193 |
-
$instance['lightbox_header'] = trim($new_instance['lightbox_header']);
|
194 |
-
$instance['lightbox_footer'] = trim($new_instance['lightbox_footer']);
|
195 |
-
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
196 |
-
|
197 |
-
return $instance;
|
198 |
-
}
|
199 |
-
|
200 |
-
function widget($args, $instance) {
|
201 |
-
$out = $tmp = '';
|
202 |
-
|
203 |
-
extract($args, EXTR_SKIP);
|
204 |
-
|
205 |
-
$ll = '';
|
206 |
-
if ($instance['lightbox_zoom'] > 14) {
|
207 |
-
$coordinates = GMW::get_coordinates($instance['address']);
|
208 |
-
if ($coordinates) {
|
209 |
-
$ll = $coordinates['lat'] . ',' . $coordinates['lng'];
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
214 |
-
'width' => $instance['lightbox_width'],
|
215 |
-
'height' => $instance['lightbox_height'],
|
216 |
-
'footer' => $instance['lightbox_footer'],
|
217 |
-
'header' => $instance['lightbox_header'],
|
218 |
-
'address' => $instance['address'],
|
219 |
-
'zoom' => $instance['lightbox_zoom'],
|
220 |
-
'type' => $instance['lightbox_type'],
|
221 |
-
'skin' => $instance['lightbox_skin'],
|
222 |
-
'bubble' => $instance['lightbox_bubble'],
|
223 |
-
'll' => $ll,
|
224 |
-
'id' => $widget_id);
|
225 |
-
|
226 |
-
$out .= $before_widget;
|
227 |
-
|
228 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
229 |
-
if (!empty($title)) {
|
230 |
-
$out .= $before_title . $title . $after_title;
|
231 |
-
}
|
232 |
-
|
233 |
-
if ($instance['thumb_header']) {
|
234 |
-
$tmp .= wpautop($instance['thumb_header']);
|
235 |
-
}
|
236 |
-
$tmp .= '<p><a class="gmw-thumbnail-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
237 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
238 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
239 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
240 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
241 |
-
urlencode($instance['address']) . '"></a>';
|
242 |
-
$tmp .= '</p>';
|
243 |
-
if ($instance['thumb_footer']) {
|
244 |
-
$tmp .= wpautop($instance['thumb_footer']);
|
245 |
-
}
|
246 |
-
$out .= apply_filters('google_maps_widget_content', $tmp);
|
247 |
-
|
248 |
-
$out .= $after_widget;
|
249 |
-
|
250 |
-
echo $out;
|
251 |
-
}
|
252 |
-
} // class GoogleMapsWidget
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/google-maps-widget.php
DELETED
@@ -1,221 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Google Maps Widget
|
4 |
-
Plugin URI: http://wordpress.org/extend/plugins/google-maps-widget/
|
5 |
-
Description: Display a single-image super-fast loading Google map in a widget. A larger, full featured map is available on click in a lightbox.
|
6 |
-
Author: Web factory Ltd
|
7 |
-
Version: 0.60
|
8 |
-
Author URI: http://www.webfactoryltd.com/
|
9 |
-
*/
|
10 |
-
|
11 |
-
|
12 |
-
if (!function_exists('add_action')) {
|
13 |
-
die('Please don\'t open this file directly!');
|
14 |
-
}
|
15 |
-
|
16 |
-
|
17 |
-
define('GMW_VER', '0.60');
|
18 |
-
require 'gmw-widget.php';
|
19 |
-
|
20 |
-
|
21 |
-
class GMW {
|
22 |
-
function init() {
|
23 |
-
if (is_admin()) {
|
24 |
-
// check if minimal required WP version is used
|
25 |
-
self::check_wp_version(3.2);
|
26 |
-
|
27 |
-
// aditional links in plugin description
|
28 |
-
add_filter('plugin_action_links_' . basename(dirname(__FILE__)) . '/' . basename(__FILE__),
|
29 |
-
array(__CLASS__, 'plugin_action_links'));
|
30 |
-
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
31 |
-
|
32 |
-
// enqueue admin scripts
|
33 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
|
34 |
-
} else {
|
35 |
-
// enqueue frontend scripts
|
36 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'enqueue_scripts'));
|
37 |
-
add_action('wp_footer', array(__CLASS__, 'dialogs_markup'));
|
38 |
-
}
|
39 |
-
} // init
|
40 |
-
|
41 |
-
|
42 |
-
// initialize widgets
|
43 |
-
function widgets_init() {
|
44 |
-
register_widget('GoogleMapsWidget');
|
45 |
-
} // widgets_init
|
46 |
-
|
47 |
-
|
48 |
-
// add settings link to plugins page
|
49 |
-
function plugin_action_links($links) {
|
50 |
-
$settings_link = '<a href="' . admin_url('widgets.php') . '" title="Configure Google Maps Widget">Widgets</a>';
|
51 |
-
array_unshift($links, $settings_link);
|
52 |
-
|
53 |
-
return $links;
|
54 |
-
} // plugin_action_links
|
55 |
-
|
56 |
-
|
57 |
-
// add links to plugin's description in plugins table
|
58 |
-
function plugin_meta_links($links, $file) {
|
59 |
-
$documentation_link = '<a target="_blank" href="' . plugin_dir_url(__FILE__) . '#" title="View Google Maps Widget documentation">Documentation</a>';
|
60 |
-
$support_link = '<a target="_blank" href="http://wordpress.org/support/plugin/google-maps-widget" title="Problems? We\'re here to help!">Support</a>';
|
61 |
-
|
62 |
-
if ($file == plugin_basename(__FILE__)) {
|
63 |
-
//$links[] = $documentation_link;
|
64 |
-
$links[] = $support_link;
|
65 |
-
}
|
66 |
-
|
67 |
-
return $links;
|
68 |
-
} // plugin_meta_links
|
69 |
-
|
70 |
-
|
71 |
-
// check if user has the minimal WP version required by the plugin
|
72 |
-
function check_wp_version($min_version) {
|
73 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
74 |
-
add_action('admin_notices', array(__CLASS__, 'min_version_error'));
|
75 |
-
}
|
76 |
-
} // check_wp_version
|
77 |
-
|
78 |
-
|
79 |
-
// display error message if WP version is too low
|
80 |
-
function min_version_error() {
|
81 |
-
echo '<div class="error"><p>Google Maps Widget <b>requires WordPress version 3.2</b> or higher to function properly. You\'re using WordPress version ' . get_bloginfo('version') . '. Please <a href="' . admin_url('update-core.php') . '">update it</a>.</p></div>';
|
82 |
-
} // min_version_error
|
83 |
-
|
84 |
-
|
85 |
-
// print dialogs markup in footer
|
86 |
-
function dialogs_markup() {
|
87 |
-
$out = '';
|
88 |
-
$widgets = GoogleMapsWidget::$widgets;
|
89 |
-
|
90 |
-
if (!$widgets) {
|
91 |
-
wp_dequeue_script('gmw');
|
92 |
-
wp_dequeue_script('gmw-fancybox');
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
|
96 |
-
foreach ($widgets as $widget) {
|
97 |
-
if ($widget['bubble']) {
|
98 |
-
$iwloc = 'addr';
|
99 |
-
} else {
|
100 |
-
$iwloc = 'near';
|
101 |
-
}
|
102 |
-
if ($widget['ll']) {
|
103 |
-
$ll = '&ll=' . $widget['ll'];
|
104 |
-
} else {
|
105 |
-
$ll = '';
|
106 |
-
}
|
107 |
-
|
108 |
-
$map_url = 'http://maps.google.com/maps?hl=en&ie=utf8&output=embed&iwloc=' . $iwloc . '&iwd=1&mrt=loc&t=' . $widget['type'] . '&q=' . urlencode(remove_accents($widget['address'])) . '&z=' . urlencode($widget['zoom']) . $ll;
|
109 |
-
|
110 |
-
$out .= '<div class="gmw-dialog" style="display: none;" data-map-height="' . $widget['height'] . '" data-map-width="' . $widget['width'] . '" data-map-skin="' . $widget['skin'] . '" data-map-iframe-url="' . $map_url . '" id="dialog-' . $widget['id'] . '" title="' . esc_attr($widget['title']) . '">';
|
111 |
-
if ($widget['header']) {
|
112 |
-
$out .= '<div class="gmw-header"><i>' . do_shortcode($widget['header']) . '</i></div>';
|
113 |
-
}
|
114 |
-
$out .= '<div class="gmw-map"></div>';
|
115 |
-
if ($widget['footer']) {
|
116 |
-
$out .= '<div class="gmw-footer"><i>' . do_shortcode($widget['footer']) . '</i></div>';
|
117 |
-
}
|
118 |
-
$out .= "</div>\n";
|
119 |
-
} // foreach $widgets
|
120 |
-
|
121 |
-
echo $out;
|
122 |
-
} // run_scroller
|
123 |
-
|
124 |
-
|
125 |
-
// enqueue frontend scripts if necessary
|
126 |
-
function enqueue_scripts() {
|
127 |
-
if (is_active_widget(false, false, 'googlemapswidget', true)) {
|
128 |
-
wp_enqueue_style('gmw', plugins_url('/css/gmw.css', __FILE__), array(), GMW_VER);
|
129 |
-
wp_enqueue_script('gmw-fancybox', plugins_url('/js/jquery.fancybox.pack.js', __FILE__), array('jquery'), GMW_VER, true);
|
130 |
-
wp_enqueue_script('gmw', plugins_url('/js/gmw.js', __FILE__), array('jquery'), GMW_VER, true);
|
131 |
-
}
|
132 |
-
} // enqueue_scripts
|
133 |
-
|
134 |
-
|
135 |
-
// enqueue CSS and JS scripts on widgets page
|
136 |
-
function admin_enqueue_scripts() {
|
137 |
-
if (self::is_plugin_admin_page()) {
|
138 |
-
wp_enqueue_script('jquery-ui-tabs');
|
139 |
-
wp_enqueue_script('gmw-cookie', plugins_url('js/jquery.cookie.js', __FILE__), array('jquery'), GMW_VER, true);
|
140 |
-
wp_enqueue_script('gmw-admin', plugins_url('js/gmw-admin.js', __FILE__), array('jquery'), GMW_VER, true);
|
141 |
-
wp_enqueue_style('gmw-admin', plugins_url('css/gmw-admin.css', __FILE__), array(), GMW_VER);
|
142 |
-
} // if
|
143 |
-
} // admin_enqueue_scripts
|
144 |
-
|
145 |
-
|
146 |
-
// check if plugin's admin page is shown
|
147 |
-
function is_plugin_admin_page() {
|
148 |
-
$current_screen = get_current_screen();
|
149 |
-
|
150 |
-
if ($current_screen->id == 'widgets') {
|
151 |
-
return true;
|
152 |
-
} else {
|
153 |
-
return false;
|
154 |
-
}
|
155 |
-
} // is_plugin_admin_page
|
156 |
-
|
157 |
-
|
158 |
-
// helper function for creating dropdowns
|
159 |
-
function create_select_options($options, $selected = null, $output = true) {
|
160 |
-
$out = "\n";
|
161 |
-
|
162 |
-
foreach ($options as $tmp) {
|
163 |
-
if ($selected == $tmp['val']) {
|
164 |
-
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
165 |
-
} else {
|
166 |
-
$out .= "<option value=\"{$tmp['val']}\">{$tmp['label']} </option>\n";
|
167 |
-
}
|
168 |
-
} // foreach
|
169 |
-
|
170 |
-
if ($output) {
|
171 |
-
echo $out;
|
172 |
-
} else {
|
173 |
-
return $out;
|
174 |
-
}
|
175 |
-
} // create_select_options
|
176 |
-
|
177 |
-
|
178 |
-
function get_coordinates($address, $force_refresh = false) {
|
179 |
-
$address_hash = md5('gmw' . $address);
|
180 |
-
|
181 |
-
if ($force_refresh || ($coordinates = get_transient($address_hash)) === false) {
|
182 |
-
$url = 'http://maps.googleapis.com/maps/api/geocode/xml?address=' . urlencode($address) . '&sensor=false';
|
183 |
-
|
184 |
-
$ch = curl_init();
|
185 |
-
curl_setopt($ch, CURLOPT_URL, $url);
|
186 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
187 |
-
$xml = curl_exec($ch);
|
188 |
-
$ch_info = curl_getinfo($ch);
|
189 |
-
curl_close($ch);
|
190 |
-
|
191 |
-
if ($ch_info['http_code'] == 200) {
|
192 |
-
$data = new SimpleXMLElement($xml);
|
193 |
-
if ($data->status == 'OK') {
|
194 |
-
$cache_value['lat'] = (string) $data->result->geometry->location->lat;
|
195 |
-
$cache_value['lng'] = (string) $data->result->geometry->location->lng;
|
196 |
-
$cache_value['address'] = (string) $data->result->formatted_address;
|
197 |
-
|
198 |
-
// cache coordinates for 3 months
|
199 |
-
set_transient($address_hash, $cache_value, 3600*24*30*3);
|
200 |
-
$data = $cache_value;
|
201 |
-
} elseif (!$data->status) {
|
202 |
-
return false;
|
203 |
-
} else {
|
204 |
-
return false;
|
205 |
-
}
|
206 |
-
} else {
|
207 |
-
return false;
|
208 |
-
}
|
209 |
-
} else {
|
210 |
-
// data is cached, get it
|
211 |
-
$data = get_transient($address_hash);
|
212 |
-
}
|
213 |
-
|
214 |
-
return $data;
|
215 |
-
} // get_coordinates
|
216 |
-
} // class GMW
|
217 |
-
|
218 |
-
|
219 |
-
// hook everything up
|
220 |
-
add_action('init', array('GMW', 'init'));
|
221 |
-
add_action('widgets_init', array('GMW', 'widgets_init'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/images/blank.gif
DELETED
Binary file
|
tags/0.60/images/fancybox_loading.gif
DELETED
Binary file
|
tags/0.60/images/fancybox_overlay.png
DELETED
Binary file
|
tags/0.60/images/fancybox_sprite.png
DELETED
Binary file
|
tags/0.60/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
?>
|
|
|
|
|
|
tags/0.60/js/gmw-admin.js
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('.gmw-tabs').each(function(i, el) {
|
8 |
-
el_id = $(el).attr('id');
|
9 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
10 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
11 |
-
});
|
12 |
-
});
|
13 |
-
|
14 |
-
// get active tab index from cookie
|
15 |
-
function get_active_tab(el_id) {
|
16 |
-
id = parseInt(0 + $.cookie(el_id), 10);
|
17 |
-
|
18 |
-
return id;
|
19 |
-
} // get_active_tab
|
20 |
-
|
21 |
-
// re-tab on GUI rebuild
|
22 |
-
$('div[id*="googlemapswidget"]').ajaxSuccess(function(event, request, option) {
|
23 |
-
$('.gmw-tabs').each(function(i, el) {
|
24 |
-
el_id = $(el).attr('id');
|
25 |
-
$(el).tabs({ selected: get_active_tab(el_id),
|
26 |
-
show: function(event, ui) { $.cookie($(this).attr('id'), $(this).tabs('option', 'selected'), { expires: 7 }); }
|
27 |
-
});
|
28 |
-
});
|
29 |
-
});
|
30 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/js/gmw.js
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
jQuery(function($) {
|
7 |
-
$('a.gmw-thumbnail-map').click(function() {
|
8 |
-
dialog = $($(this).attr('href'));
|
9 |
-
map_width = dialog.attr('data-map-width');
|
10 |
-
map_height = dialog.attr('data-map-height');
|
11 |
-
map_url = dialog.attr('data-map-iframe-url');
|
12 |
-
map_title = dialog.attr('title');
|
13 |
-
map_skin = dialog.attr('data-map-skin');
|
14 |
-
|
15 |
-
var content = $(dialog.html());
|
16 |
-
content.filter('.gmw-map').html('<iframe width="' + map_width + 'px" height="' + map_height + 'px" src="' + map_url + '"></iframe>');
|
17 |
-
|
18 |
-
$.fancybox( { 'wrapCSS': map_skin, 'type': 'html', 'content': content, 'title': map_title, 'autoSize': true, 'minWidth': map_width, 'minHeight': map_height } );
|
19 |
-
|
20 |
-
return false;
|
21 |
-
});
|
22 |
-
}); // onload
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/js/jquery.cookie.js
DELETED
@@ -1,89 +0,0 @@
|
|
1 |
-
/*jslint browser: true */ /*global jQuery: true */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* jQuery Cookie plugin
|
5 |
-
*
|
6 |
-
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
7 |
-
* Dual licensed under the MIT and GPL licenses:
|
8 |
-
* http://www.opensource.org/licenses/mit-license.php
|
9 |
-
* http://www.gnu.org/licenses/gpl.html
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
|
13 |
-
// TODO JsDoc
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Create a cookie with the given key and value and other optional parameters.
|
17 |
-
*
|
18 |
-
* @example $.cookie('the_cookie', 'the_value');
|
19 |
-
* @desc Set the value of a cookie.
|
20 |
-
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
21 |
-
* @desc Create a cookie with all available options.
|
22 |
-
* @example $.cookie('the_cookie', 'the_value');
|
23 |
-
* @desc Create a session cookie.
|
24 |
-
* @example $.cookie('the_cookie', null);
|
25 |
-
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
26 |
-
* used when the cookie was set.
|
27 |
-
*
|
28 |
-
* @param String key The key of the cookie.
|
29 |
-
* @param String value The value of the cookie.
|
30 |
-
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
31 |
-
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
32 |
-
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
33 |
-
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
34 |
-
* when the the browser exits.
|
35 |
-
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
36 |
-
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
37 |
-
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
38 |
-
* require a secure protocol (like HTTPS).
|
39 |
-
* @type undefined
|
40 |
-
*
|
41 |
-
* @name $.cookie
|
42 |
-
* @cat Plugins/Cookie
|
43 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
44 |
-
*/
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get the value of a cookie with the given key.
|
48 |
-
*
|
49 |
-
* @example $.cookie('the_cookie');
|
50 |
-
* @desc Get the value of a cookie.
|
51 |
-
*
|
52 |
-
* @param String key The key of the cookie.
|
53 |
-
* @return The value of the cookie.
|
54 |
-
* @type String
|
55 |
-
*
|
56 |
-
* @name $.cookie
|
57 |
-
* @cat Plugins/Cookie
|
58 |
-
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
59 |
-
*/
|
60 |
-
jQuery.cookie = function (key, value, options) {
|
61 |
-
|
62 |
-
// key and value given, set cookie...
|
63 |
-
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
64 |
-
options = jQuery.extend({}, options);
|
65 |
-
|
66 |
-
if (value === null) {
|
67 |
-
options.expires = -1;
|
68 |
-
}
|
69 |
-
|
70 |
-
if (typeof options.expires === 'number') {
|
71 |
-
var days = options.expires, t = options.expires = new Date();
|
72 |
-
t.setDate(t.getDate() + days);
|
73 |
-
}
|
74 |
-
|
75 |
-
return (document.cookie = [
|
76 |
-
encodeURIComponent(key), '=',
|
77 |
-
options.raw ? String(value) : encodeURIComponent(String(value)),
|
78 |
-
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
79 |
-
options.path ? '; path=' + options.path : '',
|
80 |
-
options.domain ? '; domain=' + options.domain : '',
|
81 |
-
options.secure ? '; secure' : ''
|
82 |
-
].join(''));
|
83 |
-
}
|
84 |
-
|
85 |
-
// key and possibly options given, get cookie...
|
86 |
-
options = value || {};
|
87 |
-
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
88 |
-
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
89 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/js/jquery.fancybox.pack.js
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
/*! fancyBox v2.1.4 fancyapps.com | fancyapps.com/fancybox/#license */
|
2 |
-
(function(C,z,f,r){var q=f(C),n=f(z),b=f.fancybox=function(){b.open.apply(this,arguments)},H=navigator.userAgent.match(/msie/),w=null,s=z.createTouch!==r,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},p=function(a){return a&&"string"===f.type(a)},F=function(a){return p(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&F(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},x=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.4",defaults:{padding:15,margin:20,width:800,
|
3 |
-
height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",
|
4 |
-
34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
|
5 |
-
(H?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
|
6 |
-
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
|
7 |
-
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
|
8 |
-
c.metadata())):k=c);g=d.href||k.href||(p(c)?c:null);h=d.title!==r?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));p(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":p(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(p(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
|
9 |
-
k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==r&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
|
10 |
-
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
|
11 |
-
setTimeout(b.next,b.current.playSpeed))},c=function(){d();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,f("body").bind({"afterShow.player onUpdate.player":e,"onCancel.player beforeClose.player":c,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(p(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},
|
12 |
-
prev:function(a){var d=b.current;d&&(p(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==r&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},
|
13 |
-
e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(w),w=null);b.isOpen&&!w&&(w=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),w=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),
|
14 |
-
b.trigger("onUpdate")),b.update())},hideLoading:function(){n.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");n.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||
|
15 |
-
!1,d={x:q.scrollLeft(),y:q.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&C.innerWidth?C.innerWidth:q.width(),d.h=s&&C.innerHeight?C.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&n.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=
|
16 |
-
e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==r)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&
|
17 |
-
"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,
|
18 |
-
e){e&&(b.helpers[d]&&f.isFunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isImage:function(a){return p(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(a){return p(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&
|
19 |
-
(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=
|
20 |
-
!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady");
|
21 |
-
if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=
|
22 |
-
this.width;b.coming.height=this.height;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,
|
23 |
-
(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=
|
24 |
-
b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();
|
25 |
-
e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",
|
26 |
-
!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");
|
27 |
-
a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,
|
28 |
-
v=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,p=l(y[1]+y[3]),r=l(y[0]+y[2]),z,A,t,D,B,G,C,E,w;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=l(k.outerWidth(!0)-k.width());z=l(k.outerHeight(!0)-k.height());A=p+y;t=r+z;D=F(c)?(a.w-A)*l(c)/100:c;B=F(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(w=h.content,h.autoHeight&&1===w.data("ready"))try{w[0].contentWindow.document.location&&(g.width(D).height(9999),G=w.contents().find("body"),q&&G.css("overflow-x",
|
29 |
-
"hidden"),B=G.height())}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=l(D);j=l(B);E=D/B;m=l(F(m)?l(m,"w")-A:m);n=l(F(n)?l(n,"w")-A:n);u=l(F(u)?l(u,"h")-t:u);v=l(F(v)?l(v,"h")-t:v);G=n;C=v;h.fitToView&&(n=Math.min(a.w-A,n),v=Math.min(a.h-t,v));A=a.w-p;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/E)),j>v&&(j=v,c=l(j*E)),c<m&&(c=m,j=l(c/E)),j<u&&
|
30 |
-
(j=u,c=l(j*E))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,v)));if(h.fitToView)if(g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height(),h.aspectRatio)for(;(a>A||p>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(v,j-10)),c=l(j*E),c<m&&(c=m,j=l(c/E)),c>n&&(c=n,j=l(c/E)),g.width(c).height(j),e.width(c+y),a=e.width(),p=e.height();else c=Math.max(m,Math.min(c,c-(a-A))),j=Math.max(u,Math.min(j,j-(p-r)));q&&("auto"===s&&j<B&&c+y+
|
31 |
-
q<A)&&(c+=q);g.width(c).height(j);e.width(c+y);a=e.width();p=e.height();e=(a>A||p>r)&&c>m&&j>u;c=h.aspectRatio?c<G&&j<C&&c<D&&j<B:(c<G||j<C)&&(c<D||j<B);f.extend(h,{dim:{width:x(a),height:x(p)},origWidth:D,origHeight:B,canShrink:e,canExpand:c,wPadding:y,hPadding:z,wrapSpace:p-k.outerHeight(!0),skinSpace:k.height()-j});!w&&(h.autoHeight&&j>u&&j<v&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",
|
32 |
-
top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=x(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=x(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&
|
33 |
-
(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
|
34 |
-
a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
|
35 |
-
(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:x(c.top-h*a.topRatio),left:x(c.left-j*a.leftRatio),width:x(f+j),height:x(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
|
36 |
-
f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
|
37 |
-
{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=x(l(e[g])-200),c[g]="+=200px"):(e[g]=x(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
|
38 |
-
b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=f('<div class="fancybox-overlay"></div>').appendTo("body");
|
39 |
-
this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){f(a.target).hasClass("fancybox-overlay")&&(b.isActive?b.close():d.close())});this.overlay.css(a.css).show()},
|
40 |
-
close:function(){f(".fancybox-overlay").remove();q.unbind("resize.overlay");this.overlay=null;!1!==this.margin&&(f("body").css("margin-right",this.margin),this.margin=!1);this.el&&this.el.removeClass("fancybox-lock")},update:function(){var a="100%",b;this.overlay.width(a).height("100%");H?(b=Math.max(z.documentElement.offsetWidth,z.body.offsetWidth),n.width()>b&&(a=n.width())):n.width()>q.width()&&(a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,b){f(".fancybox-overlay").stop(!0,
|
41 |
-
!0);this.overlay||(this.margin=n.height()>q.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,this.el=z.all&&!z.querySelector?f("html"):f("body"),this.create(a));a.locked&&this.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",l(this.margin)+b.scrollbarWidth));this.open(a)},onUpdate:function(){this.fixed||
|
42 |
-
this.update()},afterClose:function(a){this.overlay&&!b.isActive&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(p(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),
|
43 |
-
H&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+
|
44 |
-
'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):n.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};n.ready(function(){f.scrollbarWidth===r&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),
|
45 |
-
b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===r){var a=f.support,d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/license.txt
DELETED
@@ -1,280 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 2, June 1991
|
3 |
-
|
4 |
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
5 |
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
-
Everyone is permitted to copy and distribute verbatim copies
|
7 |
-
of this license document, but changing it is not allowed.
|
8 |
-
|
9 |
-
Preamble
|
10 |
-
|
11 |
-
The licenses for most software are designed to take away your
|
12 |
-
freedom to share and change it. By contrast, the GNU General Public
|
13 |
-
License is intended to guarantee your freedom to share and change free
|
14 |
-
software--to make sure the software is free for all its users. This
|
15 |
-
General Public License applies to most of the Free Software
|
16 |
-
Foundation's software and to any other program whose authors commit to
|
17 |
-
using it. (Some other Free Software Foundation software is covered by
|
18 |
-
the GNU Lesser General Public License instead.) You can apply it to
|
19 |
-
your programs, too.
|
20 |
-
|
21 |
-
When we speak of free software, we are referring to freedom, not
|
22 |
-
price. Our General Public Licenses are designed to make sure that you
|
23 |
-
have the freedom to distribute copies of free software (and charge for
|
24 |
-
this service if you wish), that you receive source code or can get it
|
25 |
-
if you want it, that you can change the software or use pieces of it
|
26 |
-
in new free programs; and that you know you can do these things.
|
27 |
-
|
28 |
-
To protect your rights, we need to make restrictions that forbid
|
29 |
-
anyone to deny you these rights or to ask you to surrender the rights.
|
30 |
-
These restrictions translate to certain responsibilities for you if you
|
31 |
-
distribute copies of the software, or if you modify it.
|
32 |
-
|
33 |
-
For example, if you distribute copies of such a program, whether
|
34 |
-
gratis or for a fee, you must give the recipients all the rights that
|
35 |
-
you have. You must make sure that they, too, receive or can get the
|
36 |
-
source code. And you must show them these terms so they know their
|
37 |
-
rights.
|
38 |
-
|
39 |
-
We protect your rights with two steps: (1) copyright the software, and
|
40 |
-
(2) offer you this license which gives you legal permission to copy,
|
41 |
-
distribute and/or modify the software.
|
42 |
-
|
43 |
-
Also, for each author's protection and ours, we want to make certain
|
44 |
-
that everyone understands that there is no warranty for this free
|
45 |
-
software. If the software is modified by someone else and passed on, we
|
46 |
-
want its recipients to know that what they have is not the original, so
|
47 |
-
that any problems introduced by others will not reflect on the original
|
48 |
-
authors' reputations.
|
49 |
-
|
50 |
-
Finally, any free program is threatened constantly by software
|
51 |
-
patents. We wish to avoid the danger that redistributors of a free
|
52 |
-
program will individually obtain patent licenses, in effect making the
|
53 |
-
program proprietary. To prevent this, we have made it clear that any
|
54 |
-
patent must be licensed for everyone's free use or not licensed at all.
|
55 |
-
|
56 |
-
The precise terms and conditions for copying, distribution and
|
57 |
-
modification follow.
|
58 |
-
|
59 |
-
GNU GENERAL PUBLIC LICENSE
|
60 |
-
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
61 |
-
|
62 |
-
0. This License applies to any program or other work which contains
|
63 |
-
a notice placed by the copyright holder saying it may be distributed
|
64 |
-
under the terms of this General Public License. The "Program", below,
|
65 |
-
refers to any such program or work, and a "work based on the Program"
|
66 |
-
means either the Program or any derivative work under copyright law:
|
67 |
-
that is to say, a work containing the Program or a portion of it,
|
68 |
-
either verbatim or with modifications and/or translated into another
|
69 |
-
language. (Hereinafter, translation is included without limitation in
|
70 |
-
the term "modification".) Each licensee is addressed as "you".
|
71 |
-
|
72 |
-
Activities other than copying, distribution and modification are not
|
73 |
-
covered by this License; they are outside its scope. The act of
|
74 |
-
running the Program is not restricted, and the output from the Program
|
75 |
-
is covered only if its contents constitute a work based on the
|
76 |
-
Program (independent of having been made by running the Program).
|
77 |
-
Whether that is true depends on what the Program does.
|
78 |
-
|
79 |
-
1. You may copy and distribute verbatim copies of the Program's
|
80 |
-
source code as you receive it, in any medium, provided that you
|
81 |
-
conspicuously and appropriately publish on each copy an appropriate
|
82 |
-
copyright notice and disclaimer of warranty; keep intact all the
|
83 |
-
notices that refer to this License and to the absence of any warranty;
|
84 |
-
and give any other recipients of the Program a copy of this License
|
85 |
-
along with the Program.
|
86 |
-
|
87 |
-
You may charge a fee for the physical act of transferring a copy, and
|
88 |
-
you may at your option offer warranty protection in exchange for a fee.
|
89 |
-
|
90 |
-
2. You may modify your copy or copies of the Program or any portion
|
91 |
-
of it, thus forming a work based on the Program, and copy and
|
92 |
-
distribute such modifications or work under the terms of Section 1
|
93 |
-
above, provided that you also meet all of these conditions:
|
94 |
-
|
95 |
-
a) You must cause the modified files to carry prominent notices
|
96 |
-
stating that you changed the files and the date of any change.
|
97 |
-
|
98 |
-
b) You must cause any work that you distribute or publish, that in
|
99 |
-
whole or in part contains or is derived from the Program or any
|
100 |
-
part thereof, to be licensed as a whole at no charge to all third
|
101 |
-
parties under the terms of this License.
|
102 |
-
|
103 |
-
c) If the modified program normally reads commands interactively
|
104 |
-
when run, you must cause it, when started running for such
|
105 |
-
interactive use in the most ordinary way, to print or display an
|
106 |
-
announcement including an appropriate copyright notice and a
|
107 |
-
notice that there is no warranty (or else, saying that you provide
|
108 |
-
a warranty) and that users may redistribute the program under
|
109 |
-
these conditions, and telling the user how to view a copy of this
|
110 |
-
License. (Exception: if the Program itself is interactive but
|
111 |
-
does not normally print such an announcement, your work based on
|
112 |
-
the Program is not required to print an announcement.)
|
113 |
-
|
114 |
-
These requirements apply to the modified work as a whole. If
|
115 |
-
identifiable sections of that work are not derived from the Program,
|
116 |
-
and can be reasonably considered independent and separate works in
|
117 |
-
themselves, then this License, and its terms, do not apply to those
|
118 |
-
sections when you distribute them as separate works. But when you
|
119 |
-
distribute the same sections as part of a whole which is a work based
|
120 |
-
on the Program, the distribution of the whole must be on the terms of
|
121 |
-
this License, whose permissions for other licensees extend to the
|
122 |
-
entire whole, and thus to each and every part regardless of who wrote it.
|
123 |
-
|
124 |
-
Thus, it is not the intent of this section to claim rights or contest
|
125 |
-
your rights to work written entirely by you; rather, the intent is to
|
126 |
-
exercise the right to control the distribution of derivative or
|
127 |
-
collective works based on the Program.
|
128 |
-
|
129 |
-
In addition, mere aggregation of another work not based on the Program
|
130 |
-
with the Program (or with a work based on the Program) on a volume of
|
131 |
-
a storage or distribution medium does not bring the other work under
|
132 |
-
the scope of this License.
|
133 |
-
|
134 |
-
3. You may copy and distribute the Program (or a work based on it,
|
135 |
-
under Section 2) in object code or executable form under the terms of
|
136 |
-
Sections 1 and 2 above provided that you also do one of the following:
|
137 |
-
|
138 |
-
a) Accompany it with the complete corresponding machine-readable
|
139 |
-
source code, which must be distributed under the terms of Sections
|
140 |
-
1 and 2 above on a medium customarily used for software interchange; or,
|
141 |
-
|
142 |
-
b) Accompany it with a written offer, valid for at least three
|
143 |
-
years, to give any third party, for a charge no more than your
|
144 |
-
cost of physically performing source distribution, a complete
|
145 |
-
machine-readable copy of the corresponding source code, to be
|
146 |
-
distributed under the terms of Sections 1 and 2 above on a medium
|
147 |
-
customarily used for software interchange; or,
|
148 |
-
|
149 |
-
c) Accompany it with the information you received as to the offer
|
150 |
-
to distribute corresponding source code. (This alternative is
|
151 |
-
allowed only for noncommercial distribution and only if you
|
152 |
-
received the program in object code or executable form with such
|
153 |
-
an offer, in accord with Subsection b above.)
|
154 |
-
|
155 |
-
The source code for a work means the preferred form of the work for
|
156 |
-
making modifications to it. For an executable work, complete source
|
157 |
-
code means all the source code for all modules it contains, plus any
|
158 |
-
associated interface definition files, plus the scripts used to
|
159 |
-
control compilation and installation of the executable. However, as a
|
160 |
-
special exception, the source code distributed need not include
|
161 |
-
anything that is normally distributed (in either source or binary
|
162 |
-
form) with the major components (compiler, kernel, and so on) of the
|
163 |
-
operating system on which the executable runs, unless that component
|
164 |
-
itself accompanies the executable.
|
165 |
-
|
166 |
-
If distribution of executable or object code is made by offering
|
167 |
-
access to copy from a designated place, then offering equivalent
|
168 |
-
access to copy the source code from the same place counts as
|
169 |
-
distribution of the source code, even though third parties are not
|
170 |
-
compelled to copy the source along with the object code.
|
171 |
-
|
172 |
-
4. You may not copy, modify, sublicense, or distribute the Program
|
173 |
-
except as expressly provided under this License. Any attempt
|
174 |
-
otherwise to copy, modify, sublicense or distribute the Program is
|
175 |
-
void, and will automatically terminate your rights under this License.
|
176 |
-
However, parties who have received copies, or rights, from you under
|
177 |
-
this License will not have their licenses terminated so long as such
|
178 |
-
parties remain in full compliance.
|
179 |
-
|
180 |
-
5. You are not required to accept this License, since you have not
|
181 |
-
signed it. However, nothing else grants you permission to modify or
|
182 |
-
distribute the Program or its derivative works. These actions are
|
183 |
-
prohibited by law if you do not accept this License. Therefore, by
|
184 |
-
modifying or distributing the Program (or any work based on the
|
185 |
-
Program), you indicate your acceptance of this License to do so, and
|
186 |
-
all its terms and conditions for copying, distributing or modifying
|
187 |
-
the Program or works based on it.
|
188 |
-
|
189 |
-
6. Each time you redistribute the Program (or any work based on the
|
190 |
-
Program), the recipient automatically receives a license from the
|
191 |
-
original licensor to copy, distribute or modify the Program subject to
|
192 |
-
these terms and conditions. You may not impose any further
|
193 |
-
restrictions on the recipients' exercise of the rights granted herein.
|
194 |
-
You are not responsible for enforcing compliance by third parties to
|
195 |
-
this License.
|
196 |
-
|
197 |
-
7. If, as a consequence of a court judgment or allegation of patent
|
198 |
-
infringement or for any other reason (not limited to patent issues),
|
199 |
-
conditions are imposed on you (whether by court order, agreement or
|
200 |
-
otherwise) that contradict the conditions of this License, they do not
|
201 |
-
excuse you from the conditions of this License. If you cannot
|
202 |
-
distribute so as to satisfy simultaneously your obligations under this
|
203 |
-
License and any other pertinent obligations, then as a consequence you
|
204 |
-
may not distribute the Program at all. For example, if a patent
|
205 |
-
license would not permit royalty-free redistribution of the Program by
|
206 |
-
all those who receive copies directly or indirectly through you, then
|
207 |
-
the only way you could satisfy both it and this License would be to
|
208 |
-
refrain entirely from distribution of the Program.
|
209 |
-
|
210 |
-
If any portion of this section is held invalid or unenforceable under
|
211 |
-
any particular circumstance, the balance of the section is intended to
|
212 |
-
apply and the section as a whole is intended to apply in other
|
213 |
-
circumstances.
|
214 |
-
|
215 |
-
It is not the purpose of this section to induce you to infringe any
|
216 |
-
patents or other property right claims or to contest validity of any
|
217 |
-
such claims; this section has the sole purpose of protecting the
|
218 |
-
integrity of the free software distribution system, which is
|
219 |
-
implemented by public license practices. Many people have made
|
220 |
-
generous contributions to the wide range of software distributed
|
221 |
-
through that system in reliance on consistent application of that
|
222 |
-
system; it is up to the author/donor to decide if he or she is willing
|
223 |
-
to distribute software through any other system and a licensee cannot
|
224 |
-
impose that choice.
|
225 |
-
|
226 |
-
This section is intended to make thoroughly clear what is believed to
|
227 |
-
be a consequence of the rest of this License.
|
228 |
-
|
229 |
-
8. If the distribution and/or use of the Program is restricted in
|
230 |
-
certain countries either by patents or by copyrighted interfaces, the
|
231 |
-
original copyright holder who places the Program under this License
|
232 |
-
may add an explicit geographical distribution limitation excluding
|
233 |
-
those countries, so that distribution is permitted only in or among
|
234 |
-
countries not thus excluded. In such case, this License incorporates
|
235 |
-
the limitation as if written in the body of this License.
|
236 |
-
|
237 |
-
9. The Free Software Foundation may publish revised and/or new versions
|
238 |
-
of the General Public License from time to time. Such new versions will
|
239 |
-
be similar in spirit to the present version, but may differ in detail to
|
240 |
-
address new problems or concerns.
|
241 |
-
|
242 |
-
Each version is given a distinguishing version number. If the Program
|
243 |
-
specifies a version number of this License which applies to it and "any
|
244 |
-
later version", you have the option of following the terms and conditions
|
245 |
-
either of that version or of any later version published by the Free
|
246 |
-
Software Foundation. If the Program does not specify a version number of
|
247 |
-
this License, you may choose any version ever published by the Free Software
|
248 |
-
Foundation.
|
249 |
-
|
250 |
-
10. If you wish to incorporate parts of the Program into other free
|
251 |
-
programs whose distribution conditions are different, write to the author
|
252 |
-
to ask for permission. For software which is copyrighted by the Free
|
253 |
-
Software Foundation, write to the Free Software Foundation; we sometimes
|
254 |
-
make exceptions for this. Our decision will be guided by the two goals
|
255 |
-
of preserving the free status of all derivatives of our free software and
|
256 |
-
of promoting the sharing and reuse of software generally.
|
257 |
-
|
258 |
-
NO WARRANTY
|
259 |
-
|
260 |
-
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
261 |
-
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
262 |
-
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
263 |
-
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
264 |
-
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
265 |
-
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
266 |
-
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
267 |
-
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
268 |
-
REPAIR OR CORRECTION.
|
269 |
-
|
270 |
-
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
271 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
272 |
-
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
273 |
-
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
274 |
-
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
275 |
-
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
276 |
-
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
277 |
-
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
278 |
-
POSSIBILITY OF SUCH DAMAGES.
|
279 |
-
|
280 |
-
END OF TERMS AND CONDITIONS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.60/readme.txt
DELETED
@@ -1,162 +0,0 @@
|
|
1 |
-
=== Google Maps Widget ===
|
2 |
-
Contributors: WebFactory
|
3 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypal%40webfactoryltd%2ecom&lc=US&item_name=Google%20Maps%20Widget&no_note=0¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
|
4 |
-
Tags: google maps, maps, gmaps, widget, lightbox, map, google map, fancybox, fancybox2
|
5 |
-
License: GPLv2 or later
|
6 |
-
Requires at least: 3.2
|
7 |
-
Tested up to: 3.5
|
8 |
-
Stable tag: 0.60
|
9 |
-
|
10 |
-
Displays a single-image super-fast loading Google map in a widget. A larger map with all the usual features is available on click in a lightbox.
|
11 |
-
|
12 |
-
== Description ==
|
13 |
-
|
14 |
-
Check out the [Google Maps Widget video](http://www.youtube.com/watch?v=y1siX9ha7Pw) or give us a shout <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>.
|
15 |
-
|
16 |
-
http://www.youtube.com/watch?v=y1siX9ha7Pw&hd=1
|
17 |
-
|
18 |
-
**General widget options**
|
19 |
-
|
20 |
-
* title
|
21 |
-
* address
|
22 |
-
|
23 |
-
**Thumbnail map options**
|
24 |
-
|
25 |
-
* map size - width & height
|
26 |
-
* map type - road, satellite, map or hybrid
|
27 |
-
* pin color
|
28 |
-
* pin size
|
29 |
-
* zoom level
|
30 |
-
|
31 |
-
**Lightbox map options**
|
32 |
-
|
33 |
-
* map size - width & height
|
34 |
-
* map type - road, satellite, map or hybrid
|
35 |
-
* zoom level
|
36 |
-
* skin
|
37 |
-
* show/hide address bubble
|
38 |
-
* show/hide map title
|
39 |
-
* header text
|
40 |
-
* footer text
|
41 |
-
|
42 |
-
> If you need a Google Maps shortcode plugin you might be interested in purchasing our premium <a title="5sec Google Maps" href="http://5sec-gmap.webfactoryltd.com/">5sec Google Maps</a> plugin.
|
43 |
-
|
44 |
-
The plugin was voted on the <a href="http://themesplugins.com/Plugin-detail/google-maps-widget-google-map-free-plugin-for-wordpress/" title="Top 100 WordPressian plugin">Top 100 List</a> by WordPressian.
|
45 |
-
|
46 |
-
== Installation ==
|
47 |
-
|
48 |
-
Follow the usual routine;
|
49 |
-
|
50 |
-
1. Open WP admin - Plugins - Add New
|
51 |
-
2. Enter "Google Maps Widget" under search and hit Enter
|
52 |
-
3. Plugin will show up as the first on the list, click "Install Now"
|
53 |
-
|
54 |
-
Or if needed, upload manually;
|
55 |
-
|
56 |
-
1. Download the plugin.
|
57 |
-
2. Unzip it and upload to wp-content/plugin/
|
58 |
-
3. Open WP admin - Plugins and click "Activate" next to the plugin
|
59 |
-
4. Configure the plugin under Appearance - Widgets
|
60 |
-
|
61 |
-
|
62 |
-
== Frequently Asked Questions ==
|
63 |
-
|
64 |
-
= Who is this plugin for? =
|
65 |
-
|
66 |
-
For just about anyone who needs a map on their site.
|
67 |
-
|
68 |
-
= It's not working!!! Arrrrrrrrr =
|
69 |
-
|
70 |
-
A more detailed help is coming soon. Till then check 2 things: does your theme have wp_footer() function call in the footer and if there are any jQuery errors on the site.
|
71 |
-
If you can figure it out open a thread in the support forums.
|
72 |
-
|
73 |
-
== Screenshots ==
|
74 |
-
|
75 |
-
1. Small map is shown as a widget and since it's just one image it loads super-fast
|
76 |
-
2. Larger map with all features is available in the lightbox
|
77 |
-
3. Widget options - thumbnail map
|
78 |
-
4. Widget options - lightbox map
|
79 |
-
|
80 |
-
== Changelog ==
|
81 |
-
|
82 |
-
= 0.60 =
|
83 |
-
* 2013/04/06
|
84 |
-
* fixed zoom bug in lightbox
|
85 |
-
|
86 |
-
= 0.55 =
|
87 |
-
* 2013/04/05
|
88 |
-
* added 2 new options - text above and below thumbnail map
|
89 |
-
* updated fancyBox JS to the latest version
|
90 |
-
* minor code improvements
|
91 |
-
|
92 |
-
= 0.50 =
|
93 |
-
* 2012/12/12
|
94 |
-
* small WP 3.5 compatibility fixes
|
95 |
-
|
96 |
-
= 0.41 =
|
97 |
-
* 2012/12/03
|
98 |
-
* removed screenshots from plugin package
|
99 |
-
|
100 |
-
= 0.4 =
|
101 |
-
* 2012/11/28
|
102 |
-
* fixed non UTF-8 address bug
|
103 |
-
|
104 |
-
= 0.37 =
|
105 |
-
* 2012/11/19
|
106 |
-
* fixed bug to use google.com instead of google.co.uk
|
107 |
-
|
108 |
-
= 0.35 =
|
109 |
-
* 2012/09/28
|
110 |
-
* added 4 skins for lightbox
|
111 |
-
|
112 |
-
= 0.31 =
|
113 |
-
* 2012/09/14
|
114 |
-
* fix for bad themes which don't respect proper sidebar markup
|
115 |
-
|
116 |
-
= 0.3 =
|
117 |
-
* 2012/09/04
|
118 |
-
* lightbox script changed from jQuery UI Dialog to <a href="http://fancyapps.com/fancybox/">fancyBox2</a>
|
119 |
-
* added "show map title on lightbox" option
|
120 |
-
* significant speed improvements
|
121 |
-
* preparations for lightbox skins
|
122 |
-
|
123 |
-
= 0.22 =
|
124 |
-
* 2012/08/31
|
125 |
-
* Fixed small JS related GUI bug
|
126 |
-
|
127 |
-
= 0.2 =
|
128 |
-
* 2012/08/28
|
129 |
-
* Complete GUI rewrite
|
130 |
-
* Added header text option
|
131 |
-
* Added address bubble visibility option
|
132 |
-
* Fixed thumbnail map scaling bug
|
133 |
-
* Fixed lightbox map size bug
|
134 |
-
|
135 |
-
= 0.13 =
|
136 |
-
* 2012/08/09
|
137 |
-
* Added pin size for thumbnail map
|
138 |
-
|
139 |
-
= 0.12 =
|
140 |
-
* 2012/08/07
|
141 |
-
* Added pin color for thumbnail map
|
142 |
-
* Fixed a few minor bugs
|
143 |
-
|
144 |
-
= 0.11 =
|
145 |
-
* 2012/08/06
|
146 |
-
* Fixed a few minor bugs
|
147 |
-
|
148 |
-
= 0.1 =
|
149 |
-
* 2012/08/03
|
150 |
-
* Initial release
|
151 |
-
|
152 |
-
|
153 |
-
== Upgrade Notice ==
|
154 |
-
|
155 |
-
= 0.2 =
|
156 |
-
Due to variable name changes footer text will be reset
|
157 |
-
|
158 |
-
= 0.1x =
|
159 |
-
Upgrade without any fear :)
|
160 |
-
|
161 |
-
= 0.1 =
|
162 |
-
Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.65/css/gmw-admin.css
DELETED
@@ -1,71 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-label {
|
7 |
-
width: 80px;
|
8 |
-
display: inline-block;
|
9 |
-
}
|
10 |
-
|
11 |
-
.gmw-tabs {
|
12 |
-
border-bottom: 1px solid #CCCCCC !important;
|
13 |
-
}
|
14 |
-
|
15 |
-
/*
|
16 |
-
* jQuery UI Tabs 1.8.14
|
17 |
-
*
|
18 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
19 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
20 |
-
* http://jquery.org/license
|
21 |
-
*
|
22 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
23 |
-
*/
|
24 |
-
.ui-tabs { position: relative; padding: .2em; zoom: 1;margin-top:25px } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
25 |
-
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
26 |
-
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
27 |
-
.ui-tabs .ui-tabs-nav li a { text-decoration: none; }
|
28 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
29 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: 0; border-bottom: 1px solid #F8F8F8 !important; }
|
30 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-active a { outline: none;}
|
31 |
-
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
32 |
-
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
33 |
-
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 0.3em 1.4em; background: none; }
|
34 |
-
.ui-tabs .ui-tabs-hide { display: none !important; }
|
35 |
-
|
36 |
-
.ui-tabs .ui-tabs-nav li a {
|
37 |
-
font-weight: 200;
|
38 |
-
line-height: 32px;
|
39 |
-
color: #AAAAAA;
|
40 |
-
padding: 0 15px;
|
41 |
-
}
|
42 |
-
|
43 |
-
.ui-tabs ul.ui-tabs-nav li {
|
44 |
-
border-color: #DFDFDF #DFDFDF #FFFFFF;
|
45 |
-
border-radius: 3px 3px 0 0;
|
46 |
-
border-style: solid;
|
47 |
-
border-width: 1px 1px 0;
|
48 |
-
color: #AAAAAA;
|
49 |
-
display: inline-block;
|
50 |
-
font-size: 12px;
|
51 |
-
line-height: 16px;
|
52 |
-
margin: 0 0 -1px 10px;
|
53 |
-
text-decoration: none;
|
54 |
-
text-shadow: 0 1px 0 #FFFFFF;
|
55 |
-
}
|
56 |
-
|
57 |
-
ul.ui-tabs-nav{
|
58 |
-
float: left;
|
59 |
-
border-bottom: 1px solid #CCCCCC;
|
60 |
-
padding-bottom: 0;
|
61 |
-
width: 100%;
|
62 |
-
margin-bottom: 20px !important
|
63 |
-
}
|
64 |
-
|
65 |
-
.ui-state-hover a, .ui-state-active a {
|
66 |
-
color: #464646 !important;
|
67 |
-
}
|
68 |
-
|
69 |
-
.ui-state-hover a {
|
70 |
-
color: #D54E21 !important;
|
71 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.65/css/gmw.css
DELETED
@@ -1,306 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Google Maps Widget
|
3 |
-
* (c) Web factory Ltd, 2012
|
4 |
-
*/
|
5 |
-
|
6 |
-
.gmw-header, .gmw-footer {
|
7 |
-
padding: 5px;
|
8 |
-
}
|
9 |
-
|
10 |
-
|
11 |
-
/*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */
|
12 |
-
.fancybox-wrap,
|
13 |
-
.fancybox-skin,
|
14 |
-
.fancybox-outer,
|
15 |
-
.fancybox-inner,
|
16 |
-
.fancybox-image,
|
17 |
-
.fancybox-wrap iframe,
|
18 |
-
.fancybox-wrap object,
|
19 |
-
.fancybox-nav,
|
20 |
-
.fancybox-nav span,
|
21 |
-
.fancybox-tmp
|
22 |
-
{
|
23 |
-
padding: 0;
|
24 |
-
margin: 0;
|
25 |
-
border: 0;
|
26 |
-
outline: none;
|
27 |
-
vertical-align: top;
|
28 |
-
}
|
29 |
-
|
30 |
-
.fancybox-wrap {
|
31 |
-
position: absolute;
|
32 |
-
top: 0;
|
33 |
-
left: 0;
|
34 |
-
z-index: 98020;
|
35 |
-
}
|
36 |
-
|
37 |
-
.fancybox-skin {
|
38 |
-
position: relative;
|
39 |
-
background: #f9f9f9;
|
40 |
-
color: #444;
|
41 |
-
text-shadow: none;
|
42 |
-
-webkit-border-radius: 4px;
|
43 |
-
-moz-border-radius: 4px;
|
44 |
-
border-radius: 4px;
|
45 |
-
}
|
46 |
-
|
47 |
-
.fancybox-opened {
|
48 |
-
z-index: 98030;
|
49 |
-
}
|
50 |
-
|
51 |
-
.fancybox-opened .fancybox-skin {
|
52 |
-
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
53 |
-
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
54 |
-
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
55 |
-
}
|
56 |
-
|
57 |
-
.fancybox-outer, .fancybox-inner {
|
58 |
-
position: relative;
|
59 |
-
}
|
60 |
-
|
61 |
-
.fancybox-inner {
|
62 |
-
overflow: hidden;
|
63 |
-
}
|
64 |
-
|
65 |
-
.fancybox-type-iframe .fancybox-inner {
|
66 |
-
-webkit-overflow-scrolling: touch;
|
67 |
-
}
|
68 |
-
|
69 |
-
.fancybox-error {
|
70 |
-
color: #444;
|
71 |
-
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
72 |
-
margin: 0;
|
73 |
-
padding: 15px;
|
74 |
-
white-space: nowrap;
|
75 |
-
}
|
76 |
-
|
77 |
-
.fancybox-image, .fancybox-iframe {
|
78 |
-
display: block;
|
79 |
-
width: 100%;
|
80 |
-
height: 100%;
|
81 |
-
}
|
82 |
-
|
83 |
-
.fancybox-image {
|
84 |
-
max-width: 100%;
|
85 |
-
max-height: 100%;
|
86 |
-
}
|
87 |
-
|
88 |
-
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
|
89 |
-
background-image: url('../images/fancybox_sprite.png');
|
90 |
-
}
|
91 |
-
|
92 |
-
#fancybox-loading {
|
93 |
-
position: fixed;
|
94 |
-
top: 50%;
|
95 |
-
left: 50%;
|
96 |
-
margin-top: -22px;
|
97 |
-
margin-left: -22px;
|
98 |
-
background-position: 0 -108px;
|
99 |
-
opacity: 0.8;
|
100 |
-
cursor: pointer;
|
101 |
-
z-index: 98060;
|
102 |
-
}
|
103 |
-
|
104 |
-
#fancybox-loading div {
|
105 |
-
width: 44px;
|
106 |
-
height: 44px;
|
107 |
-
background: url('../images/fancybox_loading.gif') center center no-repeat;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fancybox-close {
|
111 |
-
position: absolute;
|
112 |
-
top: -18px;
|
113 |
-
right: -18px;
|
114 |
-
width: 36px;
|
115 |
-
height: 36px;
|
116 |
-
cursor: pointer;
|
117 |
-
z-index: 98040;
|
118 |
-
}
|
119 |
-
|
120 |
-
.fancybox-nav {
|
121 |
-
position: absolute;
|
122 |
-
top: 0;
|
123 |
-
width: 40%;
|
124 |
-
height: 100%;
|
125 |
-
cursor: pointer;
|
126 |
-
text-decoration: none;
|
127 |
-
background: transparent url('../images/blank.gif'); /* helps IE */
|
128 |
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
129 |
-
z-index: 98040;
|
130 |
-
}
|
131 |
-
|
132 |
-
.fancybox-prev {
|
133 |
-
left: 0;
|
134 |
-
}
|
135 |
-
|
136 |
-
.fancybox-next {
|
137 |
-
right: 0;
|
138 |
-
}
|
139 |
-
|
140 |
-
.fancybox-nav span {
|
141 |
-
position: absolute;
|
142 |
-
top: 50%;
|
143 |
-
width: 36px;
|
144 |
-
height: 34px;
|
145 |
-
margin-top: -18px;
|
146 |
-
cursor: pointer;
|
147 |
-
z-index: 98040;
|
148 |
-
visibility: hidden;
|
149 |
-
}
|
150 |
-
|
151 |
-
.fancybox-prev span {
|
152 |
-
left: 10px;
|
153 |
-
background-position: 0 -36px;
|
154 |
-
}
|
155 |
-
|
156 |
-
.fancybox-next span {
|
157 |
-
right: 10px;
|
158 |
-
background-position: 0 -72px;
|
159 |
-
}
|
160 |
-
|
161 |
-
.fancybox-nav:hover span {
|
162 |
-
visibility: visible;
|
163 |
-
}
|
164 |
-
|
165 |
-
.fancybox-tmp {
|
166 |
-
position: absolute;
|
167 |
-
top: -9999px;
|
168 |
-
left: -9999px;
|
169 |
-
visibility: hidden;
|
170 |
-
}
|
171 |
-
|
172 |
-
/* Overlay helper */
|
173 |
-
|
174 |
-
.fancybox-lock {
|
175 |
-
overflow: hidden;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fancybox-overlay {
|
179 |
-
position: absolute;
|
180 |
-
top: 0;
|
181 |
-
left: 0;
|
182 |
-
overflow: hidden;
|
183 |
-
display: none;
|
184 |
-
z-index: 98010;
|
185 |
-
background: url('../images/fancybox_overlay.png');
|
186 |
-
}
|
187 |
-
|
188 |
-
.fancybox-overlay-fixed {
|
189 |
-
position: fixed;
|
190 |
-
bottom: 0;
|
191 |
-
right: 0;
|
192 |
-
}
|
193 |
-
|
194 |
-
.fancybox-lock .fancybox-overlay {
|
195 |
-
overflow: auto;
|
196 |
-
overflow-y: scroll;
|
197 |
-
}
|
198 |
-
|
199 |
-
/* Title helper */
|
200 |
-
|
201 |
-
.fancybox-title {
|
202 |
-
visibility: hidden;
|
203 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
204 |
-
position: relative;
|
205 |
-
text-shadow: none;
|
206 |
-
z-index: 98050;
|
207 |
-
/* top: 0;
|
208 |
-
bottom: auto; */
|
209 |
-
}
|
210 |
-
|
211 |
-
.fancybox-title-new {
|
212 |
-
position: absolute;
|
213 |
-
top: -36px;
|
214 |
-
left: 0;
|
215 |
-
visibility: hidden;
|
216 |
-
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
|
217 |
-
position: relative;
|
218 |
-
text-shadow: none;
|
219 |
-
z-index: 98050;
|
220 |
-
}
|
221 |
-
|
222 |
-
.fancybox-opened .fancybox-title {
|
223 |
-
visibility: visible;
|
224 |
-
}
|
225 |
-
|
226 |
-
.fancybox-title-float-wrap {
|
227 |
-
position: absolute;
|
228 |
-
bottom: 0;
|
229 |
-
right: 50%;
|
230 |
-
margin-bottom: -35px;
|
231 |
-
z-index: 98050;
|
232 |
-
text-align: center;
|
233 |
-
}
|
234 |
-
|
235 |
-
.fancybox-title-float-wrap-new {
|
236 |
-
position: absolute;
|
237 |
-
z-index: 98030;
|
238 |
-
}
|
239 |
-
|
240 |
-
.fancybox-title-float-wrap .child {
|
241 |
-
display: inline-block;
|
242 |
-
margin-right: -100%;
|
243 |
-
padding: 2px 20px;
|
244 |
-
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
|
245 |
-
background: rgba(0, 0, 0, 0.8);
|
246 |
-
-webkit-border-radius: 15px;
|
247 |
-
-moz-border-radius: 15px;
|
248 |
-
border-radius: 15px;
|
249 |
-
text-shadow: 0 1px 2px #222;
|
250 |
-
color: #FFF;
|
251 |
-
font-weight: bold;
|
252 |
-
line-height: 24px;
|
253 |
-
white-space: nowrap;
|
254 |
-
}
|
255 |
-
|
256 |
-
.fancybox-title-outside-wrap {
|
257 |
-
position: relative;
|
258 |
-
margin-top: 10px;
|
259 |
-
color: #fff;
|
260 |
-
}
|
261 |
-
|
262 |
-
.fancybox-title-inside-wrap {
|
263 |
-
padding-top: 10px;
|
264 |
-
}
|
265 |
-
|
266 |
-
.fancybox-title-over-wrap {
|
267 |
-
position: absolute;
|
268 |
-
bottom: 0;
|
269 |
-
left: 0;
|
270 |
-
color: #fff;
|
271 |
-
padding: 10px;
|
272 |
-
background: #000;
|
273 |
-
background: rgba(0, 0, 0, .8);
|
274 |
-
}
|
275 |
-
|
276 |
-
/* lightbox skins */
|
277 |
-
.black-rounded .fancybox-skin {
|
278 |
-
background: black;
|
279 |
-
}
|
280 |
-
.black-rounded .fancybox-title-float-wrap .child {
|
281 |
-
background: black;
|
282 |
-
}
|
283 |
-
|
284 |
-
.white-square .fancybox-skin {
|
285 |
-
-webkit-border-radius: 0;
|
286 |
-
-moz-border-radius: 0;
|
287 |
-
border-radius: 0;
|
288 |
-
}
|
289 |
-
.white-square .fancybox-title-float-wrap .child {
|
290 |
-
-webkit-border-radius: 0;
|
291 |
-
-moz-border-radius: 0;
|
292 |
-
border-radius: 0;
|
293 |
-
}
|
294 |
-
|
295 |
-
.black-square .fancybox-skin {
|
296 |
-
background: black;
|
297 |
-
-webkit-border-radius: 0;
|
298 |
-
-moz-border-radius: 0;
|
299 |
-
border-radius: 0;
|
300 |
-
}
|
301 |
-
.black-square .fancybox-title-float-wrap .child {
|
302 |
-
background: black;
|
303 |
-
-webkit-border-radius: 0;
|
304 |
-
-moz-border-radius: 0;
|
305 |
-
border-radius: 0;
|
306 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tags/0.65/gmw-widget.php
DELETED
@@ -1,252 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Google Maps Widget
|
4 |
-
* (c) Web factory Ltd, 2012
|
5 |
-
*/
|
6 |
-
|
7 |
-
class GoogleMapsWidget extends WP_Widget {
|
8 |
-
static $widgets = array();
|
9 |
-
|
10 |
-
function GoogleMapsWidget() {
|
11 |
-
$widget_ops = array('classname' => 'google-maps-widget', 'description' => 'Displays a map image thumbnail with a larger map available in a lightbox.');
|
12 |
-
$control_ops = array('width' => 400, 'height' => 350);
|
13 |
-
$this->WP_Widget('GoogleMapsWidget', 'Google Maps Widget', $widget_ops, $control_ops);
|
14 |
-
}
|
15 |
-
|
16 |
-
function form($instance) {
|
17 |
-
$instance = wp_parse_args((array) $instance,
|
18 |
-
array('title' => 'Map',
|
19 |
-
'address' => 'New York, USA',
|
20 |
-
'thumb_pin_color' => 'red',
|
21 |
-
'thumb_pin_size' => 'default',
|
22 |
-
'thumb_width' => '250',
|
23 |
-
'thumb_height' => '250',
|
24 |
-
'thumb_type' => 'roadmap',
|
25 |
-
'thumb_zoom' => '13',
|
26 |
-
'thumb_header' => '',
|
27 |
-
'thumb_footer' => '',
|
28 |
-
'lightbox_width' => '550',
|
29 |
-
'lightbox_height' => '550',
|
30 |
-
'lightbox_type' => 'roadmap',
|
31 |
-
'lightbox_zoom' => '14',
|
32 |
-
'lightbox_bubble' => '1',
|
33 |
-
'lightbox_skin' => '',
|
34 |
-
'lightbox_title' => '1',
|
35 |
-
'lightbox_header' => '',
|
36 |
-
'lightbox_footer' => ''));
|
37 |
-
|
38 |
-
$title = $instance['title'];
|
39 |
-
$address = $instance['address'];
|
40 |
-
$thumb_pin_color = $instance['thumb_pin_color'];
|
41 |
-
$thumb_pin_size = $instance['thumb_pin_size'];
|
42 |
-
$thumb_width = $instance['thumb_width'];
|
43 |
-
$thumb_height = $instance['thumb_height'];
|
44 |
-
$thumb_type = $instance['thumb_type'];
|
45 |
-
$thumb_zoom = $instance['thumb_zoom'];
|
46 |
-
$thumb_header = $instance['thumb_header'];
|
47 |
-
$thumb_footer = $instance['thumb_footer'];
|
48 |
-
$lightbox_width = $instance['lightbox_width'];
|
49 |
-
$lightbox_height = $instance['lightbox_height'];
|
50 |
-
$lightbox_type = $instance['lightbox_type'];
|
51 |
-
$lightbox_zoom = $instance['lightbox_zoom'];
|
52 |
-
$lightbox_bubble = $instance['lightbox_bubble'];
|
53 |
-
$lightbox_title = $instance['lightbox_title'];
|
54 |
-
$lightbox_skin = $instance['lightbox_skin'];
|
55 |
-
$lightbox_footer = $instance['lightbox_footer'];
|
56 |
-
$lightbox_header = $instance['lightbox_header'];
|
57 |
-
|
58 |
-
$map_types_thumb = array(array('val' => 'roadmap', 'label' => 'Road'),
|
59 |
-
array('val' => 'satellite', 'label' => 'Satellite'),
|
60 |
-
array('val' => 'terrain', 'label' => 'Terrain'),
|
61 |
-
array('val' => 'hybrid', 'label' => 'Hybrid'));
|
62 |
-
|
63 |
-
$map_types_lightbox = array(array('val' => 'm', 'label' => 'Road'),
|
64 |
-
array('val' => 'k', 'label' => 'Satellite'),
|
65 |
-
array('val' => 'p', 'label' => 'Terrain'),
|
66 |
-
array('val' => 'h', 'label' => 'Hybrid'));
|
67 |
-
|
68 |
-
$pin_colors = array(array('val' => 'black', 'label' => 'Black'),
|
69 |
-
array('val' => 'brown', 'label' => 'Brown'),
|
70 |
-
array('val' => 'green', 'label' => 'Green'),
|
71 |
-
array('val' => 'purple', 'label' => 'Purple'),
|
72 |
-
array('val' => 'yellow', 'label' => 'Yellow'),
|
73 |
-
array('val' => 'blue', 'label' => 'Blue'),
|
74 |
-
array('val' => 'gray', 'label' => 'Gray'),
|
75 |
-
array('val' => 'orange', 'label' => 'Orange'),
|
76 |
-
array('val' => 'red', 'label' => 'Red'),
|
77 |
-
array('val' => 'white', 'label' => 'White'));
|
78 |
-
|
79 |
-
$pin_sizes = array(array('val' => 'tiny', 'label' => 'Tiny'),
|
80 |
-
array('val' => 'small', 'label' => 'Small'),
|
81 |
-
array('val' => 'mid', 'label' => 'Medium'),
|
82 |
-
array('val' => 'default', 'label' => 'Large (default)'));
|
83 |
-
|
84 |
-
$zoom_levels = array(array('val' => '0', 'label' => '0 - entire world'));
|
85 |
-
for ($tmp = 1; $tmp <= 21; $tmp++) {
|
86 |
-
$zoom_levels[] = array('val' => $tmp, 'label' => $tmp);
|
87 |
-
}
|
88 |
-
|
89 |
-
$lightbox_skins[] = array('val' => '', 'label' => 'White with rounded corners (default)');
|
90 |
-
$lightbox_skins[] = array('val' => 'black-rounded', 'label' => 'Black with rounded corners');
|
91 |
-
$lightbox_skins[] = array('val' => 'white-square', 'label' => 'White with square corners');
|
92 |
-
$lightbox_skins[] = array('val' => 'black-square', 'label' => 'Black with square corners');
|
93 |
-
|
94 |
-
|
95 |
-
echo '<p><label for="' . $this->get_field_id('title') . '">Title:</label><input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" /></p>';
|
96 |
-
echo '<p><label for="' . $this->get_field_id('address') . '">Address:</label><input class="widefat" id="' . $this->get_field_id('address') . '" name="' . $this->get_field_name('address') . '" type="text" value="' . esc_attr($address) . '" /></p>';
|
97 |
-
|
98 |
-
echo '<div class="gmw-tabs" id="tab-' . $this->id . '"><ul><li><a href="#gmw-thumb">Thumbnail map</a></li><li><a href="#gmw-lightbox">Lightbox map</a></li></ul>';
|
99 |
-
echo '<div id="gmw-thumb">';
|
100 |
-
|
101 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_width') . '">Map Size: </label>';
|
102 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_width') . '" name="' . $this->get_field_name('thumb_width') . '" type="text" value="' . esc_attr($thumb_width) . '" /> x ';
|
103 |
-
echo '<input class="small-text" id="' . $this->get_field_id('thumb_height') . '" name="' . $this->get_field_name('thumb_height') . '" type="text" value="' . esc_attr($thumb_height) . '" />';
|
104 |
-
echo ' px</p>';
|
105 |
-
|
106 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_type') . '">Map Type: </label>';
|
107 |
-
echo '<select id="' . $this->get_field_id('thumb_type') . '" name="' . $this->get_field_name('thumb_type') . '">';
|
108 |
-
GMW::create_select_options($map_types_thumb, $thumb_type);
|
109 |
-
echo '</select></p>';
|
110 |
-
|
111 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_color') . '">Pin Color: </label>';
|
112 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_color') . '" name="' . $this->get_field_name('thumb_pin_color') . '">';
|
113 |
-
GMW::create_select_options($pin_colors, $thumb_pin_color);
|
114 |
-
echo '</select></p>';
|
115 |
-
|
116 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_pin_size') . '">Pin Size: </label>';
|
117 |
-
echo '<select id="' . $this->get_field_id('thumb_pin_size') . '" name="' . $this->get_field_name('thumb_pin_size') . '">';
|
118 |
-
GMW::create_select_options($pin_sizes, $thumb_pin_size);
|
119 |
-
echo '</select></p>';
|
120 |
-
|
121 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('thumb_zoom') . '">Zoom Level: </label>';
|
122 |
-
echo '<select id="' . $this->get_field_id('thumb_zoom') . '" name="' . $this->get_field_name('thumb_zoom') . '">';
|
123 |
-
GMW::create_select_options($zoom_levels, $thumb_zoom);
|
124 |
-
echo '</select></p>';
|
125 |
-
|
126 |
-
echo '<p><label for="' . $this->get_field_id('thumb_header') . '">Text Above Map:</label>';
|
127 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('thumb_header') . '" name="' . $this->get_field_name('thumb_header') . '">'. $thumb_header . '</textarea></p>';
|
128 |
-
|
129 |
-
echo '<p><label for="' . $this->get_field_id('thumb_footer') . '">Text Below Map:</label>';
|
130 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('thumb_footer') . '" name="' . $this->get_field_name('thumb_footer') . '">'. $thumb_footer . '</textarea></p>';
|
131 |
-
|
132 |
-
echo '</div>'; // thumbnail tab
|
133 |
-
echo '<div id="gmw-lightbox">';
|
134 |
-
|
135 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_width') . '">Map Size: </label>';
|
136 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_width') . '" name="' . $this->get_field_name('lightbox_width') . '" type="text" value="' . esc_attr($lightbox_width) . '" /> x ';
|
137 |
-
echo '<input class="small-text" id="' . $this->get_field_id('lightbox_height') . '" name="' . $this->get_field_name('lightbox_height') . '" type="text" value="' . esc_attr($lightbox_height) . '" />';
|
138 |
-
echo ' px</p>';
|
139 |
-
|
140 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_type') . '">Map Type: </label>';
|
141 |
-
echo '<select id="' . $this->get_field_id('lightbox_type') . '" name="' . $this->get_field_name('lightbox_type') . '">';
|
142 |
-
GMW::create_select_options($map_types_lightbox, $lightbox_type);
|
143 |
-
echo '</select></p>';
|
144 |
-
|
145 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_zoom') . '">Zoom Level: </label>';
|
146 |
-
echo '<select id="' . $this->get_field_id('lightbox_zoom') . '" name="' . $this->get_field_name('lightbox_zoom') . '">';
|
147 |
-
GMW::create_select_options($zoom_levels, $lightbox_zoom);
|
148 |
-
echo '</select></p>';
|
149 |
-
|
150 |
-
echo '<p><label class="gmw-label" for="' . $this->get_field_id('lightbox_skin') . '">Skin: </label>';
|
151 |
-
echo '<select id="' . $this->get_field_id('lightbox_skin') . '" name="' . $this->get_field_name('lightbox_skin') . '">';
|
152 |
-
GMW::create_select_options($lightbox_skins, $lightbox_skin);
|
153 |
-
echo '</select></p>';
|
154 |
-
|
155 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_bubble') . '">Show Address Bubble: </label>';
|
156 |
-
echo '<input ' . checked('1', $lightbox_bubble, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_bubble') . '" name="' . $this->get_field_name('lightbox_bubble') . '">';
|
157 |
-
echo '</p>';
|
158 |
-
|
159 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_title') . '">Show Title Below Lightbox: </label>';
|
160 |
-
echo '<input ' . checked('1', $lightbox_title, false) . ' value="1" type="checkbox" id="' . $this->get_field_id('lightbox_title') . '" name="' . $this->get_field_name('lightbox_title') . '">';
|
161 |
-
echo '</p>';
|
162 |
-
|
163 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_header') . '">Header Text:</label>';
|
164 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_header') . '" name="' . $this->get_field_name('lightbox_header') . '">'. $lightbox_header . '</textarea></p>';
|
165 |
-
|
166 |
-
echo '<p><label for="' . $this->get_field_id('lightbox_footer') . '">Footer Text:</label>';
|
167 |
-
echo '<textarea class="widefat" rows="3" cols="20" id="' . $this->get_field_id('lightbox_footer') . '" name="' . $this->get_field_name('lightbox_footer') . '">'. $lightbox_footer . '</textarea></p>';
|
168 |
-
|
169 |
-
echo '</div>'; // lightbox tab
|
170 |
-
echo '</div>'; // tabs
|
171 |
-
echo '<p><i>If you like the plugin give us a shout <a title="WebFactory on Twitter" target="_blank" href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a>. Thanks!</i></p>';
|
172 |
-
}
|
173 |
-
|
174 |
-
function update($new_instance, $old_instance) {
|
175 |
-
$instance = $old_instance;
|
176 |
-
|
177 |
-
$instance['title'] = $new_instance['title'];
|
178 |
-
$instance['address'] = $new_instance['address'];
|
179 |
-
$instance['thumb_pin_color'] = $new_instance['thumb_pin_color'];
|
180 |
-
$instance['thumb_pin_size'] = $new_instance['thumb_pin_size'];
|
181 |
-
$instance['thumb_width'] = (int) $new_instance['thumb_width'];
|
182 |
-
$instance['thumb_height'] = (int) $new_instance['thumb_height'];
|
183 |
-
$instance['thumb_zoom'] = $new_instance['thumb_zoom'];
|
184 |
-
$instance['thumb_type'] = $new_instance['thumb_type'];
|
185 |
-
$instance['thumb_header'] = trim($new_instance['thumb_header']);
|
186 |
-
$instance['thumb_footer'] = trim($new_instance['thumb_footer']);
|
187 |
-
$instance['lightbox_width'] = (int) $new_instance['lightbox_width'];
|
188 |
-
$instance['lightbox_height'] = (int) $new_instance['lightbox_height'];
|
189 |
-
$instance['lightbox_type'] = $new_instance['lightbox_type'];
|
190 |
-
$instance['lightbox_zoom'] = $new_instance['lightbox_zoom'];
|
191 |
-
$instance['lightbox_bubble'] = isset($new_instance['lightbox_bubble']);
|
192 |
-
$instance['lightbox_title'] = isset($new_instance['lightbox_title']);
|
193 |
-
$instance['lightbox_header'] = trim($new_instance['lightbox_header']);
|
194 |
-
$instance['lightbox_footer'] = trim($new_instance['lightbox_footer']);
|
195 |
-
$instance['lightbox_skin'] = $new_instance['lightbox_skin'];
|
196 |
-
|
197 |
-
return $instance;
|
198 |
-
}
|
199 |
-
|
200 |
-
function widget($args, $instance) {
|
201 |
-
$out = $tmp = '';
|
202 |
-
|
203 |
-
extract($args, EXTR_SKIP);
|
204 |
-
|
205 |
-
$ll = '';
|
206 |
-
if ($instance['lightbox_zoom'] > 14) {
|
207 |
-
$coordinates = GMW::get_coordinates($instance['address']);
|
208 |
-
if ($coordinates) {
|
209 |
-
$ll = $coordinates['lat'] . ',' . $coordinates['lng'];
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
self::$widgets[] = array('title' => ($instance['lightbox_title']? $instance['title']: ''),
|
214 |
-
'width' => $instance['lightbox_width'],
|
215 |
-
'height' => $instance['lightbox_height'],
|
216 |
-
'footer' => $instance['lightbox_footer'],
|
217 |
-
'header' => $instance['lightbox_header'],
|
218 |
-
'address' => $instance['address'],
|
219 |
-
'zoom' => $instance['lightbox_zoom'],
|
220 |
-
'type' => $instance['lightbox_type'],
|
221 |
-
'skin' => $instance['lightbox_skin'],
|
222 |
-
'bubble' => $instance['lightbox_bubble'],
|
223 |
-
'll' => $ll,
|
224 |
-
'id' => $widget_id);
|
225 |
-
|
226 |
-
$out .= $before_widget;
|
227 |
-
|
228 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
229 |
-
if (!empty($title)) {
|
230 |
-
$out .= $before_title . $title . $after_title;
|
231 |
-
}
|
232 |
-
|
233 |
-
if ($instance['thumb_header']) {
|
234 |
-
$tmp .= wpautop($instance['thumb_header']);
|
235 |
-
}
|
236 |
-
$tmp .= '<p><a class="gmw-thumbnail-map" href="#dialog-' . $widget_id . '" title="Click to open larger map">';
|
237 |
-
$tmp .= '<img title="Click to open larger map" alt="Click to open larger map" src="https://maps.googleapis.com/maps/api/staticmap?center=' .
|
238 |
-
urlencode($instance['address']) . '&zoom=' . $instance['thumb_zoom'] .
|
239 |
-
'&size=' . $instance['thumb_width'] . 'x' . $instance['thumb_height'] . '&maptype=' . $instance['thumb_type'] .
|
240 |
-
'&sensor=false&scale=1&markers=size:' . $instance['thumb_pin_size'] . '%7Ccolor:' . $instance['thumb_pin_color'] . '%7Clabel:A%7C' .
|
241 |
-
urlencode($instance['address']) . '"></a>';
|
242 |
-
$tmp .= '</p>';
|
243 |
-
if ($instance['thu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|