Version Description
Download this release
Release Info
Developer | awsmin |
Plugin | Embed Any Document |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 2.2.2
- aswm-embed.php +114 -36
- css/embed.css +331 -147
- css/settings.css +170 -59
- images/ead-small.png +0 -0
- images/eadplus-banner.png +0 -0
- images/icon-box.png +0 -0
- images/icon-drive.png +0 -0
- images/icon-dropbox.png +0 -0
- images/icon-link.png +0 -0
- images/icon-upload.png +0 -0
- images/star.gif +0 -0
- images/ticket.gif +0 -0
- inc/functions.php +150 -163
- inc/mime_types.php +4 -2
- inc/popup.php +58 -44
- inc/settings.php +31 -147
- inc/support-mail.php +1 -1
- js/embed.js +256 -147
- language/ead-en.mo +0 -0
- language/ead-en.po +207 -0
- language/ead.mo +0 -0
- language/ead.pot +103 -82
- readme.txt +61 -5
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- trunk/aswm-embed.php +304 -0
- trunk/css/embed.css +361 -0
- trunk/css/magnific-popup.css +366 -0
- trunk/css/settings.css +293 -0
- trunk/images/donate.gif +0 -0
- trunk/images/ead-button.png +0 -0
- trunk/images/ead-icon-sprite.jpg +0 -0
- trunk/images/ead-small.png +0 -0
- trunk/images/eadplus-banner.png +0 -0
- trunk/images/icon-box.png +0 -0
- trunk/images/icon-close.png +0 -0
- trunk/images/icon-drive.png +0 -0
- trunk/images/icon-dropbox.png +0 -0
- trunk/images/icon-ead.png +0 -0
- trunk/images/icon-link.png +0 -0
- trunk/images/icon-no.png +0 -0
- trunk/images/icon-success.png +0 -0
- trunk/images/icon-upload.png +0 -0
- trunk/images/icon-yes.png +0 -0
- trunk/images/star.gif +0 -0
- trunk/images/ticket.gif +0 -0
- trunk/inc/functions.php +253 -0
- trunk/inc/mime_types.php +31 -0
- trunk/inc/popup.php +86 -0
- trunk/inc/settings.php +77 -0
- trunk/inc/support-mail.php +43 -0
- trunk/js/embed.js +283 -0
- trunk/js/magnific-popup.js +4 -0
- trunk/language/ead-en.mo +0 -0
- trunk/language/ead-en.po +207 -0
- trunk/language/ead-en_US.mo +0 -0
- trunk/language/ead-en_US.po +185 -0
- trunk/language/ead.mo +0 -0
- trunk/language/ead.pot +215 -0
- trunk/readme.txt +151 -0
- trunk/screenshot-1.png +0 -0
- trunk/screenshot-2.png +0 -0
- trunk/screenshot-3.png +0 -0
- trunk/screenshot-4.png +0 -0
aswm-embed.php
CHANGED
@@ -3,10 +3,12 @@
|
|
3 |
Plugin Name: Embed Any Document
|
4 |
Plugin URI: http://awsm.in/embed-any-documents
|
5 |
Description: Embed Any Document WordPress plugin lets you upload and embed your documents easily in your WordPress website without any additional browser plugins like Flash or Acrobat reader. The plugin lets you choose between Google Docs Viewer and Microsoft Office Online to display your documents.
|
6 |
-
Version:
|
7 |
Author: Awsm Innovations
|
8 |
Author URI: http://awsm.in
|
9 |
License: GPL V3
|
|
|
|
|
10 |
*/
|
11 |
require_once( dirname( __FILE__ ) . '/inc/functions.php');
|
12 |
class Awsm_embed {
|
@@ -15,8 +17,9 @@ class Awsm_embed {
|
|
15 |
private $plugin_url;
|
16 |
private $plugin_base;
|
17 |
private $plugin_file;
|
|
|
18 |
private $settings_slug;
|
19 |
-
private $text_domain = '
|
20 |
/**
|
21 |
* Creates or returns an instance of this class.
|
22 |
*/
|
@@ -38,6 +41,7 @@ class Awsm_embed {
|
|
38 |
$this->plugin_base = dirname( plugin_basename( __FILE__ ) );
|
39 |
$this->plugin_file = __FILE__ ;
|
40 |
$this->settings_slug = 'ead-settings';
|
|
|
41 |
|
42 |
load_plugin_textdomain($this->text_domain, false,$this->plugin_base . '/language' );
|
43 |
|
@@ -54,13 +58,15 @@ class Awsm_embed {
|
|
54 |
add_action( 'wp_ajax_validateurl',array( $this, 'validateurl' ));
|
55 |
//ajax Contact Form
|
56 |
add_action( 'wp_ajax_supportform',array( $this, 'supportform' ));
|
|
|
|
|
57 |
$this->run_plugin();
|
58 |
}
|
59 |
/**
|
60 |
* Register admin Settings style
|
61 |
*/
|
62 |
function setting_styles(){
|
63 |
-
wp_register_style( 'embed-settings', plugins_url( 'css/settings.css', $this->plugin_file ), false, '
|
64 |
wp_enqueue_style('embed-settings');
|
65 |
}
|
66 |
/**
|
@@ -107,43 +113,100 @@ class Awsm_embed {
|
|
107 |
* Embed Form popup
|
108 |
*/
|
109 |
function embedpopup(){
|
110 |
-
|
111 |
-
wp_die(__('You do not have sufficient permissions to access this page.'));
|
112 |
-
}
|
113 |
include($this->plugin_path.'inc/popup.php');
|
114 |
}
|
115 |
/**
|
116 |
* Register admin scripts
|
117 |
*/
|
118 |
function embed_helper(){
|
119 |
-
wp_register_style( '
|
120 |
-
|
121 |
-
wp_register_script( 'magnific-popup', plugins_url( 'js/magnific-popup.js', $this->plugin_file ), array( 'jquery' ), '0.9.9', true );
|
122 |
-
wp_register_script( 'embed', plugins_url( 'js/embed.js', $this->plugin_file ), array( 'jquery' ), '0.9.9', true );
|
123 |
wp_localize_script('embed','emebeder', array(
|
124 |
-
'
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
129 |
'validtypes' => ead_validembedtypes(),
|
|
|
|
|
130 |
'nocontent' => __('Nothing to insert', $this->text_domain),
|
|
|
131 |
'addurl' => __('Add URL', $this->text_domain),
|
132 |
'verify' => __('Verifying...', $this->text_domain),
|
133 |
) );
|
134 |
-
wp_enqueue_style('magnific-popup');
|
135 |
-
wp_enqueue_script( 'magnific-popup' );
|
136 |
wp_enqueue_style('embed-css');
|
137 |
wp_enqueue_script( 'embed' );
|
138 |
}
|
139 |
/**
|
140 |
* Shortcode Functionality
|
141 |
*/
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
/**
|
149 |
* Admin menu setup
|
@@ -164,16 +227,14 @@ class Awsm_embed {
|
|
164 |
function register_eadsettings() {
|
165 |
register_setting( 'ead-settings-group', 'ead_width' ,'ead_sanitize_dims');
|
166 |
register_setting( 'ead-settings-group', 'ead_height','ead_sanitize_dims' );
|
167 |
-
register_setting( 'ead-settings-group', 'ead_download' );
|
168 |
register_setting( 'ead-settings-group', 'ead_provider' );
|
|
|
|
|
169 |
}
|
170 |
/**
|
171 |
* Ajax validate file url
|
172 |
*/
|
173 |
function validateurl(){
|
174 |
-
if (!current_user_can('manage_options')) {
|
175 |
-
wp_die(__('You do not have sufficient permissions to access this page.'));
|
176 |
-
}
|
177 |
$fileurl = $_POST['furl'];
|
178 |
echo json_encode(ead_validateurl($fileurl));
|
179 |
die(0);
|
@@ -198,20 +259,9 @@ class Awsm_embed {
|
|
198 |
*/
|
199 |
function adminfunctions(){
|
200 |
if(is_admin()){
|
201 |
-
add_filter('media_send_to_editor', array($this,'ead_media_insert'), 10, 3 );
|
202 |
add_filter('upload_mimes', array($this,'additional_mimes'));
|
203 |
}
|
204 |
}
|
205 |
-
/**
|
206 |
-
* Adds shortcode for supported media
|
207 |
-
*/
|
208 |
-
function ead_media_insert( $html, $id, $attachment ) {
|
209 |
-
if ( ead_validType( $attachment['url'] )) {
|
210 |
-
return '[embeddoc url="' . $attachment['url'] . '"]';
|
211 |
-
} else {
|
212 |
-
return $html;
|
213 |
-
}
|
214 |
-
}
|
215 |
/**
|
216 |
* Adds additional mimetype for meadi uploader
|
217 |
*/
|
@@ -221,6 +271,34 @@ class Awsm_embed {
|
|
221 |
'ai' => 'application/postscript',
|
222 |
));
|
223 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
|
226 |
Awsm_embed::get_instance();
|
3 |
Plugin Name: Embed Any Document
|
4 |
Plugin URI: http://awsm.in/embed-any-documents
|
5 |
Description: Embed Any Document WordPress plugin lets you upload and embed your documents easily in your WordPress website without any additional browser plugins like Flash or Acrobat reader. The plugin lets you choose between Google Docs Viewer and Microsoft Office Online to display your documents.
|
6 |
+
Version: 2.2.2
|
7 |
Author: Awsm Innovations
|
8 |
Author URI: http://awsm.in
|
9 |
License: GPL V3
|
10 |
+
Text Domain: embed-any-document
|
11 |
+
Domain Path: /language
|
12 |
*/
|
13 |
require_once( dirname( __FILE__ ) . '/inc/functions.php');
|
14 |
class Awsm_embed {
|
17 |
private $plugin_url;
|
18 |
private $plugin_base;
|
19 |
private $plugin_file;
|
20 |
+
private $plugin_version;
|
21 |
private $settings_slug;
|
22 |
+
private $text_domain = 'embed-any-document';
|
23 |
/**
|
24 |
* Creates or returns an instance of this class.
|
25 |
*/
|
41 |
$this->plugin_base = dirname( plugin_basename( __FILE__ ) );
|
42 |
$this->plugin_file = __FILE__ ;
|
43 |
$this->settings_slug = 'ead-settings';
|
44 |
+
$this->plugin_version = '2.2.1';
|
45 |
|
46 |
load_plugin_textdomain($this->text_domain, false,$this->plugin_base . '/language' );
|
47 |
|
58 |
add_action( 'wp_ajax_validateurl',array( $this, 'validateurl' ));
|
59 |
//ajax Contact Form
|
60 |
add_action( 'wp_ajax_supportform',array( $this, 'supportform' ));
|
61 |
+
//default options
|
62 |
+
register_activation_hook($this->plugin_file, array( $this, 'ead_defaults' ));
|
63 |
$this->run_plugin();
|
64 |
}
|
65 |
/**
|
66 |
* Register admin Settings style
|
67 |
*/
|
68 |
function setting_styles(){
|
69 |
+
wp_register_style( 'embed-settings', plugins_url( 'css/settings.css', $this->plugin_file ), false,$this->plugin_version, 'all' );
|
70 |
wp_enqueue_style('embed-settings');
|
71 |
}
|
72 |
/**
|
113 |
* Embed Form popup
|
114 |
*/
|
115 |
function embedpopup(){
|
116 |
+
add_thickbox();
|
|
|
|
|
117 |
include($this->plugin_path.'inc/popup.php');
|
118 |
}
|
119 |
/**
|
120 |
* Register admin scripts
|
121 |
*/
|
122 |
function embed_helper(){
|
123 |
+
wp_register_style( 'embed-css', plugins_url( 'css/embed.css', $this->plugin_file ), false, $this->plugin_version, 'all' );
|
124 |
+
wp_register_script( 'embed', plugins_url( 'js/embed.js', $this->plugin_file ), array( 'jquery' ),$this->plugin_version, true );
|
|
|
|
|
125 |
wp_localize_script('embed','emebeder', array(
|
126 |
+
'height' => get_option('ead_height', '500px'),
|
127 |
+
'width' => get_option('ead_width', '100%'),
|
128 |
+
'download' => get_option('ead_download', 'none'),
|
129 |
+
'provider' => get_option('ead_provider', 'google'),
|
130 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
131 |
'validtypes' => ead_validembedtypes(),
|
132 |
+
'msextension' => ead_validextensions('ms'),
|
133 |
+
'drextension' => ead_validextensions('all'),
|
134 |
'nocontent' => __('Nothing to insert', $this->text_domain),
|
135 |
+
'invalidurl' => __('Invalid URL', $this->text_domain),
|
136 |
'addurl' => __('Add URL', $this->text_domain),
|
137 |
'verify' => __('Verifying...', $this->text_domain),
|
138 |
) );
|
|
|
|
|
139 |
wp_enqueue_style('embed-css');
|
140 |
wp_enqueue_script( 'embed' );
|
141 |
}
|
142 |
/**
|
143 |
* Shortcode Functionality
|
144 |
*/
|
145 |
+
function embed_shortcode($atts) {
|
146 |
+
$embed = "";
|
147 |
+
$durl = "";
|
148 |
+
$default_width = ead_sanitize_dims(get_option('ead_width', '100%'));
|
149 |
+
$default_height = ead_sanitize_dims(get_option('ead_height', '500px'));
|
150 |
+
$default_provider = get_option('ead_provider', 'google');
|
151 |
+
$default_download = get_option('ead_download', 'none');
|
152 |
+
$show = false;
|
153 |
+
extract(shortcode_atts(array('url' => '',
|
154 |
+
'drive' => '',
|
155 |
+
'width' => $default_width,
|
156 |
+
'height' => $default_height,
|
157 |
+
'language' => 'en',
|
158 |
+
'viewer' => $default_provider,
|
159 |
+
'download' => $default_download), $atts));
|
160 |
+
if(isset($atts['provider']))
|
161 |
+
$viewer = $atts['provider'];
|
162 |
+
if(!isset($atts['provider']) AND !isset($atts['viewer']))
|
163 |
+
$viewer = 'google';
|
164 |
+
if ($url):
|
165 |
+
$filedata = wp_remote_head($url);
|
166 |
+
$durl = '';
|
167 |
+
$privatefile = '';
|
168 |
+
if (ead_allowdownload($viewer)) if ($download == 'alluser' or $download == 'all') {
|
169 |
+
$show = true;
|
170 |
+
} elseif ($download == 'logged' AND is_user_logged_in()) {
|
171 |
+
$show = true;
|
172 |
+
}
|
173 |
+
if ($show) {
|
174 |
+
$filesize = 0;
|
175 |
+
$url = esc_url($url, array('http', 'https'));
|
176 |
+
if (!is_wp_error($filedata) && isset($filedata['headers']['content-length'])) {
|
177 |
+
$filesize = ead_human_filesize($filedata['headers']['content-length']);
|
178 |
+
} else {
|
179 |
+
$filesize = 0;
|
180 |
+
}
|
181 |
+
$fileHtml = '';
|
182 |
+
if ($filesize) $fileHtml = ' [' . $filesize . ']';
|
183 |
+
$durl = '<p class="embed_download"><a href="' . $url . '" download >' . __('Download', $this->text_domain) . $fileHtml . ' </a></p>';
|
184 |
+
}
|
185 |
+
|
186 |
+
$url = esc_url($url, array('http', 'https'));
|
187 |
+
$providerList = array('google', 'microsoft');
|
188 |
+
if (!in_array($viewer, $providerList)) $viewer = 'google';
|
189 |
+
switch ($viewer) {
|
190 |
+
case 'google':
|
191 |
+
$embedsrc = '//docs.google.com/viewer?url=%1$s&embedded=true&hl=%2$s';
|
192 |
+
$iframe = sprintf($embedsrc, urlencode($url), esc_attr($language));
|
193 |
+
break;
|
194 |
+
|
195 |
+
case 'microsoft':
|
196 |
+
$embedsrc = '//view.officeapps.live.com/op/embed.aspx?src=%1$s';
|
197 |
+
$iframe = sprintf($embedsrc, urlencode($url));
|
198 |
+
break;
|
199 |
+
}
|
200 |
+
$style = 'style="width:%1$s; height:%2$s; border: none;"';
|
201 |
+
$stylelink = sprintf($style, ead_sanitize_dims($width), ead_sanitize_dims($height));
|
202 |
+
$iframe = '<iframe src="' . $iframe . '" ' . $stylelink . '></iframe>';
|
203 |
+
$show = false;
|
204 |
+
$embed = '<div class="ead-document">' . $iframe . $privatefile . $durl . '</div>';
|
205 |
+
else:
|
206 |
+
$embed = __('No Url Found', $this->text_domain);
|
207 |
+
endif;
|
208 |
+
return $embed;
|
209 |
+
}
|
210 |
|
211 |
/**
|
212 |
* Admin menu setup
|
227 |
function register_eadsettings() {
|
228 |
register_setting( 'ead-settings-group', 'ead_width' ,'ead_sanitize_dims');
|
229 |
register_setting( 'ead-settings-group', 'ead_height','ead_sanitize_dims' );
|
|
|
230 |
register_setting( 'ead-settings-group', 'ead_provider' );
|
231 |
+
register_setting( 'ead-settings-group', 'ead_download' );
|
232 |
+
register_setting( 'ead-settings-group', 'ead_mediainsert' );
|
233 |
}
|
234 |
/**
|
235 |
* Ajax validate file url
|
236 |
*/
|
237 |
function validateurl(){
|
|
|
|
|
|
|
238 |
$fileurl = $_POST['furl'];
|
239 |
echo json_encode(ead_validateurl($fileurl));
|
240 |
die(0);
|
259 |
*/
|
260 |
function adminfunctions(){
|
261 |
if(is_admin()){
|
|
|
262 |
add_filter('upload_mimes', array($this,'additional_mimes'));
|
263 |
}
|
264 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
/**
|
266 |
* Adds additional mimetype for meadi uploader
|
267 |
*/
|
271 |
'ai' => 'application/postscript',
|
272 |
));
|
273 |
}
|
274 |
+
/**
|
275 |
+
* To get Overlay link
|
276 |
+
*/
|
277 |
+
function providerlink($keys, $id, $provider) {
|
278 |
+
$link = 'http://goo.gl/wJTQlc';
|
279 |
+
$id = "";
|
280 |
+
$configure = '<span class="overlay"><strong>' . __('Buy Pro Version', $this->text_domain) . '</strong><i></i></span>';
|
281 |
+
$target = 'target="_blank"';
|
282 |
+
echo '<a href="' . $link . '" id="' . $id . '" ' . $target . '><span><img src="' . $this->plugin_url . 'images/icon-' . strtolower($provider) . '.png" alt="Add From ' . $provider . '" />' . __('Add from ' . $provider, $this->text_domain) . $configure . '</span></a>';
|
283 |
+
}
|
284 |
+
/**
|
285 |
+
* To initialize default options
|
286 |
+
*/
|
287 |
+
function ead_defaults()
|
288 |
+
{
|
289 |
+
$o = array(
|
290 |
+
'ead_width' => '100%',
|
291 |
+
'ead_height' => '500px',
|
292 |
+
'ead_download' => 'none',
|
293 |
+
'ead_provider' => 'google',
|
294 |
+
'ead_mediainsert' => '1',
|
295 |
+
);
|
296 |
+
foreach ( $o as $k => $v )
|
297 |
+
{
|
298 |
+
if(!get_option($k)) update_option($k, $v);
|
299 |
+
}
|
300 |
+
return;
|
301 |
+
}
|
302 |
}
|
303 |
|
304 |
Awsm_embed::get_instance();
|
css/embed.css
CHANGED
@@ -1,140 +1,268 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
}
|
4 |
-
#embed-popup-wrap { display: none;
|
5 |
-
width: 85%;
|
6 |
-
margin:0 auto; }
|
7 |
#embed-popup {
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
-webkit-box-sizing: border-box;
|
22 |
-
box-sizing: border-box;
|
23 |
-
}
|
24 |
-
|
25 |
-
.section {
|
26 |
-
margin: 0 0 30px;
|
27 |
-
}
|
28 |
-
ul.tabs {
|
29 |
-
height: 33px;
|
30 |
-
line-height: 25px;
|
31 |
-
list-style: none;
|
32 |
-
border-bottom: 1px solid #DDD;
|
33 |
-
background: none;
|
34 |
-
padding: 0px;
|
35 |
-
margin: 20px 0 0;
|
36 |
-
}
|
37 |
-
.tabs li {
|
38 |
-
float: left;
|
39 |
-
display: inline;
|
40 |
-
margin: 0 1px 0 0;
|
41 |
-
padding: 4px 13px;
|
42 |
-
color: #777;
|
43 |
-
cursor: pointer;
|
44 |
-
background: #F9F9F9;
|
45 |
-
border: 1px solid #E4E4E4;
|
46 |
-
border-bottom: 0 solid #F9F9F9;
|
47 |
-
position: relative;
|
48 |
-
height: auto !important ;
|
49 |
-
line-height: inherit !important;
|
50 |
-
}
|
51 |
-
.tabs li:hover,
|
52 |
-
.vertical .tabs li:hover {
|
53 |
-
}
|
54 |
-
.tabs li.current {
|
55 |
-
color: #444;
|
56 |
-
background: #EFEFEF;
|
57 |
-
border: 1px solid #D4D4D4;
|
58 |
-
border-bottom: 0 solid #EFEFEF;
|
59 |
-
}
|
60 |
-
.upload-success{border: 1px solid #D4D4D4;background: #EFEFEF;
|
61 |
-
|
62 |
-
min-height: 70px;}
|
63 |
-
.upload-success .inner{padding: 30px;}
|
64 |
-
.box {
|
65 |
-
display: none;
|
66 |
-
border: 1px solid #D4D4D4;
|
67 |
-
border-width: 0 1px 1px;
|
68 |
-
background: #EFEFEF;
|
69 |
-
padding: 30px;
|
70 |
-
min-height: 70px;
|
71 |
-
}
|
72 |
-
.box.visible {
|
73 |
-
display: block;
|
74 |
-
}
|
75 |
-
.box label{
|
76 |
-
display: block;
|
77 |
-
font-size: 12px;
|
78 |
-
margin-bottom: 5px;
|
79 |
-
}
|
80 |
-
.uploaded-doccument{
|
81 |
-
padding:5px 0 5px 70px;
|
82 |
-
background: url(../images/icon-success.png) no-repeat 0 0;
|
83 |
-
color: #454545;
|
84 |
-
font-size: 13px;
|
85 |
-
float: left; margin-right: 20px;
|
86 |
-
}
|
87 |
-
.wp-core-ui .button#adv_options{ float: right; height: 40px; line-height: 38px; font-size: 13px; padding:0 20px; }
|
88 |
-
.uploaded-doccument p{
|
89 |
-
font-weight: bold; font-size: 16px; margin: 0 0 3px;
|
90 |
-
}
|
91 |
-
input.input-group-text{ padding:5px 8px; height: 40px; min-width: 60%; }
|
92 |
-
.wp-core-ui .button-primary.input-group-btn{ padding:5px 10px; height: 40px; }
|
93 |
-
.advanced_options{display: none; border-top:1px solid #ccc; padding: 0 30px }
|
94 |
-
body.mfp-shown .mfp-bg { z-index: 101000 !important; }
|
95 |
-
body.mfp-shown .mfp-wrap { z-index: 101001 !important; }
|
96 |
-
body.mfp-shown .mfp-preloader { z-index: 101002 !important; }
|
97 |
-
body.mfp-shown .mfp-content { z-index: 101003 !important; }
|
98 |
-
body.mfp-shown button.mfp-close,
|
99 |
-
body.mfp-shown button.mfp-arrow { z-index: 101004 !important; }
|
100 |
-
.wp-core-ui .ead-btn.button-large{
|
101 |
-
padding: 0 30px;
|
102 |
-
height: 54px;
|
103 |
-
line-height: 52px;
|
104 |
-
font-size: 16px;
|
105 |
-
}
|
106 |
-
.wp-core-ui .ead-btn.button-medium{
|
107 |
-
padding:0 15px;
|
108 |
-
height: 36px;
|
109 |
-
line-height: 34px;
|
110 |
-
font-size: 14px;
|
111 |
-
}
|
112 |
-
.text-center{
|
113 |
-
text-align: center;
|
114 |
-
}
|
115 |
-
.mfp-close{
|
116 |
-
position: absolute;
|
117 |
-
right: 10px;
|
118 |
-
top:10px;
|
119 |
-
font-weight: bold;
|
120 |
-
background: url(../images/icon-close.png)!important;
|
121 |
-
width: 22px;
|
122 |
-
height: 22px;
|
123 |
-
display: block;
|
124 |
-
text-indent: -9999999px;
|
125 |
-
}
|
126 |
-
.mfp-close{
|
127 |
|
128 |
}
|
129 |
-
.
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
div.awsm-error, div.awsm-updated {
|
133 |
margin: 5px 0 2px;
|
134 |
border-width: 1px 1px 1px 4px;
|
135 |
border-style: solid;
|
136 |
-webkit-border-radius: 4px;
|
137 |
-
border-radius: 4px;
|
138 |
}
|
139 |
div.awsm-updated {
|
140 |
background-color: #fff;
|
@@ -150,28 +278,84 @@ div.awsm-error p, div.awsm-updated p {
|
|
150 |
margin: 0.5em 0;
|
151 |
padding: 2px;
|
152 |
}
|
153 |
-
.hidden{
|
154 |
-
|
155 |
}
|
156 |
-
.mceActionPanel{
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
border-color: #D95B5B;
|
175 |
-webkit-box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
|
176 |
box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
}
|
1 |
+
#embed-popup-wrap {
|
2 |
+
display: none;
|
3 |
+
width: 85%;
|
4 |
+
margin: 0 auto;
|
5 |
+
}
|
6 |
+
.ead-popup-on #TB_window{
|
7 |
+
background: none;
|
8 |
+
box-shadow: none;
|
9 |
+
-webkit-box-shadow: none;
|
10 |
+
}
|
11 |
+
.ead-popup-on #TB_ajaxContent{
|
12 |
+
text-align: center;
|
13 |
+
}
|
14 |
+
.ead-popup-on #TB_ajaxContent:after{
|
15 |
+
content: "";
|
16 |
+
display: inline-block;
|
17 |
+
width: 1px;
|
18 |
+
height: 100%;
|
19 |
+
vertical-align: middle;
|
20 |
}
|
|
|
|
|
|
|
21 |
#embed-popup {
|
22 |
+
position: relative;
|
23 |
+
width: 99%;
|
24 |
+
max-width: 1000px;
|
25 |
+
background: #fff;
|
26 |
+
-moz-box-sizing: border-box;
|
27 |
+
-webkit-box-sizing: border-box;
|
28 |
+
box-sizing: border-box;
|
29 |
+
display: inline-block;
|
30 |
+
vertical-align: middle;
|
31 |
+
-webkit-box-shadow: 0 2px 25px #000;
|
32 |
+
-moz-box-shadow: 0 2px 25px #000;
|
33 |
+
box-shadow: 0 2px 25px #000;
|
34 |
+
text-align: left;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
}
|
37 |
+
.ead-popup-header{
|
38 |
+
padding: 20px 30px;
|
39 |
+
}
|
40 |
+
.ead-popup-header h1{
|
41 |
+
margin: 0;
|
42 |
+
line-height: 1.3;
|
43 |
+
}
|
44 |
+
.ead-section {
|
45 |
+
padding: 0 30px;
|
46 |
+
border-top: 1px solid #ebebeb;
|
47 |
+
}
|
48 |
+
.ead-action-panel{
|
49 |
+
padding: 20px 30px;
|
50 |
+
background: #f5f5f5;
|
51 |
+
border-top: 1px solid #ebebeb;
|
52 |
+
}
|
53 |
+
ul.ead-options {
|
54 |
+
padding: 30px 0;
|
55 |
+
overflow: hidden;
|
56 |
+
margin: 0px;
|
57 |
+
}
|
58 |
+
.ead-options li {
|
59 |
+
float: left;
|
60 |
+
width: 20%;
|
61 |
+
padding: 0 10px;
|
62 |
+
-moz-box-sizing: border-box;
|
63 |
+
-webkit-box-sizing: border-box;
|
64 |
+
box-sizing: border-box;
|
65 |
+
}
|
66 |
+
.ead-options li a {
|
67 |
+
display: block;
|
68 |
+
text-decoration: none;
|
69 |
+
color: rgb(33, 33, 33);
|
70 |
+
}
|
71 |
+
.ead-options li span {
|
72 |
+
border: 2px dotted #ccc;
|
73 |
+
-webkit-border-radius: 4px;
|
74 |
+
border-radius: 4px;
|
75 |
+
display: block;
|
76 |
+
padding: 30px 10px 20px;
|
77 |
+
text-align: center;
|
78 |
+
position: relative;
|
79 |
+
}
|
80 |
+
.ead-options li img {
|
81 |
+
display: block;
|
82 |
+
margin: 0 auto 10px;
|
83 |
+
}
|
84 |
+
.ead-options li span span.overlay {
|
85 |
+
border: none;
|
86 |
+
-webkit-border-radius: 0;
|
87 |
+
border-radius: 0;
|
88 |
+
padding: 0;
|
89 |
+
width: 100%;
|
90 |
+
height: 100%;
|
91 |
+
position: absolute;
|
92 |
+
left: 0;
|
93 |
+
top: 0;
|
94 |
+
background: rgba(255, 255, 255, 0.7);
|
95 |
+
}
|
96 |
+
.ead-options .overlay strong {
|
97 |
+
display: inline-block;
|
98 |
+
max-width: 97%;
|
99 |
+
vertical-align: middle;
|
100 |
+
opacity: 0;
|
101 |
+
-webkit-transition: all 0.3s ease;
|
102 |
+
-moz-transition: all 0.3s ease;
|
103 |
+
-ms-transition: all 0.3s ease;
|
104 |
+
-o-transition: all 0.3s ease;
|
105 |
+
transition: all 0.3s ease;
|
106 |
+
}
|
107 |
+
.ead-options li span:hover {
|
108 |
+
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
|
109 |
+
-webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
|
110 |
+
}
|
111 |
+
.ead-options li:hover .overlay strong {
|
112 |
+
opacity: 1;
|
113 |
+
}
|
114 |
+
.ead-options .overlay i {
|
115 |
+
display: inline-block;
|
116 |
+
height: 100%;
|
117 |
+
width: 1px;
|
118 |
+
vertical-align: middle;
|
119 |
+
}
|
120 |
+
.upload-success {
|
121 |
+
min-height: 70px;
|
122 |
+
overflow: hidden;
|
123 |
+
}
|
124 |
+
.upload-success .inner {
|
125 |
+
padding: 30px 10px;
|
126 |
+
-moz-box-sizing: border-box;
|
127 |
+
-webkit-box-sizing: border-box;
|
128 |
+
box-sizing: border-box;
|
129 |
+
float: left;
|
130 |
+
width: 20%;
|
131 |
+
}
|
132 |
+
.box {
|
133 |
+
display: none;
|
134 |
+
border: 2px dotted #ccc;
|
135 |
+
-webkit-border-radius: 4px;
|
136 |
+
border-radius: 4px;
|
137 |
+
padding: 20px;
|
138 |
+
margin: 30px 0;
|
139 |
+
}
|
140 |
+
a.go-back {
|
141 |
+
display: inline-block;
|
142 |
+
margin-top: 20px;
|
143 |
+
text-decoration: none;
|
144 |
+
}
|
145 |
+
.box label {
|
146 |
+
display: block;
|
147 |
+
font-size: 12px;
|
148 |
+
margin-bottom: 5px;
|
149 |
+
}
|
150 |
+
.uploaded-doccument {
|
151 |
+
padding: 75px 0 5px;
|
152 |
+
color: #454545;
|
153 |
+
font-size: 13px;
|
154 |
+
word-wrap: break-word;
|
155 |
+
text-align: center;
|
156 |
+
}
|
157 |
+
.uploaded-doccument.ead-link {
|
158 |
+
background: url(../images/icon-link.png) no-repeat center 5px / 36px 49px;
|
159 |
+
}
|
160 |
+
.uploaded-doccument.ead-upload {
|
161 |
+
background: url(../images/icon-upload.png) no-repeat center 5px / 54px 49px;
|
162 |
+
}
|
163 |
+
.uploaded-doccument.ead-dropbox {
|
164 |
+
background: url(../images/icon-dropbox.png) no-repeat center 5px / 51px 49px;
|
165 |
+
}
|
166 |
+
.uploaded-doccument.ead-drive {
|
167 |
+
background: url(../images/icon-drive.png) no-repeat center 5px / 48px 49px;
|
168 |
+
}
|
169 |
+
.uploaded-doccument.ead-box {
|
170 |
+
background: url(../images/icon-box.png) no-repeat center 5px / 54px 49px;
|
171 |
+
}
|
172 |
+
.wp-core-ui .button#adv_options {
|
173 |
+
float: right;
|
174 |
+
height: 40px;
|
175 |
+
line-height: 38px;
|
176 |
+
font-size: 13px;
|
177 |
+
padding: 0 20px;
|
178 |
+
}
|
179 |
+
.uploaded-doccument p {
|
180 |
+
font-weight: bold;
|
181 |
+
font-size: 16px;
|
182 |
+
margin: 0 0 3px;
|
183 |
+
}
|
184 |
+
input.input-group-text {
|
185 |
+
padding: 5px 8px;
|
186 |
+
height: 40px;
|
187 |
+
min-width: 88%;
|
188 |
+
}
|
189 |
+
.wp-core-ui .button-primary.input-group-btn {
|
190 |
+
padding: 5px 10px;
|
191 |
+
height: 40px;
|
192 |
+
}
|
193 |
+
.advanced_options {
|
194 |
+
padding: 30px;
|
195 |
+
-moz-box-sizing: border-box;
|
196 |
+
-webkit-box-sizing: border-box;
|
197 |
+
box-sizing: border-box;
|
198 |
+
float: left;
|
199 |
+
width: 70%;
|
200 |
+
border-left: 1px solid #ebebeb;
|
201 |
+
}
|
202 |
+
.advanced_options h3 {
|
203 |
+
margin-top: 0px
|
204 |
+
}
|
205 |
+
.advanced_options h3 span {
|
206 |
+
color: #aaa;
|
207 |
+
font-weight: normal;
|
208 |
+
}
|
209 |
+
body.mfp-shown .mfp-bg {
|
210 |
+
z-index: 1010;
|
211 |
+
}
|
212 |
+
body.mfp-shown .mfp-wrap {
|
213 |
+
z-index: 1011;
|
214 |
+
}
|
215 |
+
body.mfp-shown .mfp-preloader {
|
216 |
+
z-index: 1012;
|
217 |
+
}
|
218 |
+
body.mfp-shown .mfp-content {
|
219 |
+
z-index: 1013;
|
220 |
+
}
|
221 |
+
body.mfp-shown button.mfp-close, body.mfp-shown button.mfp-arrow {
|
222 |
+
z-index: 1014;
|
223 |
+
}
|
224 |
+
.wp-core-ui .ead-btn.button-large {
|
225 |
+
padding: 0 30px;
|
226 |
+
height: 54px;
|
227 |
+
line-height: 52px;
|
228 |
+
font-size: 16px;
|
229 |
+
}
|
230 |
+
.wp-core-ui .ead-btn.button-medium {
|
231 |
+
padding: 0 15px;
|
232 |
+
height: 36px;
|
233 |
+
line-height: 34px;
|
234 |
+
font-size: 14px;
|
235 |
+
}
|
236 |
+
.text-center {
|
237 |
+
text-align: center;
|
238 |
+
}
|
239 |
+
.mfp-close {
|
240 |
+
position: absolute;
|
241 |
+
right: 30px;
|
242 |
+
top: 30px;
|
243 |
+
font-weight: bold;
|
244 |
+
background: url(../images/icon-close.png)!important;
|
245 |
+
width: 22px;
|
246 |
+
height: 22px;
|
247 |
+
display: block;
|
248 |
+
text-indent: -9999999px;
|
249 |
+
border: none;
|
250 |
+
cursor: pointer;
|
251 |
+
opacity: 0.65;
|
252 |
+
padding: 0;
|
253 |
+
}
|
254 |
+
.mfp-close:hover{
|
255 |
+
opacity: 1;
|
256 |
+
}
|
257 |
+
.mfp-close .upload-success {
|
258 |
+
display: none;
|
259 |
}
|
260 |
div.awsm-error, div.awsm-updated {
|
261 |
margin: 5px 0 2px;
|
262 |
border-width: 1px 1px 1px 4px;
|
263 |
border-style: solid;
|
264 |
-webkit-border-radius: 4px;
|
265 |
+
border-radius: 4px;
|
266 |
}
|
267 |
div.awsm-updated {
|
268 |
background-color: #fff;
|
278 |
margin: 0.5em 0;
|
279 |
padding: 2px;
|
280 |
}
|
281 |
+
.hidden {
|
282 |
+
display: none;
|
283 |
}
|
284 |
+
.mceActionPanel {
|
285 |
+
margin: 0;
|
286 |
+
}
|
287 |
+
.option-fields {
|
288 |
+
list-style-type: none;
|
289 |
+
margin: 0;
|
290 |
+
padding: 20px 0 0;
|
291 |
+
}
|
292 |
+
.option-fields li {
|
293 |
+
padding-bottom: 15px;
|
294 |
+
overflow: hidden;
|
295 |
+
}
|
296 |
+
.option-fields label {
|
297 |
+
display: block;
|
298 |
+
margin-bottom: 5px;
|
299 |
+
font-weight: bold;
|
300 |
+
}
|
301 |
+
.option-fields li.checkbox input{ float: left; margin: 2px 10px 0 0;}
|
302 |
+
.option-fields li.checkbox label{ float: left; margin: 0 0 0; font-weight: normal;}
|
303 |
+
.f-left {
|
304 |
+
float: left;
|
305 |
+
}
|
306 |
+
.option-fields .f-left {
|
307 |
+
margin-right: 25px;
|
308 |
+
}
|
309 |
+
.option-fields .f-left.last {
|
310 |
+
margin: 0;
|
311 |
+
}
|
312 |
+
.clear {
|
313 |
+
clear: both;
|
314 |
+
}
|
315 |
+
.input-small {
|
316 |
+
width: 60px;
|
317 |
+
}
|
318 |
+
.box .urlerror {
|
319 |
border-color: #D95B5B;
|
320 |
-webkit-box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
|
321 |
box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
|
322 |
+
}
|
323 |
+
.picker-dialog {
|
324 |
+
z-index: 100091;
|
325 |
+
}
|
326 |
+
.picker-dialog-bg {
|
327 |
+
z-index: 100090;
|
328 |
+
}
|
329 |
+
.ead-popon #adminmenuwrap{
|
330 |
+
z-index: 999!important;
|
331 |
+
}
|
332 |
+
@media (max-width: 915px) {
|
333 |
+
.ead-options li {
|
334 |
+
width: 33.33%;
|
335 |
+
padding-bottom: 20px;
|
336 |
+
margin-bottom: 0;
|
337 |
+
}
|
338 |
+
.ead-popup-on #TB_window{
|
339 |
+
background: #fff;
|
340 |
+
-webkit-box-shadow: 0 2px 25px #000;
|
341 |
+
-moz-box-shadow: 0 2px 25px #000;
|
342 |
+
box-shadow: 0 2px 25px #000;
|
343 |
+
|
344 |
+
|
345 |
+
}
|
346 |
+
|
347 |
+
#embed-popup {
|
348 |
+
box-shadow: none;
|
349 |
+
-webkit-box-shadow: none;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
@media (max-width: 600px) {
|
353 |
+
.ead-options li {
|
354 |
+
width: 50%;
|
355 |
+
}
|
356 |
+
}
|
357 |
+
@media (max-width: 440px) {
|
358 |
+
.ead-options li {
|
359 |
+
width: 100%;
|
360 |
+
}
|
361 |
}
|
css/settings.css
CHANGED
@@ -5,16 +5,16 @@ img {
|
|
5 |
.clear {
|
6 |
clear: both;
|
7 |
}
|
8 |
-
.f-left{
|
9 |
float: left;
|
10 |
}
|
11 |
-
.fl-right{
|
12 |
float: right;
|
13 |
}
|
14 |
.tabs {
|
15 |
display: none;
|
16 |
background: #fff;
|
17 |
-
padding:
|
18 |
}
|
19 |
.tabs.visible {
|
20 |
display: block;
|
@@ -23,8 +23,8 @@ img {
|
|
23 |
background: none;
|
24 |
border: none;
|
25 |
}
|
26 |
-
.nav-tab-wrapper a:hover{
|
27 |
-
|
28 |
}
|
29 |
.nav-tab-wrapper a.nav-tab-active {
|
30 |
background: #fff;
|
@@ -32,6 +32,7 @@ img {
|
|
32 |
.form-table {
|
33 |
margin-top: 0;
|
34 |
padding-top: 0.5em;
|
|
|
35 |
}
|
36 |
h2.nav-tab-wrapper {
|
37 |
border: none;
|
@@ -39,42 +40,85 @@ h2.nav-tab-wrapper {
|
|
39 |
}
|
40 |
h2.ead-title {
|
41 |
background: url(../images/icon-ead.png) no-repeat 0 14px;
|
42 |
-
padding-left: 46px;
|
43 |
-
padding-bottom: 25px;
|
44 |
}
|
45 |
.ead-left-wrap {
|
46 |
float: left;
|
47 |
width: 100%;
|
48 |
-moz-box-sizing: border-box;
|
49 |
-
-webkit-box-sizing: border-box;
|
50 |
-
box-sizing: border-box;
|
51 |
-
padding-right:340px;
|
52 |
-
margin-right: -340px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
.ead-right-wrap {
|
55 |
float: right;
|
56 |
max-width: 300px;
|
57 |
-
background: #fff;
|
58 |
-
padding-bottom: 15px;
|
59 |
color: #372e2e;
|
60 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
.author-info {
|
62 |
-
padding:
|
63 |
text-align: center;
|
64 |
}
|
65 |
.awsm-social {
|
66 |
text-align: center;
|
67 |
list-style-type: none;
|
68 |
padding: 15px;
|
69 |
-
border-top: 1px solid #dadada;
|
70 |
border-bottom: 1px solid #dadada;
|
71 |
-
margin
|
72 |
}
|
73 |
.awsm-social li {
|
74 |
display: inline-block;
|
75 |
margin: 0 6px;
|
76 |
}
|
77 |
-
.awsm-icon{
|
78 |
background: url(../images/ead-icon-sprite.jpg) no-repeat;
|
79 |
display: block;
|
80 |
width: 21px;
|
@@ -82,50 +126,77 @@ margin-right: -340px;
|
|
82 |
text-indent: -999999px;
|
83 |
opacity: 0.46;
|
84 |
}
|
85 |
-
.awsm-icon:hover{
|
86 |
opacity: 1;
|
87 |
}
|
88 |
-
.awsm-icon-facebook{
|
89 |
-
|
90 |
-
}
|
91 |
-
.awsm-icon-twitter{
|
92 |
background-position: -26px 0;
|
93 |
}
|
94 |
-
.awsm-icon-github{
|
95 |
background-position: -52px 0;
|
96 |
}
|
97 |
-
.awsm-icon-behance{
|
98 |
background-position: -78px 0;
|
99 |
width: 28px;
|
100 |
}
|
101 |
-
.awsm-icon-dribbble{
|
102 |
background-position: right 0;
|
103 |
}
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
.paypal .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
input.small {
|
109 |
max-width: 60px;
|
110 |
}
|
111 |
-
.ead-frame-width{
|
112 |
margin-right: 15px;
|
113 |
margin-bottom: 10px;
|
114 |
}
|
115 |
-
.ead-frame-height{
|
116 |
margin-bottom: 10px;
|
117 |
}
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
font-size: 12px;
|
120 |
color: #999;
|
121 |
}
|
122 |
-
|
123 |
div.awsm-error, div.awsm-updated {
|
124 |
margin: 5px 0 2px;
|
125 |
border-width: 1px 1px 1px 4px;
|
126 |
border-style: solid;
|
127 |
-webkit-border-radius: 4px;
|
128 |
-
border-radius: 4px;
|
129 |
}
|
130 |
div.awsm-updated {
|
131 |
background-color: #fff;
|
@@ -141,27 +212,65 @@ div.awsm-error p, div.awsm-updated p {
|
|
141 |
margin: 0.5em 0;
|
142 |
padding: 2px;
|
143 |
}
|
144 |
-
.ead_doller{
|
145 |
display: inline-block;
|
146 |
vertical-align: top;
|
147 |
margin: 5px 5px 0 0;
|
148 |
font-weight: bold;
|
149 |
}
|
150 |
-
#supportform label{
|
151 |
-
|
152 |
-
-
|
153 |
-
|
154 |
-
|
155 |
-
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
@media (max-width: 800px) {
|
166 |
.ead-left-wrap {
|
167 |
float: none;
|
@@ -169,14 +278,16 @@ box-sizing: border-box; width:100%;}
|
|
169 |
margin-bottom: 30px;
|
170 |
padding-right: 0;
|
171 |
margin-right: 0;
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
}
|
179 |
@media (max-width: 980px) {
|
180 |
-
.col-left
|
181 |
-
|
182 |
-
|
|
|
|
|
|
5 |
.clear {
|
6 |
clear: both;
|
7 |
}
|
8 |
+
.f-left {
|
9 |
float: left;
|
10 |
}
|
11 |
+
.fl-right {
|
12 |
float: right;
|
13 |
}
|
14 |
.tabs {
|
15 |
display: none;
|
16 |
background: #fff;
|
17 |
+
padding: 20px 20px 0;
|
18 |
}
|
19 |
.tabs.visible {
|
20 |
display: block;
|
23 |
background: none;
|
24 |
border: none;
|
25 |
}
|
26 |
+
.nav-tab-wrapper a:hover {
|
27 |
+
border: none;
|
28 |
}
|
29 |
.nav-tab-wrapper a.nav-tab-active {
|
30 |
background: #fff;
|
32 |
.form-table {
|
33 |
margin-top: 0;
|
34 |
padding-top: 0.5em;
|
35 |
+
margin-bottom: 20px;
|
36 |
}
|
37 |
h2.nav-tab-wrapper {
|
38 |
border: none;
|
40 |
}
|
41 |
h2.ead-title {
|
42 |
background: url(../images/icon-ead.png) no-repeat 0 14px;
|
43 |
+
padding-left: 46px !important;
|
44 |
+
padding-bottom: 25px !important;
|
45 |
}
|
46 |
.ead-left-wrap {
|
47 |
float: left;
|
48 |
width: 100%;
|
49 |
-moz-box-sizing: border-box;
|
50 |
+
-webkit-box-sizing: border-box;
|
51 |
+
box-sizing: border-box;
|
52 |
+
padding-right: 340px;
|
53 |
+
margin-right: -340px;
|
54 |
+
}
|
55 |
+
.ead-left-wrap h3{
|
56 |
+
font-weight: 300;
|
57 |
+
font-size: 20px;
|
58 |
+
margin: 0 0 20px;
|
59 |
+
}
|
60 |
+
.ead-form-footer{
|
61 |
+
margin: 0 -20px;
|
62 |
+
padding: 20px;
|
63 |
+
background: #f5f5f5;
|
64 |
+
border-top: 1px solid #ddd;
|
65 |
+
-webkit-box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);
|
66 |
+
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);
|
67 |
+
overflow: hidden;
|
68 |
+
}
|
69 |
+
.ead-form-footer p{
|
70 |
+
margin: 0;
|
71 |
+
float: right;
|
72 |
+
padding: 0;
|
73 |
+
}
|
74 |
+
.ead-form-footer .button{
|
75 |
+
height: 42px;
|
76 |
}
|
77 |
.ead-right-wrap {
|
78 |
float: right;
|
79 |
max-width: 300px;
|
|
|
|
|
80 |
color: #372e2e;
|
81 |
}
|
82 |
+
.ead-banner{
|
83 |
+
text-align: center;
|
84 |
+
padding-top: 20px;
|
85 |
+
}
|
86 |
+
.ead-right-inner {
|
87 |
+
background: #fff;
|
88 |
+
margin-bottom: 10px;
|
89 |
+
}
|
90 |
+
.ead-right-inner h3{
|
91 |
+
margin: 0;
|
92 |
+
padding: 15px 20px;
|
93 |
+
border-bottom: 1px solid #ddd;
|
94 |
+
margin-bottom: 15px;
|
95 |
+
font-size: 14px;
|
96 |
+
color: #5b5b5b;
|
97 |
+
font-weight: normal;
|
98 |
+
}
|
99 |
+
.ead-right-inner ol{
|
100 |
+
padding: 0 20px 15px;
|
101 |
+
margin: 0 0 0 20px;
|
102 |
+
}
|
103 |
+
.ead-right-inner ol a{
|
104 |
+
text-decoration: none;
|
105 |
+
}
|
106 |
.author-info {
|
107 |
+
padding: 10px 15px;
|
108 |
text-align: center;
|
109 |
}
|
110 |
.awsm-social {
|
111 |
text-align: center;
|
112 |
list-style-type: none;
|
113 |
padding: 15px;
|
|
|
114 |
border-bottom: 1px solid #dadada;
|
115 |
+
margin: 0;
|
116 |
}
|
117 |
.awsm-social li {
|
118 |
display: inline-block;
|
119 |
margin: 0 6px;
|
120 |
}
|
121 |
+
.awsm-icon {
|
122 |
background: url(../images/ead-icon-sprite.jpg) no-repeat;
|
123 |
display: block;
|
124 |
width: 21px;
|
126 |
text-indent: -999999px;
|
127 |
opacity: 0.46;
|
128 |
}
|
129 |
+
.awsm-icon:hover {
|
130 |
opacity: 1;
|
131 |
}
|
132 |
+
.awsm-icon-facebook {} .awsm-icon-twitter {
|
|
|
|
|
|
|
133 |
background-position: -26px 0;
|
134 |
}
|
135 |
+
.awsm-icon-github {
|
136 |
background-position: -52px 0;
|
137 |
}
|
138 |
+
.awsm-icon-behance {
|
139 |
background-position: -78px 0;
|
140 |
width: 28px;
|
141 |
}
|
142 |
+
.awsm-icon-dribbble {
|
143 |
background-position: right 0;
|
144 |
}
|
145 |
+
.paypal {
|
146 |
+
text-align: center;
|
147 |
+
}
|
148 |
+
.paypal input.small {
|
149 |
+
vertical-align: top;
|
150 |
+
margin-right: 20px;
|
151 |
+
}
|
152 |
+
.paypal .donate-btn {
|
153 |
+
vertical-align: top;
|
154 |
+
padding: 0;
|
155 |
+
}
|
156 |
input.small {
|
157 |
max-width: 60px;
|
158 |
}
|
159 |
+
.ead-frame-width {
|
160 |
margin-right: 15px;
|
161 |
margin-bottom: 10px;
|
162 |
}
|
163 |
+
.ead-frame-height {
|
164 |
margin-bottom: 10px;
|
165 |
}
|
166 |
+
.row-col{
|
167 |
+
margin: 0 -5px 10px;
|
168 |
+
overflow: hidden;
|
169 |
+
}
|
170 |
+
.col-2{
|
171 |
+
float: left;
|
172 |
+
padding: 0 5px;
|
173 |
+
width: 50%;
|
174 |
+
-moz-box-sizing: border-box;
|
175 |
+
-webkit-box-sizing: border-box;
|
176 |
+
box-sizing: border-box;
|
177 |
+
}
|
178 |
+
.col-2 a{
|
179 |
+
background: #fff;
|
180 |
+
display: block;
|
181 |
+
text-align: center;
|
182 |
+
padding: 25px 10px;
|
183 |
+
text-decoration: none;
|
184 |
+
}
|
185 |
+
|
186 |
+
.col-2 a img{
|
187 |
+
display: block;
|
188 |
+
margin: 0 auto 10px;
|
189 |
+
}
|
190 |
+
span.note, .ead_supported {
|
191 |
font-size: 12px;
|
192 |
color: #999;
|
193 |
}
|
|
|
194 |
div.awsm-error, div.awsm-updated {
|
195 |
margin: 5px 0 2px;
|
196 |
border-width: 1px 1px 1px 4px;
|
197 |
border-style: solid;
|
198 |
-webkit-border-radius: 4px;
|
199 |
+
border-radius: 4px;
|
200 |
}
|
201 |
div.awsm-updated {
|
202 |
background-color: #fff;
|
212 |
margin: 0.5em 0;
|
213 |
padding: 2px;
|
214 |
}
|
215 |
+
.ead_doller {
|
216 |
display: inline-block;
|
217 |
vertical-align: top;
|
218 |
margin: 5px 5px 0 0;
|
219 |
font-weight: bold;
|
220 |
}
|
221 |
+
#supportform label {
|
222 |
+
display: block;
|
223 |
+
margin-bottom: 5px;
|
224 |
+
font-weight: bold;
|
225 |
+
}
|
226 |
+
.text-input {
|
227 |
+
width: 100%;
|
228 |
+
height: 40px;
|
229 |
+
-moz-box-sizing: border-box;
|
230 |
+
-webkit-box-sizing: border-box;
|
231 |
+
box-sizing: border-box;
|
232 |
+
}
|
233 |
+
#supportform textarea {
|
234 |
+
-moz-box-sizing: border-box;
|
235 |
+
-webkit-box-sizing: border-box;
|
236 |
+
box-sizing: border-box;
|
237 |
+
width: 100%;
|
238 |
+
}
|
239 |
+
.ead_supported span {
|
240 |
+
display: block;
|
241 |
+
font-weight: bold;
|
242 |
+
margin-top: 10px;
|
243 |
+
}
|
244 |
+
.supportedlist ul {
|
245 |
+
margin-top: 5px;
|
246 |
+
}
|
247 |
+
.supportedlist li {
|
248 |
+
padding-left: 17px;
|
249 |
+
position: relative;
|
250 |
+
}
|
251 |
+
.supportedlist li span {
|
252 |
+
position: absolute;
|
253 |
+
left: 0;
|
254 |
+
top: 3px;
|
255 |
+
width: 11px;
|
256 |
+
height: 11px;
|
257 |
+
margin: 0;
|
258 |
+
}
|
259 |
+
.supportedlist li span.ead-check {
|
260 |
+
background: url(../images/icon-yes.png) no-repeat;
|
261 |
+
}
|
262 |
+
.supportedlist li span.ead-close {
|
263 |
+
background: url(../images/icon-no.png) no-repeat;
|
264 |
+
}
|
265 |
+
.col-left {
|
266 |
+
float: left;
|
267 |
+
width: 47%;
|
268 |
+
margin-right: 6%;
|
269 |
+
}
|
270 |
+
.col-right {
|
271 |
+
float: right;
|
272 |
+
width: 47%;
|
273 |
+
}
|
274 |
@media (max-width: 800px) {
|
275 |
.ead-left-wrap {
|
276 |
float: none;
|
278 |
margin-bottom: 30px;
|
279 |
padding-right: 0;
|
280 |
margin-right: 0;
|
281 |
+
}
|
282 |
+
.ead-right-wrap {
|
283 |
+
float: none;
|
284 |
+
width: 100%;
|
285 |
+
}
|
|
|
286 |
}
|
287 |
@media (max-width: 980px) {
|
288 |
+
.col-left, .col-right {
|
289 |
+
float: none;
|
290 |
+
width: 100%;
|
291 |
+
margin-right: 0%;
|
292 |
+
}
|
293 |
+
}
|
images/ead-small.png
CHANGED
Binary file
|
images/eadplus-banner.png
ADDED
Binary file
|
images/icon-box.png
ADDED
Binary file
|
images/icon-drive.png
ADDED
Binary file
|
images/icon-dropbox.png
ADDED
Binary file
|
images/icon-link.png
ADDED
Binary file
|
images/icon-upload.png
ADDED
Binary file
|
images/star.gif
ADDED
Binary file
|
images/ticket.gif
ADDED
Binary file
|
inc/functions.php
CHANGED
@@ -1,28 +1,29 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Dropdown Builder
|
4 |
*
|
5 |
* @since 1.0
|
6 |
* @return String select html
|
7 |
*/
|
8 |
-
function ead_selectbuilder(
|
9 |
-
if(is_array($options)):
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
18 |
}
|
19 |
-
echo
|
20 |
-
}
|
21 |
-
echo '</select>';
|
22 |
else:
|
23 |
-
|
24 |
endif;
|
25 |
}
|
|
|
26 |
/**
|
27 |
* Human Readable filesize
|
28 |
*
|
@@ -31,7 +32,7 @@ function ead_selectbuilder( $name, $options,$selected="",$class="") {
|
|
31 |
* @note Replaces old gde_sanitizeOpts function
|
32 |
*/
|
33 |
function ead_human_filesize($bytes, $decimals = 2) {
|
34 |
-
$size = array('B','KB','MB','GB','TB','PB','EB','ZB','YB');
|
35 |
$factor = floor((strlen($bytes) - 1) / 3);
|
36 |
return sprintf("%.{$decimals}f ", $bytes / pow(1024, $factor)) . @$size[$factor];
|
37 |
}
|
@@ -43,146 +44,92 @@ function ead_human_filesize($bytes, $decimals = 2) {
|
|
43 |
* @return string Sanitized dimensions, or false if value is invalid
|
44 |
* @note Replaces old gde_sanitizeOpts function
|
45 |
*/
|
46 |
-
function ead_sanitize_dims(
|
|
|
47 |
// remove any spacing junk
|
48 |
-
$dim = trim(
|
49 |
|
50 |
-
if (
|
51 |
$type = "px";
|
52 |
-
$dim = preg_replace(
|
53 |
} else {
|
54 |
$type = "%";
|
55 |
-
$dim = preg_replace(
|
56 |
-
if (
|
57 |
$dim = "100";
|
58 |
}
|
59 |
}
|
60 |
|
61 |
-
if (
|
62 |
-
return $dim
|
63 |
} else {
|
64 |
return false;
|
65 |
}
|
66 |
}
|
67 |
-
|
68 |
/**
|
69 |
* Validate File url
|
70 |
*
|
71 |
* @since 1.0
|
72 |
-
* @return string Download link
|
73 |
*/
|
74 |
-
function ead_validateurl($url){
|
75 |
-
$types
|
76 |
-
$url
|
77 |
-
$remote =
|
78 |
-
$json['status']
|
79 |
-
$json['message'] =
|
80 |
-
if (
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
} else {
|
98 |
-
$json['
|
99 |
-
$json['status'] =false;
|
100 |
}
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
$json['
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
-
|
109 |
}
|
|
|
110 |
/**
|
111 |
-
*
|
112 |
*
|
113 |
* @since 1.0
|
114 |
-
* @return string
|
115 |
*/
|
116 |
-
function
|
117 |
-
$
|
118 |
-
$
|
119 |
-
$
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
'width' => $default_width,
|
127 |
-
'height' => $default_height,
|
128 |
-
'language' => 'en',
|
129 |
-
'provider' => $default_provider,
|
130 |
-
'download' => $default_download
|
131 |
-
), $atts ) );
|
132 |
-
if($url):
|
133 |
-
$filedata = wp_remote_head( $url );
|
134 |
-
if(isset($filedata['headers']['content-length'])){
|
135 |
-
if($provider == 'microsoft'){
|
136 |
-
$micromime = microsoft_mimes();
|
137 |
-
if(!in_array($filedata['headers']['content-type'], $micromime)){
|
138 |
-
$provider = 'google';
|
139 |
-
}
|
140 |
-
}
|
141 |
-
$url = esc_url( $url, array( 'http', 'https' ));
|
142 |
-
switch ($provider) {
|
143 |
-
case 'google':
|
144 |
-
$embedsrc = '//docs.google.com/viewer?url=%1$s&embedded=true&hl=%2$s';
|
145 |
-
$iframe = sprintf( $embedsrc,
|
146 |
-
urlencode( $url ),
|
147 |
-
esc_attr( $language )
|
148 |
-
);
|
149 |
-
break;
|
150 |
-
case 'microsoft':
|
151 |
-
$embedsrc ='//view.officeapps.live.com/op/embed.aspx?src=%1$s';
|
152 |
-
$iframe = sprintf( $embedsrc,
|
153 |
-
urlencode( $url )
|
154 |
-
);
|
155 |
-
break;
|
156 |
-
}
|
157 |
-
$style = 'style="width:%1$s; height:%2$s; border: none;"';
|
158 |
-
$stylelink = sprintf($style,
|
159 |
-
ead_sanitize_dims($width) ,
|
160 |
-
ead_sanitize_dims($height)
|
161 |
-
);
|
162 |
-
|
163 |
-
$iframe = '<iframe src="'.$iframe.'" '.$stylelink.'></iframe>';
|
164 |
-
$show = false;
|
165 |
-
if($download=='alluser'){
|
166 |
-
$show = true;
|
167 |
-
}elseif($download=='logged' AND is_user_logged_in()){
|
168 |
-
$show = true;
|
169 |
-
}
|
170 |
-
if($show){
|
171 |
-
$filesize ="";
|
172 |
-
$url = esc_url( $url, array( 'http', 'https' ));
|
173 |
-
if(isset($filedata['headers']['content-length']))
|
174 |
-
$filesize = ead_human_filesize($filedata['headers']['content-length']);
|
175 |
-
$durl = '<p class="embed_download"><a href="'.$url.'" download >'.__('Download','ead'). ' ['.$filesize.']</a></p>';
|
176 |
-
}
|
177 |
-
|
178 |
-
$embed = $iframe.$durl;
|
179 |
-
}else{
|
180 |
-
$embed = __('File Not Found','ead');
|
181 |
}
|
182 |
-
|
183 |
-
$embed = __('No Url Found','ead');
|
184 |
-
endif;
|
185 |
-
return $embed;
|
186 |
}
|
187 |
/**
|
188 |
* Get Email node
|
@@ -190,77 +137,117 @@ function ead_getprovider($atts){
|
|
190 |
* @since 1.0
|
191 |
* @return string email html
|
192 |
*/
|
193 |
-
function ead_getemailnode($emaildata
|
194 |
$emailhtml = "";
|
195 |
foreach ($emaildata as $key => $label) {
|
196 |
-
|
197 |
-
|
198 |
-
<td colspan="2"><font style="font-family:sans-serif;font-size:12px"><strong>'
|
199 |
</tr>
|
200 |
<tr bgcolor="#FFFFFF">
|
201 |
<td width="20"> </td>
|
202 |
-
<td><font style="font-family:sans-serif;font-size:12px">'
|
203 |
</tr>';
|
|
|
204 |
}
|
205 |
-
|
206 |
-
return $emailhtml;
|
207 |
}
|
|
|
208 |
/**
|
209 |
* Validate Source mime type
|
210 |
*
|
211 |
* @since 1.0
|
212 |
-
* @return boolean
|
213 |
*/
|
214 |
-
function ead_validmimeTypes(){
|
215 |
-
include('mime_types.php');
|
216 |
return $mimetypes;
|
217 |
}
|
|
|
218 |
/**
|
219 |
* Checks Url Validity
|
220 |
*
|
221 |
* @since 1.0
|
222 |
-
* @return boolean
|
223 |
*/
|
224 |
-
function ead_validType(
|
225 |
-
$doctypes=ead_validmimeTypes();
|
226 |
-
if (
|
227 |
-
$allowed_ext = implode(
|
228 |
-
if (
|
229 |
return true;
|
230 |
}
|
231 |
} else {
|
232 |
return false;
|
233 |
}
|
234 |
}
|
|
|
235 |
/**
|
236 |
* Get allowed Mime Types
|
237 |
*
|
238 |
* @since 1.0
|
239 |
-
* @return
|
240 |
*/
|
241 |
-
function ead_validembedtypes(){
|
242 |
-
$doctypes=ead_validmimeTypes();
|
243 |
-
return $allowedtype = implode(','
|
|
|
244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
|
|
246 |
/**
|
247 |
* Get allowed Mime Types for microsoft
|
248 |
*
|
249 |
* @since 1.0
|
250 |
-
* @return array Mimetypes
|
251 |
*/
|
252 |
-
function
|
253 |
-
$micro_mime=array(
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
return $micro_mime;
|
265 |
}
|
266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Dropdown Builder
|
5 |
*
|
6 |
* @since 1.0
|
7 |
* @return String select html
|
8 |
*/
|
9 |
+
function ead_selectbuilder($name, $options, $selected = "", $class = "") {
|
10 |
+
if (is_array($options)):
|
11 |
+
echo "<select name=\"$name\" id=\"$name\" class=\"$class\">";
|
12 |
+
foreach ($options as $key => $option) {
|
13 |
+
echo "<option value=\"$key\"";
|
14 |
+
if (!empty($helptext)) {
|
15 |
+
echo " title=\"$helptext\"";
|
16 |
+
}
|
17 |
+
if ($key == $selected) {
|
18 |
+
echo ' selected="selected"';
|
19 |
+
}
|
20 |
+
echo ">$option</option>\n";
|
21 |
}
|
22 |
+
echo '</select>';
|
|
|
|
|
23 |
else:
|
|
|
24 |
endif;
|
25 |
}
|
26 |
+
|
27 |
/**
|
28 |
* Human Readable filesize
|
29 |
*
|
32 |
* @note Replaces old gde_sanitizeOpts function
|
33 |
*/
|
34 |
function ead_human_filesize($bytes, $decimals = 2) {
|
35 |
+
$size = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
|
36 |
$factor = floor((strlen($bytes) - 1) / 3);
|
37 |
return sprintf("%.{$decimals}f ", $bytes / pow(1024, $factor)) . @$size[$factor];
|
38 |
}
|
44 |
* @return string Sanitized dimensions, or false if value is invalid
|
45 |
* @note Replaces old gde_sanitizeOpts function
|
46 |
*/
|
47 |
+
function ead_sanitize_dims($dim) {
|
48 |
+
|
49 |
// remove any spacing junk
|
50 |
+
$dim = trim(str_replace(" ", "", $dim));
|
51 |
|
52 |
+
if (!strstr($dim, '%')) {
|
53 |
$type = "px";
|
54 |
+
$dim = preg_replace("/[^0-9]*/", '', $dim);
|
55 |
} else {
|
56 |
$type = "%";
|
57 |
+
$dim = preg_replace("/[^0-9]*/", '', $dim);
|
58 |
+
if ((int)$dim > 100) {
|
59 |
$dim = "100";
|
60 |
}
|
61 |
}
|
62 |
|
63 |
+
if ($dim) {
|
64 |
+
return $dim . $type;
|
65 |
} else {
|
66 |
return false;
|
67 |
}
|
68 |
}
|
69 |
+
|
70 |
/**
|
71 |
* Validate File url
|
72 |
*
|
73 |
* @since 1.0
|
74 |
+
* @return string Download link
|
75 |
*/
|
76 |
+
function ead_validateurl($url) {
|
77 |
+
$types = ead_validmimeTypes();
|
78 |
+
$url = esc_url($url, array('http', 'https'));
|
79 |
+
$remote = wp_remote_head($url);
|
80 |
+
$json['status'] = false;
|
81 |
+
$json['message'] = '';
|
82 |
+
if (wp_remote_retrieve_response_code($remote) == 200) {
|
83 |
+
|
84 |
+
//Gzip Support
|
85 |
+
$filename = pathinfo($url);
|
86 |
+
$doctypes = ead_validmimeTypes();
|
87 |
+
if (ead_validType($url, $doctypes)) {
|
88 |
+
$json['status'] = true;
|
89 |
+
$json['message'] = __("Done", 'embed-any-document');
|
90 |
+
$json['file']['url'] = $url;
|
91 |
+
if (isset($filename)) {
|
92 |
+
$json['file']['filename'] = $filename['basename'];
|
93 |
+
} else {
|
94 |
+
$json['file']['filename'] = __("Document", 'embed-any-document');
|
95 |
+
}
|
96 |
+
if (!is_wp_error($filedata) && isset($filedata['headers']['content-length'])) {
|
97 |
+
$json['file']['filesizeHumanReadable'] = ead_human_filesize($remote['headers']['content-length']);
|
|
|
98 |
} else {
|
99 |
+
$json['file']['filesizeHumanReadable'] = 0;
|
|
|
100 |
}
|
101 |
+
} else {
|
102 |
+
$json['message'] = __("File format is not supported.", 'embed-any-document');
|
103 |
+
$json['status'] = false;
|
104 |
+
}
|
105 |
+
} elseif (is_wp_error($remote)) {
|
106 |
+
$json['message'] = $remote->get_error_message();
|
107 |
+
$json['status'] = false;
|
108 |
+
} else {
|
109 |
+
$json['message'] = __('Sorry, the file URL is not valid.', 'embed-any-document');
|
110 |
+
$json['status'] = false;
|
111 |
}
|
112 |
+
return $json;
|
113 |
}
|
114 |
+
|
115 |
/**
|
116 |
+
* Validate google url
|
117 |
*
|
118 |
* @since 1.0
|
119 |
+
* @return string Download link
|
120 |
*/
|
121 |
+
function ead_ValidateDriveUrl($url) {
|
122 |
+
$remote = wp_remote_head($url);
|
123 |
+
$json['status'] = false;
|
124 |
+
$json['message'] = '';
|
125 |
+
if (wp_remote_retrieve_response_code($remote) == 200) {
|
126 |
+
$json['message'] = __("Done", 'embed-any-document');
|
127 |
+
$json['status'] = true;
|
128 |
+
} else {
|
129 |
+
$json['message'] = __('The document you have chosen is a not public.', 'embed-any-document') . __(' Only the owner and explicitly shared collaborators will be able to view it.', 'embed-any-document');
|
130 |
+
$json['status'] = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
+
return $json;
|
|
|
|
|
|
|
133 |
}
|
134 |
/**
|
135 |
* Get Email node
|
137 |
* @since 1.0
|
138 |
* @return string email html
|
139 |
*/
|
140 |
+
function ead_getemailnode($emaildata, $postdata) {
|
141 |
$emailhtml = "";
|
142 |
foreach ($emaildata as $key => $label) {
|
143 |
+
if ($postdata[$key]) {
|
144 |
+
$emailhtml.= '<tr bgcolor="#EAF2FA">
|
145 |
+
<td colspan="2"><font style="font-family:sans-serif;font-size:12px"><strong>' . $label . '</strong></font></td>
|
146 |
</tr>
|
147 |
<tr bgcolor="#FFFFFF">
|
148 |
<td width="20"> </td>
|
149 |
+
<td><font style="font-family:sans-serif;font-size:12px">' . $postdata[$key] . '</font></td>
|
150 |
</tr>';
|
151 |
+
}
|
152 |
}
|
153 |
+
return $emailhtml;
|
|
|
154 |
}
|
155 |
+
|
156 |
/**
|
157 |
* Validate Source mime type
|
158 |
*
|
159 |
* @since 1.0
|
160 |
+
* @return boolean
|
161 |
*/
|
162 |
+
function ead_validmimeTypes() {
|
163 |
+
include ('mime_types.php');
|
164 |
return $mimetypes;
|
165 |
}
|
166 |
+
|
167 |
/**
|
168 |
* Checks Url Validity
|
169 |
*
|
170 |
* @since 1.0
|
171 |
+
* @return boolean
|
172 |
*/
|
173 |
+
function ead_validType($url) {
|
174 |
+
$doctypes = ead_validmimeTypes();
|
175 |
+
if (is_array($doctypes)) {
|
176 |
+
$allowed_ext = implode("|", array_keys($doctypes));
|
177 |
+
if (preg_match("/\.($allowed_ext)$/i", $url)) {
|
178 |
return true;
|
179 |
}
|
180 |
} else {
|
181 |
return false;
|
182 |
}
|
183 |
}
|
184 |
+
|
185 |
/**
|
186 |
* Get allowed Mime Types
|
187 |
*
|
188 |
* @since 1.0
|
189 |
+
* @return string Mimetypes
|
190 |
*/
|
191 |
+
function ead_validembedtypes() {
|
192 |
+
$doctypes = ead_validmimeTypes();
|
193 |
+
return $allowedtype = implode(',', $doctypes);
|
194 |
+
}
|
195 |
|
196 |
+
/**
|
197 |
+
* Get allowed Extensions
|
198 |
+
*
|
199 |
+
* @since 1.0
|
200 |
+
* @return string Extenstion
|
201 |
+
*/
|
202 |
+
function ead_validextensions($list = 'all') {
|
203 |
+
include ('mime_types.php');
|
204 |
+
return $allowedtype = implode(',', $extensions[$list]);
|
205 |
}
|
206 |
+
|
207 |
/**
|
208 |
* Get allowed Mime Types for microsoft
|
209 |
*
|
210 |
* @since 1.0
|
211 |
+
* @return array Mimetypes
|
212 |
*/
|
213 |
+
function ead_microsoft_mimes() {
|
214 |
+
$micro_mime = array(
|
215 |
+
'doc' => 'application/msword',
|
216 |
+
'pot|pps|ppt' => 'application/vnd.ms-powerpoint',
|
217 |
+
'xla|xls|xlt|xlw' => 'application/vnd.ms-excel',
|
218 |
+
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
219 |
+
'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
220 |
+
'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
|
221 |
+
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
222 |
+
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
|
223 |
+
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
|
224 |
+
);
|
225 |
+
return $micro_mime;
|
226 |
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Check Allow Download
|
230 |
+
*
|
231 |
+
* @since 1.0
|
232 |
+
* @return Boolean
|
233 |
+
*/
|
234 |
+
function ead_allowdownload($provider) {
|
235 |
+
$blacklist = array('drive', 'box');
|
236 |
+
if (in_array($provider, $blacklist)) {
|
237 |
+
return false;
|
238 |
+
} else {
|
239 |
+
return true;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Get Active Menu Class
|
245 |
+
*
|
246 |
+
* @since 1.0
|
247 |
+
* @return string Class name
|
248 |
+
*/
|
249 |
+
function ead_getactiveMenu($tab, $needle) {
|
250 |
+
if ($tab == $needle) {
|
251 |
+
echo 'nav-tab-active';
|
252 |
+
}
|
253 |
+
}
|
inc/mime_types.php
CHANGED
@@ -24,5 +24,7 @@
|
|
24 |
'pages' => 'application/vnd.apple.pages',
|
25 |
//Additional Mime Types
|
26 |
'svg' => 'image/svg+xml',
|
27 |
-
);
|
28 |
-
|
|
|
|
24 |
'pages' => 'application/vnd.apple.pages',
|
25 |
//Additional Mime Types
|
26 |
'svg' => 'image/svg+xml',
|
27 |
+
);
|
28 |
+
$extensions['all'] = array('.css','.js','.pdf','.ai','.tif','.tiff','.doc','.txt','.asc','.c','.cc','.h','.pot','.pps','.ppt','.xla','.xls','.xlt','.xlw','.docx','.dotx','.dotm','.xlsx','.xlsm','.pptx','.pages','.svg');
|
29 |
+
$extensions['ms'] = array('.doc','.pot','.pps','.ppt','.xla','.xls','.xlt','.xlw','.docx','.dotx','.dotm','.xlsx','.xlsm','.pptx');
|
30 |
+
?>
|
inc/popup.php
CHANGED
@@ -1,27 +1,28 @@
|
|
1 |
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
<div id="embed-popup-wrap">
|
3 |
<div id="embed-popup">
|
4 |
-
<button title="Close
|
5 |
-
<div id="popup-header">
|
6 |
-
<h1><?php _e('Add Document'
|
7 |
</div>
|
8 |
-
<div class="section">
|
9 |
<div id="embed_message" class="awsm-error" style="display:none;"><p></p></div>
|
10 |
<div class="ead_container">
|
11 |
-
<ul class="tabs">
|
12 |
-
<li class="current"><?php _e('Upload and Embed','ead');?></li>
|
13 |
-
<li><?php _e('Add From URL','ead');?></li>
|
14 |
-
</ul>
|
15 |
<form action="" onSubmit="return false" method="post" enctype="multipart/form-data" id="Docuploader">
|
16 |
-
<
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
23 |
<input type="button" value="Add URL" class="ead-btn button-primary input-group-btn" id="add_url"/>
|
24 |
-
|
|
|
|
|
25 |
</form>
|
26 |
</div><!--ead_container-->
|
27 |
<div class="upload-success">
|
@@ -30,43 +31,56 @@
|
|
30 |
<p id="ead_filename"></p>
|
31 |
<span id="ead_filesize"></span>
|
32 |
</div>
|
33 |
-
<a class="ead-btn button" id="adv_options"><?php _e('Advanced Options','ead');?></a>
|
34 |
<div class="clear"></div>
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
</ul>
|
57 |
</div>
|
58 |
-
|
59 |
-
|
60 |
-
<div class="mceActionPanel">
|
61 |
<div style="float: right">
|
62 |
-
<input type="button" id="insert_doc" name="insert" class="ead-btn button button-primary button-medium" value="<?php _e('Insert',
|
63 |
</div>
|
64 |
|
65 |
<div style="float: left">
|
66 |
-
<input type="button" name="cancel" class="ead-btn button cancel_embed button-medium" value="<?php _e('Cancel',
|
67 |
</div>
|
68 |
<div class="clear"></div>
|
69 |
</div>
|
70 |
-
|
71 |
</div>
|
72 |
-
</div>
|
1 |
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
<div id="embed-popup-wrap">
|
3 |
<div id="embed-popup">
|
4 |
+
<button title="Close" type="button" class="mfp-close">×</button>
|
5 |
+
<div id="popup-header" class="ead-popup-header">
|
6 |
+
<h1><?php _e('Add Document',$this->text_domain);?></h1>
|
7 |
</div>
|
8 |
+
<div class="ead-section">
|
9 |
<div id="embed_message" class="awsm-error" style="display:none;"><p></p></div>
|
10 |
<div class="ead_container">
|
|
|
|
|
|
|
|
|
11 |
<form action="" onSubmit="return false" method="post" enctype="multipart/form-data" id="Docuploader">
|
12 |
+
<ul class="ead-options">
|
13 |
+
<li><a href="#" id="upload_doc"><span><img src="<?php echo $this->plugin_url;?>images/icon-upload.png" alt="Upload document" /><?php _e('Upload Document',$this->text_domain);?></span></a></li>
|
14 |
+
<li><a href="#" id="addDocUrl"><span><img src="<?php echo $this->plugin_url;?>images/icon-link.png" alt="Add From URL" /><?php _e('Add from URL',$this->text_domain);?></span></a></li>
|
15 |
+
<li><?php echo $this->providerlink('ead_dropbox','DropBoxUpload','Dropbox') ;?></li>
|
16 |
+
<li><?php echo $this->providerlink(array('ead_drivekey','ead_driveClient'),'GooglePicker','Drive') ;?></li>
|
17 |
+
<li><?php echo $this->providerlink('ead_box','boxPicker','Box') ;?></li>
|
18 |
+
</ul>
|
19 |
+
<div class="box addurl_box">
|
20 |
+
<label for="awsm_url"><?php _e('Enter document URL',$this->text_domain);?></label>
|
21 |
+
<input name="awsm_url" type="text" class="opt dwl input-group-text" placeholder="Eg: http://www.yoursite.com/file.pdf" id="awsm_url"/>
|
22 |
<input type="button" value="Add URL" class="ead-btn button-primary input-group-btn" id="add_url"/>
|
23 |
+
<div class="clear"></div>
|
24 |
+
<a href="#" class="go-back">← back</a>
|
25 |
+
</div>
|
26 |
</form>
|
27 |
</div><!--ead_container-->
|
28 |
<div class="upload-success">
|
31 |
<p id="ead_filename"></p>
|
32 |
<span id="ead_filesize"></span>
|
33 |
</div>
|
|
|
34 |
<div class="clear"></div>
|
35 |
+
</div>
|
36 |
+
<div class="advanced_options">
|
37 |
+
<h3><?php _e('Advanced Options',$this->text_domain);?></span></h3>
|
38 |
+
<ul class="option-fields">
|
39 |
+
<li>
|
40 |
+
<div class="f-left"><label>Width</label> <input type="text" name="width" class="embedval input-small" id="ead_width" value="<?php echo get_option('ead_width', '100%' );?>"></div>
|
41 |
+
<div class="f-left"><label>Height</label> <input type="text" name="height" class="embedval input-small" id="ead_height" value="<?php echo get_option('ead_height', '500px' );?>"></div>
|
42 |
+
<div class="f-left" id="ead_downloadc">
|
43 |
+
<label><?php _e('Show Download Link',$this->text_domain);?></label>
|
44 |
+
<?php
|
45 |
+
$downoptions= array('all' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('No Download',$this->text_domain));
|
46 |
+
ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download')),'ead_usc');
|
47 |
+
?>
|
48 |
+
</div>
|
49 |
+
<div class="f-left last" id="new_provider">
|
50 |
+
<label><?php _e('Viewer',$this->text_domain);?></label>
|
51 |
+
<?php
|
52 |
+
$providers = array('google' => __('Google Docs Viewer',$this->text_domain),'microsoft' => __('Microsoft Office Online',$this->text_domain));
|
53 |
+
ead_selectbuilder('ead_provider', $providers,esc_attr( get_option('ead_provider','google')),'ead_usc');
|
54 |
+
?>
|
55 |
+
</div>
|
56 |
+
<div class="f-left last" id="ead_pseudo" style="display:none">
|
57 |
+
<label><?php _e('Viewer',$this->text_domain);?></label>
|
58 |
+
<select name="ead_pseudo" disabled>
|
59 |
+
<option value="box">Box</option>
|
60 |
+
<option value="drive">Drive</option>
|
61 |
+
</select>
|
62 |
+
</div>
|
63 |
+
<div class="clear"></div>
|
64 |
+
</li>
|
65 |
|
66 |
+
<li>
|
67 |
+
<label><?php _e('Shortcode Preview',$this->text_domain); ?></label>
|
68 |
+
<textarea name="shortcode" style="width:100%" id="shortcode" readonly="readonly"></textarea>
|
69 |
+
</li>
|
70 |
</ul>
|
71 |
</div>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
<div class="mceActionPanel ead-action-panel">
|
75 |
<div style="float: right">
|
76 |
+
<input type="button" id="insert_doc" name="insert" data-txt="<?php _e('Insert', $this->text_domain); ?>" data-loading="<?php _e('Loading...', $this->text_domain); ?>" class="ead-btn button button-primary button-medium" value="<?php _e('Insert', $this->text_domain); ?>" disabled/>
|
77 |
</div>
|
78 |
|
79 |
<div style="float: left">
|
80 |
+
<input type="button" name="cancel" class="ead-btn button cancel_embed button-medium" value="<?php _e('Cancel', $this->text_domain); ?>" />
|
81 |
</div>
|
82 |
<div class="clear"></div>
|
83 |
</div>
|
84 |
+
|
85 |
</div>
|
86 |
+
</div>
|
inc/settings.php
CHANGED
@@ -1,52 +1,13 @@
|
|
1 |
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
<div class="wrap">
|
3 |
<h2 class="ead-title"><?php _e('Embed Any Document by AWSM.in',$this->text_domain);?></h2>
|
4 |
-
<h2 class="nav-tab-wrapper">
|
5 |
-
<a class="nav-tab nav-tab-active" href="#" data-tab="general"><?php _e( 'General Settings', $this->text_domain); ?></a>
|
6 |
-
<a class="nav-tab " href="#" data-tab="support"><?php _e( 'Support', $this->text_domain); ?></a>
|
7 |
-
</h2>
|
8 |
<div class="ead-left-wrap">
|
9 |
|
10 |
<div class="tabs visible" id="general">
|
|
|
11 |
<form method="post" action="options.php">
|
12 |
<?php settings_fields( 'ead-settings-group' ); ?>
|
13 |
<table class="form-table">
|
14 |
-
<tr valign="top">
|
15 |
-
<th scope="row"><?php _e('Embed Using',$this->text_domain);?></th>
|
16 |
-
<td>
|
17 |
-
<?php
|
18 |
-
$providers= array('google' => __('Google Docs Viewer',$this->text_domain),'microsoft' => __('Microsoft Office Online',$this->text_domain));
|
19 |
-
ead_selectbuilder('ead_provider', $providers,esc_attr( get_option('ead_provider','google')));
|
20 |
-
?>
|
21 |
-
<div class="ead_supported">
|
22 |
-
<span><?php _e('Supported file formats',$this->text_domain);?></span>
|
23 |
-
<div class="supportedlist hidden" id="ead_google">
|
24 |
-
<ul>
|
25 |
-
<li><span class="ead-check"></span>Microsoft Word (docx, docm, dotm, dotx)</li>
|
26 |
-
<li><span class="ead-check"></span>Microsoft Excel (xlsx, xlsb, xls, xlsm)</li>
|
27 |
-
<li><span class="ead-check"></span>Microsoft PowerPoint (pptx, ppsx, ppt, pps, pptm, potm, ppam, potx, ppsm)</li>
|
28 |
-
<li><span class="ead-check"></span>Adobe Portable Document Format (pdf)</li>
|
29 |
-
<li><span class="ead-check"></span>Text files (txt)</li>
|
30 |
-
<li><span class="ead-check"></span>TIFF Images (tif, tiff)</li>
|
31 |
-
<li><span class="ead-check"></span>Adobe Illustrator (ai)</li>
|
32 |
-
<li><span class="ead-check"></span>Scalable Vector Graphics (svg)</li>
|
33 |
-
</ul>
|
34 |
-
</div>
|
35 |
-
<div class="supportedlist hidden" id="ead_microsoft">
|
36 |
-
<ul>
|
37 |
-
<li><span class="ead-check"></span>Microsoft Word (docx, docm, dotm, dotx)</li>
|
38 |
-
<li><span class="ead-check"></span>Microsoft Excel (xlsx, xlsb, xls, xlsm)</li>
|
39 |
-
<li><span class="ead-check"></span>Microsoft PowerPoint (pptx, ppsx, ppt, pps, pptm, potm, ppam, potx, ppsm)</li>
|
40 |
-
<li><span class="ead-close"></span>Adobe Portable Document Format (pdf)</li>
|
41 |
-
<li><span class="ead-close"></span>Text files (txt)</li>
|
42 |
-
<li><span class="ead-close"></span>TIFF Images (tif, tiff)</li>
|
43 |
-
<li><span class="ead-close"></span>Adobe Illustrator (ai)</li>
|
44 |
-
<li><span class="ead-close"></span>Scalable Vector Graphics (svg)</li>
|
45 |
-
</ul>
|
46 |
-
</div>
|
47 |
-
</div>
|
48 |
-
</td>
|
49 |
-
</tr>
|
50 |
<tr valign="top">
|
51 |
<th scope="row"><?php _e('Default Size', $this->text_domain); ?></th>
|
52 |
<td>
|
@@ -65,129 +26,52 @@
|
|
65 |
<th scope="row"><?php _e('Show Download Link',$this->text_domain);?></th>
|
66 |
<td>
|
67 |
<?php
|
68 |
-
$downoptions= array('alluser' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('
|
69 |
ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download','none')));
|
70 |
?>
|
71 |
</td>
|
72 |
</tr>
|
73 |
</table>
|
|
|
74 |
<?php submit_button(); ?>
|
|
|
75 |
</form>
|
76 |
</div><!-- #general-->
|
77 |
-
<div class="
|
78 |
-
<
|
79 |
-
|
80 |
-
<?php $current_user = wp_get_current_user(); ?>
|
81 |
-
<form id="supportform" action="">
|
82 |
-
<p>
|
83 |
-
<label><?php _e('Name', $this->text_domain); ?><span class="required">*</span></label>
|
84 |
-
<input type="text" name="site_name" value="<?php echo $current_user->display_name; ?>" class="text-input" />
|
85 |
-
</p>
|
86 |
-
<p>
|
87 |
-
<label><?php _e('Email ID', $this->text_domain); ?><span class="required">*</span></label>
|
88 |
-
<input type="email" name="email_id" value="<?php echo $current_user->user_email; ?>" class="text-input"/>
|
89 |
-
</p>
|
90 |
-
<p>
|
91 |
-
<label><?php _e('Problem', $this->text_domain); ?><span class="required">*</span></label>
|
92 |
-
<textarea name="problem"></textarea>
|
93 |
-
</p>
|
94 |
-
<p class="submit">
|
95 |
-
<input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Submit', $this->text_domain); ?>">
|
96 |
-
</p>
|
97 |
-
</form>
|
98 |
-
</div>
|
99 |
-
<div class="col-right">
|
100 |
-
<p><strong>Frequently Reported Issues</strong></p>
|
101 |
-
<p>
|
102 |
-
<strong>1. File not found error in my localhost site.</strong><br/>
|
103 |
-
The viewers (Google Docs Viewer and Microsoft Office Online) do not support locally hosted files. <span style="border-bottom: 1px solid;">Your document has to be available online for the viewers to access.</span>
|
104 |
-
</p>
|
105 |
-
<p>
|
106 |
-
<strong>2. Google Docs Viewer shows bandwidth exceeded error.</strong><br/>
|
107 |
-
The issue is caused by Google Docs Viewer, not the plugin. Google Docs Viewer is a standalone documents viewer which doesn't limit bandwidth. When the problem occurs, usually reloading the page will result in the document loading properly. So it looks more like a bug from their side. Many developers reported the same issue in Google Developer Forums. Hope it will be fixed soon.
|
108 |
-
</p>
|
109 |
-
</div>
|
110 |
-
<div class="clear"></div>
|
111 |
-
</div><!-- #support-->
|
112 |
</div><!-- .ead-left-wrap -->
|
113 |
<div class="ead-right-wrap">
|
114 |
-
<
|
115 |
-
|
116 |
-
This plugin is developed <br/>by <a href="http://awsm.in" target="_blank" title="AWSM Innovations">AWSM Innovations.</a>
|
117 |
-
</div><!-- .author-info -->
|
118 |
<ul class="awsm-social">
|
119 |
<li><a href="https://www.facebook.com/awsminnovations" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-facebook">Facebook</span></a></li>
|
120 |
<li><a href="https://twitter.com/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-twitter">Twitter</span></a></li>
|
121 |
<li><a href="https://github.com/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-github">Github</span></a></li>
|
122 |
<li><a href="https://www.behance.net/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-behance">Behance</span></a></li>
|
123 |
</ul>
|
124 |
-
|
125 |
-
<
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
<
|
138 |
-
<
|
139 |
-
<
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
142 |
</div>
|
143 |
</div><!-- .ead-right-wrap -->
|
144 |
<div class="clear"></div>
|
145 |
-
</div><!-- .wrap -->
|
146 |
-
<script type="text/javascript">
|
147 |
-
jQuery(document).ready(function ($) {
|
148 |
-
|
149 |
-
jQuery( ".nav-tab" ).click(function(event) {
|
150 |
-
event.preventDefault();
|
151 |
-
$('.nav-tab').removeClass('nav-tab-active');
|
152 |
-
$(this).addClass('nav-tab-active');
|
153 |
-
var tab = '#'+ $(this).data('tab');
|
154 |
-
$(".tabs").hide();
|
155 |
-
$(tab).show();
|
156 |
-
});
|
157 |
-
$( "#supportform" ).submit(function( event ) {
|
158 |
-
event.preventDefault();
|
159 |
-
$.ajax({
|
160 |
-
type: "POST",
|
161 |
-
url:"<?php echo get_option('home')?>/wp-admin/admin-ajax.php",
|
162 |
-
dataType: 'json',
|
163 |
-
data: { action: 'supportform' , contact : $("#supportform").serialize()},
|
164 |
-
success: function(data)
|
165 |
-
{
|
166 |
-
supportmessage(data.status,data.message);
|
167 |
-
},
|
168 |
-
error: function(jqXHR, textStatus, errorThrown)
|
169 |
-
{
|
170 |
-
supportmessage(false,'Request failed');
|
171 |
-
}
|
172 |
-
});
|
173 |
-
});
|
174 |
-
function supportmessage(status,message){
|
175 |
-
if(status){
|
176 |
-
$('#embed_message').removeClass('awsm-error').addClass('awsm-updated');
|
177 |
-
$('#embed_message p').html(message);
|
178 |
-
} else{
|
179 |
-
$('#embed_message').removeClass('awsm-updated').addClass('awsm-error');
|
180 |
-
$('#embed_message p').html(message);
|
181 |
-
}
|
182 |
-
}
|
183 |
-
suppportedlist();
|
184 |
-
function suppportedlist(){
|
185 |
-
var provider = '#ead_'+$('#ead_provider').val();
|
186 |
-
$('.supportedlist').hide();
|
187 |
-
$(provider).show();
|
188 |
-
}
|
189 |
-
$('#ead_provider').live('change', function(e) {
|
190 |
-
suppportedlist();
|
191 |
-
});
|
192 |
-
});
|
193 |
-
</script>
|
1 |
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
<div class="wrap">
|
3 |
<h2 class="ead-title"><?php _e('Embed Any Document by AWSM.in',$this->text_domain);?></h2>
|
|
|
|
|
|
|
|
|
4 |
<div class="ead-left-wrap">
|
5 |
|
6 |
<div class="tabs visible" id="general">
|
7 |
+
<h3>General Settings</h3>
|
8 |
<form method="post" action="options.php">
|
9 |
<?php settings_fields( 'ead-settings-group' ); ?>
|
10 |
<table class="form-table">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
<tr valign="top">
|
12 |
<th scope="row"><?php _e('Default Size', $this->text_domain); ?></th>
|
13 |
<td>
|
26 |
<th scope="row"><?php _e('Show Download Link',$this->text_domain);?></th>
|
27 |
<td>
|
28 |
<?php
|
29 |
+
$downoptions= array('alluser' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('No Download',$this->text_domain));
|
30 |
ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download','none')));
|
31 |
?>
|
32 |
</td>
|
33 |
</tr>
|
34 |
</table>
|
35 |
+
<div class="ead-form-footer">
|
36 |
<?php submit_button(); ?>
|
37 |
+
</div>
|
38 |
</form>
|
39 |
</div><!-- #general-->
|
40 |
+
<div class="ead-banner">
|
41 |
+
<a href="http://goo.gl/wJTQlc" target="_blank"><img src="<?php echo $this->plugin_url;?>images/eadplus-banner.png"></a>
|
42 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
</div><!-- .ead-left-wrap -->
|
44 |
<div class="ead-right-wrap">
|
45 |
+
<div class="ead-right-inner">
|
46 |
+
<a href="http://awsm.in" target="_blank" title="AWSM Innovations"><img src="http://awsm.in/innovations/ead/logo2.jpg" alt="AWSM!"></a>
|
|
|
|
|
47 |
<ul class="awsm-social">
|
48 |
<li><a href="https://www.facebook.com/awsminnovations" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-facebook">Facebook</span></a></li>
|
49 |
<li><a href="https://twitter.com/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-twitter">Twitter</span></a></li>
|
50 |
<li><a href="https://github.com/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-github">Github</span></a></li>
|
51 |
<li><a href="https://www.behance.net/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-behance">Behance</span></a></li>
|
52 |
</ul>
|
53 |
+
</div>
|
54 |
+
<div class="clearfix row-col">
|
55 |
+
<div class="col-2">
|
56 |
+
<a href="https://wordpress.org/support/view/plugin-reviews/embed-any-document#postform" target="_blank">
|
57 |
+
<img src="<?php echo $this->plugin_url;?>images/star.gif"><?php _e('Like the plugin?', $this->text_domain);?><br/><?php _e('Rate Now!', $this->text_domain);?>
|
58 |
+
</a>
|
59 |
+
</div>
|
60 |
+
<div class="col-2">
|
61 |
+
<a href="http://awsm.in/support" target="_blank">
|
62 |
+
<img src="<?php echo $this->plugin_url;?>images/ticket.gif"><?php _e('Need Help?', $this->text_domain);?><br/><?php _e('Open a Ticket', $this->text_domain);?>
|
63 |
+
</a>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<div class="ead-right-inner">
|
67 |
+
<h3>More Links</h3>
|
68 |
+
<ol>
|
69 |
+
<li><a href="http://awsm.in/ead-plus-documentation/#embedding" target="_blank" title="How to Embed Documents?"><?php _e('How to Embed Documents?', $this->text_domain); ?></a></li>
|
70 |
+
<li><a href="http://awsm.in/ead-plus-documentation/#viewers" target="_blank" title="About Viewers"><?php _e('About Viewers', $this->text_domain); ?></a></li>
|
71 |
+
<li><a href="http://awsm.in/ead-plus-documentation/#shortcode" target="_blank" title="Shortcode & Attributes"><?php _e('Shortcode & Attributes', $this->text_domain); ?></a></li>
|
72 |
+
<li><a href="http://awsm.in/support" target="_blank" title="FAQs"><?php _e('FAQs', $this->text_domain); ?></a></li>
|
73 |
+
</ol>
|
74 |
</div>
|
75 |
</div><!-- .ead-right-wrap -->
|
76 |
<div class="clear"></div>
|
77 |
+
</div><!-- .wrap -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/support-mail.php
CHANGED
@@ -23,7 +23,7 @@ if ( 'POST' == $_SERVER['REQUEST_METHOD']) {
|
|
23 |
</table>';
|
24 |
add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
|
25 |
$tomail='hello@awsm.in';
|
26 |
-
$subject = "[EAD] Support Request From ". get_option('blogname');
|
27 |
$headers = "Reply-To: <" . $email_id . ">\n";
|
28 |
if (wp_mail( $tomail, $subject, $mailmessage, $headers )) {
|
29 |
$json['status'] = true;
|
23 |
</table>';
|
24 |
add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
|
25 |
$tomail='hello@awsm.in';
|
26 |
+
$subject = "[EAD-free] Support Request From ". get_option('blogname');
|
27 |
$headers = "Reply-To: <" . $email_id . ">\n";
|
28 |
if (wp_mail( $tomail, $subject, $mailmessage, $headers )) {
|
29 |
$json['status'] = true;
|
js/embed.js
CHANGED
@@ -1,174 +1,283 @@
|
|
1 |
-
jQuery(document).ready(function
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
12 |
ead_reset();
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
},
|
28 |
-
close: function () {
|
29 |
-
// Remove narrow class
|
30 |
-
$popup.removeClass('generator-narrow');
|
31 |
-
// Clear selection
|
32 |
-
mce_selection = '';
|
33 |
-
// Change z-index
|
34 |
-
$('body').removeClass('mfp-shown');
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}).magnificPopup('open');
|
38 |
-
});
|
39 |
-
//Update shortcode on change
|
40 |
-
$( ".embed_download" ).change(function() {
|
41 |
-
updateshortcode();
|
42 |
-
});
|
43 |
-
$('.embedval').blur(function(){
|
44 |
-
updateshortcode();
|
45 |
-
});
|
46 |
-
|
47 |
-
//Tabs Support
|
48 |
-
$('ul.tabs').delegate('li:not(.current)', 'click', function () {
|
49 |
-
$(this).addClass('current').siblings().removeClass('current')
|
50 |
-
.parents('div.section').find('div.box').eq($(this).index()).fadeIn(150).siblings('div.box').hide();
|
51 |
});
|
52 |
-
|
53 |
-
//Toggle advanced options
|
54 |
-
$("#adv_options").click(function(){
|
55 |
-
$(".advanced_options").toggle();
|
56 |
-
});
|
57 |
//Wordpress Uploader
|
58 |
$('#upload_doc').click(open_media_window);
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
//Print uploaded file details
|
93 |
-
function uploaddetails(file){
|
94 |
$('#insert_doc').removeAttr('disabled');
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
|
|
|
|
98 |
$container.hide();
|
|
|
99 |
}
|
100 |
-
|
101 |
-
|
102 |
-
function awsm_embded_url(){
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
//Validate file url
|
113 |
-
function validateurl(url){
|
|
|
114 |
$('#embed_message').hide();
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
uploaddetails(data.file);
|
128 |
-
}else{
|
129 |
-
showmsg(data.message);
|
130 |
-
}
|
131 |
-
$('#add_url').val(emebeder.addurl);
|
132 |
-
},
|
133 |
-
});
|
134 |
}
|
135 |
//Show Message
|
136 |
-
function showmsg(msg){
|
137 |
$('#embed_message').fadeIn();
|
138 |
-
|
139 |
}
|
140 |
-
|
141 |
-
|
142 |
-
function awsm_shortcode(){
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
}
|
|
|
151 |
//Update ShortCode
|
152 |
-
function updateshortcode(){
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
$container.show();
|
168 |
$embedurl.val('');
|
|
|
|
|
169 |
$('.upload-success').hide();
|
170 |
-
$(".advanced_options").hide();
|
171 |
$('#embed_message').hide();
|
172 |
-
$('#insert_doc').attr('disabled','disabled');
|
|
|
|
|
|
|
|
|
|
|
173 |
}
|
174 |
});
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
var $embedurl = $('#awsm_url'),
|
3 |
+
$shortcode = $('#shortcode'),
|
4 |
+
$message = $('#embed_message p'),
|
5 |
+
$ActionPanel = $('.mceActionPanel'),
|
6 |
+
$container = $('.ead_container'),
|
7 |
+
fileurl = "",
|
8 |
+
newprovider = "",
|
9 |
+
frame,
|
10 |
+
msextension = emebeder.msextension,
|
11 |
+
drextension = emebeder.drextension;
|
12 |
+
//Opens Embed popup
|
13 |
+
$('body').on('click', '.awsm-embed', function(e) {
|
14 |
ead_reset();
|
15 |
+
e.preventDefault();
|
16 |
+
$('body').addClass('ead-popup-on');
|
17 |
+
tb_show("Embed Any Document", "#TB_inline?inlineId=embed-popup-wrap&width=1030&modal=true", null);
|
18 |
+
tb_position();
|
19 |
+
return;
|
20 |
+
});
|
21 |
+
|
22 |
+
//Update shortcode on change
|
23 |
+
$(".ead_usc").change(function() {
|
24 |
+
newprovider = "";
|
25 |
+
updateshortcode($(this).attr('id'));
|
26 |
+
});
|
27 |
+
$('.embedval').keyup(function() {
|
28 |
+
updateshortcode($(this).attr('id'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
});
|
|
|
|
|
|
|
|
|
|
|
30 |
//Wordpress Uploader
|
31 |
$('#upload_doc').click(open_media_window);
|
32 |
|
33 |
+
//Add url
|
34 |
+
$('#add_url').click(awsm_embded_url);
|
35 |
+
|
36 |
+
//insert Shortcode
|
37 |
+
$('#insert_doc').click(awsm_shortcode);
|
38 |
+
// Add from URL support
|
39 |
+
$('#addDocUrl').on('click', function(e) {
|
40 |
+
e.preventDefault();
|
41 |
+
$('.addurl_box').fadeIn();
|
42 |
+
$('.ead-options').hide();
|
43 |
+
});
|
44 |
+
//Add fromrom URL cancel handler
|
45 |
+
$('.go-back').on('click', function(e) {
|
46 |
+
e.preventDefault();
|
47 |
+
$('.addurl_box').hide();
|
48 |
+
$('.ead-options').fadeIn();
|
49 |
+
});
|
50 |
+
// Close embed dialog
|
51 |
+
$('#embed-popup').on('click', '.cancel_embed,.mfp-close', function(e) {
|
52 |
+
// Prevent default action
|
53 |
+
e.preventDefault();
|
54 |
+
remove_eadpop();
|
55 |
+
});
|
56 |
+
//Insert Media window
|
57 |
+
function open_media_window() {
|
58 |
+
var uClass = 'upload';
|
59 |
+
if (frame) {
|
60 |
+
frame.open();
|
61 |
+
return;
|
62 |
+
}
|
63 |
+
frame = wp.media({
|
64 |
+
title: 'Embed Any Document',
|
65 |
+
multiple: false,
|
66 |
+
library: {
|
67 |
+
type: emebeder.validtypes,
|
68 |
+
},
|
69 |
+
button: {
|
70 |
+
text: 'Insert'
|
71 |
+
}
|
72 |
+
});
|
73 |
+
frame.on('select', function() {
|
74 |
+
var file = frame.state().get('selection').first().toJSON();
|
75 |
+
updateprovider(file, uClass);
|
76 |
+
});
|
77 |
+
frame.open();
|
78 |
}
|
79 |
+
|
80 |
+
|
81 |
+
//update provider
|
82 |
+
function updateprovider(file, uClass) {
|
83 |
+
fileurl = file.url;
|
84 |
+
validViewer(file, uClass);
|
85 |
+
updateshortcode();
|
86 |
+
uploaddetails(file, uClass);
|
87 |
+
}
|
88 |
+
//sanitize width and height
|
89 |
+
function sanitize(dim) {
|
90 |
+
if (dim.indexOf("%") == -1) {
|
91 |
+
dim = dim.replace(/[^0-9]/g, '');
|
92 |
+
dim += "px";
|
93 |
+
} else {
|
94 |
+
dim = dim.replace(/[^0-9]/g, '');
|
95 |
+
dim += "%";
|
96 |
+
}
|
97 |
+
return dim;
|
98 |
+
}
|
99 |
+
//Thickbox Handler
|
100 |
+
function tb_position() {
|
101 |
+
var tbWindow = $('#TB_window');
|
102 |
+
var width = $(window).width();
|
103 |
+
var H = $(window).height();
|
104 |
+
var W = ( 1080 < width ) ? 1080 : width;
|
105 |
|
106 |
+
if ( tbWindow.size() ) {
|
107 |
+
tbWindow.width( W - 50 ).height( H - 45 );
|
108 |
+
//$('#TB_iframeContent').width( W - 50 ).height( H - 75 );
|
109 |
+
$('#TB_ajaxContent').css({'width':'100%','height':'100%','padding':'0'});
|
110 |
+
tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
|
111 |
+
if ( typeof document.body.style.maxWidth != 'undefined' )
|
112 |
+
tbWindow.css({'top':'20px','margin-top':'0'});
|
113 |
+
$('#TB_title').css({'background-color':'#fff','color':'#cfcfcf'});
|
114 |
+
};
|
115 |
+
};
|
116 |
+
$(window).resize( function() { tb_position() } );
|
117 |
+
//to getshortcode
|
118 |
+
function getshortcode(url, item) {
|
119 |
+
var height = sanitize($('#ead_height').val()),
|
120 |
+
width = sanitize($('#ead_width').val()),
|
121 |
+
download = $('#ead_download').val(),
|
122 |
+
provider = $('#ead_provider').val(),
|
123 |
+
heightstr = "",
|
124 |
+
widthstr = "",
|
125 |
+
downloadstr = "",
|
126 |
+
providerstr = "",
|
127 |
+
drivestr = "";
|
128 |
+
if (itemcheck('height', item)) {
|
129 |
+
heightstr = ' height="' + height + '"';
|
130 |
+
}
|
131 |
+
if (itemcheck('width', item)) {
|
132 |
+
widthstr = ' width="' + width + '"';
|
133 |
+
}
|
134 |
+
if (itemcheck('download', item)) {
|
135 |
+
downloadstr = ' download="' + download + '"';
|
136 |
+
}
|
137 |
+
if (itemcheck('provider', item)) {
|
138 |
+
providerstr = ' viewer="' + provider + '"';
|
139 |
+
}
|
140 |
+
return '[embeddoc url="' + url + '"' + widthstr + heightstr + downloadstr + providerstr + drivestr + ']';
|
141 |
+
}
|
142 |
+
// Checks with default setting value
|
143 |
+
function itemcheck(item, dataitem) {
|
144 |
+
var check = $('#ead_' + item).val();
|
145 |
+
var datacheck = 'ead_' + item;
|
146 |
+
if (datacheck == dataitem) {
|
147 |
+
return true;
|
148 |
+
} else if (check != emebeder[item]) {
|
149 |
+
return true;
|
150 |
+
}
|
151 |
+
return false;
|
152 |
}
|
153 |
//Print uploaded file details
|
154 |
+
function uploaddetails(file, uClass) {
|
155 |
$('#insert_doc').removeAttr('disabled');
|
156 |
+
$('#ead_filename').html(file.filename);
|
157 |
+
if (file.filesizeHumanReadable) {
|
158 |
+
$('#ead_filesize').html(file.filesizeHumanReadable);
|
159 |
+
} else {
|
160 |
+
$('#ead_filesize').html(' ');
|
161 |
+
}
|
162 |
+
$('.upload-success').fadeIn();
|
163 |
$container.hide();
|
164 |
+
UploadClass(uClass);
|
165 |
}
|
166 |
+
|
167 |
+
|
168 |
+
function awsm_embded_url() {
|
169 |
+
var checkurl = $embedurl.val();
|
170 |
+
if (checkurl !== '') {
|
171 |
+
validateurl(checkurl);
|
172 |
+
} else {
|
173 |
+
$embedurl.addClass('urlerror');
|
174 |
+
updateshortcode();
|
175 |
+
}
|
176 |
+
}
|
177 |
+
function isUrlValid(url) {
|
178 |
+
if (!/^http:\/\//.test(url)) {
|
179 |
+
url = "http://" + url;
|
180 |
+
}
|
181 |
+
return /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(url);
|
182 |
}
|
183 |
//Validate file url
|
184 |
+
function validateurl(url) {
|
185 |
+
var uClass = 'link';
|
186 |
$('#embed_message').hide();
|
187 |
+
if(isUrlValid(url)){
|
188 |
+
fileurl = url;
|
189 |
+
$('#insert_doc').removeAttr('disabled');
|
190 |
+
$('#ead_filename').html('From URL');
|
191 |
+
$('#ead_filesize').html(' ');
|
192 |
+
$('.upload-success').fadeIn();
|
193 |
+
$container.hide();
|
194 |
+
UploadClass(uClass);
|
195 |
+
updateshortcode();
|
196 |
+
}else{
|
197 |
+
showmsg(emebeder.invalidurl);
|
198 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
200 |
//Show Message
|
201 |
+
function showmsg(msg) {
|
202 |
$('#embed_message').fadeIn();
|
203 |
+
$message.text(msg);
|
204 |
}
|
205 |
+
|
206 |
+
|
207 |
+
function awsm_shortcode() {
|
208 |
+
if (fileurl) {
|
209 |
+
wp.media.editor.insert($shortcode.text());
|
210 |
+
remove_eadpop();
|
211 |
+
} else {
|
212 |
+
showmsg(emebeder.nocontent);
|
213 |
+
}
|
|
|
214 |
}
|
215 |
+
|
216 |
//Update ShortCode
|
217 |
+
function updateshortcode(item) {
|
218 |
+
item = typeof item !== 'undefined' ? item : false;
|
219 |
+
if (fileurl) {
|
220 |
+
$shortcode.text(getshortcode(fileurl, item));
|
221 |
+
} else {
|
222 |
+
$shortcode.text('');
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
//UploadClass
|
227 |
+
function UploadClass(uPclass) {
|
228 |
+
$(".uploaded-doccument").removeClass("ead-link ead-upload ead-dropbox ead-drive ead-box");
|
229 |
+
$('.uploaded-doccument').addClass('ead-' + uPclass);
|
230 |
+
}
|
231 |
+
//close popup
|
232 |
+
function remove_eadpop(){
|
233 |
+
// Close popup
|
234 |
+
tb_remove();
|
235 |
+
setTimeout(function() {
|
236 |
+
$('body').removeClass('ead-popup-on');
|
237 |
+
}, 800);
|
238 |
+
}
|
239 |
+
//Convert Filesize to human Readable filesize
|
240 |
+
function humanFileSize(bytes) {
|
241 |
+
var thresh = 1024;
|
242 |
+
if (bytes < thresh) return bytes + ' B';
|
243 |
+
var units = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
244 |
+
var u = -1;
|
245 |
+
do {
|
246 |
+
bytes /= thresh;
|
247 |
+
++u;
|
248 |
+
} while (bytes >= thresh);
|
249 |
+
return bytes.toFixed(1) + ' ' + units[u];
|
250 |
+
}
|
251 |
+
// Viewer Check
|
252 |
+
function validViewer(file, provider) {
|
253 |
+
var cprovider = ["link", "upload"];
|
254 |
+
var validext = msextension.split(',');
|
255 |
+
var ext = '.' + file.filename.split('.').pop();
|
256 |
+
$("#new_provider option[value='microsoft']").attr('disabled', false);
|
257 |
+
if ($.inArray(provider, cprovider) != -1) {
|
258 |
+
if ($.inArray(ext, validext) == -1) {
|
259 |
+
newprovider = "google";
|
260 |
+
$("#new_provider option[value='google']").attr("selected", "selected");
|
261 |
+
$("#new_provider option[value='microsoft']").attr('disabled', true);
|
262 |
+
} else {
|
263 |
+
newprovider = "microsoft";
|
264 |
+
$("#new_provider option[value='microsoft']").attr("selected", "selected");
|
265 |
+
}
|
266 |
+
}
|
267 |
+
}
|
268 |
+
//Reset form data
|
269 |
+
function ead_reset() {
|
270 |
$container.show();
|
271 |
$embedurl.val('');
|
272 |
+
$('.ead-options').fadeIn();
|
273 |
+
$('.addurl_box').hide();
|
274 |
$('.upload-success').hide();
|
|
|
275 |
$('#embed_message').hide();
|
276 |
+
$('#insert_doc').attr('disabled', 'disabled');
|
277 |
+
$('#new_provider').show();
|
278 |
+
$('#ead_pseudo').hide();
|
279 |
+
newprovider = "";
|
280 |
+
$("#new_provider option[value='microsoft']").attr('disabled', false);
|
281 |
+
$('#ead_downloadc').show();
|
282 |
}
|
283 |
});
|
language/ead-en.mo
ADDED
Binary file
|
language/ead-en.po
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Embed Any Document\n"
|
4 |
+
"POT-Creation-Date: 2014-12-31 14:58+0530\n"
|
5 |
+
"PO-Revision-Date: 2014-12-31 14:58+0530\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: Awsm Innovations <hello@awsm.in>\n"
|
8 |
+
"Language: en\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.10\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
"X-Poedit-SearchPath-1: ..\n"
|
19 |
+
|
20 |
+
#: ../aswm-embed.php:81 ../inc/popup.php:6
|
21 |
+
msgid "Add Document"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: ../aswm-embed.php:106
|
25 |
+
msgid "Settings"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: ../aswm-embed.php:133
|
29 |
+
msgid "Nothing to insert"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: ../aswm-embed.php:134
|
33 |
+
msgid "Add URL"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: ../aswm-embed.php:135
|
37 |
+
msgid "Verifying..."
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: ../aswm-embed.php:184
|
41 |
+
msgid "Download"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: ../aswm-embed.php:207
|
45 |
+
msgid "No Url Found"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: ../aswm-embed.php:221 ../aswm-embed.php:248
|
49 |
+
msgid "You do not have sufficient permissions to access this page."
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: ../aswm-embed.php:281
|
53 |
+
msgid "Buy Pro Version"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: ../aswm-embed.php:283
|
57 |
+
msgid "Add from "
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: ../inc/functions.php:89 ../inc/functions.php:126
|
61 |
+
msgid "Done"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: ../inc/functions.php:94
|
65 |
+
msgid "Document"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: ../inc/functions.php:102
|
69 |
+
msgid "File format is not supported."
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: ../inc/functions.php:109
|
73 |
+
msgid "Sorry, the file URL is not valid."
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: ../inc/functions.php:129
|
77 |
+
msgid "The document you have chosen is a not public."
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: ../inc/functions.php:129
|
81 |
+
msgid ""
|
82 |
+
" Only the owner and explicitly shared collaborators will be able to view it."
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: ../inc/popup.php:13
|
86 |
+
msgid "Upload Document"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: ../inc/popup.php:14
|
90 |
+
msgid "Add from URL"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: ../inc/popup.php:20
|
94 |
+
msgid "Enter document URL"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: ../inc/popup.php:34
|
98 |
+
msgid "Advanced Options"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: ../inc/popup.php:44 ../inc/settings.php:30
|
102 |
+
msgid "Show Download Link"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: ../inc/popup.php:46 ../inc/settings.php:33
|
106 |
+
msgid "For all users"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: ../inc/popup.php:46 ../inc/settings.php:33
|
110 |
+
msgid "For Logged-in users"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: ../inc/popup.php:46 ../inc/settings.php:33
|
114 |
+
msgid "No Download"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../inc/popup.php:51 ../inc/popup.php:58
|
118 |
+
msgid "Viewer"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../inc/popup.php:53
|
122 |
+
msgid "Google Docs Viewer"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../inc/popup.php:53
|
126 |
+
msgid "Microsoft Office Online"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../inc/popup.php:68
|
130 |
+
msgid "Shortcode Preview"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: ../inc/popup.php:77
|
134 |
+
msgid "Insert"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: ../inc/popup.php:77
|
138 |
+
msgid "Loading..."
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../inc/popup.php:81
|
142 |
+
msgid "Cancel"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../inc/settings.php:3
|
146 |
+
msgid "Embed Any Document by AWSM.in"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: ../inc/settings.php:5
|
150 |
+
msgid "General Settings"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: ../inc/settings.php:6
|
154 |
+
msgid "Support"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: ../inc/settings.php:7
|
158 |
+
msgid "Get Plus Version"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../inc/settings.php:16
|
162 |
+
msgid "Default Size"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../inc/settings.php:18
|
166 |
+
msgid "Width"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: ../inc/settings.php:22
|
170 |
+
msgid "Height"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../inc/settings.php:26
|
174 |
+
msgid "Enter values in pixels or percentage (Example: 500px or 100%)"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../inc/settings.php:48
|
178 |
+
msgid "Name"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: ../inc/settings.php:52
|
182 |
+
msgid "Email ID"
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: ../inc/settings.php:56
|
186 |
+
msgid "Problem"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: ../inc/settings.php:60
|
190 |
+
msgid "Submit"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: ../inc/support-mail.php:8
|
194 |
+
msgid "Please Fill Required Fields"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: ../inc/support-mail.php:30
|
198 |
+
msgid "We will get back to you soon"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: ../inc/support-mail.php:33
|
202 |
+
msgid "Something went wrong"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: ../inc/support-mail.php:38
|
206 |
+
msgid "Cheating ?"
|
207 |
+
msgstr ""
|
language/ead.mo
ADDED
Binary file
|
language/ead.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Embed Any Document\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Awsm Innovations <hello@awsm.in>\n"
|
8 |
"Language: en\n"
|
@@ -10,185 +10,206 @@ msgstr ""
|
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"X-Generator: Poedit 1.6.10\n"
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
16 |
msgid "Add Document"
|
17 |
msgstr ""
|
18 |
|
19 |
-
#: aswm-embed.php:
|
20 |
msgid "Settings"
|
21 |
msgstr ""
|
22 |
|
23 |
-
#: aswm-embed.php:
|
24 |
-
|
25 |
-
#: aswm-embed.php:174
|
26 |
-
#: aswm-embed.php:185
|
27 |
-
msgid "You do not have sufficient permissions to access this page."
|
28 |
msgstr ""
|
29 |
|
30 |
-
#: aswm-embed.php:
|
31 |
-
msgid "
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: aswm-embed.php:
|
35 |
msgid "Add URL"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: aswm-embed.php:
|
39 |
msgid "Verifying..."
|
40 |
msgstr ""
|
41 |
|
42 |
-
#:
|
43 |
msgid "Download"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
msgid "Done"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: inc/functions.php:
|
51 |
msgid "Document"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: inc/functions.php:
|
55 |
msgid "File format is not supported."
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: inc/functions.php:
|
59 |
-
msgid "
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: inc/functions.php:
|
63 |
-
msgid "
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: inc/functions.php:
|
67 |
-
msgid "
|
|
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: inc/popup.php:
|
71 |
-
msgid "Upload
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: inc/popup.php:
|
75 |
-
msgid "Add
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: inc/popup.php:
|
79 |
msgid "Enter document URL"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: inc/popup.php:
|
83 |
msgid "Advanced Options"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: inc/popup.php:43
|
87 |
-
#: inc/settings.php:38
|
88 |
msgid "Show Download Link"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: inc/popup.php:45
|
92 |
-
#: inc/settings.php:41
|
93 |
msgid "For all users"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: inc/popup.php:45
|
97 |
-
#: inc/settings.php:41
|
98 |
msgid "For Logged-in users"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: inc/popup.php:45
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: inc/popup.php:
|
107 |
msgid "Shortcode Preview"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: inc/popup.php:
|
111 |
msgid "Insert"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: inc/popup.php:
|
115 |
-
msgid "
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: inc/
|
119 |
-
msgid "
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: inc/settings.php:
|
123 |
-
msgid "
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: inc/settings.php:
|
127 |
-
msgid "
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: inc/settings.php:
|
131 |
-
msgid "
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: inc/settings.php:18
|
135 |
-
msgid "
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: inc/settings.php:
|
139 |
-
msgid "
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: inc/settings.php:
|
143 |
-
msgid "
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: inc/settings.php:
|
147 |
-
msgid "
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: inc/settings.php:
|
151 |
-
msgid "
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: inc/settings.php:
|
155 |
-
msgid "
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: inc/settings.php:
|
159 |
-
msgid "
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: inc/settings.php:
|
163 |
-
msgid "
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: inc/settings.php:
|
167 |
-
msgid "
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: inc/settings.php:
|
171 |
-
msgid "
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: inc/support-mail.php:8
|
175 |
msgid "Please Fill Required Fields"
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: inc/support-mail.php:30
|
179 |
msgid "We will get back to you soon"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: inc/support-mail.php:33
|
183 |
msgid "Something went wrong"
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: inc/support-mail.php:38
|
187 |
msgid "Cheating ?"
|
188 |
msgstr ""
|
189 |
-
|
190 |
-
#: inc/functions.php:180
|
191 |
-
msgid "File Not Found"
|
192 |
-
msgstr ""
|
193 |
-
|
194 |
-
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Embed Any Document\n"
|
4 |
+
"POT-Creation-Date: 2015-06-25 15:46+0530\n"
|
5 |
+
"PO-Revision-Date: 2015-06-25 15:47+0530\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: Awsm Innovations <hello@awsm.in>\n"
|
8 |
"Language: en\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"X-Generator: Poedit 1.6.10\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
"X-Poedit-SearchPath-1: ..\n"
|
19 |
+
|
20 |
+
#: ../aswm-embed.php:81 ../inc/popup.php:6
|
21 |
msgid "Add Document"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: ../aswm-embed.php:106
|
25 |
msgid "Settings"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: ../aswm-embed.php:132
|
29 |
+
msgid "Nothing to insert"
|
|
|
|
|
|
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: ../aswm-embed.php:133
|
33 |
+
msgid "Invalid URL"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: ../aswm-embed.php:134
|
37 |
msgid "Add URL"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: ../aswm-embed.php:135
|
41 |
msgid "Verifying..."
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: ../aswm-embed.php:181
|
45 |
msgid "Download"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: ../aswm-embed.php:204
|
49 |
+
msgid "No Url Found"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: ../aswm-embed.php:218 ../aswm-embed.php:245
|
53 |
+
msgid "You do not have sufficient permissions to access this page."
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: ../aswm-embed.php:278
|
57 |
+
msgid "Buy Pro Version"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: ../aswm-embed.php:280
|
61 |
+
msgid "Add from "
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: ../inc/functions.php:89 ../inc/functions.php:126
|
65 |
msgid "Done"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: ../inc/functions.php:94
|
69 |
msgid "Document"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: ../inc/functions.php:102
|
73 |
msgid "File format is not supported."
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: ../inc/functions.php:109
|
77 |
+
msgid "Sorry, the file URL is not valid."
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: ../inc/functions.php:129
|
81 |
+
msgid "The document you have chosen is a not public."
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: ../inc/functions.php:129
|
85 |
+
msgid ""
|
86 |
+
" Only the owner and explicitly shared collaborators will be able to view it."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: ../inc/popup.php:13
|
90 |
+
msgid "Upload Document"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: ../inc/popup.php:14
|
94 |
+
msgid "Add from URL"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: ../inc/popup.php:20
|
98 |
msgid "Enter document URL"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: ../inc/popup.php:37
|
102 |
msgid "Advanced Options"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: ../inc/popup.php:43 ../inc/settings.php:26
|
|
|
106 |
msgid "Show Download Link"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: ../inc/popup.php:45 ../inc/settings.php:29
|
|
|
110 |
msgid "For all users"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: ../inc/popup.php:45 ../inc/settings.php:29
|
|
|
114 |
msgid "For Logged-in users"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: ../inc/popup.php:45 ../inc/settings.php:29
|
118 |
+
msgid "No Download"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../inc/popup.php:50 ../inc/popup.php:57
|
122 |
+
msgid "Viewer"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../inc/popup.php:52
|
126 |
+
msgid "Google Docs Viewer"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../inc/popup.php:52
|
130 |
+
msgid "Microsoft Office Online"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: ../inc/popup.php:67
|
134 |
msgid "Shortcode Preview"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: ../inc/popup.php:76
|
138 |
msgid "Insert"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: ../inc/popup.php:76
|
142 |
+
msgid "Loading..."
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: ../inc/popup.php:80
|
146 |
+
msgid "Cancel"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: ../inc/settings.php:3
|
150 |
+
msgid "Embed Any Document by AWSM.in"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: ../inc/settings.php:12
|
154 |
+
msgid "Default Size"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: ../inc/settings.php:14
|
158 |
+
msgid "Width"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: ../inc/settings.php:18
|
162 |
+
msgid "Height"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: ../inc/settings.php:22
|
166 |
+
msgid "Enter values in pixels or percentage (Example: 500px or 100%)"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: ../inc/settings.php:57
|
170 |
+
msgid "Like the plugin?"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: ../inc/settings.php:57
|
174 |
+
msgid "Rate Now!"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: ../inc/settings.php:62
|
178 |
+
msgid "Need Help?"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: ../inc/settings.php:62
|
182 |
+
msgid "Open a Ticket"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: ../inc/settings.php:69
|
186 |
+
msgid "How to Embed Documents?"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: ../inc/settings.php:70
|
190 |
+
msgid "About Viewers"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: ../inc/settings.php:71
|
194 |
+
msgid "Shortcode & Attributes"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: ../inc/settings.php:72
|
198 |
+
msgid "FAQs"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: ../inc/support-mail.php:8
|
202 |
msgid "Please Fill Required Fields"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: ../inc/support-mail.php:30
|
206 |
msgid "We will get back to you soon"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: ../inc/support-mail.php:33
|
210 |
msgid "Something went wrong"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: ../inc/support-mail.php:38
|
214 |
msgid "Cheating ?"
|
215 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://awsm.in/donate
|
|
4 |
Tags: embed documents, upload pdf, embed ppt, document viewer, pdf viewer, pdf viewer plugin, display pdf, embed pdf, embed pdf in wordpress, word, word viewer, word document, embed word, word plugin, doc, doc viewer, docx, docx viewer, excel, excel plugin, xls, xlsx, spreadsheet, embed spreadsheet, powerpoint, powerpoint viewer, ppt, ppt viewer, pptx, image viewer
|
5 |
Author URI: http://awsm.in
|
6 |
Requires at least: 3.5
|
7 |
-
Tested up to: 4.
|
8 |
Stable tag: trunk
|
9 |
License: GPLv2
|
10 |
|
@@ -65,7 +65,7 @@ Upload or link the documents to your site using the ‘Add Document’ button in
|
|
65 |
1. ‘Add Document’ button integrated into WordPress visual editor
|
66 |
2. Add document popup
|
67 |
3. Inserting Document
|
68 |
-
4.
|
69 |
|
70 |
|
71 |
== Frequently Asked Questions ==
|
@@ -81,12 +81,68 @@ Great. Send it to ead@awsm.in. We will answer it as soon as we can.
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
-
=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
* Removed unsupported file types.
|
86 |
* Updated support tab.
|
87 |
|
|
|
|
|
|
|
|
|
88 |
== Upgrade Notice ==
|
89 |
|
90 |
-
=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
* Removed unsupported file types.
|
92 |
-
* Updated support tab.
|
|
|
|
|
|
4 |
Tags: embed documents, upload pdf, embed ppt, document viewer, pdf viewer, pdf viewer plugin, display pdf, embed pdf, embed pdf in wordpress, word, word viewer, word document, embed word, word plugin, doc, doc viewer, docx, docx viewer, excel, excel plugin, xls, xlsx, spreadsheet, embed spreadsheet, powerpoint, powerpoint viewer, ppt, ppt viewer, pptx, image viewer
|
5 |
Author URI: http://awsm.in
|
6 |
Requires at least: 3.5
|
7 |
+
Tested up to: 4.4.2
|
8 |
Stable tag: trunk
|
9 |
License: GPLv2
|
10 |
|
65 |
1. ‘Add Document’ button integrated into WordPress visual editor
|
66 |
2. Add document popup
|
67 |
3. Inserting Document
|
68 |
+
4. Add from URL
|
69 |
|
70 |
|
71 |
== Frequently Asked Questions ==
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= V 2.2.2 - 2016-03-10 =
|
85 |
+
* Added ppsx support.
|
86 |
+
|
87 |
+
= V 2.2.1 - 2015-10-03 =
|
88 |
+
* New Language localization.
|
89 |
+
|
90 |
+
= V 2.2 - 2015-06-24 =
|
91 |
+
* Replaced magnific popup with thickbox.
|
92 |
+
* Fixed: Media library serach bug.
|
93 |
+
* UI Improvements
|
94 |
+
|
95 |
+
= V 2.1 - 2015-01-25 =
|
96 |
+
* Missing image fix.
|
97 |
+
* Error handling.
|
98 |
+
|
99 |
+
= V 2.0 - 2014-12-31 =
|
100 |
+
* UI Improvements
|
101 |
+
* Various bug fixes
|
102 |
+
* Performance improvements
|
103 |
+
* Introduced plus version with cloud support
|
104 |
+
|
105 |
+
= V 1.0.2 - 2014-11-24 =
|
106 |
+
* Added option in advanced option to choose viewer.
|
107 |
+
* Added option in settings to enable and disable media library insert.
|
108 |
+
* Fixed: Editor permission issue.
|
109 |
+
|
110 |
+
= V 1.1.1- 2014-12-8 =
|
111 |
+
* Removed media insert override option.
|
112 |
+
|
113 |
+
= V 1.0.1 - 2014-11-12 =
|
114 |
* Removed unsupported file types.
|
115 |
* Updated support tab.
|
116 |
|
117 |
+
= V 1.1 - 2014-11-12 =
|
118 |
+
* File Not Found fix
|
119 |
+
|
120 |
+
|
121 |
== Upgrade Notice ==
|
122 |
|
123 |
+
= V 2.2.1 - 2015-10-03 =
|
124 |
+
* New Language localization.
|
125 |
+
|
126 |
+
= V 2.2 =
|
127 |
+
* Replaced magnific popup with thickbox.
|
128 |
+
* Fixed: Media library serach bug.
|
129 |
+
* UI Improvements
|
130 |
+
|
131 |
+
= V 2.1 =
|
132 |
+
* Missing image fix.
|
133 |
+
* Error handling.
|
134 |
+
|
135 |
+
= V 2.0 =
|
136 |
+
* UI Improvements
|
137 |
+
* Various bug fixes
|
138 |
+
* Performance improvements
|
139 |
+
|
140 |
+
= V 1.1.1=
|
141 |
+
* Removed media insert override option.
|
142 |
+
|
143 |
+
= V 1.0.1 =
|
144 |
* Removed unsupported file types.
|
145 |
+
* Updated support tab.
|
146 |
+
|
147 |
+
= V 1.1 =
|
148 |
+
* File Not Found fix
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
trunk/aswm-embed.php
ADDED
@@ -0,0 +1,304 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Embed Any Document
|
4 |
+
Plugin URI: http://awsm.in/embed-any-documents
|
5 |
+
Description: Embed Any Document WordPress plugin lets you upload and embed your documents easily in your WordPress website without any additional browser plugins like Flash or Acrobat reader. The plugin lets you choose between Google Docs Viewer and Microsoft Office Online to display your documents.
|
6 |
+
Version: 2.2.2
|
7 |
+
Author: Awsm Innovations
|
8 |
+
Author URI: http://awsm.in
|
9 |
+
License: GPL V3
|
10 |
+
Text Domain: embed-any-document
|
11 |
+
Domain Path: /language
|
12 |
+
*/
|
13 |
+
require_once( dirname( __FILE__ ) . '/inc/functions.php');
|
14 |
+
class Awsm_embed {
|
15 |
+
private static $instance = null;
|
16 |
+
private $plugin_path;
|
17 |
+
private $plugin_url;
|
18 |
+
private $plugin_base;
|
19 |
+
private $plugin_file;
|
20 |
+
private $plugin_version;
|
21 |
+
private $settings_slug;
|
22 |
+
private $text_domain = 'embed-any-document';
|
23 |
+
/**
|
24 |
+
* Creates or returns an instance of this class.
|
25 |
+
*/
|
26 |
+
public static function get_instance() {
|
27 |
+
// If an instance hasn't been created and set to $instance create an instance and set it to $instance.
|
28 |
+
if ( null == self::$instance ) {
|
29 |
+
self::$instance = new self;
|
30 |
+
}
|
31 |
+
return self::$instance;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Initializes the plugin by setting localization, hooks, filters, and administrative functions.
|
36 |
+
*/
|
37 |
+
private function __construct() {
|
38 |
+
|
39 |
+
$this->plugin_path = plugin_dir_path( __FILE__ );
|
40 |
+
$this->plugin_url = plugin_dir_url( __FILE__ );
|
41 |
+
$this->plugin_base = dirname( plugin_basename( __FILE__ ) );
|
42 |
+
$this->plugin_file = __FILE__ ;
|
43 |
+
$this->settings_slug = 'ead-settings';
|
44 |
+
$this->plugin_version = '2.2.1';
|
45 |
+
|
46 |
+
load_plugin_textdomain($this->text_domain, false,$this->plugin_base . '/language' );
|
47 |
+
|
48 |
+
add_action( 'media_buttons', array( $this, 'embedbutton' ),1000);
|
49 |
+
|
50 |
+
add_shortcode( 'embeddoc', array( $this, 'embed_shortcode'));
|
51 |
+
|
52 |
+
//Admin Settings menu
|
53 |
+
add_action('admin_menu', array($this, 'admin_menu'));
|
54 |
+
add_action( 'admin_init', array($this, 'register_eadsettings'));
|
55 |
+
//Add easy settings link
|
56 |
+
add_filter( "plugin_action_links_" . plugin_basename( __FILE__ ),array($this, 'settingslink'));
|
57 |
+
//ajax validate file url
|
58 |
+
add_action( 'wp_ajax_validateurl',array( $this, 'validateurl' ));
|
59 |
+
//ajax Contact Form
|
60 |
+
add_action( 'wp_ajax_supportform',array( $this, 'supportform' ));
|
61 |
+
//default options
|
62 |
+
register_activation_hook($this->plugin_file, array( $this, 'ead_defaults' ));
|
63 |
+
$this->run_plugin();
|
64 |
+
}
|
65 |
+
/**
|
66 |
+
* Register admin Settings style
|
67 |
+
*/
|
68 |
+
function setting_styles(){
|
69 |
+
wp_register_style( 'embed-settings', plugins_url( 'css/settings.css', $this->plugin_file ), false,$this->plugin_version, 'all' );
|
70 |
+
wp_enqueue_style('embed-settings');
|
71 |
+
}
|
72 |
+
/**
|
73 |
+
* Embed any Docs Button
|
74 |
+
*/
|
75 |
+
public function embedbutton( $args = array() ) {
|
76 |
+
// Check user previlage
|
77 |
+
if ( !current_user_can( 'edit_posts' )) return;
|
78 |
+
// Prepares button target
|
79 |
+
$target = is_string( $args ) ? $args : 'content';
|
80 |
+
// Prepare args
|
81 |
+
$args = wp_parse_args( $args, array(
|
82 |
+
'target' => $target,
|
83 |
+
'text' => __( 'Add Document', $this->text_domain),
|
84 |
+
'class' => 'awsm-embed button',
|
85 |
+
'icon' => plugins_url( 'images/ead-small.png', __FILE__ ),
|
86 |
+
'echo' => true,
|
87 |
+
'shortcode' => false
|
88 |
+
) );
|
89 |
+
// Prepare EAD icon
|
90 |
+
if ( $args['icon'] ) $args['icon'] = '<img src="' . $args['icon'] . '" /> ';
|
91 |
+
// Print button in media column
|
92 |
+
$button = '<a href="javascript:void(0);" class="' . $args['class'] . '" title="' . $args['text'] . '" data-mfp-src="#embed-popup-wrap" data-target="' . $args['target'] . '" >' . $args['icon'] . $args['text'] . '</a>';
|
93 |
+
// Show generator popup
|
94 |
+
//add_action( 'wp_footer', array( $this, 'embedpopup' ) );
|
95 |
+
add_action( 'admin_footer', array($this, 'embedpopup' ) );
|
96 |
+
// Request assets
|
97 |
+
wp_enqueue_media();
|
98 |
+
//Loads Support css and js
|
99 |
+
$this->embed_helper();
|
100 |
+
// Print/return result
|
101 |
+
if ( $args['echo'] ) echo $button;
|
102 |
+
return $button;
|
103 |
+
}
|
104 |
+
/**
|
105 |
+
* Admin Easy access settings link
|
106 |
+
*/
|
107 |
+
function settingslink( $links ) {
|
108 |
+
$settings_link = '<a href="options-general.php?page='.$this->settings_slug.'">' . __('Settings', $this->text_domain) . '</a>';
|
109 |
+
array_unshift( $links, $settings_link );
|
110 |
+
return $links;
|
111 |
+
}
|
112 |
+
/**
|
113 |
+
* Embed Form popup
|
114 |
+
*/
|
115 |
+
function embedpopup(){
|
116 |
+
add_thickbox();
|
117 |
+
include($this->plugin_path.'inc/popup.php');
|
118 |
+
}
|
119 |
+
/**
|
120 |
+
* Register admin scripts
|
121 |
+
*/
|
122 |
+
function embed_helper(){
|
123 |
+
wp_register_style( 'embed-css', plugins_url( 'css/embed.css', $this->plugin_file ), false, $this->plugin_version, 'all' );
|
124 |
+
wp_register_script( 'embed', plugins_url( 'js/embed.js', $this->plugin_file ), array( 'jquery' ),$this->plugin_version, true );
|
125 |
+
wp_localize_script('embed','emebeder', array(
|
126 |
+
'height' => get_option('ead_height', '500px'),
|
127 |
+
'width' => get_option('ead_width', '100%'),
|
128 |
+
'download' => get_option('ead_download', 'none'),
|
129 |
+
'provider' => get_option('ead_provider', 'google'),
|
130 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
131 |
+
'validtypes' => ead_validembedtypes(),
|
132 |
+
'msextension' => ead_validextensions('ms'),
|
133 |
+
'drextension' => ead_validextensions('all'),
|
134 |
+
'nocontent' => __('Nothing to insert', $this->text_domain),
|
135 |
+
'invalidurl' => __('Invalid URL', $this->text_domain),
|
136 |
+
'addurl' => __('Add URL', $this->text_domain),
|
137 |
+
'verify' => __('Verifying...', $this->text_domain),
|
138 |
+
) );
|
139 |
+
wp_enqueue_style('embed-css');
|
140 |
+
wp_enqueue_script( 'embed' );
|
141 |
+
}
|
142 |
+
/**
|
143 |
+
* Shortcode Functionality
|
144 |
+
*/
|
145 |
+
function embed_shortcode($atts) {
|
146 |
+
$embed = "";
|
147 |
+
$durl = "";
|
148 |
+
$default_width = ead_sanitize_dims(get_option('ead_width', '100%'));
|
149 |
+
$default_height = ead_sanitize_dims(get_option('ead_height', '500px'));
|
150 |
+
$default_provider = get_option('ead_provider', 'google');
|
151 |
+
$default_download = get_option('ead_download', 'none');
|
152 |
+
$show = false;
|
153 |
+
extract(shortcode_atts(array('url' => '',
|
154 |
+
'drive' => '',
|
155 |
+
'width' => $default_width,
|
156 |
+
'height' => $default_height,
|
157 |
+
'language' => 'en',
|
158 |
+
'viewer' => $default_provider,
|
159 |
+
'download' => $default_download), $atts));
|
160 |
+
if(isset($atts['provider']))
|
161 |
+
$viewer = $atts['provider'];
|
162 |
+
if(!isset($atts['provider']) AND !isset($atts['viewer']))
|
163 |
+
$viewer = 'google';
|
164 |
+
if ($url):
|
165 |
+
$filedata = wp_remote_head($url);
|
166 |
+
$durl = '';
|
167 |
+
$privatefile = '';
|
168 |
+
if (ead_allowdownload($viewer)) if ($download == 'alluser' or $download == 'all') {
|
169 |
+
$show = true;
|
170 |
+
} elseif ($download == 'logged' AND is_user_logged_in()) {
|
171 |
+
$show = true;
|
172 |
+
}
|
173 |
+
if ($show) {
|
174 |
+
$filesize = 0;
|
175 |
+
$url = esc_url($url, array('http', 'https'));
|
176 |
+
if (!is_wp_error($filedata) && isset($filedata['headers']['content-length'])) {
|
177 |
+
$filesize = ead_human_filesize($filedata['headers']['content-length']);
|
178 |
+
} else {
|
179 |
+
$filesize = 0;
|
180 |
+
}
|
181 |
+
$fileHtml = '';
|
182 |
+
if ($filesize) $fileHtml = ' [' . $filesize . ']';
|
183 |
+
$durl = '<p class="embed_download"><a href="' . $url . '" download >' . __('Download', $this->text_domain) . $fileHtml . ' </a></p>';
|
184 |
+
}
|
185 |
+
|
186 |
+
$url = esc_url($url, array('http', 'https'));
|
187 |
+
$providerList = array('google', 'microsoft');
|
188 |
+
if (!in_array($viewer, $providerList)) $viewer = 'google';
|
189 |
+
switch ($viewer) {
|
190 |
+
case 'google':
|
191 |
+
$embedsrc = '//docs.google.com/viewer?url=%1$s&embedded=true&hl=%2$s';
|
192 |
+
$iframe = sprintf($embedsrc, urlencode($url), esc_attr($language));
|
193 |
+
break;
|
194 |
+
|
195 |
+
case 'microsoft':
|
196 |
+
$embedsrc = '//view.officeapps.live.com/op/embed.aspx?src=%1$s';
|
197 |
+
$iframe = sprintf($embedsrc, urlencode($url));
|
198 |
+
break;
|
199 |
+
}
|
200 |
+
$style = 'style="width:%1$s; height:%2$s; border: none;"';
|
201 |
+
$stylelink = sprintf($style, ead_sanitize_dims($width), ead_sanitize_dims($height));
|
202 |
+
$iframe = '<iframe src="' . $iframe . '" ' . $stylelink . '></iframe>';
|
203 |
+
$show = false;
|
204 |
+
$embed = '<div class="ead-document">' . $iframe . $privatefile . $durl . '</div>';
|
205 |
+
else:
|
206 |
+
$embed = __('No Url Found', $this->text_domain);
|
207 |
+
endif;
|
208 |
+
return $embed;
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Admin menu setup
|
213 |
+
*/
|
214 |
+
public function admin_menu() {
|
215 |
+
$eadsettings = add_options_page('Embed Any Document', 'Embed Any Document', 'manage_options',$this->settings_slug, array($this, 'settings_page'));
|
216 |
+
add_action( 'admin_print_styles-' . $eadsettings, array($this,'setting_styles'));
|
217 |
+
}
|
218 |
+
public function settings_page() {
|
219 |
+
if (!current_user_can('manage_options')) {
|
220 |
+
wp_die(__('You do not have sufficient permissions to access this page.'));
|
221 |
+
}
|
222 |
+
include($this->plugin_path.'inc/settings.php');
|
223 |
+
}
|
224 |
+
/**
|
225 |
+
* Register Settings
|
226 |
+
*/
|
227 |
+
function register_eadsettings() {
|
228 |
+
register_setting( 'ead-settings-group', 'ead_width' ,'ead_sanitize_dims');
|
229 |
+
register_setting( 'ead-settings-group', 'ead_height','ead_sanitize_dims' );
|
230 |
+
register_setting( 'ead-settings-group', 'ead_provider' );
|
231 |
+
register_setting( 'ead-settings-group', 'ead_download' );
|
232 |
+
register_setting( 'ead-settings-group', 'ead_mediainsert' );
|
233 |
+
}
|
234 |
+
/**
|
235 |
+
* Ajax validate file url
|
236 |
+
*/
|
237 |
+
function validateurl(){
|
238 |
+
$fileurl = $_POST['furl'];
|
239 |
+
echo json_encode(ead_validateurl($fileurl));
|
240 |
+
die(0);
|
241 |
+
}
|
242 |
+
/**
|
243 |
+
* Ajax Contact Form
|
244 |
+
*/
|
245 |
+
function supportform(){
|
246 |
+
if (!current_user_can('manage_options')) {
|
247 |
+
wp_die(__('You do not have sufficient permissions to access this page.'));
|
248 |
+
}
|
249 |
+
include($this->plugin_path.'inc/support-mail.php');
|
250 |
+
}
|
251 |
+
/**
|
252 |
+
* Plugin function
|
253 |
+
*/
|
254 |
+
function run_plugin(){
|
255 |
+
$this->adminfunctions();
|
256 |
+
}
|
257 |
+
/**
|
258 |
+
* Admin Functions init
|
259 |
+
*/
|
260 |
+
function adminfunctions(){
|
261 |
+
if(is_admin()){
|
262 |
+
add_filter('upload_mimes', array($this,'additional_mimes'));
|
263 |
+
}
|
264 |
+
}
|
265 |
+
/**
|
266 |
+
* Adds additional mimetype for meadi uploader
|
267 |
+
*/
|
268 |
+
function additional_mimes($mimes){
|
269 |
+
return array_merge($mimes,array (
|
270 |
+
'svg' => 'image/svg+xml',
|
271 |
+
'ai' => 'application/postscript',
|
272 |
+
));
|
273 |
+
}
|
274 |
+
/**
|
275 |
+
* To get Overlay link
|
276 |
+
*/
|
277 |
+
function providerlink($keys, $id, $provider) {
|
278 |
+
$link = 'http://goo.gl/wJTQlc';
|
279 |
+
$id = "";
|
280 |
+
$configure = '<span class="overlay"><strong>' . __('Buy Pro Version', $this->text_domain) . '</strong><i></i></span>';
|
281 |
+
$target = 'target="_blank"';
|
282 |
+
echo '<a href="' . $link . '" id="' . $id . '" ' . $target . '><span><img src="' . $this->plugin_url . 'images/icon-' . strtolower($provider) . '.png" alt="Add From ' . $provider . '" />' . __('Add from ' . $provider, $this->text_domain) . $configure . '</span></a>';
|
283 |
+
}
|
284 |
+
/**
|
285 |
+
* To initialize default options
|
286 |
+
*/
|
287 |
+
function ead_defaults()
|
288 |
+
{
|
289 |
+
$o = array(
|
290 |
+
'ead_width' => '100%',
|
291 |
+
'ead_height' => '500px',
|
292 |
+
'ead_download' => 'none',
|
293 |
+
'ead_provider' => 'google',
|
294 |
+
'ead_mediainsert' => '1',
|
295 |
+
);
|
296 |
+
foreach ( $o as $k => $v )
|
297 |
+
{
|
298 |
+
if(!get_option($k)) update_option($k, $v);
|
299 |
+
}
|
300 |
+
return;
|
301 |
+
}
|
302 |
+
}
|
303 |
+
|
304 |
+
Awsm_embed::get_instance();
|
trunk/css/embed.css
ADDED
@@ -0,0 +1,361 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#embed-popup-wrap {
|
2 |
+
display: none;
|
3 |
+
width: 85%;
|
4 |
+
margin: 0 auto;
|
5 |
+
}
|
6 |
+
.ead-popup-on #TB_window{
|
7 |
+
background: none;
|
8 |
+
box-shadow: none;
|
9 |
+
-webkit-box-shadow: none;
|
10 |
+
}
|
11 |
+
.ead-popup-on #TB_ajaxContent{
|
12 |
+
text-align: center;
|
13 |
+
}
|
14 |
+
.ead-popup-on #TB_ajaxContent:after{
|
15 |
+
content: "";
|
16 |
+
display: inline-block;
|
17 |
+
width: 1px;
|
18 |
+
height: 100%;
|
19 |
+
vertical-align: middle;
|
20 |
+
}
|
21 |
+
#embed-popup {
|
22 |
+
position: relative;
|
23 |
+
width: 99%;
|
24 |
+
max-width: 1000px;
|
25 |
+
background: #fff;
|
26 |
+
-moz-box-sizing: border-box;
|
27 |
+
-webkit-box-sizing: border-box;
|
28 |
+
box-sizing: border-box;
|
29 |
+
display: inline-block;
|
30 |
+
vertical-align: middle;
|
31 |
+
-webkit-box-shadow: 0 2px 25px #000;
|
32 |
+
-moz-box-shadow: 0 2px 25px #000;
|
33 |
+
box-shadow: 0 2px 25px #000;
|
34 |
+
text-align: left;
|
35 |
+
|
36 |
+
}
|
37 |
+
.ead-popup-header{
|
38 |
+
padding: 20px 30px;
|
39 |
+
}
|
40 |
+
.ead-popup-header h1{
|
41 |
+
margin: 0;
|
42 |
+
line-height: 1.3;
|
43 |
+
}
|
44 |
+
.ead-section {
|
45 |
+
padding: 0 30px;
|
46 |
+
border-top: 1px solid #ebebeb;
|
47 |
+
}
|
48 |
+
.ead-action-panel{
|
49 |
+
padding: 20px 30px;
|
50 |
+
background: #f5f5f5;
|
51 |
+
border-top: 1px solid #ebebeb;
|
52 |
+
}
|
53 |
+
ul.ead-options {
|
54 |
+
padding: 30px 0;
|
55 |
+
overflow: hidden;
|
56 |
+
margin: 0px;
|
57 |
+
}
|
58 |
+
.ead-options li {
|
59 |
+
float: left;
|
60 |
+
width: 20%;
|
61 |
+
padding: 0 10px;
|
62 |
+
-moz-box-sizing: border-box;
|
63 |
+
-webkit-box-sizing: border-box;
|
64 |
+
box-sizing: border-box;
|
65 |
+
}
|
66 |
+
.ead-options li a {
|
67 |
+
display: block;
|
68 |
+
text-decoration: none;
|
69 |
+
color: rgb(33, 33, 33);
|
70 |
+
}
|
71 |
+
.ead-options li span {
|
72 |
+
border: 2px dotted #ccc;
|
73 |
+
-webkit-border-radius: 4px;
|
74 |
+
border-radius: 4px;
|
75 |
+
display: block;
|
76 |
+
padding: 30px 10px 20px;
|
77 |
+
text-align: center;
|
78 |
+
position: relative;
|
79 |
+
}
|
80 |
+
.ead-options li img {
|
81 |
+
display: block;
|
82 |
+
margin: 0 auto 10px;
|
83 |
+
}
|
84 |
+
.ead-options li span span.overlay {
|
85 |
+
border: none;
|
86 |
+
-webkit-border-radius: 0;
|
87 |
+
border-radius: 0;
|
88 |
+
padding: 0;
|
89 |
+
width: 100%;
|
90 |
+
height: 100%;
|
91 |
+
position: absolute;
|
92 |
+
left: 0;
|
93 |
+
top: 0;
|
94 |
+
background: rgba(255, 255, 255, 0.7);
|
95 |
+
}
|
96 |
+
.ead-options .overlay strong {
|
97 |
+
display: inline-block;
|
98 |
+
max-width: 97%;
|
99 |
+
vertical-align: middle;
|
100 |
+
opacity: 0;
|
101 |
+
-webkit-transition: all 0.3s ease;
|
102 |
+
-moz-transition: all 0.3s ease;
|
103 |
+
-ms-transition: all 0.3s ease;
|
104 |
+
-o-transition: all 0.3s ease;
|
105 |
+
transition: all 0.3s ease;
|
106 |
+
}
|
107 |
+
.ead-options li span:hover {
|
108 |
+
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
|
109 |
+
-webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
|
110 |
+
}
|
111 |
+
.ead-options li:hover .overlay strong {
|
112 |
+
opacity: 1;
|
113 |
+
}
|
114 |
+
.ead-options .overlay i {
|
115 |
+
display: inline-block;
|
116 |
+
height: 100%;
|
117 |
+
width: 1px;
|
118 |
+
vertical-align: middle;
|
119 |
+
}
|
120 |
+
.upload-success {
|
121 |
+
min-height: 70px;
|
122 |
+
overflow: hidden;
|
123 |
+
}
|
124 |
+
.upload-success .inner {
|
125 |
+
padding: 30px 10px;
|
126 |
+
-moz-box-sizing: border-box;
|
127 |
+
-webkit-box-sizing: border-box;
|
128 |
+
box-sizing: border-box;
|
129 |
+
float: left;
|
130 |
+
width: 20%;
|
131 |
+
}
|
132 |
+
.box {
|
133 |
+
display: none;
|
134 |
+
border: 2px dotted #ccc;
|
135 |
+
-webkit-border-radius: 4px;
|
136 |
+
border-radius: 4px;
|
137 |
+
padding: 20px;
|
138 |
+
margin: 30px 0;
|
139 |
+
}
|
140 |
+
a.go-back {
|
141 |
+
display: inline-block;
|
142 |
+
margin-top: 20px;
|
143 |
+
text-decoration: none;
|
144 |
+
}
|
145 |
+
.box label {
|
146 |
+
display: block;
|
147 |
+
font-size: 12px;
|
148 |
+
margin-bottom: 5px;
|
149 |
+
}
|
150 |
+
.uploaded-doccument {
|
151 |
+
padding: 75px 0 5px;
|
152 |
+
color: #454545;
|
153 |
+
font-size: 13px;
|
154 |
+
word-wrap: break-word;
|
155 |
+
text-align: center;
|
156 |
+
}
|
157 |
+
.uploaded-doccument.ead-link {
|
158 |
+
background: url(../images/icon-link.png) no-repeat center 5px / 36px 49px;
|
159 |
+
}
|
160 |
+
.uploaded-doccument.ead-upload {
|
161 |
+
background: url(../images/icon-upload.png) no-repeat center 5px / 54px 49px;
|
162 |
+
}
|
163 |
+
.uploaded-doccument.ead-dropbox {
|
164 |
+
background: url(../images/icon-dropbox.png) no-repeat center 5px / 51px 49px;
|
165 |
+
}
|
166 |
+
.uploaded-doccument.ead-drive {
|
167 |
+
background: url(../images/icon-drive.png) no-repeat center 5px / 48px 49px;
|
168 |
+
}
|
169 |
+
.uploaded-doccument.ead-box {
|
170 |
+
background: url(../images/icon-box.png) no-repeat center 5px / 54px 49px;
|
171 |
+
}
|
172 |
+
.wp-core-ui .button#adv_options {
|
173 |
+
float: right;
|
174 |
+
height: 40px;
|
175 |
+
line-height: 38px;
|
176 |
+
font-size: 13px;
|
177 |
+
padding: 0 20px;
|
178 |
+
}
|
179 |
+
.uploaded-doccument p {
|
180 |
+
font-weight: bold;
|
181 |
+
font-size: 16px;
|
182 |
+
margin: 0 0 3px;
|
183 |
+
}
|
184 |
+
input.input-group-text {
|
185 |
+
padding: 5px 8px;
|
186 |
+
height: 40px;
|
187 |
+
min-width: 88%;
|
188 |
+
}
|
189 |
+
.wp-core-ui .button-primary.input-group-btn {
|
190 |
+
padding: 5px 10px;
|
191 |
+
height: 40px;
|
192 |
+
}
|
193 |
+
.advanced_options {
|
194 |
+
padding: 30px;
|
195 |
+
-moz-box-sizing: border-box;
|
196 |
+
-webkit-box-sizing: border-box;
|
197 |
+
box-sizing: border-box;
|
198 |
+
float: left;
|
199 |
+
width: 70%;
|
200 |
+
border-left: 1px solid #ebebeb;
|
201 |
+
}
|
202 |
+
.advanced_options h3 {
|
203 |
+
margin-top: 0px
|
204 |
+
}
|
205 |
+
.advanced_options h3 span {
|
206 |
+
color: #aaa;
|
207 |
+
font-weight: normal;
|
208 |
+
}
|
209 |
+
body.mfp-shown .mfp-bg {
|
210 |
+
z-index: 1010;
|
211 |
+
}
|
212 |
+
body.mfp-shown .mfp-wrap {
|
213 |
+
z-index: 1011;
|
214 |
+
}
|
215 |
+
body.mfp-shown .mfp-preloader {
|
216 |
+
z-index: 1012;
|
217 |
+
}
|
218 |
+
body.mfp-shown .mfp-content {
|
219 |
+
z-index: 1013;
|
220 |
+
}
|
221 |
+
body.mfp-shown button.mfp-close, body.mfp-shown button.mfp-arrow {
|
222 |
+
z-index: 1014;
|
223 |
+
}
|
224 |
+
.wp-core-ui .ead-btn.button-large {
|
225 |
+
padding: 0 30px;
|
226 |
+
height: 54px;
|
227 |
+
line-height: 52px;
|
228 |
+
font-size: 16px;
|
229 |
+
}
|
230 |
+
.wp-core-ui .ead-btn.button-medium {
|
231 |
+
padding: 0 15px;
|
232 |
+
height: 36px;
|
233 |
+
line-height: 34px;
|
234 |
+
font-size: 14px;
|
235 |
+
}
|
236 |
+
.text-center {
|
237 |
+
text-align: center;
|
238 |
+
}
|
239 |
+
.mfp-close {
|
240 |
+
position: absolute;
|
241 |
+
right: 30px;
|
242 |
+
top: 30px;
|
243 |
+
font-weight: bold;
|
244 |
+
background: url(../images/icon-close.png)!important;
|
245 |
+
width: 22px;
|
246 |
+
height: 22px;
|
247 |
+
display: block;
|
248 |
+
text-indent: -9999999px;
|
249 |
+
border: none;
|
250 |
+
cursor: pointer;
|
251 |
+
opacity: 0.65;
|
252 |
+
padding: 0;
|
253 |
+
}
|
254 |
+
.mfp-close:hover{
|
255 |
+
opacity: 1;
|
256 |
+
}
|
257 |
+
.mfp-close .upload-success {
|
258 |
+
display: none;
|
259 |
+
}
|
260 |
+
div.awsm-error, div.awsm-updated {
|
261 |
+
margin: 5px 0 2px;
|
262 |
+
border-width: 1px 1px 1px 4px;
|
263 |
+
border-style: solid;
|
264 |
+
-webkit-border-radius: 4px;
|
265 |
+
border-radius: 4px;
|
266 |
+
}
|
267 |
+
div.awsm-updated {
|
268 |
+
background-color: #fff;
|
269 |
+
border-color: #eee #eee #eee #7ad03a;
|
270 |
+
padding: 1px 12px;
|
271 |
+
}
|
272 |
+
div.awsm-error {
|
273 |
+
background: none repeat scroll 0 0 #fff;
|
274 |
+
border-color: #eee #eee #eee #dd3d36;
|
275 |
+
padding: 1px 12px;
|
276 |
+
}
|
277 |
+
div.awsm-error p, div.awsm-updated p {
|
278 |
+
margin: 0.5em 0;
|
279 |
+
padding: 2px;
|
280 |
+
}
|
281 |
+
.hidden {
|
282 |
+
display: none;
|
283 |
+
}
|
284 |
+
.mceActionPanel {
|
285 |
+
margin: 0;
|
286 |
+
}
|
287 |
+
.option-fields {
|
288 |
+
list-style-type: none;
|
289 |
+
margin: 0;
|
290 |
+
padding: 20px 0 0;
|
291 |
+
}
|
292 |
+
.option-fields li {
|
293 |
+
padding-bottom: 15px;
|
294 |
+
overflow: hidden;
|
295 |
+
}
|
296 |
+
.option-fields label {
|
297 |
+
display: block;
|
298 |
+
margin-bottom: 5px;
|
299 |
+
font-weight: bold;
|
300 |
+
}
|
301 |
+
.option-fields li.checkbox input{ float: left; margin: 2px 10px 0 0;}
|
302 |
+
.option-fields li.checkbox label{ float: left; margin: 0 0 0; font-weight: normal;}
|
303 |
+
.f-left {
|
304 |
+
float: left;
|
305 |
+
}
|
306 |
+
.option-fields .f-left {
|
307 |
+
margin-right: 25px;
|
308 |
+
}
|
309 |
+
.option-fields .f-left.last {
|
310 |
+
margin: 0;
|
311 |
+
}
|
312 |
+
.clear {
|
313 |
+
clear: both;
|
314 |
+
}
|
315 |
+
.input-small {
|
316 |
+
width: 60px;
|
317 |
+
}
|
318 |
+
.box .urlerror {
|
319 |
+
border-color: #D95B5B;
|
320 |
+
-webkit-box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
|
321 |
+
box-shadow: 0 0 2px rgba(190, 30, 30, 0.8);
|
322 |
+
}
|
323 |
+
.picker-dialog {
|
324 |
+
z-index: 100091;
|
325 |
+
}
|
326 |
+
.picker-dialog-bg {
|
327 |
+
z-index: 100090;
|
328 |
+
}
|
329 |
+
.ead-popon #adminmenuwrap{
|
330 |
+
z-index: 999!important;
|
331 |
+
}
|
332 |
+
@media (max-width: 915px) {
|
333 |
+
.ead-options li {
|
334 |
+
width: 33.33%;
|
335 |
+
padding-bottom: 20px;
|
336 |
+
margin-bottom: 0;
|
337 |
+
}
|
338 |
+
.ead-popup-on #TB_window{
|
339 |
+
background: #fff;
|
340 |
+
-webkit-box-shadow: 0 2px 25px #000;
|
341 |
+
-moz-box-shadow: 0 2px 25px #000;
|
342 |
+
box-shadow: 0 2px 25px #000;
|
343 |
+
|
344 |
+
|
345 |
+
}
|
346 |
+
|
347 |
+
#embed-popup {
|
348 |
+
box-shadow: none;
|
349 |
+
-webkit-box-shadow: none;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
@media (max-width: 600px) {
|
353 |
+
.ead-options li {
|
354 |
+
width: 50%;
|
355 |
+
}
|
356 |
+
}
|
357 |
+
@media (max-width: 440px) {
|
358 |
+
.ead-options li {
|
359 |
+
width: 100%;
|
360 |
+
}
|
361 |
+
}
|
trunk/css/magnific-popup.css
ADDED
@@ -0,0 +1,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Magnific Popup CSS */
|
2 |
+
.mfp-bg {
|
3 |
+
top: 0;
|
4 |
+
left: 0;
|
5 |
+
width: 100%;
|
6 |
+
height: 100%;
|
7 |
+
z-index: 1042;
|
8 |
+
overflow: hidden;
|
9 |
+
position: fixed;
|
10 |
+
background: #0b0b0b;
|
11 |
+
opacity: 0.8;
|
12 |
+
filter: alpha(opacity=80); }
|
13 |
+
|
14 |
+
.mfp-wrap {
|
15 |
+
top: 0;
|
16 |
+
left: 0;
|
17 |
+
width: 100%;
|
18 |
+
height: 100%;
|
19 |
+
z-index: 1043;
|
20 |
+
position: fixed;
|
21 |
+
outline: none !important;
|
22 |
+
-webkit-backface-visibility: hidden; }
|
23 |
+
|
24 |
+
.mfp-container {
|
25 |
+
text-align: center;
|
26 |
+
position: absolute;
|
27 |
+
width: 100%;
|
28 |
+
height: 100%;
|
29 |
+
left: 0;
|
30 |
+
top: 0;
|
31 |
+
padding: 0 8px;
|
32 |
+
-webkit-box-sizing: border-box;
|
33 |
+
-moz-box-sizing: border-box;
|
34 |
+
box-sizing: border-box; }
|
35 |
+
|
36 |
+
.mfp-container:before {
|
37 |
+
content: '';
|
38 |
+
display: inline-block;
|
39 |
+
height: 100%;
|
40 |
+
vertical-align: middle; }
|
41 |
+
|
42 |
+
.mfp-align-top .mfp-container:before {
|
43 |
+
display: none; }
|
44 |
+
|
45 |
+
.mfp-content {
|
46 |
+
position: relative;
|
47 |
+
display: inline-block;
|
48 |
+
vertical-align: middle;
|
49 |
+
margin: 0 auto;
|
50 |
+
text-align: left;
|
51 |
+
z-index: 1045; }
|
52 |
+
|
53 |
+
.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
|
54 |
+
width: 100%;
|
55 |
+
cursor: auto; }
|
56 |
+
|
57 |
+
.mfp-ajax-cur {
|
58 |
+
cursor: progress; }
|
59 |
+
|
60 |
+
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
|
61 |
+
cursor: -moz-zoom-out;
|
62 |
+
cursor: -webkit-zoom-out;
|
63 |
+
cursor: zoom-out; }
|
64 |
+
|
65 |
+
.mfp-zoom {
|
66 |
+
cursor: pointer;
|
67 |
+
cursor: -webkit-zoom-in;
|
68 |
+
cursor: -moz-zoom-in;
|
69 |
+
cursor: zoom-in; }
|
70 |
+
|
71 |
+
.mfp-auto-cursor .mfp-content {
|
72 |
+
cursor: auto; }
|
73 |
+
|
74 |
+
.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter {
|
75 |
+
-webkit-user-select: none;
|
76 |
+
-moz-user-select: none;
|
77 |
+
user-select: none; }
|
78 |
+
|
79 |
+
.mfp-loading.mfp-figure {
|
80 |
+
display: none; }
|
81 |
+
|
82 |
+
.mfp-hide {
|
83 |
+
display: none !important; }
|
84 |
+
|
85 |
+
.mfp-preloader {
|
86 |
+
color: #cccccc;
|
87 |
+
position: absolute;
|
88 |
+
top: 50%;
|
89 |
+
width: auto;
|
90 |
+
text-align: center;
|
91 |
+
margin-top: -0.8em;
|
92 |
+
left: 8px;
|
93 |
+
right: 8px;
|
94 |
+
z-index: 1044; }
|
95 |
+
.mfp-preloader a {
|
96 |
+
color: #cccccc; }
|
97 |
+
.mfp-preloader a:hover {
|
98 |
+
color: white; }
|
99 |
+
|
100 |
+
.mfp-s-ready .mfp-preloader {
|
101 |
+
display: none; }
|
102 |
+
|
103 |
+
.mfp-s-error .mfp-content {
|
104 |
+
display: none; }
|
105 |
+
|
106 |
+
button.mfp-close, button.mfp-arrow {
|
107 |
+
overflow: visible;
|
108 |
+
cursor: pointer;
|
109 |
+
background: transparent;
|
110 |
+
border: 0;
|
111 |
+
-webkit-appearance: none;
|
112 |
+
display: block;
|
113 |
+
outline: none;
|
114 |
+
padding: 0;
|
115 |
+
z-index: 1046;
|
116 |
+
-webkit-box-shadow: none;
|
117 |
+
box-shadow: none; }
|
118 |
+
button::-moz-focus-inner {
|
119 |
+
padding: 0;
|
120 |
+
border: 0; }
|
121 |
+
|
122 |
+
.mfp-close {
|
123 |
+
width: 44px;
|
124 |
+
height: 44px;
|
125 |
+
line-height: 44px;
|
126 |
+
position: absolute;
|
127 |
+
right: 0;
|
128 |
+
top: 0;
|
129 |
+
text-decoration: none;
|
130 |
+
text-align: center;
|
131 |
+
opacity: 0.65;
|
132 |
+
filter: alpha(opacity=65);
|
133 |
+
padding: 0 0 18px 10px;
|
134 |
+
color: white;
|
135 |
+
font-style: normal;
|
136 |
+
font-size: 28px;
|
137 |
+
font-family: Arial, Baskerville, monospace; }
|
138 |
+
.mfp-close:hover, .mfp-close:focus {
|
139 |
+
opacity: 1;
|
140 |
+
filter: alpha(opacity=100); }
|
141 |
+
|
142 |
+
.mfp-close-btn-in .mfp-close {
|
143 |
+
color: #333333; }
|
144 |
+
|
145 |
+
.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
|
146 |
+
color: white;
|
147 |
+
right: -6px;
|
148 |
+
text-align: right;
|
149 |
+
padding-right: 6px;
|
150 |
+
width: 100%; }
|
151 |
+
|
152 |
+
.mfp-counter {
|
153 |
+
position: absolute;
|
154 |
+
top: 0;
|
155 |
+
right: 0;
|
156 |
+
color: #cccccc;
|
157 |
+
font-size: 12px;
|
158 |
+
line-height: 18px; }
|
159 |
+
|
160 |
+
.mfp-arrow {
|
161 |
+
position: absolute;
|
162 |
+
opacity: 0.65;
|
163 |
+
filter: alpha(opacity=65);
|
164 |
+
margin: 0;
|
165 |
+
top: 50%;
|
166 |
+
margin-top: -55px;
|
167 |
+
padding: 0;
|
168 |
+
width: 90px;
|
169 |
+
height: 110px;
|
170 |
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
|
171 |
+
.mfp-arrow:active {
|
172 |
+
margin-top: -54px; }
|
173 |
+
.mfp-arrow:hover, .mfp-arrow:focus {
|
174 |
+
opacity: 1;
|
175 |
+
filter: alpha(opacity=100); }
|
176 |
+
.mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a {
|
177 |
+
content: '';
|
178 |
+
display: block;
|
179 |
+
width: 0;
|
180 |
+
height: 0;
|
181 |
+
position: absolute;
|
182 |
+
left: 0;
|
183 |
+
top: 0;
|
184 |
+
margin-top: 35px;
|
185 |
+
margin-left: 35px;
|
186 |
+
border: medium inset transparent; }
|
187 |
+
.mfp-arrow:after, .mfp-arrow .mfp-a {
|
188 |
+
border-top-width: 13px;
|
189 |
+
border-bottom-width: 13px;
|
190 |
+
top: 8px; }
|
191 |
+
.mfp-arrow:before, .mfp-arrow .mfp-b {
|
192 |
+
border-top-width: 21px;
|
193 |
+
border-bottom-width: 21px;
|
194 |
+
opacity: 0.7; }
|
195 |
+
|
196 |
+
.mfp-arrow-left {
|
197 |
+
left: 0; }
|
198 |
+
.mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
|
199 |
+
border-right: 17px solid white;
|
200 |
+
margin-left: 31px; }
|
201 |
+
.mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
|
202 |
+
margin-left: 25px;
|
203 |
+
border-right: 27px solid #3f3f3f; }
|
204 |
+
|
205 |
+
.mfp-arrow-right {
|
206 |
+
right: 0; }
|
207 |
+
.mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
|
208 |
+
border-left: 17px solid white;
|
209 |
+
margin-left: 39px; }
|
210 |
+
.mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
|
211 |
+
border-left: 27px solid #3f3f3f; }
|
212 |
+
|
213 |
+
.mfp-iframe-holder {
|
214 |
+
padding-top: 40px;
|
215 |
+
padding-bottom: 40px; }
|
216 |
+
.mfp-iframe-holder .mfp-content {
|
217 |
+
line-height: 0;
|
218 |
+
width: 100%;
|
219 |
+
max-width: 900px; }
|
220 |
+
.mfp-iframe-holder .mfp-close {
|
221 |
+
top: -40px; }
|
222 |
+
|
223 |
+
.mfp-iframe-scaler {
|
224 |
+
width: 100%;
|
225 |
+
height: 0;
|
226 |
+
overflow: hidden;
|
227 |
+
padding-top: 56.25%; }
|
228 |
+
.mfp-iframe-scaler iframe {
|
229 |
+
position: absolute;
|
230 |
+
display: block;
|
231 |
+
top: 0;
|
232 |
+
left: 0;
|
233 |
+
width: 100%;
|
234 |
+
height: 100%;
|
235 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
236 |
+
background: black; }
|
237 |
+
|
238 |
+
/* Main image in popup */
|
239 |
+
img.mfp-img {
|
240 |
+
width: auto;
|
241 |
+
max-width: 100%;
|
242 |
+
height: auto;
|
243 |
+
display: block;
|
244 |
+
line-height: 0;
|
245 |
+
-webkit-box-sizing: border-box;
|
246 |
+
-moz-box-sizing: border-box;
|
247 |
+
box-sizing: border-box;
|
248 |
+
padding: 40px 0 40px;
|
249 |
+
margin: 0 auto; }
|
250 |
+
|
251 |
+
/* The shadow behind the image */
|
252 |
+
.mfp-figure {
|
253 |
+
line-height: 0; }
|
254 |
+
.mfp-figure:after {
|
255 |
+
content: '';
|
256 |
+
position: absolute;
|
257 |
+
left: 0;
|
258 |
+
top: 40px;
|
259 |
+
bottom: 40px;
|
260 |
+
display: block;
|
261 |
+
right: 0;
|
262 |
+
width: auto;
|
263 |
+
height: auto;
|
264 |
+
z-index: -1;
|
265 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
266 |
+
background: #444444; }
|
267 |
+
.mfp-figure small {
|
268 |
+
color: #bdbdbd;
|
269 |
+
display: block;
|
270 |
+
font-size: 12px;
|
271 |
+
line-height: 14px; }
|
272 |
+
.mfp-figure figure {
|
273 |
+
margin: 0; }
|
274 |
+
|
275 |
+
.mfp-bottom-bar {
|
276 |
+
margin-top: -36px;
|
277 |
+
position: absolute;
|
278 |
+
top: 100%;
|
279 |
+
left: 0;
|
280 |
+
width: 100%;
|
281 |
+
cursor: auto; }
|
282 |
+
|
283 |
+
.mfp-title {
|
284 |
+
text-align: left;
|
285 |
+
line-height: 18px;
|
286 |
+
color: #f3f3f3;
|
287 |
+
word-wrap: break-word;
|
288 |
+
padding-right: 36px; }
|
289 |
+
|
290 |
+
.mfp-image-holder .mfp-content {
|
291 |
+
max-width: 100%; }
|
292 |
+
|
293 |
+
.mfp-gallery .mfp-image-holder .mfp-figure {
|
294 |
+
cursor: pointer; }
|
295 |
+
|
296 |
+
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
297 |
+
/**
|
298 |
+
* Remove all paddings around the image on small screen
|
299 |
+
*/
|
300 |
+
.mfp-img-mobile .mfp-image-holder {
|
301 |
+
padding-left: 0;
|
302 |
+
padding-right: 0; }
|
303 |
+
.mfp-img-mobile img.mfp-img {
|
304 |
+
padding: 0; }
|
305 |
+
.mfp-img-mobile .mfp-figure:after {
|
306 |
+
top: 0;
|
307 |
+
bottom: 0; }
|
308 |
+
.mfp-img-mobile .mfp-figure small {
|
309 |
+
display: inline;
|
310 |
+
margin-left: 5px; }
|
311 |
+
.mfp-img-mobile .mfp-bottom-bar {
|
312 |
+
background: rgba(0, 0, 0, 0.6);
|
313 |
+
bottom: 0;
|
314 |
+
margin: 0;
|
315 |
+
top: auto;
|
316 |
+
padding: 3px 5px;
|
317 |
+
position: fixed;
|
318 |
+
-webkit-box-sizing: border-box;
|
319 |
+
-moz-box-sizing: border-box;
|
320 |
+
box-sizing: border-box; }
|
321 |
+
.mfp-img-mobile .mfp-bottom-bar:empty {
|
322 |
+
padding: 0; }
|
323 |
+
.mfp-img-mobile .mfp-counter {
|
324 |
+
right: 5px;
|
325 |
+
top: 3px; }
|
326 |
+
.mfp-img-mobile .mfp-close {
|
327 |
+
top: 0;
|
328 |
+
right: 0;
|
329 |
+
width: 35px;
|
330 |
+
height: 35px;
|
331 |
+
line-height: 35px;
|
332 |
+
background: rgba(0, 0, 0, 0.6);
|
333 |
+
position: fixed;
|
334 |
+
text-align: center;
|
335 |
+
padding: 0; } }
|
336 |
+
|
337 |
+
@media all and (max-width: 900px) {
|
338 |
+
.mfp-arrow {
|
339 |
+
-webkit-transform: scale(0.75);
|
340 |
+
transform: scale(0.75); }
|
341 |
+
.mfp-arrow-left {
|
342 |
+
-webkit-transform-origin: 0;
|
343 |
+
transform-origin: 0; }
|
344 |
+
.mfp-arrow-right {
|
345 |
+
-webkit-transform-origin: 100%;
|
346 |
+
transform-origin: 100%; }
|
347 |
+
.mfp-container {
|
348 |
+
padding-left: 6px;
|
349 |
+
padding-right: 6px; } }
|
350 |
+
|
351 |
+
.mfp-ie7 .mfp-img {
|
352 |
+
padding: 0; }
|
353 |
+
.mfp-ie7 .mfp-bottom-bar {
|
354 |
+
width: 600px;
|
355 |
+
left: 50%;
|
356 |
+
margin-left: -300px;
|
357 |
+
margin-top: 5px;
|
358 |
+
padding-bottom: 5px; }
|
359 |
+
.mfp-ie7 .mfp-container {
|
360 |
+
padding: 0; }
|
361 |
+
.mfp-ie7 .mfp-content {
|
362 |
+
padding-top: 44px; }
|
363 |
+
.mfp-ie7 .mfp-close {
|
364 |
+
top: 0;
|
365 |
+
right: 0;
|
366 |
+
padding-top: 0; }
|
trunk/css/settings.css
ADDED
@@ -0,0 +1,293 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
img {
|
2 |
+
max-width: 100%;
|
3 |
+
height: auto;
|
4 |
+
}
|
5 |
+
.clear {
|
6 |
+
clear: both;
|
7 |
+
}
|
8 |
+
.f-left {
|
9 |
+
float: left;
|
10 |
+
}
|
11 |
+
.fl-right {
|
12 |
+
float: right;
|
13 |
+
}
|
14 |
+
.tabs {
|
15 |
+
display: none;
|
16 |
+
background: #fff;
|
17 |
+
padding: 20px 20px 0;
|
18 |
+
}
|
19 |
+
.tabs.visible {
|
20 |
+
display: block;
|
21 |
+
}
|
22 |
+
.nav-tab-wrapper a {
|
23 |
+
background: none;
|
24 |
+
border: none;
|
25 |
+
}
|
26 |
+
.nav-tab-wrapper a:hover {
|
27 |
+
border: none;
|
28 |
+
}
|
29 |
+
.nav-tab-wrapper a.nav-tab-active {
|
30 |
+
background: #fff;
|
31 |
+
}
|
32 |
+
.form-table {
|
33 |
+
margin-top: 0;
|
34 |
+
padding-top: 0.5em;
|
35 |
+
margin-bottom: 20px;
|
36 |
+
}
|
37 |
+
h2.nav-tab-wrapper {
|
38 |
+
border: none;
|
39 |
+
padding-left: 0;
|
40 |
+
}
|
41 |
+
h2.ead-title {
|
42 |
+
background: url(../images/icon-ead.png) no-repeat 0 14px;
|
43 |
+
padding-left: 46px !important;
|
44 |
+
padding-bottom: 25px !important;
|
45 |
+
}
|
46 |
+
.ead-left-wrap {
|
47 |
+
float: left;
|
48 |
+
width: 100%;
|
49 |
+
-moz-box-sizing: border-box;
|
50 |
+
-webkit-box-sizing: border-box;
|
51 |
+
box-sizing: border-box;
|
52 |
+
padding-right: 340px;
|
53 |
+
margin-right: -340px;
|
54 |
+
}
|
55 |
+
.ead-left-wrap h3{
|
56 |
+
font-weight: 300;
|
57 |
+
font-size: 20px;
|
58 |
+
margin: 0 0 20px;
|
59 |
+
}
|
60 |
+
.ead-form-footer{
|
61 |
+
margin: 0 -20px;
|
62 |
+
padding: 20px;
|
63 |
+
background: #f5f5f5;
|
64 |
+
border-top: 1px solid #ddd;
|
65 |
+
-webkit-box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);
|
66 |
+
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);
|
67 |
+
overflow: hidden;
|
68 |
+
}
|
69 |
+
.ead-form-footer p{
|
70 |
+
margin: 0;
|
71 |
+
float: right;
|
72 |
+
padding: 0;
|
73 |
+
}
|
74 |
+
.ead-form-footer .button{
|
75 |
+
height: 42px;
|
76 |
+
}
|
77 |
+
.ead-right-wrap {
|
78 |
+
float: right;
|
79 |
+
max-width: 300px;
|
80 |
+
color: #372e2e;
|
81 |
+
}
|
82 |
+
.ead-banner{
|
83 |
+
text-align: center;
|
84 |
+
padding-top: 20px;
|
85 |
+
}
|
86 |
+
.ead-right-inner {
|
87 |
+
background: #fff;
|
88 |
+
margin-bottom: 10px;
|
89 |
+
}
|
90 |
+
.ead-right-inner h3{
|
91 |
+
margin: 0;
|
92 |
+
padding: 15px 20px;
|
93 |
+
border-bottom: 1px solid #ddd;
|
94 |
+
margin-bottom: 15px;
|
95 |
+
font-size: 14px;
|
96 |
+
color: #5b5b5b;
|
97 |
+
font-weight: normal;
|
98 |
+
}
|
99 |
+
.ead-right-inner ol{
|
100 |
+
padding: 0 20px 15px;
|
101 |
+
margin: 0 0 0 20px;
|
102 |
+
}
|
103 |
+
.ead-right-inner ol a{
|
104 |
+
text-decoration: none;
|
105 |
+
}
|
106 |
+
.author-info {
|
107 |
+
padding: 10px 15px;
|
108 |
+
text-align: center;
|
109 |
+
}
|
110 |
+
.awsm-social {
|
111 |
+
text-align: center;
|
112 |
+
list-style-type: none;
|
113 |
+
padding: 15px;
|
114 |
+
border-bottom: 1px solid #dadada;
|
115 |
+
margin: 0;
|
116 |
+
}
|
117 |
+
.awsm-social li {
|
118 |
+
display: inline-block;
|
119 |
+
margin: 0 6px;
|
120 |
+
}
|
121 |
+
.awsm-icon {
|
122 |
+
background: url(../images/ead-icon-sprite.jpg) no-repeat;
|
123 |
+
display: block;
|
124 |
+
width: 21px;
|
125 |
+
height: 21px;
|
126 |
+
text-indent: -999999px;
|
127 |
+
opacity: 0.46;
|
128 |
+
}
|
129 |
+
.awsm-icon:hover {
|
130 |
+
opacity: 1;
|
131 |
+
}
|
132 |
+
.awsm-icon-facebook {} .awsm-icon-twitter {
|
133 |
+
background-position: -26px 0;
|
134 |
+
}
|
135 |
+
.awsm-icon-github {
|
136 |
+
background-position: -52px 0;
|
137 |
+
}
|
138 |
+
.awsm-icon-behance {
|
139 |
+
background-position: -78px 0;
|
140 |
+
width: 28px;
|
141 |
+
}
|
142 |
+
.awsm-icon-dribbble {
|
143 |
+
background-position: right 0;
|
144 |
+
}
|
145 |
+
.paypal {
|
146 |
+
text-align: center;
|
147 |
+
}
|
148 |
+
.paypal input.small {
|
149 |
+
vertical-align: top;
|
150 |
+
margin-right: 20px;
|
151 |
+
}
|
152 |
+
.paypal .donate-btn {
|
153 |
+
vertical-align: top;
|
154 |
+
padding: 0;
|
155 |
+
}
|
156 |
+
input.small {
|
157 |
+
max-width: 60px;
|
158 |
+
}
|
159 |
+
.ead-frame-width {
|
160 |
+
margin-right: 15px;
|
161 |
+
margin-bottom: 10px;
|
162 |
+
}
|
163 |
+
.ead-frame-height {
|
164 |
+
margin-bottom: 10px;
|
165 |
+
}
|
166 |
+
.row-col{
|
167 |
+
margin: 0 -5px 10px;
|
168 |
+
overflow: hidden;
|
169 |
+
}
|
170 |
+
.col-2{
|
171 |
+
float: left;
|
172 |
+
padding: 0 5px;
|
173 |
+
width: 50%;
|
174 |
+
-moz-box-sizing: border-box;
|
175 |
+
-webkit-box-sizing: border-box;
|
176 |
+
box-sizing: border-box;
|
177 |
+
}
|
178 |
+
.col-2 a{
|
179 |
+
background: #fff;
|
180 |
+
display: block;
|
181 |
+
text-align: center;
|
182 |
+
padding: 25px 10px;
|
183 |
+
text-decoration: none;
|
184 |
+
}
|
185 |
+
|
186 |
+
.col-2 a img{
|
187 |
+
display: block;
|
188 |
+
margin: 0 auto 10px;
|
189 |
+
}
|
190 |
+
span.note, .ead_supported {
|
191 |
+
font-size: 12px;
|
192 |
+
color: #999;
|
193 |
+
}
|
194 |
+
div.awsm-error, div.awsm-updated {
|
195 |
+
margin: 5px 0 2px;
|
196 |
+
border-width: 1px 1px 1px 4px;
|
197 |
+
border-style: solid;
|
198 |
+
-webkit-border-radius: 4px;
|
199 |
+
border-radius: 4px;
|
200 |
+
}
|
201 |
+
div.awsm-updated {
|
202 |
+
background-color: #fff;
|
203 |
+
border-color: #eee #eee #eee #7ad03a;
|
204 |
+
padding: 1px 12px;
|
205 |
+
}
|
206 |
+
div.awsm-error {
|
207 |
+
background: none repeat scroll 0 0 #fff;
|
208 |
+
border-color: #eee #eee #eee #dd3d36;
|
209 |
+
padding: 1px 12px;
|
210 |
+
}
|
211 |
+
div.awsm-error p, div.awsm-updated p {
|
212 |
+
margin: 0.5em 0;
|
213 |
+
padding: 2px;
|
214 |
+
}
|
215 |
+
.ead_doller {
|
216 |
+
display: inline-block;
|
217 |
+
vertical-align: top;
|
218 |
+
margin: 5px 5px 0 0;
|
219 |
+
font-weight: bold;
|
220 |
+
}
|
221 |
+
#supportform label {
|
222 |
+
display: block;
|
223 |
+
margin-bottom: 5px;
|
224 |
+
font-weight: bold;
|
225 |
+
}
|
226 |
+
.text-input {
|
227 |
+
width: 100%;
|
228 |
+
height: 40px;
|
229 |
+
-moz-box-sizing: border-box;
|
230 |
+
-webkit-box-sizing: border-box;
|
231 |
+
box-sizing: border-box;
|
232 |
+
}
|
233 |
+
#supportform textarea {
|
234 |
+
-moz-box-sizing: border-box;
|
235 |
+
-webkit-box-sizing: border-box;
|
236 |
+
box-sizing: border-box;
|
237 |
+
width: 100%;
|
238 |
+
}
|
239 |
+
.ead_supported span {
|
240 |
+
display: block;
|
241 |
+
font-weight: bold;
|
242 |
+
margin-top: 10px;
|
243 |
+
}
|
244 |
+
.supportedlist ul {
|
245 |
+
margin-top: 5px;
|
246 |
+
}
|
247 |
+
.supportedlist li {
|
248 |
+
padding-left: 17px;
|
249 |
+
position: relative;
|
250 |
+
}
|
251 |
+
.supportedlist li span {
|
252 |
+
position: absolute;
|
253 |
+
left: 0;
|
254 |
+
top: 3px;
|
255 |
+
width: 11px;
|
256 |
+
height: 11px;
|
257 |
+
margin: 0;
|
258 |
+
}
|
259 |
+
.supportedlist li span.ead-check {
|
260 |
+
background: url(../images/icon-yes.png) no-repeat;
|
261 |
+
}
|
262 |
+
.supportedlist li span.ead-close {
|
263 |
+
background: url(../images/icon-no.png) no-repeat;
|
264 |
+
}
|
265 |
+
.col-left {
|
266 |
+
float: left;
|
267 |
+
width: 47%;
|
268 |
+
margin-right: 6%;
|
269 |
+
}
|
270 |
+
.col-right {
|
271 |
+
float: right;
|
272 |
+
width: 47%;
|
273 |
+
}
|
274 |
+
@media (max-width: 800px) {
|
275 |
+
.ead-left-wrap {
|
276 |
+
float: none;
|
277 |
+
width: 100%;
|
278 |
+
margin-bottom: 30px;
|
279 |
+
padding-right: 0;
|
280 |
+
margin-right: 0;
|
281 |
+
}
|
282 |
+
.ead-right-wrap {
|
283 |
+
float: none;
|
284 |
+
width: 100%;
|
285 |
+
}
|
286 |
+
}
|
287 |
+
@media (max-width: 980px) {
|
288 |
+
.col-left, .col-right {
|
289 |
+
float: none;
|
290 |
+
width: 100%;
|
291 |
+
margin-right: 0%;
|
292 |
+
}
|
293 |
+
}
|
trunk/images/donate.gif
ADDED
Binary file
|
trunk/images/ead-button.png
ADDED
Binary file
|
trunk/images/ead-icon-sprite.jpg
ADDED
Binary file
|
trunk/images/ead-small.png
ADDED
Binary file
|
trunk/images/eadplus-banner.png
ADDED
Binary file
|
trunk/images/icon-box.png
ADDED
Binary file
|
trunk/images/icon-close.png
ADDED
Binary file
|
trunk/images/icon-drive.png
ADDED
Binary file
|
trunk/images/icon-dropbox.png
ADDED
Binary file
|
trunk/images/icon-ead.png
ADDED
Binary file
|
trunk/images/icon-link.png
ADDED
Binary file
|
trunk/images/icon-no.png
ADDED
Binary file
|
trunk/images/icon-success.png
ADDED
Binary file
|
trunk/images/icon-upload.png
ADDED
Binary file
|
trunk/images/icon-yes.png
ADDED
Binary file
|
trunk/images/star.gif
ADDED
Binary file
|
trunk/images/ticket.gif
ADDED
Binary file
|
trunk/inc/functions.php
ADDED
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Dropdown Builder
|
5 |
+
*
|
6 |
+
* @since 1.0
|
7 |
+
* @return String select html
|
8 |
+
*/
|
9 |
+
function ead_selectbuilder($name, $options, $selected = "", $class = "") {
|
10 |
+
if (is_array($options)):
|
11 |
+
echo "<select name=\"$name\" id=\"$name\" class=\"$class\">";
|
12 |
+
foreach ($options as $key => $option) {
|
13 |
+
echo "<option value=\"$key\"";
|
14 |
+
if (!empty($helptext)) {
|
15 |
+
echo " title=\"$helptext\"";
|
16 |
+
}
|
17 |
+
if ($key == $selected) {
|
18 |
+
echo ' selected="selected"';
|
19 |
+
}
|
20 |
+
echo ">$option</option>\n";
|
21 |
+
}
|
22 |
+
echo '</select>';
|
23 |
+
else:
|
24 |
+
endif;
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Human Readable filesize
|
29 |
+
*
|
30 |
+
* @since 1.0
|
31 |
+
* @return Human readable file size
|
32 |
+
* @note Replaces old gde_sanitizeOpts function
|
33 |
+
*/
|
34 |
+
function ead_human_filesize($bytes, $decimals = 2) {
|
35 |
+
$size = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
|
36 |
+
$factor = floor((strlen($bytes) - 1) / 3);
|
37 |
+
return sprintf("%.{$decimals}f ", $bytes / pow(1024, $factor)) . @$size[$factor];
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Sanitize dimensions (width, height)
|
42 |
+
*
|
43 |
+
* @since 1.0
|
44 |
+
* @return string Sanitized dimensions, or false if value is invalid
|
45 |
+
* @note Replaces old gde_sanitizeOpts function
|
46 |
+
*/
|
47 |
+
function ead_sanitize_dims($dim) {
|
48 |
+
|
49 |
+
// remove any spacing junk
|
50 |
+
$dim = trim(str_replace(" ", "", $dim));
|
51 |
+
|
52 |
+
if (!strstr($dim, '%')) {
|
53 |
+
$type = "px";
|
54 |
+
$dim = preg_replace("/[^0-9]*/", '', $dim);
|
55 |
+
} else {
|
56 |
+
$type = "%";
|
57 |
+
$dim = preg_replace("/[^0-9]*/", '', $dim);
|
58 |
+
if ((int)$dim > 100) {
|
59 |
+
$dim = "100";
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
if ($dim) {
|
64 |
+
return $dim . $type;
|
65 |
+
} else {
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Validate File url
|
72 |
+
*
|
73 |
+
* @since 1.0
|
74 |
+
* @return string Download link
|
75 |
+
*/
|
76 |
+
function ead_validateurl($url) {
|
77 |
+
$types = ead_validmimeTypes();
|
78 |
+
$url = esc_url($url, array('http', 'https'));
|
79 |
+
$remote = wp_remote_head($url);
|
80 |
+
$json['status'] = false;
|
81 |
+
$json['message'] = '';
|
82 |
+
if (wp_remote_retrieve_response_code($remote) == 200) {
|
83 |
+
|
84 |
+
//Gzip Support
|
85 |
+
$filename = pathinfo($url);
|
86 |
+
$doctypes = ead_validmimeTypes();
|
87 |
+
if (ead_validType($url, $doctypes)) {
|
88 |
+
$json['status'] = true;
|
89 |
+
$json['message'] = __("Done", 'embed-any-document');
|
90 |
+
$json['file']['url'] = $url;
|
91 |
+
if (isset($filename)) {
|
92 |
+
$json['file']['filename'] = $filename['basename'];
|
93 |
+
} else {
|
94 |
+
$json['file']['filename'] = __("Document", 'embed-any-document');
|
95 |
+
}
|
96 |
+
if (!is_wp_error($filedata) && isset($filedata['headers']['content-length'])) {
|
97 |
+
$json['file']['filesizeHumanReadable'] = ead_human_filesize($remote['headers']['content-length']);
|
98 |
+
} else {
|
99 |
+
$json['file']['filesizeHumanReadable'] = 0;
|
100 |
+
}
|
101 |
+
} else {
|
102 |
+
$json['message'] = __("File format is not supported.", 'embed-any-document');
|
103 |
+
$json['status'] = false;
|
104 |
+
}
|
105 |
+
} elseif (is_wp_error($remote)) {
|
106 |
+
$json['message'] = $remote->get_error_message();
|
107 |
+
$json['status'] = false;
|
108 |
+
} else {
|
109 |
+
$json['message'] = __('Sorry, the file URL is not valid.', 'embed-any-document');
|
110 |
+
$json['status'] = false;
|
111 |
+
}
|
112 |
+
return $json;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Validate google url
|
117 |
+
*
|
118 |
+
* @since 1.0
|
119 |
+
* @return string Download link
|
120 |
+
*/
|
121 |
+
function ead_ValidateDriveUrl($url) {
|
122 |
+
$remote = wp_remote_head($url);
|
123 |
+
$json['status'] = false;
|
124 |
+
$json['message'] = '';
|
125 |
+
if (wp_remote_retrieve_response_code($remote) == 200) {
|
126 |
+
$json['message'] = __("Done", 'embed-any-document');
|
127 |
+
$json['status'] = true;
|
128 |
+
} else {
|
129 |
+
$json['message'] = __('The document you have chosen is a not public.', 'embed-any-document') . __(' Only the owner and explicitly shared collaborators will be able to view it.', 'embed-any-document');
|
130 |
+
$json['status'] = false;
|
131 |
+
}
|
132 |
+
return $json;
|
133 |
+
}
|
134 |
+
/**
|
135 |
+
* Get Email node
|
136 |
+
*
|
137 |
+
* @since 1.0
|
138 |
+
* @return string email html
|
139 |
+
*/
|
140 |
+
function ead_getemailnode($emaildata, $postdata) {
|
141 |
+
$emailhtml = "";
|
142 |
+
foreach ($emaildata as $key => $label) {
|
143 |
+
if ($postdata[$key]) {
|
144 |
+
$emailhtml.= '<tr bgcolor="#EAF2FA">
|
145 |
+
<td colspan="2"><font style="font-family:sans-serif;font-size:12px"><strong>' . $label . '</strong></font></td>
|
146 |
+
</tr>
|
147 |
+
<tr bgcolor="#FFFFFF">
|
148 |
+
<td width="20"> </td>
|
149 |
+
<td><font style="font-family:sans-serif;font-size:12px">' . $postdata[$key] . '</font></td>
|
150 |
+
</tr>';
|
151 |
+
}
|
152 |
+
}
|
153 |
+
return $emailhtml;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Validate Source mime type
|
158 |
+
*
|
159 |
+
* @since 1.0
|
160 |
+
* @return boolean
|
161 |
+
*/
|
162 |
+
function ead_validmimeTypes() {
|
163 |
+
include ('mime_types.php');
|
164 |
+
return $mimetypes;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Checks Url Validity
|
169 |
+
*
|
170 |
+
* @since 1.0
|
171 |
+
* @return boolean
|
172 |
+
*/
|
173 |
+
function ead_validType($url) {
|
174 |
+
$doctypes = ead_validmimeTypes();
|
175 |
+
if (is_array($doctypes)) {
|
176 |
+
$allowed_ext = implode("|", array_keys($doctypes));
|
177 |
+
if (preg_match("/\.($allowed_ext)$/i", $url)) {
|
178 |
+
return true;
|
179 |
+
}
|
180 |
+
} else {
|
181 |
+
return false;
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Get allowed Mime Types
|
187 |
+
*
|
188 |
+
* @since 1.0
|
189 |
+
* @return string Mimetypes
|
190 |
+
*/
|
191 |
+
function ead_validembedtypes() {
|
192 |
+
$doctypes = ead_validmimeTypes();
|
193 |
+
return $allowedtype = implode(',', $doctypes);
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Get allowed Extensions
|
198 |
+
*
|
199 |
+
* @since 1.0
|
200 |
+
* @return string Extenstion
|
201 |
+
*/
|
202 |
+
function ead_validextensions($list = 'all') {
|
203 |
+
include ('mime_types.php');
|
204 |
+
return $allowedtype = implode(',', $extensions[$list]);
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Get allowed Mime Types for microsoft
|
209 |
+
*
|
210 |
+
* @since 1.0
|
211 |
+
* @return array Mimetypes
|
212 |
+
*/
|
213 |
+
function ead_microsoft_mimes() {
|
214 |
+
$micro_mime = array(
|
215 |
+
'doc' => 'application/msword',
|
216 |
+
'pot|pps|ppt' => 'application/vnd.ms-powerpoint',
|
217 |
+
'xla|xls|xlt|xlw' => 'application/vnd.ms-excel',
|
218 |
+
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
219 |
+
'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
220 |
+
'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
|
221 |
+
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
222 |
+
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
|
223 |
+
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
|
224 |
+
);
|
225 |
+
return $micro_mime;
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Check Allow Download
|
230 |
+
*
|
231 |
+
* @since 1.0
|
232 |
+
* @return Boolean
|
233 |
+
*/
|
234 |
+
function ead_allowdownload($provider) {
|
235 |
+
$blacklist = array('drive', 'box');
|
236 |
+
if (in_array($provider, $blacklist)) {
|
237 |
+
return false;
|
238 |
+
} else {
|
239 |
+
return true;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Get Active Menu Class
|
245 |
+
*
|
246 |
+
* @since 1.0
|
247 |
+
* @return string Class name
|
248 |
+
*/
|
249 |
+
function ead_getactiveMenu($tab, $needle) {
|
250 |
+
if ($tab == $needle) {
|
251 |
+
echo 'nav-tab-active';
|
252 |
+
}
|
253 |
+
}
|
trunk/inc/mime_types.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$mimetypes = array(
|
3 |
+
// Text formats
|
4 |
+
'txt|asc|c|cc|h' => 'text/plain',
|
5 |
+
'rtx' => 'text/richtext',
|
6 |
+
'css' => 'text/css',
|
7 |
+
// Misc application formats
|
8 |
+
'js' => 'application/javascript',
|
9 |
+
'pdf' => 'application/pdf',
|
10 |
+
'ai' => 'application/postscript',
|
11 |
+
'tif' => 'image/tiff',
|
12 |
+
'tiff' => 'image/tiff',
|
13 |
+
// MS Office formats
|
14 |
+
'doc' => 'application/msword',
|
15 |
+
'pot|pps|ppt' => 'application/vnd.ms-powerpoint',
|
16 |
+
'xla|xls|xlt|xlw' => 'application/vnd.ms-excel',
|
17 |
+
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
18 |
+
'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
19 |
+
'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
|
20 |
+
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
21 |
+
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
|
22 |
+
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
23 |
+
'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
|
24 |
+
// iWork formats
|
25 |
+
'pages' => 'application/vnd.apple.pages',
|
26 |
+
//Additional Mime Types
|
27 |
+
'svg' => 'image/svg+xml',
|
28 |
+
);
|
29 |
+
$extensions['all'] = array('.css','.js','.pdf','.ai','.tif','.tiff','.doc','.txt','.asc','.c','.cc','.h','.pot','.pps','.ppt','.xla','.xls','.xlt','.xlw','.docx','.dotx','.dotm','.xlsx','.xlsm','.pptx','.pages','.svg','ppsx');
|
30 |
+
$extensions['ms'] = array('.doc','.pot','.pps','.ppt','.xla','.xls','.xlt','.xlw','.docx','.dotx','.dotm','.xlsx','.xlsm','.pptx','ppsx');
|
31 |
+
?>
|
trunk/inc/popup.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
+
<div id="embed-popup-wrap">
|
3 |
+
<div id="embed-popup">
|
4 |
+
<button title="Close" type="button" class="mfp-close">×</button>
|
5 |
+
<div id="popup-header" class="ead-popup-header">
|
6 |
+
<h1><?php _e('Add Document',$this->text_domain);?></h1>
|
7 |
+
</div>
|
8 |
+
<div class="ead-section">
|
9 |
+
<div id="embed_message" class="awsm-error" style="display:none;"><p></p></div>
|
10 |
+
<div class="ead_container">
|
11 |
+
<form action="" onSubmit="return false" method="post" enctype="multipart/form-data" id="Docuploader">
|
12 |
+
<ul class="ead-options">
|
13 |
+
<li><a href="#" id="upload_doc"><span><img src="<?php echo $this->plugin_url;?>images/icon-upload.png" alt="Upload document" /><?php _e('Upload Document',$this->text_domain);?></span></a></li>
|
14 |
+
<li><a href="#" id="addDocUrl"><span><img src="<?php echo $this->plugin_url;?>images/icon-link.png" alt="Add From URL" /><?php _e('Add from URL',$this->text_domain);?></span></a></li>
|
15 |
+
<li><?php echo $this->providerlink('ead_dropbox','DropBoxUpload','Dropbox') ;?></li>
|
16 |
+
<li><?php echo $this->providerlink(array('ead_drivekey','ead_driveClient'),'GooglePicker','Drive') ;?></li>
|
17 |
+
<li><?php echo $this->providerlink('ead_box','boxPicker','Box') ;?></li>
|
18 |
+
</ul>
|
19 |
+
<div class="box addurl_box">
|
20 |
+
<label for="awsm_url"><?php _e('Enter document URL',$this->text_domain);?></label>
|
21 |
+
<input name="awsm_url" type="text" class="opt dwl input-group-text" placeholder="Eg: http://www.yoursite.com/file.pdf" id="awsm_url"/>
|
22 |
+
<input type="button" value="Add URL" class="ead-btn button-primary input-group-btn" id="add_url"/>
|
23 |
+
<div class="clear"></div>
|
24 |
+
<a href="#" class="go-back">← back</a>
|
25 |
+
</div>
|
26 |
+
</form>
|
27 |
+
</div><!--ead_container-->
|
28 |
+
<div class="upload-success">
|
29 |
+
<div class="inner">
|
30 |
+
<div class="uploaded-doccument">
|
31 |
+
<p id="ead_filename"></p>
|
32 |
+
<span id="ead_filesize"></span>
|
33 |
+
</div>
|
34 |
+
<div class="clear"></div>
|
35 |
+
</div>
|
36 |
+
<div class="advanced_options">
|
37 |
+
<h3><?php _e('Advanced Options',$this->text_domain);?></span></h3>
|
38 |
+
<ul class="option-fields">
|
39 |
+
<li>
|
40 |
+
<div class="f-left"><label>Width</label> <input type="text" name="width" class="embedval input-small" id="ead_width" value="<?php echo get_option('ead_width', '100%' );?>"></div>
|
41 |
+
<div class="f-left"><label>Height</label> <input type="text" name="height" class="embedval input-small" id="ead_height" value="<?php echo get_option('ead_height', '500px' );?>"></div>
|
42 |
+
<div class="f-left" id="ead_downloadc">
|
43 |
+
<label><?php _e('Show Download Link',$this->text_domain);?></label>
|
44 |
+
<?php
|
45 |
+
$downoptions= array('all' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('No Download',$this->text_domain));
|
46 |
+
ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download')),'ead_usc');
|
47 |
+
?>
|
48 |
+
</div>
|
49 |
+
<div class="f-left last" id="new_provider">
|
50 |
+
<label><?php _e('Viewer',$this->text_domain);?></label>
|
51 |
+
<?php
|
52 |
+
$providers = array('google' => __('Google Docs Viewer',$this->text_domain),'microsoft' => __('Microsoft Office Online',$this->text_domain));
|
53 |
+
ead_selectbuilder('ead_provider', $providers,esc_attr( get_option('ead_provider','google')),'ead_usc');
|
54 |
+
?>
|
55 |
+
</div>
|
56 |
+
<div class="f-left last" id="ead_pseudo" style="display:none">
|
57 |
+
<label><?php _e('Viewer',$this->text_domain);?></label>
|
58 |
+
<select name="ead_pseudo" disabled>
|
59 |
+
<option value="box">Box</option>
|
60 |
+
<option value="drive">Drive</option>
|
61 |
+
</select>
|
62 |
+
</div>
|
63 |
+
<div class="clear"></div>
|
64 |
+
</li>
|
65 |
+
|
66 |
+
<li>
|
67 |
+
<label><?php _e('Shortcode Preview',$this->text_domain); ?></label>
|
68 |
+
<textarea name="shortcode" style="width:100%" id="shortcode" readonly="readonly"></textarea>
|
69 |
+
</li>
|
70 |
+
</ul>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
<div class="mceActionPanel ead-action-panel">
|
75 |
+
<div style="float: right">
|
76 |
+
<input type="button" id="insert_doc" name="insert" data-txt="<?php _e('Insert', $this->text_domain); ?>" data-loading="<?php _e('Loading...', $this->text_domain); ?>" class="ead-btn button button-primary button-medium" value="<?php _e('Insert', $this->text_domain); ?>" disabled/>
|
77 |
+
</div>
|
78 |
+
|
79 |
+
<div style="float: left">
|
80 |
+
<input type="button" name="cancel" class="ead-btn button cancel_embed button-medium" value="<?php _e('Cancel', $this->text_domain); ?>" />
|
81 |
+
</div>
|
82 |
+
<div class="clear"></div>
|
83 |
+
</div>
|
84 |
+
|
85 |
+
</div>
|
86 |
+
</div>
|
trunk/inc/settings.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?>
|
2 |
+
<div class="wrap">
|
3 |
+
<h2 class="ead-title"><?php _e('Embed Any Document by AWSM.in',$this->text_domain);?></h2>
|
4 |
+
<div class="ead-left-wrap">
|
5 |
+
|
6 |
+
<div class="tabs visible" id="general">
|
7 |
+
<h3>General Settings</h3>
|
8 |
+
<form method="post" action="options.php">
|
9 |
+
<?php settings_fields( 'ead-settings-group' ); ?>
|
10 |
+
<table class="form-table">
|
11 |
+
<tr valign="top">
|
12 |
+
<th scope="row"><?php _e('Default Size', $this->text_domain); ?></th>
|
13 |
+
<td>
|
14 |
+
<div class="f-left ead-frame-width"><?php _e('Width', $this->text_domain); ?>
|
15 |
+
<input type="text" class="small" name="ead_width" value="<?php echo esc_attr( get_option('ead_width','100%') ); ?>" />
|
16 |
+
</div>
|
17 |
+
<div class="f-left ead-frame-height">
|
18 |
+
<?php _e('Height', $this->text_domain); ?>
|
19 |
+
<input type="text" class="small" name="ead_height" value="<?php echo esc_attr( get_option('ead_height','500px') ); ?>" />
|
20 |
+
</div>
|
21 |
+
<div class="clear"></div>
|
22 |
+
<span class="note"><?php _e('Enter values in pixels or percentage (Example: 500px or 100%)', $this->text_domain); ?></span>
|
23 |
+
</td>
|
24 |
+
</tr>
|
25 |
+
<tr valign="top">
|
26 |
+
<th scope="row"><?php _e('Show Download Link',$this->text_domain);?></th>
|
27 |
+
<td>
|
28 |
+
<?php
|
29 |
+
$downoptions= array('alluser' => __('For all users',$this->text_domain),'logged' => __('For Logged-in users',$this->text_domain),'none' => __('No Download',$this->text_domain));
|
30 |
+
ead_selectbuilder('ead_download', $downoptions,esc_attr( get_option('ead_download','none')));
|
31 |
+
?>
|
32 |
+
</td>
|
33 |
+
</tr>
|
34 |
+
</table>
|
35 |
+
<div class="ead-form-footer">
|
36 |
+
<?php submit_button(); ?>
|
37 |
+
</div>
|
38 |
+
</form>
|
39 |
+
</div><!-- #general-->
|
40 |
+
<div class="ead-banner">
|
41 |
+
<a href="http://goo.gl/wJTQlc" target="_blank"><img src="<?php echo $this->plugin_url;?>images/eadplus-banner.png"></a>
|
42 |
+
</div>
|
43 |
+
</div><!-- .ead-left-wrap -->
|
44 |
+
<div class="ead-right-wrap">
|
45 |
+
<div class="ead-right-inner">
|
46 |
+
<a href="http://awsm.in" target="_blank" title="AWSM Innovations"><img src="http://awsm.in/innovations/ead/logo2.jpg" alt="AWSM!"></a>
|
47 |
+
<ul class="awsm-social">
|
48 |
+
<li><a href="https://www.facebook.com/awsminnovations" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-facebook">Facebook</span></a></li>
|
49 |
+
<li><a href="https://twitter.com/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-twitter">Twitter</span></a></li>
|
50 |
+
<li><a href="https://github.com/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-github">Github</span></a></li>
|
51 |
+
<li><a href="https://www.behance.net/awsmin" target="_blank" title="AWSM Innovations"><span class="awsm-icon awsm-icon-behance">Behance</span></a></li>
|
52 |
+
</ul>
|
53 |
+
</div>
|
54 |
+
<div class="clearfix row-col">
|
55 |
+
<div class="col-2">
|
56 |
+
<a href="https://wordpress.org/support/view/plugin-reviews/embed-any-document#postform" target="_blank">
|
57 |
+
<img src="<?php echo $this->plugin_url;?>images/star.gif"><?php _e('Like the plugin?', $this->text_domain);?><br/><?php _e('Rate Now!', $this->text_domain);?>
|
58 |
+
</a>
|
59 |
+
</div>
|
60 |
+
<div class="col-2">
|
61 |
+
<a href="http://awsm.in/support" target="_blank">
|
62 |
+
<img src="<?php echo $this->plugin_url;?>images/ticket.gif"><?php _e('Need Help?', $this->text_domain);?><br/><?php _e('Open a Ticket', $this->text_domain);?>
|
63 |
+
</a>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<div class="ead-right-inner">
|
67 |
+
<h3>More Links</h3>
|
68 |
+
<ol>
|
69 |
+
<li><a href="http://awsm.in/ead-plus-documentation/#embedding" target="_blank" title="How to Embed Documents?"><?php _e('How to Embed Documents?', $this->text_domain); ?></a></li>
|
70 |
+
<li><a href="http://awsm.in/ead-plus-documentation/#viewers" target="_blank" title="About Viewers"><?php _e('About Viewers', $this->text_domain); ?></a></li>
|
71 |
+
<li><a href="http://awsm.in/ead-plus-documentation/#shortcode" target="_blank" title="Shortcode & Attributes"><?php _e('Shortcode & Attributes', $this->text_domain); ?></a></li>
|
72 |
+
<li><a href="http://awsm.in/support" target="_blank" title="FAQs"><?php _e('FAQs', $this->text_domain); ?></a></li>
|
73 |
+
</ol>
|
74 |
+
</div>
|
75 |
+
</div><!-- .ead-right-wrap -->
|
76 |
+
<div class="clear"></div>
|
77 |
+
</div><!-- .wrap -->
|
trunk/inc/support-mail.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) { exit; }
|
3 |
+
if ( 'POST' == $_SERVER['REQUEST_METHOD']) {
|
4 |
+
parse_str($_POST['contact'],$postdata);
|
5 |
+
parse_str($_POST['contact']);
|
6 |
+
if ( !$site_name OR !$email_id OR !$problem ){
|
7 |
+
$json['status'] = false;
|
8 |
+
$json['message'] = __('Please Fill Required Fields', $this->text_domain);
|
9 |
+
echo json_encode( $json);
|
10 |
+
die(0);
|
11 |
+
}
|
12 |
+
$emaildata = array('site_name'=>'Name','email_id'=>'Email','problem'=>'Problem');
|
13 |
+
$mailmessage = 'New Support request from: '.get_option('blogname') . "\r\n\r\n";
|
14 |
+
$mailmessage .= '<table width="99%" cellspacing="0" cellpadding="1" border="0" bgcolor="#EAEAEA">
|
15 |
+
<tbody>
|
16 |
+
<tr>
|
17 |
+
<td><table width="100%" cellspacing="0" cellpadding="5" border="0" bgcolor="#FFFFFF">
|
18 |
+
<tbody>'.ead_getemailnode($emaildata,$postdata).'</tbody>
|
19 |
+
</table>
|
20 |
+
</td>
|
21 |
+
</tr>
|
22 |
+
</tbody>
|
23 |
+
</table>';
|
24 |
+
add_filter('wp_mail_content_type',create_function('', 'return "text/html"; '));
|
25 |
+
$tomail='hello@awsm.in';
|
26 |
+
$subject = "[EAD-free] Support Request From ". get_option('blogname');
|
27 |
+
$headers = "Reply-To: <" . $email_id . ">\n";
|
28 |
+
if (wp_mail( $tomail, $subject, $mailmessage, $headers )) {
|
29 |
+
$json['status'] = true;
|
30 |
+
$json['message'] = __('We will get back to you soon', $this->text_domain);
|
31 |
+
} else {
|
32 |
+
$json['status'] = false;
|
33 |
+
$json['message'] = __('Something went wrong', $this->text_domain);
|
34 |
+
}
|
35 |
+
echo json_encode($json);
|
36 |
+
}else{
|
37 |
+
$json['status'] = false;
|
38 |
+
$json['message'] = __('Cheating ?', $this->text_domain);
|
39 |
+
echo json_encode($json);
|
40 |
+
}
|
41 |
+
die(0);
|
42 |
+
?>
|
43 |
+
|
trunk/js/embed.js
ADDED
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
var $embedurl = $('#awsm_url'),
|
3 |
+
$shortcode = $('#shortcode'),
|
4 |
+
$message = $('#embed_message p'),
|
5 |
+
$ActionPanel = $('.mceActionPanel'),
|
6 |
+
$container = $('.ead_container'),
|
7 |
+
fileurl = "",
|
8 |
+
newprovider = "",
|
9 |
+
frame,
|
10 |
+
msextension = emebeder.msextension,
|
11 |
+
drextension = emebeder.drextension;
|
12 |
+
//Opens Embed popup
|
13 |
+
$('body').on('click', '.awsm-embed', function(e) {
|
14 |
+
ead_reset();
|
15 |
+
e.preventDefault();
|
16 |
+
$('body').addClass('ead-popup-on');
|
17 |
+
tb_show("Embed Any Document", "#TB_inline?inlineId=embed-popup-wrap&width=1030&modal=true", null);
|
18 |
+
tb_position();
|
19 |
+
return;
|
20 |
+
});
|
21 |
+
|
22 |
+
//Update shortcode on change
|
23 |
+
$(".ead_usc").change(function() {
|
24 |
+
newprovider = "";
|
25 |
+
updateshortcode($(this).attr('id'));
|
26 |
+
});
|
27 |
+
$('.embedval').keyup(function() {
|
28 |
+
updateshortcode($(this).attr('id'));
|
29 |
+
});
|
30 |
+
//Wordpress Uploader
|
31 |
+
$('#upload_doc').click(open_media_window);
|
32 |
+
|
33 |
+
//Add url
|
34 |
+
$('#add_url').click(awsm_embded_url);
|
35 |
+
|
36 |
+
//insert Shortcode
|
37 |
+
$('#insert_doc').click(awsm_shortcode);
|
38 |
+
// Add from URL support
|
39 |
+
$('#addDocUrl').on('click', function(e) {
|
40 |
+
e.preventDefault();
|
41 |
+
$('.addurl_box').fadeIn();
|
42 |
+
$('.ead-options').hide();
|
43 |
+
});
|
44 |
+
//Add fromrom URL cancel handler
|
45 |
+
$('.go-back').on('click', function(e) {
|
46 |
+
e.preventDefault();
|
47 |
+
$('.addurl_box').hide();
|
48 |
+
$('.ead-options').fadeIn();
|
49 |
+
});
|
50 |
+
// Close embed dialog
|
51 |
+
$('#embed-popup').on('click', '.cancel_embed,.mfp-close', function(e) {
|
52 |
+
// Prevent default action
|
53 |
+
e.preventDefault();
|
54 |
+
remove_eadpop();
|
55 |
+
});
|
56 |
+
//Insert Media window
|
57 |
+
function open_media_window() {
|
58 |
+
var uClass = 'upload';
|
59 |
+
if (frame) {
|
60 |
+
frame.open();
|
61 |
+
return;
|
62 |
+
}
|
63 |
+
frame = wp.media({
|
64 |
+
title: 'Embed Any Document',
|
65 |
+
multiple: false,
|
66 |
+
library: {
|
67 |
+
type: emebeder.validtypes,
|
68 |
+
},
|
69 |
+
button: {
|
70 |
+
text: 'Insert'
|
71 |
+
}
|
72 |
+
});
|
73 |
+
frame.on('select', function() {
|
74 |
+
var file = frame.state().get('selection').first().toJSON();
|
75 |
+
updateprovider(file, uClass);
|
76 |
+
});
|
77 |
+
frame.open();
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
//update provider
|
82 |
+
function updateprovider(file, uClass) {
|
83 |
+
fileurl = file.url;
|
84 |
+
validViewer(file, uClass);
|
85 |
+
updateshortcode();
|
86 |
+
uploaddetails(file, uClass);
|
87 |
+
}
|
88 |
+
//sanitize width and height
|
89 |
+
function sanitize(dim) {
|
90 |
+
if (dim.indexOf("%") == -1) {
|
91 |
+
dim = dim.replace(/[^0-9]/g, '');
|
92 |
+
dim += "px";
|
93 |
+
} else {
|
94 |
+
dim = dim.replace(/[^0-9]/g, '');
|
95 |
+
dim += "%";
|
96 |
+
}
|
97 |
+
return dim;
|
98 |
+
}
|
99 |
+
//Thickbox Handler
|
100 |
+
function tb_position() {
|
101 |
+
var tbWindow = $('#TB_window');
|
102 |
+
var width = $(window).width();
|
103 |
+
var H = $(window).height();
|
104 |
+
var W = ( 1080 < width ) ? 1080 : width;
|
105 |
+
|
106 |
+
if ( tbWindow.size() ) {
|
107 |
+
tbWindow.width( W - 50 ).height( H - 45 );
|
108 |
+
//$('#TB_iframeContent').width( W - 50 ).height( H - 75 );
|
109 |
+
$('#TB_ajaxContent').css({'width':'100%','height':'100%','padding':'0'});
|
110 |
+
tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
|
111 |
+
if ( typeof document.body.style.maxWidth != 'undefined' )
|
112 |
+
tbWindow.css({'top':'20px','margin-top':'0'});
|
113 |
+
$('#TB_title').css({'background-color':'#fff','color':'#cfcfcf'});
|
114 |
+
};
|
115 |
+
};
|
116 |
+
$(window).resize( function() { tb_position() } );
|
117 |
+
//to getshortcode
|
118 |
+
function getshortcode(url, item) {
|
119 |
+
var height = sanitize($('#ead_height').val()),
|
120 |
+
width = sanitize($('#ead_width').val()),
|
121 |
+
download = $('#ead_download').val(),
|
122 |
+
provider = $('#ead_provider').val(),
|
123 |
+
heightstr = "",
|
124 |
+
widthstr = "",
|
125 |
+
downloadstr = "",
|
126 |
+
providerstr = "",
|
127 |
+
drivestr = "";
|
128 |
+
if (itemcheck('height', item)) {
|
129 |
+
heightstr = ' height="' + height + '"';
|
130 |
+
}
|
131 |
+
if (itemcheck('width', item)) {
|
132 |
+
widthstr = ' width="' + width + '"';
|
133 |
+
}
|
134 |
+
if (itemcheck('download', item)) {
|
135 |
+
downloadstr = ' download="' + download + '"';
|
136 |
+
}
|
137 |
+
if (itemcheck('provider', item)) {
|
138 |
+
providerstr = ' viewer="' + provider + '"';
|
139 |
+
}
|
140 |
+
return '[embeddoc url="' + url + '"' + widthstr + heightstr + downloadstr + providerstr + drivestr + ']';
|
141 |
+
}
|
142 |
+
// Checks with default setting value
|
143 |
+
function itemcheck(item, dataitem) {
|
144 |
+
var check = $('#ead_' + item).val();
|
145 |
+
var datacheck = 'ead_' + item;
|
146 |
+
if (datacheck == dataitem) {
|
147 |
+
return true;
|
148 |
+
} else if (check != emebeder[item]) {
|
149 |
+
return true;
|
150 |
+
}
|
151 |
+
return false;
|
152 |
+
}
|
153 |
+
//Print uploaded file details
|
154 |
+
function uploaddetails(file, uClass) {
|
155 |
+
$('#insert_doc').removeAttr('disabled');
|
156 |
+
$('#ead_filename').html(file.filename);
|
157 |
+
if (file.filesizeHumanReadable) {
|
158 |
+
$('#ead_filesize').html(file.filesizeHumanReadable);
|
159 |
+
} else {
|
160 |
+
$('#ead_filesize').html(' ');
|
161 |
+
}
|
162 |
+
$('.upload-success').fadeIn();
|
163 |
+
$container.hide();
|
164 |
+
UploadClass(uClass);
|
165 |
+
}
|
166 |
+
|
167 |
+
|
168 |
+
function awsm_embded_url() {
|
169 |
+
var checkurl = $embedurl.val();
|
170 |
+
if (checkurl !== '') {
|
171 |
+
validateurl(checkurl);
|
172 |
+
} else {
|
173 |
+
$embedurl.addClass('urlerror');
|
174 |
+
updateshortcode();
|
175 |
+
}
|
176 |
+
}
|
177 |
+
function isUrlValid(url) {
|
178 |
+
if (!/^http:\/\//.test(url)) {
|
179 |
+
url = "http://" + url;
|
180 |
+
}
|
181 |
+
return /^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(url);
|
182 |
+
}
|
183 |
+
//Validate file url
|
184 |
+
function validateurl(url) {
|
185 |
+
var uClass = 'link';
|
186 |
+
$('#embed_message').hide();
|
187 |
+
if(isUrlValid(url)){
|
188 |
+
fileurl = url;
|
189 |
+
$('#insert_doc').removeAttr('disabled');
|
190 |
+
$('#ead_filename').html('From URL');
|
191 |
+
$('#ead_filesize').html(' ');
|
192 |
+
$('.upload-success').fadeIn();
|
193 |
+
$container.hide();
|
194 |
+
UploadClass(uClass);
|
195 |
+
updateshortcode();
|
196 |
+
}else{
|
197 |
+
showmsg(emebeder.invalidurl);
|
198 |
+
}
|
199 |
+
}
|
200 |
+
//Show Message
|
201 |
+
function showmsg(msg) {
|
202 |
+
$('#embed_message').fadeIn();
|
203 |
+
$message.text(msg);
|
204 |
+
}
|
205 |
+
|
206 |
+
|
207 |
+
function awsm_shortcode() {
|
208 |
+
if (fileurl) {
|
209 |
+
wp.media.editor.insert($shortcode.text());
|
210 |
+
remove_eadpop();
|
211 |
+
} else {
|
212 |
+
showmsg(emebeder.nocontent);
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
//Update ShortCode
|
217 |
+
function updateshortcode(item) {
|
218 |
+
item = typeof item !== 'undefined' ? item : false;
|
219 |
+
if (fileurl) {
|
220 |
+
$shortcode.text(getshortcode(fileurl, item));
|
221 |
+
} else {
|
222 |
+
$shortcode.text('');
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
//UploadClass
|
227 |
+
function UploadClass(uPclass) {
|
228 |
+
$(".uploaded-doccument").removeClass("ead-link ead-upload ead-dropbox ead-drive ead-box");
|
229 |
+
$('.uploaded-doccument').addClass('ead-' + uPclass);
|
230 |
+
}
|
231 |
+
//close popup
|
232 |
+
function remove_eadpop(){
|
233 |
+
// Close popup
|
234 |
+
tb_remove();
|
235 |
+
setTimeout(function() {
|
236 |
+
$('body').removeClass('ead-popup-on');
|
237 |
+
}, 800);
|
238 |
+
}
|
239 |
+
//Convert Filesize to human Readable filesize
|
240 |
+
function humanFileSize(bytes) {
|
241 |
+
var thresh = 1024;
|
242 |
+
if (bytes < thresh) return bytes + ' B';
|
243 |
+
var units = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
244 |
+
var u = -1;
|
245 |
+
do {
|
246 |
+
bytes /= thresh;
|
247 |
+
++u;
|
248 |
+
} while (bytes >= thresh);
|
249 |
+
return bytes.toFixed(1) + ' ' + units[u];
|
250 |
+
}
|
251 |
+
// Viewer Check
|
252 |
+
function validViewer(file, provider) {
|
253 |
+
var cprovider = ["link", "upload"];
|
254 |
+
var validext = msextension.split(',');
|
255 |
+
var ext = '.' + file.filename.split('.').pop();
|
256 |
+
$("#new_provider option[value='microsoft']").attr('disabled', false);
|
257 |
+
if ($.inArray(provider, cprovider) != -1) {
|
258 |
+
if ($.inArray(ext, validext) == -1) {
|
259 |
+
newprovider = "google";
|
260 |
+
$("#new_provider option[value='google']").attr("selected", "selected");
|
261 |
+
$("#new_provider option[value='microsoft']").attr('disabled', true);
|
262 |
+
} else {
|
263 |
+
newprovider = "microsoft";
|
264 |
+
$("#new_provider option[value='microsoft']").attr("selected", "selected");
|
265 |
+
}
|
266 |
+
}
|
267 |
+
}
|
268 |
+
//Reset form data
|
269 |
+
function ead_reset() {
|
270 |
+
$container.show();
|
271 |
+
$embedurl.val('');
|
272 |
+
$('.ead-options').fadeIn();
|
273 |
+
$('.addurl_box').hide();
|
274 |
+
$('.upload-success').hide();
|
275 |
+
$('#embed_message').hide();
|
276 |
+
$('#insert_doc').attr('disabled', 'disabled');
|
277 |
+
$('#new_provider').show();
|
278 |
+
$('#ead_pseudo').hide();
|
279 |
+
newprovider = "";
|
280 |
+
$("#new_provider option[value='microsoft']").attr('disabled', false);
|
281 |
+
$('#ead_downloadc').show();
|
282 |
+
}
|
283 |
+
});
|
trunk/js/magnific-popup.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*! Magnific Popup - v0.9.9 - 2014-09-06
|
2 |
+
* http://dimsemenov.com/plugins/magnific-popup/
|
3 |
+
* Copyright (c) 2014 Dmitry Semenov; */
|
4 |
+
(function(e){var t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",h="."+g,v="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},S=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE 7."),t.isIE8=-1!==n.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var r;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(r=0;l.length>r;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var c=e.magnificPopup.modules;for(r=0;c.length>r;r++){var d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(E())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+h,function(e){27===e.keyCode&&t.close()}),I.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var u=t.wH=I.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(u)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var C=t.st.mainClass;return t.isIE7&&(C+=" mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),T("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||i),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),o.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+h+" focusin"+h),t.ev.off(h),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;r.length>a;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,T("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(a>I.width())return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('<img src="'+n+'" class="'+i.attr("class")+'" />'):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?(t._onImageHasSize(e),void 0):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return d(),void 0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img" />').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}(),_()})(window.jQuery||window.Zepto);
|
trunk/language/ead-en.mo
ADDED
Binary file
|
trunk/language/ead-en.po
ADDED
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Embed Any Document\n"
|
4 |
+
"POT-Creation-Date: 2014-12-31 14:58+0530\n"
|
5 |
+
"PO-Revision-Date: 2014-12-31 14:58+0530\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: Awsm Innovations <hello@awsm.in>\n"
|
8 |
+
"Language: en\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.10\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
"X-Poedit-SearchPath-1: ..\n"
|
19 |
+
|
20 |
+
#: ../aswm-embed.php:81 ../inc/popup.php:6
|
21 |
+
msgid "Add Document"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: ../aswm-embed.php:106
|
25 |
+
msgid "Settings"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: ../aswm-embed.php:133
|
29 |
+
msgid "Nothing to insert"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: ../aswm-embed.php:134
|
33 |
+
msgid "Add URL"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: ../aswm-embed.php:135
|
37 |
+
msgid "Verifying..."
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: ../aswm-embed.php:184
|
41 |
+
msgid "Download"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: ../aswm-embed.php:207
|
45 |
+
msgid "No Url Found"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: ../aswm-embed.php:221 ../aswm-embed.php:248
|
49 |
+
msgid "You do not have sufficient permissions to access this page."
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: ../aswm-embed.php:281
|
53 |
+
msgid "Buy Pro Version"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: ../aswm-embed.php:283
|
57 |
+
msgid "Add from "
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: ../inc/functions.php:89 ../inc/functions.php:126
|
61 |
+
msgid "Done"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: ../inc/functions.php:94
|
65 |
+
msgid "Document"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: ../inc/functions.php:102
|
69 |
+
msgid "File format is not supported."
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: ../inc/functions.php:109
|
73 |
+
msgid "Sorry, the file URL is not valid."
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: ../inc/functions.php:129
|
77 |
+
msgid "The document you have chosen is a not public."
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: ../inc/functions.php:129
|
81 |
+
msgid ""
|
82 |
+
" Only the owner and explicitly shared collaborators will be able to view it."
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: ../inc/popup.php:13
|
86 |
+
msgid "Upload Document"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: ../inc/popup.php:14
|
90 |
+
msgid "Add from URL"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: ../inc/popup.php:20
|
94 |
+
msgid "Enter document URL"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: ../inc/popup.php:34
|
98 |
+
msgid "Advanced Options"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: ../inc/popup.php:44 ../inc/settings.php:30
|
102 |
+
msgid "Show Download Link"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: ../inc/popup.php:46 ../inc/settings.php:33
|
106 |
+
msgid "For all users"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: ../inc/popup.php:46 ../inc/settings.php:33
|
110 |
+
msgid "For Logged-in users"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: ../inc/popup.php:46 ../inc/settings.php:33
|
114 |
+
msgid "No Download"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../inc/popup.php:51 ../inc/popup.php:58
|
118 |
+
msgid "Viewer"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../inc/popup.php:53
|
122 |
+
msgid "Google Docs Viewer"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../inc/popup.php:53
|
126 |
+
msgid "Microsoft Office Online"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../inc/popup.php:68
|
130 |
+
msgid "Shortcode Preview"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: ../inc/popup.php:77
|
134 |
+
msgid "Insert"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: ../inc/popup.php:77
|
138 |
+
msgid "Loading..."
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../inc/popup.php:81
|
142 |
+
msgid "Cancel"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../inc/settings.php:3
|
146 |
+
msgid "Embed Any Document by AWSM.in"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: ../inc/settings.php:5
|
150 |
+
msgid "General Settings"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: ../inc/settings.php:6
|
154 |
+
msgid "Support"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: ../inc/settings.php:7
|
158 |
+
msgid "Get Plus Version"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../inc/settings.php:16
|
162 |
+
msgid "Default Size"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../inc/settings.php:18
|
166 |
+
msgid "Width"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: ../inc/settings.php:22
|
170 |
+
msgid "Height"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../inc/settings.php:26
|
174 |
+
msgid "Enter values in pixels or percentage (Example: 500px or 100%)"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../inc/settings.php:48
|
178 |
+
msgid "Name"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: ../inc/settings.php:52
|
182 |
+
msgid "Email ID"
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: ../inc/settings.php:56
|
186 |
+
msgid "Problem"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: ../inc/settings.php:60
|
190 |
+
msgid "Submit"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: ../inc/support-mail.php:8
|
194 |
+
msgid "Please Fill Required Fields"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: ../inc/support-mail.php:30
|
198 |
+
msgid "We will get back to you soon"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: ../inc/support-mail.php:33
|
202 |
+
msgid "Something went wrong"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: ../inc/support-mail.php:38
|
206 |
+
msgid "Cheating ?"
|
207 |
+
msgstr ""
|
trunk/language/ead-en_US.mo
ADDED
Binary file
|
trunk/language/ead-en_US.po
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Embed Any Document\n"
|
4 |
+
"POT-Creation-Date: 2014-11-07 14:45+0530\n"
|
5 |
+
"PO-Revision-Date: 2014-11-10 11:22+0530\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: Awsm Innovations <hello@awsm.in>\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.6.10\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
13 |
+
"Language: en_US\n"
|
14 |
+
|
15 |
+
#: aswm-embed.php:77 inc/popup.php:6
|
16 |
+
msgid "Add Document"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: aswm-embed.php:102
|
20 |
+
msgid "Settings"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: aswm-embed.php:111 aswm-embed.php:156 aswm-embed.php:174 aswm-embed.php:185
|
24 |
+
msgid "You do not have sufficient permissions to access this page."
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: aswm-embed.php:129
|
28 |
+
msgid "Nothing to insert"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: aswm-embed.php:130
|
32 |
+
msgid "Add URL"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: aswm-embed.php:131
|
36 |
+
msgid "Verifying..."
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: inc/functions.php:87
|
40 |
+
msgid "Download"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: inc/functions.php:105
|
44 |
+
msgid "Done"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: inc/functions.php:110
|
48 |
+
msgid "Document"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: inc/functions.php:115
|
52 |
+
msgid "File format is not supported."
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: inc/functions.php:120
|
56 |
+
msgid "Not a valid URL. Please try again."
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: inc/functions.php:127
|
60 |
+
msgid "Sorry, the file URL is not valid."
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: inc/functions.php:175
|
64 |
+
msgid "No Url Found"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: inc/popup.php:12
|
68 |
+
msgid "Upload and Embed"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: inc/popup.php:13
|
72 |
+
msgid "Add From URL"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: inc/popup.php:21
|
76 |
+
msgid "Enter document URL"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: inc/popup.php:33
|
80 |
+
msgid "Advanced Options"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: inc/popup.php:43 inc/settings.php:38
|
84 |
+
msgid "Show Download Link"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: inc/popup.php:45 inc/settings.php:41
|
88 |
+
msgid "For all users"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: inc/popup.php:45 inc/settings.php:41
|
92 |
+
msgid "For Logged-in users"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: inc/popup.php:45 inc/settings.php:41
|
96 |
+
msgid "None"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: inc/popup.php:53
|
100 |
+
msgid "Shortcode Preview"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: inc/popup.php:62
|
104 |
+
msgid "Insert"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: inc/popup.php:66
|
108 |
+
msgid "Cancel"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: inc/settings.php:3
|
112 |
+
msgid "Embed Any Document by AWSM.in"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: inc/settings.php:5
|
116 |
+
msgid "General Settings"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: inc/settings.php:6
|
120 |
+
msgid "Support"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: inc/settings.php:15
|
124 |
+
msgid "Embed Using"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: inc/settings.php:18
|
128 |
+
msgid "Google Docs Viewer"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: inc/settings.php:18
|
132 |
+
msgid "Microsoft Office Online"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: inc/settings.php:24
|
136 |
+
msgid "Default Size"
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: inc/settings.php:26
|
140 |
+
msgid "Width"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: inc/settings.php:30
|
144 |
+
msgid "Height"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: inc/settings.php:34
|
148 |
+
msgid "Enter values in pixels or percentage (Example: 300px or 100%)"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: inc/settings.php:55
|
152 |
+
msgid "Name"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: inc/settings.php:62
|
156 |
+
msgid "Email ID"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: inc/settings.php:69
|
160 |
+
msgid "Problem"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/settings.php:77
|
164 |
+
msgid "Submit"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: inc/support-mail.php:8
|
168 |
+
msgid "Please Fill Required Fields"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: inc/support-mail.php:30
|
172 |
+
msgid "We will get back to you soon"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: inc/support-mail.php:33
|
176 |
+
msgid "Something went wrong"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: inc/support-mail.php:38
|
180 |
+
msgid "Cheating ?"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: inc/functions.php:180
|
184 |
+
msgid "File Not Found"
|
185 |
+
msgstr ""
|
trunk/language/ead.mo
ADDED
Binary file
|
trunk/language/ead.pot
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Embed Any Document\n"
|
4 |
+
"POT-Creation-Date: 2015-06-25 15:46+0530\n"
|
5 |
+
"PO-Revision-Date: 2015-06-25 15:47+0530\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: Awsm Innovations <hello@awsm.in>\n"
|
8 |
+
"Language: en\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.10\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
"X-Poedit-SearchPath-1: ..\n"
|
19 |
+
|
20 |
+
#: ../aswm-embed.php:81 ../inc/popup.php:6
|
21 |
+
msgid "Add Document"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: ../aswm-embed.php:106
|
25 |
+
msgid "Settings"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: ../aswm-embed.php:132
|
29 |
+
msgid "Nothing to insert"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: ../aswm-embed.php:133
|
33 |
+
msgid "Invalid URL"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: ../aswm-embed.php:134
|
37 |
+
msgid "Add URL"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: ../aswm-embed.php:135
|
41 |
+
msgid "Verifying..."
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: ../aswm-embed.php:181
|
45 |
+
msgid "Download"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: ../aswm-embed.php:204
|
49 |
+
msgid "No Url Found"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: ../aswm-embed.php:218 ../aswm-embed.php:245
|
53 |
+
msgid "You do not have sufficient permissions to access this page."
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: ../aswm-embed.php:278
|
57 |
+
msgid "Buy Pro Version"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: ../aswm-embed.php:280
|
61 |
+
msgid "Add from "
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: ../inc/functions.php:89 ../inc/functions.php:126
|
65 |
+
msgid "Done"
|
66 |
+
msgstr ""
|
67 |
+
|
68 |
+
#: ../inc/functions.php:94
|
69 |
+
msgid "Document"
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: ../inc/functions.php:102
|
73 |
+
msgid "File format is not supported."
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: ../inc/functions.php:109
|
77 |
+
msgid "Sorry, the file URL is not valid."
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: ../inc/functions.php:129
|
81 |
+
msgid "The document you have chosen is a not public."
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: ../inc/functions.php:129
|
85 |
+
msgid ""
|
86 |
+
" Only the owner and explicitly shared collaborators will be able to view it."
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: ../inc/popup.php:13
|
90 |
+
msgid "Upload Document"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: ../inc/popup.php:14
|
94 |
+
msgid "Add from URL"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: ../inc/popup.php:20
|
98 |
+
msgid "Enter document URL"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: ../inc/popup.php:37
|
102 |
+
msgid "Advanced Options"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: ../inc/popup.php:43 ../inc/settings.php:26
|
106 |
+
msgid "Show Download Link"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: ../inc/popup.php:45 ../inc/settings.php:29
|
110 |
+
msgid "For all users"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: ../inc/popup.php:45 ../inc/settings.php:29
|
114 |
+
msgid "For Logged-in users"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../inc/popup.php:45 ../inc/settings.php:29
|
118 |
+
msgid "No Download"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../inc/popup.php:50 ../inc/popup.php:57
|
122 |
+
msgid "Viewer"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../inc/popup.php:52
|
126 |
+
msgid "Google Docs Viewer"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../inc/popup.php:52
|
130 |
+
msgid "Microsoft Office Online"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: ../inc/popup.php:67
|
134 |
+
msgid "Shortcode Preview"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: ../inc/popup.php:76
|
138 |
+
msgid "Insert"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../inc/popup.php:76
|
142 |
+
msgid "Loading..."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../inc/popup.php:80
|
146 |
+
msgid "Cancel"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: ../inc/settings.php:3
|
150 |
+
msgid "Embed Any Document by AWSM.in"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: ../inc/settings.php:12
|
154 |
+
msgid "Default Size"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: ../inc/settings.php:14
|
158 |
+
msgid "Width"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../inc/settings.php:18
|
162 |
+
msgid "Height"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../inc/settings.php:22
|
166 |
+
msgid "Enter values in pixels or percentage (Example: 500px or 100%)"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: ../inc/settings.php:57
|
170 |
+
msgid "Like the plugin?"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../inc/settings.php:57
|
174 |
+
msgid "Rate Now!"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../inc/settings.php:62
|
178 |
+
msgid "Need Help?"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: ../inc/settings.php:62
|
182 |
+
msgid "Open a Ticket"
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: ../inc/settings.php:69
|
186 |
+
msgid "How to Embed Documents?"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: ../inc/settings.php:70
|
190 |
+
msgid "About Viewers"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: ../inc/settings.php:71
|
194 |
+
msgid "Shortcode & Attributes"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: ../inc/settings.php:72
|
198 |
+
msgid "FAQs"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: ../inc/support-mail.php:8
|
202 |
+
msgid "Please Fill Required Fields"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: ../inc/support-mail.php:30
|
206 |
+
msgid "We will get back to you soon"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: ../inc/support-mail.php:33
|
210 |
+
msgid "Something went wrong"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: ../inc/support-mail.php:38
|
214 |
+
msgid "Cheating ?"
|
215 |
+
msgstr ""
|
trunk/readme.txt
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Embed Any Document ===
|
2 |
+
Contributors: awsmin
|
3 |
+
Donate link: http://awsm.in/donate
|
4 |
+
Tags: embed documents, upload pdf, embed ppt, document viewer, pdf viewer, pdf viewer plugin, display pdf, embed pdf, embed pdf in wordpress, word, word viewer, word document, embed word, word plugin, doc, doc viewer, docx, docx viewer, excel, excel plugin, xls, xlsx, spreadsheet, embed spreadsheet, powerpoint, powerpoint viewer, ppt, ppt viewer, pptx, image viewer
|
5 |
+
Author URI: http://awsm.in
|
6 |
+
Requires at least: 3.5
|
7 |
+
Tested up to: 4.4.2
|
8 |
+
Stable tag: trunk
|
9 |
+
License: GPLv2
|
10 |
+
|
11 |
+
Easiest way to upload and display PDF, MS Office and more documents on your WordPress website using Google Docs Viewer or Microsoft Office Online.
|
12 |
+
|
13 |
+
== Summary ==
|
14 |
+
|
15 |
+
Seamlessly embed and display PDF, Microsoft Word, Excel and PowerPoint documents on your WordPress website.
|
16 |
+
|
17 |
+
== Description ==
|
18 |
+
|
19 |
+
Embed Any Document WordPress plugin lets you upload and embed your documents easily in your WordPress website without any additional browser plugins like Flash or Acrobat reader. The plugin lets you choose between Google Docs Viewer and Microsoft Office Online to display your documents.
|
20 |
+
|
21 |
+
<a href="http://dev.awsm.in/innovations/embed-any-document-plugin-demo/">Live Demo</a>
|
22 |
+
|
23 |
+
<h4>Supported file types</h4>
|
24 |
+
|
25 |
+
* Microsoft Word (docx, docm, dotm, dotx)
|
26 |
+
* Microsoft Excel (xlsx, xlsb, xls, xlsm)
|
27 |
+
* Microsoft PowerPoint (pptx, ppsx, ppt, pps, pptm, potm, ppam, potx, ppsm)
|
28 |
+
* Adobe Portable Document Format (pdf)
|
29 |
+
* Text files (txt)
|
30 |
+
* TIFF Images (tif, tiff)
|
31 |
+
* Adobe Illustrator (ai)
|
32 |
+
* Scalable Vector Graphics (svg)
|
33 |
+
|
34 |
+
<h4>Key Benefits of Embed Any Document WordPress plugin </h4>
|
35 |
+
|
36 |
+
1. <strong>Easy to Upload and Embed.</strong> Embed Any Document is integrated seamlessly into the post editor. With a click of ‘Add Document’ button it lets you upload documents directly into media library and embed them.
|
37 |
+
|
38 |
+
2. <strong>No 3rd party plugin needed.</strong> The plugin uses Google Docs Viewer and Microsoft Office Online’s services to display the documents in your website. You will not require any additional browser plugins to view the documents and you can expect maximum compatibility for your documents.
|
39 |
+
|
40 |
+
3. <strong>Option to choose the viewer.</strong> You can choose between Google Docs Viewer and Microsoft Office Online to display your document. If one service is down, you can switch to another easily.
|
41 |
+
|
42 |
+
4. <strong>Cross-browser compatibility.</strong> The viewers are mobile-ready and cross-browser compatible.
|
43 |
+
|
44 |
+
5. <strong>Clean and Minimal UI.</strong> Embed Any Document comes with a clean and clutter-free UI.
|
45 |
+
|
46 |
+
<h4>Video Demo</h4>
|
47 |
+
|
48 |
+
[youtube https://www.youtube.com/watch?v=DUW_aEEcBrI]
|
49 |
+
|
50 |
+
For more information and instructions visit <a href="http://awsm.in/embed-any-document/" target="_blank">our website.</a>.
|
51 |
+
|
52 |
+
This is an <a href="http://awsm.in" target=“_blank”>AWSM</a> Project.
|
53 |
+
|
54 |
+
|
55 |
+
== Installation ==
|
56 |
+
|
57 |
+
1. Upload the entire `embed-any-documents` folder to the `/wp-content/plugins/` directory.
|
58 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
59 |
+
3. Done.
|
60 |
+
|
61 |
+
Upload or link the documents to your site using the ‘Add Document’ button in the Visual editor.
|
62 |
+
|
63 |
+
== Screenshots ==
|
64 |
+
|
65 |
+
1. ‘Add Document’ button integrated into WordPress visual editor
|
66 |
+
2. Add document popup
|
67 |
+
3. Inserting Document
|
68 |
+
4. Add from URL
|
69 |
+
|
70 |
+
|
71 |
+
== Frequently Asked Questions ==
|
72 |
+
|
73 |
+
= How do I add documents? =
|
74 |
+
Once the plugin is activated you can find ‘Add Document’ button in your WordPress visual editor. Just click on that and follow your heart.
|
75 |
+
|
76 |
+
= File not found error in my localhost site! =
|
77 |
+
The viewers (Google Docs Viewer and Microsoft Office Online) do not support locally hosted files. Your document has to be available online for the viewers to access.
|
78 |
+
|
79 |
+
= I have another question that you must add in your FAQ. =
|
80 |
+
Great. Send it to ead@awsm.in. We will answer it as soon as we can.
|
81 |
+
|
82 |
+
== Changelog ==
|
83 |
+
|
84 |
+
= V 2.2.2 - 2016-03-10 =
|
85 |
+
* Added ppsx support.
|
86 |
+
|
87 |
+
= V 2.2.1 - 2015-10-03 =
|
88 |
+
* New Language localization.
|
89 |
+
|
90 |
+
= V 2.2 - 2015-06-24 =
|
91 |
+
* Replaced magnific popup with thickbox.
|
92 |
+
* Fixed: Media library serach bug.
|
93 |
+
* UI Improvements
|
94 |
+
|
95 |
+
= V 2.1 - 2015-01-25 =
|
96 |
+
* Missing image fix.
|
97 |
+
* Error handling.
|
98 |
+
|
99 |
+
= V 2.0 - 2014-12-31 =
|
100 |
+
* UI Improvements
|
101 |
+
* Various bug fixes
|
102 |
+
* Performance improvements
|
103 |
+
* Introduced plus version with cloud support
|
104 |
+
|
105 |
+
= V 1.0.2 - 2014-11-24 =
|
106 |
+
* Added option in advanced option to choose viewer.
|
107 |
+
* Added option in settings to enable and disable media library insert.
|
108 |
+
* Fixed: Editor permission issue.
|
109 |
+
|
110 |
+
= V 1.1.1- 2014-12-8 =
|
111 |
+
* Removed media insert override option.
|
112 |
+
|
113 |
+
= V 1.0.1 - 2014-11-12 =
|
114 |
+
* Removed unsupported file types.
|
115 |
+
* Updated support tab.
|
116 |
+
|
117 |
+
= V 1.1 - 2014-11-12 =
|
118 |
+
* File Not Found fix
|
119 |
+
|
120 |
+
|
121 |
+
== Upgrade Notice ==
|
122 |
+
|
123 |
+
= V 2.2.2 - 2016-03-10 =
|
124 |
+
* Added ppsx support.
|
125 |
+
|
126 |
+
= V 2.2.1 - 2015-10-03 =
|
127 |
+
* New Language localization.
|
128 |
+
|
129 |
+
= V 2.2 =
|
130 |
+
* Replaced magnific popup with thickbox.
|
131 |
+
* Fixed: Media library serach bug.
|
132 |
+
* UI Improvements
|
133 |
+
|
134 |
+
= V 2.1 =
|
135 |
+
* Missing image fix.
|
136 |
+
* Error handling.
|
137 |
+
|
138 |
+
= V 2.0 =
|
139 |
+
* UI Improvements
|
140 |
+
* Various bug fixes
|
141 |
+
* Performance improvements
|
142 |
+
|
143 |
+
= V 1.1.1=
|
144 |
+
* Removed media insert override option.
|
145 |
+
|
146 |
+
= V 1.0.1 =
|
147 |
+
* Removed unsupported file types.
|
148 |
+
* Updated support tab.
|
149 |
+
|
150 |
+
= V 1.1 =
|
151 |
+
* File Not Found fix
|
trunk/screenshot-1.png
ADDED
Binary file
|
trunk/screenshot-2.png
ADDED
Binary file
|
trunk/screenshot-3.png
ADDED
Binary file
|
trunk/screenshot-4.png
ADDED
Binary file
|