Version Description
- Removed ZURB Foundation
- Removed FontAwesome fonts and instead used WordPress Dashicons
- Template updates
- Admin settings UI changes
- Media gallery UI changes
- Direct media upload on file selection
- Bug fixes
Download this release
Release Info
Developer | rtcamp |
Plugin | rtMedia for WordPress, BuddyPress and bbPress |
Version | 3.8 |
Comparing to | |
See all releases |
Code changes from version 3.7.44 to 3.8
- Gruntfile.js +65 -0
- app/admin/RTMediaAdmin.php +653 -580
- app/admin/RTMediaFormHandler.php +493 -571
- app/assets/admin/css/admin-css-migration.md +9 -0
- app/assets/admin/css/admin.css +1 -0
- app/assets/admin/css/sass/_addons.scss +68 -0
- app/assets/admin/css/sass/_components.scss +356 -0
- app/assets/admin/css/sass/_layout.scss +73 -0
- app/assets/admin/css/sass/_responsive.scss +231 -0
- app/assets/admin/css/sass/_rtl.scss +45 -0
- app/assets/admin/css/sass/_rtmedia-pro.scss +84 -0
- app/assets/admin/css/sass/_sidebar.scss +35 -0
- app/assets/admin/css/sass/_support-form.scss +26 -0
- app/assets/admin/css/sass/_switch.scss +96 -0
- app/assets/admin/css/sass/_tabs.scss +75 -0
- app/assets/admin/css/sass/_themes.scss +25 -0
- app/assets/admin/css/sass/_tooltip.scss +90 -0
- app/assets/admin/css/sass/_utility.scss +85 -0
- app/assets/admin/css/sass/_variables.scss +66 -0
- app/assets/admin/css/sass/admin.scss +45 -0
- app/assets/admin/css/sass/widget.scss +76 -0
- app/assets/admin/css/widget.css +1 -0
- app/assets/admin/img/audio_thumb.png +0 -0
- app/assets/admin/img/boxspinner.gif +0 -0
- app/assets/admin/img/image_thumb.png +0 -0
- app/assets/admin/img/rtDating.png +0 -0
- app/assets/admin/img/rtMedia-pro-ad.png +0 -0
- app/assets/admin/img/rtcamp-logo.png +0 -0
- app/assets/admin/img/rtmedia-ffmpeg-240x184.png +0 -0
- app/assets/admin/img/rtmedia-instagram-240x184.png +0 -0
- app/assets/admin/img/rtmedia-kaltura-240x184.png +0 -0
- app/assets/admin/img/rtmedia-logo.png +0 -0
- app/assets/admin/img/rtmedia-membership-240x184.png +0 -0
- app/assets/admin/img/rtmedia-phototagging-240x184.png +0 -0
- app/assets/admin/img/rtmedia-social-sync-240x184.png +0 -0
- app/assets/admin/img/rtmedia-theme-InspireBook.png +0 -0
- app/assets/admin/img/rtmedia-theme-klein.jpg +0 -0
- app/assets/admin/img/rtmedia-theme-kleo.png +0 -0
- app/assets/admin/img/rtmedia-theme-msocial.jpg +0 -0
- app/assets/admin/img/rtmedia-theme-sweetdate.png +0 -0
- app/assets/admin/img/rtmedia-watermark-240x184.png +0 -0
- app/assets/admin/img/thumb_default.png +0 -0
- app/assets/admin/img/video_thumb.png +0 -0
- app/assets/admin/js/admin-min.js +4 -0
- app/assets/admin/js/admin.js +781 -0
- app/assets/admin/js/scripts.js +171 -0
- app/assets/admin/js/vendors/tabs.js +129 -0
- app/assets/css/main.css +1 -1
- app/assets/css/sass/.bowerrc +1 -0
- app/assets/css/sass/_activity.scss +109 -0
- app/assets/css/sass/_album.scss +21 -0
- app/assets/css/sass/_buddypress.scss +47 -0
- app/assets/css/sass/_img-edit.scss +702 -0
- app/assets/css/sass/_magnific.scss +494 -0
- app/assets/css/sass/_media-element.scss +51 -0
- app/assets/css/sass/_media-tab.scss +205 -0
- app/assets/css/sass/_popup.scss +439 -0
- app/assets/css/sass/_responsive.scss +30 -0
- app/assets/css/sass/_rtl.scss +141 -0
- app/assets/css/sass/_rtmedia.scss +257 -0
- app/assets/css/sass/_tabs.scss +67 -0
- app/assets/css/sass/_utility.scss +136 -0
- app/assets/css/sass/_variables.scss +26 -0
- app/assets/css/sass/main.scss +44 -0
- app/assets/js/main.js +5 -835
- app/assets/js/rtMedia.backbone.js +1119 -1048
- app/assets/js/rtMedia.js +556 -587
- app/assets/js/vendors/magnific-popup.js +2002 -0
- app/helper/RTMediaAddon.php +81 -115
- app/helper/RTMediaLicense.php +93 -11
- app/helper/RTMediaModel.php +2 -2
- app/helper/RTMediaSettings.php +12 -2
- app/helper/RTMediaSupport.php +208 -257
- app/helper/RTMediaThemes.php +210 -162
- app/helper/rtDimensions.php +34 -43
- app/helper/rtForm.php +175 -173
- app/importers/BPMediaAlbumimporter.php +86 -86
- app/main/RTMedia.php +451 -454
Gruntfile.js
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
'use strict';
|
2 |
+
module.exports = function ( grunt ) {
|
3 |
+
|
4 |
+
// load all grunt tasks matching the `grunt-*` pattern
|
5 |
+
// Ref. https://npmjs.org/package/load-grunt-tasks
|
6 |
+
require( 'load-grunt-tasks' )( grunt );
|
7 |
+
|
8 |
+
grunt.initConfig( {
|
9 |
+
// SCSS and Compass
|
10 |
+
// Ref. https://npmjs.org/package/grunt-contrib-compass
|
11 |
+
compass: {
|
12 |
+
frontend: {
|
13 |
+
options: {
|
14 |
+
config: 'config.rb',
|
15 |
+
force: true
|
16 |
+
}
|
17 |
+
},
|
18 |
+
// Admin Panel CSS
|
19 |
+
backend: {
|
20 |
+
options: {
|
21 |
+
sassDir: 'app/assets/admin/css/sass/',
|
22 |
+
cssDir: 'app/assets/admin/css/'
|
23 |
+
}
|
24 |
+
}
|
25 |
+
},
|
26 |
+
// Uglify
|
27 |
+
// Compress and Minify JS files
|
28 |
+
// Ref. https://npmjs.org/package/grunt-contrib-uglify
|
29 |
+
uglify: {
|
30 |
+
options: {
|
31 |
+
banner: '/*! \n * rtMedia JavaScript Library \n * @package rtMedia \n */'
|
32 |
+
},
|
33 |
+
frontend: {
|
34 |
+
src: [
|
35 |
+
'app/assets/js/vendors/magnific-popup.js',
|
36 |
+
'app/assets/admin/js/vendors/tabs.js',
|
37 |
+
'app/assets/js/rtMedia.js'
|
38 |
+
],
|
39 |
+
dest: 'app/assets/js/main.js'
|
40 |
+
},
|
41 |
+
backend: {
|
42 |
+
src: [
|
43 |
+
'app/assets/admin/js/vendors/tabs.js',
|
44 |
+
'app/assets/admin/js/scripts.js',
|
45 |
+
'app/assets/admin/js/admin.js'
|
46 |
+
],
|
47 |
+
dest: 'app/assets/admin/js/admin-min.js'
|
48 |
+
}
|
49 |
+
},
|
50 |
+
// Watch for hanges and trigger compass and uglify
|
51 |
+
// Ref. https://npmjs.org/package/grunt-contrib-watch
|
52 |
+
watch: {
|
53 |
+
compass: { files: [ '**/*.{scss,sass}' ],
|
54 |
+
tasks: [ 'compass' ]
|
55 |
+
},
|
56 |
+
uglify: {
|
57 |
+
files: [ '<%= uglify.frontend.src %>', '<%= uglify.backend.src %>' ],
|
58 |
+
tasks: [ 'uglify' ]
|
59 |
+
}
|
60 |
+
}
|
61 |
+
} );
|
62 |
+
|
63 |
+
// Register Task
|
64 |
+
grunt.registerTask( 'default', [ 'watch' ] );
|
65 |
+
};
|
app/admin/RTMediaAdmin.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @subpackage Admin
|
7 |
*
|
8 |
*/
|
9 |
-
if ( ! class_exists( 'RTMediaAdmin' ) ){
|
10 |
|
11 |
/**
|
12 |
* RTMediaAdmin class.
|
@@ -25,13 +25,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
25 |
* @access public
|
26 |
* @return void
|
27 |
*/
|
28 |
-
public function __construct(){
|
29 |
global $rtmedia;
|
30 |
|
31 |
// Actions and filters
|
32 |
add_action( 'init', array( $this, 'video_transcoding_survey_response' ) );
|
33 |
// add_action( 'admin_init', array( $this, 'presstrends_plugin' ) );
|
34 |
-
|
35 |
//$rtmedia_feed = new RTMediaFeed();
|
36 |
add_filter( 'plugin_action_links_' . RTMEDIA_BASE_NAME, array( &$this, 'plugin_add_settings_link' ) );
|
37 |
//add_action ( 'wp_ajax_rtmedia_fetch_feed', array( $rtmedia_feed, 'fetch_feed' ), 1 );
|
@@ -57,7 +56,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
57 |
|
58 |
$obj_encoding = new RTMediaEncoding( true );
|
59 |
|
60 |
-
if ( $obj_encoding->api_key ){
|
61 |
add_filter( 'media_row_actions', array( $this, 'add_reencode_link' ), null, 2 );
|
62 |
add_action( 'admin_head-upload.php', array( $this, 'add_bulk_actions_regenerate' ) );
|
63 |
add_action( 'admin_footer', array( $this, 'rtmedia_regenerate_thumb_js' ) );
|
@@ -67,27 +66,27 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
67 |
|
68 |
add_action( 'wp_ajax_rt_media_regeneration', array( $this, 'rt_media_regeneration' ), 1 );
|
69 |
|
70 |
-
if ( ! isset( $rtmedia->options ) ){
|
71 |
$rtmedia->options = rtmedia_get_site_option( 'rtmedia-options' );
|
72 |
}
|
73 |
|
74 |
-
if ( isset( $_POST['rtmedia-options'] ) ){
|
75 |
-
if ( isset( $_POST['rtmedia-options']['general_showAdminMenu'] ) && '1' == $_POST['rtmedia-options']['general_showAdminMenu'] ){
|
76 |
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100, 1 );
|
77 |
}
|
78 |
} else {
|
79 |
-
if ( 1 == intval( $rtmedia->options['general_showAdminMenu'] )
|
80 |
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100, 1 );
|
81 |
}
|
82 |
}
|
83 |
|
84 |
-
if ( is_admin() ){
|
85 |
add_action( 'admin_enqueue_scripts', array( $this, 'ui' ) );
|
86 |
//bp_core_admin_hook();
|
87 |
add_action( 'admin_menu', array( $this, 'menu' ), 1 );
|
88 |
add_action( 'init', array( $this, 'bp_admin_tabs' ) );
|
89 |
|
90 |
-
if ( is_multisite() ){
|
91 |
add_action( 'network_admin_edit_rtmedia', array( $this, 'save_multisite_options' ) );
|
92 |
}
|
93 |
}
|
@@ -97,7 +96,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
97 |
// show rtmedia advertisement
|
98 |
// if(! defined("RTMEDIA_PRO_VERSION") )
|
99 |
// add_action ( 'rtmedia_before_default_admin_widgets', array( $this, 'rtmedia_advertisement' ),1);
|
100 |
-
if ( ! class_exists( 'BuddyPress' ) ){
|
101 |
add_action( 'admin_init', array( $this, 'check_permalink_admin_notice' ) );
|
102 |
}
|
103 |
|
@@ -106,7 +105,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
106 |
add_action( 'wp_ajax_rtmedia_hide_inspirebook_release_notice', array( $this, 'rtmedia_hide_inspirebook_release_notice' ), 1 );
|
107 |
add_action( 'wp_ajax_rtmedia_hide_social_sync_notice', array( $this, 'rtmedia_hide_social_sync_notice' ), 1 );
|
108 |
$rtmedia_media_import = new RTMediaMediaSizeImporter(); // do not delete this line. We only need to create object of this class if we are in admin section
|
109 |
-
if ( class_exists( 'BuddyPress' ) ){
|
110 |
$rtmedia_activity_upgrade = new RTMediaActivityUpgrade();
|
111 |
}
|
112 |
add_action( 'admin_notices', array( $this, 'rtmedia_admin_notices' ) );
|
@@ -115,11 +114,11 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
115 |
add_action( 'admin_init', array( $this, 'rtmedia_migration' ) );
|
116 |
}
|
117 |
|
118 |
-
function rtmedia_migration(){
|
119 |
$rtMigration = new RTMediaMigration();
|
120 |
}
|
121 |
|
122 |
-
function rtmedia_addon_license_save_hook(){
|
123 |
do_action( 'rtmedia_addon_license_save_hook' );
|
124 |
}
|
125 |
|
@@ -132,8 +131,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
132 |
*
|
133 |
* @return void
|
134 |
*/
|
135 |
-
public function rtmedia_network_admin_notices(){
|
136 |
-
if ( is_multisite() ){
|
137 |
$this->upload_filetypes_error();
|
138 |
}
|
139 |
}
|
@@ -147,8 +146,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
147 |
*
|
148 |
* @return void
|
149 |
*/
|
150 |
-
public function rtmedia_admin_notices(){
|
151 |
-
if ( current_user_can( 'list_users' ) ){
|
152 |
$this->upload_filetypes_error();
|
153 |
$this->rtmedia_regenerate_thumbnail_notice();
|
154 |
$this->rtmedia_addon_update_notice();
|
@@ -161,11 +160,12 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
161 |
/*
|
162 |
* Show social sync release notice admin notice.
|
163 |
*/
|
164 |
-
|
|
|
165 |
$site_option = rtmedia_get_site_option( 'rtmedia_social_sync_release_notice' );
|
166 |
-
|
167 |
-
|
168 |
-
if ( ( ! $site_option || 'hide' != $site_option ) &&
|
169 |
rtmedia_update_site_option( 'rtmedia_social_sync_release_notice', 'show' );
|
170 |
?>
|
171 |
<div class="updated rtmedia-social-sync-notice">
|
@@ -181,7 +181,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
181 |
</div>
|
182 |
<script type="text/javascript">
|
183 |
function rtmedia_hide_social_sync_notice() {
|
184 |
-
var data = {action: 'rtmedia_hide_social_sync_notice'};
|
185 |
jQuery.post( ajaxurl, data, function ( response ) {
|
186 |
response = response.trim();
|
187 |
if ( response === "1" )
|
@@ -189,15 +189,16 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
189 |
} );
|
190 |
}
|
191 |
</script>
|
192 |
-
|
193 |
}
|
194 |
}
|
195 |
|
196 |
/*
|
197 |
* Hide social sync release notice
|
198 |
*/
|
199 |
-
|
200 |
-
|
|
|
201 |
echo '1';
|
202 |
} else {
|
203 |
echo '0';
|
@@ -214,21 +215,21 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
214 |
*
|
215 |
* @return void
|
216 |
*/
|
217 |
-
public function rtmedia_inspirebook_release_notice(){
|
218 |
$site_option = rtmedia_get_site_option( 'rtmedia_inspirebook_release_notice' );
|
219 |
-
if ( ( ! $site_option || 'hide' != $site_option ) && ( 'inspirebook' != get_stylesheet() ) ){
|
220 |
rtmedia_update_site_option( 'rtmedia_inspirebook_release_notice', 'show' );
|
221 |
?>
|
222 |
<div class="updated rtmedia-inspire-book-notice">
|
223 |
<p>
|
224 |
-
<span><a href="https://rtcamp.com/
|
225 |
InspireBook</b></a> - First official rtMedia premium theme.</span>
|
226 |
<a href="#" onclick="rtmedia_hide_inspirebook_notice()" style="float:right">Dismiss</a>
|
227 |
</p>
|
228 |
</div>
|
229 |
<script type="text/javascript">
|
230 |
function rtmedia_hide_inspirebook_notice() {
|
231 |
-
var data = {action: 'rtmedia_hide_inspirebook_release_notice'};
|
232 |
jQuery.post( ajaxurl, data, function ( response ) {
|
233 |
response = response.trim();
|
234 |
if ( response === "1" )
|
@@ -236,7 +237,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
236 |
} );
|
237 |
}
|
238 |
</script>
|
239 |
-
|
240 |
}
|
241 |
}
|
242 |
|
@@ -249,8 +250,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
249 |
*
|
250 |
* @return void
|
251 |
*/
|
252 |
-
public function rtmedia_hide_inspirebook_release_notice(){
|
253 |
-
if ( rtmedia_update_site_option( 'rtmedia_inspirebook_release_notice', 'hide' ) ){
|
254 |
echo '1';
|
255 |
} else {
|
256 |
echo '0';
|
@@ -267,8 +268,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
267 |
*
|
268 |
* @return void
|
269 |
*/
|
270 |
-
public function rtmedia_bp_add_update_type(){
|
271 |
-
if ( class_exists( 'BuddyPress' ) && function_exists( 'bp_activity_set_action' ) ){
|
272 |
bp_activity_set_action( 'rtmedia_update', 'rtmedia_update', 'rtMedia Update' );
|
273 |
}
|
274 |
}
|
@@ -282,9 +283,9 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
282 |
*
|
283 |
* @return void
|
284 |
*/
|
285 |
-
public function check_permalink_admin_notice(){
|
286 |
global $wp_rewrite;
|
287 |
-
if ( empty( $wp_rewrite->permalink_structure ) ){
|
288 |
add_action( 'admin_notices', array( $this, 'rtmedia_permalink_notice' ) );
|
289 |
}
|
290 |
}
|
@@ -298,7 +299,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
298 |
*
|
299 |
* @return void
|
300 |
*/
|
301 |
-
public function rtmedia_permalink_notice(){
|
302 |
echo '<div class="error rtmedia-permalink-change-notice">
|
303 |
<p> <b>' . __( 'rtMedia:' ) . '</b> ' . __( ' You must ' ) . '<a href="' . admin_url( 'options-permalink.php' ) . '">' . __( 'update permalink structure' ) . '</a>' . __( ' to something other than the default for it to work.', 'rtmedia' ) . ' </p>
|
304 |
</div>';
|
@@ -313,20 +314,22 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
313 |
*
|
314 |
* @return void
|
315 |
*/
|
316 |
-
public function rtmedia_addon_update_notice(){
|
317 |
-
if ( ! $this->check_for_addon_update_notice() ){
|
318 |
-
return;
|
319 |
-
}
|
320 |
-
if ( is_rt_admin() ){
|
321 |
-
$site_option = rtmedia_get_site_option( 'rtmedia-addon-update-notice' );
|
322 |
-
if ( ! $site_option || 'hide' != $site_option ){
|
323 |
-
rtmedia_update_site_option( 'rtmedia-addon-update-notice', 'show' );
|
324 |
-
echo '<div class="error rtmedia-addon-upate-notice">
|
325 |
-
<p> <b>' . __( 'rtMedia:' ) . '</b> ' . __( 'Please update all premium add-ons that you have purchased from rtCamp from your ', 'rtmedia' ) . ' <a href="https://rtcamp.com/my-account/" target="_blank">' . __( 'account', 'rtmedia' ) . '</a>. <a href="#" onclick="rtmedia_hide_addon_update_notice()" style="float:right">Hide</a> </p>
|
326 |
-
</div>';
|
327 |
-
}
|
328 |
|
329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
<script type="text/javascript">
|
331 |
function rtmedia_hide_addon_update_notice() {
|
332 |
var data = {
|
@@ -352,41 +355,56 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
352 |
*
|
353 |
* @return bool $return_falg
|
354 |
*/
|
355 |
-
public function check_for_addon_update_notice(){
|
356 |
$return_falg = false;
|
357 |
|
358 |
-
|
|
|
359 |
$plugin_info = get_plugin_data( RTMEDIA_INSTAGRAM_PATH . 'index.php' );
|
360 |
-
if ( isset( $plugin_info['Version'] ) && $plugin_info['Version']
|
361 |
$return_falg = true;
|
362 |
}
|
363 |
-
}
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
390 |
}
|
391 |
}
|
392 |
|
@@ -402,8 +420,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
402 |
*
|
403 |
* @return void
|
404 |
*/
|
405 |
-
public function bp_admin_tabs(){
|
406 |
-
if ( current_user_can( 'manage_options' ) ){
|
407 |
add_action( 'bp_admin_tabs', array( $this, 'tab' ) );
|
408 |
}
|
409 |
}
|
@@ -417,15 +435,15 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
417 |
*
|
418 |
* @return void
|
419 |
*/
|
420 |
-
public function rtmedia_advertisement(){
|
421 |
-
$src = RTMEDIA_URL . 'app/assets/img/rtMedia-pro-ad.png'
|
422 |
?>
|
423 |
<div class='rtmedia-admin-ad'>
|
424 |
-
<a href='http://rtcamp.com/
|
425 |
<img src='<?php echo $src; ?>' alt="<?php _e( 'rtMedia Pro is released', 'rtmedia' ); ?>"/>
|
426 |
</a>
|
427 |
</div>
|
428 |
-
|
429 |
}
|
430 |
|
431 |
/**
|
@@ -437,84 +455,90 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
437 |
*
|
438 |
* @return void
|
439 |
*/
|
440 |
-
public function rtmedia_dashboard_widget_function(){
|
441 |
?>
|
442 |
|
443 |
-
<div class="
|
|
|
|
|
|
|
444 |
|
445 |
-
<div class="table table_content">
|
446 |
-
<p class="sub"><?php _e( 'Media Stats', 'rtmedia' ); ?></p>
|
447 |
<table>
|
448 |
<tbody>
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
</tbody>
|
468 |
</table>
|
469 |
</div>
|
470 |
-
|
471 |
-
|
|
|
|
|
472 |
<table>
|
473 |
<tbody> <?php
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
|
506 |
</tbody>
|
507 |
</table>
|
508 |
</div>
|
509 |
-
|
510 |
-
<p>
|
511 |
-
<b>rtMedia Links:</b> <a href="http://rtcamp.com"><?php _e( 'Homepage', 'rtmedia' ); ?></a> | <a
|
512 |
-
href="admin.php?page=rtmedia-support#rtmedia-general"><?php _e( 'Free Support', 'rtmedia' ); ?></a>
|
513 |
-
| <a href="http://rtcamp.com/rtmedia/addons/"><?php _e( 'Premium Addons', 'rtmedia' ); ?></a>
|
514 |
-
</p>
|
515 |
-
</div>
|
516 |
</div>
|
517 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
518 |
}
|
519 |
|
520 |
/**
|
@@ -526,19 +550,19 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
526 |
*
|
527 |
* @return void
|
528 |
*/
|
529 |
-
public function add_dashboard_widgets(){
|
530 |
wp_add_dashboard_widget( 'rtmedia_dashboard_widget', __( 'Right Now in rtMedia', 'rtmedia' ), array( &$this, 'rtmedia_dashboard_widget_function' ) );
|
531 |
global $wp_meta_boxes;
|
532 |
|
533 |
// Get the regular dashboard widgets array
|
534 |
// (which has our new widget already but at the end)
|
535 |
|
536 |
-
$normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
|
537 |
|
538 |
// Backup and delete our new dashboard widget from the end of the array
|
539 |
|
540 |
-
$example_widget_backup = array( 'rtmedia_dashboard_widget' => $normal_dashboard['rtmedia_dashboard_widget'] );
|
541 |
-
unset( $normal_dashboard['rtmedia_dashboard_widget'] );
|
542 |
|
543 |
// Merge the two arrays together so our widget is at the beginning
|
544 |
|
@@ -546,7 +570,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
546 |
|
547 |
// Save the sorted array back into the original metaboxes
|
548 |
|
549 |
-
$wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
|
550 |
}
|
551 |
|
552 |
/**
|
@@ -558,7 +582,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
558 |
*
|
559 |
* @return array $links
|
560 |
*/
|
561 |
-
public function plugin_add_settings_link( $links ){
|
562 |
$settings_link = '<a href="' . admin_url( 'admin.php?page=rtmedia-settings' ) . '">Settings</a>';
|
563 |
array_push( $links, $settings_link );
|
564 |
$settings_link = '<a href="' . admin_url( 'admin.php?page=rtmedia-support' ) . '">Support</a>';
|
@@ -577,11 +601,11 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
577 |
*
|
578 |
* @return array $actions
|
579 |
*/
|
580 |
-
public function add_reencode_link( $actions, $post ){
|
581 |
|
582 |
$mime_type_array = explode( '/', $post->post_mime_type );
|
583 |
-
if ( is_array( $mime_type_array ) && '' != $mime_type_array && 'video' == $mime_type_array[0] ){
|
584 |
-
$actions['reencode'] = '<a class="submitdelete" onclick="return rtmedia_regenerate_thumbs(' . $post->ID . ')" href="#">' . __( 'Regenerate Thumbnail', 'rtmedia' ) . '</a>';
|
585 |
}
|
586 |
|
587 |
return $actions;
|
@@ -596,9 +620,9 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
596 |
*
|
597 |
* @return void
|
598 |
*/
|
599 |
-
public function bulk_action_handler(){
|
600 |
-
if ( 'bulk_video_regenerate_thumbnails' == $_REQUEST['action'] && '' != $_REQUEST['media'] ){
|
601 |
-
wp_safe_redirect( esc_url_raw( add_query_arg( array( 'media_ids' => urlencode( implode( ',', $_REQUEST['media'] ) ) ), admin_url( 'admin.php?page=rtmedia-regenerate' ) ) ) );
|
602 |
exit;
|
603 |
}
|
604 |
}
|
@@ -612,86 +636,88 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
612 |
*
|
613 |
* @return void
|
614 |
*/
|
615 |
-
public function admin_bar_menu( $admin_bar ){
|
616 |
-
if ( ! current_user_can( 'manage_options' ) ){
|
617 |
return;
|
618 |
}
|
619 |
|
620 |
$admin_bar->add_menu( array(
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
$admin_bar->add_menu( array(
|
630 |
-
'id' => 'rt-media-dashborad',
|
631 |
-
'parent' => 'rtMedia',
|
632 |
-
'title' => __( 'Settings', 'rtmedia' ),
|
633 |
-
'href' => admin_url( 'admin.php?page=rtmedia-settings' ),
|
634 |
-
'meta' => array(
|
635 |
-
'title' => __( 'Settings', 'rtmedia' ),
|
636 |
-
'target' => '_self',
|
637 |
-
),
|
638 |
-
)
|
639 |
-
);
|
640 |
$admin_bar->add_menu( array(
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
$admin_bar->add_menu( array(
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
$admin_bar->add_menu( array(
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
$admin_bar->add_menu( array(
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
$admin_bar->add_menu( array(
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
695 |
}
|
696 |
|
697 |
/**
|
@@ -703,44 +729,40 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
703 |
*
|
704 |
* @return void
|
705 |
*/
|
706 |
-
public function ui( $hook ){
|
707 |
$admin_pages = array(
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
'rtmedia_page_rtmedia-license',
|
720 |
);
|
721 |
|
|
|
|
|
|
|
|
|
722 |
$admin_pages = apply_filters( 'rtmedia_filter_admin_pages_array', $admin_pages );
|
723 |
|
724 |
-
if ( in_array( $hook, $admin_pages ) || strpos( $hook, 'rtmedia-migration' ) ){
|
725 |
|
726 |
$admin_ajax = admin_url( 'admin-ajax.php' );
|
727 |
|
728 |
-
|
729 |
-
wp_enqueue_script( '
|
730 |
-
|
731 |
-
wp_enqueue_script( 'rtmedia-admin', RTMEDIA_URL . 'app/assets/js/admin.js', array( 'jquery-ui-dialog' ), RTMEDIA_VERSION );
|
732 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_on_label', __( 'ON', 'rtmedia' ) );
|
733 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_off_label', __( 'OFF', 'rtmedia' ) );
|
734 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_ajax', $admin_ajax );
|
735 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_url', admin_url() );
|
736 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_url', admin_url() );
|
737 |
|
738 |
-
if ( isset( $_REQUEST['page'] ) && ( in_array( $_REQUEST['page'], array( 'rtmedia-settings', 'rtmedia-addons', 'rtmedia-themes', 'rtmedia-support', 'rtmedia-hire-us', 'rtmedia-license' ) ) ) ){
|
739 |
-
wp_enqueue_script( 'rtmedia-foundation-modernizr', RTMEDIA_URL . 'lib/foundation/custom.modernizr.js', array( 'jquery' ), RTMEDIA_VERSION );
|
740 |
-
wp_enqueue_script( 'rtmedia-foundation', RTMEDIA_BOWER_COMPONENTS_URL . 'js/foundation.js', array( 'jquery' ), RTMEDIA_VERSION );
|
741 |
-
//wp_enqueue_script ( 'rtmedia-foundation-section', RTMEDIA_URL . 'lib/foundation/foundation.section.js', array('jquery'), RTMEDIA_VERSION );
|
742 |
-
}
|
743 |
-
|
744 |
$rtmedia_admin_strings = array(
|
745 |
'no_refresh' => __( 'Please do not refresh this page.', 'rtmedia' ),
|
746 |
'something_went_wrong' => __( 'Something went wrong. Please <a href onclick="location.reload();">refresh</a> page.', 'rtmedia' ),
|
@@ -752,21 +774,13 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
752 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_strings', $rtmedia_admin_strings );
|
753 |
wp_localize_script( 'rtmedia-admin', 'settings_url', esc_url( add_query_arg( array( 'page' => 'rtmedia-settings' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) ) . '#privacy_enabled' );
|
754 |
wp_localize_script( 'rtmedia-admin', 'settings_rt_album_import_url', esc_url( add_query_arg( array( 'page' => 'rtmedia-settings' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) ) );
|
755 |
-
wp_enqueue_style( 'font-awesome', RTMEDIA_URL . 'app/assets/css/font-awesome.min.css', '', RTMEDIA_VERSION );
|
756 |
-
wp_enqueue_style( 'bootstrap-switch', RTMEDIA_URL . 'app/assets/css/vendor/bootstrap-switch.css', '', RTMEDIA_VERSION );
|
757 |
-
wp_enqueue_style( 'slider-tabs', RTMEDIA_URL . 'app/assets/css/vendor/jquery.sliderTabs.min.css', '', RTMEDIA_VERSION );
|
758 |
-
wp_enqueue_style( 'grid-foundation', RTMEDIA_URL . 'app/assets/css/vendor/grid-foundation.css', '', RTMEDIA_VERSION );
|
759 |
-
wp_enqueue_style( 'rtmedia-main', RTMEDIA_URL . 'app/assets/css/main.css', '', RTMEDIA_VERSION );
|
760 |
-
wp_enqueue_style( 'rtmedia-admin', RTMEDIA_URL . 'app/assets/css/admin.css', '', RTMEDIA_VERSION );
|
761 |
-
|
762 |
-
if ( isset( $_REQUEST['page'] ) && ( in_array( $_REQUEST['page'], array( 'rtmedia-settings', 'rtmedia-addons', 'rtmedia-themes', 'rtmedia-support', 'rtmedia-hire-us', 'rtmedia-license' ) ) ) ){
|
763 |
-
wp_enqueue_style( 'foundation-admin-css', RTMEDIA_URL . 'app/assets/css/settings.css', '', RTMEDIA_VERSION );
|
764 |
-
}
|
765 |
-
|
766 |
-
wp_enqueue_style( 'wp-jquery-ui-dialog' );
|
767 |
|
|
|
|
|
768 |
} else {
|
769 |
-
|
|
|
|
|
770 |
}
|
771 |
}
|
772 |
|
@@ -780,29 +794,26 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
780 |
*
|
781 |
* @return void
|
782 |
*/
|
783 |
-
public function menu(){
|
784 |
-
add_menu_page( 'rtMedia', 'rtMedia', 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ), RTMEDIA_URL . 'app/assets/img/rtmedia-logo.png', '40.1111' );
|
785 |
add_submenu_page( 'rtmedia-settings', __( 'Settings', 'rtmedia' ), __( 'Settings', 'rtmedia' ), 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ) );
|
786 |
add_submenu_page( 'rtmedia-settings', __( 'Addons', 'rtmedia' ), __( 'Addons', 'rtmedia' ), 'manage_options', 'rtmedia-addons', array( $this, 'addons_page' ) );
|
787 |
add_submenu_page( 'rtmedia-settings', __( 'Support', 'rtmedia' ), __( 'Support', 'rtmedia' ), 'manage_options', 'rtmedia-support', array( $this, 'support_page' ) );
|
788 |
add_submenu_page( 'rtmedia-settings', __( 'Themes', 'rtmedia' ), __( 'Themes', 'rtmedia' ), 'manage_options', 'rtmedia-themes', array( $this, 'theme_page' ) );
|
789 |
add_submenu_page( 'rtmedia-settings', __( 'Hire Us', 'rtmedia' ), __( 'Hire Us', 'rtmedia' ), 'manage_options', 'rtmedia-hire-us', array( $this, 'hire_us_page' ) );
|
790 |
-
|
|
|
|
|
791 |
|
792 |
-
if ( ! defined( 'RTMEDIA_PRO_VERSION' ) ){
|
793 |
add_submenu_page( 'rtmedia-settings', __( 'Premium', 'rtmedia' ), __( 'Premium ', 'rtmedia' ), 'manage_options', 'rtmedia-premium', array( $this, 'premium_page' ) );
|
794 |
}
|
795 |
|
796 |
$obj_encoding = new RTMediaEncoding( true );
|
797 |
|
798 |
-
if ( $obj_encoding->api_key ){
|
799 |
add_submenu_page( 'rtmedia-settings', __( 'Regenerate Thumbnail', 'rtmedia' ), __( 'Regen. Thumbnail ', 'rtmedia' ), 'manage_options', 'rtmedia-regenerate', array( $this, 'rt_regenerate_thumbnail' ) );
|
800 |
}
|
801 |
-
|
802 |
-
// add_submenu_page('rtmedia-settings', __('Importer', 'rtmedia'), __('Importer', 'rtmedia'), 'manage_options', 'rtmedia-importer', array($this, 'rt_importer_page'));
|
803 |
-
// if (!BPMediaPrivacy::is_installed()) {
|
804 |
-
// add_submenu_page('rtmedia-settings', __('rtMedia Database Update', 'rtmedia'), __('Update Database', 'rtmedia'), 'manage_options', 'rtmedia-db-update', array($this, 'privacy_page'));
|
805 |
-
// }
|
806 |
}
|
807 |
|
808 |
/**
|
@@ -814,33 +825,33 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
814 |
*
|
815 |
* @return void
|
816 |
*/
|
817 |
-
public function rt_regenerate_thumbnail(){
|
818 |
$prog = new rtProgress();
|
819 |
$done = 0;
|
820 |
?>
|
821 |
<div class="wrap">
|
822 |
<h2> rtMedia: <?php _e( 'Regenerate Video Thumbnails', 'rtmedia' ); ?> </h2>
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
<script>
|
834 |
var rt_thumb_all_media = <?php echo json_encode( $media_ids ); ?>;
|
835 |
</script>
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
<br/>
|
840 |
<p>You can see this page because you have <a href="<?php echo admin_url( 'admin.php?page=rtmedia-addons' ) ?>">subscribed</a> for <a href="https://rtcamp.com/rtmedia/docs/admin/addons/audio-video-encoding/" target="_blank">rtMedia audio/video encoding service</a>.</p> <p>You can regenerate thumbnails of a specific video by visiting <a href="<?php echo admin_url( 'upload.php?post_mime_type=video' ); ?>">media page</a> and clicking the <b>Regenerate Thumbnail</b> option for that particular video.</p> <p>Click <b>Regenerate Pending Thumbnails</b> to regenerate thumbnails of pending videos.</p> <p><input type="button" class="button button-primary" id="rt-start-media-regenerate" value="<?php echo __( 'Regenerate Pending Thumbnails', 'rtmedia' ) . ' (' . $total . ')'; ?>"/> </p>
|
841 |
-
|
842 |
}
|
843 |
-
|
844 |
<div id="rt-migration-progress">
|
845 |
<br/> <br/>
|
846 |
<?php
|
@@ -868,7 +879,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
868 |
type: 'post',
|
869 |
data: {
|
870 |
"action": "rt_media_regeneration",
|
871 |
-
"media_id": rt_thumb_all_media[indx++]
|
872 |
},
|
873 |
success: function ( data ) {
|
874 |
data = JSON.parse( data );
|
@@ -876,8 +887,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
876 |
if ( data.status == false ) {
|
877 |
handle_regenrate_fail();
|
878 |
} else {
|
879 |
-
db_done++;
|
880 |
-
var progw = Math.ceil( (db_done / db_total) * 100 );
|
881 |
if ( progw > 100 ) {
|
882 |
progw = 100;
|
883 |
}
|
@@ -895,7 +906,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
895 |
}
|
896 |
}
|
897 |
function handle_regenrate_fail() {
|
898 |
-
db_fail++;
|
899 |
jQuery( 'span.rt-fail' ).html( db_fail );
|
900 |
db_start_regenrate();
|
901 |
}
|
@@ -925,14 +936,14 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
925 |
*
|
926 |
* @return void
|
927 |
*/
|
928 |
-
public function rtmedia_regenerate_thumbnail_notice(){
|
929 |
$obj_encoding = new RTMediaEncoding( true );
|
930 |
-
if ( $obj_encoding->api_key ){
|
931 |
$site_option = rtmedia_get_site_option( 'rtmedia-video-thumb-notice' );
|
932 |
-
if ( ! $site_option || 'hide' != $site_option ){
|
933 |
rtmedia_update_site_option( 'rtmedia-video-thumb-notice', 'show' );
|
934 |
$videos_without_thumbs = get_video_without_thumbs();
|
935 |
-
if ( isset( $videos_without_thumbs ) && is_array( $videos_without_thumbs ) && sizeof( $videos_without_thumbs ) > 0 ){
|
936 |
echo '<div class="error rtmedia-regenerate-video-thumb-error">
|
937 |
<p>
|
938 |
' . sprintf( __( "You have %s videos without thumbnails. Click <a href='%s'> here </a> to generate thumbnails. <a href='#' onclick='rtmedia_hide_video_thumb_notice()' style='float:right'>Hide</a>", 'rtmedia' ), sizeof( $videos_without_thumbs ), admin_url( 'admin.php?page=rtmedia-regenerate' ) ) . '
|
@@ -941,7 +952,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
941 |
?>
|
942 |
<script type="text/javascript">
|
943 |
function rtmedia_hide_video_thumb_notice() {
|
944 |
-
var data = {action: 'rtmedia_hide_video_thumb_admin_notice'};
|
945 |
jQuery.post( ajaxurl, data, function ( response ) {
|
946 |
response = response.trim();
|
947 |
if ( response === "1" )
|
@@ -949,7 +960,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
949 |
} );
|
950 |
}
|
951 |
</script>
|
952 |
-
|
953 |
}
|
954 |
}
|
955 |
}
|
@@ -964,8 +975,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
964 |
*
|
965 |
* @return void
|
966 |
*/
|
967 |
-
public function rtmedia_hide_video_thumb_admin_notice(){
|
968 |
-
if ( rtmedia_update_site_option( 'rtmedia-video-thumb-notice', 'hide' ) ){
|
969 |
echo '1';
|
970 |
} else {
|
971 |
echo '0';
|
@@ -982,8 +993,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
982 |
*
|
983 |
* @return void
|
984 |
*/
|
985 |
-
public function rtmedia_hide_addon_update_notice(){
|
986 |
-
if ( rtmedia_update_site_option( 'rtmedia-addon-update-notice', 'hide' ) ){
|
987 |
echo '1';
|
988 |
} else {
|
989 |
echo '0';
|
@@ -1000,27 +1011,26 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1000 |
*
|
1001 |
* @return void
|
1002 |
*/
|
1003 |
-
public function rt_media_regeneration(){
|
1004 |
-
if ( isset( $_POST['media_id'] ) ){
|
1005 |
-
$model
|
1006 |
-
$media
|
1007 |
-
$media_type = $media[0]->media_type;
|
1008 |
-
$response
|
1009 |
-
if ( 'video' == $media_type ){
|
1010 |
$objRTMediaEncoding = new RTMediaEncoding( true );
|
1011 |
-
$autoformat
|
1012 |
-
$objRTMediaEncoding->reencoding( intval( $_POST['media_id'] ), $autoformat );
|
1013 |
-
$response['status'] = true;
|
1014 |
} else {
|
1015 |
-
$response['status']
|
1016 |
-
$response['message'] = __( 'not a video ...', 'rtmedia' );
|
1017 |
}
|
1018 |
echo json_encode( $response );
|
1019 |
die();
|
1020 |
}
|
1021 |
}
|
1022 |
|
1023 |
-
|
1024 |
/**
|
1025 |
* Get video without thumbs.
|
1026 |
*
|
@@ -1030,9 +1040,9 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1030 |
*
|
1031 |
* @return object $results
|
1032 |
*/
|
1033 |
-
public function get_video_without_thumbs(){
|
1034 |
$rtmedia_model = new RTMediaModel();
|
1035 |
-
$sql
|
1036 |
global $wpdb;
|
1037 |
$results = $wpdb->get_col( $sql );
|
1038 |
|
@@ -1048,7 +1058,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1048 |
*
|
1049 |
* @return void
|
1050 |
*/
|
1051 |
-
public function settings_page(){
|
1052 |
$this->render_page( 'rtmedia-settings', 'rtmedia' );
|
1053 |
}
|
1054 |
|
@@ -1061,7 +1071,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1061 |
*
|
1062 |
* @return void
|
1063 |
*/
|
1064 |
-
public function privacy_page(){
|
1065 |
$this->render_page( 'rtmedia-privacy' );
|
1066 |
}
|
1067 |
|
@@ -1074,7 +1084,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1074 |
*
|
1075 |
* @return void
|
1076 |
*/
|
1077 |
-
public function rt_importer_page(){
|
1078 |
$this->render_page( 'rtmedia-importer' );
|
1079 |
}
|
1080 |
|
@@ -1087,7 +1097,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1087 |
*
|
1088 |
* @return void
|
1089 |
*/
|
1090 |
-
public function convert_videos_page(){
|
1091 |
$this->render_page( 'rtmedia-convert-videos' );
|
1092 |
}
|
1093 |
|
@@ -1100,7 +1110,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1100 |
*
|
1101 |
* @return void
|
1102 |
*/
|
1103 |
-
public function addons_page(){
|
1104 |
$this->render_page( 'rtmedia-addons' );
|
1105 |
}
|
1106 |
|
@@ -1113,7 +1123,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1113 |
*
|
1114 |
* @return void
|
1115 |
*/
|
1116 |
-
public function support_page(){
|
1117 |
$this->render_page( 'rtmedia-support' );
|
1118 |
}
|
1119 |
|
@@ -1126,7 +1136,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1126 |
*
|
1127 |
* @return void
|
1128 |
*/
|
1129 |
-
public function premium_page(){
|
1130 |
$this->render_page( 'rtmedia-premium' );
|
1131 |
}
|
1132 |
|
@@ -1139,7 +1149,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1139 |
*
|
1140 |
* @return void
|
1141 |
*/
|
1142 |
-
public function theme_page(){
|
1143 |
$this->render_page( 'rtmedia-themes' );
|
1144 |
}
|
1145 |
|
@@ -1152,11 +1162,11 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1152 |
*
|
1153 |
* @return void
|
1154 |
*/
|
1155 |
-
public function hire_us_page(){
|
1156 |
$this->render_page( 'rtmedia-hire-us' );
|
1157 |
}
|
1158 |
|
1159 |
-
public function license_page(){
|
1160 |
$this->render_page( 'rtmedia-license' );
|
1161 |
}
|
1162 |
|
@@ -1169,8 +1179,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1169 |
*
|
1170 |
* @return type
|
1171 |
*/
|
1172 |
-
static function get_current_tab(){
|
1173 |
-
return isset( $_GET['page'] ) ? $_GET['page'] : 'rtmedia-settings';
|
1174 |
}
|
1175 |
|
1176 |
/**
|
@@ -1184,7 +1194,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1184 |
*
|
1185 |
* @return void
|
1186 |
*/
|
1187 |
-
public function render_page( $page, $option_group = null ){
|
1188 |
?>
|
1189 |
|
1190 |
<div class="wrap bp-media-admin <?php echo $this->get_current_tab(); ?>">
|
@@ -1193,72 +1203,88 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1193 |
<h2 class="nav-tab-wrapper"><?php $this->rtmedia_tabs(); ?>
|
1194 |
<span class="alignright by">
|
1195 |
<a class="rt-link" href="http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank" title="rtCamp : <?php _e( 'Empowering The Web With WordPress', 'rtmedia' ); ?>">
|
1196 |
-
<img src="<?php echo RTMEDIA_URL; ?>app/assets/img/rtcamp-logo.png"
|
1197 |
</a>
|
1198 |
</span>
|
1199 |
</h2>
|
1200 |
</div>
|
1201 |
|
1202 |
-
<div class="
|
1203 |
-
<div id="bp-media-settings-boxes" class="columns large-9">
|
1204 |
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
|
|
|
|
1209 |
<form id="bp_media_settings_form" name="bp_media_settings_form" method="post"
|
1210 |
enctype="multipart/form-data">
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1227 |
</div>
|
1228 |
-
</div>
|
1229 |
</form><?php
|
1230 |
-
|
1231 |
-
|
1232 |
<div class="bp-media-metabox-holder">
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
</div>
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
</div>
|
1256 |
-
|
1257 |
-
<div class="metabox-holder bp-media-metabox-holder
|
1258 |
<?php $this->admin_sidebar(); ?>
|
1259 |
</div>
|
|
|
1260 |
</div>
|
1261 |
-
|
1262 |
</div><!-- .bp-media-admin --><?php
|
1263 |
}
|
1264 |
|
@@ -1273,25 +1299,25 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1273 |
*
|
1274 |
* @return type $tabs_html
|
1275 |
*/
|
1276 |
-
public function tab(){
|
1277 |
|
1278 |
-
$tabs_html
|
1279 |
-
$idle_class
|
1280 |
$active_class = 'nav-tab nav-tab-active';
|
1281 |
-
$tabs
|
1282 |
|
1283 |
// Check to see which tab we are on
|
1284 |
$tab = $this->get_current_tab();
|
1285 |
/* rtMedia */
|
1286 |
$tabs[] = array(
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
);
|
1292 |
|
1293 |
foreach ( $tabs as $tab ) {
|
1294 |
-
$tabs_html .= '<a id="bp-media" title= "' . $tab['title'] . '" href="' . $tab['href'] . '" class="' . $tab['class'] . '">' . $tab['name'] . '</a>';
|
1295 |
}
|
1296 |
echo $tabs_html;
|
1297 |
}
|
@@ -1305,10 +1331,10 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1305 |
*
|
1306 |
* @return void
|
1307 |
*/
|
1308 |
-
public function rtmedia_tabs( $active_tab = '' ){
|
1309 |
// Declare local variables
|
1310 |
-
$tabs_html
|
1311 |
-
$idle_class
|
1312 |
$active_class = 'nav-tab nav-tab-active';
|
1313 |
|
1314 |
// Setup core admin tabs
|
@@ -1333,25 +1359,29 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1333 |
'href' => get_admin_url( null, esc_url( add_query_arg( array( 'page' => 'rtmedia-support' ), 'admin.php' ) ) ),
|
1334 |
'name' => __( 'Support', 'rtmedia' ),
|
1335 |
'slug' => 'rtmedia-support',
|
1336 |
-
),
|
|
|
|
|
|
|
|
|
1337 |
'href' => get_admin_url( null, esc_url( add_query_arg( array( 'page' => 'rtmedia-license' ), 'admin.php' ) ) ),
|
1338 |
'name' => __( 'Licenses', 'rtmedia' ),
|
1339 |
'slug' => 'rtmedia-license',
|
1340 |
-
)
|
1341 |
-
|
1342 |
|
1343 |
$tabs = apply_filters( 'media_add_tabs', $tabs );
|
1344 |
|
1345 |
// Loop through tabs and build navigation
|
1346 |
foreach ( array_values( $tabs ) as $tab_data ) {
|
1347 |
-
$is_current = (bool) ( $tab_data['slug'] == $this->get_current_tab() );
|
1348 |
-
$tab_class
|
1349 |
|
1350 |
-
if ( isset( $tab_data['class'] ) && is_array( $tab_data['class'] ) ){
|
1351 |
-
$tab_class .= ' ' . implode( ' ', $tab_data['class'] );
|
1352 |
}
|
1353 |
|
1354 |
-
$tabs_html .= '<a href="' . $tab_data['href'] . '" class="' . $tab_class . '">' . $tab_data['name'] . '</a>';
|
1355 |
}
|
1356 |
|
1357 |
// Output the tabs
|
@@ -1370,28 +1400,28 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1370 |
*
|
1371 |
* @return void
|
1372 |
*/
|
1373 |
-
public function settings_content_tabs( $page ){
|
1374 |
global $wp_settings_sections, $wp_settings_fields;
|
1375 |
|
1376 |
-
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ){
|
1377 |
return;
|
1378 |
}
|
1379 |
|
1380 |
-
foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
|
1381 |
-
if ( $section['title'] ){
|
1382 |
-
echo "<h3>{$section['title']}</h3>\n";
|
1383 |
}
|
1384 |
|
1385 |
-
if ( $section['callback'] ){
|
1386 |
-
call_user_func( $section['callback'], $section );
|
1387 |
}
|
1388 |
|
1389 |
-
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ){
|
1390 |
continue;
|
1391 |
}
|
1392 |
|
1393 |
echo '<table class="form-table">';
|
1394 |
-
do_settings_fields( $page, $section['id'] );
|
1395 |
echo '</table>';
|
1396 |
}
|
1397 |
}
|
@@ -1406,71 +1436,71 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1406 |
*
|
1407 |
* @return array $tabs
|
1408 |
*/
|
1409 |
-
public function settings_sub_tabs(){
|
1410 |
$tabs_html = '';
|
1411 |
-
$tabs
|
1412 |
|
1413 |
// Check to see which tab we are on
|
1414 |
$tab = $this->get_current_tab();
|
1415 |
/* rtMedia */
|
1416 |
|
1417 |
-
$tabs[7] = array(
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
);
|
1424 |
|
1425 |
-
if ( class_exists( 'BuddyPress' ) ){
|
1426 |
-
$tabs[20] = array(
|
1427 |
'href' => '#rtmedia-bp',
|
1428 |
-
'icon' => '
|
1429 |
'title' => __( 'rtMedia BuddyPress', 'rtmedia' ),
|
1430 |
'name' => __( 'BuddyPress', 'rtmedia' ),
|
1431 |
'callback' => array( 'RTMediaFormHandler', 'buddypress_content' ) //change it to BuddyPress Content
|
1432 |
);
|
1433 |
}
|
1434 |
|
1435 |
-
$tabs[30] = array(
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
);
|
1442 |
|
1443 |
-
$tabs[40] = array(
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
);
|
1450 |
|
1451 |
-
$tabs[50] = array(
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
);
|
1458 |
-
$tabs[60] = array(
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
);
|
1465 |
|
1466 |
$tabs = apply_filters( 'rtmedia_add_settings_sub_tabs', $tabs, $tab );
|
1467 |
|
1468 |
$tabs[] = array(
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
);
|
1475 |
|
1476 |
return $tabs;
|
@@ -1486,7 +1516,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1486 |
*
|
1487 |
* @return boolean
|
1488 |
*/
|
1489 |
-
public function update_count(){
|
1490 |
global $wpdb;
|
1491 |
|
1492 |
$query = "SELECT
|
@@ -1506,7 +1536,7 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1506 |
|
1507 |
$result = $wpdb->get_results( $query );
|
1508 |
|
1509 |
-
if ( ! is_array( $result ) ){
|
1510 |
return false;
|
1511 |
}
|
1512 |
|
@@ -1535,15 +1565,15 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1535 |
*
|
1536 |
* @return void
|
1537 |
*/
|
1538 |
-
public function save_multisite_options(){
|
1539 |
global $rtmedia_admin;
|
1540 |
-
if ( isset( $_POST['refresh-count'] ) ){
|
1541 |
$rtmedia_admin->update_count();
|
1542 |
}
|
1543 |
do_action( 'rtmedia_sanitize_settings', $_POST );
|
1544 |
|
1545 |
-
if ( isset( $_POST['rtmedia_options'] ) ){
|
1546 |
-
rtmedia_update_site_option( 'rtmedia_options', $_POST['rtmedia_options'] );
|
1547 |
//
|
1548 |
// redirect to settings page in network
|
1549 |
wp_redirect( esc_url_raw( add_query_arg( array( 'page' => 'rtmedia-settings', 'updated' => 'true' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) ) );
|
@@ -1561,60 +1591,28 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1561 |
*
|
1562 |
* @return void
|
1563 |
*/
|
1564 |
-
public function admin_sidebar(){
|
1565 |
do_action( 'rtmedia_before_default_admin_widgets' );
|
1566 |
$current_user = wp_get_current_user();
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
|
1572 |
-
|
1573 |
-
<div class="row">
|
1574 |
-
<div class="columns large-11">
|
1575 |
-
<p><a href="http://twitter.com/home/?status=' . $message . '" class="button" target= "_blank" title="' . __( 'Post to Twitter Now', 'rtmedia' ) . '">' . __( 'Post to Twitter', 'rtmedia' ) . '</a></p>
|
1576 |
-
<p><a href="https://www.facebook.com/sharer/sharer.php?u=http://rtcamp.com/rtmedia/" class="button" target="_blank" title="' . __( 'Share on Facebook Now', 'rtmedia' ) . '">' . __( 'Share on Facebook', 'rtmedia' ) . '</a></p>
|
1577 |
-
<p><a href="http://wordpress.org/support/view/plugin-reviews/buddypress-media?rate=5#postform" class="button" target= "_blank" title="' . __( 'Rate rtMedia on Wordpress.org', 'rtmedia' ) . '">' . __( 'Rate on Wordpress.org', 'rtmedia' ) . '</a></p>
|
1578 |
-
<p><a href="' . sprintf( '%s', 'https://rtcamp.com/feed/' ) . '" title="' . __( 'Subscribe to our feeds', 'rtmedia' ) . '" class="button" target="_blank" title="' . __( 'Subscribe to our Feeds', 'rtmedia' ) . '">' . __( 'Subscribe to our Feeds', 'rtmedia' ) . '</a></p>
|
1579 |
-
<p><a href="' . $setting_page_url . '" title="' . __( 'Add link to footer', 'rtmedia' ) . '" class="button" title="' . __( 'Add link to footer', 'rtmedia' ) . '">' . __( 'Add link to footer', 'rtmedia' ) . '</a></p>
|
1580 |
-
</div>
|
1581 |
-
</div>
|
1582 |
</div>';
|
1583 |
-
//<li><a href="' . sprintf('%s', 'http://www.facebook.com/rtCamp.solutions/') . '" title="' . __('Become a fan on Facebook', 'rtmedia') . '" class="bp-media-facebook bp-media-social">' . __('Facebook', 'rtmedia') . '</a></li>
|
1584 |
-
//<li><a href="' . sprintf('%s', 'https://twitter.com/rtcamp/') . '" title="' . __('Follow us on Twitter', 'rtmedia') . '" class="bp-media-twitter bp-media-social">' . __('Twitter', 'rtmedia') . '</a></li> ;
|
1585 |
-
new RTMediaAdminWidget( 'spread-the-word', __( 'Spread the Word', 'rtmedia' ), $addons );
|
1586 |
|
1587 |
-
|
1588 |
-
// <!-- Identify your business so that you can collect the payments. -->
|
1589 |
-
// <input type="hidden" name="business"
|
1590 |
-
// value="paypal@rtcamp.com">
|
1591 |
-
// <!-- Specify a Donate button. -->
|
1592 |
-
// <input type="hidden" name="cmd" value="_donations">
|
1593 |
-
// <!-- Specify details about the contribution -->
|
1594 |
-
// <input type="hidden" name="item_name" value="BuddyPress Media">
|
1595 |
-
// <label><b>' . __('USD', 'rtmedia') . '</b></label>
|
1596 |
-
// <input type="text" name="amount" size="3">
|
1597 |
-
// <input type="hidden" name="currency_code" value="USD">
|
1598 |
-
// <!-- Display the payment button. -->
|
1599 |
-
// <input type="hidden" name="cpp_header_image" value="' . RTMEDIA_URL . 'app/assets/img/rtcamp-logo.png">
|
1600 |
-
// <input type="image" id="rt-donate-button" name="submit" border="0"
|
1601 |
-
// src="' . RTMEDIA_URL . 'app/assets/img/paypal-donate-button.png"
|
1602 |
-
// alt="PayPal - The safer, easier way to pay online">
|
1603 |
-
// </form><br />
|
1604 |
-
// <center><b>' . __('OR', 'rtmedia') . '</b></center><br />
|
1605 |
-
// <center>' . __('Use <a href="https://rtcamp.com/store/product-category/buddypress/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media">premium add-ons</a> starting from $9', 'rtmedia') . '</center>';
|
1606 |
-
// ;
|
1607 |
-
// new BPMediaAdminWidget('donate', __('Donate', 'rtmedia'), $donate);
|
1608 |
|
1609 |
$branding = '<form action="http://rtcamp.us1.list-manage1.com/subscribe/post?u=85b65c9c71e2ba3fab8cb1950&id=9e8ded4470" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
|
1610 |
<div class="mc-field-group">
|
1611 |
<input type="email" value="' . $current_user->user_email . '" name="EMAIL" placeholder="Email" class="required email" id="mce-EMAIL">
|
1612 |
<input style="display:none;" type="checkbox" checked="checked" value="1" name="group[1721][1]" id="mce-group[1721]-1721-0">
|
|
|
1613 |
<div id="mce-responses" class="clear">
|
1614 |
<div class="response" id="mce-error-response" style="display:none"></div>
|
1615 |
<div class="response" id="mce-success-response" style="display:none"></div>
|
1616 |
</div>
|
1617 |
-
<input type="submit" value="' . __( 'Subscribe', 'rtmedia' ) . '" name="subscribe" id="mc-embedded-subscribe" class="button">
|
1618 |
</div>
|
1619 |
</form>';
|
1620 |
new RTMediaAdminWidget( 'branding', __( 'Subscribe', 'rtmedia' ), $branding );
|
@@ -1624,8 +1622,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1624 |
do_action( 'rtmedia_after_default_admin_widgets' );
|
1625 |
}
|
1626 |
|
1627 |
-
public function linkback(){
|
1628 |
-
if ( isset( $_POST['linkback'] ) && $_POST['linkback'] ){
|
1629 |
return rtmedia_update_site_option( 'rtmedia-add-linkback', true );
|
1630 |
} else {
|
1631 |
return rtmedia_update_site_option( 'rtmedia-add-linkback', false );
|
@@ -1633,9 +1631,9 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1633 |
die;
|
1634 |
}
|
1635 |
|
1636 |
-
public function convert_videos_mailchimp_send(){
|
1637 |
-
if ( 'Yes' == $_POST['interested'] && ! empty( $_POST['choice'] ) ){
|
1638 |
-
wp_remote_get( esc_url_raw( add_query_arg( array( 'rtmedia-convert-videos-form' => 1, 'choice' => $_POST['choice'], 'url' => urlencode( $_POST['url'] ), 'email' => $_POST['email'] ), 'http://rtcamp.com/' ) ) );
|
1639 |
} else {
|
1640 |
rtmedia_update_site_option( 'rtmedia-survey', 0 );
|
1641 |
}
|
@@ -1643,28 +1641,28 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1643 |
die;
|
1644 |
}
|
1645 |
|
1646 |
-
public function video_transcoding_survey_response(){
|
1647 |
-
if ( isset( $_GET['survey-done'] ) && ( $_GET['survey-done'] == md5( 'survey-done' ) ) ){
|
1648 |
rtmedia_update_site_option( 'rtmedia-survey', 0 );
|
1649 |
}
|
1650 |
}
|
1651 |
|
1652 |
-
public function plugin_meta_premium_addon_link( $plugin_meta, $plugin_file, $plugin_data, $status ){
|
1653 |
-
if ( plugin_basename( RTMEDIA_PATH . 'index.php' ) == $plugin_file ){
|
1654 |
$plugin_meta[] = '<a href="https://rtcamp.com/rtmedia/addons/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" title="' . __( 'Premium Add-ons', 'rtmedia' ) . '">' . __( 'Premium Add-ons', 'rtmedia' ) . '</a>';
|
1655 |
}
|
1656 |
|
1657 |
return $plugin_meta;
|
1658 |
}
|
1659 |
|
1660 |
-
public function upload_filetypes_error(){
|
1661 |
global $rtmedia;
|
1662 |
$upload_filetypes = rtmedia_get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
|
1663 |
$upload_filetypes = explode( ' ', $upload_filetypes );
|
1664 |
-
$flag
|
1665 |
-
if ( isset( $rtmedia->options['images_enabled'] ) && $rtmedia->options['images_enabled'] ){
|
1666 |
$not_supported_image = array_diff( array( 'jpg', 'jpeg', 'png', 'gif' ), $upload_filetypes );
|
1667 |
-
if ( ! empty( $not_supported_image ) ){
|
1668 |
echo '<div class="error upload-filetype-network-settings-error">
|
1669 |
<p>
|
1670 |
' . sprintf( __( 'You have images enabled on rtMedia but your network allowed filetypes do not permit uploading of %s. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), implode( ', ', $not_supported_image ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
@@ -1674,8 +1672,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1674 |
$flag = true;
|
1675 |
}
|
1676 |
}
|
1677 |
-
if ( isset( $rtmedia->options['videos_enabled'] ) && $rtmedia->options['videos_enabled'] ){
|
1678 |
-
if ( ! in_array( 'mp4', $upload_filetypes ) ){
|
1679 |
echo '<div class="error upload-filetype-network-settings-error">
|
1680 |
<p>
|
1681 |
' . sprintf( __( 'You have video enabled on BuddyPress Media but your network allowed filetypes do not permit uploading of mp4. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
@@ -1685,8 +1683,8 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1685 |
$flag = true;
|
1686 |
}
|
1687 |
}
|
1688 |
-
if ( isset( $rtmedia->options['audio_enabled'] ) && $rtmedia->options['audio_enabled'] ){
|
1689 |
-
if ( ! in_array( 'mp3', $upload_filetypes ) ){
|
1690 |
echo '<div class="error upload-filetype-network-settings-error"><p>' . sprintf( __( 'You have audio enabled on BuddyPress Media but your network allowed filetypes do not permit uploading of mp3. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
1691 |
<br /><strong>' . __( 'Recommended', 'rtmedia' ) . ':</strong> <input type="button" class="button update-network-settings-upload-filetypes" class="button" value="' . __( 'Update Network Settings Automatically', 'rtmedia' ) . '"> <img style="display:none;" src="' . admin_url( 'images/wpspin_light.gif' ) . '" />
|
1692 |
</p>
|
@@ -1694,13 +1692,13 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1694 |
$flag = true;
|
1695 |
}
|
1696 |
}
|
1697 |
-
if ( $flag ){
|
1698 |
?>
|
1699 |
<script type="text/javascript">
|
1700 |
jQuery( '.upload-filetype-network-settings-error' ).on( 'click', '.update-network-settings-upload-filetypes', function () {
|
1701 |
jQuery( '.update-network-settings-upload-filetypes' ).siblings( 'img' ).show();
|
1702 |
jQuery( '.update-network-settings-upload-filetypes' ).prop( 'disabled', true );
|
1703 |
-
jQuery.post( ajaxurl, {action: 'rtmedia_correct_upload_filetypes'}, function ( response ) {
|
1704 |
if ( response ) {
|
1705 |
jQuery( '.upload-filetype-network-settings-error:first' ).after( '<div style="display: none;" class="updated rtmedia-network-settings-updated-successfully"><p><?php _e( 'Network settings updated successfully.', 'rtmedia' ); ?></p></div>' )
|
1706 |
jQuery( '.upload-filetype-network-settings-error' ).remove();
|
@@ -1709,35 +1707,35 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1709 |
} );
|
1710 |
} );
|
1711 |
</script>
|
1712 |
-
|
1713 |
}
|
1714 |
}
|
1715 |
|
1716 |
-
public function correct_upload_filetypes(){
|
1717 |
global $rtmedia;
|
1718 |
$upload_filetypes_orig = $upload_filetypes = rtmedia_get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
|
1719 |
-
$upload_filetypes
|
1720 |
-
if ( isset( $rtmedia->options['images_enabled'] ) && $rtmedia->options['images_enabled'] ){
|
1721 |
$not_supported_image = array_diff( array( 'jpg', 'jpeg', 'png', 'gif' ), $upload_filetypes );
|
1722 |
-
if ( ! empty( $not_supported_image ) ){
|
1723 |
$update_image_support = null;
|
1724 |
foreach ( $not_supported_image as $ns ) {
|
1725 |
$update_image_support .= ' ' . $ns;
|
1726 |
}
|
1727 |
-
if ( $update_image_support ){
|
1728 |
$upload_filetypes_orig .= $update_image_support;
|
1729 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1730 |
}
|
1731 |
}
|
1732 |
}
|
1733 |
-
if ( isset( $rtmedia->options['videos_enabled'] ) && $rtmedia->options['videos_enabled'] ){
|
1734 |
-
if ( ! in_array( 'mp4', $upload_filetypes ) ){
|
1735 |
$upload_filetypes_orig .= ' mp4';
|
1736 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1737 |
}
|
1738 |
}
|
1739 |
-
if ( isset( $rtmedia->options['audio_enabled'] ) && $rtmedia->options['audio_enabled'] ){
|
1740 |
-
if ( ! in_array( 'mp3', $upload_filetypes ) ){
|
1741 |
$upload_filetypes_orig .= ' mp3';
|
1742 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1743 |
}
|
@@ -1746,32 +1744,31 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1746 |
die();
|
1747 |
}
|
1748 |
|
1749 |
-
function edit_video_thumbnail( $form_fields, $post ){
|
1750 |
-
if ( isset( $post->post_mime_type ) ){
|
1751 |
$media_type = explode( '/', $post->post_mime_type );
|
1752 |
-
if ( is_array( $media_type ) && 'video' == $media_type[0] ){
|
1753 |
-
$media_id
|
1754 |
-
$thumbnail_array
|
1755 |
-
$rtmedia_model
|
1756 |
-
$rtmedia_media
|
1757 |
$video_thumb_html = '';
|
1758 |
-
if ( is_array( $thumbnail_array ) ){
|
1759 |
$video_thumb_html .= '<ul> ';
|
1760 |
|
1761 |
foreach ( $thumbnail_array as $key => $thumbnail_src ) {
|
1762 |
-
$checked = checked( $thumbnail_src, $rtmedia_media[0]->cover_art, false );
|
1763 |
-
$count
|
1764 |
$video_thumb_html .= '<li style="width: 150px;display: inline-block;">
|
1765 |
<label for="rtmedia-upload-select-thumbnail-' . $count . '">
|
1766 |
<input type="radio" ' . $checked . ' id="rtmedia-upload-select-thumbnail-' . $count . '" value="' . $thumbnail_src . '" name="rtmedia-thumbnail" />
|
1767 |
<img src=" ' . $thumbnail_src . '" style="max-height: 120px;max-width: 120px; vertical-align: middle;" />
|
1768 |
</label>
|
1769 |
</li> ';
|
1770 |
-
|
1771 |
}
|
1772 |
|
1773 |
$video_thumb_html .= ' </ul>';
|
1774 |
-
$form_fields['rtmedia_video_thumbnail'] = array(
|
1775 |
'label' => 'Video Thumbnails', 'input' => 'html', 'html' => $video_thumb_html,
|
1776 |
);
|
1777 |
}
|
@@ -1781,23 +1778,23 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1781 |
return $form_fields;
|
1782 |
}
|
1783 |
|
1784 |
-
function save_video_thumbnail( $post, $attachment ){
|
1785 |
-
if ( isset( $post['rtmedia-thumbnail'] ) ){
|
1786 |
$rtmedia_model = new RTMediaModel();
|
1787 |
-
$model
|
1788 |
-
$media
|
1789 |
-
$media_id
|
1790 |
-
$rtmedia_model->update( array( 'cover_art' => $post['rtmedia-thumbnail'] ), array( 'media_id' => $post['ID'] ) );
|
1791 |
update_activity_after_thumb_set( $media_id );
|
1792 |
}
|
1793 |
|
1794 |
return $post;
|
1795 |
}
|
1796 |
|
1797 |
-
function rtmedia_regenerate_thumb_js(){
|
1798 |
global $pagenow;
|
1799 |
|
1800 |
-
if ( 'upload.php' == $pagenow ){
|
1801 |
?>
|
1802 |
<script type="text/javascript">
|
1803 |
function rtmedia_regenerate_thumbs( post_id ) {
|
@@ -1817,62 +1814,62 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1817 |
}
|
1818 |
}
|
1819 |
</script>
|
1820 |
-
|
1821 |
}
|
1822 |
}
|
1823 |
|
1824 |
-
function add_bulk_actions_regenerate(){
|
1825 |
?>
|
1826 |
<script type="text/javascript">
|
1827 |
jQuery( document ).ready( function ( $ ) {
|
1828 |
$( 'select[name^="action"] option:last-child' ).before( '<option value="bulk_video_regenerate_thumbnails"><?php esc_attr_e( 'Regenerate Video Thumbnails', 'rtmedia' ); ?></option>' );
|
1829 |
} );
|
1830 |
</script>
|
1831 |
-
|
1832 |
}
|
1833 |
|
1834 |
-
function presstrends_plugin(){
|
1835 |
global $rtmedia;
|
1836 |
$option = $rtmedia->options;
|
1837 |
-
if ( ! isset( $option['general_AllowUserData'] ) ){
|
1838 |
return;
|
1839 |
}
|
1840 |
-
if ( '0' == $option['general_AllowUserData'] ){
|
1841 |
return;
|
1842 |
}
|
1843 |
// PressTrends Account API Key
|
1844 |
$api_key = 'djbzu1no2tdz4qq4u2fpgaemuup2zzmtjulb';
|
1845 |
-
$auth
|
1846 |
// Start of Metrics
|
1847 |
global $wpdb;
|
1848 |
$data = get_transient( 'presstrends_cache_data' );
|
1849 |
|
1850 |
-
if ( ! $data || $data == '' ){
|
1851 |
-
$api_base
|
1852 |
-
$url
|
1853 |
-
$count_posts
|
1854 |
-
$count_pages
|
1855 |
$comments_count = wp_count_comments();
|
1856 |
|
1857 |
-
if ( function_exists( 'wp_get_theme' ) ){
|
1858 |
$theme_data = wp_get_theme();
|
1859 |
$theme_name = urlencode( $theme_data->Name );
|
1860 |
} else {
|
1861 |
$theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
|
1862 |
-
$theme_name = $theme_data['Name'];
|
1863 |
}
|
1864 |
|
1865 |
$plugin_name = '&';
|
1866 |
|
1867 |
foreach ( get_plugins() as $plugin_info ) {
|
1868 |
-
$plugin_name .= $plugin_info['Name'] . '&';
|
1869 |
}
|
1870 |
|
1871 |
// CHANGE __FILE__ PATH IF LOCATED OUTSIDE MAIN PLUGIN FILE
|
1872 |
-
$plugin_data
|
1873 |
$posts_with_comments = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' AND comment_count > 0" );
|
1874 |
-
$data
|
1875 |
-
'url' => base64_encode( site_url() ), 'posts' => $count_posts->publish, 'pages' => $count_pages->publish, 'comments' => $comments_count->total_comments, 'approved' => $comments_count->approved, 'spam' => $comments_count->spam, 'pingbacks' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ), 'post_conversion' => ( $count_posts->publish > 0 && $posts_with_comments > 0 ) ? number_format( ( $posts_with_comments / $count_posts->publish ) * 100, 0, '.', '' ) : 0, 'theme_version' => $plugin_data['Version'], 'theme_name' => $theme_name, 'site_name' => str_replace( ' ', '', get_bloginfo( 'name' ) ), 'plugins' => count( get_option( 'active_plugins' ) ), 'plugin' => urlencode( $plugin_name ), 'wpversion' => get_bloginfo( 'version' ),
|
1876 |
);
|
1877 |
|
1878 |
foreach ( $data as $k => $v ) {
|
@@ -1884,17 +1881,17 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1884 |
}
|
1885 |
}
|
1886 |
|
1887 |
-
function rtmedia_update_template_notice(){
|
1888 |
-
$site_option = rtmedia_get_site_option( 'rtmedia-update-template-notice-
|
1889 |
|
1890 |
-
if ( ! $site_option || 'hide' != $site_option ){
|
1891 |
-
rtmedia_update_site_option( 'rtmedia-update-template-notice-
|
1892 |
-
if ( is_dir( get_template_directory() . '/rtmedia' ) ){
|
1893 |
echo '<div class="error rtmedia-update-template-notice"><p>' . __( 'Please update rtMedia template files if you have overridden the default rtMedia templates in your theme. If not, you can ignore and hide this notice.' ) . '<a href="#" onclick="rtmedia_hide_template_override_notice()" style="float:right">' . __( 'Hide', 'rtmedia' ) . '</a>' . ' </p></div>';
|
1894 |
?>
|
1895 |
<script type="text/javascript">
|
1896 |
function rtmedia_hide_template_override_notice() {
|
1897 |
-
var data = {action: 'rtmedia_hide_template_override_notice'};
|
1898 |
jQuery.post( ajaxurl, data, function ( response ) {
|
1899 |
response = response.trim();
|
1900 |
if ( '1' === response )
|
@@ -1902,19 +1899,95 @@ if ( ! class_exists( 'RTMediaAdmin' ) ){
|
|
1902 |
} );
|
1903 |
}
|
1904 |
</script>
|
1905 |
-
|
1906 |
}
|
1907 |
}
|
1908 |
}
|
1909 |
|
1910 |
-
function rtmedia_hide_template_override_notice(){
|
1911 |
|
1912 |
-
if ( rtmedia_update_site_option( 'rtmedia-update-template-notice-
|
1913 |
echo '1';
|
1914 |
} else {
|
1915 |
echo '0';
|
1916 |
}
|
1917 |
die();
|
1918 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1919 |
}
|
|
|
1920 |
}
|
6 |
* @subpackage Admin
|
7 |
*
|
8 |
*/
|
9 |
+
if ( ! class_exists( 'RTMediaAdmin' ) ) {
|
10 |
|
11 |
/**
|
12 |
* RTMediaAdmin class.
|
25 |
* @access public
|
26 |
* @return void
|
27 |
*/
|
28 |
+
public function __construct() {
|
29 |
global $rtmedia;
|
30 |
|
31 |
// Actions and filters
|
32 |
add_action( 'init', array( $this, 'video_transcoding_survey_response' ) );
|
33 |
// add_action( 'admin_init', array( $this, 'presstrends_plugin' ) );
|
|
|
34 |
//$rtmedia_feed = new RTMediaFeed();
|
35 |
add_filter( 'plugin_action_links_' . RTMEDIA_BASE_NAME, array( &$this, 'plugin_add_settings_link' ) );
|
36 |
//add_action ( 'wp_ajax_rtmedia_fetch_feed', array( $rtmedia_feed, 'fetch_feed' ), 1 );
|
56 |
|
57 |
$obj_encoding = new RTMediaEncoding( true );
|
58 |
|
59 |
+
if ( $obj_encoding->api_key ) {
|
60 |
add_filter( 'media_row_actions', array( $this, 'add_reencode_link' ), null, 2 );
|
61 |
add_action( 'admin_head-upload.php', array( $this, 'add_bulk_actions_regenerate' ) );
|
62 |
add_action( 'admin_footer', array( $this, 'rtmedia_regenerate_thumb_js' ) );
|
66 |
|
67 |
add_action( 'wp_ajax_rt_media_regeneration', array( $this, 'rt_media_regeneration' ), 1 );
|
68 |
|
69 |
+
if ( ! isset( $rtmedia->options ) ) {
|
70 |
$rtmedia->options = rtmedia_get_site_option( 'rtmedia-options' );
|
71 |
}
|
72 |
|
73 |
+
if ( isset( $_POST[ 'rtmedia-options' ] ) ) {
|
74 |
+
if ( isset( $_POST[ 'rtmedia-options' ][ 'general_showAdminMenu' ] ) && '1' == $_POST[ 'rtmedia-options' ][ 'general_showAdminMenu' ] ) {
|
75 |
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100, 1 );
|
76 |
}
|
77 |
} else {
|
78 |
+
if ( 1 == intval( $rtmedia->options[ 'general_showAdminMenu' ] ) ) {
|
79 |
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menu' ), 100, 1 );
|
80 |
}
|
81 |
}
|
82 |
|
83 |
+
if ( is_admin() ) {
|
84 |
add_action( 'admin_enqueue_scripts', array( $this, 'ui' ) );
|
85 |
//bp_core_admin_hook();
|
86 |
add_action( 'admin_menu', array( $this, 'menu' ), 1 );
|
87 |
add_action( 'init', array( $this, 'bp_admin_tabs' ) );
|
88 |
|
89 |
+
if ( is_multisite() ) {
|
90 |
add_action( 'network_admin_edit_rtmedia', array( $this, 'save_multisite_options' ) );
|
91 |
}
|
92 |
}
|
96 |
// show rtmedia advertisement
|
97 |
// if(! defined("RTMEDIA_PRO_VERSION") )
|
98 |
// add_action ( 'rtmedia_before_default_admin_widgets', array( $this, 'rtmedia_advertisement' ),1);
|
99 |
+
if ( ! class_exists( 'BuddyPress' ) ) {
|
100 |
add_action( 'admin_init', array( $this, 'check_permalink_admin_notice' ) );
|
101 |
}
|
102 |
|
105 |
add_action( 'wp_ajax_rtmedia_hide_inspirebook_release_notice', array( $this, 'rtmedia_hide_inspirebook_release_notice' ), 1 );
|
106 |
add_action( 'wp_ajax_rtmedia_hide_social_sync_notice', array( $this, 'rtmedia_hide_social_sync_notice' ), 1 );
|
107 |
$rtmedia_media_import = new RTMediaMediaSizeImporter(); // do not delete this line. We only need to create object of this class if we are in admin section
|
108 |
+
if ( class_exists( 'BuddyPress' ) ) {
|
109 |
$rtmedia_activity_upgrade = new RTMediaActivityUpgrade();
|
110 |
}
|
111 |
add_action( 'admin_notices', array( $this, 'rtmedia_admin_notices' ) );
|
114 |
add_action( 'admin_init', array( $this, 'rtmedia_migration' ) );
|
115 |
}
|
116 |
|
117 |
+
function rtmedia_migration() {
|
118 |
$rtMigration = new RTMediaMigration();
|
119 |
}
|
120 |
|
121 |
+
function rtmedia_addon_license_save_hook() {
|
122 |
do_action( 'rtmedia_addon_license_save_hook' );
|
123 |
}
|
124 |
|
131 |
*
|
132 |
* @return void
|
133 |
*/
|
134 |
+
public function rtmedia_network_admin_notices() {
|
135 |
+
if ( is_multisite() ) {
|
136 |
$this->upload_filetypes_error();
|
137 |
}
|
138 |
}
|
146 |
*
|
147 |
* @return void
|
148 |
*/
|
149 |
+
public function rtmedia_admin_notices() {
|
150 |
+
if ( current_user_can( 'list_users' ) ) {
|
151 |
$this->upload_filetypes_error();
|
152 |
$this->rtmedia_regenerate_thumbnail_notice();
|
153 |
$this->rtmedia_addon_update_notice();
|
160 |
/*
|
161 |
* Show social sync release notice admin notice.
|
162 |
*/
|
163 |
+
|
164 |
+
function rtmedia_social_sync_release_notice() {
|
165 |
$site_option = rtmedia_get_site_option( 'rtmedia_social_sync_release_notice' );
|
166 |
+
$check_rtmedia_social_sync_installed = file_exists( trailingslashit( WP_PLUGIN_DIR ) . 'rtmedia-social-sync/index.php' );
|
167 |
+
|
168 |
+
if ( ( ! $site_option || 'hide' != $site_option ) && ! $check_rtmedia_social_sync_installed ) {
|
169 |
rtmedia_update_site_option( 'rtmedia_social_sync_release_notice', 'show' );
|
170 |
?>
|
171 |
<div class="updated rtmedia-social-sync-notice">
|
181 |
</div>
|
182 |
<script type="text/javascript">
|
183 |
function rtmedia_hide_social_sync_notice() {
|
184 |
+
var data = { action: 'rtmedia_hide_social_sync_notice' };
|
185 |
jQuery.post( ajaxurl, data, function ( response ) {
|
186 |
response = response.trim();
|
187 |
if ( response === "1" )
|
189 |
} );
|
190 |
}
|
191 |
</script>
|
192 |
+
<?php
|
193 |
}
|
194 |
}
|
195 |
|
196 |
/*
|
197 |
* Hide social sync release notice
|
198 |
*/
|
199 |
+
|
200 |
+
function rtmedia_hide_social_sync_notice() {
|
201 |
+
if ( rtmedia_update_site_option( 'rtmedia_social_sync_release_notice', 'hide' ) ) {
|
202 |
echo '1';
|
203 |
} else {
|
204 |
echo '0';
|
215 |
*
|
216 |
* @return void
|
217 |
*/
|
218 |
+
public function rtmedia_inspirebook_release_notice() {
|
219 |
$site_option = rtmedia_get_site_option( 'rtmedia_inspirebook_release_notice' );
|
220 |
+
if ( ( ! $site_option || 'hide' != $site_option ) && ( 'inspirebook' != get_stylesheet() ) ) {
|
221 |
rtmedia_update_site_option( 'rtmedia_inspirebook_release_notice', 'show' );
|
222 |
?>
|
223 |
<div class="updated rtmedia-inspire-book-notice">
|
224 |
<p>
|
225 |
+
<span><a href="https://rtcamp.com/products/inspirebook/" target="_blank"><b>Meet
|
226 |
InspireBook</b></a> - First official rtMedia premium theme.</span>
|
227 |
<a href="#" onclick="rtmedia_hide_inspirebook_notice()" style="float:right">Dismiss</a>
|
228 |
</p>
|
229 |
</div>
|
230 |
<script type="text/javascript">
|
231 |
function rtmedia_hide_inspirebook_notice() {
|
232 |
+
var data = { action: 'rtmedia_hide_inspirebook_release_notice' };
|
233 |
jQuery.post( ajaxurl, data, function ( response ) {
|
234 |
response = response.trim();
|
235 |
if ( response === "1" )
|
237 |
} );
|
238 |
}
|
239 |
</script>
|
240 |
+
<?php
|
241 |
}
|
242 |
}
|
243 |
|
250 |
*
|
251 |
* @return void
|
252 |
*/
|
253 |
+
public function rtmedia_hide_inspirebook_release_notice() {
|
254 |
+
if ( rtmedia_update_site_option( 'rtmedia_inspirebook_release_notice', 'hide' ) ) {
|
255 |
echo '1';
|
256 |
} else {
|
257 |
echo '0';
|
268 |
*
|
269 |
* @return void
|
270 |
*/
|
271 |
+
public function rtmedia_bp_add_update_type() {
|
272 |
+
if ( class_exists( 'BuddyPress' ) && function_exists( 'bp_activity_set_action' ) ) {
|
273 |
bp_activity_set_action( 'rtmedia_update', 'rtmedia_update', 'rtMedia Update' );
|
274 |
}
|
275 |
}
|
283 |
*
|
284 |
* @return void
|
285 |
*/
|
286 |
+
public function check_permalink_admin_notice() {
|
287 |
global $wp_rewrite;
|
288 |
+
if ( empty( $wp_rewrite->permalink_structure ) ) {
|
289 |
add_action( 'admin_notices', array( $this, 'rtmedia_permalink_notice' ) );
|
290 |
}
|
291 |
}
|
299 |
*
|
300 |
* @return void
|
301 |
*/
|
302 |
+
public function rtmedia_permalink_notice() {
|
303 |
echo '<div class="error rtmedia-permalink-change-notice">
|
304 |
<p> <b>' . __( 'rtMedia:' ) . '</b> ' . __( ' You must ' ) . '<a href="' . admin_url( 'options-permalink.php' ) . '">' . __( 'update permalink structure' ) . '</a>' . __( ' to something other than the default for it to work.', 'rtmedia' ) . ' </p>
|
305 |
</div>';
|
314 |
*
|
315 |
* @return void
|
316 |
*/
|
317 |
+
public function rtmedia_addon_update_notice() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
|
319 |
+
$site_option = rtmedia_get_site_option( 'rtmedia-addon-update-notice-3_8' );
|
320 |
+
if( is_rt_admin()
|
321 |
+
&& ( ! $site_option || 'hide' != $site_option ) ){
|
322 |
+
|
323 |
+
if ( ! $this->check_for_addon_update_notice() ) {
|
324 |
+
return;
|
325 |
+
}
|
326 |
+
rtmedia_update_site_option( 'rtmedia-addon-update-notice-3_8', 'show' );
|
327 |
+
?>
|
328 |
+
<div class="error rtmedia-addon-upate-notice">
|
329 |
+
<p>
|
330 |
+
<strong><?php _e( 'rtMedia:', 'rtmedia' ) ?></strong> <?php _e( 'Please update all premium add-ons that you have purchased from rtCamp from', 'rtmedia' ) ?> <a href="https://rtcamp.com/my-account/" target="_blank"><?php _e( 'your account', 'rtmedia' ) ?></a>. <a href="#" onclick="rtmedia_hide_addon_update_notice()" style="float:right"><?php _e( 'Dismiss', 'rtmedia' ) ?></a>
|
331 |
+
</p>
|
332 |
+
</div>
|
333 |
<script type="text/javascript">
|
334 |
function rtmedia_hide_addon_update_notice() {
|
335 |
var data = {
|
355 |
*
|
356 |
* @return bool $return_falg
|
357 |
*/
|
358 |
+
public function check_for_addon_update_notice() {
|
359 |
$return_falg = false;
|
360 |
|
361 |
+
// check for rtMedia Instagram version
|
362 |
+
if ( defined( 'RTMEDIA_INSTAGRAM_PATH' ) ) {
|
363 |
$plugin_info = get_plugin_data( RTMEDIA_INSTAGRAM_PATH . 'index.php' );
|
364 |
+
if ( isset( $plugin_info[ 'Version' ] ) && ( -1 === version_compare( $plugin_info[ 'Version' ], '2.1.14' ) ) ) {
|
365 |
$return_falg = true;
|
366 |
}
|
367 |
+
} elseif( defined( 'RTMEDIA_PHOTO_TAGGING_PATH' ) ){
|
368 |
+
// check for rtMedia Photo Tagging version
|
369 |
+
$plugin_info = get_plugin_data( RTMEDIA_PHOTO_TAGGING_PATH . 'index.php' );
|
370 |
+
if ( isset( $plugin_info[ 'Version' ] ) && ( -1 === version_compare( $plugin_info[ 'Version' ], '2.2.14' ) ) ) {
|
371 |
+
$return_falg = true;
|
372 |
+
}
|
373 |
+
} elseif( defined( 'RTMEDIA_FFMPEG_PATH' ) ){
|
374 |
+
// check for rtMedia FFPMEG version
|
375 |
+
$plugin_info = get_plugin_data( RTMEDIA_FFMPEG_PATH . 'index.php' );
|
376 |
+
if ( isset( $plugin_info[ 'Version' ] ) && ( -1 === version_compare( $plugin_info[ 'Version' ], '2.1.14' ) ) ) {
|
377 |
+
$return_falg = true;
|
378 |
+
}
|
379 |
+
} elseif( defined( 'RTMEDIA_KALTURA_PATH' ) ){
|
380 |
+
// check for rtMedia Kaltura version
|
381 |
+
$plugin_info = get_plugin_data( RTMEDIA_KALTURA_PATH . 'index.php' );
|
382 |
+
if ( isset( $plugin_info[ 'Version' ] ) && ( -1 === version_compare( $plugin_info[ 'Version' ], '3.0.16' ) ) ) {
|
383 |
+
$return_falg = true;
|
384 |
+
}
|
385 |
+
} elseif( defined( 'RTMEDIA_PRO_PATH' ) ){
|
386 |
+
// check for rtMedia Pro version
|
387 |
+
$plugin_info = get_plugin_data( RTMEDIA_PRO_PATH . 'index.php' );
|
388 |
+
if ( isset( $plugin_info[ 'Version' ] ) && ( -1 === version_compare( $plugin_info[ 'Version' ], '2.6' ) ) ) {
|
389 |
+
$return_falg = true;
|
390 |
+
}
|
391 |
+
} elseif( defined( 'RTMEDIA_SOCIAL_SYNC_PATH' ) ){
|
392 |
+
// check for rtMedia Social Sync version
|
393 |
+
$plugin_info = get_plugin_data( RTMEDIA_SOCIAL_SYNC_PATH . 'index.php' );
|
394 |
+
if ( isset( $plugin_info[ 'Version' ] ) && ( -1 === version_compare( $plugin_info[ 'Version' ], '1.3.1' ) ) ) {
|
395 |
+
$return_falg = true;
|
396 |
+
}
|
397 |
+
} elseif( defined( 'RTMEDIA_MEMBERSHIP_PATH' ) ){
|
398 |
+
// check for rtMedia Membership version
|
399 |
+
$plugin_info = get_plugin_data( RTMEDIA_MEMBERSHIP_PATH . 'index.php' );
|
400 |
+
if ( isset( $plugin_info[ 'Version' ] ) && ( -1 === version_compare( $plugin_info[ 'Version' ], '2.1.5' ) ) ) {
|
401 |
+
$return_falg = true;
|
402 |
+
}
|
403 |
+
} elseif( defined( 'RTMEDIA_WATERMARK_PATH' ) ){
|
404 |
+
// check for rtMedia Photo Watermak version
|
405 |
+
$plugin_info = get_plugin_data( RTMEDIA_WATERMARK_PATH . 'index.php' );
|
406 |
+
if ( isset( $plugin_info[ 'Version' ] ) && ( -1 === version_compare( $plugin_info[ 'Version' ], '1.1.8' ) ) ) {
|
407 |
+
$return_falg = true;
|
408 |
}
|
409 |
}
|
410 |
|
420 |
*
|
421 |
* @return void
|
422 |
*/
|
423 |
+
public function bp_admin_tabs() {
|
424 |
+
if ( current_user_can( 'manage_options' ) ) {
|
425 |
add_action( 'bp_admin_tabs', array( $this, 'tab' ) );
|
426 |
}
|
427 |
}
|
435 |
*
|
436 |
* @return void
|
437 |
*/
|
438 |
+
public function rtmedia_advertisement() {
|
439 |
+
$src = RTMEDIA_URL . 'app/assets/admin/img/rtMedia-pro-ad.png'
|
440 |
?>
|
441 |
<div class='rtmedia-admin-ad'>
|
442 |
+
<a href='http://rtcamp.com/products/rtmedia-pro/' target='_blank' title='rtMedia Pro'>
|
443 |
<img src='<?php echo $src; ?>' alt="<?php _e( 'rtMedia Pro is released', 'rtmedia' ); ?>"/>
|
444 |
</a>
|
445 |
</div>
|
446 |
+
<?php
|
447 |
}
|
448 |
|
449 |
/**
|
455 |
*
|
456 |
* @return void
|
457 |
*/
|
458 |
+
public function rtmedia_dashboard_widget_function() {
|
459 |
?>
|
460 |
|
461 |
+
<div class="clearfix">
|
462 |
+
|
463 |
+
<div class="rtm-column alignleft">
|
464 |
+
<h4 class="sub"><?php _e( 'Media Stats', 'rtmedia' ); ?></h4>
|
465 |
|
|
|
|
|
466 |
<table>
|
467 |
<tbody>
|
468 |
+
<?php
|
469 |
+
$rtMedia_model = new RTMediaModel();
|
470 |
+
$sql = "select media_type, count(id) as count from {$rtMedia_model->table_name} where blog_id='" . get_current_blog_id() . "' group by media_type";
|
471 |
+
global $wpdb;
|
472 |
+
$results = $wpdb->get_results( $sql );
|
473 |
+
if ( $results ) {
|
474 |
+
foreach ( $results as $media ) {
|
475 |
+
if ( defined( strtoupper( 'RTMEDIA_' . $media->media_type . '_PLURAL_LABEL' ) ) ) {
|
476 |
+
?>
|
477 |
+
<tr>
|
478 |
+
<td class="b"> <?php echo $media->count; ?> </td>
|
479 |
+
<td class="t"><?php echo constant( strtoupper( 'RTMEDIA_' . $media->media_type . '_PLURAL_LABEL' ) ); ?></td>
|
480 |
+
</tr>
|
481 |
+
<?php
|
482 |
+
}
|
483 |
+
}
|
484 |
+
}
|
485 |
+
?>
|
486 |
</tbody>
|
487 |
</table>
|
488 |
</div>
|
489 |
+
|
490 |
+
<div class="rtm-column alignright">
|
491 |
+
<h4 class="sub"><?php _e( 'Usage Stats', 'rtmedia' ); ?></h4>
|
492 |
+
|
493 |
<table>
|
494 |
<tbody> <?php
|
495 |
+
$sql = "select count(*) from {$wpdb->users}";
|
496 |
+
$results = $wpdb->get_var( $sql );
|
497 |
+
?>
|
498 |
+
<tr>
|
499 |
+
<td class="b"> <?php echo $results; ?> </td>
|
500 |
+
<td class="t"><?php _e( 'Total ', 'rtmedia' ) ?></td>
|
501 |
+
</tr>
|
502 |
+
<?php
|
503 |
+
$sql = "select count(distinct media_author) from {$rtMedia_model->table_name}";
|
504 |
+
$results = $wpdb->get_var( $sql );
|
505 |
+
?>
|
506 |
+
<tr>
|
507 |
+
<td class="b"> <?php echo $results; ?> </td>
|
508 |
+
<td class="t"><?php _e( 'With Media', 'rtmedia' ) ?></td>
|
509 |
+
</tr>
|
510 |
+
<?php
|
511 |
+
$sql = "select count(*) from $wpdb->comments where comment_post_ID in (select media_id from {$rtMedia_model->table_name})";
|
512 |
+
$results = $wpdb->get_var( $sql );
|
513 |
+
?>
|
514 |
+
<tr>
|
515 |
+
<td class="b"> <?php echo $results; ?> </td>
|
516 |
+
<td class="t"><?php _e( 'Comments ', 'rtmedia' ) ?></td>
|
517 |
+
</tr>
|
518 |
+
<?php
|
519 |
+
$sql = "select sum(likes) from {$rtMedia_model->table_name}";
|
520 |
+
$results = $wpdb->get_var( $sql );
|
521 |
+
?>
|
522 |
+
<tr>
|
523 |
+
<td class="b"> <?php echo $results; ?> </td>
|
524 |
+
<td class="t"><?php _e( 'Likes', 'rtmedia' ) ?></td>
|
525 |
+
</tr>
|
526 |
|
527 |
</tbody>
|
528 |
</table>
|
529 |
</div>
|
530 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
</div>
|
532 |
+
|
533 |
+
<div class="rtm-meta-container">
|
534 |
+
<ul class="rtm-meta-links">
|
535 |
+
<li><b><?php _e( 'rtMedia Links:', 'rtmedia' ); ?></b></li>
|
536 |
+
<li><a href="http://rtcamp.com"><?php _e( 'Homepage', 'rtmedia' ); ?></a></li>
|
537 |
+
<li><a href="admin.php?page=rtmedia-support#rtmedia-general"><?php _e( 'Free Support', 'rtmedia' ); ?></a></li>
|
538 |
+
<li><a href="http://rtcamp.com/rtmedia/addons/"><?php _e( 'Premium Addons', 'rtmedia' ); ?></a></li>
|
539 |
+
</ul>
|
540 |
+
</div>
|
541 |
+
<?php
|
542 |
}
|
543 |
|
544 |
/**
|
550 |
*
|
551 |
* @return void
|
552 |
*/
|
553 |
+
public function add_dashboard_widgets() {
|
554 |
wp_add_dashboard_widget( 'rtmedia_dashboard_widget', __( 'Right Now in rtMedia', 'rtmedia' ), array( &$this, 'rtmedia_dashboard_widget_function' ) );
|
555 |
global $wp_meta_boxes;
|
556 |
|
557 |
// Get the regular dashboard widgets array
|
558 |
// (which has our new widget already but at the end)
|
559 |
|
560 |
+
$normal_dashboard = $wp_meta_boxes[ 'dashboard' ][ 'normal' ][ 'core' ];
|
561 |
|
562 |
// Backup and delete our new dashboard widget from the end of the array
|
563 |
|
564 |
+
$example_widget_backup = array( 'rtmedia_dashboard_widget' => $normal_dashboard[ 'rtmedia_dashboard_widget' ] );
|
565 |
+
unset( $normal_dashboard[ 'rtmedia_dashboard_widget' ] );
|
566 |
|
567 |
// Merge the two arrays together so our widget is at the beginning
|
568 |
|
570 |
|
571 |
// Save the sorted array back into the original metaboxes
|
572 |
|
573 |
+
$wp_meta_boxes[ 'dashboard' ][ 'normal' ][ 'core' ] = $sorted_dashboard;
|
574 |
}
|
575 |
|
576 |
/**
|
582 |
*
|
583 |
* @return array $links
|
584 |
*/
|
585 |
+
public function plugin_add_settings_link( $links ) {
|
586 |
$settings_link = '<a href="' . admin_url( 'admin.php?page=rtmedia-settings' ) . '">Settings</a>';
|
587 |
array_push( $links, $settings_link );
|
588 |
$settings_link = '<a href="' . admin_url( 'admin.php?page=rtmedia-support' ) . '">Support</a>';
|
601 |
*
|
602 |
* @return array $actions
|
603 |
*/
|
604 |
+
public function add_reencode_link( $actions, $post ) {
|
605 |
|
606 |
$mime_type_array = explode( '/', $post->post_mime_type );
|
607 |
+
if ( is_array( $mime_type_array ) && '' != $mime_type_array && 'video' == $mime_type_array[ 0 ] ) {
|
608 |
+
$actions[ 'reencode' ] = '<a class="submitdelete" onclick="return rtmedia_regenerate_thumbs(' . $post->ID . ')" href="#">' . __( 'Regenerate Thumbnail', 'rtmedia' ) . '</a>';
|
609 |
}
|
610 |
|
611 |
return $actions;
|
620 |
*
|
621 |
* @return void
|
622 |
*/
|
623 |
+
public function bulk_action_handler() {
|
624 |
+
if ( 'bulk_video_regenerate_thumbnails' == $_REQUEST[ 'action' ] && '' != $_REQUEST[ 'media' ] ) {
|
625 |
+
wp_safe_redirect( esc_url_raw( add_query_arg( array( 'media_ids' => urlencode( implode( ',', $_REQUEST[ 'media' ] ) ) ), admin_url( 'admin.php?page=rtmedia-regenerate' ) ) ) );
|
626 |
exit;
|
627 |
}
|
628 |
}
|
636 |
*
|
637 |
* @return void
|
638 |
*/
|
639 |
+
public function admin_bar_menu( $admin_bar ) {
|
640 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
641 |
return;
|
642 |
}
|
643 |
|
644 |
$admin_bar->add_menu( array(
|
645 |
+
'id' => 'rtMedia',
|
646 |
+
'title' => 'rtMedia',
|
647 |
+
'href' => admin_url( 'admin.php?page=rtmedia-settings' ),
|
648 |
+
'meta' => array(
|
649 |
+
'title' => __( 'rtMedia', 'rtmedia' ),
|
650 |
+
),
|
651 |
+
)
|
652 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
$admin_bar->add_menu( array(
|
654 |
+
'id' => 'rt-media-dashborad',
|
655 |
+
'parent' => 'rtMedia',
|
656 |
+
'title' => __( 'Settings', 'rtmedia' ),
|
657 |
+
'href' => admin_url( 'admin.php?page=rtmedia-settings' ),
|
658 |
+
'meta' => array(
|
659 |
+
'title' => __( 'Settings', 'rtmedia' ),
|
660 |
+
'target' => '_self',
|
661 |
+
),
|
662 |
+
)
|
663 |
+
);
|
664 |
$admin_bar->add_menu( array(
|
665 |
+
'id' => 'rt-media-addons',
|
666 |
+
'parent' => 'rtMedia',
|
667 |
+
'title' => __( 'Addons', 'rtmedia' ),
|
668 |
+
'href' => admin_url( 'admin.php?page=rtmedia-addons' ),
|
669 |
+
'meta' => array(
|
670 |
+
'title' => __( 'Addons', 'rtmedia' ),
|
671 |
+
'target' => '_self',
|
672 |
+
),
|
673 |
+
)
|
674 |
+
);
|
675 |
$admin_bar->add_menu( array(
|
676 |
+
'id' => 'rt-media-support',
|
677 |
+
'parent' => 'rtMedia',
|
678 |
+
'title' => __( 'Support', 'rtmedia' ),
|
679 |
+
'href' => admin_url( 'admin.php?page=rtmedia-support' ),
|
680 |
+
'meta' => array(
|
681 |
+
'title' => __( 'Support', 'rtmedia' ),
|
682 |
+
'target' => '_self',
|
683 |
+
),
|
684 |
+
)
|
685 |
+
);
|
686 |
$admin_bar->add_menu( array(
|
687 |
+
'id' => 'rt-media-themes',
|
688 |
+
'parent' => 'rtMedia',
|
689 |
+
'title' => __( 'Themes', 'rtmedia' ),
|
690 |
+
'href' => admin_url( 'admin.php?page=rtmedia-themes' ),
|
691 |
+
'meta' => array(
|
692 |
+
'title' => __( 'Themes', 'rtmedia' ),
|
693 |
+
'target' => '_self',
|
694 |
+
),
|
695 |
+
)
|
696 |
+
);
|
697 |
$admin_bar->add_menu( array(
|
698 |
+
'id' => 'rt-media-hire-us',
|
699 |
+
'parent' => 'rtMedia',
|
700 |
+
'title' => __( 'Hire Us', 'rtmedia' ),
|
701 |
+
'href' => admin_url( 'admin.php?page=rtmedia-hire-us' ),
|
702 |
+
'meta' => array(
|
703 |
+
'title' => __( 'Hire Us', 'rtmedia' ),
|
704 |
+
'target' => '_self',
|
705 |
+
),
|
706 |
+
)
|
707 |
+
);
|
708 |
+
if ( has_filter( 'rtmedia_license_tabs' ) || did_action( 'rtmedia_addon_license_details' ) ) {
|
709 |
+
$admin_bar->add_menu( array(
|
710 |
+
'id' => 'rt-media-license',
|
711 |
+
'parent' => 'rtMedia',
|
712 |
+
'title' => __( 'Licenses', 'rtmedia' ),
|
713 |
+
'href' => admin_url( 'admin.php?page=rtmedia-license' ),
|
714 |
+
'meta' => array(
|
715 |
+
'title' => __( 'Licenses', 'rtmedia' ),
|
716 |
+
'target' => '_self',
|
717 |
+
),
|
718 |
+
)
|
719 |
+
);
|
720 |
+
}
|
721 |
}
|
722 |
|
723 |
/**
|
729 |
*
|
730 |
* @return void
|
731 |
*/
|
732 |
+
public function ui( $hook ) {
|
733 |
$admin_pages = array(
|
734 |
+
'rtmedia_page_rtmedia-migration',
|
735 |
+
'rtmedia_page_rtmedia-kaltura-settings',
|
736 |
+
'rtmedia_page_rtmedia-ffmpeg-settings',
|
737 |
+
'toplevel_page_rtmedia-settings',
|
738 |
+
'rtmedia_page_rtmedia-addons',
|
739 |
+
'rtmedia_page_rtmedia-support',
|
740 |
+
'rtmedia_page_rtmedia-themes',
|
741 |
+
'rtmedia_page_rtmedia-hire-us',
|
742 |
+
'rtmedia_page_rtmedia-importer',
|
743 |
+
'rtmedia_page_rtmedia-regenerate',
|
744 |
+
'rtmedia_page_rtmedia-premium',
|
|
|
745 |
);
|
746 |
|
747 |
+
if ( has_filter( 'rtmedia_license_tabs' ) || did_action( 'rtmedia_addon_license_details' ) ) {
|
748 |
+
$admin_pages[] = 'rtmedia_page_rtmedia-license';
|
749 |
+
}
|
750 |
+
|
751 |
$admin_pages = apply_filters( 'rtmedia_filter_admin_pages_array', $admin_pages );
|
752 |
|
753 |
+
if ( in_array( $hook, $admin_pages ) || strpos( $hook, 'rtmedia-migration' ) ) {
|
754 |
|
755 |
$admin_ajax = admin_url( 'admin-ajax.php' );
|
756 |
|
757 |
+
/* Only one JS file should enqueue */
|
758 |
+
wp_enqueue_script( 'rtmedia-admin', RTMEDIA_URL . 'app/assets/admin/js/admin-min.js', array( 'backbone' ), RTMEDIA_VERSION );
|
759 |
+
|
|
|
760 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_on_label', __( 'ON', 'rtmedia' ) );
|
761 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_off_label', __( 'OFF', 'rtmedia' ) );
|
762 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_ajax', $admin_ajax );
|
763 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_url', admin_url() );
|
764 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_url', admin_url() );
|
765 |
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
$rtmedia_admin_strings = array(
|
767 |
'no_refresh' => __( 'Please do not refresh this page.', 'rtmedia' ),
|
768 |
'something_went_wrong' => __( 'Something went wrong. Please <a href onclick="location.reload();">refresh</a> page.', 'rtmedia' ),
|
774 |
wp_localize_script( 'rtmedia-admin', 'rtmedia_admin_strings', $rtmedia_admin_strings );
|
775 |
wp_localize_script( 'rtmedia-admin', 'settings_url', esc_url( add_query_arg( array( 'page' => 'rtmedia-settings' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) ) . '#privacy_enabled' );
|
776 |
wp_localize_script( 'rtmedia-admin', 'settings_rt_album_import_url', esc_url( add_query_arg( array( 'page' => 'rtmedia-settings' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
777 |
|
778 |
+
/* Only one CSS file should enqueue */
|
779 |
+
wp_enqueue_style( 'rtmedia-admin', RTMEDIA_URL . 'app/assets/admin/css/admin.css', '', RTMEDIA_VERSION );
|
780 |
} else {
|
781 |
+
|
782 |
+
/* This CSS is using for "Right Now in rtMedia" Widget section on Dashboard */
|
783 |
+
wp_enqueue_style( 'rtmedia-widget', RTMEDIA_URL . 'app/assets/admin/css/widget.css', '', RTMEDIA_VERSION );
|
784 |
}
|
785 |
}
|
786 |
|
794 |
*
|
795 |
* @return void
|
796 |
*/
|
797 |
+
public function menu() {
|
798 |
+
add_menu_page( 'rtMedia', 'rtMedia', 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ), RTMEDIA_URL . 'app/assets/admin/img/rtmedia-logo.png', '40.1111' );
|
799 |
add_submenu_page( 'rtmedia-settings', __( 'Settings', 'rtmedia' ), __( 'Settings', 'rtmedia' ), 'manage_options', 'rtmedia-settings', array( $this, 'settings_page' ) );
|
800 |
add_submenu_page( 'rtmedia-settings', __( 'Addons', 'rtmedia' ), __( 'Addons', 'rtmedia' ), 'manage_options', 'rtmedia-addons', array( $this, 'addons_page' ) );
|
801 |
add_submenu_page( 'rtmedia-settings', __( 'Support', 'rtmedia' ), __( 'Support', 'rtmedia' ), 'manage_options', 'rtmedia-support', array( $this, 'support_page' ) );
|
802 |
add_submenu_page( 'rtmedia-settings', __( 'Themes', 'rtmedia' ), __( 'Themes', 'rtmedia' ), 'manage_options', 'rtmedia-themes', array( $this, 'theme_page' ) );
|
803 |
add_submenu_page( 'rtmedia-settings', __( 'Hire Us', 'rtmedia' ), __( 'Hire Us', 'rtmedia' ), 'manage_options', 'rtmedia-hire-us', array( $this, 'hire_us_page' ) );
|
804 |
+
if ( has_filter( 'rtmedia_license_tabs' ) || did_action( 'rtmedia_addon_license_details' ) ) {
|
805 |
+
add_submenu_page( 'rtmedia-settings', __( 'Licenses', 'rtmedia' ), __( 'Licenses', 'rtmedia' ), 'manage_options', 'rtmedia-license', array( $this, 'license_page' ) );
|
806 |
+
}
|
807 |
|
808 |
+
if ( ! defined( 'RTMEDIA_PRO_VERSION' ) ) {
|
809 |
add_submenu_page( 'rtmedia-settings', __( 'Premium', 'rtmedia' ), __( 'Premium ', 'rtmedia' ), 'manage_options', 'rtmedia-premium', array( $this, 'premium_page' ) );
|
810 |
}
|
811 |
|
812 |
$obj_encoding = new RTMediaEncoding( true );
|
813 |
|
814 |
+
if ( $obj_encoding->api_key ) {
|
815 |
add_submenu_page( 'rtmedia-settings', __( 'Regenerate Thumbnail', 'rtmedia' ), __( 'Regen. Thumbnail ', 'rtmedia' ), 'manage_options', 'rtmedia-regenerate', array( $this, 'rt_regenerate_thumbnail' ) );
|
816 |
}
|
|
|
|
|
|
|
|
|
|
|
817 |
}
|
818 |
|
819 |
/**
|
825 |
*
|
826 |
* @return void
|
827 |
*/
|
828 |
+
public function rt_regenerate_thumbnail() {
|
829 |
$prog = new rtProgress();
|
830 |
$done = 0;
|
831 |
?>
|
832 |
<div class="wrap">
|
833 |
<h2> rtMedia: <?php _e( 'Regenerate Video Thumbnails', 'rtmedia' ); ?> </h2>
|
834 |
+
<?php
|
835 |
+
if ( isset( $_REQUEST[ 'media_ids' ] ) && trim( $_REQUEST[ 'media_ids' ] ) != '' ) {
|
836 |
+
$requested = false;
|
837 |
+
$media_ids = explode( ',', $_REQUEST[ 'media_ids' ] );
|
838 |
+
$total = count( $media_ids );
|
839 |
+
} else {
|
840 |
+
$media_ids = $this->get_video_without_thumbs();
|
841 |
+
$total = count( $media_ids );
|
842 |
+
}
|
843 |
+
?>
|
844 |
<script>
|
845 |
var rt_thumb_all_media = <?php echo json_encode( $media_ids ); ?>;
|
846 |
</script>
|
847 |
+
<?php
|
848 |
+
if ( ! isset( $requested ) ) {
|
849 |
+
?>
|
850 |
<br/>
|
851 |
<p>You can see this page because you have <a href="<?php echo admin_url( 'admin.php?page=rtmedia-addons' ) ?>">subscribed</a> for <a href="https://rtcamp.com/rtmedia/docs/admin/addons/audio-video-encoding/" target="_blank">rtMedia audio/video encoding service</a>.</p> <p>You can regenerate thumbnails of a specific video by visiting <a href="<?php echo admin_url( 'upload.php?post_mime_type=video' ); ?>">media page</a> and clicking the <b>Regenerate Thumbnail</b> option for that particular video.</p> <p>Click <b>Regenerate Pending Thumbnails</b> to regenerate thumbnails of pending videos.</p> <p><input type="button" class="button button-primary" id="rt-start-media-regenerate" value="<?php echo __( 'Regenerate Pending Thumbnails', 'rtmedia' ) . ' (' . $total . ')'; ?>"/> </p>
|
852 |
+
<?php
|
853 |
}
|
854 |
+
?>
|
855 |
<div id="rt-migration-progress">
|
856 |
<br/> <br/>
|
857 |
<?php
|
879 |
type: 'post',
|
880 |
data: {
|
881 |
"action": "rt_media_regeneration",
|
882 |
+
"media_id": rt_thumb_all_media[indx ++]
|
883 |
},
|
884 |
success: function ( data ) {
|
885 |
data = JSON.parse( data );
|
887 |
if ( data.status == false ) {
|
888 |
handle_regenrate_fail();
|
889 |
} else {
|
890 |
+
db_done ++;
|
891 |
+
var progw = Math.ceil( ( db_done / db_total ) * 100 );
|
892 |
if ( progw > 100 ) {
|
893 |
progw = 100;
|
894 |
}
|
906 |
}
|
907 |
}
|
908 |
function handle_regenrate_fail() {
|
909 |
+
db_fail ++;
|
910 |
jQuery( 'span.rt-fail' ).html( db_fail );
|
911 |
db_start_regenrate();
|
912 |
}
|
936 |
*
|
937 |
* @return void
|
938 |
*/
|
939 |
+
public function rtmedia_regenerate_thumbnail_notice() {
|
940 |
$obj_encoding = new RTMediaEncoding( true );
|
941 |
+
if ( $obj_encoding->api_key ) {
|
942 |
$site_option = rtmedia_get_site_option( 'rtmedia-video-thumb-notice' );
|
943 |
+
if ( ! $site_option || 'hide' != $site_option ) {
|
944 |
rtmedia_update_site_option( 'rtmedia-video-thumb-notice', 'show' );
|
945 |
$videos_without_thumbs = get_video_without_thumbs();
|
946 |
+
if ( isset( $videos_without_thumbs ) && is_array( $videos_without_thumbs ) && sizeof( $videos_without_thumbs ) > 0 ) {
|
947 |
echo '<div class="error rtmedia-regenerate-video-thumb-error">
|
948 |
<p>
|
949 |
' . sprintf( __( "You have %s videos without thumbnails. Click <a href='%s'> here </a> to generate thumbnails. <a href='#' onclick='rtmedia_hide_video_thumb_notice()' style='float:right'>Hide</a>", 'rtmedia' ), sizeof( $videos_without_thumbs ), admin_url( 'admin.php?page=rtmedia-regenerate' ) ) . '
|
952 |
?>
|
953 |
<script type="text/javascript">
|
954 |
function rtmedia_hide_video_thumb_notice() {
|
955 |
+
var data = { action: 'rtmedia_hide_video_thumb_admin_notice' };
|
956 |
jQuery.post( ajaxurl, data, function ( response ) {
|
957 |
response = response.trim();
|
958 |
if ( response === "1" )
|
960 |
} );
|
961 |
}
|
962 |
</script>
|
963 |
+
<?php
|
964 |
}
|
965 |
}
|
966 |
}
|
975 |
*
|
976 |
* @return void
|
977 |
*/
|
978 |
+
public function rtmedia_hide_video_thumb_admin_notice() {
|
979 |
+
if ( rtmedia_update_site_option( 'rtmedia-video-thumb-notice', 'hide' ) ) {
|
980 |
echo '1';
|
981 |
} else {
|
982 |
echo '0';
|
993 |
*
|
994 |
* @return void
|
995 |
*/
|
996 |
+
public function rtmedia_hide_addon_update_notice() {
|
997 |
+
if ( rtmedia_update_site_option( 'rtmedia-addon-update-notice-3_8', 'hide' ) ) {
|
998 |
echo '1';
|
999 |
} else {
|
1000 |
echo '0';
|
1011 |
*
|
1012 |
* @return void
|
1013 |
*/
|
1014 |
+
public function rt_media_regeneration() {
|
1015 |
+
if ( isset( $_POST[ 'media_id' ] ) ) {
|
1016 |
+
$model = new RTMediaModel();
|
1017 |
+
$media = $model->get_media( array( 'media_id' => $_POST[ 'media_id' ] ), 0, 1 );
|
1018 |
+
$media_type = $media[ 0 ]->media_type;
|
1019 |
+
$response = array();
|
1020 |
+
if ( 'video' == $media_type ) {
|
1021 |
$objRTMediaEncoding = new RTMediaEncoding( true );
|
1022 |
+
$autoformat = 'thumbnails';
|
1023 |
+
$objRTMediaEncoding->reencoding( intval( $_POST[ 'media_id' ] ), $autoformat );
|
1024 |
+
$response[ 'status' ] = true;
|
1025 |
} else {
|
1026 |
+
$response[ 'status' ] = false;
|
1027 |
+
$response[ 'message' ] = __( 'not a video ...', 'rtmedia' );
|
1028 |
}
|
1029 |
echo json_encode( $response );
|
1030 |
die();
|
1031 |
}
|
1032 |
}
|
1033 |
|
|
|
1034 |
/**
|
1035 |
* Get video without thumbs.
|
1036 |
*
|
1040 |
*
|
1041 |
* @return object $results
|
1042 |
*/
|
1043 |
+
public function get_video_without_thumbs() {
|
1044 |
$rtmedia_model = new RTMediaModel();
|
1045 |
+
$sql = "select media_id from {$rtmedia_model->table_name} where media_type = 'video' and blog_id = '" . get_current_blog_id() . "' and cover_art is null";
|
1046 |
global $wpdb;
|
1047 |
$results = $wpdb->get_col( $sql );
|
1048 |
|
1058 |
*
|
1059 |
* @return void
|
1060 |
*/
|
1061 |
+
public function settings_page() {
|
1062 |
$this->render_page( 'rtmedia-settings', 'rtmedia' );
|
1063 |
}
|
1064 |
|
1071 |
*
|
1072 |
* @return void
|
1073 |
*/
|
1074 |
+
public function privacy_page() {
|
1075 |
$this->render_page( 'rtmedia-privacy' );
|
1076 |
}
|
1077 |
|
1084 |
*
|
1085 |
* @return void
|
1086 |
*/
|
1087 |
+
public function rt_importer_page() {
|
1088 |
$this->render_page( 'rtmedia-importer' );
|
1089 |
}
|
1090 |
|
1097 |
*
|
1098 |
* @return void
|
1099 |
*/
|
1100 |
+
public function convert_videos_page() {
|
1101 |
$this->render_page( 'rtmedia-convert-videos' );
|
1102 |
}
|
1103 |
|
1110 |
*
|
1111 |
* @return void
|
1112 |
*/
|
1113 |
+
public function addons_page() {
|
1114 |
$this->render_page( 'rtmedia-addons' );
|
1115 |
}
|
1116 |
|
1123 |
*
|
1124 |
* @return void
|
1125 |
*/
|
1126 |
+
public function support_page() {
|
1127 |
$this->render_page( 'rtmedia-support' );
|
1128 |
}
|
1129 |
|
1136 |
*
|
1137 |
* @return void
|
1138 |
*/
|
1139 |
+
public function premium_page() {
|
1140 |
$this->render_page( 'rtmedia-premium' );
|
1141 |
}
|
1142 |
|
1149 |
*
|
1150 |
* @return void
|
1151 |
*/
|
1152 |
+
public function theme_page() {
|
1153 |
$this->render_page( 'rtmedia-themes' );
|
1154 |
}
|
1155 |
|
1162 |
*
|
1163 |
* @return void
|
1164 |
*/
|
1165 |
+
public function hire_us_page() {
|
1166 |
$this->render_page( 'rtmedia-hire-us' );
|
1167 |
}
|
1168 |
|
1169 |
+
public function license_page() {
|
1170 |
$this->render_page( 'rtmedia-license' );
|
1171 |
}
|
1172 |
|
1179 |
*
|
1180 |
* @return type
|
1181 |
*/
|
1182 |
+
static function get_current_tab() {
|
1183 |
+
return isset( $_GET[ 'page' ] ) ? $_GET[ 'page' ] : 'rtmedia-settings';
|
1184 |
}
|
1185 |
|
1186 |
/**
|
1194 |
*
|
1195 |
* @return void
|
1196 |
*/
|
1197 |
+
public function render_page( $page, $option_group = null ) {
|
1198 |
?>
|
1199 |
|
1200 |
<div class="wrap bp-media-admin <?php echo $this->get_current_tab(); ?>">
|
1203 |
<h2 class="nav-tab-wrapper"><?php $this->rtmedia_tabs(); ?>
|
1204 |
<span class="alignright by">
|
1205 |
<a class="rt-link" href="http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank" title="rtCamp : <?php _e( 'Empowering The Web With WordPress', 'rtmedia' ); ?>">
|
1206 |
+
<img src="<?php echo RTMEDIA_URL; ?>app/assets/admin/img/rtcamp-logo.png" alt="rtCamp" />
|
1207 |
</a>
|
1208 |
</span>
|
1209 |
</h2>
|
1210 |
</div>
|
1211 |
|
1212 |
+
<div class="clearfix rtm-row-container">
|
|
|
1213 |
|
1214 |
+
<div id="bp-media-settings-boxes" class="bp-media-settings-boxes-container rtm-setting-container">
|
1215 |
+
|
1216 |
+
<?php
|
1217 |
+
$settings_url = ( is_multisite() ) ? network_admin_url( 'edit.php?action=' . $option_group ) : 'options.php';
|
1218 |
+
if ( $page == 'rtmedia-settings' ) {
|
1219 |
+
?>
|
1220 |
<form id="bp_media_settings_form" name="bp_media_settings_form" method="post"
|
1221 |
enctype="multipart/form-data">
|
1222 |
+
<div class="bp-media-metabox-holder">
|
1223 |
+
<div class="rtm-button-container top">
|
1224 |
+
<?php if ( isset( $_GET[ 'settings-saved' ] ) && $_GET[ 'settings-saved' ] ) { ?>
|
1225 |
+
<div class="rtm-success rtm-fly-warning rtm-save-settings-msg"><?php _e( 'Settings saved successfully!', 'rtmedia' ); ?></div>
|
1226 |
+
<?php } ?>
|
1227 |
+
<input type="hidden" name="rtmedia-options-save" value="true">
|
1228 |
+
<input type="submit" class="rtmedia-settings-submit button button-primary button-big" value="<?php _e( 'Save Settings', 'rtmedia' ); ?>">
|
1229 |
+
</div>
|
1230 |
+
<?php
|
1231 |
+
settings_fields( $option_group );
|
1232 |
+
if ( 'rtmedia-settings' == $page ) {
|
1233 |
+
echo '<div id="rtm-settings-tabs">';
|
1234 |
+
$sub_tabs = $this->settings_sub_tabs();
|
1235 |
+
RTMediaFormHandler::rtForm_settings_tabs_content( $page, $sub_tabs );
|
1236 |
+
echo '</div>';
|
1237 |
+
} else {
|
1238 |
+
do_settings_sections( $page );
|
1239 |
+
}
|
1240 |
+
?>
|
1241 |
+
|
1242 |
+
<div class="rtm-button-container bottom">
|
1243 |
+
<div class="rtm-social-links alignleft">
|
1244 |
+
<a href="http://twitter.com/rtcamp" class="twitter" target= "_blank"><span class="dashicons dashicons-twitter"></span></a>
|
1245 |
+
<a href="https://www.facebook.com/rtCamp.solutions" class="facebook" target="_blank"><span class="dashicons dashicons-facebook"></span></a>
|
1246 |
+
<a href="http://profiles.wordpress.org/rtcamp" class="wordpress" target= "_blank"><span class="dashicons dashicons-wordpress"></span></a>
|
1247 |
+
<a href="https://rtcamp.com/feed" class="rss" target="_blank"><span class="dashicons dashicons-rss"></span></a>
|
1248 |
+
</div>
|
1249 |
+
|
1250 |
+
<input type="hidden" name="rtmedia-options-save" value="true">
|
1251 |
+
<input type="submit" class="rtmedia-settings-submit button button-primary button-big" value="<?php _e( 'Save Settings', 'rtmedia' ); ?>">
|
1252 |
+
</div>
|
1253 |
</div>
|
|
|
1254 |
</form><?php
|
1255 |
+
} else {
|
1256 |
+
?>
|
1257 |
<div class="bp-media-metabox-holder">
|
1258 |
+
<?php
|
1259 |
+
if ( 'rtmedia-addons' == $page ) {
|
1260 |
+
RTMediaAddon::render_addons( $page );
|
1261 |
+
} else if ( 'rtmedia-support' == $page ) {
|
1262 |
+
$rtmedia_support = new RTMediaSupport( false );
|
1263 |
+
$rtmedia_support->render_support( $page );
|
1264 |
+
} else if ( 'rtmedia-themes' == $page ) {
|
1265 |
+
RTMediaThemes::render_themes( $page );
|
1266 |
+
} else {
|
1267 |
+
if ( 'rtmedia-license' == $page ) {
|
1268 |
+
RTMediaLicense::render_license( $page );
|
1269 |
+
} else {
|
1270 |
+
do_settings_sections( $page );
|
1271 |
+
}
|
1272 |
+
}
|
1273 |
+
do_action( 'rtmedia_admin_page_insert', $page );
|
1274 |
+
?>
|
1275 |
</div>
|
1276 |
+
<?php
|
1277 |
+
do_action( 'rtmedia_admin_page_append', $page );
|
1278 |
+
}
|
1279 |
+
?>
|
1280 |
</div>
|
1281 |
+
|
1282 |
+
<div class="metabox-holder bp-media-metabox-holder rtm-sidebar">
|
1283 |
<?php $this->admin_sidebar(); ?>
|
1284 |
</div>
|
1285 |
+
|
1286 |
</div>
|
1287 |
+
|
1288 |
</div><!-- .bp-media-admin --><?php
|
1289 |
}
|
1290 |
|
1299 |
*
|
1300 |
* @return type $tabs_html
|
1301 |
*/
|
1302 |
+
public function tab() {
|
1303 |
|
1304 |
+
$tabs_html = '';
|
1305 |
+
$idle_class = 'nav-tab';
|
1306 |
$active_class = 'nav-tab nav-tab-active';
|
1307 |
+
$tabs = array();
|
1308 |
|
1309 |
// Check to see which tab we are on
|
1310 |
$tab = $this->get_current_tab();
|
1311 |
/* rtMedia */
|
1312 |
$tabs[] = array(
|
1313 |
+
'href' => get_admin_url( null, esc_url( add_query_arg( array( 'page' => 'rtmedia-settings' ), 'admin.php' ) ) ),
|
1314 |
+
'title' => __( 'rtMedia', 'rtmedia' ),
|
1315 |
+
'name' => __( 'rtMedia', 'rtmedia' ),
|
1316 |
+
'class' => ( $tab == 'rtmedia-settings' || $tab == 'rtmedia-addons' || $tab == 'rtmedia-support' || $tab == 'rtmedia-importer' ) ? $active_class : $idle_class,
|
1317 |
);
|
1318 |
|
1319 |
foreach ( $tabs as $tab ) {
|
1320 |
+
$tabs_html .= '<a id="bp-media" title= "' . $tab[ 'title' ] . '" href="' . $tab[ 'href' ] . '" class="' . $tab[ 'class' ] . '">' . $tab[ 'name' ] . '</a>';
|
1321 |
}
|
1322 |
echo $tabs_html;
|
1323 |
}
|
1331 |
*
|
1332 |
* @return void
|
1333 |
*/
|
1334 |
+
public function rtmedia_tabs( $active_tab = '' ) {
|
1335 |
// Declare local variables
|
1336 |
+
$tabs_html = '';
|
1337 |
+
$idle_class = 'nav-tab';
|
1338 |
$active_class = 'nav-tab nav-tab-active';
|
1339 |
|
1340 |
// Setup core admin tabs
|
1359 |
'href' => get_admin_url( null, esc_url( add_query_arg( array( 'page' => 'rtmedia-support' ), 'admin.php' ) ) ),
|
1360 |
'name' => __( 'Support', 'rtmedia' ),
|
1361 |
'slug' => 'rtmedia-support',
|
1362 |
+
),
|
1363 |
+
);
|
1364 |
+
|
1365 |
+
if ( has_filter( 'rtmedia_license_tabs' ) || did_action( 'rtmedia_addon_license_details' ) ) {
|
1366 |
+
$tabs[] = array(
|
1367 |
'href' => get_admin_url( null, esc_url( add_query_arg( array( 'page' => 'rtmedia-license' ), 'admin.php' ) ) ),
|
1368 |
'name' => __( 'Licenses', 'rtmedia' ),
|
1369 |
'slug' => 'rtmedia-license',
|
1370 |
+
);
|
1371 |
+
}
|
1372 |
|
1373 |
$tabs = apply_filters( 'media_add_tabs', $tabs );
|
1374 |
|
1375 |
// Loop through tabs and build navigation
|
1376 |
foreach ( array_values( $tabs ) as $tab_data ) {
|
1377 |
+
$is_current = ( bool ) ( $tab_data[ 'slug' ] == $this->get_current_tab() );
|
1378 |
+
$tab_class = $is_current ? $active_class : $idle_class;
|
1379 |
|
1380 |
+
if ( isset( $tab_data[ 'class' ] ) && is_array( $tab_data[ 'class' ] ) ) {
|
1381 |
+
$tab_class .= ' ' . implode( ' ', $tab_data[ 'class' ] );
|
1382 |
}
|
1383 |
|
1384 |
+
$tabs_html .= '<a href="' . $tab_data[ 'href' ] . '" class="' . $tab_class . '">' . $tab_data[ 'name' ] . '</a>';
|
1385 |
}
|
1386 |
|
1387 |
// Output the tabs
|
1400 |
*
|
1401 |
* @return void
|
1402 |
*/
|
1403 |
+
public function settings_content_tabs( $page ) {
|
1404 |
global $wp_settings_sections, $wp_settings_fields;
|
1405 |
|
1406 |
+
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ) {
|
1407 |
return;
|
1408 |
}
|
1409 |
|
1410 |
+
foreach ( ( array ) $wp_settings_sections[ $page ] as $section ) {
|
1411 |
+
if ( $section[ 'title' ] ) {
|
1412 |
+
echo "<h3>{$section[ 'title' ]}</h3>\n";
|
1413 |
}
|
1414 |
|
1415 |
+
if ( $section[ 'callback' ] ) {
|
1416 |
+
call_user_func( $section[ 'callback' ], $section );
|
1417 |
}
|
1418 |
|
1419 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section[ 'id' ] ] ) ) {
|
1420 |
continue;
|
1421 |
}
|
1422 |
|
1423 |
echo '<table class="form-table">';
|
1424 |
+
do_settings_fields( $page, $section[ 'id' ] );
|
1425 |
echo '</table>';
|
1426 |
}
|
1427 |
}
|
1436 |
*
|
1437 |
* @return array $tabs
|
1438 |
*/
|
1439 |
+
public function settings_sub_tabs() {
|
1440 |
$tabs_html = '';
|
1441 |
+
$tabs = array();
|
1442 |
|
1443 |
// Check to see which tab we are on
|
1444 |
$tab = $this->get_current_tab();
|
1445 |
/* rtMedia */
|
1446 |
|
1447 |
+
$tabs[ 7 ] = array(
|
1448 |
+
'href' => '#rtmedia-display',
|
1449 |
+
'icon' => 'dashicons-desktop',
|
1450 |
+
'title' => __( 'Display', 'rtmedia' ),
|
1451 |
+
'name' => __( 'Display', 'rtmedia' ),
|
1452 |
+
'callback' => array( 'RTMediaFormHandler', 'display_content' )
|
1453 |
);
|
1454 |
|
1455 |
+
if ( class_exists( 'BuddyPress' ) ) {
|
1456 |
+
$tabs[ 20 ] = array(
|
1457 |
'href' => '#rtmedia-bp',
|
1458 |
+
'icon' => 'dashicons-groups',
|
1459 |
'title' => __( 'rtMedia BuddyPress', 'rtmedia' ),
|
1460 |
'name' => __( 'BuddyPress', 'rtmedia' ),
|
1461 |
'callback' => array( 'RTMediaFormHandler', 'buddypress_content' ) //change it to BuddyPress Content
|
1462 |
);
|
1463 |
}
|
1464 |
|
1465 |
+
$tabs[ 30 ] = array(
|
1466 |
+
'href' => '#rtmedia-types',
|
1467 |
+
'icon' => 'dashicons-editor-video',
|
1468 |
+
'title' => __( 'rtMedia Types', 'rtmedia' ),
|
1469 |
+
'name' => __( 'Types', 'rtmedia' ),
|
1470 |
+
'callback' => array( 'RTMediaFormHandler', 'types_content' )
|
1471 |
);
|
1472 |
|
1473 |
+
$tabs[ 40 ] = array(
|
1474 |
+
'href' => '#rtmedia-sizes',
|
1475 |
+
'icon' => 'dashicons-editor-expand',
|
1476 |
+
'title' => __( 'rtMedia Sizes', 'rtmedia' ),
|
1477 |
+
'name' => __( 'Media Sizes', 'rtmedia' ),
|
1478 |
+
'callback' => array( 'RTMediaFormHandler', 'sizes_content' )
|
1479 |
);
|
1480 |
|
1481 |
+
$tabs[ 50 ] = array(
|
1482 |
+
'href' => '#rtmedia-privacy',
|
1483 |
+
'icon' => 'dashicons-lock',
|
1484 |
+
'title' => __( 'rtMedia Privacy', 'rtmedia' ),
|
1485 |
+
'name' => __( 'Privacy', 'rtmedia' ),
|
1486 |
+
'callback' => array( 'RTMediaFormHandler', 'privacy_content' )
|
1487 |
);
|
1488 |
+
$tabs[ 60 ] = array(
|
1489 |
+
'href' => '#rtmedia-custom-css-settings',
|
1490 |
+
'icon' => 'dashicons-clipboard',
|
1491 |
+
'title' => __( 'rtMedia Custom CSS', 'rtmedia' ),
|
1492 |
+
'name' => __( 'Custom CSS', 'rtmedia' ),
|
1493 |
+
'callback' => array( 'RTMediaFormHandler', 'custom_css_content' )
|
1494 |
);
|
1495 |
|
1496 |
$tabs = apply_filters( 'rtmedia_add_settings_sub_tabs', $tabs, $tab );
|
1497 |
|
1498 |
$tabs[] = array(
|
1499 |
+
'href' => '#rtmedia-general',
|
1500 |
+
'icon' => 'dashicons-admin-tools',
|
1501 |
+
'title' => __( 'Other Settings', 'rtmedia' ),
|
1502 |
+
'name' => __( 'Other Settings', 'rtmedia' ),
|
1503 |
+
'callback' => array( 'RTMediaFormHandler', 'general_content' )
|
1504 |
);
|
1505 |
|
1506 |
return $tabs;
|
1516 |
*
|
1517 |
* @return boolean
|
1518 |
*/
|
1519 |
+
public function update_count() {
|
1520 |
global $wpdb;
|
1521 |
|
1522 |
$query = "SELECT
|
1536 |
|
1537 |
$result = $wpdb->get_results( $query );
|
1538 |
|
1539 |
+
if ( ! is_array( $result ) ) {
|
1540 |
return false;
|
1541 |
}
|
1542 |
|
1565 |
*
|
1566 |
* @return void
|
1567 |
*/
|
1568 |
+
public function save_multisite_options() {
|
1569 |
global $rtmedia_admin;
|
1570 |
+
if ( isset( $_POST[ 'refresh-count' ] ) ) {
|
1571 |
$rtmedia_admin->update_count();
|
1572 |
}
|
1573 |
do_action( 'rtmedia_sanitize_settings', $_POST );
|
1574 |
|
1575 |
+
if ( isset( $_POST[ 'rtmedia_options' ] ) ) {
|
1576 |
+
rtmedia_update_site_option( 'rtmedia_options', $_POST[ 'rtmedia_options' ] );
|
1577 |
//
|
1578 |
// redirect to settings page in network
|
1579 |
wp_redirect( esc_url_raw( add_query_arg( array( 'page' => 'rtmedia-settings', 'updated' => 'true' ), ( is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) ) ) ) );
|
1591 |
*
|
1592 |
* @return void
|
1593 |
*/
|
1594 |
+
public function admin_sidebar() {
|
1595 |
do_action( 'rtmedia_before_default_admin_widgets' );
|
1596 |
$current_user = wp_get_current_user();
|
1597 |
+
$message = sprintf( __( 'I use @buddypressmedia http://rt.cx/rtmedia on %s', 'rtmedia' ), home_url() );
|
1598 |
+
$addons = '<div id="social" class="rtm-social-share">
|
1599 |
+
<p><a href="http://twitter.com/home/?status=' . $message . '" class="button twitter" target= "_blank" title="' . __( 'Post to Twitter Now', 'rtmedia' ) . '">' . __( 'Post to Twitter', 'rtmedia' ) . '<span class="dashicons dashicons-twitter"></span></a></p>
|
1600 |
+
<p><a href="https://www.facebook.com/sharer/sharer.php?u=http://rtcamp.com/rtmedia/" class="button facebook" target="_blank" title="' . __( 'Share on Facebook Now', 'rtmedia' ) . '">' . __( 'Share on Facebook', 'rtmedia' ) . '<span class="dashicons dashicons-facebook"></span></a></p>
|
1601 |
+
<p><a href="http://wordpress.org/support/view/plugin-reviews/buddypress-media?rate=5#postform" class="button wordpress" target= "_blank" title="' . __( 'Rate rtMedia on Wordpress.org', 'rtmedia' ) . '">' . __( 'Rate on Wordpress.org', 'rtmedia' ) . '<span class="dashicons dashicons-wordpress"></span></a></p>
|
1602 |
+
<p><a href="' . sprintf( '%s', 'https://rtcamp.com/feed/' ) . '" class="button rss" target="_blank" title="' . __( 'Subscribe to our Feeds', 'rtmedia' ) . '">' . __( 'Subscribe to our Feeds', 'rtmedia' ) . '<span class="dashicons dashicons-rss"></span></a></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1603 |
</div>';
|
|
|
|
|
|
|
1604 |
|
1605 |
+
new RTMediaAdminWidget( 'spread-the-word', __( 'Spread the Word', 'rtmedia' ), $addons );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1606 |
|
1607 |
$branding = '<form action="http://rtcamp.us1.list-manage1.com/subscribe/post?u=85b65c9c71e2ba3fab8cb1950&id=9e8ded4470" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
|
1608 |
<div class="mc-field-group">
|
1609 |
<input type="email" value="' . $current_user->user_email . '" name="EMAIL" placeholder="Email" class="required email" id="mce-EMAIL">
|
1610 |
<input style="display:none;" type="checkbox" checked="checked" value="1" name="group[1721][1]" id="mce-group[1721]-1721-0">
|
1611 |
+
<input type="submit" value="' . __( 'Subscribe', 'rtmedia' ) . '" name="subscribe" id="mc-embedded-subscribe" class="button">
|
1612 |
<div id="mce-responses" class="clear">
|
1613 |
<div class="response" id="mce-error-response" style="display:none"></div>
|
1614 |
<div class="response" id="mce-success-response" style="display:none"></div>
|
1615 |
</div>
|
|
|
1616 |
</div>
|
1617 |
</form>';
|
1618 |
new RTMediaAdminWidget( 'branding', __( 'Subscribe', 'rtmedia' ), $branding );
|
1622 |
do_action( 'rtmedia_after_default_admin_widgets' );
|
1623 |
}
|
1624 |
|
1625 |
+
public function linkback() {
|
1626 |
+
if ( isset( $_POST[ 'linkback' ] ) && $_POST[ 'linkback' ] ) {
|
1627 |
return rtmedia_update_site_option( 'rtmedia-add-linkback', true );
|
1628 |
} else {
|
1629 |
return rtmedia_update_site_option( 'rtmedia-add-linkback', false );
|
1631 |
die;
|
1632 |
}
|
1633 |
|
1634 |
+
public function convert_videos_mailchimp_send() {
|
1635 |
+
if ( 'Yes' == $_POST[ 'interested' ] && ! empty( $_POST[ 'choice' ] ) ) {
|
1636 |
+
wp_remote_get( esc_url_raw( add_query_arg( array( 'rtmedia-convert-videos-form' => 1, 'choice' => $_POST[ 'choice' ], 'url' => urlencode( $_POST[ 'url' ] ), 'email' => $_POST[ 'email' ] ), 'http://rtcamp.com/' ) ) );
|
1637 |
} else {
|
1638 |
rtmedia_update_site_option( 'rtmedia-survey', 0 );
|
1639 |
}
|
1641 |
die;
|
1642 |
}
|
1643 |
|
1644 |
+
public function video_transcoding_survey_response() {
|
1645 |
+
if ( isset( $_GET[ 'survey-done' ] ) && ( $_GET[ 'survey-done' ] == md5( 'survey-done' ) ) ) {
|
1646 |
rtmedia_update_site_option( 'rtmedia-survey', 0 );
|
1647 |
}
|
1648 |
}
|
1649 |
|
1650 |
+
public function plugin_meta_premium_addon_link( $plugin_meta, $plugin_file, $plugin_data, $status ) {
|
1651 |
+
if ( plugin_basename( RTMEDIA_PATH . 'index.php' ) == $plugin_file ) {
|
1652 |
$plugin_meta[] = '<a href="https://rtcamp.com/rtmedia/addons/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" title="' . __( 'Premium Add-ons', 'rtmedia' ) . '">' . __( 'Premium Add-ons', 'rtmedia' ) . '</a>';
|
1653 |
}
|
1654 |
|
1655 |
return $plugin_meta;
|
1656 |
}
|
1657 |
|
1658 |
+
public function upload_filetypes_error() {
|
1659 |
global $rtmedia;
|
1660 |
$upload_filetypes = rtmedia_get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
|
1661 |
$upload_filetypes = explode( ' ', $upload_filetypes );
|
1662 |
+
$flag = false;
|
1663 |
+
if ( isset( $rtmedia->options[ 'images_enabled' ] ) && $rtmedia->options[ 'images_enabled' ] ) {
|
1664 |
$not_supported_image = array_diff( array( 'jpg', 'jpeg', 'png', 'gif' ), $upload_filetypes );
|
1665 |
+
if ( ! empty( $not_supported_image ) ) {
|
1666 |
echo '<div class="error upload-filetype-network-settings-error">
|
1667 |
<p>
|
1668 |
' . sprintf( __( 'You have images enabled on rtMedia but your network allowed filetypes do not permit uploading of %s. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), implode( ', ', $not_supported_image ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
1672 |
$flag = true;
|
1673 |
}
|
1674 |
}
|
1675 |
+
if ( isset( $rtmedia->options[ 'videos_enabled' ] ) && $rtmedia->options[ 'videos_enabled' ] ) {
|
1676 |
+
if ( ! in_array( 'mp4', $upload_filetypes ) ) {
|
1677 |
echo '<div class="error upload-filetype-network-settings-error">
|
1678 |
<p>
|
1679 |
' . sprintf( __( 'You have video enabled on BuddyPress Media but your network allowed filetypes do not permit uploading of mp4. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
1683 |
$flag = true;
|
1684 |
}
|
1685 |
}
|
1686 |
+
if ( isset( $rtmedia->options[ 'audio_enabled' ] ) && $rtmedia->options[ 'audio_enabled' ] ) {
|
1687 |
+
if ( ! in_array( 'mp3', $upload_filetypes ) ) {
|
1688 |
echo '<div class="error upload-filetype-network-settings-error"><p>' . sprintf( __( 'You have audio enabled on BuddyPress Media but your network allowed filetypes do not permit uploading of mp3. Click <a href="%s">here</a> to change your settings manually.', 'rtmedia' ), network_admin_url( 'settings.php#upload_filetypes' ) ) . '
|
1689 |
<br /><strong>' . __( 'Recommended', 'rtmedia' ) . ':</strong> <input type="button" class="button update-network-settings-upload-filetypes" class="button" value="' . __( 'Update Network Settings Automatically', 'rtmedia' ) . '"> <img style="display:none;" src="' . admin_url( 'images/wpspin_light.gif' ) . '" />
|
1690 |
</p>
|
1692 |
$flag = true;
|
1693 |
}
|
1694 |
}
|
1695 |
+
if ( $flag ) {
|
1696 |
?>
|
1697 |
<script type="text/javascript">
|
1698 |
jQuery( '.upload-filetype-network-settings-error' ).on( 'click', '.update-network-settings-upload-filetypes', function () {
|
1699 |
jQuery( '.update-network-settings-upload-filetypes' ).siblings( 'img' ).show();
|
1700 |
jQuery( '.update-network-settings-upload-filetypes' ).prop( 'disabled', true );
|
1701 |
+
jQuery.post( ajaxurl, { action: 'rtmedia_correct_upload_filetypes' }, function ( response ) {
|
1702 |
if ( response ) {
|
1703 |
jQuery( '.upload-filetype-network-settings-error:first' ).after( '<div style="display: none;" class="updated rtmedia-network-settings-updated-successfully"><p><?php _e( 'Network settings updated successfully.', 'rtmedia' ); ?></p></div>' )
|
1704 |
jQuery( '.upload-filetype-network-settings-error' ).remove();
|
1707 |
} );
|
1708 |
} );
|
1709 |
</script>
|
1710 |
+
<?php
|
1711 |
}
|
1712 |
}
|
1713 |
|
1714 |
+
public function correct_upload_filetypes() {
|
1715 |
global $rtmedia;
|
1716 |
$upload_filetypes_orig = $upload_filetypes = rtmedia_get_site_option( 'upload_filetypes', 'jpg jpeg png gif' );
|
1717 |
+
$upload_filetypes = explode( ' ', $upload_filetypes );
|
1718 |
+
if ( isset( $rtmedia->options[ 'images_enabled' ] ) && $rtmedia->options[ 'images_enabled' ] ) {
|
1719 |
$not_supported_image = array_diff( array( 'jpg', 'jpeg', 'png', 'gif' ), $upload_filetypes );
|
1720 |
+
if ( ! empty( $not_supported_image ) ) {
|
1721 |
$update_image_support = null;
|
1722 |
foreach ( $not_supported_image as $ns ) {
|
1723 |
$update_image_support .= ' ' . $ns;
|
1724 |
}
|
1725 |
+
if ( $update_image_support ) {
|
1726 |
$upload_filetypes_orig .= $update_image_support;
|
1727 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1728 |
}
|
1729 |
}
|
1730 |
}
|
1731 |
+
if ( isset( $rtmedia->options[ 'videos_enabled' ] ) && $rtmedia->options[ 'videos_enabled' ] ) {
|
1732 |
+
if ( ! in_array( 'mp4', $upload_filetypes ) ) {
|
1733 |
$upload_filetypes_orig .= ' mp4';
|
1734 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1735 |
}
|
1736 |
}
|
1737 |
+
if ( isset( $rtmedia->options[ 'audio_enabled' ] ) && $rtmedia->options[ 'audio_enabled' ] ) {
|
1738 |
+
if ( ! in_array( 'mp3', $upload_filetypes ) ) {
|
1739 |
$upload_filetypes_orig .= ' mp3';
|
1740 |
rtmedia_update_site_option( 'upload_filetypes', $upload_filetypes_orig );
|
1741 |
}
|
1744 |
die();
|
1745 |
}
|
1746 |
|
1747 |
+
function edit_video_thumbnail( $form_fields, $post ) {
|
1748 |
+
if ( isset( $post->post_mime_type ) ) {
|
1749 |
$media_type = explode( '/', $post->post_mime_type );
|
1750 |
+
if ( is_array( $media_type ) && 'video' == $media_type[ 0 ] ) {
|
1751 |
+
$media_id = $post->ID;
|
1752 |
+
$thumbnail_array = get_post_meta( $media_id, 'rtmedia_media_thumbnails', true );
|
1753 |
+
$rtmedia_model = new RTMediaModel();
|
1754 |
+
$rtmedia_media = $rtmedia_model->get( array( 'media_id' => $media_id ) );
|
1755 |
$video_thumb_html = '';
|
1756 |
+
if ( is_array( $thumbnail_array ) ) {
|
1757 |
$video_thumb_html .= '<ul> ';
|
1758 |
|
1759 |
foreach ( $thumbnail_array as $key => $thumbnail_src ) {
|
1760 |
+
$checked = checked( $thumbnail_src, $rtmedia_media[ 0 ]->cover_art, false );
|
1761 |
+
$count = $key + 1;
|
1762 |
$video_thumb_html .= '<li style="width: 150px;display: inline-block;">
|
1763 |
<label for="rtmedia-upload-select-thumbnail-' . $count . '">
|
1764 |
<input type="radio" ' . $checked . ' id="rtmedia-upload-select-thumbnail-' . $count . '" value="' . $thumbnail_src . '" name="rtmedia-thumbnail" />
|
1765 |
<img src=" ' . $thumbnail_src . '" style="max-height: 120px;max-width: 120px; vertical-align: middle;" />
|
1766 |
</label>
|
1767 |
</li> ';
|
|
|
1768 |
}
|
1769 |
|
1770 |
$video_thumb_html .= ' </ul>';
|
1771 |
+
$form_fields[ 'rtmedia_video_thumbnail' ] = array(
|
1772 |
'label' => 'Video Thumbnails', 'input' => 'html', 'html' => $video_thumb_html,
|
1773 |
);
|
1774 |
}
|
1778 |
return $form_fields;
|
1779 |
}
|
1780 |
|
1781 |
+
function save_video_thumbnail( $post, $attachment ) {
|
1782 |
+
if ( isset( $post[ 'rtmedia-thumbnail' ] ) ) {
|
1783 |
$rtmedia_model = new RTMediaModel();
|
1784 |
+
$model = new RTMediaModel();
|
1785 |
+
$media = $model->get( array( 'media_id' => $post[ 'ID' ] ) );
|
1786 |
+
$media_id = $media[ 0 ]->id;
|
1787 |
+
$rtmedia_model->update( array( 'cover_art' => $post[ 'rtmedia-thumbnail' ] ), array( 'media_id' => $post[ 'ID' ] ) );
|
1788 |
update_activity_after_thumb_set( $media_id );
|
1789 |
}
|
1790 |
|
1791 |
return $post;
|
1792 |
}
|
1793 |
|
1794 |
+
function rtmedia_regenerate_thumb_js() {
|
1795 |
global $pagenow;
|
1796 |
|
1797 |
+
if ( 'upload.php' == $pagenow ) {
|
1798 |
?>
|
1799 |
<script type="text/javascript">
|
1800 |
function rtmedia_regenerate_thumbs( post_id ) {
|
1814 |
}
|
1815 |
}
|
1816 |
</script>
|
1817 |
+
<?php
|
1818 |
}
|
1819 |
}
|
1820 |
|
1821 |
+
function add_bulk_actions_regenerate() {
|
1822 |
?>
|
1823 |
<script type="text/javascript">
|
1824 |
jQuery( document ).ready( function ( $ ) {
|
1825 |
$( 'select[name^="action"] option:last-child' ).before( '<option value="bulk_video_regenerate_thumbnails"><?php esc_attr_e( 'Regenerate Video Thumbnails', 'rtmedia' ); ?></option>' );
|
1826 |
} );
|
1827 |
</script>
|
1828 |
+
<?php
|
1829 |
}
|
1830 |
|
1831 |
+
function presstrends_plugin() {
|
1832 |
global $rtmedia;
|
1833 |
$option = $rtmedia->options;
|
1834 |
+
if ( ! isset( $option[ 'general_AllowUserData' ] ) ) {
|
1835 |
return;
|
1836 |
}
|
1837 |
+
if ( '0' == $option[ 'general_AllowUserData' ] ) {
|
1838 |
return;
|
1839 |
}
|
1840 |
// PressTrends Account API Key
|
1841 |
$api_key = 'djbzu1no2tdz4qq4u2fpgaemuup2zzmtjulb';
|
1842 |
+
$auth = 'o3w063qppl7ha022jyc3bjpi7usrmczho';
|
1843 |
// Start of Metrics
|
1844 |
global $wpdb;
|
1845 |
$data = get_transient( 'presstrends_cache_data' );
|
1846 |
|
1847 |
+
if ( ! $data || $data == '' ) {
|
1848 |
+
$api_base = 'http://api.presstrends.io/index.php/api/pluginsites/update?auth=';
|
1849 |
+
$url = $api_base . $auth . '&api=' . $api_key . '';
|
1850 |
+
$count_posts = wp_count_posts();
|
1851 |
+
$count_pages = wp_count_posts( 'page' );
|
1852 |
$comments_count = wp_count_comments();
|
1853 |
|
1854 |
+
if ( function_exists( 'wp_get_theme' ) ) {
|
1855 |
$theme_data = wp_get_theme();
|
1856 |
$theme_name = urlencode( $theme_data->Name );
|
1857 |
} else {
|
1858 |
$theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
|
1859 |
+
$theme_name = $theme_data[ 'Name' ];
|
1860 |
}
|
1861 |
|
1862 |
$plugin_name = '&';
|
1863 |
|
1864 |
foreach ( get_plugins() as $plugin_info ) {
|
1865 |
+
$plugin_name .= $plugin_info[ 'Name' ] . '&';
|
1866 |
}
|
1867 |
|
1868 |
// CHANGE __FILE__ PATH IF LOCATED OUTSIDE MAIN PLUGIN FILE
|
1869 |
+
$plugin_data = get_plugin_data( __FILE__ );
|
1870 |
$posts_with_comments = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='post' AND comment_count > 0" );
|
1871 |
+
$data = array(
|
1872 |
+
'url' => base64_encode( site_url() ), 'posts' => $count_posts->publish, 'pages' => $count_pages->publish, 'comments' => $comments_count->total_comments, 'approved' => $comments_count->approved, 'spam' => $comments_count->spam, 'pingbacks' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ), 'post_conversion' => ( $count_posts->publish > 0 && $posts_with_comments > 0 ) ? number_format( ( $posts_with_comments / $count_posts->publish ) * 100, 0, '.', '' ) : 0, 'theme_version' => $plugin_data[ 'Version' ], 'theme_name' => $theme_name, 'site_name' => str_replace( ' ', '', get_bloginfo( 'name' ) ), 'plugins' => count( get_option( 'active_plugins' ) ), 'plugin' => urlencode( $plugin_name ), 'wpversion' => get_bloginfo( 'version' ),
|
1873 |
);
|
1874 |
|
1875 |
foreach ( $data as $k => $v ) {
|
1881 |
}
|
1882 |
}
|
1883 |
|
1884 |
+
function rtmedia_update_template_notice() {
|
1885 |
+
$site_option = rtmedia_get_site_option( 'rtmedia-update-template-notice-v3_8' );
|
1886 |
|
1887 |
+
if ( ! $site_option || 'hide' != $site_option ) {
|
1888 |
+
rtmedia_update_site_option( 'rtmedia-update-template-notice-v3_8', 'show' );
|
1889 |
+
if ( is_dir( get_template_directory() . '/rtmedia' ) ) {
|
1890 |
echo '<div class="error rtmedia-update-template-notice"><p>' . __( 'Please update rtMedia template files if you have overridden the default rtMedia templates in your theme. If not, you can ignore and hide this notice.' ) . '<a href="#" onclick="rtmedia_hide_template_override_notice()" style="float:right">' . __( 'Hide', 'rtmedia' ) . '</a>' . ' </p></div>';
|
1891 |
?>
|
1892 |
<script type="text/javascript">
|
1893 |
function rtmedia_hide_template_override_notice() {
|
1894 |
+
var data = { action: 'rtmedia_hide_template_override_notice' };
|
1895 |
jQuery.post( ajaxurl, data, function ( response ) {
|
1896 |
response = response.trim();
|
1897 |
if ( '1' === response )
|
1899 |
} );
|
1900 |
}
|
1901 |
</script>
|
1902 |
+
<?php
|
1903 |
}
|
1904 |
}
|
1905 |
}
|
1906 |
|
1907 |
+
function rtmedia_hide_template_override_notice() {
|
1908 |
|
1909 |
+
if ( rtmedia_update_site_option( 'rtmedia-update-template-notice-v3_8', 'hide' ) ) {
|
1910 |
echo '1';
|
1911 |
} else {
|
1912 |
echo '0';
|
1913 |
}
|
1914 |
die();
|
1915 |
}
|
1916 |
+
|
1917 |
+
public static function render_admin_ui( $page, $sub_tabs, $args = array() ) {
|
1918 |
+
|
1919 |
+
// wrapper class
|
1920 |
+
$wrapper_class = '';
|
1921 |
+
if ( ! empty( $args[ 'wrapper_class' ] ) && is_array( $args[ 'wrapper_class' ] ) ) {
|
1922 |
+
$wrapper_class = implode( ' ', $args[ 'wrapper_class' ] );
|
1923 |
+
}
|
1924 |
+
|
1925 |
+
// tabs
|
1926 |
+
if ( $page == 'rtmedia-settings' ) {
|
1927 |
+
$sub_tabs = apply_filters( 'rtmedia_pro_settings_tabs_content', $sub_tabs );
|
1928 |
+
ksort( $sub_tabs );
|
1929 |
+
}
|
1930 |
+
?>
|
1931 |
+
|
1932 |
+
<div class="clearfix rtm-vertical-tabs rtm-admin-tab-container <?php echo $wrapper_class; ?>">
|
1933 |
+
<ul class="rtm-tabs">
|
1934 |
+
<?php
|
1935 |
+
$i = 1;
|
1936 |
+
foreach ( $sub_tabs as $tab ) {
|
1937 |
+
|
1938 |
+
// tab status
|
1939 |
+
$active_class = '';
|
1940 |
+
if ( 1 == $i ) {
|
1941 |
+
$active_class = 'active';
|
1942 |
+
}
|
1943 |
+
|
1944 |
+
// tab icon
|
1945 |
+
$icon = '';
|
1946 |
+
if ( isset( $tab[ 'icon' ] ) && ! empty( $tab[ 'icon' ] ) ) {
|
1947 |
+
$icon = '<i class="' . $tab[ 'icon' ] . ' dashicons rtmicon"></i>';
|
1948 |
+
}
|
1949 |
+
?>
|
1950 |
+
<li class="<?php echo $active_class ?>">
|
1951 |
+
<a id="tab-<?php echo substr( $tab[ 'href' ], 1 ) ?>" title="<?php echo $tab[ 'title' ] ?>" href="<?php echo $tab[ 'href' ] ?>" class="rtmedia-tab-title <?php echo sanitize_title( $tab[ 'name' ] ) ?>">
|
1952 |
+
<?php echo $icon ?><span><?php echo $tab[ 'name' ] ?></span>
|
1953 |
+
</a>
|
1954 |
+
</li>
|
1955 |
+
<?php
|
1956 |
+
$i ++;
|
1957 |
+
}
|
1958 |
+
?>
|
1959 |
+
</ul>
|
1960 |
+
|
1961 |
+
<div class="tabs-content rtm-tabs-content">
|
1962 |
+
<?php
|
1963 |
+
$k = 1;
|
1964 |
+
foreach ( $sub_tabs as $tab ) {
|
1965 |
+
$active_class = '';
|
1966 |
+
if ( 1 == $k ) {
|
1967 |
+
$active_class = ' active';
|
1968 |
+
}
|
1969 |
+
$k ++;
|
1970 |
+
if ( isset( $tab[ 'icon' ] ) && ! empty( $tab[ 'icon' ] ) ) {
|
1971 |
+
$icon = '<i class="' . $tab[ 'icon' ] . '"></i>';
|
1972 |
+
}
|
1973 |
+
$tab_without_hash = explode( '#', $tab[ 'href' ] );
|
1974 |
+
$tab_without_hash = $tab_without_hash[ 1 ];
|
1975 |
+
echo '<div class="content' . $active_class . '" id="' . $tab_without_hash . '">';
|
1976 |
+
echo '<h3 class="rtm-setting-title">' . $tab[ 'name' ] . '</h3>';
|
1977 |
+
if ( isset( $tab[ 'args' ] ) ) {
|
1978 |
+
call_user_func( $tab[ 'callback' ], $page, $tab[ 'args' ] );
|
1979 |
+
} else {
|
1980 |
+
call_user_func( $tab[ 'callback' ], $page );
|
1981 |
+
}
|
1982 |
+
echo '</div>';
|
1983 |
+
}
|
1984 |
+
?>
|
1985 |
+
</div>
|
1986 |
+
|
1987 |
+
</div>
|
1988 |
+
<?php
|
1989 |
+
}
|
1990 |
+
|
1991 |
}
|
1992 |
+
|
1993 |
}
|
app/admin/RTMediaFormHandler.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/*
|
4 |
* To change this template, choose Tools | Templates
|
5 |
* and open the template in the editor.
|
@@ -12,9 +11,9 @@
|
|
12 |
*/
|
13 |
class RTMediaFormHandler {
|
14 |
|
15 |
-
public static function selectBox( $args ){
|
16 |
global $rtmedia;
|
17 |
-
$options
|
18 |
$defaults = array(
|
19 |
'key' => '',
|
20 |
'desc' => '',
|
@@ -22,16 +21,16 @@ class RTMediaFormHandler {
|
|
22 |
'show_desc' => false,
|
23 |
'selects' => array(),
|
24 |
);
|
25 |
-
$args
|
26 |
extract( $args );
|
27 |
|
28 |
-
if ( ! empty( $key ) ){
|
29 |
-
$args['name'] = 'rtmedia-options[' . $key . ']';
|
30 |
}
|
31 |
|
32 |
-
$args['rtForm_options'] = array();
|
33 |
foreach ( $selects as $value => $key ) {
|
34 |
-
$args['rtForm_options'][] = array(
|
35 |
$key => $value,
|
36 |
'selected' => ( $default == $value ) ? true : false,
|
37 |
);
|
@@ -51,33 +50,32 @@ class RTMediaFormHandler {
|
|
51 |
*
|
52 |
* @return string $chkObj->get_textarea( $args )
|
53 |
*/
|
54 |
-
public static function textarea( $args, $echo = true ){
|
55 |
global $rtmedia;
|
56 |
-
$options
|
57 |
$defaults = array(
|
58 |
-
'id' => '',
|
59 |
'key' => '',
|
60 |
'desc' => '',
|
61 |
'show_desc' => false,
|
62 |
);
|
63 |
-
$args
|
64 |
extract( $args );
|
65 |
|
66 |
-
if ( ! isset( $value ) ){
|
67 |
trigger_error( __( 'Please provide a "value" in the argument.', 'rtmedia' ) );
|
68 |
|
69 |
return;
|
70 |
}
|
71 |
|
72 |
-
if ( ! empty( $key ) ){
|
73 |
-
$args['name'] = 'rtmedia-options[' . $key . ']';
|
74 |
}
|
75 |
|
76 |
-
$args['rtForm_options'] = array( array( '' => 1, 'checked' => $value ) );
|
77 |
|
78 |
$chkObj = new rtForm();
|
79 |
|
80 |
-
if ( $echo ){
|
81 |
echo $chkObj->get_textarea( $args );
|
82 |
} else {
|
83 |
return $chkObj->get_textarea( $args );
|
@@ -94,32 +92,32 @@ class RTMediaFormHandler {
|
|
94 |
*
|
95 |
* @return string $chkObj->get_switch( $args )
|
96 |
*/
|
97 |
-
public static function checkbox( $args, $echo = true ){
|
98 |
global $rtmedia;
|
99 |
-
$options
|
100 |
$defaults = array(
|
101 |
'key' => '',
|
102 |
'desc' => '',
|
103 |
'show_desc' => false,
|
104 |
);
|
105 |
-
$args
|
106 |
extract( $args );
|
107 |
|
108 |
-
if ( ! isset( $value ) ){
|
109 |
trigger_error( __( 'Please provide a "value" in the argument.', 'rtmedia' ) );
|
110 |
|
111 |
return;
|
112 |
}
|
113 |
|
114 |
-
if ( ! empty( $key ) ){
|
115 |
-
$args['name'] = 'rtmedia-options[' . $key . ']';
|
116 |
}
|
117 |
|
118 |
-
$args['rtForm_options'] = array( array( '' => 1, 'checked' => $value ) );
|
119 |
|
120 |
$chkObj = new rtForm();
|
121 |
// echo $chkObj->get_checkbox($args);
|
122 |
-
if ( $echo ){
|
123 |
echo $chkObj->get_switch( $args );
|
124 |
} else {
|
125 |
return $chkObj->get_switch( $args );
|
@@ -136,31 +134,31 @@ class RTMediaFormHandler {
|
|
136 |
*
|
137 |
* @return void
|
138 |
*/
|
139 |
-
public static function radio( $args ){
|
140 |
global $rtmedia;
|
141 |
-
$options
|
142 |
$defaults = array(
|
143 |
'key' => '',
|
144 |
'radios' => array(),
|
145 |
'default' => '',
|
146 |
'show_desc' => false,
|
147 |
);
|
148 |
-
$args
|
149 |
extract( $args );
|
150 |
|
151 |
-
if ( 2 > count( $radios ) ){
|
152 |
trigger_error( __( 'Need to specify atleast two radios, else use a checkbox instead', 'rtmedia' ) );
|
153 |
|
154 |
return;
|
155 |
}
|
156 |
|
157 |
-
if ( ! empty( $key ) ){
|
158 |
-
$args['name'] = 'rtmedia-options[' . $key . ']';
|
159 |
}
|
160 |
|
161 |
-
$args['rtForm_options'] = array();
|
162 |
foreach ( $radios as $value => $key ) {
|
163 |
-
$args['rtForm_options'][] = array(
|
164 |
$key => $value,
|
165 |
'checked' => ( $default == $value ) ? true : false,
|
166 |
);
|
@@ -176,7 +174,7 @@ class RTMediaFormHandler {
|
|
176 |
* @access static
|
177 |
* @return void
|
178 |
*/
|
179 |
-
public static function dimensions( $args ){
|
180 |
$dmnObj = new rtDimensions();
|
181 |
echo $dmnObj->get_dimensions( $args );
|
182 |
}
|
@@ -190,27 +188,27 @@ class RTMediaFormHandler {
|
|
190 |
*
|
191 |
* @return void
|
192 |
*/
|
193 |
-
public static function number( $args ){
|
194 |
global $rtmedia;
|
195 |
-
$options
|
196 |
$defaults = array(
|
197 |
'key' => '',
|
198 |
'desc' => '',
|
199 |
);
|
200 |
-
$args
|
201 |
extract( $args );
|
202 |
|
203 |
-
if ( ! isset( $value ) ){
|
204 |
trigger_error( __( 'Please provide a "value" in the argument.', 'rtmedia' ) );
|
205 |
|
206 |
return;
|
207 |
}
|
208 |
|
209 |
-
if ( ! empty( $key ) ){
|
210 |
-
$args['name'] = 'rtmedia-options[' . $key . ']';
|
211 |
}
|
212 |
|
213 |
-
$args['value'] = $value;
|
214 |
|
215 |
$numObj = new rtForm();
|
216 |
echo $numObj->get_number( $args );
|
@@ -225,27 +223,27 @@ class RTMediaFormHandler {
|
|
225 |
*
|
226 |
* @return void
|
227 |
*/
|
228 |
-
public static function textbox( $args ){
|
229 |
global $rtmedia;
|
230 |
-
$options
|
231 |
$defaults = array(
|
232 |
'key' => '',
|
233 |
'desc' => '',
|
234 |
);
|
235 |
-
$args
|
236 |
extract( $args );
|
237 |
|
238 |
-
if ( ! isset( $value ) ){
|
239 |
trigger_error( __( 'Please provide a "value" in the argument.', 'rtmedia' ) );
|
240 |
|
241 |
return;
|
242 |
}
|
243 |
|
244 |
-
if ( ! empty( $key ) ){
|
245 |
-
$args['name'] = 'rtmedia-options[' . $key . ']';
|
246 |
}
|
247 |
|
248 |
-
$args['value'] = $value;
|
249 |
|
250 |
$numObj = new rtForm();
|
251 |
echo $numObj->get_textbox( $args );
|
@@ -261,11 +259,11 @@ class RTMediaFormHandler {
|
|
261 |
*
|
262 |
* @return array $section
|
263 |
*/
|
264 |
-
static function extract_settings( $section_name, $options ){
|
265 |
$section = array();
|
266 |
foreach ( $options as $key => $value ) {
|
267 |
$compare = strncmp( $key, $section_name, strlen( $section_name ) );
|
268 |
-
if ( 0 == $compare ){
|
269 |
$section[ $key ] = $value;
|
270 |
}
|
271 |
}
|
@@ -287,7 +285,7 @@ class RTMediaFormHandler {
|
|
287 |
$radios['load_more'] = '<strong>' . __( 'Load More', 'rtmedia' ) .'</strong>';
|
288 |
$radios['pagination'] = '<strong>' . __( 'Pagination', 'rtmedia' ) .'</strong>';
|
289 |
|
290 |
-
if ( is_plugin_active( 'regenerate-thumbnails/regenerate-thumbnails.php' ) ){
|
291 |
$regenerate_link = admin_url( '/tools.php?page=regenerate-thumbnails' );
|
292 |
} elseif ( array_key_exists( 'regenerate-thumbnails/regenerate-thumbnails.php', get_plugins() ) ) {
|
293 |
$regenerate_link = admin_url( '/plugins.php#regenerate-thumbnails' );
|
@@ -296,60 +294,70 @@ class RTMediaFormHandler {
|
|
296 |
}
|
297 |
|
298 |
$render = array(
|
299 |
-
'general_enableComments'
|
300 |
-
'title'
|
301 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
302 |
'args' => array(
|
303 |
'key' => 'general_enableComments',
|
304 |
-
'value' => $options['general_enableComments'],
|
305 |
'desc' => __( 'This will display the comment form and comment listing on single media pages as well as inside lightbox (if lightbox is enabled).', 'rtmedia' ),
|
306 |
),
|
307 |
'group' => '10',
|
308 |
),
|
309 |
'general_enableLightbox' => array(
|
310 |
-
'title'
|
311 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
312 |
'args' => array(
|
313 |
'key' => 'general_enableLightbox',
|
314 |
-
'value' => $options['general_enableLightbox'],
|
315 |
'desc' => __( 'View single media in facebook style lightbox.', 'rtmedia' ),
|
316 |
),
|
317 |
'group' => '15',
|
318 |
),
|
319 |
-
'general_perPageMedia'
|
320 |
-
'title'
|
321 |
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
322 |
'args' => array(
|
323 |
'key' => 'general_perPageMedia',
|
324 |
-
'value' => $options['general_perPageMedia'],
|
325 |
'class' => array( 'rtmedia-setting-text-box' ),
|
326 |
'desc' => __( 'Number of media items you want to show per page on front end.', 'rtmedia' ),
|
327 |
'min' => 1,
|
328 |
),
|
329 |
'group' => '15',
|
330 |
),
|
331 |
-
'general_display_media'
|
332 |
-
'title'
|
333 |
'callback' => array( 'RTMediaFormHandler', 'radio' ),
|
334 |
'args' => array(
|
335 |
'key' => 'general_display_media',
|
336 |
'radios' => $radios,
|
337 |
-
'default' => $options['general_display_media'],
|
338 |
'desc' => __( 'Choose whether you want the load more button or pagination buttons.', 'rtmedia' ),
|
339 |
'class' => array( 'rtmedia-load-more-radio' ),
|
340 |
),
|
341 |
'group' => '15',
|
342 |
), 'general_masonry_layout' => array(
|
343 |
-
'title'
|
344 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
345 |
'args' => array(
|
346 |
'key' => 'general_masonry_layout',
|
347 |
-
'value' => $options['general_masonry_layout'],
|
348 |
-
'desc' => __( '
|
349 |
'class' => array( 'rtm_enable_masonry_view' ),
|
350 |
),
|
351 |
'group' => '18',
|
352 |
-
'after_content' => __( 'You might need to', 'rtmedia' ) . ' <a id="rtm-masonry-change-thumbnail-info" href="' . get_admin_url() . 'admin.php?page=rtmedia-settings#rtmedia-sizes">' . __( 'change thumbnail size', 'rtmedia' ) . '</a> ' . __( 'and uncheck the crop box for thumbnails.', 'rtmedia' ) . '<br
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
),
|
354 |
);
|
355 |
|
@@ -365,10 +373,10 @@ class RTMediaFormHandler {
|
|
365 |
*
|
366 |
* @return void
|
367 |
*/
|
368 |
-
public static function display_content(){
|
369 |
global $rtmedia;
|
370 |
// $options = self::extract_settings('general', $rtmedia->options);
|
371 |
-
$options
|
372 |
$render_options = self::display_render_options( $options );
|
373 |
// $render_options = apply_filters('rtmedia_general_content_single_view_add_itmes',$render_options, $options);
|
374 |
$render_options = apply_filters( 'rtmedia_display_content_add_itmes', $render_options, $options );
|
@@ -376,53 +384,10 @@ class RTMediaFormHandler {
|
|
376 |
$general_group[10] = __( 'Single Media View', 'rtmedia' );
|
377 |
$general_group[15] = __( 'List Media View', 'rtmedia' );
|
378 |
$general_group[18] = __( 'Masonry View', 'rtmedia' );
|
|
|
379 |
$general_group = apply_filters( 'rtmedia_display_content_groups', $general_group );
|
380 |
ksort( $general_group );
|
381 |
-
$
|
382 |
-
foreach ( $general_group as $key => $value ) {
|
383 |
-
?>
|
384 |
-
<div class="postbox metabox-holder">
|
385 |
-
<h3 class="hndle"><span><?php echo $value; ?></span></h3>
|
386 |
-
<?php
|
387 |
-
foreach ( $render_options as $tab => $option ) {
|
388 |
-
|
389 |
-
if ( ! isset( $option['group'] ) ){
|
390 |
-
$option['group'] = '20';
|
391 |
-
}
|
392 |
-
|
393 |
-
if ( $option['group'] != $key ){
|
394 |
-
continue;
|
395 |
-
}
|
396 |
-
?>
|
397 |
-
<div class="row section">
|
398 |
-
<div class="columns large-9">
|
399 |
-
<?php echo $option['title']; ?>
|
400 |
-
</div>
|
401 |
-
<div class="columns large-3">
|
402 |
-
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
403 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
404 |
-
<i class="rtmicon-info-circle"></i>
|
405 |
-
</span>
|
406 |
-
</div>
|
407 |
-
</div>
|
408 |
-
<?php
|
409 |
-
if ( isset( $option['after_content'] ) ){
|
410 |
-
?>
|
411 |
-
<div class="row">
|
412 |
-
<div class="columns large-12">
|
413 |
-
<p class="rtmedia-info rtmedia-admin-notice">
|
414 |
-
<?php echo $option['after_content']; ?>
|
415 |
-
</p>
|
416 |
-
</div>
|
417 |
-
</div>
|
418 |
-
<?php
|
419 |
-
}
|
420 |
-
}
|
421 |
-
?>
|
422 |
-
</div>
|
423 |
-
<?php
|
424 |
-
}
|
425 |
-
|
426 |
}
|
427 |
|
428 |
/**
|
@@ -434,54 +399,55 @@ class RTMediaFormHandler {
|
|
434 |
*
|
435 |
* @return array $render
|
436 |
*/
|
437 |
-
static function render_general_content( $options ){
|
438 |
$render = array(
|
439 |
-
'general_AllowUserData'
|
440 |
'title' => __( 'Allow usage data tracking', 'rtmedia' ),
|
441 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
442 |
'args' => array(
|
443 |
'key' => 'general_AllowUserData',
|
444 |
-
'value' => $options['general_AllowUserData'],
|
445 |
'desc' => __( 'To make rtMedia better compatible with your sites, you can help the rtMedia team learn what themes and plugins you are using. No private information about your setup will be sent during tracking.', 'rtmedia' ),
|
446 |
)
|
447 |
),
|
448 |
'general_showAdminMenu' => array(
|
449 |
-
'title'
|
450 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
451 |
'args' => array(
|
452 |
'key' => 'general_showAdminMenu',
|
453 |
-
'value' => $options['general_showAdminMenu'],
|
454 |
'desc' => __( 'Add rtMedia menu to WordPress admin bar for easy access to settings and moderation page (if enabled).', 'rtmedia' ),
|
455 |
),
|
456 |
'group' => 10,
|
457 |
), //
|
458 |
-
'rtmedia_add_linkback'
|
459 |
-
'title'
|
460 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
461 |
'args' => array(
|
462 |
'key' => 'rtmedia_add_linkback',
|
463 |
-
'value' => $options['rtmedia_add_linkback'],
|
464 |
'desc' => __( 'Help us promote rtMedia.', 'rtmedia' ),
|
465 |
),
|
466 |
'group' => 100,
|
467 |
), //
|
468 |
-
'rtmedia_affiliate_id'
|
469 |
-
'title'
|
470 |
'callback' => array( 'RTMediaFormHandler', 'textbox' ),
|
471 |
'args' => array(
|
472 |
'key' => 'rtmedia_affiliate_id',
|
473 |
-
'value' => $options['rtmedia_affiliate_id'],
|
474 |
'desc' => __( 'Add your affiliate-id along with footer link and get rewarded by our affiliation program.', 'rtmedia' ),
|
475 |
),
|
476 |
'group' => 100,
|
477 |
-
'
|
|
|
478 |
), //
|
479 |
-
'rtmedia_enable_api'
|
480 |
-
'title'
|
481 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
482 |
'args' => array(
|
483 |
'key' => 'rtmedia_enable_api',
|
484 |
-
'value' => $options['rtmedia_enable_api'],
|
485 |
'desc' => __( 'This will allow handling API requests for rtMedia sent through any mobile app.', 'rtmedia' ),
|
486 |
),
|
487 |
'group' => 80,
|
@@ -501,7 +467,7 @@ class RTMediaFormHandler {
|
|
501 |
*
|
502 |
* @return void
|
503 |
*/
|
504 |
-
static function general_content( $options ){
|
505 |
global $rtmedia;
|
506 |
// $options = self::extract_settings('general', $rtmedia->options);
|
507 |
$options = $rtmedia->options;
|
@@ -515,51 +481,7 @@ class RTMediaFormHandler {
|
|
515 |
$general_group = apply_filters( 'rtmedia_general_content_groups', $general_group );
|
516 |
ksort( $general_group );
|
517 |
$html = '';
|
518 |
-
|
519 |
-
?>
|
520 |
-
<div class="postbox metabox-holder">
|
521 |
-
<h3 class="hndle"><span><?php echo $value; ?></span></h3>
|
522 |
-
<?php
|
523 |
-
foreach ( $render_options as $tab => $option ) {
|
524 |
-
|
525 |
-
if ( ! isset( $option['group'] ) ){
|
526 |
-
$option['group'] = '90';
|
527 |
-
}
|
528 |
-
|
529 |
-
if ( $option['group'] != $key ){
|
530 |
-
continue;
|
531 |
-
}
|
532 |
-
?>
|
533 |
-
<div class="row section">
|
534 |
-
<div class="columns large-7">
|
535 |
-
<?php echo $option['title']; ?>
|
536 |
-
</div>
|
537 |
-
<div class="columns large-5">
|
538 |
-
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
539 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
540 |
-
<i class="rtmicon-info-circle"></i>
|
541 |
-
</span>
|
542 |
-
</div>
|
543 |
-
</div>
|
544 |
-
<?php
|
545 |
-
if ( isset( $option['after_content'] ) ){
|
546 |
-
?>
|
547 |
-
<div class="row">
|
548 |
-
<div class="columns large-12">
|
549 |
-
<p class="rtmedia-info rtmedia-admin-notice">
|
550 |
-
<?php echo $option['after_content']; ?>
|
551 |
-
</p>
|
552 |
-
</div>
|
553 |
-
</div>
|
554 |
-
<?php
|
555 |
-
}
|
556 |
-
?>
|
557 |
-
<?php
|
558 |
-
}
|
559 |
-
?>
|
560 |
-
</div>
|
561 |
-
<?php
|
562 |
-
}
|
563 |
}
|
564 |
|
565 |
/**
|
@@ -572,15 +494,15 @@ class RTMediaFormHandler {
|
|
572 |
*
|
573 |
* @return array $data
|
574 |
*/
|
575 |
-
static function get_type_details( $allowed_types, $key ){
|
576 |
foreach ( $allowed_types as $type ) {
|
577 |
-
if ( $type['name'] == $key ){
|
578 |
$data = array(
|
579 |
-
'name' => $type['label'],
|
580 |
-
'extn' => $type['extn'],
|
581 |
);
|
582 |
-
if ( isset( $type['settings_visibility'] ) ){
|
583 |
-
$data['settings_visibility'] = $type['settings_visibility'];
|
584 |
}
|
585 |
|
586 |
return $data;
|
@@ -597,23 +519,23 @@ class RTMediaFormHandler {
|
|
597 |
*
|
598 |
* @return array $render
|
599 |
*/
|
600 |
-
static function types_render_options( $options ){
|
601 |
global $rtmedia;
|
602 |
|
603 |
-
$render
|
604 |
$allowed_media_type = $rtmedia->allowed_types;
|
605 |
$allowed_media_type = apply_filters( 'rtmedia_allowed_types', $allowed_media_type );
|
606 |
|
607 |
foreach ( $options as $key => $value ) {
|
608 |
$data = explode( '_', $key );
|
609 |
-
if ( ! isset( $render[ $data[1] ] ) ){
|
610 |
-
$render[ $data[1] ] = self::get_type_details( $allowed_media_type, $data[1] );
|
611 |
}
|
612 |
}
|
613 |
|
614 |
foreach ( $options as $key => $value ) {
|
615 |
-
$data
|
616 |
-
$render[ $data[1] ][ $data[2] ] = $value;
|
617 |
}
|
618 |
|
619 |
return $render;
|
@@ -628,81 +550,122 @@ class RTMediaFormHandler {
|
|
628 |
*
|
629 |
* @return void
|
630 |
*/
|
631 |
-
public static function types_content(){
|
632 |
global $rtmedia;
|
633 |
$options = self::extract_settings( 'allowedTypes', $rtmedia->options );
|
634 |
|
635 |
$render_data = self::types_render_options( $options );
|
636 |
?>
|
637 |
-
<div class="
|
638 |
-
|
639 |
-
|
640 |
-
|
|
|
641 |
</h3>
|
642 |
-
</div>
|
643 |
-
<div class="rt-table large-12 medium-12 small-12">
|
644 |
-
<div class="row rt-header">
|
645 |
-
<?php do_action( 'rtmedia_type_settings_before_heading' ); ?>
|
646 |
-
<div class="columns large-4 medium-4 small-4"><h4><?php _e( 'Media Type', 'rtmedia' ) ?></h4></div>
|
647 |
-
<div class="columns large-4 medium-4 small-4">
|
648 |
-
<h4 data-tooltip class="has-tip" title="<?php _e( 'Allows you to upload a particular media type on your post.', 'rtmedia' ); ?>">
|
649 |
-
<abbr><?php _e( 'Allow Upload', 'rtmedia' ); ?></abbr>
|
650 |
-
</h4>
|
651 |
-
</div>
|
652 |
-
<div class="columns large-4 medium-4 small-4">
|
653 |
-
<h4 data-tooltip class="has-tip" title="<?php _e( 'Place a specific media as a featured content on the post.', 'rtmedia' ); ?>">
|
654 |
-
<abbr><?php _e( 'Set Featured', 'rtmedia' ); ?></abbr>
|
655 |
-
</h4>
|
656 |
-
</div>
|
657 |
|
658 |
-
|
659 |
-
</div>
|
660 |
|
661 |
-
|
662 |
-
$even = 0;
|
663 |
-
foreach ( $render_data as $key => $section ) {
|
664 |
-
if ( isset( $section['settings_visibility'] ) && true == $section['settings_visibility'] ){
|
665 |
|
666 |
-
|
667 |
-
|
668 |
-
} else {
|
669 |
-
echo '<div class="row rt-even">';
|
670 |
-
}
|
671 |
|
672 |
-
|
673 |
-
echo '<div class="columns large-4 medium-4 small-4">' . $section['name'] . '</div>';
|
674 |
-
$args = array( 'key' => 'allowedTypes_' . $key . '_enabled', 'value' => $section['enabled'] );
|
675 |
-
echo '<div class="columns large-4 medium-4 small-4">';
|
676 |
-
$allow_upload_checkbox = self::checkbox( $args, $echo = false );
|
677 |
-
$allow_upload_checkbox = apply_filters( 'rtmedia_filter_allow_upload_checkbox', $allow_upload_checkbox, $key, $args );
|
678 |
-
echo $allow_upload_checkbox;
|
679 |
-
echo '</div>';
|
680 |
-
$args = array( 'key' => 'allowedTypes_' . $key . '_featured', 'value' => $section['featured'] );
|
681 |
-
echo '<div class="columns large-4 medium-4 small-4">';
|
682 |
-
$featured_checkbox = self::checkbox( $args, $echo = false );
|
683 |
-
$featured_checkbox = apply_filters( 'rtmedia_filter_featured_checkbox', $featured_checkbox, $key );
|
684 |
-
echo $featured_checkbox;
|
685 |
-
echo '</div>';
|
686 |
-
|
687 |
-
if ( ! isset( $section['extn'] ) || ! is_array( $section['extn'] ) ){
|
688 |
-
$section['extn'] = array();
|
689 |
-
}
|
690 |
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
echo '</div>';
|
699 |
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
do_action( 'rtmedia_after_bp_settings' );
|
707 |
do_action( 'rtmedia_after_media_types_settings' );
|
708 |
}
|
@@ -716,20 +679,20 @@ class RTMediaFormHandler {
|
|
716 |
*
|
717 |
* @return array $render
|
718 |
*/
|
719 |
-
static function sizes_render_options( $options ){
|
720 |
$render = array();
|
721 |
foreach ( $options as $key => $value ) {
|
722 |
$data = explode( '_', $key );
|
723 |
-
if ( ! isset( $render[ $data[1] ] ) ){
|
724 |
-
$render[ $data[1] ]
|
725 |
-
$render[ $data[1] ]['title'] = __( $data[1], 'rtmedia' );
|
726 |
}
|
727 |
-
if ( ! isset( $render[ $data[1] ][ $data[2] ] ) ){
|
728 |
-
$render[ $data[1] ][ $data[2] ]
|
729 |
-
$render[ $data[1] ][ $data[2] ]['title'] = __( $data[2], 'rtmedia' );
|
730 |
}
|
731 |
|
732 |
-
$render[ $data[1] ][ $data[2] ][ $data[3] ] = $value;
|
733 |
}
|
734 |
|
735 |
return $render;
|
@@ -744,124 +707,116 @@ class RTMediaFormHandler {
|
|
744 |
*
|
745 |
* @return void
|
746 |
*/
|
747 |
-
public static function sizes_content(){
|
748 |
global $rtmedia;
|
749 |
-
$options
|
750 |
$render_data = self::sizes_render_options( $options );
|
751 |
?>
|
752 |
-
|
753 |
-
|
754 |
-
|
|
|
755 |
</h3>
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
792 |
}
|
793 |
}
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
}
|
799 |
|
800 |
-
|
801 |
$options = $rtmedia->options;
|
802 |
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $render_video_thumb['args']['desc'] ) ) ? $render_video_thumb['args']['desc'] : 'NA'; ?>">
|
830 |
-
<i class="rtmicon-info-circle"></i>
|
831 |
-
</span>
|
832 |
-
</div>
|
833 |
-
</div>
|
834 |
-
<?php
|
835 |
-
}
|
836 |
-
|
837 |
-
$render_jpeg_image_quality = array(
|
838 |
'title' => __( 'JPEG/JPG image quality (1-100)', 'rtmedia' ),
|
839 |
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
840 |
'args' => array(
|
841 |
'key' => 'general_jpeg_image_quality',
|
842 |
-
'value' => $options['general_jpeg_image_quality'],
|
843 |
'class' => array( 'rtmedia-setting-text-box' ),
|
844 |
'desc' => __( 'Enter JPEG/JPG Image Quality. Minimum value is 1. 100 is original quality.', 'rtmedia' ),
|
845 |
'min' => 1,
|
846 |
'max' => 100,
|
847 |
)
|
848 |
);
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
<div class="columns large-9">
|
855 |
-
<?php echo $render_jpeg_image_quality['title']; ?>
|
856 |
-
</div>
|
857 |
-
<div class="columns large-3">
|
858 |
-
<?php call_user_func( $render_jpeg_image_quality['callback'], $render_jpeg_image_quality['args'] ); ?>
|
859 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $render_jpeg_image_quality['args']['desc'] ) ) ? $render_jpeg_image_quality['args']['desc'] : 'NA'; ?>">
|
860 |
-
<i class="rtmicon-info-circle"></i>
|
861 |
-
</span>
|
862 |
-
</div>
|
863 |
</div>
|
864 |
-
|
|
|
865 |
}
|
866 |
|
867 |
/**
|
@@ -873,43 +828,15 @@ class RTMediaFormHandler {
|
|
873 |
*
|
874 |
* @return void
|
875 |
*/
|
876 |
-
public static function custom_css_content(){
|
877 |
global $rtmedia;
|
878 |
-
$options
|
879 |
$render_data = self::custom_css_render_options( $options );
|
880 |
-
?>
|
881 |
-
<div class="postbox metabox-holder">
|
882 |
-
<h3 class="hndle"><span><?php _e( 'Custom CSS settings', 'rtmedia' ); ?></span></h3>
|
883 |
-
</div>
|
884 |
-
<?php
|
885 |
-
echo '<div class="large-12">';
|
886 |
-
foreach ( $render_data as $option ) {
|
887 |
-
?>
|
888 |
|
889 |
-
|
890 |
-
|
891 |
-
<div class="columns large-12 rtm-custom-css">
|
892 |
-
<strong
|
893 |
-
class="<?php echo $option['args']['key']; ?>"><?php echo $option['title']; ?></strong>
|
894 |
-
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
895 |
-
<div><?php _e( "If you want to add some custom CSS code to the plugin and do not want to modify any files, then this is a good place to enter your code." ); ?></div>
|
896 |
-
</div>
|
897 |
-
<?php } else { ?>
|
898 |
-
<div class="columns large-6">
|
899 |
-
<strong class="<?php echo $option['args']['key']; ?>"><?php echo $option['title']; ?></strong>
|
900 |
-
</div>
|
901 |
-
<div class="columns large-6">
|
902 |
-
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
903 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
904 |
-
<i class="rtmicon-info-circle"></i>
|
905 |
-
</span>
|
906 |
-
</div>
|
907 |
-
<?php } ?>
|
908 |
-
</div>
|
909 |
-
<?php
|
910 |
-
}
|
911 |
-
echo '</div>';
|
912 |
|
|
|
913 |
}
|
914 |
|
915 |
/**
|
@@ -921,19 +848,20 @@ class RTMediaFormHandler {
|
|
921 |
*
|
922 |
* @return array $render
|
923 |
*/
|
924 |
-
static function custom_css_render_options( $options ){
|
925 |
global $rtmedia;
|
926 |
|
927 |
$render = array(
|
928 |
-
'disable_styles'
|
929 |
'title' => __( 'rtMedia default styles', 'rtmedia' ),
|
930 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
931 |
'args' => array(
|
932 |
'id' => 'rtmedia-disable-styles',
|
933 |
'key' => 'styles_enabled',
|
934 |
-
'value' => $options['styles_enabled'],
|
935 |
'desc' => __( 'Load default rtMedia styles. You need to write your own style for rtMedia if you disable it.', 'rtmedia' ),
|
936 |
-
)
|
|
|
937 |
),
|
938 |
'custom_styles' => array(
|
939 |
'title' => __( 'Paste your CSS code', 'rtmedia' ),
|
@@ -941,10 +869,11 @@ class RTMediaFormHandler {
|
|
941 |
'args' => array(
|
942 |
'id' => 'rtmedia-custom-css',
|
943 |
'key' => 'styles_custom',
|
944 |
-
'value' => stripcslashes( $options['styles_custom'] ),
|
945 |
'desc' => __( 'Custom rtMedia CSS container', 'rtmedia' ),
|
946 |
-
)
|
947 |
-
|
|
|
948 |
);
|
949 |
|
950 |
return $render;
|
@@ -959,38 +888,43 @@ class RTMediaFormHandler {
|
|
959 |
*
|
960 |
* @return array $render
|
961 |
*/
|
962 |
-
static function privacy_render_options( $options ){
|
963 |
global $rtmedia;
|
964 |
|
965 |
$render = array(
|
966 |
-
'enable'
|
967 |
'title' => __( 'Enable privacy', 'rtmedia' ),
|
968 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
969 |
'args' => array(
|
970 |
'id' => 'rtmedia-privacy-enable',
|
971 |
'key' => 'privacy_enabled',
|
972 |
-
'value' => $options['privacy_enabled'],
|
973 |
'desc' => __( 'Enable privacy in rtMedia', 'rtmedia' ),
|
974 |
-
)
|
|
|
975 |
),
|
976 |
-
'default'
|
977 |
'title' => __( 'Default privacy', 'rtmedia' ),
|
978 |
'callback' => array( 'RTMediaFormHandler', 'radio' ),
|
979 |
'args' => array(
|
980 |
'key' => 'privacy_default',
|
981 |
-
'radios' => $rtmedia->privacy_settings['levels'],
|
982 |
-
'default' => $options['privacy_default'],
|
983 |
'desc' => __( 'Set default privacy for media', 'rtmedia' ),
|
984 |
),
|
|
|
|
|
985 |
),
|
986 |
'user_override' => array(
|
987 |
-
'title'
|
988 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
989 |
'args' => array(
|
990 |
'key' => 'privacy_userOverride',
|
991 |
-
'value' => $options['privacy_userOverride'],
|
992 |
'desc' => __( 'If you choose this, users will be able to change privacy of their own uploads.', 'rtmedia' ),
|
993 |
),
|
|
|
|
|
994 |
'after_content' => __( 'For group uploads, BuddyPress groups privacy is used.', 'rtmedia' ),
|
995 |
),
|
996 |
);
|
@@ -1007,51 +941,18 @@ class RTMediaFormHandler {
|
|
1007 |
*
|
1008 |
* @return void
|
1009 |
*/
|
1010 |
-
public static function privacy_content(){
|
1011 |
global $rtmedia;
|
1012 |
-
$options = self::extract_settings( 'privacy', $rtmedia->options );
|
1013 |
|
1014 |
-
$
|
1015 |
-
|
1016 |
-
|
1017 |
-
<h3 class="hndle"><span><?php _e( 'Privacy Settings', 'rtmedia' ); ?></span></h3>
|
1018 |
-
</div>
|
1019 |
-
<?php
|
1020 |
-
echo '<div class="large-12">';
|
1021 |
-
foreach ( $render_data as $key => $privacy ) {
|
1022 |
-
echo '<div class="row section">';
|
1023 |
-
?>
|
1024 |
-
<div class="columns large-6">
|
1025 |
-
<?php echo $privacy['title'] ?>
|
1026 |
-
</div>
|
1027 |
-
<?php
|
1028 |
-
echo '<div class="columns large-6">';
|
1029 |
-
if ( 'enable' != $key ){
|
1030 |
-
call_user_func( $privacy['callback'], array_merge_recursive( $privacy['args'], array( 'class' => array( 'privacy-driven-disable' ) ) ) );
|
1031 |
-
} else {
|
1032 |
-
call_user_func( $privacy['callback'], $privacy['args'] );
|
1033 |
-
}
|
1034 |
-
?>
|
1035 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $privacy['args']['desc'] ) ) ? $privacy['args']['desc'] : 'NA'; ?>">
|
1036 |
-
<i class="rtmicon-info-circle"></i>
|
1037 |
-
</span>
|
1038 |
-
<?php
|
1039 |
-
echo '</div>';
|
1040 |
-
echo '</div>';
|
1041 |
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
<?php echo $privacy['after_content']; ?>
|
1048 |
-
</p>
|
1049 |
-
</div>
|
1050 |
-
</div>
|
1051 |
-
<?php
|
1052 |
-
}
|
1053 |
-
}
|
1054 |
-
echo '</div>';
|
1055 |
}
|
1056 |
|
1057 |
/**
|
@@ -1063,46 +964,61 @@ class RTMediaFormHandler {
|
|
1063 |
*
|
1064 |
* @return array $render
|
1065 |
*/
|
1066 |
-
static function buddypress_render_options( $options ){
|
1067 |
$render = array(
|
1068 |
-
'rtmedia-enable-on-profile'
|
1069 |
'title' => __( 'Enable media in profile', 'rtmedia' ),
|
1070 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
1071 |
'args' => array(
|
1072 |
'key' => 'buddypress_enableOnProfile',
|
1073 |
-
'value' => $options['buddypress_enableOnProfile'],
|
1074 |
'desc' => __( 'Enable Media on BuddyPress Profile', 'rtmedia' ),
|
1075 |
),
|
|
|
1076 |
),
|
1077 |
-
'rtmedia-enable-on-group'
|
1078 |
'title' => __( 'Enable media in group', 'rtmedia' ),
|
1079 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
1080 |
'args' => array(
|
1081 |
'key' => 'buddypress_enableOnGroup',
|
1082 |
-
'value' => $options['buddypress_enableOnGroup'],
|
1083 |
'desc' => __( 'Enable Media on BuddyPress Groups', 'rtmedia' ),
|
1084 |
),
|
|
|
1085 |
),
|
1086 |
-
'rtmedia-enable-on-activity'
|
1087 |
'title' => __( 'Allow upload from activity stream', 'rtmedia' ),
|
1088 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
1089 |
'args' => array(
|
1090 |
'key' => 'buddypress_enableOnActivity',
|
1091 |
-
'value' => $options['buddypress_enableOnActivity'],
|
1092 |
'desc' => __( 'Allow upload using status update box present on activity stream page', 'rtmedia' ),
|
1093 |
'id' => 'rtmedia-bp-enable-activity',
|
1094 |
),
|
|
|
1095 |
),
|
1096 |
'rtmedia-activity-feed-limit' => array(
|
1097 |
'title' => __( 'Number of media items to show in activity stream', 'rtmedia' ),
|
1098 |
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
1099 |
'args' => array(
|
1100 |
'key' => 'buddypress_limitOnActivity',
|
1101 |
-
'value' => $options['buddypress_limitOnActivity'],
|
1102 |
'desc' => __( 'With bulk uploads activity, the stream may get flooded. You can control the maximum number of media items or files per activity. This limit will not affect the actual number of uploads. This is only for display. <em>0</em> means unlimited.', 'rtmedia' ),
|
1103 |
'class' => array( 'rtmedia-setting-text-box rtmedia-bp-activity-setting' ),
|
1104 |
'min' => 0,
|
1105 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1106 |
),
|
1107 |
);
|
1108 |
|
@@ -1121,67 +1037,18 @@ class RTMediaFormHandler {
|
|
1121 |
public static function buddypress_content() {
|
1122 |
global $rtmedia;
|
1123 |
|
1124 |
-
$
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
$
|
|
|
|
|
|
|
|
|
|
|
1130 |
|
1131 |
-
echo '<div class="large-12">';
|
1132 |
-
foreach ( $render_data as $option ) {
|
1133 |
-
?>
|
1134 |
-
<div class="row section">
|
1135 |
-
<div class="columns large-9">
|
1136 |
-
<?php echo $option['title']; ?>
|
1137 |
-
</div>
|
1138 |
-
<div class="columns large-3">
|
1139 |
-
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
1140 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
1141 |
-
<i class="rtmicon-info-circle"></i>
|
1142 |
-
</span>
|
1143 |
-
</div>
|
1144 |
-
</div>
|
1145 |
-
<?php
|
1146 |
-
}
|
1147 |
-
echo '</div>';
|
1148 |
-
echo '</div>';
|
1149 |
-
?>
|
1150 |
-
<div class="postbox metabox-holder">
|
1151 |
-
<h3 class="hndle"><span><?php _e( 'Album Settings', 'rtmedia' ); ?></span></h3>
|
1152 |
-
<?php
|
1153 |
-
$options = $rtmedia->options;
|
1154 |
-
$render_options = array(
|
1155 |
-
'general_enableAlbums' => array(
|
1156 |
-
'title' => __( 'Organize media into albums', 'rtmedia' ),
|
1157 |
-
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
1158 |
-
'args' => array(
|
1159 |
-
'id' => 'rtmedia-album-enable',
|
1160 |
-
'key' => 'general_enableAlbums',
|
1161 |
-
'value' => $options['general_enableAlbums'],
|
1162 |
-
'desc' => __( 'This will add \'album\' tab to BuddyPress profile and group depending on the ^above^ settings.', 'rtmedia' ),
|
1163 |
-
),
|
1164 |
-
),
|
1165 |
-
);
|
1166 |
-
$render_options = apply_filters( 'rtmedia_album_control_setting', $render_options, $options );
|
1167 |
-
foreach ( $render_options as $tab => $option ) {
|
1168 |
-
?>
|
1169 |
-
<div class="row section">
|
1170 |
-
<div class="columns large-9">
|
1171 |
-
<?php echo $option['title']; ?>
|
1172 |
-
</div>
|
1173 |
-
<div class="columns large-3">
|
1174 |
-
<?php call_user_func( $option['callback'], $option['args'] ); ?>
|
1175 |
-
<span data-tooltip class="has-tip" title="<?php echo ( isset( $option['args']['desc'] ) ) ? $option['args']['desc'] : 'NA'; ?>">
|
1176 |
-
<i class="rtmicon-info-circle"></i>
|
1177 |
-
</span>
|
1178 |
-
</div>
|
1179 |
-
</div>
|
1180 |
-
<?php
|
1181 |
-
}
|
1182 |
-
?>
|
1183 |
-
</div>
|
1184 |
-
<?php
|
1185 |
do_action( 'rtmedia_buddypress_setting_content' );
|
1186 |
}
|
1187 |
|
@@ -1195,54 +1062,13 @@ class RTMediaFormHandler {
|
|
1195 |
*
|
1196 |
* @return void
|
1197 |
*/
|
1198 |
-
public static function rtForm_settings_tabs_content( $page, $sub_tabs ){
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
$
|
1205 |
-
$sub_tabs = apply_filters( 'rtmedia_pro_settings_tabs_content', $sub_tabs );
|
1206 |
-
ksort( $sub_tabs );
|
1207 |
-
foreach ( $sub_tabs as $tab ) {
|
1208 |
-
$active_class = '';
|
1209 |
-
if ( 1 == $i ){
|
1210 |
-
$active_class = 'active';
|
1211 |
-
}
|
1212 |
-
$i ++;
|
1213 |
-
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
1214 |
-
$icon = '<i class="' . $tab['icon'] . ' rtmicon-fw"></i>';
|
1215 |
-
}
|
1216 |
-
echo '<dd class="' . $active_class . '"><a id="tab-' . substr( $tab['href'], 1 ) . '" title="' . $tab['title'] . '" href="' . $tab['href'] . '" class="rtmedia-tab-title ' . sanitize_title( $tab['name'] ) . '">' . $icon . $tab['name'] . '</a></dd>';
|
1217 |
-
}
|
1218 |
-
echo '</dl>';
|
1219 |
-
?>
|
1220 |
-
|
1221 |
-
<?php
|
1222 |
-
$rtmedia_admin_tab_content_handler = "<div class='tabs-content'>";
|
1223 |
-
$rtmedia_admin_tab_content_handler = apply_filters( 'rtmedia_admin_tab_content_handler', $rtmedia_admin_tab_content_handler );
|
1224 |
-
echo $rtmedia_admin_tab_content_handler;
|
1225 |
-
$k = 1;
|
1226 |
-
foreach ( $sub_tabs as $tab ) {
|
1227 |
-
$active_class = '';
|
1228 |
-
if ( 1 == $k ){
|
1229 |
-
$active_class = ' active';
|
1230 |
-
}
|
1231 |
-
$k ++;
|
1232 |
-
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
1233 |
-
$icon = '<i class="' . $tab['icon'] . '"></i>';
|
1234 |
-
}
|
1235 |
-
$tab_without_hash = explode( '#', $tab['href'] );
|
1236 |
-
$tab_without_hash = $tab_without_hash[1];
|
1237 |
-
echo '<div class="content' . $active_class . '" id="' . $tab_without_hash . '">';
|
1238 |
-
call_user_func( $tab['callback'], $page );
|
1239 |
-
echo '</div>';
|
1240 |
-
}
|
1241 |
-
echo '</div>';
|
1242 |
-
?>
|
1243 |
-
</div>
|
1244 |
-
<div class="clearfix"></div>
|
1245 |
-
<?php
|
1246 |
}
|
1247 |
|
1248 |
/**
|
@@ -1255,28 +1081,124 @@ class RTMediaFormHandler {
|
|
1255 |
*
|
1256 |
* @return void
|
1257 |
*/
|
1258 |
-
public static function rtForm_do_settings_fields( $page, $section ){
|
1259 |
global $wp_settings_fields;
|
1260 |
|
1261 |
-
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section ] ) ){
|
1262 |
return;
|
1263 |
}
|
1264 |
|
1265 |
-
foreach ( (array) $wp_settings_fields[ $page ][ $section ] as $field ) {
|
1266 |
echo '<div class="row">';
|
1267 |
echo '<div class="large-11 columns">';
|
1268 |
|
1269 |
-
if ( isset( $field['args']['label_for'] ) && ! empty( $field['args']['label_for'] ) ){
|
1270 |
-
call_user_func( $field['callback'], array_merge( $field['args'], array( 'label' => $field['args']['label_for'] ) ) );
|
1271 |
} else {
|
1272 |
-
if ( isset( $field['title'] ) && ! empty( $field['title'] ) ){
|
1273 |
-
call_user_func( $field['callback'], array_merge( $field['args'], array( 'label' => $field['title'] ) ) );
|
1274 |
} else {
|
1275 |
-
call_user_func( $field['callback'], $field['args'] );
|
1276 |
}
|
1277 |
}
|
1278 |
echo '</div>';
|
1279 |
echo '</div>';
|
1280 |
}
|
1281 |
}
|
1282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
|
|
2 |
/*
|
3 |
* To change this template, choose Tools | Templates
|
4 |
* and open the template in the editor.
|
11 |
*/
|
12 |
class RTMediaFormHandler {
|
13 |
|
14 |
+
public static function selectBox( $args ) {
|
15 |
global $rtmedia;
|
16 |
+
$options = $rtmedia->options;
|
17 |
$defaults = array(
|
18 |
'key' => '',
|
19 |
'desc' => '',
|
21 |
'show_desc' => false,
|
22 |
'selects' => array(),
|
23 |
);
|
24 |
+
$args = wp_parse_args( $args, $defaults );
|
25 |
extract( $args );
|
26 |
|
27 |
+
if ( ! empty( $key ) ) {
|
28 |
+
$args[ 'name' ] = 'rtmedia-options[' . $key . ']';
|
29 |
}
|
30 |
|
31 |
+
$args[ 'rtForm_options' ] = array();
|
32 |
foreach ( $selects as $value => $key ) {
|
33 |
+
$args[ 'rtForm_options' ][] = array(
|
34 |
$key => $value,
|
35 |
'selected' => ( $default == $value ) ? true : false,
|
36 |
);
|
50 |
*
|
51 |
* @return string $chkObj->get_textarea( $args )
|
52 |
*/
|
53 |
+
public static function textarea( $args, $echo = true ) {
|
54 |
global $rtmedia;
|
55 |
+
$options = $rtmedia->options;
|
56 |
$defaults = array(
|
|
|
57 |
'key' => '',
|
58 |
'desc' => '',
|
59 |
'show_desc' => false,
|
60 |
);
|
61 |
+
$args = wp_parse_args( $args, $defaults );
|
62 |
extract( $args );
|
63 |
|
64 |
+
if ( ! isset( $value ) ) {
|
65 |
trigger_error( __( 'Please provide a "value" in the argument.', 'rtmedia' ) );
|
66 |
|
67 |
return;
|
68 |
}
|
69 |
|
70 |
+
if ( ! empty( $key ) ) {
|
71 |
+
$args[ 'name' ] = 'rtmedia-options[' . $key . ']';
|
72 |
}
|
73 |
|
74 |
+
$args[ 'rtForm_options' ] = array( array( '' => 1, 'checked' => $value ) );
|
75 |
|
76 |
$chkObj = new rtForm();
|
77 |
|
78 |
+
if ( $echo ) {
|
79 |
echo $chkObj->get_textarea( $args );
|
80 |
} else {
|
81 |
return $chkObj->get_textarea( $args );
|
92 |
*
|
93 |
* @return string $chkObj->get_switch( $args )
|
94 |
*/
|
95 |
+
public static function checkbox( $args, $echo = true ) {
|
96 |
global $rtmedia;
|
97 |
+
$options = $rtmedia->options;
|
98 |
$defaults = array(
|
99 |
'key' => '',
|
100 |
'desc' => '',
|
101 |
'show_desc' => false,
|
102 |
);
|
103 |
+
$args = wp_parse_args( $args, $defaults );
|
104 |
extract( $args );
|
105 |
|
106 |
+
if ( ! isset( $value ) ) {
|
107 |
trigger_error( __( 'Please provide a "value" in the argument.', 'rtmedia' ) );
|
108 |
|
109 |
return;
|
110 |
}
|
111 |
|
112 |
+
if ( ! empty( $key ) ) {
|
113 |
+
$args[ 'name' ] = 'rtmedia-options[' . $key . ']';
|
114 |
}
|
115 |
|
116 |
+
$args[ 'rtForm_options' ] = array( array( '' => 1, 'checked' => $value ) );
|
117 |
|
118 |
$chkObj = new rtForm();
|
119 |
// echo $chkObj->get_checkbox($args);
|
120 |
+
if ( $echo ) {
|
121 |
echo $chkObj->get_switch( $args );
|
122 |
} else {
|
123 |
return $chkObj->get_switch( $args );
|
134 |
*
|
135 |
* @return void
|
136 |
*/
|
137 |
+
public static function radio( $args ) {
|
138 |
global $rtmedia;
|
139 |
+
$options = $rtmedia->options;
|
140 |
$defaults = array(
|
141 |
'key' => '',
|
142 |
'radios' => array(),
|
143 |
'default' => '',
|
144 |
'show_desc' => false,
|
145 |
);
|
146 |
+
$args = wp_parse_args( $args, $defaults );
|
147 |
extract( $args );
|
148 |
|
149 |
+
if ( 2 > count( $radios ) ) {
|
150 |
trigger_error( __( 'Need to specify atleast two radios, else use a checkbox instead', 'rtmedia' ) );
|
151 |
|
152 |
return;
|
153 |
}
|
154 |
|
155 |
+
if ( ! empty( $key ) ) {
|
156 |
+
$args[ 'name' ] = 'rtmedia-options[' . $key . ']';
|
157 |
}
|
158 |
|
159 |
+
$args[ 'rtForm_options' ] = array();
|
160 |
foreach ( $radios as $value => $key ) {
|
161 |
+
$args[ 'rtForm_options' ][] = array(
|
162 |
$key => $value,
|
163 |
'checked' => ( $default == $value ) ? true : false,
|
164 |
);
|
174 |
* @access static
|
175 |
* @return void
|
176 |
*/
|
177 |
+
public static function dimensions( $args ) {
|
178 |
$dmnObj = new rtDimensions();
|
179 |
echo $dmnObj->get_dimensions( $args );
|
180 |
}
|
188 |
*
|
189 |
* @return void
|
190 |
*/
|
191 |
+
public static function number( $args ) {
|
192 |
global $rtmedia;
|
193 |
+
$options = $rtmedia->options;
|
194 |
$defaults = array(
|
195 |
'key' => '',
|
196 |
'desc' => '',
|
197 |
);
|
198 |
+
$args = wp_parse_args( $args, $defaults );
|
199 |
extract( $args );
|
200 |
|
201 |
+
if ( ! isset( $value ) ) {
|
202 |
trigger_error( __( 'Please provide a "value" in the argument.', 'rtmedia' ) );
|
203 |
|
204 |
return;
|
205 |
}
|
206 |
|
207 |
+
if ( ! empty( $key ) ) {
|
208 |
+
$args[ 'name' ] = 'rtmedia-options[' . $key . ']';
|
209 |
}
|
210 |
|
211 |
+
$args[ 'value' ] = $value;
|
212 |
|
213 |
$numObj = new rtForm();
|
214 |
echo $numObj->get_number( $args );
|
223 |
*
|
224 |
* @return void
|
225 |
*/
|
226 |
+
public static function textbox( $args ) {
|
227 |
global $rtmedia;
|
228 |
+
$options = $rtmedia->options;
|
229 |
$defaults = array(
|
230 |
'key' => '',
|
231 |
'desc' => '',
|
232 |
);
|
233 |
+
$args = wp_parse_args( $args, $defaults );
|
234 |
extract( $args );
|
235 |
|
236 |
+
if ( ! isset( $value ) ) {
|
237 |
trigger_error( __( 'Please provide a "value" in the argument.', 'rtmedia' ) );
|
238 |
|
239 |
return;
|
240 |
}
|
241 |
|
242 |
+
if ( ! empty( $key ) ) {
|
243 |
+
$args[ 'name' ] = 'rtmedia-options[' . $key . ']';
|
244 |
}
|
245 |
|
246 |
+
$args[ 'value' ] = $value;
|
247 |
|
248 |
$numObj = new rtForm();
|
249 |
echo $numObj->get_textbox( $args );
|
259 |
*
|
260 |
* @return array $section
|
261 |
*/
|
262 |
+
static function extract_settings( $section_name, $options ) {
|
263 |
$section = array();
|
264 |
foreach ( $options as $key => $value ) {
|
265 |
$compare = strncmp( $key, $section_name, strlen( $section_name ) );
|
266 |
+
if ( 0 == $compare ) {
|
267 |
$section[ $key ] = $value;
|
268 |
}
|
269 |
}
|
285 |
$radios['load_more'] = '<strong>' . __( 'Load More', 'rtmedia' ) .'</strong>';
|
286 |
$radios['pagination'] = '<strong>' . __( 'Pagination', 'rtmedia' ) .'</strong>';
|
287 |
|
288 |
+
if ( is_plugin_active( 'regenerate-thumbnails/regenerate-thumbnails.php' ) ) {
|
289 |
$regenerate_link = admin_url( '/tools.php?page=regenerate-thumbnails' );
|
290 |
} elseif ( array_key_exists( 'regenerate-thumbnails/regenerate-thumbnails.php', get_plugins() ) ) {
|
291 |
$regenerate_link = admin_url( '/plugins.php#regenerate-thumbnails' );
|
294 |
}
|
295 |
|
296 |
$render = array(
|
297 |
+
'general_enableComments' => array(
|
298 |
+
'title' => __( 'Allow user to comment on uploaded media', 'rtmedia' ),
|
299 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
300 |
'args' => array(
|
301 |
'key' => 'general_enableComments',
|
302 |
+
'value' => $options[ 'general_enableComments' ],
|
303 |
'desc' => __( 'This will display the comment form and comment listing on single media pages as well as inside lightbox (if lightbox is enabled).', 'rtmedia' ),
|
304 |
),
|
305 |
'group' => '10',
|
306 |
),
|
307 |
'general_enableLightbox' => array(
|
308 |
+
'title' => __( 'Use lightbox to display media', 'rtmedia' ),
|
309 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
310 |
'args' => array(
|
311 |
'key' => 'general_enableLightbox',
|
312 |
+
'value' => $options[ 'general_enableLightbox' ],
|
313 |
'desc' => __( 'View single media in facebook style lightbox.', 'rtmedia' ),
|
314 |
),
|
315 |
'group' => '15',
|
316 |
),
|
317 |
+
'general_perPageMedia' => array(
|
318 |
+
'title' => __( 'Number of media per page', 'rtmedia' ),
|
319 |
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
320 |
'args' => array(
|
321 |
'key' => 'general_perPageMedia',
|
322 |
+
'value' => $options[ 'general_perPageMedia' ],
|
323 |
'class' => array( 'rtmedia-setting-text-box' ),
|
324 |
'desc' => __( 'Number of media items you want to show per page on front end.', 'rtmedia' ),
|
325 |
'min' => 1,
|
326 |
),
|
327 |
'group' => '15',
|
328 |
),
|
329 |
+
'general_display_media' => array(
|
330 |
+
'title' => __( 'Media display pagination option', 'rtmedia' ),
|
331 |
'callback' => array( 'RTMediaFormHandler', 'radio' ),
|
332 |
'args' => array(
|
333 |
'key' => 'general_display_media',
|
334 |
'radios' => $radios,
|
335 |
+
'default' => $options[ 'general_display_media' ],
|
336 |
'desc' => __( 'Choose whether you want the load more button or pagination buttons.', 'rtmedia' ),
|
337 |
'class' => array( 'rtmedia-load-more-radio' ),
|
338 |
),
|
339 |
'group' => '15',
|
340 |
), 'general_masonry_layout' => array(
|
341 |
+
'title' => __( 'Enable', 'rtmedia' ) . ' <a href="http://masonry.desandro.com/" target="_blank">Masonry</a> ' . __( 'Cascading grid layout', 'rtmedia' ),
|
342 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
343 |
'args' => array(
|
344 |
'key' => 'general_masonry_layout',
|
345 |
+
'value' => $options[ 'general_masonry_layout' ],
|
346 |
+
'desc' => __( 'If you enable masonry view, it is advisable to', 'rtmedia' ) . ' <a href="' . $regenerate_link . '">regenerate thumbnail</a> ' . __( 'for masonry view.', 'rtmedia' ),
|
347 |
'class' => array( 'rtm_enable_masonry_view' ),
|
348 |
),
|
349 |
'group' => '18',
|
350 |
+
'after_content' => __( 'You might need to', 'rtmedia' ) . ' <a id="rtm-masonry-change-thumbnail-info" href="' . get_admin_url() . 'admin.php?page=rtmedia-settings#rtmedia-sizes">' . __( 'change thumbnail size', 'rtmedia' ) . '</a> ' . __( 'and uncheck the crop box for thumbnails.', 'rtmedia' ) . '<br /><br />' . __( 'To set gallery for fixed width, set image height to 0 and width as per your requirement and vice-versa.', 'rtmedia' ),
|
351 |
+
),
|
352 |
+
'general_direct_upload' => array(
|
353 |
+
'title' => __( 'Enable Direct Upload', 'rtmedia' ),
|
354 |
+
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
355 |
+
'args' => array(
|
356 |
+
'key' => 'general_direct_upload',
|
357 |
+
'value' => $options[ 'general_direct_upload' ],
|
358 |
+
'desc' => __( 'Uploading media directly as soon as it gets selected.', 'rtmedia' ),
|
359 |
+
),
|
360 |
+
'group' => '19',
|
361 |
),
|
362 |
);
|
363 |
|
373 |
*
|
374 |
* @return void
|
375 |
*/
|
376 |
+
public static function display_content() {
|
377 |
global $rtmedia;
|
378 |
// $options = self::extract_settings('general', $rtmedia->options);
|
379 |
+
$options = $rtmedia->options;
|
380 |
$render_options = self::display_render_options( $options );
|
381 |
// $render_options = apply_filters('rtmedia_general_content_single_view_add_itmes',$render_options, $options);
|
382 |
$render_options = apply_filters( 'rtmedia_display_content_add_itmes', $render_options, $options );
|
384 |
$general_group[10] = __( 'Single Media View', 'rtmedia' );
|
385 |
$general_group[15] = __( 'List Media View', 'rtmedia' );
|
386 |
$general_group[18] = __( 'Masonry View', 'rtmedia' );
|
387 |
+
$general_group[19] = __( 'Direct Upload', 'rtmedia' );
|
388 |
$general_group = apply_filters( 'rtmedia_display_content_groups', $general_group );
|
389 |
ksort( $general_group );
|
390 |
+
self::render_tab_content( $render_options, $general_group, 20 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
}
|
392 |
|
393 |
/**
|
399 |
*
|
400 |
* @return array $render
|
401 |
*/
|
402 |
+
static function render_general_content( $options ) {
|
403 |
$render = array(
|
404 |
+
'general_AllowUserData' => array(
|
405 |
'title' => __( 'Allow usage data tracking', 'rtmedia' ),
|
406 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
407 |
'args' => array(
|
408 |
'key' => 'general_AllowUserData',
|
409 |
+
'value' => $options[ 'general_AllowUserData' ],
|
410 |
'desc' => __( 'To make rtMedia better compatible with your sites, you can help the rtMedia team learn what themes and plugins you are using. No private information about your setup will be sent during tracking.', 'rtmedia' ),
|
411 |
)
|
412 |
),
|
413 |
'general_showAdminMenu' => array(
|
414 |
+
'title' => __( 'Admin bar menu integration', 'rtmedia' ),
|
415 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
416 |
'args' => array(
|
417 |
'key' => 'general_showAdminMenu',
|
418 |
+
'value' => $options[ 'general_showAdminMenu' ],
|
419 |
'desc' => __( 'Add rtMedia menu to WordPress admin bar for easy access to settings and moderation page (if enabled).', 'rtmedia' ),
|
420 |
),
|
421 |
'group' => 10,
|
422 |
), //
|
423 |
+
'rtmedia_add_linkback' => array(
|
424 |
+
'title' => __( 'Add a link to rtMedia in footer', 'rtmedia' ),
|
425 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
426 |
'args' => array(
|
427 |
'key' => 'rtmedia_add_linkback',
|
428 |
+
'value' => $options[ 'rtmedia_add_linkback' ],
|
429 |
'desc' => __( 'Help us promote rtMedia.', 'rtmedia' ),
|
430 |
),
|
431 |
'group' => 100,
|
432 |
), //
|
433 |
+
'rtmedia_affiliate_id' => array(
|
434 |
+
'title' => __( 'Also add my affiliate-id to rtMedia footer link', 'rtmedia' ),
|
435 |
'callback' => array( 'RTMediaFormHandler', 'textbox' ),
|
436 |
'args' => array(
|
437 |
'key' => 'rtmedia_affiliate_id',
|
438 |
+
'value' => $options[ 'rtmedia_affiliate_id' ],
|
439 |
'desc' => __( 'Add your affiliate-id along with footer link and get rewarded by our affiliation program.', 'rtmedia' ),
|
440 |
),
|
441 |
'group' => 100,
|
442 |
+
'depends' => 'rtmedia_add_linkback',
|
443 |
+
'after_content' => __( 'Signup for rtMedia affiliate program <a href="https://rtcamp.com/affiliates">here</a>' ),
|
444 |
), //
|
445 |
+
'rtmedia_enable_api' => array(
|
446 |
+
'title' => __( 'Enable JSON API', 'rtmedia' ),
|
447 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
448 |
'args' => array(
|
449 |
'key' => 'rtmedia_enable_api',
|
450 |
+
'value' => $options[ 'rtmedia_enable_api' ],
|
451 |
'desc' => __( 'This will allow handling API requests for rtMedia sent through any mobile app.', 'rtmedia' ),
|
452 |
),
|
453 |
'group' => 80,
|
467 |
*
|
468 |
* @return void
|
469 |
*/
|
470 |
+
static function general_content( $options ) {
|
471 |
global $rtmedia;
|
472 |
// $options = self::extract_settings('general', $rtmedia->options);
|
473 |
$options = $rtmedia->options;
|
481 |
$general_group = apply_filters( 'rtmedia_general_content_groups', $general_group );
|
482 |
ksort( $general_group );
|
483 |
$html = '';
|
484 |
+
self::render_tab_content( $render_options, $general_group, 90 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
}
|
486 |
|
487 |
/**
|
494 |
*
|
495 |
* @return array $data
|
496 |
*/
|
497 |
+
static function get_type_details( $allowed_types, $key ) {
|
498 |
foreach ( $allowed_types as $type ) {
|
499 |
+
if ( $type[ 'name' ] == $key ) {
|
500 |
$data = array(
|
501 |
+
'name' => $type[ 'label' ],
|
502 |
+
'extn' => $type[ 'extn' ],
|
503 |
);
|
504 |
+
if ( isset( $type[ 'settings_visibility' ] ) ) {
|
505 |
+
$data[ 'settings_visibility' ] = $type[ 'settings_visibility' ];
|
506 |
}
|
507 |
|
508 |
return $data;
|
519 |
*
|
520 |
* @return array $render
|
521 |
*/
|
522 |
+
static function types_render_options( $options ) {
|
523 |
global $rtmedia;
|
524 |
|
525 |
+
$render = array();
|
526 |
$allowed_media_type = $rtmedia->allowed_types;
|
527 |
$allowed_media_type = apply_filters( 'rtmedia_allowed_types', $allowed_media_type );
|
528 |
|
529 |
foreach ( $options as $key => $value ) {
|
530 |
$data = explode( '_', $key );
|
531 |
+
if ( ! isset( $render[ $data[ 1 ] ] ) ) {
|
532 |
+
$render[ $data[ 1 ] ] = self::get_type_details( $allowed_media_type, $data[ 1 ] );
|
533 |
}
|
534 |
}
|
535 |
|
536 |
foreach ( $options as $key => $value ) {
|
537 |
+
$data = explode( '_', $key );
|
538 |
+
$render[ $data[ 1 ] ][ $data[ 2 ] ] = $value;
|
539 |
}
|
540 |
|
541 |
return $render;
|
550 |
*
|
551 |
* @return void
|
552 |
*/
|
553 |
+
public static function types_content() {
|
554 |
global $rtmedia;
|
555 |
$options = self::extract_settings( 'allowedTypes', $rtmedia->options );
|
556 |
|
557 |
$render_data = self::types_render_options( $options );
|
558 |
?>
|
559 |
+
<div class="rtm-option-wrapper">
|
560 |
+
<?php do_action( 'rtmedia_media_type_setting_message' ); ?>
|
561 |
+
|
562 |
+
<h3 class="rtm-option-title">
|
563 |
+
<?php _e( 'Media Types Settings', 'rtmedia' ); ?>
|
564 |
</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
|
566 |
+
<table class="form-table">
|
|
|
567 |
|
568 |
+
<?php do_action( 'rtmedia_type_settings_before_heading' ); ?>
|
|
|
|
|
|
|
569 |
|
570 |
+
<tr>
|
571 |
+
<th><strong><?php _e( 'Media Type', 'rtmedia' ) ?></strong></th>
|
|
|
|
|
|
|
572 |
|
573 |
+
<th>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
574 |
|
575 |
+
<span class="rtm-tooltip bottom">
|
576 |
+
<strong class="rtm-title"><?php _e( 'Allow Upload', 'rtmedia' ); ?></strong>
|
577 |
+
<span class="rtm-tip-top">
|
578 |
+
<?php _e( 'Allows you to upload a particular media type on your post.', 'rtmedia' ); ?>
|
579 |
+
</span>
|
580 |
+
</span>
|
581 |
+
</th>
|
|
|
582 |
|
583 |
+
<th>
|
584 |
+
|
585 |
+
<span class="rtm-tooltip bottom">
|
586 |
+
<strong class="rtm-title"><?php _e( 'Set Featured', 'rtmedia' ); ?></strong>
|
587 |
+
<span class="rtm-tip-top">
|
588 |
+
<?php _e( 'Place a specific media as a featured content on the post.', 'rtmedia' ); ?>
|
589 |
+
</span>
|
590 |
+
</span>
|
591 |
+
</th>
|
592 |
+
|
593 |
+
<?php do_action( 'rtmedia_type_setting_columns_title' ) ?>
|
594 |
+
</tr>
|
595 |
+
|
596 |
+
<?php
|
597 |
+
do_action( 'rtmedia_type_settings_after_heading' );
|
598 |
+
|
599 |
+
foreach ( $render_data as $key => $section ) {
|
600 |
+
if ( isset( $section[ 'settings_visibility' ] ) && true == $section[ 'settings_visibility' ] ) {
|
601 |
+
do_action( 'rtmedia_type_settings_before_body' );
|
602 |
+
|
603 |
+
// allow upload
|
604 |
+
$uplaod_args = array( 'key' => 'allowedTypes_' . $key . '_enabled', 'value' => $section[ 'enabled' ] );
|
605 |
+
$allow_upload_checkbox = self::checkbox( $uplaod_args, $echo = false );
|
606 |
+
$allow_upload_checkbox = apply_filters( 'rtmedia_filter_allow_upload_checkbox', $allow_upload_checkbox, $key, $uplaod_args );
|
607 |
+
|
608 |
+
// allow featured
|
609 |
+
$featured_args = array( 'key' => 'allowedTypes_' . $key . '_featured', 'value' => $section[ 'featured' ] );
|
610 |
+
$featured_checkbox = self::checkbox( $featured_args, $echo = false );
|
611 |
+
$featured_checkbox = apply_filters( 'rtmedia_filter_featured_checkbox', $featured_checkbox, $key );
|
612 |
+
|
613 |
+
if ( ! isset( $section[ 'extn' ] ) || ! is_array( $section[ 'extn' ] ) ) {
|
614 |
+
$section[ 'extn' ] = array();
|
615 |
+
}
|
616 |
+
|
617 |
+
$extensions = implode( ', ', $section[ 'extn' ] );
|
618 |
+
?>
|
619 |
+
|
620 |
+
<tr>
|
621 |
+
<td>
|
622 |
+
<?php
|
623 |
+
echo $section[ 'name' ];
|
624 |
+
|
625 |
+
if ( $key != 'other' ) {
|
626 |
+
?>
|
627 |
+
<span class="rtm-tooltip rtm-extensions">
|
628 |
+
<i class="dashicons dashicons-info rtmicon"></i>
|
629 |
+
<span class="rtm-tip">
|
630 |
+
<strong><?php echo __( 'File Extensions', 'rtmedia' ); ?></strong><br />
|
631 |
+
<hr />
|
632 |
+
<?php echo $extensions; ?>
|
633 |
+
</span>
|
634 |
+
</span>
|
635 |
+
<?php
|
636 |
+
}
|
637 |
+
?>
|
638 |
+
</td>
|
639 |
+
|
640 |
+
<td>
|
641 |
+
<span class="rtm-field-wrap">
|
642 |
+
<?php echo $allow_upload_checkbox; ?></span>
|
643 |
+
</td>
|
644 |
+
|
645 |
+
<td>
|
646 |
+
<?php echo $featured_checkbox; ?>
|
647 |
+
</td>
|
648 |
+
|
649 |
+
<?php do_action( 'rtmedia_type_setting_columns_body', $key, $section ) ?>
|
650 |
+
</tr>
|
651 |
+
|
652 |
+
<?php do_action( 'rtmedia_other_type_settings_textarea', $key ); ?>
|
653 |
+
|
654 |
+
<?php
|
655 |
+
do_action( 'rtmedia_type_settings_after_body', $key, $section );
|
656 |
+
} else {
|
657 |
+
echo '<tr class="hide">';
|
658 |
+
echo '<td colspan="3">';
|
659 |
+
echo "<input type='hidden' value='1' name='rtmedia-options[allowedTypes_" . $key . "_enabled]'>";
|
660 |
+
echo "<input type='hidden' value='0' name='rtmedia-options[allowedTypes_" . $key . "_featured]'>";
|
661 |
+
echo '</td>';
|
662 |
+
echo '</tr>';
|
663 |
+
}
|
664 |
+
}
|
665 |
+
?>
|
666 |
+
</table>
|
667 |
+
</div>
|
668 |
+
<?php
|
669 |
do_action( 'rtmedia_after_bp_settings' );
|
670 |
do_action( 'rtmedia_after_media_types_settings' );
|
671 |
}
|
679 |
*
|
680 |
* @return array $render
|
681 |
*/
|
682 |
+
static function sizes_render_options( $options ) {
|
683 |
$render = array();
|
684 |
foreach ( $options as $key => $value ) {
|
685 |
$data = explode( '_', $key );
|
686 |
+
if ( ! isset( $render[ $data[ 1 ] ] ) ) {
|
687 |
+
$render[ $data[ 1 ] ] = array();
|
688 |
+
$render[ $data[ 1 ] ][ 'title' ] = __( $data[ 1 ], 'rtmedia' );
|
689 |
}
|
690 |
+
if ( ! isset( $render[ $data[ 1 ] ][ $data[ 2 ] ] ) ) {
|
691 |
+
$render[ $data[ 1 ] ][ $data[ 2 ] ] = array();
|
692 |
+
$render[ $data[ 1 ] ][ $data[ 2 ] ][ 'title' ] = __( $data[ 2 ], 'rtmedia' );
|
693 |
}
|
694 |
|
695 |
+
$render[ $data[ 1 ] ][ $data[ 2 ] ][ $data[ 3 ] ] = $value;
|
696 |
}
|
697 |
|
698 |
return $render;
|
707 |
*
|
708 |
* @return void
|
709 |
*/
|
710 |
+
public static function sizes_content() {
|
711 |
global $rtmedia;
|
712 |
+
$options = self::extract_settings( 'defaultSizes', $rtmedia->options );
|
713 |
$render_data = self::sizes_render_options( $options );
|
714 |
?>
|
715 |
+
|
716 |
+
<div class="rtm-option-wrapper rtm-img-size-setting">
|
717 |
+
<h3 class="rtm-option-title">
|
718 |
+
<?php _e( 'Media Size Settings', 'rtmedia' ); ?>
|
719 |
</h3>
|
720 |
+
|
721 |
+
<table class="form-table">
|
722 |
+
<tr>
|
723 |
+
<th><strong><?php _e( 'Category', 'rtmedia' ) ?></strong></th>
|
724 |
+
<th><strong><?php _e( 'Entity', 'rtmedia' ); ?></strong></th>
|
725 |
+
<th><strong><?php _e( 'Width', 'rtmedia' ); ?></strong></th>
|
726 |
+
<th><strong><?php _e( 'Height', 'rtmedia' ); ?></strong></th>
|
727 |
+
<th><strong><?php _e( 'Crop', 'rtmedia' ); ?></strong></th>
|
728 |
+
</tr>
|
729 |
+
|
730 |
+
<?php
|
731 |
+
foreach ( $render_data as $parent_key => $section ) {
|
732 |
+
$entities = $section;
|
733 |
+
unset( $entities[ 'title' ] );
|
734 |
+
$count = 0;
|
735 |
+
$row_span = sizeof( $entities );
|
736 |
+
foreach ( $entities as $entity ) {
|
737 |
+
?>
|
738 |
+
<tr>
|
739 |
+
<?php
|
740 |
+
if ( $count == 0 ) {
|
741 |
+
?>
|
742 |
+
<td class="rtm-row-title" rowspan="<?php echo $row_span; ?>">
|
743 |
+
<?php echo ucfirst( $section[ 'title' ] ); ?>
|
744 |
+
</td>
|
745 |
+
<?php
|
746 |
+
}
|
747 |
+
?>
|
748 |
+
<td>
|
749 |
+
<?php echo ucfirst( $entity[ 'title' ] ); ?>
|
750 |
+
</td>
|
751 |
+
<?php
|
752 |
+
$args = array(
|
753 |
+
'key' => 'defaultSizes_' . $parent_key . '_' . $entity[ 'title' ],
|
754 |
+
);
|
755 |
+
foreach ( $entity as $child_key => $value ) {
|
756 |
+
if ( 'title' != $child_key ) {
|
757 |
+
$args[ $child_key ] = $value;
|
758 |
+
}
|
759 |
+
}
|
760 |
+
self::dimensions( $args );
|
761 |
+
?>
|
762 |
+
</tr>
|
763 |
+
<?php
|
764 |
+
$count ++;
|
765 |
}
|
766 |
}
|
767 |
+
?>
|
768 |
+
</table>
|
769 |
+
|
770 |
+
</div>
|
|
|
771 |
|
772 |
+
<?php
|
773 |
$options = $rtmedia->options;
|
774 |
|
775 |
+
// Checking if user has subscribed any plan for encoding
|
776 |
+
$rtmedia_encoding_api_key = get_rtmedia_encoding_api_key();
|
777 |
+
|
778 |
+
if ( isset( $rtmedia_encoding_api_key ) && $rtmedia_encoding_api_key != '' && $rtmedia_encoding_api_key ) {
|
779 |
+
$render_video_thumb = array(
|
780 |
+
'title' => __( 'Number of thumbnails to generate on video upload', 'rtmedia' ),
|
781 |
+
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
782 |
+
'args' => array(
|
783 |
+
'key' => 'general_videothumbs',
|
784 |
+
'value' => $options[ 'general_videothumbs' ],
|
785 |
+
'class' => array( 'rtmedia-setting-text-box' ),
|
786 |
+
'desc' => __( ' If you choose more than 1 thumbnail, your users will be able to change the thumbnail by going to video \'edit\' section. Maximum value is 10.', 'rtmedia' ),
|
787 |
+
'min' => 1,
|
788 |
+
'max' => 10,
|
789 |
+
)
|
790 |
+
);
|
791 |
+
?>
|
792 |
+
|
793 |
+
<div class="rtm-option-wrapper">
|
794 |
+
<?php self::render_option_group( __( 'Encoding Settings', 'rtmedia' ) ); ?>
|
795 |
+
<?php self::render_option_content( $render_video_thumb ); ?>
|
796 |
+
</div>
|
797 |
+
<?php
|
798 |
+
}
|
799 |
+
|
800 |
+
$render_jpeg_image_quality = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
801 |
'title' => __( 'JPEG/JPG image quality (1-100)', 'rtmedia' ),
|
802 |
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
803 |
'args' => array(
|
804 |
'key' => 'general_jpeg_image_quality',
|
805 |
+
'value' => $options[ 'general_jpeg_image_quality' ],
|
806 |
'class' => array( 'rtmedia-setting-text-box' ),
|
807 |
'desc' => __( 'Enter JPEG/JPG Image Quality. Minimum value is 1. 100 is original quality.', 'rtmedia' ),
|
808 |
'min' => 1,
|
809 |
'max' => 100,
|
810 |
)
|
811 |
);
|
812 |
+
?>
|
813 |
+
|
814 |
+
<div class="rtm-option-wrapper">
|
815 |
+
<?php self::render_option_group( __( 'Image Quality', 'rtmedia' ) ); ?>
|
816 |
+
<?php self::render_option_content( $render_jpeg_image_quality ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
</div>
|
818 |
+
|
819 |
+
<?php
|
820 |
}
|
821 |
|
822 |
/**
|
828 |
*
|
829 |
* @return void
|
830 |
*/
|
831 |
+
public static function custom_css_content() {
|
832 |
global $rtmedia;
|
833 |
+
$options = self::extract_settings( 'styles', $rtmedia->options );
|
834 |
$render_data = self::custom_css_render_options( $options );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
835 |
|
836 |
+
$render_groups = array();
|
837 |
+
$render_groups[ 10 ] = __( 'Custom CSS settings', 'rtmedia' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
838 |
|
839 |
+
self::render_tab_content( $render_data, $render_groups, 10 );
|
840 |
}
|
841 |
|
842 |
/**
|
848 |
*
|
849 |
* @return array $render
|
850 |
*/
|
851 |
+
static function custom_css_render_options( $options ) {
|
852 |
global $rtmedia;
|
853 |
|
854 |
$render = array(
|
855 |
+
'disable_styles' => array(
|
856 |
'title' => __( 'rtMedia default styles', 'rtmedia' ),
|
857 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
858 |
'args' => array(
|
859 |
'id' => 'rtmedia-disable-styles',
|
860 |
'key' => 'styles_enabled',
|
861 |
+
'value' => $options[ 'styles_enabled' ],
|
862 |
'desc' => __( 'Load default rtMedia styles. You need to write your own style for rtMedia if you disable it.', 'rtmedia' ),
|
863 |
+
),
|
864 |
+
'group' => 10,
|
865 |
),
|
866 |
'custom_styles' => array(
|
867 |
'title' => __( 'Paste your CSS code', 'rtmedia' ),
|
869 |
'args' => array(
|
870 |
'id' => 'rtmedia-custom-css',
|
871 |
'key' => 'styles_custom',
|
872 |
+
'value' => stripcslashes( $options[ 'styles_custom' ] ),
|
873 |
'desc' => __( 'Custom rtMedia CSS container', 'rtmedia' ),
|
874 |
+
),
|
875 |
+
'group' => 10,
|
876 |
+
),
|
877 |
);
|
878 |
|
879 |
return $render;
|
888 |
*
|
889 |
* @return array $render
|
890 |
*/
|
891 |
+
static function privacy_render_options( $options ) {
|
892 |
global $rtmedia;
|
893 |
|
894 |
$render = array(
|
895 |
+
'enable' => array(
|
896 |
'title' => __( 'Enable privacy', 'rtmedia' ),
|
897 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
898 |
'args' => array(
|
899 |
'id' => 'rtmedia-privacy-enable',
|
900 |
'key' => 'privacy_enabled',
|
901 |
+
'value' => $options[ 'privacy_enabled' ],
|
902 |
'desc' => __( 'Enable privacy in rtMedia', 'rtmedia' ),
|
903 |
+
),
|
904 |
+
'group' => 10,
|
905 |
),
|
906 |
+
'default' => array(
|
907 |
'title' => __( 'Default privacy', 'rtmedia' ),
|
908 |
'callback' => array( 'RTMediaFormHandler', 'radio' ),
|
909 |
'args' => array(
|
910 |
'key' => 'privacy_default',
|
911 |
+
'radios' => $rtmedia->privacy_settings[ 'levels' ],
|
912 |
+
'default' => $options[ 'privacy_default' ],
|
913 |
'desc' => __( 'Set default privacy for media', 'rtmedia' ),
|
914 |
),
|
915 |
+
'group' => 10,
|
916 |
+
'depends' => 'privacy_enabled'
|
917 |
),
|
918 |
'user_override' => array(
|
919 |
+
'title' => __( 'Allow users to set privacy for their content', 'rtmedia' ),
|
920 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
921 |
'args' => array(
|
922 |
'key' => 'privacy_userOverride',
|
923 |
+
'value' => $options[ 'privacy_userOverride' ],
|
924 |
'desc' => __( 'If you choose this, users will be able to change privacy of their own uploads.', 'rtmedia' ),
|
925 |
),
|
926 |
+
'group' => 10,
|
927 |
+
'depends' => 'privacy_enabled',
|
928 |
'after_content' => __( 'For group uploads, BuddyPress groups privacy is used.', 'rtmedia' ),
|
929 |
),
|
930 |
);
|
941 |
*
|
942 |
* @return void
|
943 |
*/
|
944 |
+
public static function privacy_content() {
|
945 |
global $rtmedia;
|
|
|
946 |
|
947 |
+
$general_group = array();
|
948 |
+
$general_group[ 10 ] = 'Privacy Settings';
|
949 |
+
$general_group = apply_filters( 'rtmedia_privacy_settings_groups', $general_group );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
950 |
|
951 |
+
$options = self::extract_settings( 'privacy', $rtmedia->options );
|
952 |
+
$render_options = self::privacy_render_options( $options );
|
953 |
+
$render_options = apply_filters( 'rtmedia_privacy_settings_options', $render_options );
|
954 |
+
|
955 |
+
self::render_tab_content( $render_options, $general_group, 10 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
956 |
}
|
957 |
|
958 |
/**
|
964 |
*
|
965 |
* @return array $render
|
966 |
*/
|
967 |
+
static function buddypress_render_options( $options ) {
|
968 |
$render = array(
|
969 |
+
'rtmedia-enable-on-profile' => array(
|
970 |
'title' => __( 'Enable media in profile', 'rtmedia' ),
|
971 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
972 |
'args' => array(
|
973 |
'key' => 'buddypress_enableOnProfile',
|
974 |
+
'value' => $options[ 'buddypress_enableOnProfile' ],
|
975 |
'desc' => __( 'Enable Media on BuddyPress Profile', 'rtmedia' ),
|
976 |
),
|
977 |
+
'group' => 10,
|
978 |
),
|
979 |
+
'rtmedia-enable-on-group' => array(
|
980 |
'title' => __( 'Enable media in group', 'rtmedia' ),
|
981 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
982 |
'args' => array(
|
983 |
'key' => 'buddypress_enableOnGroup',
|
984 |
+
'value' => $options[ 'buddypress_enableOnGroup' ],
|
985 |
'desc' => __( 'Enable Media on BuddyPress Groups', 'rtmedia' ),
|
986 |
),
|
987 |
+
'group' => 10,
|
988 |
),
|
989 |
+
'rtmedia-enable-on-activity' => array(
|
990 |
'title' => __( 'Allow upload from activity stream', 'rtmedia' ),
|
991 |
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
992 |
'args' => array(
|
993 |
'key' => 'buddypress_enableOnActivity',
|
994 |
+
'value' => $options[ 'buddypress_enableOnActivity' ],
|
995 |
'desc' => __( 'Allow upload using status update box present on activity stream page', 'rtmedia' ),
|
996 |
'id' => 'rtmedia-bp-enable-activity',
|
997 |
),
|
998 |
+
'group' => 10,
|
999 |
),
|
1000 |
'rtmedia-activity-feed-limit' => array(
|
1001 |
'title' => __( 'Number of media items to show in activity stream', 'rtmedia' ),
|
1002 |
'callback' => array( 'RTMediaFormHandler', 'number' ),
|
1003 |
'args' => array(
|
1004 |
'key' => 'buddypress_limitOnActivity',
|
1005 |
+
'value' => $options[ 'buddypress_limitOnActivity' ],
|
1006 |
'desc' => __( 'With bulk uploads activity, the stream may get flooded. You can control the maximum number of media items or files per activity. This limit will not affect the actual number of uploads. This is only for display. <em>0</em> means unlimited.', 'rtmedia' ),
|
1007 |
'class' => array( 'rtmedia-setting-text-box rtmedia-bp-activity-setting' ),
|
1008 |
'min' => 0,
|
1009 |
),
|
1010 |
+
'group' => 10,
|
1011 |
+
),
|
1012 |
+
'general_enableAlbums' => array(
|
1013 |
+
'title' => __( 'Organize media into albums', 'rtmedia' ),
|
1014 |
+
'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
|
1015 |
+
'args' => array(
|
1016 |
+
'id' => 'rtmedia-album-enable',
|
1017 |
+
'key' => 'general_enableAlbums',
|
1018 |
+
'value' => $options[ 'general_enableAlbums' ],
|
1019 |
+
'desc' => __( 'This will add \'album\' tab to BuddyPress profile and group depending on the ^above^ settings.', 'rtmedia' ),
|
1020 |
+
),
|
1021 |
+
'group' => 50,
|
1022 |
),
|
1023 |
);
|
1024 |
|
1037 |
public static function buddypress_content() {
|
1038 |
global $rtmedia;
|
1039 |
|
1040 |
+
$general_group = array();
|
1041 |
+
$general_group[ 10 ] = 'Integration With BuddyPress Features';
|
1042 |
+
$general_group[ 50 ] = 'Album Settings';
|
1043 |
+
$general_group = apply_filters( 'rtmedia_buddypress_setting_group', $general_group );
|
1044 |
+
|
1045 |
+
$render_options = self::buddypress_render_options( $rtmedia->options );
|
1046 |
+
$render_options = apply_filters( 'rtmedia_album_control_setting', $render_options, $rtmedia->options );
|
1047 |
+
|
1048 |
+
$render_options = apply_filters( 'rtmedia_buddypress_setting_options', $render_options );
|
1049 |
+
|
1050 |
+
self::render_tab_content( $render_options, $general_group, 10 );
|
1051 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1052 |
do_action( 'rtmedia_buddypress_setting_content' );
|
1053 |
}
|
1054 |
|
1062 |
*
|
1063 |
* @return void
|
1064 |
*/
|
1065 |
+
public static function rtForm_settings_tabs_content( $page, $sub_tabs ) {
|
1066 |
+
$args = array(
|
1067 |
+
'wrapper_class' => array(
|
1068 |
+
'rtm-settings-tab-container',
|
1069 |
+
),
|
1070 |
+
);
|
1071 |
+
RTMediaAdmin::render_admin_ui( $page, $sub_tabs, $args );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1072 |
}
|
1073 |
|
1074 |
/**
|
1081 |
*
|
1082 |
* @return void
|
1083 |
*/
|
1084 |
+
public static function rtForm_do_settings_fields( $page, $section ) {
|
1085 |
global $wp_settings_fields;
|
1086 |
|
1087 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section ] ) ) {
|
1088 |
return;
|
1089 |
}
|
1090 |
|
1091 |
+
foreach ( ( array ) $wp_settings_fields[ $page ][ $section ] as $field ) {
|
1092 |
echo '<div class="row">';
|
1093 |
echo '<div class="large-11 columns">';
|
1094 |
|
1095 |
+
if ( isset( $field[ 'args' ][ 'label_for' ] ) && ! empty( $field[ 'args' ][ 'label_for' ] ) ) {
|
1096 |
+
call_user_func( $field[ 'callback' ], array_merge( $field[ 'args' ], array( 'label' => $field[ 'args' ][ 'label_for' ] ) ) );
|
1097 |
} else {
|
1098 |
+
if ( isset( $field[ 'title' ] ) && ! empty( $field[ 'title' ] ) ) {
|
1099 |
+
call_user_func( $field[ 'callback' ], array_merge( $field[ 'args' ], array( 'label' => $field[ 'title' ] ) ) );
|
1100 |
} else {
|
1101 |
+
call_user_func( $field[ 'callback' ], $field[ 'args' ] );
|
1102 |
}
|
1103 |
}
|
1104 |
echo '</div>';
|
1105 |
echo '</div>';
|
1106 |
}
|
1107 |
}
|
1108 |
+
|
1109 |
+
/*
|
1110 |
+
* render each tab content
|
1111 |
+
*
|
1112 |
+
* @param array $option
|
1113 |
+
* @param array $groups
|
1114 |
+
* @param int $default_group
|
1115 |
+
*/
|
1116 |
+
|
1117 |
+
public static function render_tab_content( $options, $groups = array(), $default_group = 0 ) {
|
1118 |
+
if ( ! empty( $groups ) ) {
|
1119 |
+
foreach ( $groups as $key => $value ) {
|
1120 |
+
?>
|
1121 |
+
<div class="rtm-option-wrapper">
|
1122 |
+
<?php
|
1123 |
+
self::render_option_group( $value );
|
1124 |
+
foreach ( $options as $tab => $option ) {
|
1125 |
+
|
1126 |
+
if ( ! isset( $option[ 'group' ] ) ) {
|
1127 |
+
$option[ 'group' ] = $default_group;
|
1128 |
+
}
|
1129 |
+
|
1130 |
+
if ( $option[ 'group' ] != $key ) {
|
1131 |
+
continue;
|
1132 |
+
}
|
1133 |
+
self::render_option_content( $option );
|
1134 |
+
}
|
1135 |
+
?>
|
1136 |
+
</div>
|
1137 |
+
<?php
|
1138 |
+
}
|
1139 |
+
} else {
|
1140 |
+
?>
|
1141 |
+
<div class="rtm-option-wrapper">
|
1142 |
+
<?php
|
1143 |
+
foreach ( $options as $tab => $option ) {
|
1144 |
+
self::render_option_content( $option );
|
1145 |
+
}
|
1146 |
+
?>
|
1147 |
+
</div>
|
1148 |
+
<?php
|
1149 |
+
}
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
/*
|
1153 |
+
* render option group title inside single tab
|
1154 |
+
*
|
1155 |
+
* @param string $group
|
1156 |
+
*/
|
1157 |
+
|
1158 |
+
public static function render_option_group( $group ) {
|
1159 |
+
?>
|
1160 |
+
<h3 class="rtm-option-title"><?php echo $group; ?></h3>
|
1161 |
+
<?php
|
1162 |
+
}
|
1163 |
+
|
1164 |
+
/*
|
1165 |
+
* render options
|
1166 |
+
* @param array $option
|
1167 |
+
*/
|
1168 |
+
|
1169 |
+
public static function render_option_content( $option ) {
|
1170 |
+
?>
|
1171 |
+
|
1172 |
+
<table class="form-table" <?php
|
1173 |
+
if ( isset( $option[ 'depends' ] ) && $option[ 'depends' ] != '' ) {
|
1174 |
+
echo 'data-depends="' . $option[ 'depends' ] . '"';
|
1175 |
+
}
|
1176 |
+
?>>
|
1177 |
+
<tr>
|
1178 |
+
<th>
|
1179 |
+
<?php echo $option[ 'title' ]; ?>
|
1180 |
+
<?php if ( isset( $option[ 'after_content' ] ) ) { ?>
|
1181 |
+
<?php } ?>
|
1182 |
+
</th>
|
1183 |
+
<td>
|
1184 |
+
<fieldset>
|
1185 |
+
<span class="rtm-field-wrap"><?php call_user_func( $option[ 'callback' ], $option[ 'args' ] ); ?></span>
|
1186 |
+
<span class="rtm-tooltip">
|
1187 |
+
<i class="dashicons dashicons-info rtmicon"></i>
|
1188 |
+
<span class="rtm-tip">
|
1189 |
+
<?php echo ( isset( $option[ 'args' ][ 'desc' ] ) ) ? $option[ 'args' ][ 'desc' ] : 'NA'; ?>
|
1190 |
+
</span>
|
1191 |
+
</span>
|
1192 |
+
</fieldset>
|
1193 |
+
</td>
|
1194 |
+
</tr>
|
1195 |
+
</table>
|
1196 |
+
|
1197 |
+
<?php
|
1198 |
+
if ( isset( $option[ 'after_content' ] ) && $option[ 'after_content' ] != '' ) {
|
1199 |
+
?>
|
1200 |
+
<div class="rtm-message rtm-notice"><?php echo wpautop( $option[ 'after_content' ] ); ?></div><?php
|
1201 |
+
}
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
}
|
app/assets/admin/css/admin-css-migration.md
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Added: grunt environment
|
2 |
+
|
3 |
+
# Removed: Foundation framework
|
4 |
+
|
5 |
+
# Removed: Unused image files.
|
6 |
+
|
7 |
+
# Removed: Unused CSS and JS files.
|
8 |
+
|
9 |
+
# Changed: CSS file structure
|
app/assets/admin/css/admin.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.alignleft{float:left}.alignright{float:right}.aligncenter{display:block;margin-left:auto;margin-right:auto;text-align:center}.clear-both{clear:both}.clear-none{clear:none}.clear-left{clear:left}.clear-right{clear:right}.rtm-inline-block{display:inline-block}.rtm-text-left{text-align:left}.rtm-text-right{text-align:right}.rtm-text-center{text-align:center}.rtm-border-0{border:0 !important}.hide{display:none}.clearfix:after{content:"";display:table;clear:both}.rtm-row-container{padding-top:10px}.rtm-admin-tab-container{display:table;width:100%}.rtm-admin-tab-container .rtm-tabs-content{background:#fff;border-left:1px solid #e7e7e7;display:table-cell;min-height:300px;padding:20px 30px;vertical-align:top}.rtm-setting-container{background-color:#f5f5f5;border:1px solid #dedede;-moz-box-shadow:0 1px 1px rgba(0,0,0,0.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);margin-top:10px}.rtm-sidebar .postbox .hndle{cursor:default}.rtm-tabs{display:table-cell;list-style:none;margin:0;min-height:300px;width:202px}.rtm-button-container{background:#f3f3f3;border-bottom:1px solid #dedede;box-shadow:0 1px 0 #fcfcfc inset;overflow:hidden;padding:6px 10px 6px 6px;position:relative;text-align:right}.rtm-button-container.bottom{background:#eee;border-top:1px solid #e7e7e7;box-shadow:0 0 0;z-index:999}#mce-EMAIL{width:100%}#mc-embedded-subscribe{display:block;margin:10px auto 0;width:100%}.rtm-social-links a{display:inline-block;margin:4px 0 4px 4px;text-decoration:none}.nav-tab.rtm-premium{background:#e74c3c;color:white;letter-spacing:0.5px}.rtm-setting-title{border-bottom:1px solid #eee;font-size:22px;font-weight:400;line-height:1;margin-bottom:20px;margin-top:0;padding-bottom:14px;display:none}.rtm-setting-title.rtm-show{display:block}.rtm-option-wrapper{margin-bottom:40px;margin-top:40px}.rtm-option-wrapper:last-child{margin-bottom:20px}.rtm-setting-title+.rtm-option-wrapper{margin-top:0}.rtm-option-wrapper:last-child{border-bottom:0}.rtm-option-wrapper .form-table{clear:none}.rtm-option-wrapper .rtm-field-wrap{float:left}.rtm-option-wrapper a{text-decoration:none}.rtm-option-wrapper .form-table th{color:#444;font-size:13px;font-weight:400;padding:5px 30px 5px 0;vertical-align:top;width:48%}.rtm-option-wrapper .form-table td{font-size:13px;padding:0 0 5px;vertical-align:top}.rtm-option-wrapper .form-table td fieldset label{display:block;margin:0 !important}.rtm-option-wrapper .form-table .rtm-form-radio label{margin-top:5px !important}.rtm-option-wrapper textarea,.rtm-option-wrapper select,.rtm-option-wrapper input[type=text],.rtm-option-wrapper input[type=number]{border-radius:3px}.rtm-option-wrapper input[type=number]{width:60px}.rtm-option-wrapper .rt-form-radio{height:28px;line-height:24px}.rtm-option-wrapper .rt-form-radio label:first-child{margin-right:12px !important}.rtm-option-wrapper .dashicons-info{color:#aaa;font-size:14px;height:26px;line-height:26px;position:relative}.rtm-option-wrapper .rtm-debug-info{margin-top:32px}.rtm-option-wrapper .rtm-debug-info tr{border-bottom:1px solid #eee}.rtm-option-wrapper .rtm-debug-info tr:first-child{border-top:1px solid #eee}.rtm-option-wrapper .rtm-debug-info tr:nth-child(2n){background-color:#f8f8f8}.rtm-option-wrapper .rtm-debug-info th{border-right:1px solid #eee;font-weight:600;width:auto}.rtm-option-wrapper .rtm-debug-info th,.rtm-option-wrapper .rtm-debug-info td{padding:10px}.rtm-option-title{border-bottom:1px solid #eee;font-size:14px;letter-spacing:0.02rem;margin-bottom:12px;margin-top:0;padding:0 0 6px;text-transform:uppercase}.rtm-sidebar .button{display:block;opacity:0.8;position:relative;text-decoration:none}.rtm-social-share .dashicons{font-size:18px;position:absolute;right:10px;top:4px}.rtm-social-share .twitter .dashicons{color:#45b0e3}.rtm-social-share .facebook .dashicons{color:#3b5998}.rtm-social-share .wordpress .dashicons{color:#21759b}.rtm-social-share .rss .dashicons{color:#FF6600}.rtm-social-share p:last-child{margin-bottom:0}.rtm-notice{background:rgba(238,238,238,0.8);color:#777;font-size:12px;line-height:1.6;margin-top:10px;overflow:hidden;padding:0 10px}.rtm-notice p{font-size:inherit;line-height:inherit;margin:10px 0}.rtm-warning{background-color:#fcf8e3;border-bottom:1px solid #EEE;color:#c09853;padding:10px 15px}.rtmedia-theme-warning{margin-bottom:26px}.rtm-success{background-color:#dff0d8;border-bottom:1px solid #e7e7e7;color:#468847;margin:0;padding:8px 35px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.rtm-fly-warning{border-bottom:0;left:-10px;letter-spacing:1px;line-height:22px;margin-bottom:0;padding:14px 25px;position:absolute;top:-5px}#rtmedia-types .form-table th{line-height:26px;padding:5px 0 20px;width:33%}#rtmedia-types .form-table td{padding:0 0 12px}#rtmedia-custom-css-settings .form-table th{width:35%}#rtmedia-custom-css-settings .form-table:last-child .rtm-field-wrap{width:92%}#rtmedia-custom-css-settings textarea{height:300px;width:100%}.rtm-img-size-setting .form-table th{border-bottom:1px solid #eee;padding-bottom:10px;padding-top:10px;width:20%}.rtm-img-size-setting .form-table tr:nth-child(2) td{padding-top:20px}.rtm-img-size-setting .form-table tr:nth-child(4){border-bottom:1px solid #eee}.rtm-img-size-setting .form-table tr:nth-child(4) td{padding-bottom:20px}.rtm-img-size-setting .form-table tr:nth-child(5) td{padding-top:20px}.rtm-img-size-setting .form-table tr:nth-child(6) td{padding-bottom:20px}.rtm-img-size-setting .form-table tr:nth-child(7){border-top:1px solid #eee}.rtm-img-size-setting .form-table tr:nth-child(7) td{padding-top:20px}.rtm-img-size-setting .form-table tr:nth-last-child(2) td{padding-bottom:20px}.rtm-img-size-setting .form-table tr:last-child{border-top:1px solid #eee}.rtm-img-size-setting .form-table tr:last-child td{padding-top:20px;padding-bottom:20px}.rtm-img-size-setting .form-table .rtm-row-title{font-weight:600}#rtmedia-privacy .rt-form-radio{font-size:12px}#rtmedia-privacy .rt-form-radio strong{font-size:13px}#rtmedia-encoding-usage strong{display:inline-block;min-width:120px}#rtmedia-encoding-usage p{overflow:hidden}.encoding-used,.encoding-remaining{background:#7AD03A;float:right;height:12px;margin-top:3px;width:12px}.encoding-remaining{background:#dedede}#rtprogressbar{background:#dedede;height:10px;position:relative}#rtprogressbar div{background:#7AD03A;height:10px;left:0;position:absolute}.rtm-tabs li{margin:0}.rtm-tabs a{border-bottom:1px solid #e7e7e7;border-top:1px solid #f2f2f2;color:#222;display:block;font-weight:700;outline:none;opacity:0.8;padding:10px 4px 10px 14px;position:relative;text-decoration:none;z-index:10}.rtm-tabs a:hover{background:#eee;color:#269ad6;margin-right:0;opacity:1;width:auto}.rtm-tabs a:focus{background:#fff;box-shadow:0 0 0}.rtm-tabs .active{background:white;position:relative}.rtm-tabs .active:after{background:#fff;content:' ';height:100%;position:absolute;right:-1px;top:0;width:1px}.rtm-tabs .active a{border-top-color:#fff;color:#222;opacity:1}.rtm-tabs .active a:hover{background:#fff}.rtm-tabs span{display:block;padding:0 0 0 25px}.rtm-tabs .dashicons{font-size:14px;height:auto;line-height:1;margin-top:3px;position:absolute;vertical-align:middle;width:auto}.switch{position:relative;display:inline-block;vertical-align:top;width:58px;height:22px;padding:3px;border-radius:18px}.switch input[type=checkbox]{position:absolute;top:0;left:0;opacity:0}.switch-label{position:relative;display:block;height:inherit;color:#fff;font-size:12px;text-transform:uppercase;background:#b4b4b4;border-radius:inherit;-moz-transition:ease-out 0.15s;-o-transition:ease-out 0.15s;-webkit-transition:ease-out 0.15s;transition:ease-out 0.15s;-moz-transition-property:opacity,background;-o-transition-property:opacity,background;-webkit-transition-property:opacity,background;transition-property:opacity background}.switch-label:before,.switch-label:after{position:absolute;top:50%;margin-top:-.5em;line-height:1;-moz-transition:inherit;-o-transition:inherit;-webkit-transition:inherit;transition:inherit}.switch-label:before{content:attr(data-off);right:11px;color:#fff}.switch-label:after{content:attr(data-on);left:11px;opacity:0}input[type=checkbox]:checked ~ .switch-label{background:#33a7d1}input[type=checkbox]:checked ~ .switch-label:before{opacity:0}input[type=checkbox]:checked ~ .switch-label:after{opacity:1}.switch-handle{position:absolute;top:5px;left:5px;width:18px;height:18px;background:white;border-radius:10px;box-shadow:1px 1px 5px rgba(0,0,0,0.2);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSI0MCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmMGYwZjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=');background-size:100%;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(40%, #ffffff),color-stop(100%, #f0f0f0));background-image:-moz-linear-gradient(top, #ffffff 40%,#f0f0f0);background-image:-webkit-linear-gradient(top, #ffffff 40%,#f0f0f0);background-image:linear-gradient(to bottom, #ffffff 40%,#f0f0f0);-moz-transition:left 0.15s ease-out;-o-transition:left 0.15s ease-out;-webkit-transition:left 0.15s ease-out;transition:left 0.15s ease-out}.switch-handle:before{content:'';position:absolute;top:50%;left:50%;margin:-6px 0 0 -6px;width:12px;height:12px;background:#f9f9f9;border-radius:6px;box-shadow:inset 0 1px rgba(0,0,0,0.02);background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2VlZWVlZSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eeeeee),color-stop(100%, #ffffff));background-image:-moz-linear-gradient(top, #eeeeee,#ffffff);background-image:-webkit-linear-gradient(top, #eeeeee,#ffffff);background-image:linear-gradient(to bottom, #eeeeee,#ffffff)}input[type=checkbox]:checked ~ .switch-handle{left:41px;box-shadow:-1px 1px 5px rgba(0,0,0,0.2)}.rtm-tooltip{display:inline-block;margin-left:3px;position:relative}.rtm-tooltip:hover .rtm-tip-top,.rtm-tooltip:hover .rtm-tip{margin-left:0;opacity:1;visibility:visible}.rtm-tooltip .rtm-title{border-bottom:1px dotted;padding-bottom:2px}.rtm-tip-top,.rtm-tip{background:#fffAF0;border:1px solid #f5deaf;border-radius:3px;font-size:12px;left:24px;margin-top:-4px;margin-left:-10px;line-height:1.5;opacity:0;padding:6px 12px;position:absolute;top:0;visibility:hidden;width:210px;z-index:10;-moz-transition:all 0.4s ease-in-out;-o-transition:all 0.4s ease-in-out;-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}.rtm-tip-top{bottom:26px;left:auto;right:-66px;top:auto;width:200px}.rtm-tip-top:after,.rtm-tip-top:before{right:auto;top:100%;left:50%;border:solid transparent;content:' ';height:0;width:0;position:absolute;pointer-events:none}.rtm-tip-top:after{border-color:rgba(255,250,240,0);border-top-color:#fffAF0;border-width:6px;margin-left:-6px}.rtm-tip-top:before{border-color:rgba(245,222,175,0);border-top-color:#f5deaf;border-width:8px;margin-left:-8px}.rtm-extensions .dashicons{font-size:12px;margin-left:-4px;position:relative;top:-3px}.rtm-extensions.rtm-set-top .dashicons{top:1px}.rtm-plugin-card.plugin-card{clear:none;float:none;margin:0 0 20px;overflow:hidden;width:100%}.rtm-plugin-card.plugin-card .rtm-logo{float:left;margin-right:10px;max-width:200px;width:auto}.rtm-plugin-card.plugin-card .rtm-logo img{height:auto;margin:-10px 0 0 -10px;max-width:100%}.rtm-plugin-card.plugin-card .desc,.rtm-plugin-card.plugin-card .name{margin-left:0;margin-right:0;overflow:hidden}.rtm-plugin-card.plugin-card h4{margin-bottom:0}.rtm-plugin-card.plugin-card a{text-decoration:none}.rtm-plugin-card.plugin-card .rtm-live-demo{margin-right:10px}.rtm-plugin-card.plugin-card .price{color:#269ad6;font-size:22px;line-height:1.2}#rtm-plugins .rtm-option-title{margin-top:50px}#rtm-plugins .rtm-setting-title+.rtm-option-title{margin-top:0}.rtm-encoding-table{border-collapse:collapse;clear:none}.rtm-encoding-table th,.rtm-encoding-table td{border:1px solid #e7e7e7}.rtm-encoding-table th{font-size:13px;font-weight:600}.rtm-theme-browser .rtm-themes{clear:none;padding:0}.rtm-theme-browser .rtm-themes .rtm-theme{width:48%}.rtm-theme-browser .rtm-themes .rtm-theme:nth-child(even){margin-right:0 !important}.rtm-theme-browser .rtm-themes .rtm-theme:nth-child(3n){margin-right:4%}.admin-bar .theme-overlay .theme-wrap{z-index:99999}.rtm-support-container{min-height:300px}.rtm-support-form .rtm-form-filed{clear:both;margin:15px 0}.rtm-support-form label{float:left;width:15%}.rtm-support-form .bp-media-textarea{height:80px}.rtm-button-wrapper{padding-left:15%}.rtm-page-container{background:#fff;overflow:hidden;padding:20px}.rtm-pro-feature-list li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;float:left;padding:0 10px 20px;width:33%}.rtm-pro-feature-list .rtm-icon-wrap{float:left;margin-top:15px;width:30px}.rtm-pro-feature-list .dashicons{font-size:18px}.rtm-pro-feature-list .rtm-title{font-size:18px;margin-left:30px;margin-top:0px}.rtm-pro-feature-list .rtm-content{font-size:14px;line-height:25px;margin-left:30px;color:#8a8a8a;width:auto}.rtm-update-to-pro{text-align:center}.rtm-button{background-color:#269ad6;border:0;border-radius:3px;color:#fff;cursor:pointer;display:inline-block;font-size:13px;letter-spacing:1px;line-height:1;margin-bottom:10px;padding:12px 26px;text-align:center;text-decoration:none;text-transform:uppercase}.rtm-button:hover,.rtm-button:focus{background-color:#228ac0;color:#fff}.rtm-button.large{font-size:16px;margin-bottom:20px;padding:20px 40px}.rtm-button.rtm-button-success{background-color:#2ecc71}.rtm-button.rtm-button-success:hover,.rtm-button.rtm-button-success:focus{background-color:#2fab41}.rtm-hire-points{font-size:14px;margin-bottom:24px}@media only screen and (min-width: 1025px){.rtm-setting-container{float:left;width:78.2%}.rtm-sidebar{float:right;width:20%}.rtm-sidebar .postbox{min-width:0}.rtm-field-wrap{max-width:92%}.rtm-tip:after,.rtm-tip:before{right:100%;top:15px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.rtm-tip:after{border-color:rgba(255,250,240,0);border-right-color:#fffAF0;border-width:6px;margin-top:-6px}.rtm-tip:before{border-color:rgba(221,204,170,0);border-right-color:#f5deaf;border-width:7px;margin-top:-7px}.rtm-support-form .bp-media-input,.rtm-support-form .bp-media-textarea{float:left;width:40%}}@media only screen and (min-width: 641px) and (max-width: 1024px){.rtm-sidebar{width:100%}.rtm-sidebar .postbox{display:inline-block;margin-left:5px;vertical-align:top}.rtm-sidebar .postbox:first-child{margin-left:0}}@media screen and (max-width: 1024px){.rtm-tip{bottom:26px;left:auto;right:-102px;top:auto;width:200px}.rtm-tip:after,.rtm-tip:before{right:auto;top:100%;left:50%;border:solid transparent;content:' ';height:0;width:0;position:absolute;pointer-events:none}.rtm-tip:after{border-color:rgba(255,250,240,0);border-top-color:#fffAF0;border-width:6px;margin-left:-6px}.rtm-tip:before{border-color:rgba(245,222,175,0);border-top-color:#f5deaf;border-width:7px;margin-left:-7px}#rtmedia-custom-css-settings .form-table:last-child .rtm-field-wrap{width:100%}.rtm-field-wrap input[type=text]{max-width:140px !important}.theme-browser .theme:nth-child(2n+1){margin-right:4%}.rtmedia-settings-submit{margin-bottom:0 !important}}@media only screen and (min-width: 641px){.rtm-pro-feature-list li:nth-child(3n+1){clear:left}}@media screen and (min-width: 421px) and (max-width: 782px){.rtm-option-wrapper .form-table td{display:table-cell}.rtm-option-wrapper .form-table th{display:table-cell}}@media only screen and (max-width: 640px){.rtm-pro-feature-list li{width:50%}.rtm-pro-feature-list li:nth-child(2n+1){clear:left}.rtm-tabs{width:40px}.rtm-tabs li{width:40px}.rtm-tabs a{height:18px}.rtm-tabs a:hover{width:140px}.rtm-tabs a:hover span{display:block}.rtm-tabs span{display:none;padding:0 0 0 28px;position:absolute}.rtm-support-form label{width:100%;margin-bottom:5px}.rtm-support-form .bp-media-input,.rtm-support-form .bp-media-textarea{width:70%}.rtm-button-wrapper{padding-left:0}}@media screen and (max-width: 481px){.rtm-plugin-card.plugin-card .rtm-logo{display:inline-block;float:none}.rtm-theme-browser .rtm-themes .rtm-theme{margin:0 0 20px;width:100%}}@media screen and (max-width: 420px){.rtm-option-wrapper .form-table th{padding-bottom:15px;width:100%}#rtmedia-types .form-table th,#rtmedia-custom-css-settings .form-table th{width:100%}.rtm-pro-feature-list li{width:100%}.rtm-tip-top{right:-115px}}body.rtl .rtm-tabs a{padding:10px 32px 10px 4px}body.rtl .rtm-tabs .dashicons{right:10px}body.rtl .rtm-social-share .dashicons{left:10px;right:auto}body.rtl .rtm-option-wrapper .rtm-field-wrap{float:right}body.rtl .rtm-tip-top,body.rtl .rtm-tip{left:auto;right:24px}body.rtl .rtm-tip-top:after,body.rtl .rtm-tip-top:before,body.rtl .rtm-tip:after,body.rtl .rtm-tip:before{display:none}body.rtl .rtm-edit-td,body.rtl .rtm-delete-td{float:right;margin-left:0}body.rtl .rtm-edit-td{margin-right:-15px}body.rtl #rtmedia-membership span.float-right{float:left}body.rtl .theme-browser .theme{float:left;margin:0 4% 4% 0}
|
app/assets/admin/css/sass/_addons.scss
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtm-plugin-card.plugin-card {
|
2 |
+
clear: none;
|
3 |
+
float: none;
|
4 |
+
margin: 0 0 20px;
|
5 |
+
overflow: hidden;
|
6 |
+
width: 100%;
|
7 |
+
|
8 |
+
.rtm-logo {
|
9 |
+
float: left;
|
10 |
+
margin-right: 10px;
|
11 |
+
max-width: 200px;
|
12 |
+
width: auto;
|
13 |
+
|
14 |
+
img {
|
15 |
+
height: auto;
|
16 |
+
margin: -10px 0 0 -10px;
|
17 |
+
max-width: 100%;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
.desc, .name {
|
22 |
+
margin-left: 0;
|
23 |
+
margin-right: 0;
|
24 |
+
overflow: hidden;
|
25 |
+
}
|
26 |
+
|
27 |
+
h4 {
|
28 |
+
margin-bottom: 0;
|
29 |
+
}
|
30 |
+
|
31 |
+
a {
|
32 |
+
text-decoration: none;
|
33 |
+
}
|
34 |
+
|
35 |
+
.rtm-live-demo {
|
36 |
+
margin-right: 10px;
|
37 |
+
}
|
38 |
+
|
39 |
+
.price {
|
40 |
+
color: $link;
|
41 |
+
font-size: 22px;
|
42 |
+
line-height: 1.2;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
#rtm-plugins {
|
47 |
+
.rtm-option-title {
|
48 |
+
margin-top: 50px;
|
49 |
+
}
|
50 |
+
|
51 |
+
.rtm-setting-title + .rtm-option-title {
|
52 |
+
margin-top: 0;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
.rtm-encoding-table {
|
57 |
+
border-collapse: collapse;
|
58 |
+
clear: none;
|
59 |
+
|
60 |
+
th, td {
|
61 |
+
border: 1px solid $border;
|
62 |
+
}
|
63 |
+
|
64 |
+
th {
|
65 |
+
font-size: 13px;
|
66 |
+
font-weight: 600;
|
67 |
+
}
|
68 |
+
}
|
app/assets/admin/css/sass/_components.scss
ADDED
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Social Links
|
2 |
+
.rtm-social-links {
|
3 |
+
|
4 |
+
a {
|
5 |
+
display: inline-block;
|
6 |
+
margin: 4px 0 4px 4px;
|
7 |
+
text-decoration: none;
|
8 |
+
}
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
// Go Pro button
|
13 |
+
.nav-tab.rtm-premium {
|
14 |
+
background: #e74c3c;
|
15 |
+
color: white;
|
16 |
+
letter-spacing: 0.5px;
|
17 |
+
}
|
18 |
+
|
19 |
+
.rtm-setting-title {
|
20 |
+
border-bottom: 1px solid $light;
|
21 |
+
font-size: 22px;
|
22 |
+
font-weight: 400;
|
23 |
+
line-height: 1;
|
24 |
+
margin-bottom: 20px;
|
25 |
+
margin-top: 0;
|
26 |
+
padding-bottom: 14px;
|
27 |
+
display: none;
|
28 |
+
|
29 |
+
&.rtm-show {
|
30 |
+
display: block;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
.rtm-option-wrapper {
|
35 |
+
margin-bottom: 40px;
|
36 |
+
margin-top: 40px;
|
37 |
+
|
38 |
+
&:last-child {
|
39 |
+
margin-bottom: 20px;
|
40 |
+
}
|
41 |
+
|
42 |
+
.rtm-setting-title + & {
|
43 |
+
margin-top: 0;
|
44 |
+
}
|
45 |
+
|
46 |
+
&:last-child {
|
47 |
+
border-bottom: 0;
|
48 |
+
}
|
49 |
+
|
50 |
+
.form-table {
|
51 |
+
clear: none;
|
52 |
+
}
|
53 |
+
|
54 |
+
.rtm-field-wrap {
|
55 |
+
float: left;
|
56 |
+
}
|
57 |
+
|
58 |
+
a {
|
59 |
+
text-decoration: none;
|
60 |
+
}
|
61 |
+
|
62 |
+
.form-table {
|
63 |
+
th {
|
64 |
+
color: #444;
|
65 |
+
font-size: 13px;
|
66 |
+
font-weight: 400;
|
67 |
+
padding: 5px 30px 5px 0;
|
68 |
+
vertical-align: top;
|
69 |
+
width: 48%;
|
70 |
+
}
|
71 |
+
|
72 |
+
td {
|
73 |
+
font-size: 13px;
|
74 |
+
padding: 0 0 5px;
|
75 |
+
vertical-align: top;
|
76 |
+
|
77 |
+
fieldset label {
|
78 |
+
display: block;
|
79 |
+
margin: 0 !important;
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
.rtm-form-radio {
|
84 |
+
label {
|
85 |
+
margin-top: 5px !important;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
textarea,
|
91 |
+
select,
|
92 |
+
input[type=text],
|
93 |
+
input[type=number] {
|
94 |
+
border-radius: 3px;
|
95 |
+
}
|
96 |
+
|
97 |
+
input[type=number] {
|
98 |
+
width: 60px;
|
99 |
+
}
|
100 |
+
|
101 |
+
.rt-form-radio {
|
102 |
+
height: 28px;
|
103 |
+
line-height: 24px;
|
104 |
+
|
105 |
+
label {
|
106 |
+
&:first-child {
|
107 |
+
margin-right: 12px !important;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
.dashicons-info {
|
113 |
+
color: #aaa;
|
114 |
+
font-size: 14px;
|
115 |
+
height: 26px;
|
116 |
+
line-height: 26px;
|
117 |
+
position: relative;
|
118 |
+
}
|
119 |
+
|
120 |
+
.rtm-debug-info {
|
121 |
+
margin-top: 32px;
|
122 |
+
|
123 |
+
tr {
|
124 |
+
border-bottom: 1px solid $light;
|
125 |
+
|
126 |
+
&:first-child {
|
127 |
+
border-top: 1px solid $light;
|
128 |
+
}
|
129 |
+
|
130 |
+
&:nth-child(2n) {
|
131 |
+
background-color: #f8f8f8;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
th {
|
136 |
+
border-right: 1px solid $light;
|
137 |
+
font-weight: 600;
|
138 |
+
width: auto;
|
139 |
+
}
|
140 |
+
|
141 |
+
th,
|
142 |
+
td {
|
143 |
+
padding: 10px;
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
.rtm-option-title {
|
149 |
+
border-bottom: 1px solid $light;
|
150 |
+
font-size: 14px;
|
151 |
+
letter-spacing: 0.02rem;
|
152 |
+
margin-bottom: 12px;
|
153 |
+
margin-top: 0;
|
154 |
+
padding: 0 0 6px;
|
155 |
+
text-transform: uppercase;
|
156 |
+
}
|
157 |
+
|
158 |
+
.rtm-sidebar {
|
159 |
+
.button {
|
160 |
+
display: block;
|
161 |
+
opacity: 0.8;
|
162 |
+
position: relative;
|
163 |
+
text-decoration: none;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
.rtm-social-share {
|
168 |
+
|
169 |
+
.dashicons {
|
170 |
+
font-size: 18px;
|
171 |
+
position: absolute;
|
172 |
+
right: 10px;
|
173 |
+
top: 4px;
|
174 |
+
}
|
175 |
+
|
176 |
+
.twitter {
|
177 |
+
.dashicons {
|
178 |
+
color: #45b0e3;
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
.facebook {
|
183 |
+
.dashicons {
|
184 |
+
color: #3b5998;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
.wordpress {
|
190 |
+
.dashicons {
|
191 |
+
color: #21759b;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
.rss {
|
196 |
+
.dashicons {
|
197 |
+
color: #FF6600;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
p:last-child {
|
202 |
+
margin-bottom: 0;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
.rtm-notice {
|
207 |
+
background: rgba($light, 0.8);
|
208 |
+
color: #777;
|
209 |
+
font-size: 12px;
|
210 |
+
line-height: 1.6;
|
211 |
+
margin-top: 10px;
|
212 |
+
overflow: hidden;
|
213 |
+
padding: 0 10px;
|
214 |
+
|
215 |
+
p {
|
216 |
+
font-size: inherit;
|
217 |
+
line-height: inherit;
|
218 |
+
margin: 10px 0;
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
.rtm-warning {
|
223 |
+
background-color: #fcf8e3;
|
224 |
+
border-bottom: 1px solid #EEE;
|
225 |
+
color: #c09853;
|
226 |
+
padding: 10px 15px;
|
227 |
+
}
|
228 |
+
|
229 |
+
.rtmedia-theme-warning {
|
230 |
+
margin-bottom: 26px;
|
231 |
+
}
|
232 |
+
|
233 |
+
.rtm-success {
|
234 |
+
background-color: #dff0d8;
|
235 |
+
border-bottom: 1px solid #e7e7e7;
|
236 |
+
color: #468847;
|
237 |
+
margin: 0;
|
238 |
+
padding: 8px 35px 8px 14px;
|
239 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
240 |
+
}
|
241 |
+
|
242 |
+
.rtm-fly-warning {
|
243 |
+
border-bottom: 0;
|
244 |
+
left: -10px;
|
245 |
+
letter-spacing: 1px;
|
246 |
+
line-height: 22px;
|
247 |
+
margin-bottom: 0;
|
248 |
+
padding: 14px 25px;
|
249 |
+
position: absolute;
|
250 |
+
top: -5px;
|
251 |
+
}
|
252 |
+
|
253 |
+
// Types table needs different styles
|
254 |
+
#rtmedia-types {
|
255 |
+
.form-table {
|
256 |
+
th {
|
257 |
+
line-height: 26px;
|
258 |
+
padding: 5px 0 20px;
|
259 |
+
width: 33%;
|
260 |
+
}
|
261 |
+
|
262 |
+
td {
|
263 |
+
padding: 0 0 12px;
|
264 |
+
}
|
265 |
+
}
|
266 |
+
}
|
267 |
+
|
268 |
+
#rtmedia-custom-css-settings {
|
269 |
+
.form-table th {
|
270 |
+
width: 35%;
|
271 |
+
}
|
272 |
+
|
273 |
+
.form-table:last-child .rtm-field-wrap {
|
274 |
+
width: 92%;
|
275 |
+
}
|
276 |
+
|
277 |
+
textarea {
|
278 |
+
height: 300px;
|
279 |
+
width: 100%;
|
280 |
+
}
|
281 |
+
}
|
282 |
+
|
283 |
+
.rtm-img-size-setting {
|
284 |
+
.form-table {
|
285 |
+
th {
|
286 |
+
border-bottom: 1px solid $light;
|
287 |
+
padding-bottom: 10px;
|
288 |
+
padding-top: 10px;
|
289 |
+
width: 20%;
|
290 |
+
}
|
291 |
+
|
292 |
+
tr:nth-child(2) {
|
293 |
+
td {
|
294 |
+
padding-top: 20px;
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
tr:nth-child(4) {
|
299 |
+
border-bottom: 1px solid $light;
|
300 |
+
|
301 |
+
td {
|
302 |
+
padding-bottom: 20px;
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
tr:nth-child(5) {
|
307 |
+
td {
|
308 |
+
padding-top: 20px;
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
tr:nth-child(6) {
|
313 |
+
td {
|
314 |
+
padding-bottom: 20px;
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
tr:nth-child(7) {
|
319 |
+
border-top: 1px solid $light;
|
320 |
+
|
321 |
+
td {
|
322 |
+
padding-top: 20px;
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
+
tr:nth-last-child(2) {
|
327 |
+
td {
|
328 |
+
padding-bottom: 20px;
|
329 |
+
}
|
330 |
+
}
|
331 |
+
|
332 |
+
|
333 |
+
tr:last-child {
|
334 |
+
border-top: 1px solid $light;
|
335 |
+
|
336 |
+
td {
|
337 |
+
padding-top: 20px;
|
338 |
+
padding-bottom: 20px;
|
339 |
+
}
|
340 |
+
}
|
341 |
+
|
342 |
+
.rtm-row-title {
|
343 |
+
font-weight: 600;
|
344 |
+
}
|
345 |
+
}
|
346 |
+
}
|
347 |
+
|
348 |
+
#rtmedia-privacy {
|
349 |
+
.rt-form-radio {
|
350 |
+
font-size: 12px;
|
351 |
+
|
352 |
+
strong {
|
353 |
+
font-size: 13px;
|
354 |
+
}
|
355 |
+
}
|
356 |
+
}
|
app/assets/admin/css/sass/_layout.scss
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
$tab-panel-width: 202px;
|
2 |
+
$container-min-height: 300px;
|
3 |
+
|
4 |
+
.rtm-row-container {
|
5 |
+
padding-top: 10px;
|
6 |
+
}
|
7 |
+
|
8 |
+
.rtm-admin-tab-container {
|
9 |
+
display: table;
|
10 |
+
width: 100%;
|
11 |
+
|
12 |
+
.rtm-tabs-content {
|
13 |
+
background: $white;
|
14 |
+
border-left: 1px solid $border;
|
15 |
+
display: table-cell;
|
16 |
+
min-height: $container-min-height;
|
17 |
+
padding: 20px 30px;
|
18 |
+
vertical-align: top;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
.rtm-setting-container {
|
23 |
+
background-color: #f5f5f5;
|
24 |
+
border: 1px solid $border-dark;
|
25 |
+
@include box-shadow( 0 1px 1px rgba( $black, 0.04 ) );
|
26 |
+
margin-top: 10px;
|
27 |
+
}
|
28 |
+
|
29 |
+
.rtm-sidebar {
|
30 |
+
|
31 |
+
.postbox {
|
32 |
+
//background: rgba($white, 0.8);
|
33 |
+
|
34 |
+
.hndle {
|
35 |
+
cursor: default;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
.rtm-tabs {
|
41 |
+
display: table-cell;
|
42 |
+
list-style: none;
|
43 |
+
margin: 0;
|
44 |
+
min-height: $container-min-height;
|
45 |
+
width: $tab-panel-width;
|
46 |
+
}
|
47 |
+
|
48 |
+
.rtm-button-container {
|
49 |
+
background: #f3f3f3;
|
50 |
+
border-bottom: 1px solid $border-dark;
|
51 |
+
box-shadow: 0 1px 0 #fcfcfc inset;
|
52 |
+
overflow: hidden;
|
53 |
+
padding: 6px 10px 6px 6px;
|
54 |
+
position: relative;
|
55 |
+
text-align: right;
|
56 |
+
|
57 |
+
&.bottom {
|
58 |
+
background: $light;
|
59 |
+
border-top: 1px solid $border;
|
60 |
+
box-shadow: 0 0 0;
|
61 |
+
z-index: 999;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
#mce-EMAIL {
|
66 |
+
width: 100%;
|
67 |
+
}
|
68 |
+
|
69 |
+
#mc-embedded-subscribe {
|
70 |
+
display: block;
|
71 |
+
margin: 10px auto 0;
|
72 |
+
width: 100%;
|
73 |
+
}
|
app/assets/admin/css/sass/_responsive.scss
ADDED
@@ -0,0 +1,231 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@media #{$large-up} {
|
2 |
+
|
3 |
+
.rtm-setting-container {
|
4 |
+
float: left;
|
5 |
+
width: 78.2%;
|
6 |
+
}
|
7 |
+
|
8 |
+
.rtm-sidebar {
|
9 |
+
float: right;
|
10 |
+
width: 20%;
|
11 |
+
|
12 |
+
.postbox {
|
13 |
+
min-width: 0;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
.rtm-field-wrap {
|
18 |
+
max-width: 92%;
|
19 |
+
}
|
20 |
+
|
21 |
+
.rtm-tip {
|
22 |
+
|
23 |
+
&:after, &:before {
|
24 |
+
right: 100%;
|
25 |
+
top: 15px;
|
26 |
+
border: solid transparent;
|
27 |
+
content: " ";
|
28 |
+
height: 0;
|
29 |
+
width: 0;
|
30 |
+
position: absolute;
|
31 |
+
pointer-events: none;
|
32 |
+
}
|
33 |
+
|
34 |
+
&:after {
|
35 |
+
border-color: rgba(255, 250, 240, 0);
|
36 |
+
border-right-color: #fffAF0;
|
37 |
+
border-width: 6px;
|
38 |
+
margin-top: -6px;
|
39 |
+
}
|
40 |
+
|
41 |
+
&:before {
|
42 |
+
border-color: rgba(221, 204, 170, 0);
|
43 |
+
border-right-color: #f5deaf;
|
44 |
+
border-width: 7px;
|
45 |
+
margin-top: -7px;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
.rtm-support-form {
|
50 |
+
.bp-media-input, .bp-media-textarea {
|
51 |
+
float: left;
|
52 |
+
width: 40%;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
@media #{$medium-only} {
|
60 |
+
|
61 |
+
.rtm-sidebar {
|
62 |
+
width: 100%;
|
63 |
+
|
64 |
+
.postbox {
|
65 |
+
display: inline-block;
|
66 |
+
margin-left: 5px;
|
67 |
+
vertical-align: top;
|
68 |
+
|
69 |
+
&:first-child {
|
70 |
+
margin-left: 0;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
@media screen and (max-width: 1024px) {
|
78 |
+
.rtm-tip {
|
79 |
+
bottom: 26px;
|
80 |
+
left: auto;
|
81 |
+
right: -102px;
|
82 |
+
top: auto;
|
83 |
+
width: 200px;
|
84 |
+
|
85 |
+
&:after, &:before {
|
86 |
+
right: auto;
|
87 |
+
top: 100%;
|
88 |
+
left: 50%;
|
89 |
+
border: solid transparent;
|
90 |
+
content: ' ';
|
91 |
+
height: 0;
|
92 |
+
width: 0;
|
93 |
+
position: absolute;
|
94 |
+
pointer-events: none;
|
95 |
+
}
|
96 |
+
|
97 |
+
&:after {
|
98 |
+
border-color: rgba(255, 250, 240, 0);
|
99 |
+
border-top-color: #fffAF0;
|
100 |
+
border-width: 6px;
|
101 |
+
margin-left: -6px;
|
102 |
+
}
|
103 |
+
|
104 |
+
&:before {
|
105 |
+
border-color: rgba(245, 222, 175, 0);
|
106 |
+
border-top-color: #f5deaf;
|
107 |
+
border-width: 7px;
|
108 |
+
margin-left: -7px;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
#rtmedia-custom-css-settings .form-table:last-child .rtm-field-wrap {
|
113 |
+
width: 100%;
|
114 |
+
}
|
115 |
+
|
116 |
+
.rtm-field-wrap {
|
117 |
+
input[type=text] {
|
118 |
+
max-width: 140px !important;
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
.theme-browser .theme:nth-child(2n+1) {
|
123 |
+
margin-right: 4%;
|
124 |
+
}
|
125 |
+
|
126 |
+
.rtmedia-settings-submit {
|
127 |
+
margin-bottom: 0 !important;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
@media #{$medium-up} {
|
132 |
+
.rtm-pro-feature-list li {
|
133 |
+
&:nth-child(3n+1) {
|
134 |
+
clear: left;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
@media screen and (min-width: 421px) and (max-width: 782px) {
|
140 |
+
.rtm-option-wrapper .form-table td {
|
141 |
+
display: table-cell;
|
142 |
+
}
|
143 |
+
|
144 |
+
.rtm-option-wrapper .form-table th {
|
145 |
+
display: table-cell;
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
@media #{$small-only} {
|
150 |
+
|
151 |
+
.rtm-pro-feature-list li {
|
152 |
+
width: 50%;
|
153 |
+
|
154 |
+
&:nth-child(2n+1) {
|
155 |
+
clear: left;
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
.rtm-tabs {
|
160 |
+
width: 40px;
|
161 |
+
|
162 |
+
li {
|
163 |
+
width: 40px;
|
164 |
+
}
|
165 |
+
|
166 |
+
a {
|
167 |
+
height: 18px;
|
168 |
+
|
169 |
+
&:hover {
|
170 |
+
width: 140px;
|
171 |
+
|
172 |
+
span {
|
173 |
+
display: block;
|
174 |
+
}
|
175 |
+
}
|
176 |
+
}
|
177 |
+
|
178 |
+
span {
|
179 |
+
display: none;
|
180 |
+
padding: 0 0 0 28px;
|
181 |
+
position: absolute;
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
.rtm-support-form {
|
186 |
+
label {
|
187 |
+
width: 100%;
|
188 |
+
margin-bottom: 5px;
|
189 |
+
}
|
190 |
+
|
191 |
+
.bp-media-input, .bp-media-textarea {
|
192 |
+
width: 70%;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
.rtm-button-wrapper {
|
197 |
+
padding-left: 0;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
@media screen and (max-width: 481px) {
|
202 |
+
.rtm-plugin-card.plugin-card .rtm-logo {
|
203 |
+
display: inline-block;
|
204 |
+
float: none;
|
205 |
+
}
|
206 |
+
|
207 |
+
.rtm-theme-browser .rtm-themes .rtm-theme {
|
208 |
+
margin: 0 0 20px;
|
209 |
+
width: 100%;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
@media screen and (max-width: 420px) {
|
214 |
+
.rtm-option-wrapper .form-table th {
|
215 |
+
padding-bottom: 15px;
|
216 |
+
width: 100%;
|
217 |
+
}
|
218 |
+
|
219 |
+
#rtmedia-types .form-table th,
|
220 |
+
#rtmedia-custom-css-settings .form-table th {
|
221 |
+
width: 100%;
|
222 |
+
}
|
223 |
+
|
224 |
+
.rtm-pro-feature-list li {
|
225 |
+
width: 100%;
|
226 |
+
}
|
227 |
+
|
228 |
+
.rtm-tip-top {
|
229 |
+
right: -115px;
|
230 |
+
}
|
231 |
+
}
|
app/assets/admin/css/sass/_rtl.scss
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body.rtl {
|
2 |
+
.rtm-tabs a {
|
3 |
+
padding: 10px 32px 10px 4px;
|
4 |
+
}
|
5 |
+
|
6 |
+
.rtm-tabs .dashicons {
|
7 |
+
right: 10px;
|
8 |
+
}
|
9 |
+
|
10 |
+
.rtm-social-share .dashicons {
|
11 |
+
left: 10px;
|
12 |
+
right: auto;
|
13 |
+
}
|
14 |
+
|
15 |
+
.rtm-option-wrapper .rtm-field-wrap {
|
16 |
+
float: right;
|
17 |
+
}
|
18 |
+
|
19 |
+
.rtm-tip-top, .rtm-tip {
|
20 |
+
left: auto;
|
21 |
+
right: 24px;
|
22 |
+
|
23 |
+
&:after, &:before {
|
24 |
+
display: none;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
+
.rtm-edit-td, .rtm-delete-td {
|
29 |
+
float: right;
|
30 |
+
margin-left: 0;
|
31 |
+
}
|
32 |
+
|
33 |
+
.rtm-edit-td {
|
34 |
+
margin-right: -15px;
|
35 |
+
}
|
36 |
+
|
37 |
+
#rtmedia-membership span.float-right {
|
38 |
+
float: left;
|
39 |
+
}
|
40 |
+
|
41 |
+
.theme-browser .theme {
|
42 |
+
float: left;
|
43 |
+
margin: 0 4% 4% 0;
|
44 |
+
}
|
45 |
+
}
|
app/assets/admin/css/sass/_rtmedia-pro.scss
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtm-page-container {
|
2 |
+
background: $white;
|
3 |
+
overflow: hidden;
|
4 |
+
padding: 20px;
|
5 |
+
}
|
6 |
+
|
7 |
+
.rtm-pro-feature-list {
|
8 |
+
|
9 |
+
li {
|
10 |
+
@include box-sizing(border-box);
|
11 |
+
float: left;
|
12 |
+
padding: 0 10px 20px;
|
13 |
+
width: 33%;
|
14 |
+
}
|
15 |
+
|
16 |
+
.rtm-icon-wrap {
|
17 |
+
float: left;
|
18 |
+
margin-top: 15px;
|
19 |
+
width: 30px;
|
20 |
+
}
|
21 |
+
|
22 |
+
.dashicons {
|
23 |
+
font-size: 18px;
|
24 |
+
}
|
25 |
+
|
26 |
+
.rtm-title {
|
27 |
+
font-size: 18px;
|
28 |
+
margin-left: 30px;
|
29 |
+
margin-top: 0px;
|
30 |
+
}
|
31 |
+
|
32 |
+
.rtm-content {
|
33 |
+
font-size: 14px;
|
34 |
+
line-height: 25px;
|
35 |
+
margin-left: 30px;
|
36 |
+
color: #8a8a8a;
|
37 |
+
width: auto;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
.rtm-update-to-pro {
|
42 |
+
text-align: center;
|
43 |
+
}
|
44 |
+
|
45 |
+
.rtm-button {
|
46 |
+
background-color: $link;
|
47 |
+
border: 0;
|
48 |
+
border-radius: 3px;
|
49 |
+
color: $white;
|
50 |
+
cursor: pointer;
|
51 |
+
display: inline-block;
|
52 |
+
font-size: 13px;
|
53 |
+
letter-spacing: 1px;
|
54 |
+
line-height: 1;
|
55 |
+
margin-bottom: 10px;
|
56 |
+
padding: 12px 26px;
|
57 |
+
text-align: center;
|
58 |
+
text-decoration: none;
|
59 |
+
text-transform: uppercase;
|
60 |
+
|
61 |
+
&:hover, &:focus {
|
62 |
+
background-color: darken($link, 5);
|
63 |
+
color: $white;
|
64 |
+
}
|
65 |
+
|
66 |
+
&.large {
|
67 |
+
font-size: 16px;
|
68 |
+
margin-bottom: 20px;
|
69 |
+
padding: 20px 40px;
|
70 |
+
}
|
71 |
+
|
72 |
+
&.rtm-button-success {
|
73 |
+
background-color: #2ecc71;
|
74 |
+
|
75 |
+
&:hover, &:focus {
|
76 |
+
background-color: darken(#34bf49, 5);
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
.rtm-hire-points {
|
82 |
+
font-size: 14px;
|
83 |
+
margin-bottom: 24px;
|
84 |
+
}
|
app/assets/admin/css/sass/_sidebar.scss
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#rtmedia-encoding-usage {
|
2 |
+
strong {
|
3 |
+
display: inline-block;
|
4 |
+
min-width: 120px;
|
5 |
+
}
|
6 |
+
|
7 |
+
p {
|
8 |
+
overflow: hidden;
|
9 |
+
}
|
10 |
+
}
|
11 |
+
|
12 |
+
.encoding-used, .encoding-remaining {
|
13 |
+
background: $success;
|
14 |
+
float: right;
|
15 |
+
height: 12px;
|
16 |
+
margin-top: 3px;
|
17 |
+
width: 12px;
|
18 |
+
}
|
19 |
+
|
20 |
+
.encoding-remaining {
|
21 |
+
background: $border-dark;
|
22 |
+
}
|
23 |
+
|
24 |
+
#rtprogressbar {
|
25 |
+
background: $border-dark;
|
26 |
+
height: 10px;
|
27 |
+
position: relative;
|
28 |
+
|
29 |
+
div {
|
30 |
+
background: $success;
|
31 |
+
height: 10px;
|
32 |
+
left: 0;
|
33 |
+
position: absolute;
|
34 |
+
}
|
35 |
+
}
|
app/assets/admin/css/sass/_support-form.scss
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
//
|
2 |
+
.rtm-support-container {
|
3 |
+
min-height: 300px;
|
4 |
+
}
|
5 |
+
|
6 |
+
.rtm-support-form {
|
7 |
+
|
8 |
+
.rtm-form-filed {
|
9 |
+
clear: both;
|
10 |
+
margin: 15px 0;
|
11 |
+
}
|
12 |
+
|
13 |
+
label {
|
14 |
+
float: left;
|
15 |
+
width: 15%;
|
16 |
+
}
|
17 |
+
|
18 |
+
.bp-media-textarea {
|
19 |
+
height: 80px;
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
23 |
+
|
24 |
+
.rtm-button-wrapper {
|
25 |
+
padding-left: 15%;
|
26 |
+
}
|
app/assets/admin/css/sass/_switch.scss
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// New Switch
|
2 |
+
|
3 |
+
$switchTransition: .15s ease-out;
|
4 |
+
|
5 |
+
.switch {
|
6 |
+
position: relative;
|
7 |
+
display: inline-block;
|
8 |
+
vertical-align: top;
|
9 |
+
width: 58px;
|
10 |
+
height: 22px;
|
11 |
+
padding: 3px;
|
12 |
+
border-radius: 18px;
|
13 |
+
|
14 |
+
|
15 |
+
input[type=checkbox] {
|
16 |
+
position: absolute;
|
17 |
+
top: 0;
|
18 |
+
left: 0;
|
19 |
+
opacity: 0;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
.switch-label {
|
25 |
+
position: relative;
|
26 |
+
display: block;
|
27 |
+
height: inherit;
|
28 |
+
color: $white;
|
29 |
+
font-size: 12px;
|
30 |
+
text-transform: uppercase;
|
31 |
+
background: #b4b4b4;
|
32 |
+
border-radius: inherit;
|
33 |
+
@include transition($switchTransition);
|
34 |
+
@include transition-property(opacity background);
|
35 |
+
|
36 |
+
&:before, &:after {
|
37 |
+
position: absolute;
|
38 |
+
top: 50%;
|
39 |
+
margin-top: -.5em;
|
40 |
+
line-height: 1;
|
41 |
+
@include transition(inherit);
|
42 |
+
}
|
43 |
+
|
44 |
+
&:before {
|
45 |
+
content: attr(data-off);
|
46 |
+
right: 11px;
|
47 |
+
color: $white;
|
48 |
+
}
|
49 |
+
|
50 |
+
&:after {
|
51 |
+
content: attr(data-on);
|
52 |
+
left: 11px;
|
53 |
+
opacity: 0;
|
54 |
+
}
|
55 |
+
|
56 |
+
input[type=checkbox]:checked ~ & {
|
57 |
+
//background: #47a8d8;
|
58 |
+
background: lighten(#2ea2cc, 2);
|
59 |
+
//background: lighten(#2ecc71, 5); #2ea2cc
|
60 |
+
|
61 |
+
&:before { opacity: 0; }
|
62 |
+
&:after { opacity: 1; }
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
.switch-handle {
|
67 |
+
position: absolute;
|
68 |
+
top: 5px;
|
69 |
+
left: 5px;
|
70 |
+
width: 18px;
|
71 |
+
height: 18px;
|
72 |
+
background: white;
|
73 |
+
border-radius: 10px;
|
74 |
+
box-shadow: 1px 1px 5px rgba(black, .2);
|
75 |
+
@include background-image(linear-gradient(top, white 40%, #f0f0f0));
|
76 |
+
@include transition(left #{$switchTransition});
|
77 |
+
|
78 |
+
&:before {
|
79 |
+
content: '';
|
80 |
+
position: absolute;
|
81 |
+
top: 50%;
|
82 |
+
left: 50%;
|
83 |
+
margin: -6px 0 0 -6px;
|
84 |
+
width: 12px;
|
85 |
+
height: 12px;
|
86 |
+
background: #f9f9f9;
|
87 |
+
border-radius: 6px;
|
88 |
+
box-shadow: inset 0 1px rgba(black, .02);
|
89 |
+
@include background-image(linear-gradient(top, #eee, white));
|
90 |
+
}
|
91 |
+
|
92 |
+
input[type=checkbox]:checked ~ & {
|
93 |
+
left: 41px;
|
94 |
+
box-shadow: -1px 1px 5px rgba(black, .2);
|
95 |
+
}
|
96 |
+
}
|
app/assets/admin/css/sass/_tabs.scss
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtm-tabs {
|
2 |
+
|
3 |
+
li {
|
4 |
+
margin: 0;
|
5 |
+
}
|
6 |
+
|
7 |
+
a {
|
8 |
+
border-bottom: 1px solid $border;
|
9 |
+
border-top: 1px solid $light-extra;
|
10 |
+
color: $dark;
|
11 |
+
display: block;
|
12 |
+
font-weight: 700;
|
13 |
+
outline: none;
|
14 |
+
opacity: 0.8;
|
15 |
+
padding: 10px 4px 10px 14px;
|
16 |
+
position: relative;
|
17 |
+
text-decoration: none;
|
18 |
+
z-index: 10;
|
19 |
+
|
20 |
+
&:hover {
|
21 |
+
background: $light;
|
22 |
+
color: $link;
|
23 |
+
margin-right: 0;
|
24 |
+
opacity: 1;
|
25 |
+
width: auto;
|
26 |
+
}
|
27 |
+
|
28 |
+
&:focus {
|
29 |
+
background: $white;
|
30 |
+
box-shadow: 0 0 0;
|
31 |
+
}
|
32 |
+
|
33 |
+
}
|
34 |
+
|
35 |
+
.active {
|
36 |
+
background: white;
|
37 |
+
position: relative;
|
38 |
+
|
39 |
+
&:after {
|
40 |
+
background: $white;
|
41 |
+
content: ' ';
|
42 |
+
height: 100%;
|
43 |
+
position: absolute;
|
44 |
+
right: -1px;
|
45 |
+
top: 0;
|
46 |
+
width: 1px;
|
47 |
+
}
|
48 |
+
|
49 |
+
a {
|
50 |
+
border-top-color: $white;
|
51 |
+
color: $dark;
|
52 |
+
opacity: 1;
|
53 |
+
|
54 |
+
&:hover {
|
55 |
+
background: $white;
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
span {
|
62 |
+
display: block;
|
63 |
+
padding: 0 0 0 25px;
|
64 |
+
}
|
65 |
+
|
66 |
+
.dashicons {
|
67 |
+
font-size: 14px;
|
68 |
+
height: auto;
|
69 |
+
line-height: 1;
|
70 |
+
margin-top: 3px;
|
71 |
+
position: absolute;
|
72 |
+
vertical-align: middle;
|
73 |
+
width: auto;
|
74 |
+
}
|
75 |
+
}
|
app/assets/admin/css/sass/_themes.scss
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtm-theme-browser {
|
2 |
+
|
3 |
+
.rtm-themes {
|
4 |
+
clear: none;
|
5 |
+
padding: 0;
|
6 |
+
|
7 |
+
.rtm-theme {
|
8 |
+
width: 48%;
|
9 |
+
|
10 |
+
&:nth-child(even) {
|
11 |
+
margin-right: 0 !important;
|
12 |
+
}
|
13 |
+
|
14 |
+
&:nth-child(3n) {
|
15 |
+
margin-right: 4%;
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
22 |
+
|
23 |
+
.admin-bar .theme-overlay .theme-wrap {
|
24 |
+
z-index: 99999;
|
25 |
+
}
|
app/assets/admin/css/sass/_tooltip.scss
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtm-tooltip {
|
2 |
+
display: inline-block;
|
3 |
+
margin-left: 3px;
|
4 |
+
position: relative;
|
5 |
+
|
6 |
+
&:hover {
|
7 |
+
|
8 |
+
.rtm-tip-top,
|
9 |
+
.rtm-tip {
|
10 |
+
margin-left: 0;
|
11 |
+
opacity: 1;
|
12 |
+
visibility: visible;
|
13 |
+
}
|
14 |
+
|
15 |
+
}
|
16 |
+
.rtm-title {
|
17 |
+
border-bottom: 1px dotted;
|
18 |
+
padding-bottom: 2px;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
.rtm-tip-top,
|
23 |
+
.rtm-tip {
|
24 |
+
background: #fffAF0;
|
25 |
+
border: 1px solid #f5deaf;
|
26 |
+
border-radius: 3px;
|
27 |
+
font-size: 12px;
|
28 |
+
left: 24px;
|
29 |
+
margin-top: -4px;
|
30 |
+
margin-left: -10px;
|
31 |
+
line-height: 1.5;
|
32 |
+
opacity: 0;
|
33 |
+
padding: 6px 12px;
|
34 |
+
position: absolute;
|
35 |
+
top: 0;
|
36 |
+
visibility: hidden;
|
37 |
+
width: 210px;
|
38 |
+
z-index: 10;
|
39 |
+
|
40 |
+
@include transition(all ease-in-out 0.4s);
|
41 |
+
}
|
42 |
+
|
43 |
+
.rtm-tip-top {
|
44 |
+
bottom: 26px;
|
45 |
+
left: auto;
|
46 |
+
right: -66px;
|
47 |
+
top: auto;
|
48 |
+
width: 200px;
|
49 |
+
|
50 |
+
&:after, &:before {
|
51 |
+
right: auto;
|
52 |
+
top: 100%;
|
53 |
+
left: 50%;
|
54 |
+
border: solid transparent;
|
55 |
+
content: ' ';
|
56 |
+
height: 0;
|
57 |
+
width: 0;
|
58 |
+
position: absolute;
|
59 |
+
pointer-events: none;
|
60 |
+
}
|
61 |
+
|
62 |
+
&:after {
|
63 |
+
border-color: rgba(255, 250, 240, 0);
|
64 |
+
border-top-color: #fffAF0;
|
65 |
+
border-width: 6px;
|
66 |
+
margin-left: -6px;
|
67 |
+
}
|
68 |
+
|
69 |
+
&:before {
|
70 |
+
border-color: rgba(245, 222, 175, 0);
|
71 |
+
border-top-color: #f5deaf;
|
72 |
+
border-width: 8px;
|
73 |
+
margin-left: -8px;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
.rtm-extensions {
|
78 |
+
.dashicons {
|
79 |
+
font-size: 12px;
|
80 |
+
margin-left: -4px;
|
81 |
+
position: relative;
|
82 |
+
top: -3px;
|
83 |
+
}
|
84 |
+
|
85 |
+
&.rtm-set-top {
|
86 |
+
.dashicons {
|
87 |
+
top: 1px;
|
88 |
+
}
|
89 |
+
}
|
90 |
+
}
|
app/assets/admin/css/sass/_utility.scss
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Alignleft
|
2 |
+
.alignleft {
|
3 |
+
float: left;
|
4 |
+
}
|
5 |
+
|
6 |
+
// Alignright
|
7 |
+
.alignright {
|
8 |
+
float: right;
|
9 |
+
}
|
10 |
+
|
11 |
+
// Aligncenter
|
12 |
+
.aligncenter {
|
13 |
+
display: block;
|
14 |
+
margin-left: auto;
|
15 |
+
margin-right: auto;
|
16 |
+
text-align: center;
|
17 |
+
}
|
18 |
+
|
19 |
+
// Clear Both
|
20 |
+
.clear-both {
|
21 |
+
clear: both;
|
22 |
+
}
|
23 |
+
|
24 |
+
// Clear None
|
25 |
+
.clear-none {
|
26 |
+
clear: none;
|
27 |
+
}
|
28 |
+
|
29 |
+
// Clear Left
|
30 |
+
.clear-left {
|
31 |
+
clear: left;
|
32 |
+
}
|
33 |
+
|
34 |
+
// Clear Right
|
35 |
+
.clear-right {
|
36 |
+
clear: right;
|
37 |
+
}
|
38 |
+
|
39 |
+
// inline-block
|
40 |
+
.rtm-inline-block {
|
41 |
+
display: inline-block;
|
42 |
+
}
|
43 |
+
|
44 |
+
// Text Left
|
45 |
+
.rtm-text-left {
|
46 |
+
text-align: left;
|
47 |
+
}
|
48 |
+
|
49 |
+
// Text Right
|
50 |
+
.rtm-text-right {
|
51 |
+
text-align: right;
|
52 |
+
}
|
53 |
+
|
54 |
+
// Text Center
|
55 |
+
.rtm-text-center {
|
56 |
+
text-align: center;
|
57 |
+
}
|
58 |
+
|
59 |
+
// Borders
|
60 |
+
.rtm-border-0 {
|
61 |
+
border: 0 !important;
|
62 |
+
}
|
63 |
+
|
64 |
+
.hide {
|
65 |
+
display: none;
|
66 |
+
}
|
67 |
+
|
68 |
+
/*------------------------------------*\
|
69 |
+
#CLEARFIX
|
70 |
+
\*------------------------------------*/
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Micro clearfix, as per: css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
|
74 |
+
* Extend the clearfix class with Sass to avoid the `.clearfix` class appearing
|
75 |
+
* over and over in your markup.
|
76 |
+
*/
|
77 |
+
.clearfix,
|
78 |
+
%clearfix {
|
79 |
+
|
80 |
+
&:after {
|
81 |
+
content: "";
|
82 |
+
display: table;
|
83 |
+
clear: both;
|
84 |
+
}
|
85 |
+
}
|
app/assets/admin/css/sass/_variables.scss
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// ***** Constant Variables ***** //
|
2 |
+
$black: #000000;
|
3 |
+
$white: #FFFFFF;
|
4 |
+
$dark : #222222;
|
5 |
+
$gray: #666666;
|
6 |
+
$light: #EEEEEE;
|
7 |
+
$light-extra: #f2f2f2;
|
8 |
+
$space: 26px;
|
9 |
+
|
10 |
+
$border: #e7e7e7;
|
11 |
+
$border-dark: #dedede;
|
12 |
+
|
13 |
+
$radius: 3px;
|
14 |
+
$rounded: 1000px;
|
15 |
+
$icon-font: 'dashicons';
|
16 |
+
|
17 |
+
// ***** Messages Colors ***** //
|
18 |
+
$notice: #BBBBBB;
|
19 |
+
$info: #2EA2CC;
|
20 |
+
$warning: #FFBA00;
|
21 |
+
$success: #7AD03A;
|
22 |
+
$error: #DD3D36;
|
23 |
+
|
24 |
+
// ***** Links ***** //
|
25 |
+
$link: #269ad6;
|
26 |
+
$link-hover: $link;
|
27 |
+
|
28 |
+
//
|
29 |
+
// @functions
|
30 |
+
//
|
31 |
+
|
32 |
+
// RANGES
|
33 |
+
// We use these functions to define ranges for various things, like media queries.
|
34 |
+
@function lower-bound($range){
|
35 |
+
@if length($range) <= 0 {
|
36 |
+
@return 0;
|
37 |
+
}
|
38 |
+
@return nth($range,1);
|
39 |
+
}
|
40 |
+
|
41 |
+
@function upper-bound($range) {
|
42 |
+
@if length($range) < 2 {
|
43 |
+
@return 999999999999;
|
44 |
+
}
|
45 |
+
@return nth($range, 2);
|
46 |
+
}
|
47 |
+
|
48 |
+
// Here we define the lower and upper bounds for each media size
|
49 |
+
$small-range: (0, 640px);
|
50 |
+
$medium-range: (641px, 1024px);
|
51 |
+
$large-range: (1025px, 1920px);
|
52 |
+
|
53 |
+
// Media Queries
|
54 |
+
$screen: "only screen" !default;
|
55 |
+
|
56 |
+
$landscape: "#{$screen} and (orientation: landscape)" !default;
|
57 |
+
$portrait: "#{$screen} and (orientation: portrait)" !default;
|
58 |
+
|
59 |
+
$small-up: $screen !default;
|
60 |
+
$small-only: "#{$screen} and (max-width: #{upper-bound($small-range)})" !default;
|
61 |
+
|
62 |
+
$medium-up: "#{$screen} and (min-width:#{lower-bound($medium-range)})" !default;
|
63 |
+
$medium-only: "#{$screen} and (min-width:#{lower-bound($medium-range)}) and (max-width:#{upper-bound($medium-range)})" !default;
|
64 |
+
|
65 |
+
$large-up: "#{$screen} and (min-width:#{lower-bound($large-range)})" !default;
|
66 |
+
$large-only: "#{$screen} and (min-width:#{lower-bound($large-range)}) and (max-width:#{upper-bound($large-range)})" !default;
|
app/assets/admin/css/sass/admin.scss
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
// *** This line Import Compass. *** //
|
3 |
+
@import "compass";
|
4 |
+
|
5 |
+
// *** CSS Variables *** //
|
6 |
+
@import 'variables';
|
7 |
+
|
8 |
+
// *** Utility Classes *** //
|
9 |
+
@import "utility";
|
10 |
+
|
11 |
+
// *** Layout *** //
|
12 |
+
@import "layout";
|
13 |
+
|
14 |
+
// *** Components *** //
|
15 |
+
@import "components";
|
16 |
+
|
17 |
+
// *** Sidebar *** //
|
18 |
+
@import "sidebar";
|
19 |
+
|
20 |
+
// *** Tabs *** //
|
21 |
+
@import "tabs";
|
22 |
+
|
23 |
+
// *** Switch *** //
|
24 |
+
@import "switch";
|
25 |
+
|
26 |
+
// *** Tooltip *** //
|
27 |
+
@import "tooltip";
|
28 |
+
|
29 |
+
// *** Addons *** //
|
30 |
+
@import "addons";
|
31 |
+
|
32 |
+
// *** Themes *** //
|
33 |
+
@import "themes";
|
34 |
+
|
35 |
+
// *** Support *** //
|
36 |
+
@import "support-form";
|
37 |
+
|
38 |
+
// *** rtMedia-Pro *** //
|
39 |
+
@import "rtmedia-pro";
|
40 |
+
|
41 |
+
// *** Responsive *** //
|
42 |
+
@import "responsive";
|
43 |
+
|
44 |
+
// *** Responsive *** //
|
45 |
+
@import "rtl";
|
app/assets/admin/css/sass/widget.scss
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#rtmedia_dashboard_widget {
|
2 |
+
|
3 |
+
.rtm-column {
|
4 |
+
width: 46%;
|
5 |
+
}
|
6 |
+
|
7 |
+
table {
|
8 |
+
border-top: 1px solid #ECECEC;
|
9 |
+
margin-top: 6px;
|
10 |
+
padding-top: 6px;
|
11 |
+
}
|
12 |
+
|
13 |
+
td {
|
14 |
+
padding: 3px 0;
|
15 |
+
}
|
16 |
+
|
17 |
+
.b {
|
18 |
+
padding-right: 5px;
|
19 |
+
text-align: right;
|
20 |
+
width: 1%;
|
21 |
+
}
|
22 |
+
|
23 |
+
.rtm-meta-container {
|
24 |
+
border-top: 1px solid #eee;
|
25 |
+
clear: both;
|
26 |
+
margin: 12px -12px -12px;
|
27 |
+
padding: 0 12px;
|
28 |
+
}
|
29 |
+
|
30 |
+
.rtm-meta-links {
|
31 |
+
list-style: none;
|
32 |
+
margin: 0;
|
33 |
+
padding: 0;
|
34 |
+
|
35 |
+
li {
|
36 |
+
display: inline-block;
|
37 |
+
margin: 0;
|
38 |
+
position: relative;
|
39 |
+
|
40 |
+
&:after {
|
41 |
+
background: #ddd;
|
42 |
+
content: ' ';
|
43 |
+
height: 14px;
|
44 |
+
position: absolute;
|
45 |
+
right: -1px;
|
46 |
+
top: 13px;
|
47 |
+
width: 1px;
|
48 |
+
}
|
49 |
+
|
50 |
+
&:first-child,
|
51 |
+
&:last-child {
|
52 |
+
&:after {
|
53 |
+
display: none;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
a {
|
59 |
+
display: block;
|
60 |
+
padding: 10px 8px;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
/*------------------------------------*\
|
66 |
+
#CLEARFIX
|
67 |
+
\*------------------------------------*/
|
68 |
+
|
69 |
+
.clearfix {
|
70 |
+
|
71 |
+
&:after {
|
72 |
+
content: "";
|
73 |
+
display: table;
|
74 |
+
clear: both;
|
75 |
+
}
|
76 |
+
}
|
app/assets/admin/css/widget.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#rtmedia_dashboard_widget .rtm-column{width:46%}#rtmedia_dashboard_widget table{border-top:1px solid #ECECEC;margin-top:6px;padding-top:6px}#rtmedia_dashboard_widget td{padding:3px 0}#rtmedia_dashboard_widget .b{padding-right:5px;text-align:right;width:1%}#rtmedia_dashboard_widget .rtm-meta-container{border-top:1px solid #eee;clear:both;margin:12px -12px -12px;padding:0 12px}#rtmedia_dashboard_widget .rtm-meta-links{list-style:none;margin:0;padding:0}#rtmedia_dashboard_widget .rtm-meta-links li{display:inline-block;margin:0;position:relative}#rtmedia_dashboard_widget .rtm-meta-links li:after{background:#ddd;content:' ';height:14px;position:absolute;right:-1px;top:13px;width:1px}#rtmedia_dashboard_widget .rtm-meta-links li:first-child:after,#rtmedia_dashboard_widget .rtm-meta-links li:last-child:after{display:none}#rtmedia_dashboard_widget .rtm-meta-links a{display:block;padding:10px 8px}.clearfix:after{content:"";display:table;clear:both}
|
app/assets/admin/img/audio_thumb.png
ADDED
Binary file
|
app/assets/admin/img/boxspinner.gif
ADDED
Binary file
|
app/assets/admin/img/image_thumb.png
ADDED
Binary file
|
app/assets/admin/img/rtDating.png
ADDED
Binary file
|
app/assets/admin/img/rtMedia-pro-ad.png
ADDED
Binary file
|
app/assets/admin/img/rtcamp-logo.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-ffmpeg-240x184.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-instagram-240x184.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-kaltura-240x184.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-logo.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-membership-240x184.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-phototagging-240x184.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-social-sync-240x184.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-theme-InspireBook.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-theme-klein.jpg
ADDED
Binary file
|
app/assets/admin/img/rtmedia-theme-kleo.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-theme-msocial.jpg
ADDED
Binary file
|
app/assets/admin/img/rtmedia-theme-sweetdate.png
ADDED
Binary file
|
app/assets/admin/img/rtmedia-watermark-240x184.png
ADDED
Binary file
|
app/assets/admin/img/thumb_default.png
ADDED
Binary file
|
app/assets/admin/img/video_thumb.png
ADDED
Binary file
|
app/assets/admin/js/admin-min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* rtMedia JavaScript Library
|
3 |
+
* @package rtMedia
|
4 |
+
*/function rtmedia_addon_do_not_show(){var a={action:"rtmedia_addon_popup_not_show_again"};jQuery.post(rtmedia_admin_ajax,a,function(a){jQuery("#TB_window").remove(),jQuery("#TB_overlay").remove()})}"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.elem=c,d.$elem=a(c),d.options=a.extend({},a.fn.rtTab.options,b),d.rtTabs()},rtTabs:function(){var c=this,d=c.options.activeTab;c.$elem.find("li:nth-child("+d+")").addClass("active"),c.rtTabContent(activeTabContent="yes"),c.rtClick();var e="false"===c.$elem.attr("data-hash")?!1:!0;if(e===!0){var f=b.location.hash;f&&c.$elem.find("li").find("a[href="+f+"]").trigger("click"),a(b).on("hashchange",function(){var a=b.location.hash;c.$elem.find("li").find("a[href="+a+"]").trigger("click")})}},rtClick:function(){var c=this,d=c.$elem.find("li"),e=d.find("a");e.on("click",function(e){e.preventDefault(),d.removeClass("active"),c.rtTabContent(),a(this).parent().addClass("active");var f=a(this).attr("href");a(f).removeClass("hide");var g="false"===c.$elem.attr("data-hash")?!1:!0;if(g===!0){var h=a(b).scrollTop();location.hash=a(this).attr("href"),a(b).scrollTop(h)}"function"==typeof c.options.onComplete&&c.options.onComplete.apply(c.elem,arguments)})},rtTabContent:function(b){var c=this,d=c.$elem.find("li"),e=d.find("a");e.each(function(){var c=a(this),d=c.attr("href");"yes"===b?c.parent().hasClass("active")||a(d).addClass("hide"):a(d).addClass("hide")})}};a.fn.rtTab=function(b){return this.each(function(){var c=Object.create(e);c.init(b,this),a.data(this,"rtTab",c)})},a.fn.rtTab.options={activeTab:1,onComplete:null}}(jQuery,window,document),jQuery(document).ready(function(a){a(".rtm-tabs").rtTab(),a('input[name^="rtmedia-options"]').on("change",function(){a(".rtm-save-settings-msg").remove(),0===a(".rtm-fly-warning").length&&(a(".rtm-button-container.top").prepend('<div class="rtm-warning rtm-fly-warning hide">Settings have changed, you should save them!</div>'),a(".rtm-fly-warning").slideDown())}),a(".rtm-img-size-setting .form-table tr:nth-child(7) td:last-child").attr("colspan","3"),a(".rtm-field-wrap .switch input[type=checkbox]").each(function(){var b=a(this);b.parents("table").attr("data-depends")||(b.is(":checked")?(b.parents("table").next(".rtm-notice").slideDown(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideDown()})):(b.parents("table").next(".rtm-notice").slideUp(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideUp()}))),b.parents("tr").next("tr").attr("data-depends")&&(b.is(":checked")?b.parents("tr").next("tr").slideDown():b.parents("tr").next("tr").slideUp())}),a(".rtm-field-wrap .switch input[type=checkbox]").on("change",function(){var b=a(this);b.parents("table").attr("data-depends")||(b.parents("table").next(".rtm-notice").slideToggle(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideToggle()})),b.parents("tr").next("tr").attr("data-depends")&&b.parents("tr").next("tr").slideToggle()});{var b=Backbone.View.extend({el:a(".bp-media-admin"),events:{"click .rtm-theme":"render","click .rtm-close":"close","click .rtm-previous":"previousTheme","click .rtm-next":"nextTheme",keyup:"keyEvent"},initialize:function(){_.bindAll(this,"render","close","nextTheme","previousTheme","keyEvent"),this.keyEvent()},render:function(b){a(".rtm-theme").removeClass("rtm-modal-open");var c=a(b.currentTarget).addClass("rtm-modal-open").find(".rtm-theme-content").html();a(".rtm-theme-overlay")[0]?(a(".rtm-theme-overlay").show(),a(this.el).find(".rtm-theme-content-wrap").empty().append(c)):a(this.el).append('<div class="theme-overlay rtm-theme-overlay"><div class="theme-backdrop rtm-close"></div><div class="rtm-theme-content-wrap">'+c+"</div></div>"),a(b.currentTarget).is(":first-child")?a(".rtm-previous").addClass("disabled"):a(b.currentTarget).is(":last-child")?a(".rtm-next").addClass("disabled"):a(".rtm-next, .rtm-previous").removeClass("disabled")},close:function(){a(".rtm-theme").removeClass("rtm-modal-open"),a(".rtm-theme-overlay").hide(),a(".rtm-next, .rtm-previous").removeClass("disabled")},nextTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1},previousTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1},keyEvent:function(){a("body").on("keyup",function(b){return 39===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1):37===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1):void(27===b.keyCode&&a(".rtm-close").trigger("click"))})}});new b}}),jQuery(document).ready(function(a){function b(a){return jQuery.post(ajaxurl,a,function(b){if(0!=b){var c=!1,d=Math.ceil((20*parseInt(b)+parseInt(a.values.finished))/parseInt(a.values.total)*100);d>100&&(d=100,c=!0),jQuery("#rtprogressbar>div").css("width",d+"%"),finished=jQuery("#rtprivacyinstaller span.finished").html(),jQuery("#rtprivacyinstaller span.finished").html(parseInt(finished)+a.count),c&&jQuery.post(ajaxurl,{action:"rtmedia_privacy_redirect"},function(a){window.location=settings_url})}else jQuery("#map_progress_msgs").html('<div class="map_mapping_failure">Row '+b+" failed.</div>")})}function c(a){return jQuery.getJSON(ajaxurl,a,function(b){if(favorites=!1,b){var c=Math.ceil((5*parseInt(b.page)+parseInt(a.values.finished))/parseInt(a.values.total)*100);comments_total=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.total").html(),users_total=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.total").html(),media_total=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.total").html(),comments_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(),users_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html();var f=Math.ceil((parseInt(b.comments)+parseInt(comments_finished))/parseInt(comments_total)*100),g=Math.ceil(parseInt(b.users)/parseInt(users_total)*100);(c>100||100==c)&&(c=100,favorites=!0),jQuery(".bp-album-media #rtprogressbar>div").css("width",c+"%"),jQuery(".bp-album-comments #rtprogressbar>div").css("width",f+"%"),jQuery(".bp-album-users #rtprogressbar>div").css("width",g+"%"),media_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(),parseInt(media_finished)<parseInt(media_total)&&jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(parseInt(media_finished)+a.count),jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(parseInt(b.comments)+parseInt(comments_finished)),jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html(parseInt(b.users)),favorites&&(favorite_data={action:"rtmedia_rt_album_import_favorites"},jQuery.post(ajaxurl,favorite_data,function(a){if(0!==a.favorites||"0"!==a.favorites){jQuery(".bp-album-favorites").length||jQuery(".bp-album-comments").after('<br /><div class="bp-album-favorites"><strong>User\'s Favorites: <span class="finished">0</span> / <span class="total">'+a.users+'</span></strong><div id="rtprogressbar"><div style="width:0%"></div></div></div>'),$favorites={},0!=a.offset||"0"!=a.offset?start=1*a.offset+1:start=1;for(var b=start;b<=a.users;b++)$count=1,b==a.users&&($count=parseInt(a.users%$count),0==$count&&($count=1)),newvals={action:"rtmedia_rt_album_import_step_favorites",offset:1*(b-1),redirect:b==a.users},$favorites[b]=newvals;var c=jQuery.Deferred();c.resolve(),jQuery.each($favorites,function(a,b){c=c.pipe(function(){return d(b)})})}else window.setTimeout(e,2e3)},"json"))}else jQuery("#map_progress_msgs").html('<div class="map_mapping_failure">Row '+b.page+" failed.</div>")})}function d(a){return jQuery.post(ajaxurl,a,function(a){redirect=!1,favorites_total=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.total").html(),favorites_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(),jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(parseInt(favorites_finished)+1);var b=Math.ceil(parseInt(favorites_finished+1)/parseInt(favorites_total)*100);(b>100||100==b)&&(b=100,redirect=!0),jQuery(".bp-album-favorites #rtprogressbar>div").css("width",b+"%"),redirect&&window.setTimeout(e,2e3)})}function e(){window.location=document.URL}a(".rtm-save-settings-msg").length>0&&setTimeout(function(){a(".rtm-save-settings-msg").remove()},1e4),jQuery("#spread-the-word").on("click","#bp-media-add-linkback",function(){var a={action:"rtmedia_linkback",linkback:jQuery("#bp-media-add-linkback:checked").length};jQuery.post(rtmedia_admin_ajax,a,function(a){})}),jQuery("#bp-media-settings-boxes").on("change","#select-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html('<div class="support_form_loader"></div>');var a={action:"rtmedia_select_request",form:jQuery(this).val()};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("click","#cancel-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html('<div class="support_form_loader"></div>');var a={action:"rtmedia_cancel_request"};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("submit","#bp_media_settings_form, .rtmedia-settings-submit",function(a){var b=!0,c=new RegExp("^[0-9]+$");jQuery("input[name*='defaultSizes']").each(function(a){return c.test(jQuery(this).val())?void 0:(alert("Invalid value for "+jQuery(this).attr("name").replace("rtmedia-options[defaultSizes_","").replace("]","").replace(/_/g," ").replace(/(\b)([a-zA-Z] )/g,function(a){return a.toUpperCase()})),b=!1,!1)});var d=jQuery('input[name^="rtmedia-options[general_videothumbs]"]');if(b&&d.length>0&&"undefined"!=typeof d){var e="",f=0;if(d.val()<=0?(e+="Number of video thumbnails to be generated should be greater than 0 in media sizes settings. Setting it to default value 2.",f=2):c.test(d.val())||(e+="Invalid value for Number of video thumbnails in media sizes settings. Setting it to round value "+Math.round(d.val())+".",f=Math.round(d.val())),""!=e)return alert(e),d.val(f),b=!1,!1}var g=jQuery('input[name^="rtmedia-options[general_jpeg_image_quality]"]');if(b&&g.length>0&&"undefined"!=typeof g){var e="",h=0;if(g.val()<=0?(e+="Number of percentage in JPEG image quality should be greater than 0 in media sizes settings. Setting it to default value 90.",h=90):g.val()>100?(e+="Number of percentage in JPEG image quality should be less than 100 in media sizes settings. Setting it to 100.",h=100):c.test(g.val())||(e+="Invalid value for percentage in JPEG image quality in media sizes settings. Setting it to round value "+Math.round(g.val())+".",h=Math.round(g.val())),""!=e)return alert(e),g.val(h),b=!1,!1}var i=jQuery('input[name^="rtmedia-options[general_perPageMedia]"]');if(b&&i.length>0&&"undefined"!=typeof i){var e="",j=0;if(i.val()<1?(e+="Please enter positive integer value only. Setting number of media per page value to default value 10.",j=10):jQuery.isNumeric(i.val())&&Math.floor(i.val())!=i.val()&&(e+="Please enter positive integer value only. Setting number of media per page value to round value "+Math.round(i.val())+".",j=Math.round(i.val())),""!=e)return alert(e),i.val(j),b=!1,!1}b||a.preventDefault()}),jQuery(document).on("click","#bpm-services .encoding-try-now,#rtm-services .encoding-try-now",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.are_you_sure)){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_free_encoding_subscribe"};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),document.location.href=b+"&apikey="+a.apikey+c}else jQuery(".encoding-try-now").next().remove(),jQuery("#settings-error-encoding-error").remove(),jQuery("#bp-media-settings-boxes").before('<div class="error" id="settings-error-encoding-error"><p>'+a.error+"</p></div>")})}}),jQuery(document).on("click","#api-key-submit",function(a){a.preventDefault(),0==jQuery(this).next("img").length&&jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_enter_api_key",apikey:jQuery("#new-api-key").val()};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),-1==b.toString().indexOf("&apikey="+a.apikey)&&(b+="&apikey="+a.apikey),-1==b.toString().indexOf("&update=true")&&(b+="&update=true"),document.location.href=b+c}else jQuery("#settings-error-api-key-error").remove(),jQuery("h2:first").after('<div class="error" id="settings-error-api-key-error"><p>'+a.error+"</p></div>");jQuery("#api-key-submit").next("img").remove()})}),jQuery(document).on("click","#disable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.disable_encoding)){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_disable_encoding"};jQuery.post(ajaxurl,b,function(a){a?(jQuery(".settings-error-encoding-disabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0?jQuery("#settings-encoding-successfully-updated p").html(a):jQuery("h2:first").after('<div class="updated" id="settings-encoding-successfully-updated"><p>'+a+"</p></div>"),jQuery("#rtmedia-encoding-usage").hide(),jQuery("#disable-encoding").next("img").remove(),jQuery("#disable-encoding").hide(),jQuery("#enable-encoding").show()):(jQuery("#settings-error-encoding-disabled").remove(),jQuery("h2:first").after('<div class="error" id="settings-error-encoding-disabled"><p>'+rtmedia_admin_strings.something_went_wrong+"</p></div>"))})}}),jQuery(document).on("click","#enable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.enable_encoding)){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var b={action:"rtmedia_enable_encoding"};jQuery.post(ajaxurl,b,function(a){a?(jQuery(".settings-error-encoding-enabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0?jQuery("#settings-encoding-successfully-updated p").html(a):jQuery("h2:first").after('<div class="updated" id="settings-encoding-successfully-updated"><p>'+a+"</p></div>"),jQuery("#enable-encoding").next("img").remove(),jQuery("#enable-encoding").hide(),jQuery("#disable-encoding").show()):(jQuery("#settings-error-encoding-disabled").remove(),jQuery("h2:first").after('<div class="error" id="settings-error-encoding-enabled"><p>'+rtmedia_admin_strings.something_went_wrong+"</p></div>"))})}}),jQuery(".bp-media-encoding-table").on("click",".bpm-unsubscribe",function(a){a.preventDefault(),jQuery("#bpm-unsubscribe-dialog").dialog({dialogClass:"wp-dialog",modal:!0,buttons:{Unsubscribe:function(){jQuery(this).dialog("close"),jQuery(".bpm-unsubscribe").after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var a={action:"rtmedia_unsubscribe_encoding_service",note:jQuery("#bpm-unsubscribe-note").val(),plan:jQuery(".bpm-unsubscribe").attr("data-plan"),price:jQuery(".bpm-unsubscribe").attr("data-price")};jQuery.getJSON(ajaxurl,a,function(a){void 0===a.error&&a.updated?(jQuery(".bpm-unsubscribe").next().remove(),jQuery(".bpm-unsubscribe").after(a.form),jQuery(".bpm-unsubscribe").remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove(),jQuery("h2:first").after('<div class="updated" id="settings-unsubscribed-successfully"><p>'+a.updated+"</p></div>"),window.location.hash="#settings-unsubscribed-successfully"):(jQuery(".bpm-unsubscribe").next().remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove(),jQuery("h2:first").after('<div class="error" id="settings-unsubscribe-error"><p>'+a.error+"</p></div>"),window.location.hash="#settings-unsubscribe-error")})}}})}),jQuery("#bpmedia-bpalbumimporter").on("change","#bp-album-import-accept",function(){jQuery(".bp-album-import-accept").toggleClass("i-accept"),jQuery(".bp-album-importer-wizard").slideToggle()}),jQuery("#rtprivacyinstall").click(function(a){a.preventDefault(),$progress_parent=jQuery("#rtprivacyinstaller"),$progress_parent.find(".rtprivacytype").each(function(){if($type=jQuery(this).attr("id"),"total"==$type){$values=[],jQuery(this).find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),$data={};for(var a=1;a<=$values.steps[0];a++)$count=20,a==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=20)),newvals={page:a,action:"rtmedia_privacy_install",count:$count,values:$values},$data[a]=newvals;var c=jQuery.Deferred();c.resolve(),jQuery.each($data,function(a,d){c=c.pipe(function(){return b(d)})})}})}),jQuery("#bpmedia-bpalbumimport-cleanup").click(function(a){a.preventDefault(),jQuery.post(ajaxurl,{action:"rtmedia_rt_album_cleanup"},function(a){window.location=settings_rt_album_import_url})}),jQuery("#bpmedia-bpalbumimporter").on("click","#bpmedia-bpalbumimport",function(a){if(a.preventDefault(),!jQuery("#bp-album-import-accept").prop("checked")){jQuery("html, body").animate({scrollTop:jQuery("#bp-album-import-accept").offset().top},500);var b=jQuery(".bp-album-import-accept"),d=500,e="#FFEBE8",f=3;return void function h(){b.css("background-color","#EE0000"),setTimeout(function(){b.css("background-color",e),--f&&setTimeout(h,d)},d)}()}jQuery(this).prop("disabled",!0),wp_admin_url=ajaxurl.replace("admin-ajax.php",""),jQuery(".bpm-ajax-loader").length||jQuery(this).after(' <img class="bpm-ajax-loader" src="'+wp_admin_url+'images/wpspin_light.gif" /> <strong>'+rtmedia_admin_strings.no_refresh+"</strong>"),$progress_parent=jQuery("#bpmedia-bpalbumimport"),$values=[],jQuery(this).parent().find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),0==$values.steps[0]&&($values.steps[0]=1),$data={};for(var f=1;f<=$values.steps[0];f++)$count=5,f==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=5)),newvals={page:f,action:"rtmedia_rt_album_import",count:$count,values:$values},$data[f]=newvals;var g=jQuery.Deferred();g.resolve(),jQuery.each($data,function(a,b){g=g.pipe(function(){return c(b)})})}),jQuery("#bp-media-settings-boxes").on("click",".interested",function(){jQuery(".interested-container").removeClass("hidden"),jQuery(".choice-free").attr("required","required")}),jQuery("#bp-media-settings-boxes").on("click",".not-interested",function(){jQuery(".interested-container").addClass("hidden"),jQuery(".choice-free").removeAttr("required")}),jQuery("#video-transcoding-main-container").on("click",".video-transcoding-survey",function(a){a.preventDefault();var b={action:"rtmedia_convert_videos_form",email:jQuery(".email").val(),url:jQuery(".url").val(),choice:jQuery('input[name="choice"]:checked').val(),interested:jQuery('input[name="interested"]:checked').val()};return jQuery.post(ajaxurl,b,function(a){jQuery("#video-transcoding-main-container").html("<p><strong>"+a+"</strong></p>")}),!1}),jQuery("#bpmedia-bpalbumimporter").on("click",".deactivate-bp-album",function(a){a.preventDefault(),$bpalbum=jQuery(this);var b={action:"rtmedia_rt_album_deactivate"};jQuery.get(ajaxurl,b,function(a){a?location.reload():$bpalbum.parent().after("<p>"+rtmedia_admin_strings.something_went_wrong+"</p>")})}),jQuery(".updated").on("click",".bpm-hide-encoding-notice",function(){jQuery(this).after('<img style="margin: 0 0 0 10px" src="'+rtmedia_admin_url+'images/wpspin_light.gif" />');var a={action:"rtmedia_hide_encoding_notice"};jQuery.post(ajaxurl,a,function(a){a&&jQuery(".bpm-hide-encoding-notice").closest(".updated").remove()})}),jQuery("#rtmedia-bp-enable-activity").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtmedia-bp-activity-setting").prop("disabled",!1):jQuery(".rtmedia-bp-activity-setting").prop("disabled",!0)});var f="",g="";void 0!==rtmedia_on_label&&(f='data-on-label="'+rtmedia_on_label+'"'),void 0!==rtmedia_off_label&&(g='data-off-label="'+rtmedia_off_label+'"'),jQuery("#rtmedia-submit-request").click(function(){var b=jQuery("#name").val(),c=jQuery("#email").val(),d=jQuery("#website").val(),e=jQuery("#phone").val(),f=jQuery("#subject").val(),g=jQuery("#details").val(),h=jQuery('input[name="request_type"]').val(),i=jQuery('input[name="request_id"]').val(),j=jQuery('input[name="server_address"]').val(),k=jQuery('input[name="ip_address"]').val(),l=jQuery('input[name="server_type"]').val(),m=jQuery('input[name="user_agent"]').val(),n={name:b,email:c,website:d,phone:e,subject:f,details:g,request_id:i,request_type:"premium_support",server_address:j,ip_address:k,server_type:l,user_agent:m};if("bug_report"==h){var o=jQuery("#wp_admin_username").val();if(""==o)return alert("Please enter WP Admin Login."),!1;var p=jQuery("#wp_admin_pwd").val();if(""==p)return alert("Please enter WP Admin password."),!1;var q=jQuery("#ssh_ftp_host").val();if(""==q)return alert("Please enter SSH / FTP host."),!1;var r=jQuery("#ssh_ftp_username").val();if(""==r)return alert("Please enter SSH / FTP login."),!1;var s=jQuery("#ssh_ftp_pwd").val();if(""==s)return alert("Please enter SSH / FTP password."),!1;n={name:b,email:c,website:d,phone:e,subject:f,details:g,request_id:i,request_type:"premium_support",server_address:j,ip_address:k,server_type:l,user_agent:m,wp_admin_username:o,wp_admin_pwd:p,ssh_ftp_host:q,ssh_ftp_username:r,ssh_ftp_pwd:s}}for(formdata in n)if(""==n[formdata]&&"phone"!=formdata)return alert("Please enter "+formdata.replace("_"," ")+" field."),!1;return data={action:"rtmedia_submit_request",form_data:n},jQuery.post(ajaxurl,data,function(b){return b=b.trim(),"false"==b?(alert("Please fill all the fields."),!1):(a("#rtmedia_service_contact_container").empty(),void a("#rtmedia_service_contact_container").append(b))}),!1}),jQuery("#cancel-request").click(function(){return!1}),jQuery(".rtm_enable_masonry_view input[type=checkbox]").is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide(),jQuery(".rtm_enable_masonry_view input[type=checkbox]").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide()}),jQuery("#rtm-masonry-change-thumbnail-info").click(function(a){jQuery("html, body").animate({scrollTop:0},"500","swing")})}),jQuery(window).load(function(){jQuery(".rtmedia-addon-thickbox").trigger("click")});
|
app/assets/admin/js/admin.js
ADDED
@@ -0,0 +1,781 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( document ).ready( function ( $ ) {
|
2 |
+
|
3 |
+
// Hide settings saved message
|
4 |
+
if ( $( '.rtm-save-settings-msg' ).length > 0 ) {
|
5 |
+
setTimeout( function () {
|
6 |
+
$( '.rtm-save-settings-msg' ).remove();
|
7 |
+
}, 10000 );
|
8 |
+
}
|
9 |
+
|
10 |
+
/* Linkback */
|
11 |
+
jQuery( '#spread-the-word' ).on( 'click', '#bp-media-add-linkback', function () {
|
12 |
+
var data = {
|
13 |
+
action: 'rtmedia_linkback',
|
14 |
+
linkback: jQuery( '#bp-media-add-linkback:checked' ).length
|
15 |
+
};
|
16 |
+
jQuery.post( rtmedia_admin_ajax, data, function ( response ) {
|
17 |
+
} );
|
18 |
+
} );
|
19 |
+
|
20 |
+
/* Select Request */
|
21 |
+
jQuery( '#bp-media-settings-boxes' ).on( 'change', '#select-request', function () {
|
22 |
+
if ( jQuery( this ).val() ) {
|
23 |
+
jQuery( '#bp_media_settings_form .bp-media-metabox-holder' ).html()
|
24 |
+
jQuery( '#bp_media_settings_form .bp-media-metabox-holder' ).html( '<div class="support_form_loader"></div>' );
|
25 |
+
var data = {
|
26 |
+
action: 'rtmedia_select_request',
|
27 |
+
form: jQuery( this ).val()
|
28 |
+
};
|
29 |
+
|
30 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
31 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
32 |
+
jQuery( '#bp_media_settings_form .bp-media-metabox-holder' ).html()
|
33 |
+
jQuery( '#bp_media_settings_form .bp-media-metabox-holder' ).html( response ).fadeIn( 'slow' );
|
34 |
+
} );
|
35 |
+
}
|
36 |
+
} );
|
37 |
+
|
38 |
+
/* Cancel Request */
|
39 |
+
jQuery( '#bp-media-settings-boxes' ).on( 'click', '#cancel-request', function () {
|
40 |
+
if ( jQuery( this ).val() ) {
|
41 |
+
jQuery( '#bp_media_settings_form .bp-media-metabox-holder' ).html()
|
42 |
+
jQuery( '#bp_media_settings_form .bp-media-metabox-holder' ).html( '<div class="support_form_loader"></div>' );
|
43 |
+
var data = {
|
44 |
+
action: 'rtmedia_cancel_request'
|
45 |
+
};
|
46 |
+
|
47 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
48 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
49 |
+
jQuery( '#bp_media_settings_form .bp-media-metabox-holder' ).html()
|
50 |
+
jQuery( '#bp_media_settings_form .bp-media-metabox-holder' ).html( response ).fadeIn( 'slow' );
|
51 |
+
} );
|
52 |
+
}
|
53 |
+
} );
|
54 |
+
|
55 |
+
/* Submit Request */
|
56 |
+
|
57 |
+
jQuery( '#bp-media-settings-boxes' ).on( 'submit', '#bp_media_settings_form, .rtmedia-settings-submit', function ( e ) {
|
58 |
+
var return_code = true;
|
59 |
+
var reg = new RegExp( '^[0-9]+$' );
|
60 |
+
|
61 |
+
jQuery( "input[name*='defaultSizes']" ).each( function ( el ) {
|
62 |
+
if ( !reg.test( jQuery( this ).val() ) ) {
|
63 |
+
alert( "Invalid value for " + jQuery( this ).attr( 'name' ).replace( 'rtmedia-options[defaultSizes_', '' ).replace( ']', '' ).replace( /_/g, ' ' ).replace( /(\b)([a-zA-Z] )/g, function ( firstLetter ) {
|
64 |
+
return firstLetter.toUpperCase();
|
65 |
+
} ) );
|
66 |
+
return_code = false;
|
67 |
+
return false;
|
68 |
+
}
|
69 |
+
} );
|
70 |
+
|
71 |
+
var general_videothumb = jQuery( 'input[name^="rtmedia-options[general_videothumbs]"]' );
|
72 |
+
if ( return_code && general_videothumb.length > 0 && typeof general_videothumb != "undefined" ) {
|
73 |
+
var error_msg = "";
|
74 |
+
var general_videothumb_val = 0;
|
75 |
+
if ( general_videothumb.val() <= 0 ) {
|
76 |
+
error_msg += "Number of video thumbnails to be generated should be greater than 0 in media sizes settings. Setting it to default value 2.";
|
77 |
+
general_videothumb_val = 2;
|
78 |
+
} else if ( !reg.test( general_videothumb.val() ) ) {
|
79 |
+
error_msg += 'Invalid value for Number of video thumbnails in media sizes settings. Setting it to round value ' + Math.round( general_videothumb.val() ) + ".";
|
80 |
+
general_videothumb_val = Math.round( general_videothumb.val() );
|
81 |
+
}
|
82 |
+
if ( error_msg != "" ) {
|
83 |
+
alert( error_msg );
|
84 |
+
general_videothumb.val( general_videothumb_val );
|
85 |
+
return_code = false;
|
86 |
+
return false;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
var general_jpeg_image_quality = jQuery( 'input[name^="rtmedia-options[general_jpeg_image_quality]"]' );
|
91 |
+
if ( return_code && general_jpeg_image_quality.length > 0 && typeof general_jpeg_image_quality != "undefined" ) {
|
92 |
+
var error_msg = "";
|
93 |
+
var general_jpeg_image_quality_val = 0;
|
94 |
+
if ( general_jpeg_image_quality.val() <= 0 ) {
|
95 |
+
error_msg += "Number of percentage in JPEG image quality should be greater than 0 in media sizes settings. Setting it to default value 90.";
|
96 |
+
general_jpeg_image_quality_val = 90;
|
97 |
+
} else if ( general_jpeg_image_quality.val() > 100 ) {
|
98 |
+
error_msg += "Number of percentage in JPEG image quality should be less than 100 in media sizes settings. Setting it to 100.";
|
99 |
+
general_jpeg_image_quality_val = 100;
|
100 |
+
} else if ( !reg.test( general_jpeg_image_quality.val() ) ) {
|
101 |
+
error_msg += 'Invalid value for percentage in JPEG image quality in media sizes settings. Setting it to round value ' + Math.round( general_jpeg_image_quality.val() ) + ".";
|
102 |
+
general_jpeg_image_quality_val = Math.round( general_jpeg_image_quality.val() );
|
103 |
+
}
|
104 |
+
if ( error_msg != "" ) {
|
105 |
+
alert( error_msg );
|
106 |
+
general_jpeg_image_quality.val( general_jpeg_image_quality_val );
|
107 |
+
return_code = false;
|
108 |
+
return false;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
var general_perPageMedia = jQuery( 'input[name^="rtmedia-options[general_perPageMedia]"]' );
|
113 |
+
if ( return_code && general_perPageMedia.length > 0 && typeof general_perPageMedia != "undefined" ) {
|
114 |
+
var error_msg = "";
|
115 |
+
var general_perPageMedia_val = 0;
|
116 |
+
if ( general_perPageMedia.val() < 1 ) {
|
117 |
+
error_msg += "Please enter positive integer value only. Setting number of media per page value to default value 10.";
|
118 |
+
general_perPageMedia_val = 10;
|
119 |
+
} else if ( jQuery.isNumeric( general_perPageMedia.val() ) && ( Math.floor( general_perPageMedia.val() ) != general_perPageMedia.val() ) ) {
|
120 |
+
error_msg += "Please enter positive integer value only. Setting number of media per page value to round value " + Math.round( general_perPageMedia.val() ) + ".";
|
121 |
+
general_perPageMedia_val = Math.round( general_perPageMedia.val() );
|
122 |
+
}
|
123 |
+
if ( error_msg != "" ) {
|
124 |
+
alert( error_msg );
|
125 |
+
general_perPageMedia.val( general_perPageMedia_val );
|
126 |
+
return_code = false;
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
if ( !return_code ) {
|
132 |
+
e.preventDefault();
|
133 |
+
}
|
134 |
+
} );
|
135 |
+
|
136 |
+
jQuery( document ).on( 'click', "#bpm-services .encoding-try-now,#rtm-services .encoding-try-now", function ( e ) {
|
137 |
+
e.preventDefault();
|
138 |
+
if ( confirm( rtmedia_admin_strings.are_you_sure ) ) {
|
139 |
+
jQuery( this ).after( '<img style="margin: 0 0 0 10px" src="' + rtmedia_admin_url + 'images/wpspin_light.gif" />' )
|
140 |
+
var data = {
|
141 |
+
action: 'rtmedia_free_encoding_subscribe'
|
142 |
+
};
|
143 |
+
|
144 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
145 |
+
jQuery.getJSON( ajaxurl, data, function ( response ) {
|
146 |
+
if ( response.error === undefined && response.apikey ) {
|
147 |
+
var tempUrl = window.location.href;
|
148 |
+
var hash = window.location.hash;
|
149 |
+
tempUrl = tempUrl.replace( hash, '' );
|
150 |
+
document.location.href = tempUrl + '&apikey=' + response.apikey + hash;
|
151 |
+
} else {
|
152 |
+
jQuery( '.encoding-try-now' ).next().remove();
|
153 |
+
jQuery( '#settings-error-encoding-error' ).remove();
|
154 |
+
jQuery( '#bp-media-settings-boxes' ).before( '<div class="error" id="settings-error-encoding-error"><p>' + response.error + '</p></div>' );
|
155 |
+
}
|
156 |
+
} );
|
157 |
+
}
|
158 |
+
} );
|
159 |
+
|
160 |
+
jQuery( document ).on( 'click', '#api-key-submit', function ( e ) {
|
161 |
+
e.preventDefault();
|
162 |
+
|
163 |
+
if ( jQuery( this ).next( 'img' ).length == 0 ) {
|
164 |
+
jQuery( this ).after( '<img style="margin: 0 0 0 10px" src="' + rtmedia_admin_url + 'images/wpspin_light.gif" />' );
|
165 |
+
}
|
166 |
+
|
167 |
+
var data = {
|
168 |
+
action: 'rtmedia_enter_api_key',
|
169 |
+
apikey: jQuery( '#new-api-key' ).val()
|
170 |
+
};
|
171 |
+
|
172 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
173 |
+
jQuery.getJSON( ajaxurl, data, function ( response ) {
|
174 |
+
if ( response.error === undefined && response.apikey ) {
|
175 |
+
var tempUrl = window.location.href;
|
176 |
+
var hash = window.location.hash;
|
177 |
+
tempUrl = tempUrl.replace( hash, '' );
|
178 |
+
|
179 |
+
if ( tempUrl.toString().indexOf( '&apikey=' + response.apikey ) == -1 ) {
|
180 |
+
tempUrl += '&apikey=' + response.apikey;
|
181 |
+
}
|
182 |
+
if ( tempUrl.toString().indexOf( '&update=true' ) == -1 ) {
|
183 |
+
tempUrl += '&update=true';
|
184 |
+
}
|
185 |
+
|
186 |
+
document.location.href = tempUrl + hash;
|
187 |
+
} else {
|
188 |
+
jQuery( '#settings-error-api-key-error' ).remove();
|
189 |
+
jQuery( 'h2:first' ).after( '<div class="error" id="settings-error-api-key-error"><p>' + response.error + '</p></div>' );
|
190 |
+
}
|
191 |
+
|
192 |
+
jQuery( '#api-key-submit' ).next( 'img' ).remove();
|
193 |
+
} );
|
194 |
+
} );
|
195 |
+
|
196 |
+
jQuery( document ).on( 'click', '#disable-encoding', function ( e ) {
|
197 |
+
e.preventDefault();
|
198 |
+
if ( confirm( rtmedia_admin_strings.disable_encoding ) ) {
|
199 |
+
jQuery( this ).after( '<img style="margin: 0 0 0 10px" src="' + rtmedia_admin_url + 'images/wpspin_light.gif" />' )
|
200 |
+
var data = {
|
201 |
+
action: 'rtmedia_disable_encoding'
|
202 |
+
};
|
203 |
+
|
204 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
205 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
206 |
+
if ( response ) {
|
207 |
+
jQuery( '.settings-error-encoding-disabled' ).remove();
|
208 |
+
|
209 |
+
if ( jQuery( '#settings-encoding-successfully-updated' ).length > 0 ) {
|
210 |
+
jQuery( '#settings-encoding-successfully-updated p' ).html( response );
|
211 |
+
} else {
|
212 |
+
jQuery( 'h2:first' ).after( '<div class="updated" id="settings-encoding-successfully-updated"><p>' + response + '</p></div>' );
|
213 |
+
}
|
214 |
+
|
215 |
+
jQuery( '#rtmedia-encoding-usage' ).hide();
|
216 |
+
jQuery( '#disable-encoding' ).next( 'img' ).remove();
|
217 |
+
jQuery( '#disable-encoding' ).hide();
|
218 |
+
jQuery( '#enable-encoding' ).show();
|
219 |
+
} else {
|
220 |
+
jQuery( '#settings-error-encoding-disabled' ).remove();
|
221 |
+
jQuery( 'h2:first' ).after( '<div class="error" id="settings-error-encoding-disabled"><p>' + rtmedia_admin_strings.something_went_wrong + '</p></div>' );
|
222 |
+
}
|
223 |
+
} );
|
224 |
+
}
|
225 |
+
} );
|
226 |
+
|
227 |
+
jQuery( document ).on( 'click', '#enable-encoding', function ( e ) {
|
228 |
+
e.preventDefault();
|
229 |
+
if ( confirm( rtmedia_admin_strings.enable_encoding ) ) {
|
230 |
+
jQuery( this ).after( '<img style="margin: 0 0 0 10px" src="' + rtmedia_admin_url + 'images/wpspin_light.gif" />' )
|
231 |
+
var data = {
|
232 |
+
action: 'rtmedia_enable_encoding'
|
233 |
+
};
|
234 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
235 |
+
if ( response ) {
|
236 |
+
jQuery( '.settings-error-encoding-enabled' ).remove();
|
237 |
+
|
238 |
+
if ( jQuery( '#settings-encoding-successfully-updated' ).length > 0 ) {
|
239 |
+
jQuery( '#settings-encoding-successfully-updated p' ).html( response );
|
240 |
+
} else {
|
241 |
+
jQuery( 'h2:first' ).after( '<div class="updated" id="settings-encoding-successfully-updated"><p>' + response + '</p></div>' );
|
242 |
+
}
|
243 |
+
|
244 |
+
jQuery( '#enable-encoding' ).next( 'img' ).remove();
|
245 |
+
jQuery( '#enable-encoding' ).hide();
|
246 |
+
jQuery( '#disable-encoding' ).show();
|
247 |
+
} else {
|
248 |
+
jQuery( '#settings-error-encoding-disabled' ).remove();
|
249 |
+
jQuery( 'h2:first' ).after( '<div class="error" id="settings-error-encoding-enabled"><p>' + rtmedia_admin_strings.something_went_wrong + '</p></div>' );
|
250 |
+
}
|
251 |
+
} );
|
252 |
+
}
|
253 |
+
} );
|
254 |
+
|
255 |
+
jQuery( '.bp-media-encoding-table' ).on( 'click', '.bpm-unsubscribe', function ( e ) {
|
256 |
+
e.preventDefault();
|
257 |
+
// var note=prompt(bp_media_admin_strings.reason_for_unsubscribe);
|
258 |
+
jQuery( "#bpm-unsubscribe-dialog" ).dialog( {
|
259 |
+
dialogClass: "wp-dialog",
|
260 |
+
modal: true,
|
261 |
+
buttons: {
|
262 |
+
Unsubscribe: function () {
|
263 |
+
jQuery( this ).dialog( "close" );
|
264 |
+
jQuery( '.bpm-unsubscribe' ).after( '<img style="margin: 0 0 0 10px" src="' + rtmedia_admin_url + 'images/wpspin_light.gif" />' )
|
265 |
+
var data = {
|
266 |
+
action: 'rtmedia_unsubscribe_encoding_service',
|
267 |
+
note: jQuery( '#bpm-unsubscribe-note' ).val(),
|
268 |
+
plan: jQuery( '.bpm-unsubscribe' ).attr( 'data-plan' ),
|
269 |
+
price: jQuery( '.bpm-unsubscribe' ).attr( 'data-price' )
|
270 |
+
};
|
271 |
+
|
272 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
273 |
+
jQuery.getJSON( ajaxurl, data, function ( response ) {
|
274 |
+
if ( response.error === undefined && response.updated ) {
|
275 |
+
jQuery( '.bpm-unsubscribe' ).next().remove();
|
276 |
+
jQuery( '.bpm-unsubscribe' ).after( response.form );
|
277 |
+
jQuery( '.bpm-unsubscribe' ).remove();
|
278 |
+
jQuery( '#settings-unsubscribed-successfully' ).remove();
|
279 |
+
jQuery( '#settings-unsubscribe-error' ).remove();
|
280 |
+
jQuery( 'h2:first' ).after( '<div class="updated" id="settings-unsubscribed-successfully"><p>' + response.updated + '</p></div>' );
|
281 |
+
window.location.hash = '#settings-unsubscribed-successfully';
|
282 |
+
} else {
|
283 |
+
jQuery( '.bpm-unsubscribe' ).next().remove();
|
284 |
+
jQuery( '#settings-unsubscribed-successfully' ).remove();
|
285 |
+
jQuery( '#settings-unsubscribe-error' ).remove();
|
286 |
+
jQuery( 'h2:first' ).after( '<div class="error" id="settings-unsubscribe-error"><p>' + response.error + '</p></div>' );
|
287 |
+
window.location.hash = '#settings-unsubscribe-error';
|
288 |
+
}
|
289 |
+
} );
|
290 |
+
}
|
291 |
+
}
|
292 |
+
} );
|
293 |
+
|
294 |
+
} );
|
295 |
+
|
296 |
+
function fireRequest( data ) {
|
297 |
+
return jQuery.post( ajaxurl, data, function ( response ) {
|
298 |
+
if ( response != 0 ) {
|
299 |
+
var redirect = false;
|
300 |
+
var progw = Math.ceil( ( ( ( parseInt( response ) * 20 ) + parseInt( data.values[ 'finished' ] ) ) / parseInt( data.values[ 'total' ] ) ) * 100 );
|
301 |
+
if ( progw > 100 ) {
|
302 |
+
progw = 100;
|
303 |
+
redirect = true
|
304 |
+
}
|
305 |
+
;
|
306 |
+
jQuery( '#rtprogressbar>div' ).css( 'width', progw + '%' );
|
307 |
+
finished = jQuery( '#rtprivacyinstaller span.finished' ).html();
|
308 |
+
jQuery( '#rtprivacyinstaller span.finished' ).html( parseInt( finished ) + data.count );
|
309 |
+
if ( redirect ) {
|
310 |
+
jQuery.post( ajaxurl, {
|
311 |
+
action: 'rtmedia_privacy_redirect'
|
312 |
+
}, function ( response ) {
|
313 |
+
window.location = settings_url;
|
314 |
+
} );
|
315 |
+
}
|
316 |
+
} else {
|
317 |
+
jQuery( '#map_progress_msgs' ).html( '<div class="map_mapping_failure">Row ' + response + ' failed.</div>' );
|
318 |
+
}
|
319 |
+
} );
|
320 |
+
}
|
321 |
+
|
322 |
+
jQuery( '#bpmedia-bpalbumimporter' ).on( 'change', '#bp-album-import-accept', function () {
|
323 |
+
jQuery( '.bp-album-import-accept' ).toggleClass( 'i-accept' );
|
324 |
+
jQuery( '.bp-album-importer-wizard' ).slideToggle();
|
325 |
+
} );
|
326 |
+
|
327 |
+
jQuery( '#rtprivacyinstall' ).click( function ( e ) {
|
328 |
+
e.preventDefault();
|
329 |
+
$progress_parent = jQuery( '#rtprivacyinstaller' );
|
330 |
+
$progress_parent.find( '.rtprivacytype' ).each( function () {
|
331 |
+
$type = jQuery( this ).attr( 'id' );
|
332 |
+
if ( $type == 'total' ) {
|
333 |
+
$values = [];
|
334 |
+
jQuery( this ).find( 'input' ).each( function () {
|
335 |
+
|
336 |
+
$values [ jQuery( this ).attr( 'name' ) ] = [ jQuery( this ).val() ];
|
337 |
+
|
338 |
+
} );
|
339 |
+
$data = {};
|
340 |
+
for ( var i = 1; i <= $values[ 'steps' ][ 0 ]; i++ ) {
|
341 |
+
$count = 20;
|
342 |
+
if ( i == $values[ 'steps' ][ 0 ] ) {
|
343 |
+
$count = parseInt( $values[ 'laststep' ][ 0 ] );
|
344 |
+
if ( $count == 0 ) {
|
345 |
+
$count = 20
|
346 |
+
}
|
347 |
+
;
|
348 |
+
}
|
349 |
+
newvals = {
|
350 |
+
'page': i,
|
351 |
+
'action': 'rtmedia_privacy_install',
|
352 |
+
'count': $count,
|
353 |
+
'values': $values
|
354 |
+
}
|
355 |
+
$data[ i ] = newvals;
|
356 |
+
}
|
357 |
+
var $startingpoint = jQuery.Deferred();
|
358 |
+
$startingpoint.resolve();
|
359 |
+
jQuery.each( $data, function ( i, v ) {
|
360 |
+
$startingpoint = $startingpoint.pipe( function () {
|
361 |
+
return fireRequest( v );
|
362 |
+
} );
|
363 |
+
} );
|
364 |
+
|
365 |
+
|
366 |
+
}
|
367 |
+
} );
|
368 |
+
} );
|
369 |
+
|
370 |
+
function fireimportRequest( data ) {
|
371 |
+
return jQuery.getJSON( ajaxurl, data, function ( response ) {
|
372 |
+
favorites = false;
|
373 |
+
if ( response ) {
|
374 |
+
var redirect = false;
|
375 |
+
var media_progw = Math.ceil( ( ( ( parseInt( response.page ) * 5 ) + parseInt( data.values[ 'finished' ] ) ) / parseInt( data.values[ 'total' ] ) ) * 100 );
|
376 |
+
comments_total = jQuery( '#bpmedia-bpalbumimporter .bp-album-comments span.total' ).html();
|
377 |
+
users_total = jQuery( '#bpmedia-bpalbumimporter .bp-album-users span.total' ).html();
|
378 |
+
media_total = jQuery( '#bpmedia-bpalbumimporter .bp-album-media span.total' ).html();
|
379 |
+
comments_finished = jQuery( '#bpmedia-bpalbumimporter .bp-album-comments span.finished' ).html();
|
380 |
+
users_finished = jQuery( '#bpmedia-bpalbumimporter .bp-album-users span.finished' ).html();
|
381 |
+
var comments_progw = Math.ceil( ( ( ( parseInt( response.comments ) ) + parseInt( comments_finished ) ) / parseInt( comments_total ) ) * 100 );
|
382 |
+
var users_progw = Math.ceil( ( parseInt( response.users ) / parseInt( users_total ) ) * 100 );
|
383 |
+
if ( media_progw > 100 || media_progw == 100 ) {
|
384 |
+
media_progw = 100;
|
385 |
+
favorites = true
|
386 |
+
}
|
387 |
+
;
|
388 |
+
jQuery( '.bp-album-media #rtprogressbar>div' ).css( 'width', media_progw + '%' );
|
389 |
+
jQuery( '.bp-album-comments #rtprogressbar>div' ).css( 'width', comments_progw + '%' );
|
390 |
+
jQuery( '.bp-album-users #rtprogressbar>div' ).css( 'width', users_progw + '%' );
|
391 |
+
media_finished = jQuery( '#bpmedia-bpalbumimporter .bp-album-media span.finished' ).html();
|
392 |
+
if ( parseInt( media_finished ) < parseInt( media_total ) )
|
393 |
+
jQuery( '#bpmedia-bpalbumimporter .bp-album-media span.finished' ).html( parseInt( media_finished ) + data.count );
|
394 |
+
jQuery( '#bpmedia-bpalbumimporter .bp-album-comments span.finished' ).html( parseInt( response.comments ) + parseInt( comments_finished ) );
|
395 |
+
jQuery( '#bpmedia-bpalbumimporter .bp-album-users span.finished' ).html( parseInt( response.users ) );
|
396 |
+
if ( favorites ) {
|
397 |
+
favorite_data = {
|
398 |
+
'action': 'rtmedia_rt_album_import_favorites'
|
399 |
+
}
|
400 |
+
jQuery.post( ajaxurl, favorite_data, function ( response ) {
|
401 |
+
if ( response.favorites !== 0 || response.favorites !== '0' ) {
|
402 |
+
if ( !jQuery( '.bp-album-favorites' ).length )
|
403 |
+
jQuery( '.bp-album-comments' ).after( '<br /><div class="bp-album-favorites"><strong>User\'s Favorites: <span class="finished">0</span> / <span class="total">' + response.users + '</span></strong><div id="rtprogressbar"><div style="width:0%"></div></div></div>' );
|
404 |
+
$favorites = {};
|
405 |
+
if ( response.offset != 0 || response.offset != '0' )
|
406 |
+
start = response.offset * 1 + 1;
|
407 |
+
else
|
408 |
+
start = 1
|
409 |
+
for ( var i = start; i <= response.users; i++ ) {
|
410 |
+
$count = 1;
|
411 |
+
if ( i == response.users ) {
|
412 |
+
$count = parseInt( response.users % $count );
|
413 |
+
if ( $count == 0 ) {
|
414 |
+
$count = 1;
|
415 |
+
}
|
416 |
+
}
|
417 |
+
|
418 |
+
newvals = {
|
419 |
+
'action': 'rtmedia_rt_album_import_step_favorites',
|
420 |
+
'offset': ( i - 1 ) * 1,
|
421 |
+
'redirect': i == response.users
|
422 |
+
}
|
423 |
+
$favorites[ i ] = newvals;
|
424 |
+
}
|
425 |
+
var $startingpoint = jQuery.Deferred();
|
426 |
+
$startingpoint.resolve();
|
427 |
+
jQuery.each( $favorites, function ( i, v ) {
|
428 |
+
$startingpoint = $startingpoint.pipe( function () {
|
429 |
+
return fireimportfavoriteRequest( v );
|
430 |
+
} );
|
431 |
+
} );
|
432 |
+
|
433 |
+
} else {
|
434 |
+
window.setTimeout( reload_url, 2000 );
|
435 |
+
}
|
436 |
+
}, 'json' );
|
437 |
+
}
|
438 |
+
} else {
|
439 |
+
jQuery( '#map_progress_msgs' ).html( '<div class="map_mapping_failure">Row ' + response.page + ' failed.</div>' );
|
440 |
+
}
|
441 |
+
} );
|
442 |
+
}
|
443 |
+
|
444 |
+
function fireimportfavoriteRequest( data ) {
|
445 |
+
return jQuery.post( ajaxurl, data, function ( response ) {
|
446 |
+
redirect = false;
|
447 |
+
favorites_total = jQuery( '#bpmedia-bpalbumimporter .bp-album-favorites span.total' ).html();
|
448 |
+
favorites_finished = jQuery( '#bpmedia-bpalbumimporter .bp-album-favorites span.finished' ).html();
|
449 |
+
jQuery( '#bpmedia-bpalbumimporter .bp-album-favorites span.finished' ).html( parseInt( favorites_finished ) + 1 );
|
450 |
+
var favorites_progw = Math.ceil( ( parseInt( favorites_finished + 1 ) / parseInt( favorites_total ) ) * 100 );
|
451 |
+
if ( favorites_progw > 100 || favorites_progw == 100 ) {
|
452 |
+
favorites_progw = 100;
|
453 |
+
redirect = true;
|
454 |
+
}
|
455 |
+
jQuery( '.bp-album-favorites #rtprogressbar>div' ).css( 'width', favorites_progw + '%' );
|
456 |
+
if ( redirect ) {
|
457 |
+
window.setTimeout( reload_url, 2000 );
|
458 |
+
}
|
459 |
+
} );
|
460 |
+
}
|
461 |
+
|
462 |
+
function reload_url() {
|
463 |
+
window.location = document.URL;
|
464 |
+
}
|
465 |
+
|
466 |
+
jQuery( '#bpmedia-bpalbumimport-cleanup' ).click( function ( e ) {
|
467 |
+
e.preventDefault();
|
468 |
+
jQuery.post( ajaxurl, {
|
469 |
+
action: 'rtmedia_rt_album_cleanup'
|
470 |
+
}, function ( response ) {
|
471 |
+
window.location = settings_rt_album_import_url;
|
472 |
+
} );
|
473 |
+
|
474 |
+
} );
|
475 |
+
|
476 |
+
jQuery( '#bpmedia-bpalbumimporter' ).on( 'click', '#bpmedia-bpalbumimport', function ( e ) {
|
477 |
+
e.preventDefault();
|
478 |
+
if ( !jQuery( '#bp-album-import-accept' ).prop( 'checked' ) ) {
|
479 |
+
jQuery( 'html, body' ).animate( {
|
480 |
+
scrollTop: jQuery( '#bp-album-import-accept' ).offset().top
|
481 |
+
}, 500 );
|
482 |
+
var $el = jQuery( '.bp-album-import-accept' ),
|
483 |
+
x = 500,
|
484 |
+
originalColor = '#FFEBE8',
|
485 |
+
i = 3; //counter
|
486 |
+
|
487 |
+
( function loop() { //recurisve IIFE
|
488 |
+
$el.css( "background-color", "#EE0000" );
|
489 |
+
setTimeout( function () {
|
490 |
+
$el.css( "background-color", originalColor );
|
491 |
+
if ( --i )
|
492 |
+
setTimeout( loop, x ); //restart loop
|
493 |
+
}, x );
|
494 |
+
}() );
|
495 |
+
return;
|
496 |
+
} else {
|
497 |
+
jQuery( this ).prop( 'disabled', true );
|
498 |
+
}
|
499 |
+
wp_admin_url = ajaxurl.replace( 'admin-ajax.php', '' );
|
500 |
+
if ( !jQuery( '.bpm-ajax-loader' ).length )
|
501 |
+
jQuery( this ).after( ' <img class="bpm-ajax-loader" src="' + wp_admin_url + 'images/wpspin_light.gif" /> <strong>' + rtmedia_admin_strings.no_refresh + '</strong>' );
|
502 |
+
|
503 |
+
|
504 |
+
$progress_parent = jQuery( '#bpmedia-bpalbumimport' );
|
505 |
+
$values = [];
|
506 |
+
jQuery( this ).parent().find( 'input' ).each( function () {
|
507 |
+
$values [ jQuery( this ).attr( 'name' ) ] = [ jQuery( this ).val() ];
|
508 |
+
|
509 |
+
} );
|
510 |
+
|
511 |
+
if ( $values[ 'steps' ][ 0 ] == 0 )
|
512 |
+
$values[ 'steps' ][ 0 ] = 1;
|
513 |
+
|
514 |
+
$data = {};
|
515 |
+
for ( var i = 1; i <= $values[ 'steps' ][ 0 ]; i++ ) {
|
516 |
+
$count = 5;
|
517 |
+
if ( i == $values[ 'steps' ][ 0 ] ) {
|
518 |
+
$count = parseInt( $values[ 'laststep' ][ 0 ] );
|
519 |
+
if ( $count == 0 ) {
|
520 |
+
$count = 5
|
521 |
+
}
|
522 |
+
;
|
523 |
+
}
|
524 |
+
newvals = {
|
525 |
+
'page': i,
|
526 |
+
'action': 'rtmedia_rt_album_import',
|
527 |
+
'count': $count,
|
528 |
+
'values': $values
|
529 |
+
}
|
530 |
+
$data[ i ] = newvals;
|
531 |
+
}
|
532 |
+
var $startingpoint = jQuery.Deferred();
|
533 |
+
$startingpoint.resolve();
|
534 |
+
jQuery.each( $data, function ( i, v ) {
|
535 |
+
$startingpoint = $startingpoint.pipe( function () {
|
536 |
+
return fireimportRequest( v );
|
537 |
+
} );
|
538 |
+
} );
|
539 |
+
|
540 |
+
|
541 |
+
} );
|
542 |
+
|
543 |
+
jQuery( '#bp-media-settings-boxes' ).on( 'click', '.interested', function () {
|
544 |
+
jQuery( '.interested-container' ).removeClass( 'hidden' );
|
545 |
+
jQuery( '.choice-free' ).attr( 'required', 'required' );
|
546 |
+
} );
|
547 |
+
jQuery( '#bp-media-settings-boxes' ).on( 'click', '.not-interested', function () {
|
548 |
+
jQuery( '.interested-container' ).addClass( 'hidden' );
|
549 |
+
jQuery( '.choice-free' ).removeAttr( 'required' );
|
550 |
+
} );
|
551 |
+
|
552 |
+
jQuery( '#video-transcoding-main-container' ).on( 'click', '.video-transcoding-survey', function ( e ) {
|
553 |
+
e.preventDefault();
|
554 |
+
var data = {
|
555 |
+
action: 'rtmedia_convert_videos_form',
|
556 |
+
email: jQuery( '.email' ).val(),
|
557 |
+
url: jQuery( '.url' ).val(),
|
558 |
+
choice: jQuery( 'input[name="choice"]:checked' ).val(),
|
559 |
+
interested: jQuery( 'input[name="interested"]:checked' ).val()
|
560 |
+
}
|
561 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
562 |
+
jQuery( '#video-transcoding-main-container' ).html( '<p><strong>' + response + '</strong></p>' );
|
563 |
+
} );
|
564 |
+
return false;
|
565 |
+
} );
|
566 |
+
|
567 |
+
jQuery( '#bpmedia-bpalbumimporter' ).on( 'click', '.deactivate-bp-album', function ( e ) {
|
568 |
+
e.preventDefault();
|
569 |
+
$bpalbum = jQuery( this );
|
570 |
+
var data = {
|
571 |
+
action: 'rtmedia_rt_album_deactivate'
|
572 |
+
}
|
573 |
+
jQuery.get( ajaxurl, data, function ( response ) {
|
574 |
+
if ( response )
|
575 |
+
location.reload();
|
576 |
+
else
|
577 |
+
$bpalbum.parent().after( '<p>' + rtmedia_admin_strings.something_went_wrong + '</p>' );
|
578 |
+
} );
|
579 |
+
} );
|
580 |
+
|
581 |
+
jQuery( '.updated' ).on( 'click', '.bpm-hide-encoding-notice', function () {
|
582 |
+
jQuery( this ).after( '<img style="margin: 0 0 0 10px" src="' + rtmedia_admin_url + 'images/wpspin_light.gif" />' );
|
583 |
+
var data = {
|
584 |
+
action: 'rtmedia_hide_encoding_notice'
|
585 |
+
}
|
586 |
+
jQuery.post( ajaxurl, data, function ( response ) {
|
587 |
+
if ( response ) {
|
588 |
+
jQuery( '.bpm-hide-encoding-notice' ).closest( '.updated' ).remove();
|
589 |
+
}
|
590 |
+
} );
|
591 |
+
} );
|
592 |
+
|
593 |
+
|
594 |
+
// if ( jQuery( '#rtmedia-privacy-enable' ).is( ":checked" ) ) {
|
595 |
+
// jQuery( ".privacy-driven-disable label input" ).prop( "disabled", false );
|
596 |
+
// jQuery( ".privacy-driven-disable label .rt-switch" ).bootstrapSwitch( "setActive", true );
|
597 |
+
// } else {
|
598 |
+
// jQuery( ".privacy-driven-disable label input" ).prop( "disabled", true );
|
599 |
+
// jQuery( ".privacy-driven-disable label .rt-switch" ).bootstrapSwitch( "setActive", false );
|
600 |
+
// jQuery( ".privacy-driven-disable" ).parent().parent().css( "display", "none" );
|
601 |
+
// }
|
602 |
+
//
|
603 |
+
// if ( jQuery( '#rtmedia-bp-enable-activity' ).is( ":checked" ) ) {
|
604 |
+
// jQuery( ".rtmedia-bp-activity-setting" ).prop( "disabled", false );
|
605 |
+
// jQuery( ".privacy-driven-disable label .rt-switch" ).bootstrapSwitch( "setActive", true );
|
606 |
+
// } else {
|
607 |
+
// jQuery( ".rtmedia-bp-activity-setting" ).prop( "disabled", true );
|
608 |
+
// jQuery( ".privacy-driven-disable label .rt-switch" ).bootstrapSwitch( "setActive", false );
|
609 |
+
// }
|
610 |
+
//
|
611 |
+
// jQuery( '#rtmedia-privacy-enable' ).on( "click", function ( e ) {
|
612 |
+
// if ( jQuery( this ).is( ":checked" ) ) {
|
613 |
+
// jQuery( ".privacy-driven-disable label input" ).prop( "disabled", false );
|
614 |
+
// jQuery( ".privacy-driven-disable label .rt-switch" ).bootstrapSwitch( "setActive", true );
|
615 |
+
// jQuery( ".privacy-driven-disable" ).parent().parent().css( "display", "block" );
|
616 |
+
// } else {
|
617 |
+
// jQuery( ".privacy-driven-disable label input" ).prop( "disabled", true );
|
618 |
+
// jQuery( ".privacy-driven-disable label .rt-switch" ).bootstrapSwitch( "setActive", false );
|
619 |
+
// jQuery( ".privacy-driven-disable" ).parent().parent().css( "display", "none" );
|
620 |
+
// }
|
621 |
+
// } );
|
622 |
+
|
623 |
+
jQuery( '#rtmedia-bp-enable-activity' ).on( "click", function ( e ) {
|
624 |
+
if ( jQuery( this ).is( ":checked" ) ) {
|
625 |
+
jQuery( ".rtmedia-bp-activity-setting" ).prop( "disabled", false );
|
626 |
+
} else {
|
627 |
+
jQuery( ".rtmedia-bp-activity-setting" ).prop( "disabled", true );
|
628 |
+
}
|
629 |
+
} );
|
630 |
+
var onData = '';
|
631 |
+
var offData = '';
|
632 |
+
if ( rtmedia_on_label !== undefined )
|
633 |
+
onData = 'data-on-label="' + rtmedia_on_label + '"';
|
634 |
+
if ( rtmedia_off_label !== undefined )
|
635 |
+
offData = 'data-off-label="' + rtmedia_off_label + '"';
|
636 |
+
//jQuery( "[data-toggle='switch']" ).wrap( '<div class="rt-switch" ' + onData + ' ' + offData + ' />' ).parent().bootstrapSwitch();
|
637 |
+
|
638 |
+
// $( ".rtmedia-tab-title" ).click( function () {
|
639 |
+
// hash = $( this ).attr( 'href' );
|
640 |
+
// window.location.hash = hash.substring( 1, hash.length );
|
641 |
+
// } );
|
642 |
+
//
|
643 |
+
// function manageHash() {
|
644 |
+
//
|
645 |
+
// hash = window.location.hash;
|
646 |
+
// $( '#tab-' + hash.substr( 1, hash.length ) ).click();
|
647 |
+
// if ( $( '#tab-' + hash.substr( 1, hash.length ) ).length < 1 )
|
648 |
+
// return 1;
|
649 |
+
// return $( '#tab-' + hash.substr( 1, hash.length ) ).parent().index() + 1;
|
650 |
+
// }
|
651 |
+
|
652 |
+
jQuery( '#rtmedia-submit-request' ).click( function () {
|
653 |
+
var flag = true;
|
654 |
+
var name = jQuery( '#name' ).val();
|
655 |
+
var email = jQuery( '#email' ).val();
|
656 |
+
var website = jQuery( '#website' ).val();
|
657 |
+
var phone = jQuery( '#phone' ).val();
|
658 |
+
var subject = jQuery( '#subject' ).val();
|
659 |
+
var details = jQuery( '#details' ).val();
|
660 |
+
var request_type = jQuery( 'input[name="request_type"]' ).val();
|
661 |
+
var request_id = jQuery( 'input[name="request_id"]' ).val();
|
662 |
+
var server_address = jQuery( 'input[name="server_address"]' ).val();
|
663 |
+
var ip_address = jQuery( 'input[name="ip_address"]' ).val();
|
664 |
+
var server_type = jQuery( 'input[name="server_type"]' ).val();
|
665 |
+
var user_agent = jQuery( 'input[name="user_agent"]' ).val();
|
666 |
+
var form_data = {
|
667 |
+
name: name,
|
668 |
+
email: email,
|
669 |
+
website: website,
|
670 |
+
phone: phone,
|
671 |
+
subject: subject,
|
672 |
+
details: details,
|
673 |
+
request_id: request_id,
|
674 |
+
request_type: 'premium_support',
|
675 |
+
server_address: server_address,
|
676 |
+
ip_address: ip_address,
|
677 |
+
server_type: server_type,
|
678 |
+
user_agent: user_agent
|
679 |
+
};
|
680 |
+
if ( request_type == "bug_report" ) {
|
681 |
+
var wp_admin_username = jQuery( '#wp_admin_username' ).val();
|
682 |
+
if ( wp_admin_username == "" ) {
|
683 |
+
alert( "Please enter WP Admin Login." );
|
684 |
+
return false;
|
685 |
+
}
|
686 |
+
var wp_admin_pwd = jQuery( '#wp_admin_pwd' ).val();
|
687 |
+
if ( wp_admin_pwd == "" ) {
|
688 |
+
alert( "Please enter WP Admin password." );
|
689 |
+
return false;
|
690 |
+
}
|
691 |
+
var ssh_ftp_host = jQuery( '#ssh_ftp_host' ).val();
|
692 |
+
if ( ssh_ftp_host == "" ) {
|
693 |
+
alert( "Please enter SSH / FTP host." );
|
694 |
+
return false;
|
695 |
+
}
|
696 |
+
var ssh_ftp_username = jQuery( '#ssh_ftp_username' ).val();
|
697 |
+
if ( ssh_ftp_username == "" ) {
|
698 |
+
alert( "Please enter SSH / FTP login." );
|
699 |
+
return false;
|
700 |
+
}
|
701 |
+
var ssh_ftp_pwd = jQuery( '#ssh_ftp_pwd' ).val();
|
702 |
+
if ( ssh_ftp_pwd == "" ) {
|
703 |
+
alert( "Please enter SSH / FTP password." );
|
704 |
+
return false;
|
705 |
+
}
|
706 |
+
form_data = {
|
707 |
+
name: name,
|
708 |
+
email: email,
|
709 |
+
website: website,
|
710 |
+
phone: phone,
|
711 |
+
subject: subject,
|
712 |
+
details: details,
|
713 |
+
request_id: request_id,
|
714 |
+
request_type: 'premium_support',
|
715 |
+
server_address: server_address,
|
716 |
+
ip_address: ip_address,
|
717 |
+
server_type: server_type,
|
718 |
+
user_agent: user_agent,
|
719 |
+
wp_admin_username: wp_admin_username,
|
720 |
+
wp_admin_pwd: wp_admin_pwd,
|
721 |
+
ssh_ftp_host: ssh_ftp_host,
|
722 |
+
ssh_ftp_username: ssh_ftp_username,
|
723 |
+
ssh_ftp_pwd: ssh_ftp_pwd
|
724 |
+
};
|
725 |
+
}
|
726 |
+
for ( formdata in form_data ) {
|
727 |
+
if ( form_data[ formdata ] == "" && formdata != 'phone' ) {
|
728 |
+
alert( "Please enter " + formdata.replace( "_", " " ) + " field." );
|
729 |
+
return false;
|
730 |
+
}
|
731 |
+
}
|
732 |
+
data = {
|
733 |
+
action: "rtmedia_submit_request",
|
734 |
+
form_data: form_data
|
735 |
+
};
|
736 |
+
jQuery.post( ajaxurl, data, function ( data ) {
|
737 |
+
data = data.trim();
|
738 |
+
if ( data == "false" ) {
|
739 |
+
alert( "Please fill all the fields." );
|
740 |
+
return false;
|
741 |
+
}
|
742 |
+
$( '#rtmedia_service_contact_container' ).empty();
|
743 |
+
$( '#rtmedia_service_contact_container' ).append( data );
|
744 |
+
} );
|
745 |
+
return false;
|
746 |
+
} );
|
747 |
+
|
748 |
+
jQuery( '#cancel-request' ).click( function () {
|
749 |
+
return false;
|
750 |
+
} );
|
751 |
+
|
752 |
+
if ( jQuery( '.rtm_enable_masonry_view input[type=checkbox]' ).is( ":checked" ) ) {
|
753 |
+
jQuery( '.rtm_enable_masonry_view' ).parents( '.metabox-holder' ).find( '.rtmedia-info' ).show();
|
754 |
+
} else {
|
755 |
+
jQuery( '.rtm_enable_masonry_view' ).parents( '.metabox-holder' ).find( '.rtmedia-info' ).hide();
|
756 |
+
}
|
757 |
+
jQuery( '.rtm_enable_masonry_view input[type=checkbox]' ).on( "click", function ( e ) {
|
758 |
+
if ( jQuery( this ).is( ":checked" ) ) {
|
759 |
+
jQuery( '.rtm_enable_masonry_view' ).parents( '.metabox-holder' ).find( '.rtmedia-info' ).show();
|
760 |
+
} else {
|
761 |
+
jQuery( '.rtm_enable_masonry_view' ).parents( '.metabox-holder' ).find( '.rtmedia-info' ).hide();
|
762 |
+
}
|
763 |
+
} );
|
764 |
+
jQuery( "#rtm-masonry-change-thumbnail-info" ).click( function ( e ) {
|
765 |
+
jQuery( "html, body" ).animate( { scrollTop: 0 }, '500', 'swing' );
|
766 |
+
} );
|
767 |
+
} );
|
768 |
+
|
769 |
+
function rtmedia_addon_do_not_show() {
|
770 |
+
var data = {
|
771 |
+
action: 'rtmedia_addon_popup_not_show_again'
|
772 |
+
};
|
773 |
+
jQuery.post( rtmedia_admin_ajax, data, function ( response ) {
|
774 |
+
jQuery( '#TB_window' ).remove();
|
775 |
+
jQuery( '#TB_overlay' ).remove();
|
776 |
+
} );
|
777 |
+
}
|
778 |
+
|
779 |
+
jQuery( window ).load( function () {
|
780 |
+
jQuery( '.rtmedia-addon-thickbox' ).trigger( 'click' );
|
781 |
+
} );
|
app/assets/admin/js/scripts.js
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Responsive Table JS
|
3 |
+
*/
|
4 |
+
jQuery( document ).ready( function ( $ ) {
|
5 |
+
|
6 |
+
// Tabs
|
7 |
+
$( '.rtm-tabs' ).rtTab();
|
8 |
+
|
9 |
+
// Show notice on change option settings
|
10 |
+
$( 'input[name^="rtmedia-options"]' ).on( 'change', function () {
|
11 |
+
$( '.rtm-save-settings-msg' ).remove();
|
12 |
+
|
13 |
+
if ( $( '.rtm-fly-warning' ).length === 0 ) {
|
14 |
+
$( '.rtm-button-container.top' ).prepend( '<div class="rtm-warning rtm-fly-warning hide">Settings have changed, you should save them!</div>' );
|
15 |
+
$( '.rtm-fly-warning' ).slideDown();
|
16 |
+
}
|
17 |
+
} );
|
18 |
+
|
19 |
+
// This is for chrome border issue
|
20 |
+
$( '.rtm-img-size-setting .form-table tr:nth-child(7) td:last-child' ).attr( 'colspan', '3' );
|
21 |
+
|
22 |
+
$( '.rtm-field-wrap .switch input[type=checkbox]' ).each( function () {
|
23 |
+
var self = $( this );
|
24 |
+
|
25 |
+
if ( ! self.parents( 'table' ).attr( 'data-depends' ) ) {
|
26 |
+
if ( self.is( ':checked' ) ) {
|
27 |
+
self.parents( 'table' ).next( '.rtm-notice' ).slideDown();
|
28 |
+
|
29 |
+
self.parents( 'table' ).siblings( 'table' ).each( function () {
|
30 |
+
if ( $( this ).attr( 'data-depends' ) ) {
|
31 |
+
$( this ).slideDown();
|
32 |
+
}
|
33 |
+
} );
|
34 |
+
} else {
|
35 |
+
self.parents( 'table' ).next( '.rtm-notice' ).slideUp();
|
36 |
+
|
37 |
+
self.parents( 'table' ).siblings( 'table' ).each( function () {
|
38 |
+
if ( $( this ).attr( 'data-depends' ) ) {
|
39 |
+
$( this ).slideUp();
|
40 |
+
}
|
41 |
+
} );
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
if ( self.parents( 'tr' ).next( 'tr' ).attr( 'data-depends' ) ) {
|
46 |
+
if ( self.is( ':checked' ) ) {
|
47 |
+
self.parents( 'tr' ).next( 'tr' ).slideDown();
|
48 |
+
} else {
|
49 |
+
self.parents( 'tr' ).next( 'tr' ).slideUp();
|
50 |
+
}
|
51 |
+
}
|
52 |
+
} );
|
53 |
+
|
54 |
+
$( '.rtm-field-wrap .switch input[type=checkbox]' ).on( 'change', function () {
|
55 |
+
var self = $( this );
|
56 |
+
|
57 |
+
if ( ! self.parents( 'table' ).attr( 'data-depends' ) ) {
|
58 |
+
|
59 |
+
self.parents( 'table' ).next( '.rtm-notice' ).slideToggle();
|
60 |
+
|
61 |
+
self.parents( 'table' ).siblings( 'table' ).each( function () {
|
62 |
+
if ( $( this ).attr( 'data-depends' ) ) {
|
63 |
+
$( this ).slideToggle();
|
64 |
+
}
|
65 |
+
} );
|
66 |
+
}
|
67 |
+
|
68 |
+
if ( self.parents( 'tr' ).next( 'tr' ).attr( 'data-depends' ) ) {
|
69 |
+
|
70 |
+
self.parents( 'tr' ).next( 'tr' ).slideToggle();
|
71 |
+
}
|
72 |
+
} );
|
73 |
+
|
74 |
+
// Theme section lightbox like WordPress
|
75 |
+
// May be not like Backbone, But I will surely update this code. ;)
|
76 |
+
var ListView = Backbone.View.extend( {
|
77 |
+
el: $( '.bp-media-admin' ), // attaches `this.el` to an existing element.
|
78 |
+
|
79 |
+
events: {
|
80 |
+
'click .rtm-theme': 'render',
|
81 |
+
'click .rtm-close': 'close',
|
82 |
+
'click .rtm-previous': 'previousTheme',
|
83 |
+
'click .rtm-next': 'nextTheme',
|
84 |
+
'keyup': 'keyEvent'
|
85 |
+
},
|
86 |
+
initialize: function () {
|
87 |
+
_.bindAll( this, 'render', 'close', 'nextTheme', 'previousTheme', 'keyEvent' ); // fixes loss of context for 'this' within methods
|
88 |
+
|
89 |
+
this.keyEvent();
|
90 |
+
},
|
91 |
+
render: function ( event ) {
|
92 |
+
$( '.rtm-theme' ).removeClass( 'rtm-modal-open' );
|
93 |
+
|
94 |
+
var themeContent = $( event.currentTarget ).addClass( 'rtm-modal-open' ).find( '.rtm-theme-content' ).html();
|
95 |
+
|
96 |
+
if ( $( '.rtm-theme-overlay' )[0] ) {
|
97 |
+
$( '.rtm-theme-overlay' ).show();
|
98 |
+
$( this.el ).find( '.rtm-theme-content-wrap' ).empty().append( themeContent );
|
99 |
+
} else {
|
100 |
+
$( this.el ).append( '<div class="theme-overlay rtm-theme-overlay"><div class="theme-backdrop rtm-close"></div><div class="rtm-theme-content-wrap">' + themeContent + '</div></div>' );
|
101 |
+
}
|
102 |
+
|
103 |
+
if ( $( event.currentTarget ).is( ':first-child' ) ) {
|
104 |
+
$( '.rtm-previous' ).addClass( 'disabled' );
|
105 |
+
} else if ( $( event.currentTarget ).is( ':last-child' ) ) {
|
106 |
+
$( '.rtm-next' ).addClass( 'disabled' );
|
107 |
+
} else {
|
108 |
+
$( '.rtm-next, .rtm-previous' ).removeClass( 'disabled' );
|
109 |
+
}
|
110 |
+
|
111 |
+
},
|
112 |
+
close: function () {
|
113 |
+
$( '.rtm-theme' ).removeClass( 'rtm-modal-open' );
|
114 |
+
$( '.rtm-theme-overlay' ).hide();
|
115 |
+
$( '.rtm-next, .rtm-previous' ).removeClass( 'disabled' );
|
116 |
+
},
|
117 |
+
nextTheme: function ( event ) {
|
118 |
+
$( '.rtm-next, .rtm-previous' ).removeClass( 'disabled' );
|
119 |
+
if ( $( '.rtm-theme:last-child' ).hasClass( 'rtm-modal-open' ) ) {
|
120 |
+
$( event.currentTarget ).addClass( 'disabled' );
|
121 |
+
}
|
122 |
+
|
123 |
+
$( '.rtm-modal-open' ).next().trigger( 'click' );
|
124 |
+
return false;
|
125 |
+
},
|
126 |
+
previousTheme: function ( event ) {
|
127 |
+
$( '.rtm-next, .rtm-previous' ).removeClass( 'disabled' );
|
128 |
+
if ( $( '.rtm-theme:first-child' ).hasClass( 'rtm-modal-open' ) ) {
|
129 |
+
$( event.currentTarget ).addClass( 'disabled' );
|
130 |
+
}
|
131 |
+
|
132 |
+
$( '.rtm-modal-open' ).prev().trigger( 'click' );
|
133 |
+
return false;
|
134 |
+
},
|
135 |
+
keyEvent: function ( ) {
|
136 |
+
// Bind keyboard events.
|
137 |
+
$( 'body' ).on( 'keyup', function ( event ) {
|
138 |
+
// The right arrow key, next theme
|
139 |
+
if ( event.keyCode === 39 ) {
|
140 |
+
$( '.rtm-next, .rtm-previous' ).removeClass( 'disabled' );
|
141 |
+
if ( $( '.rtm-theme:last-child' ).hasClass( 'rtm-modal-open' ) ) {
|
142 |
+
$( event.currentTarget ).addClass( 'disabled' );
|
143 |
+
}
|
144 |
+
|
145 |
+
$( '.rtm-modal-open' ).next().trigger( 'click' );
|
146 |
+
return false;
|
147 |
+
}
|
148 |
+
|
149 |
+
// The left arrow key, previous theme
|
150 |
+
if ( event.keyCode === 37 ) {
|
151 |
+
$( '.rtm-next, .rtm-previous' ).removeClass( 'disabled' );
|
152 |
+
if ( $( '.rtm-theme:first-child' ).hasClass( 'rtm-modal-open' ) ) {
|
153 |
+
$( event.currentTarget ).addClass( 'disabled' );
|
154 |
+
}
|
155 |
+
|
156 |
+
$( '.rtm-modal-open' ).prev().trigger( 'click' );
|
157 |
+
return false;
|
158 |
+
}
|
159 |
+
|
160 |
+
// The escape key closes the preview
|
161 |
+
if ( event.keyCode === 27 ) {
|
162 |
+
$( '.rtm-close' ).trigger( 'click' );
|
163 |
+
}
|
164 |
+
} );
|
165 |
+
}
|
166 |
+
|
167 |
+
} );
|
168 |
+
|
169 |
+
var listView = new ListView();
|
170 |
+
|
171 |
+
} );
|
app/assets/admin/js/vendors/tabs.js
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Written by S@G@R
|
2 |
+
|
3 |
+
/* Utility : Object.create dosen't work all browsers. */
|
4 |
+
if ( typeof Object.create !== 'function' ) {
|
5 |
+
Object.create = function ( obj ) {
|
6 |
+
function F() {
|
7 |
+
}
|
8 |
+
;
|
9 |
+
F.prototype = obj;
|
10 |
+
return new F();
|
11 |
+
};
|
12 |
+
}
|
13 |
+
|
14 |
+
( function ( $, window, document, undefined ) {
|
15 |
+
|
16 |
+
var Tab = {
|
17 |
+
init: function ( options, elem ) {
|
18 |
+
var self = this;
|
19 |
+
self.elem = elem;
|
20 |
+
self.$elem = $( elem );
|
21 |
+
|
22 |
+
/* Extend Options */
|
23 |
+
self.options = $.extend( { }, $.fn.rtTab.options, options );
|
24 |
+
|
25 |
+
self.rtTabs();
|
26 |
+
},
|
27 |
+
rtTabs: function () {
|
28 |
+
var self = this,
|
29 |
+
showTab = self.options.activeTab;
|
30 |
+
|
31 |
+
/* Tab Active */
|
32 |
+
self.$elem.find( 'li:nth-child(' + showTab + ')' ).addClass( 'active' );
|
33 |
+
self.rtTabContent( activeTabContent = 'yes' );
|
34 |
+
self.rtClick();
|
35 |
+
|
36 |
+
// Datahash Variable
|
37 |
+
var datahash = ( self.$elem.attr( 'data-hash' ) === 'false' ) ? false : true;
|
38 |
+
|
39 |
+
/* This will keep on same tab as in hashtag */
|
40 |
+
if ( datahash === true ) {
|
41 |
+
var hashTag = window.location.hash;
|
42 |
+
|
43 |
+
if ( hashTag ) {
|
44 |
+
self.$elem.find( 'li' ).find( 'a[href=' + hashTag + ']' ).trigger( 'click' );
|
45 |
+
}
|
46 |
+
|
47 |
+
// Detect change in hash value of URL
|
48 |
+
$( window ).on( 'hashchange', function () {
|
49 |
+
var hashTag = window.location.hash;
|
50 |
+
// Iterate over all nav links, setting the "selected" class as-appropriate.
|
51 |
+
self.$elem.find( 'li' ).find( 'a[href=' + hashTag + ']' ).trigger( 'click' );
|
52 |
+
} );
|
53 |
+
}
|
54 |
+
|
55 |
+
},
|
56 |
+
rtClick: function () {
|
57 |
+
var self = this,
|
58 |
+
eachTab = self.$elem.find( 'li' ),
|
59 |
+
tabLink = eachTab.find( 'a' );
|
60 |
+
|
61 |
+
tabLink.on( 'click', function ( e ) {
|
62 |
+
/* Prevent */
|
63 |
+
e.preventDefault();
|
64 |
+
|
65 |
+
/* Remove Active Class From All Tabs */
|
66 |
+
eachTab.removeClass( 'active' );
|
67 |
+
|
68 |
+
/* Hide All Tab Contents */
|
69 |
+
self.rtTabContent();
|
70 |
+
|
71 |
+
/* Add Active Class to Current Tab */
|
72 |
+
$( this ).parent().addClass( 'active' );
|
73 |
+
|
74 |
+
/* Show Active Tab Content */
|
75 |
+
var activeTab = $( this ).attr( 'href' );
|
76 |
+
$( activeTab ).removeClass( 'hide' );
|
77 |
+
|
78 |
+
// Datahash Variable
|
79 |
+
var datahash = ( self.$elem.attr( 'data-hash' ) === 'false' ) ? false : true;
|
80 |
+
|
81 |
+
/* Hash tag in URL */
|
82 |
+
if ( datahash === true ) {
|
83 |
+
var pos = $( window ).scrollTop();
|
84 |
+
location.hash = $( this ).attr( 'href' );
|
85 |
+
$( window ).scrollTop( pos );
|
86 |
+
}
|
87 |
+
|
88 |
+
/* On complete function */
|
89 |
+
if ( typeof self.options.onComplete === 'function' ) {
|
90 |
+
self.options.onComplete.apply( self.elem, arguments );
|
91 |
+
}
|
92 |
+
|
93 |
+
} );
|
94 |
+
},
|
95 |
+
rtTabContent: function ( activeTabContent ) {
|
96 |
+
var self = this,
|
97 |
+
eachTab = self.$elem.find( 'li' ),
|
98 |
+
tabLink = eachTab.find( 'a' );
|
99 |
+
|
100 |
+
tabLink.each( function () {
|
101 |
+
var link = $( this ),
|
102 |
+
tabContent = link.attr( 'href' );
|
103 |
+
if ( activeTabContent === 'yes' ) {
|
104 |
+
if ( ! link.parent().hasClass( 'active' ) ) {
|
105 |
+
$( tabContent ).addClass( 'hide' );
|
106 |
+
}
|
107 |
+
} else {
|
108 |
+
$( tabContent ).addClass( 'hide' );
|
109 |
+
}
|
110 |
+
} );
|
111 |
+
}
|
112 |
+
};
|
113 |
+
|
114 |
+
$.fn.rtTab = function ( options ) {
|
115 |
+
return this.each( function () {
|
116 |
+
var tab = Object.create( Tab );
|
117 |
+
tab.init( options, this );
|
118 |
+
|
119 |
+
/* Store Data */
|
120 |
+
$.data( this, 'rtTab', tab );
|
121 |
+
} );
|
122 |
+
};
|
123 |
+
|
124 |
+
$.fn.rtTab.options = {
|
125 |
+
activeTab: 1,
|
126 |
+
onComplete: null
|
127 |
+
};
|
128 |
+
|
129 |
+
} )( jQuery, window, document );
|
app/assets/css/main.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.rtm-link-button,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions button,#rtm-media-options ul li .rtmedia-action-buttons,.rtm-lightbox-container #rtm-media-options-list ul li .rtmedia-action-buttons{border:none;background:none;text-decoration:none}.rtm-top-notch,.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtm-like-comments-info:before,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before{content:'';border-width:5px;border-style:inset inset solid;display:block;position:absolute;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #edeff4}.rtm-primary-button,.rtmedia-container .drag-drop .start-media-upload,.rtmedia-activity-container .drag-drop .start-media-upload,#buddypress div.rtmedia-activity-container .drag-drop .start-media-upload,#buddypress .rtmedia-container .rtmedia-uploader .drag-drop .start-media-upload,#buddypress .rtmedia-activity-container .rtmedia-uploader .drag-drop .start-media-upload{background-color:#3475BA;border-radius:5px 5px 5px 5px;text-transform:uppercase;box-shadow:0 0 0 rgba(255,255,255,0) inset;transition:background-color 300ms ease-out 0s;color:white;border:none;padding:10px 20px;background-image:none}.rtm-primary-button:hover,.rtmedia-container .drag-drop .start-media-upload:hover,.rtmedia-activity-container .drag-drop .start-media-upload:hover,#buddypress div.rtmedia-activity-container .drag-drop .start-media-upload:hover,#buddypress .rtmedia-container .rtmedia-uploader .drag-drop .start-media-upload:hover,#buddypress .rtmedia-activity-container .rtmedia-uploader .drag-drop .start-media-upload:hover{background-color:#306BAA}.rtm-primary-font-color{color:#3475ba}#rtmedia-add-media-button-post-update{float:left;margin-top:12px;margin-right:20px}.rtmedia-container,.rtmedia-activity-container,#buddypress div.rtmedia-activity-container{@import url("//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700");;padding:5px;margin:0;clear:left}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body,.rtmedia-container div,.rtmedia-activity-container div,#buddypress div.rtmedia-activity-container div,.rtmedia-container span,.rtmedia-activity-container span,#buddypress div.rtmedia-activity-container span,.rtmedia-container applet,.rtmedia-activity-container applet,#buddypress div.rtmedia-activity-container applet,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container iframe,.rtmedia-activity-container iframe,#buddypress div.rtmedia-activity-container iframe,.rtmedia-container h1,.rtmedia-activity-container h1,#buddypress div.rtmedia-activity-container h1,.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2,.rtmedia-container h3,.rtmedia-activity-container h3,#buddypress div.rtmedia-activity-container h3,.rtmedia-container h4,.rtmedia-activity-container h4,#buddypress div.rtmedia-activity-container h4,.rtmedia-container h5,.rtmedia-activity-container h5,#buddypress div.rtmedia-activity-container h5,.rtmedia-container h6,.rtmedia-activity-container h6,#buddypress div.rtmedia-activity-container h6,.rtmedia-container p,.rtmedia-activity-container p,#buddypress div.rtmedia-activity-container p,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote,.rtmedia-container pre,.rtmedia-activity-container pre,#buddypress div.rtmedia-activity-container pre,.rtmedia-container a,.rtmedia-activity-container a,#buddypress div.rtmedia-activity-container a,.rtmedia-container abbr,.rtmedia-activity-container abbr,#buddypress div.rtmedia-activity-container abbr,.rtmedia-container acronym,.rtmedia-activity-container acronym,#buddypress div.rtmedia-activity-container acronym,.rtmedia-container address,.rtmedia-activity-container address,#buddypress div.rtmedia-activity-container address,.rtmedia-container big,.rtmedia-activity-container big,#buddypress div.rtmedia-activity-container big,.rtmedia-container cite,.rtmedia-activity-container cite,#buddypress div.rtmedia-activity-container cite,.rtmedia-container code,.rtmedia-activity-container code,#buddypress div.rtmedia-activity-container code,.rtmedia-container del,.rtmedia-activity-container del,#buddypress div.rtmedia-activity-container del,.rtmedia-container dfn,.rtmedia-activity-container dfn,#buddypress div.rtmedia-activity-container dfn,.rtmedia-container em,.rtmedia-activity-container em,#buddypress div.rtmedia-activity-container em,.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container ins,.rtmedia-activity-container ins,#buddypress div.rtmedia-activity-container ins,.rtmedia-container kbd,.rtmedia-activity-container kbd,#buddypress div.rtmedia-activity-container kbd,.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container s,.rtmedia-activity-container s,#buddypress div.rtmedia-activity-container s,.rtmedia-container samp,.rtmedia-activity-container samp,#buddypress div.rtmedia-activity-container samp,.rtmedia-container small,.rtmedia-activity-container small,#buddypress div.rtmedia-activity-container small,.rtmedia-container strike,.rtmedia-activity-container strike,#buddypress div.rtmedia-activity-container strike,.rtmedia-container strong,.rtmedia-activity-container strong,#buddypress div.rtmedia-activity-container strong,.rtmedia-container sub,.rtmedia-activity-container sub,#buddypress div.rtmedia-activity-container sub,.rtmedia-container sup,.rtmedia-activity-container sup,#buddypress div.rtmedia-activity-container sup,.rtmedia-container tt,.rtmedia-activity-container tt,#buddypress div.rtmedia-activity-container tt,.rtmedia-container var,.rtmedia-activity-container var,#buddypress div.rtmedia-activity-container var,.rtmedia-container b,.rtmedia-activity-container b,#buddypress div.rtmedia-activity-container b,.rtmedia-container u,.rtmedia-activity-container u,#buddypress div.rtmedia-activity-container u,.rtmedia-container i,.rtmedia-activity-container i,#buddypress div.rtmedia-activity-container i,.rtmedia-container center,.rtmedia-activity-container center,#buddypress div.rtmedia-activity-container center,.rtmedia-container dl,.rtmedia-activity-container dl,#buddypress div.rtmedia-activity-container dl,.rtmedia-container dt,.rtmedia-activity-container dt,#buddypress div.rtmedia-activity-container dt,.rtmedia-container dd,.rtmedia-activity-container dd,#buddypress div.rtmedia-activity-container dd,.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul,.rtmedia-container li,.rtmedia-activity-container li,#buddypress div.rtmedia-activity-container li,.rtmedia-container fieldset,.rtmedia-activity-container fieldset,#buddypress div.rtmedia-activity-container fieldset,.rtmedia-container form,.rtmedia-activity-container form,#buddypress div.rtmedia-activity-container form,.rtmedia-container label,.rtmedia-activity-container label,#buddypress div.rtmedia-activity-container label,.rtmedia-container legend,.rtmedia-activity-container legend,#buddypress div.rtmedia-activity-container legend,.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table,.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container tbody,.rtmedia-activity-container tbody,#buddypress div.rtmedia-activity-container tbody,.rtmedia-container tfoot,.rtmedia-activity-container tfoot,#buddypress div.rtmedia-activity-container tfoot,.rtmedia-container thead,.rtmedia-activity-container thead,#buddypress div.rtmedia-activity-container thead,.rtmedia-container tr,.rtmedia-activity-container tr,#buddypress div.rtmedia-activity-container tr,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td,.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container canvas,.rtmedia-activity-container canvas,#buddypress div.rtmedia-activity-container canvas,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container output,.rtmedia-activity-container output,#buddypress div.rtmedia-activity-container output,.rtmedia-container ruby,.rtmedia-activity-container ruby,#buddypress div.rtmedia-activity-container ruby,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary,.rtmedia-container time,.rtmedia-activity-container time,#buddypress div.rtmedia-activity-container time,.rtmedia-container mark,.rtmedia-activity-container mark,#buddypress div.rtmedia-activity-container mark,.rtmedia-container audio,.rtmedia-activity-container audio,#buddypress div.rtmedia-activity-container audio,.rtmedia-container video,.rtmedia-activity-container video,#buddypress div.rtmedia-activity-container video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html{line-height:1}.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul{list-style:none}.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table{border-collapse:collapse;border-spacing:0}.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td{text-align:left;font-weight:normal;vertical-align:middle}.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote{quotes:none}.rtmedia-container q:before,.rtmedia-activity-container q:before,#buddypress div.rtmedia-activity-container q:before,.rtmedia-container q:after,.rtmedia-activity-container q:after,#buddypress div.rtmedia-activity-container q:after,.rtmedia-container blockquote:before,.rtmedia-activity-container blockquote:before,#buddypress div.rtmedia-activity-container blockquote:before,.rtmedia-container blockquote:after,.rtmedia-activity-container blockquote:after,#buddypress div.rtmedia-activity-container blockquote:after{content:"";content:none}.rtmedia-container a img,.rtmedia-activity-container a img,#buddypress div.rtmedia-activity-container a img{border:none}.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary{display:block}.rtmedia-container meta.foundation-mq-small,.rtmedia-activity-container meta.foundation-mq-small,#buddypress div.rtmedia-activity-container meta.foundation-mq-small{font-family:"/only screen and (max-width: 40em)/";width:0em}.rtmedia-container meta.foundation-mq-medium,.rtmedia-activity-container meta.foundation-mq-medium,#buddypress div.rtmedia-activity-container meta.foundation-mq-medium{font-family:"/only screen and (min-width:40.063em) and (max-width:64em)/";width:40.063em}.rtmedia-container meta.foundation-mq-large,.rtmedia-activity-container meta.foundation-mq-large,#buddypress div.rtmedia-activity-container meta.foundation-mq-large{font-family:"/only screen and (min-width:64.063em)/";width:64.063em}.rtmedia-container meta.foundation-mq-xlarge,.rtmedia-activity-container meta.foundation-mq-xlarge,#buddypress div.rtmedia-activity-container meta.foundation-mq-xlarge{font-family:"/only screen and (min-width:90.063em)/";width:90.063em}.rtmedia-container meta.foundation-mq-xxlarge,.rtmedia-activity-container meta.foundation-mq-xxlarge,#buddypress div.rtmedia-activity-container meta.foundation-mq-xxlarge{font-family:"/only screen and (min-width:120.063em)/";width:120.063em}.rtmedia-container *,.rtmedia-activity-container *,#buddypress div.rtmedia-activity-container *,.rtmedia-container *:before,.rtmedia-activity-container *:before,#buddypress div.rtmedia-activity-container *:before,.rtmedia-container *:after,.rtmedia-activity-container *:after,#buddypress div.rtmedia-activity-container *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{font-size:100%}.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{background:#fff;color:#222;padding:0;margin:0;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-weight:normal;font-style:normal;line-height:1;position:relative;cursor:default}.rtmedia-container a:hover,.rtmedia-activity-container a:hover,#buddypress div.rtmedia-activity-container a:hover{cursor:pointer}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{max-width:100%;height:auto}.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{height:100%}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{-ms-interpolation-mode:bicubic}.rtmedia-container #map_canvas img,.rtmedia-activity-container #map_canvas img,.rtmedia-container #map_canvas embed,.rtmedia-activity-container #map_canvas embed,.rtmedia-container #map_canvas object,.rtmedia-activity-container #map_canvas object,.rtmedia-container .map_canvas img,.rtmedia-activity-container .map_canvas img,#buddypress div.rtmedia-activity-container .map_canvas img,.rtmedia-container .map_canvas embed,.rtmedia-activity-container .map_canvas embed,#buddypress div.rtmedia-activity-container .map_canvas embed,.rtmedia-container .map_canvas object,.rtmedia-activity-container .map_canvas object,#buddypress div.rtmedia-activity-container .map_canvas object{max-width:none !important}.rtmedia-container .left,.rtmedia-activity-container .left,#buddypress div.rtmedia-activity-container .left{float:left !important}.rtmedia-container .right,.rtmedia-activity-container .right,#buddypress div.rtmedia-activity-container .right{float:right !important}.rtmedia-container .clearfix,.rtmedia-activity-container .clearfix,#buddypress div.rtmedia-activity-container .clearfix{*zoom:1}.rtmedia-container .clearfix:before,.rtmedia-activity-container .clearfix:before,#buddypress div.rtmedia-activity-container .clearfix:before,.rtmedia-container .clearfix:after,.rtmedia-activity-container .clearfix:after,#buddypress div.rtmedia-activity-container .clearfix:after{content:" ";display:table}.rtmedia-container .clearfix:after,.rtmedia-activity-container .clearfix:after,#buddypress div.rtmedia-activity-container .clearfix:after{clear:both}.rtmedia-container .text-left,.rtmedia-activity-container .text-left,#buddypress div.rtmedia-activity-container .text-left{text-align:left !important}.rtmedia-container .text-right,.rtmedia-activity-container .text-right,#buddypress div.rtmedia-activity-container .text-right{text-align:right !important}.rtmedia-container .text-center,.rtmedia-activity-container .text-center,#buddypress div.rtmedia-activity-container .text-center{text-align:center !important}.rtmedia-container .text-justify,.rtmedia-activity-container .text-justify,#buddypress div.rtmedia-activity-container .text-justify{text-align:justify !important}.rtmedia-container .hide,.rtmedia-activity-container .hide,#buddypress div.rtmedia-activity-container .hide{display:none}.rtmedia-container .antialiased,.rtmedia-activity-container .antialiased,#buddypress div.rtmedia-activity-container .antialiased{-webkit-font-smoothing:antialiased}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{display:inline-block;vertical-align:middle}.rtmedia-container textarea,.rtmedia-activity-container textarea,#buddypress div.rtmedia-activity-container textarea{height:auto;min-height:50px}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:100%}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5rem;*zoom:1}.rtmedia-container .row:before,.rtmedia-activity-container .row:before,#buddypress div.rtmedia-activity-container .row:before,.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{content:" ";display:table}.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{clear:both}.rtmedia-container .row.collapse>.column,.rtmedia-activity-container .row.collapse>.column,#buddypress div.rtmedia-activity-container .row.collapse>.column,.rtmedia-container .row.collapse>.columns,.rtmedia-activity-container .row.collapse>.columns,#buddypress div.rtmedia-activity-container .row.collapse>.columns{position:relative;padding-left:0;padding-right:0;float:left}.rtmedia-container .row.collapse .row,.rtmedia-activity-container .row.collapse .row,#buddypress div.rtmedia-activity-container .row.collapse .row{margin-left:0;margin-right:0}.rtmedia-container .row .row,.rtmedia-activity-container .row .row,#buddypress div.rtmedia-activity-container .row .row{width:auto;margin-left:-0.9375rem;margin-right:-0.9375rem;margin-top:0;margin-bottom:0;max-width:none;*zoom:1}.rtmedia-container .row .row:before,.rtmedia-activity-container .row .row:before,#buddypress div.rtmedia-activity-container .row .row:before,.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{content:" ";display:table}.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{clear:both}.rtmedia-container .row .row.collapse,.rtmedia-activity-container .row .row.collapse,#buddypress div.rtmedia-activity-container .row .row.collapse{width:auto;margin:0;max-width:none;*zoom:1}.rtmedia-container .row .row.collapse:before,.rtmedia-activity-container .row .row.collapse:before,#buddypress div.rtmedia-activity-container .row .row.collapse:before,.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{content:" ";display:table}.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{clear:both}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;width:100%;float:left}@media only screen{.rtmedia-container .small-push-1,.rtmedia-activity-container .small-push-1,#buddypress div.rtmedia-activity-container .small-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .small-pull-1,.rtmedia-activity-container .small-pull-1,#buddypress div.rtmedia-activity-container .small-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .small-push-2,.rtmedia-activity-container .small-push-2,#buddypress div.rtmedia-activity-container .small-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .small-pull-2,.rtmedia-activity-container .small-pull-2,#buddypress div.rtmedia-activity-container .small-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .small-push-3,.rtmedia-activity-container .small-push-3,#buddypress div.rtmedia-activity-container .small-push-3{position:relative;left:25%;right:auto}.rtmedia-container .small-pull-3,.rtmedia-activity-container .small-pull-3,#buddypress div.rtmedia-activity-container .small-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .small-push-4,.rtmedia-activity-container .small-push-4,#buddypress div.rtmedia-activity-container .small-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .small-pull-4,.rtmedia-activity-container .small-pull-4,#buddypress div.rtmedia-activity-container .small-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .small-push-5,.rtmedia-activity-container .small-push-5,#buddypress div.rtmedia-activity-container .small-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .small-pull-5,.rtmedia-activity-container .small-pull-5,#buddypress div.rtmedia-activity-container .small-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .small-push-6,.rtmedia-activity-container .small-push-6,#buddypress div.rtmedia-activity-container .small-push-6{position:relative;left:50%;right:auto}.rtmedia-container .small-pull-6,.rtmedia-activity-container .small-pull-6,#buddypress div.rtmedia-activity-container .small-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .small-push-7,.rtmedia-activity-container .small-push-7,#buddypress div.rtmedia-activity-container .small-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .small-pull-7,.rtmedia-activity-container .small-pull-7,#buddypress div.rtmedia-activity-container .small-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .small-push-8,.rtmedia-activity-container .small-push-8,#buddypress div.rtmedia-activity-container .small-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .small-pull-8,.rtmedia-activity-container .small-pull-8,#buddypress div.rtmedia-activity-container .small-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .small-push-9,.rtmedia-activity-container .small-push-9,#buddypress div.rtmedia-activity-container .small-push-9{position:relative;left:75%;right:auto}.rtmedia-container .small-pull-9,.rtmedia-activity-container .small-pull-9,#buddypress div.rtmedia-activity-container .small-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .small-push-10,.rtmedia-activity-container .small-push-10,#buddypress div.rtmedia-activity-container .small-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .small-pull-10,.rtmedia-activity-container .small-pull-10,#buddypress div.rtmedia-activity-container .small-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .small-push-11,.rtmedia-activity-container .small-push-11,#buddypress div.rtmedia-activity-container .small-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .small-pull-11,.rtmedia-activity-container .small-pull-11,#buddypress div.rtmedia-activity-container .small-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .small-1,.rtmedia-activity-container .small-1,#buddypress div.rtmedia-activity-container .small-1{position:relative;width:8.33333%}.rtmedia-container .small-2,.rtmedia-activity-container .small-2,#buddypress div.rtmedia-activity-container .small-2{position:relative;width:16.66667%}.rtmedia-container .small-3,.rtmedia-activity-container .small-3,#buddypress div.rtmedia-activity-container .small-3{position:relative;width:25%}.rtmedia-container .small-4,.rtmedia-activity-container .small-4,#buddypress div.rtmedia-activity-container .small-4{position:relative;width:33.33333%}.rtmedia-container .small-5,.rtmedia-activity-container .small-5,#buddypress div.rtmedia-activity-container .small-5{position:relative;width:41.66667%}.rtmedia-container .small-6,.rtmedia-activity-container .small-6,#buddypress div.rtmedia-activity-container .small-6{position:relative;width:50%}.rtmedia-container .small-7,.rtmedia-activity-container .small-7,#buddypress div.rtmedia-activity-container .small-7{position:relative;width:58.33333%}.rtmedia-container .small-8,.rtmedia-activity-container .small-8,#buddypress div.rtmedia-activity-container .small-8{position:relative;width:66.66667%}.rtmedia-container .small-9,.rtmedia-activity-container .small-9,#buddypress div.rtmedia-activity-container .small-9{position:relative;width:75%}.rtmedia-container .small-10,.rtmedia-activity-container .small-10,#buddypress div.rtmedia-activity-container .small-10{position:relative;width:83.33333%}.rtmedia-container .small-11,.rtmedia-activity-container .small-11,#buddypress div.rtmedia-activity-container .small-11{position:relative;width:91.66667%}.rtmedia-container .small-12,.rtmedia-activity-container .small-12,#buddypress div.rtmedia-activity-container .small-12{position:relative;width:100%}.rtmedia-container .small-offset-0,.rtmedia-activity-container .small-offset-0,#buddypress div.rtmedia-activity-container .small-offset-0{position:relative;margin-left:0%}.rtmedia-container .small-offset-1,.rtmedia-activity-container .small-offset-1,#buddypress div.rtmedia-activity-container .small-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .small-offset-2,.rtmedia-activity-container .small-offset-2,#buddypress div.rtmedia-activity-container .small-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .small-offset-3,.rtmedia-activity-container .small-offset-3,#buddypress div.rtmedia-activity-container .small-offset-3{position:relative;margin-left:25%}.rtmedia-container .small-offset-4,.rtmedia-activity-container .small-offset-4,#buddypress div.rtmedia-activity-container .small-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .small-offset-5,.rtmedia-activity-container .small-offset-5,#buddypress div.rtmedia-activity-container .small-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .small-offset-6,.rtmedia-activity-container .small-offset-6,#buddypress div.rtmedia-activity-container .small-offset-6{position:relative;margin-left:50%}.rtmedia-container .small-offset-7,.rtmedia-activity-container .small-offset-7,#buddypress div.rtmedia-activity-container .small-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .small-offset-8,.rtmedia-activity-container .small-offset-8,#buddypress div.rtmedia-activity-container .small-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .small-offset-9,.rtmedia-activity-container .small-offset-9,#buddypress div.rtmedia-activity-container .small-offset-9{position:relative;margin-left:75%}.rtmedia-container .small-offset-10,.rtmedia-activity-container .small-offset-10,#buddypress div.rtmedia-activity-container .small-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.small-centered,.rtmedia-activity-container .column.small-centered,#buddypress div.rtmedia-activity-container .column.small-centered,.rtmedia-container .columns.small-centered,.rtmedia-activity-container .columns.small-centered,#buddypress div.rtmedia-activity-container .columns.small-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.small-uncentered,.rtmedia-activity-container .column.small-uncentered,#buddypress div.rtmedia-activity-container .column.small-uncentered,.rtmedia-container .columns.small-uncentered,.rtmedia-activity-container .columns.small-uncentered,#buddypress div.rtmedia-activity-container .columns.small-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.small-uncentered.opposite,.rtmedia-activity-container .column.small-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.small-uncentered.opposite,.rtmedia-container .columns.small-uncentered.opposite,.rtmedia-activity-container .columns.small-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.small-uncentered.opposite{float:right !important}}@media only screen and (min-width: 40.063em){.rtmedia-container .medium-push-1,.rtmedia-activity-container .medium-push-1,#buddypress div.rtmedia-activity-container .medium-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .medium-pull-1,.rtmedia-activity-container .medium-pull-1,#buddypress div.rtmedia-activity-container .medium-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .medium-push-2,.rtmedia-activity-container .medium-push-2,#buddypress div.rtmedia-activity-container .medium-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .medium-pull-2,.rtmedia-activity-container .medium-pull-2,#buddypress div.rtmedia-activity-container .medium-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .medium-push-3,.rtmedia-activity-container .medium-push-3,#buddypress div.rtmedia-activity-container .medium-push-3{position:relative;left:25%;right:auto}.rtmedia-container .medium-pull-3,.rtmedia-activity-container .medium-pull-3,#buddypress div.rtmedia-activity-container .medium-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .medium-push-4,.rtmedia-activity-container .medium-push-4,#buddypress div.rtmedia-activity-container .medium-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .medium-pull-4,.rtmedia-activity-container .medium-pull-4,#buddypress div.rtmedia-activity-container .medium-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .medium-push-5,.rtmedia-activity-container .medium-push-5,#buddypress div.rtmedia-activity-container .medium-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .medium-pull-5,.rtmedia-activity-container .medium-pull-5,#buddypress div.rtmedia-activity-container .medium-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .medium-push-6,.rtmedia-activity-container .medium-push-6,#buddypress div.rtmedia-activity-container .medium-push-6{position:relative;left:50%;right:auto}.rtmedia-container .medium-pull-6,.rtmedia-activity-container .medium-pull-6,#buddypress div.rtmedia-activity-container .medium-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .medium-push-7,.rtmedia-activity-container .medium-push-7,#buddypress div.rtmedia-activity-container .medium-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .medium-pull-7,.rtmedia-activity-container .medium-pull-7,#buddypress div.rtmedia-activity-container .medium-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .medium-push-8,.rtmedia-activity-container .medium-push-8,#buddypress div.rtmedia-activity-container .medium-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .medium-pull-8,.rtmedia-activity-container .medium-pull-8,#buddypress div.rtmedia-activity-container .medium-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .medium-push-9,.rtmedia-activity-container .medium-push-9,#buddypress div.rtmedia-activity-container .medium-push-9{position:relative;left:75%;right:auto}.rtmedia-container .medium-pull-9,.rtmedia-activity-container .medium-pull-9,#buddypress div.rtmedia-activity-container .medium-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .medium-push-10,.rtmedia-activity-container .medium-push-10,#buddypress div.rtmedia-activity-container .medium-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .medium-pull-10,.rtmedia-activity-container .medium-pull-10,#buddypress div.rtmedia-activity-container .medium-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .medium-push-11,.rtmedia-activity-container .medium-push-11,#buddypress div.rtmedia-activity-container .medium-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .medium-pull-11,.rtmedia-activity-container .medium-pull-11,#buddypress div.rtmedia-activity-container .medium-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .medium-1,.rtmedia-activity-container .medium-1,#buddypress div.rtmedia-activity-container .medium-1{position:relative;width:8.33333%}.rtmedia-container .medium-2,.rtmedia-activity-container .medium-2,#buddypress div.rtmedia-activity-container .medium-2{position:relative;width:16.66667%}.rtmedia-container .medium-3,.rtmedia-activity-container .medium-3,#buddypress div.rtmedia-activity-container .medium-3{position:relative;width:25%}.rtmedia-container .medium-4,.rtmedia-activity-container .medium-4,#buddypress div.rtmedia-activity-container .medium-4{position:relative;width:33.33333%}.rtmedia-container .medium-5,.rtmedia-activity-container .medium-5,#buddypress div.rtmedia-activity-container .medium-5{position:relative;width:41.66667%}.rtmedia-container .medium-6,.rtmedia-activity-container .medium-6,#buddypress div.rtmedia-activity-container .medium-6{position:relative;width:50%}.rtmedia-container .medium-7,.rtmedia-activity-container .medium-7,#buddypress div.rtmedia-activity-container .medium-7{position:relative;width:58.33333%}.rtmedia-container .medium-8,.rtmedia-activity-container .medium-8,#buddypress div.rtmedia-activity-container .medium-8{position:relative;width:66.66667%}.rtmedia-container .medium-9,.rtmedia-activity-container .medium-9,#buddypress div.rtmedia-activity-container .medium-9{position:relative;width:75%}.rtmedia-container .medium-10,.rtmedia-activity-container .medium-10,#buddypress div.rtmedia-activity-container .medium-10{position:relative;width:83.33333%}.rtmedia-container .medium-11,.rtmedia-activity-container .medium-11,#buddypress div.rtmedia-activity-container .medium-11{position:relative;width:91.66667%}.rtmedia-container .medium-12,.rtmedia-activity-container .medium-12,#buddypress div.rtmedia-activity-container .medium-12{position:relative;width:100%}.rtmedia-container .medium-offset-0,.rtmedia-activity-container .medium-offset-0,#buddypress div.rtmedia-activity-container .medium-offset-0{position:relative;margin-left:0%}.rtmedia-container .medium-offset-1,.rtmedia-activity-container .medium-offset-1,#buddypress div.rtmedia-activity-container .medium-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .medium-offset-2,.rtmedia-activity-container .medium-offset-2,#buddypress div.rtmedia-activity-container .medium-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .medium-offset-3,.rtmedia-activity-container .medium-offset-3,#buddypress div.rtmedia-activity-container .medium-offset-3{position:relative;margin-left:25%}.rtmedia-container .medium-offset-4,.rtmedia-activity-container .medium-offset-4,#buddypress div.rtmedia-activity-container .medium-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .medium-offset-5,.rtmedia-activity-container .medium-offset-5,#buddypress div.rtmedia-activity-container .medium-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .medium-offset-6,.rtmedia-activity-container .medium-offset-6,#buddypress div.rtmedia-activity-container .medium-offset-6{position:relative;margin-left:50%}.rtmedia-container .medium-offset-7,.rtmedia-activity-container .medium-offset-7,#buddypress div.rtmedia-activity-container .medium-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .medium-offset-8,.rtmedia-activity-container .medium-offset-8,#buddypress div.rtmedia-activity-container .medium-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .medium-offset-9,.rtmedia-activity-container .medium-offset-9,#buddypress div.rtmedia-activity-container .medium-offset-9{position:relative;margin-left:75%}.rtmedia-container .medium-offset-10,.rtmedia-activity-container .medium-offset-10,#buddypress div.rtmedia-activity-container .medium-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.medium-centered,.rtmedia-activity-container .column.medium-centered,#buddypress div.rtmedia-activity-container .column.medium-centered,.rtmedia-container .columns.medium-centered,.rtmedia-activity-container .columns.medium-centered,#buddypress div.rtmedia-activity-container .columns.medium-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.medium-uncentered,.rtmedia-activity-container .column.medium-uncentered,#buddypress div.rtmedia-activity-container .column.medium-uncentered,.rtmedia-container .columns.medium-uncentered,.rtmedia-activity-container .columns.medium-uncentered,#buddypress div.rtmedia-activity-container .columns.medium-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.medium-uncentered.opposite,.rtmedia-activity-container .column.medium-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.medium-uncentered.opposite,.rtmedia-container .columns.medium-uncentered.opposite,.rtmedia-activity-container .columns.medium-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.medium-uncentered.opposite{float:right !important}.rtmedia-container .push-1,.rtmedia-activity-container .push-1,#buddypress div.rtmedia-activity-container .push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .pull-1,.rtmedia-activity-container .pull-1,#buddypress div.rtmedia-activity-container .pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .push-2,.rtmedia-activity-container .push-2,#buddypress div.rtmedia-activity-container .push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .pull-2,.rtmedia-activity-container .pull-2,#buddypress div.rtmedia-activity-container .pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .push-3,.rtmedia-activity-container .push-3,#buddypress div.rtmedia-activity-container .push-3{position:relative;left:25%;right:auto}.rtmedia-container .pull-3,.rtmedia-activity-container .pull-3,#buddypress div.rtmedia-activity-container .pull-3{position:relative;right:25%;left:auto}.rtmedia-container .push-4,.rtmedia-activity-container .push-4,#buddypress div.rtmedia-activity-container .push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .pull-4,.rtmedia-activity-container .pull-4,#buddypress div.rtmedia-activity-container .pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .push-5,.rtmedia-activity-container .push-5,#buddypress div.rtmedia-activity-container .push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .pull-5,.rtmedia-activity-container .pull-5,#buddypress div.rtmedia-activity-container .pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .push-6,.rtmedia-activity-container .push-6,#buddypress div.rtmedia-activity-container .push-6{position:relative;left:50%;right:auto}.rtmedia-container .pull-6,.rtmedia-activity-container .pull-6,#buddypress div.rtmedia-activity-container .pull-6{position:relative;right:50%;left:auto}.rtmedia-container .push-7,.rtmedia-activity-container .push-7,#buddypress div.rtmedia-activity-container .push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .pull-7,.rtmedia-activity-container .pull-7,#buddypress div.rtmedia-activity-container .pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .push-8,.rtmedia-activity-container .push-8,#buddypress div.rtmedia-activity-container .push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .pull-8,.rtmedia-activity-container .pull-8,#buddypress div.rtmedia-activity-container .pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .push-9,.rtmedia-activity-container .push-9,#buddypress div.rtmedia-activity-container .push-9{position:relative;left:75%;right:auto}.rtmedia-container .pull-9,.rtmedia-activity-container .pull-9,#buddypress div.rtmedia-activity-container .pull-9{position:relative;right:75%;left:auto}.rtmedia-container .push-10,.rtmedia-activity-container .push-10,#buddypress div.rtmedia-activity-container .push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .pull-10,.rtmedia-activity-container .pull-10,#buddypress div.rtmedia-activity-container .pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .push-11,.rtmedia-activity-container .push-11,#buddypress div.rtmedia-activity-container .push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .pull-11,.rtmedia-activity-container .pull-11,#buddypress div.rtmedia-activity-container .pull-11{position:relative;right:91.66667%;left:auto}}@media only screen and (min-width: 64.063em){.rtmedia-container .large-push-1,.rtmedia-activity-container .large-push-1,#buddypress div.rtmedia-activity-container .large-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .large-pull-1,.rtmedia-activity-container .large-pull-1,#buddypress div.rtmedia-activity-container .large-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .large-push-2,.rtmedia-activity-container .large-push-2,#buddypress div.rtmedia-activity-container .large-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .large-pull-2,.rtmedia-activity-container .large-pull-2,#buddypress div.rtmedia-activity-container .large-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .large-push-3,.rtmedia-activity-container .large-push-3,#buddypress div.rtmedia-activity-container .large-push-3{position:relative;left:25%;right:auto}.rtmedia-container .large-pull-3,.rtmedia-activity-container .large-pull-3,#buddypress div.rtmedia-activity-container .large-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .large-push-4,.rtmedia-activity-container .large-push-4,#buddypress div.rtmedia-activity-container .large-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .large-pull-4,.rtmedia-activity-container .large-pull-4,#buddypress div.rtmedia-activity-container .large-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .large-push-5,.rtmedia-activity-container .large-push-5,#buddypress div.rtmedia-activity-container .large-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .large-pull-5,.rtmedia-activity-container .large-pull-5,#buddypress div.rtmedia-activity-container .large-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .large-push-6,.rtmedia-activity-container .large-push-6,#buddypress div.rtmedia-activity-container .large-push-6{position:relative;left:50%;right:auto}.rtmedia-container .large-pull-6,.rtmedia-activity-container .large-pull-6,#buddypress div.rtmedia-activity-container .large-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .large-push-7,.rtmedia-activity-container .large-push-7,#buddypress div.rtmedia-activity-container .large-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .large-pull-7,.rtmedia-activity-container .large-pull-7,#buddypress div.rtmedia-activity-container .large-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .large-push-8,.rtmedia-activity-container .large-push-8,#buddypress div.rtmedia-activity-container .large-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .large-pull-8,.rtmedia-activity-container .large-pull-8,#buddypress div.rtmedia-activity-container .large-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .large-push-9,.rtmedia-activity-container .large-push-9,#buddypress div.rtmedia-activity-container .large-push-9{position:relative;left:75%;right:auto}.rtmedia-container .large-pull-9,.rtmedia-activity-container .large-pull-9,#buddypress div.rtmedia-activity-container .large-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .large-push-10,.rtmedia-activity-container .large-push-10,#buddypress div.rtmedia-activity-container .large-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .large-pull-10,.rtmedia-activity-container .large-pull-10,#buddypress div.rtmedia-activity-container .large-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .large-push-11,.rtmedia-activity-container .large-push-11,#buddypress div.rtmedia-activity-container .large-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .large-pull-11,.rtmedia-activity-container .large-pull-11,#buddypress div.rtmedia-activity-container .large-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .large-1,.rtmedia-activity-container .large-1,#buddypress div.rtmedia-activity-container .large-1{position:relative;width:8.33333%}.rtmedia-container .large-2,.rtmedia-activity-container .large-2,#buddypress div.rtmedia-activity-container .large-2{position:relative;width:16.66667%}.rtmedia-container .large-3,.rtmedia-activity-container .large-3,#buddypress div.rtmedia-activity-container .large-3{position:relative;width:25%}.rtmedia-container .large-4,.rtmedia-activity-container .large-4,#buddypress div.rtmedia-activity-container .large-4{position:relative;width:33.33333%}.rtmedia-container .large-5,.rtmedia-activity-container .large-5,#buddypress div.rtmedia-activity-container .large-5{position:relative;width:41.66667%}.rtmedia-container .large-6,.rtmedia-activity-container .large-6,#buddypress div.rtmedia-activity-container .large-6{position:relative;width:50%}.rtmedia-container .large-7,.rtmedia-activity-container .large-7,#buddypress div.rtmedia-activity-container .large-7{position:relative;width:58.33333%}.rtmedia-container .large-8,.rtmedia-activity-container .large-8,#buddypress div.rtmedia-activity-container .large-8{position:relative;width:66.66667%}.rtmedia-container .large-9,.rtmedia-activity-container .large-9,#buddypress div.rtmedia-activity-container .large-9{position:relative;width:75%}.rtmedia-container .large-10,.rtmedia-activity-container .large-10,#buddypress div.rtmedia-activity-container .large-10{position:relative;width:83.33333%}.rtmedia-container .large-11,.rtmedia-activity-container .large-11,#buddypress div.rtmedia-activity-container .large-11{position:relative;width:91.66667%}.rtmedia-container .large-12,.rtmedia-activity-container .large-12,#buddypress div.rtmedia-activity-container .large-12{position:relative;width:100%}.rtmedia-container .large-offset-0,.rtmedia-activity-container .large-offset-0,#buddypress div.rtmedia-activity-container .large-offset-0{position:relative;margin-left:0%}.rtmedia-container .large-offset-1,.rtmedia-activity-container .large-offset-1,#buddypress div.rtmedia-activity-container .large-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .large-offset-2,.rtmedia-activity-container .large-offset-2,#buddypress div.rtmedia-activity-container .large-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .large-offset-3,.rtmedia-activity-container .large-offset-3,#buddypress div.rtmedia-activity-container .large-offset-3{position:relative;margin-left:25%}.rtmedia-container .large-offset-4,.rtmedia-activity-container .large-offset-4,#buddypress div.rtmedia-activity-container .large-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .large-offset-5,.rtmedia-activity-container .large-offset-5,#buddypress div.rtmedia-activity-container .large-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .large-offset-6,.rtmedia-activity-container .large-offset-6,#buddypress div.rtmedia-activity-container .large-offset-6{position:relative;margin-left:50%}.rtmedia-container .large-offset-7,.rtmedia-activity-container .large-offset-7,#buddypress div.rtmedia-activity-container .large-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .large-offset-8,.rtmedia-activity-container .large-offset-8,#buddypress div.rtmedia-activity-container .large-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .large-offset-9,.rtmedia-activity-container .large-offset-9,#buddypress div.rtmedia-activity-container .large-offset-9{position:relative;margin-left:75%}.rtmedia-container .large-offset-10,.rtmedia-activity-container .large-offset-10,#buddypress div.rtmedia-activity-container .large-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.large-centered,.rtmedia-activity-container .column.large-centered,#buddypress div.rtmedia-activity-container .column.large-centered,.rtmedia-container .columns.large-centered,.rtmedia-activity-container .columns.large-centered,#buddypress div.rtmedia-activity-container .columns.large-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.large-uncentered,.rtmedia-activity-container .column.large-uncentered,#buddypress div.rtmedia-activity-container .column.large-uncentered,.rtmedia-container .columns.large-uncentered,.rtmedia-activity-container .columns.large-uncentered,#buddypress div.rtmedia-activity-container .columns.large-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.large-uncentered.opposite,.rtmedia-activity-container .column.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.large-uncentered.opposite,.rtmedia-container .columns.large-uncentered.opposite,.rtmedia-activity-container .columns.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.large-uncentered.opposite{float:right !important}}@media only screen and (min-width: 90.063em){.rtmedia-container .xlarge-push-1,.rtmedia-activity-container .xlarge-push-1,#buddypress div.rtmedia-activity-container .xlarge-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .xlarge-pull-1,.rtmedia-activity-container .xlarge-pull-1,#buddypress div.rtmedia-activity-container .xlarge-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .xlarge-push-2,.rtmedia-activity-container .xlarge-push-2,#buddypress div.rtmedia-activity-container .xlarge-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .xlarge-pull-2,.rtmedia-activity-container .xlarge-pull-2,#buddypress div.rtmedia-activity-container .xlarge-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .xlarge-push-3,.rtmedia-activity-container .xlarge-push-3,#buddypress div.rtmedia-activity-container .xlarge-push-3{position:relative;left:25%;right:auto}.rtmedia-container .xlarge-pull-3,.rtmedia-activity-container .xlarge-pull-3,#buddypress div.rtmedia-activity-container .xlarge-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .xlarge-push-4,.rtmedia-activity-container .xlarge-push-4,#buddypress div.rtmedia-activity-container .xlarge-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .xlarge-pull-4,.rtmedia-activity-container .xlarge-pull-4,#buddypress div.rtmedia-activity-container .xlarge-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .xlarge-push-5,.rtmedia-activity-container .xlarge-push-5,#buddypress div.rtmedia-activity-container .xlarge-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .xlarge-pull-5,.rtmedia-activity-container .xlarge-pull-5,#buddypress div.rtmedia-activity-container .xlarge-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .xlarge-push-6,.rtmedia-activity-container .xlarge-push-6,#buddypress div.rtmedia-activity-container .xlarge-push-6{position:relative;left:50%;right:auto}.rtmedia-container .xlarge-pull-6,.rtmedia-activity-container .xlarge-pull-6,#buddypress div.rtmedia-activity-container .xlarge-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .xlarge-push-7,.rtmedia-activity-container .xlarge-push-7,#buddypress div.rtmedia-activity-container .xlarge-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .xlarge-pull-7,.rtmedia-activity-container .xlarge-pull-7,#buddypress div.rtmedia-activity-container .xlarge-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .xlarge-push-8,.rtmedia-activity-container .xlarge-push-8,#buddypress div.rtmedia-activity-container .xlarge-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .xlarge-pull-8,.rtmedia-activity-container .xlarge-pull-8,#buddypress div.rtmedia-activity-container .xlarge-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .xlarge-push-9,.rtmedia-activity-container .xlarge-push-9,#buddypress div.rtmedia-activity-container .xlarge-push-9{position:relative;left:75%;right:auto}.rtmedia-container .xlarge-pull-9,.rtmedia-activity-container .xlarge-pull-9,#buddypress div.rtmedia-activity-container .xlarge-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .xlarge-push-10,.rtmedia-activity-container .xlarge-push-10,#buddypress div.rtmedia-activity-container .xlarge-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .xlarge-pull-10,.rtmedia-activity-container .xlarge-pull-10,#buddypress div.rtmedia-activity-container .xlarge-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .xlarge-push-11,.rtmedia-activity-container .xlarge-push-11,#buddypress div.rtmedia-activity-container .xlarge-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .xlarge-pull-11,.rtmedia-activity-container .xlarge-pull-11,#buddypress div.rtmedia-activity-container .xlarge-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .xlarge-1,.rtmedia-activity-container .xlarge-1,#buddypress div.rtmedia-activity-container .xlarge-1{position:relative;width:8.33333%}.rtmedia-container .xlarge-2,.rtmedia-activity-container .xlarge-2,#buddypress div.rtmedia-activity-container .xlarge-2{position:relative;width:16.66667%}.rtmedia-container .xlarge-3,.rtmedia-activity-container .xlarge-3,#buddypress div.rtmedia-activity-container .xlarge-3{position:relative;width:25%}.rtmedia-container .xlarge-4,.rtmedia-activity-container .xlarge-4,#buddypress div.rtmedia-activity-container .xlarge-4{position:relative;width:33.33333%}.rtmedia-container .xlarge-5,.rtmedia-activity-container .xlarge-5,#buddypress div.rtmedia-activity-container .xlarge-5{position:relative;width:41.66667%}.rtmedia-container .xlarge-6,.rtmedia-activity-container .xlarge-6,#buddypress div.rtmedia-activity-container .xlarge-6{position:relative;width:50%}.rtmedia-container .xlarge-7,.rtmedia-activity-container .xlarge-7,#buddypress div.rtmedia-activity-container .xlarge-7{position:relative;width:58.33333%}.rtmedia-container .xlarge-8,.rtmedia-activity-container .xlarge-8,#buddypress div.rtmedia-activity-container .xlarge-8{position:relative;width:66.66667%}.rtmedia-container .xlarge-9,.rtmedia-activity-container .xlarge-9,#buddypress div.rtmedia-activity-container .xlarge-9{position:relative;width:75%}.rtmedia-container .xlarge-10,.rtmedia-activity-container .xlarge-10,#buddypress div.rtmedia-activity-container .xlarge-10{position:relative;width:83.33333%}.rtmedia-container .xlarge-11,.rtmedia-activity-container .xlarge-11,#buddypress div.rtmedia-activity-container .xlarge-11{position:relative;width:91.66667%}.rtmedia-container .xlarge-12,.rtmedia-activity-container .xlarge-12,#buddypress div.rtmedia-activity-container .xlarge-12{position:relative;width:100%}.rtmedia-container .xlarge-offset-0,.rtmedia-activity-container .xlarge-offset-0,#buddypress div.rtmedia-activity-container .xlarge-offset-0{position:relative;margin-left:0%}.rtmedia-container .xlarge-offset-1,.rtmedia-activity-container .xlarge-offset-1,#buddypress div.rtmedia-activity-container .xlarge-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .xlarge-offset-2,.rtmedia-activity-container .xlarge-offset-2,#buddypress div.rtmedia-activity-container .xlarge-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .xlarge-offset-3,.rtmedia-activity-container .xlarge-offset-3,#buddypress div.rtmedia-activity-container .xlarge-offset-3{position:relative;margin-left:25%}.rtmedia-container .xlarge-offset-4,.rtmedia-activity-container .xlarge-offset-4,#buddypress div.rtmedia-activity-container .xlarge-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .xlarge-offset-5,.rtmedia-activity-container .xlarge-offset-5,#buddypress div.rtmedia-activity-container .xlarge-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .xlarge-offset-6,.rtmedia-activity-container .xlarge-offset-6,#buddypress div.rtmedia-activity-container .xlarge-offset-6{position:relative;margin-left:50%}.rtmedia-container .xlarge-offset-7,.rtmedia-activity-container .xlarge-offset-7,#buddypress div.rtmedia-activity-container .xlarge-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .xlarge-offset-8,.rtmedia-activity-container .xlarge-offset-8,#buddypress div.rtmedia-activity-container .xlarge-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .xlarge-offset-9,.rtmedia-activity-container .xlarge-offset-9,#buddypress div.rtmedia-activity-container .xlarge-offset-9{position:relative;margin-left:75%}.rtmedia-container .xlarge-offset-10,.rtmedia-activity-container .xlarge-offset-10,#buddypress div.rtmedia-activity-container .xlarge-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.xlarge-centered,.rtmedia-activity-container .column.xlarge-centered,#buddypress div.rtmedia-activity-container .column.xlarge-centered,.rtmedia-container .columns.xlarge-centered,.rtmedia-activity-container .columns.xlarge-centered,#buddypress div.rtmedia-activity-container .columns.xlarge-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.xlarge-uncentered,.rtmedia-activity-container .column.xlarge-uncentered,#buddypress div.rtmedia-activity-container .column.xlarge-uncentered,.rtmedia-container .columns.xlarge-uncentered,.rtmedia-activity-container .columns.xlarge-uncentered,#buddypress div.rtmedia-activity-container .columns.xlarge-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.xlarge-uncentered.opposite,.rtmedia-activity-container .column.xlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.xlarge-uncentered.opposite,.rtmedia-container .columns.xlarge-uncentered.opposite,.rtmedia-activity-container .columns.xlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.xlarge-uncentered.opposite{float:right !important}}@media only screen and (min-width: 120.063em){.rtmedia-container .xxlarge-push-1,.rtmedia-activity-container .xxlarge-push-1,#buddypress div.rtmedia-activity-container .xxlarge-push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .xxlarge-pull-1,.rtmedia-activity-container .xxlarge-pull-1,#buddypress div.rtmedia-activity-container .xxlarge-pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .xxlarge-push-2,.rtmedia-activity-container .xxlarge-push-2,#buddypress div.rtmedia-activity-container .xxlarge-push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .xxlarge-pull-2,.rtmedia-activity-container .xxlarge-pull-2,#buddypress div.rtmedia-activity-container .xxlarge-pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .xxlarge-push-3,.rtmedia-activity-container .xxlarge-push-3,#buddypress div.rtmedia-activity-container .xxlarge-push-3{position:relative;left:25%;right:auto}.rtmedia-container .xxlarge-pull-3,.rtmedia-activity-container .xxlarge-pull-3,#buddypress div.rtmedia-activity-container .xxlarge-pull-3{position:relative;right:25%;left:auto}.rtmedia-container .xxlarge-push-4,.rtmedia-activity-container .xxlarge-push-4,#buddypress div.rtmedia-activity-container .xxlarge-push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .xxlarge-pull-4,.rtmedia-activity-container .xxlarge-pull-4,#buddypress div.rtmedia-activity-container .xxlarge-pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .xxlarge-push-5,.rtmedia-activity-container .xxlarge-push-5,#buddypress div.rtmedia-activity-container .xxlarge-push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .xxlarge-pull-5,.rtmedia-activity-container .xxlarge-pull-5,#buddypress div.rtmedia-activity-container .xxlarge-pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .xxlarge-push-6,.rtmedia-activity-container .xxlarge-push-6,#buddypress div.rtmedia-activity-container .xxlarge-push-6{position:relative;left:50%;right:auto}.rtmedia-container .xxlarge-pull-6,.rtmedia-activity-container .xxlarge-pull-6,#buddypress div.rtmedia-activity-container .xxlarge-pull-6{position:relative;right:50%;left:auto}.rtmedia-container .xxlarge-push-7,.rtmedia-activity-container .xxlarge-push-7,#buddypress div.rtmedia-activity-container .xxlarge-push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .xxlarge-pull-7,.rtmedia-activity-container .xxlarge-pull-7,#buddypress div.rtmedia-activity-container .xxlarge-pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .xxlarge-push-8,.rtmedia-activity-container .xxlarge-push-8,#buddypress div.rtmedia-activity-container .xxlarge-push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .xxlarge-pull-8,.rtmedia-activity-container .xxlarge-pull-8,#buddypress div.rtmedia-activity-container .xxlarge-pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .xxlarge-push-9,.rtmedia-activity-container .xxlarge-push-9,#buddypress div.rtmedia-activity-container .xxlarge-push-9{position:relative;left:75%;right:auto}.rtmedia-container .xxlarge-pull-9,.rtmedia-activity-container .xxlarge-pull-9,#buddypress div.rtmedia-activity-container .xxlarge-pull-9{position:relative;right:75%;left:auto}.rtmedia-container .xxlarge-push-10,.rtmedia-activity-container .xxlarge-push-10,#buddypress div.rtmedia-activity-container .xxlarge-push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .xxlarge-pull-10,.rtmedia-activity-container .xxlarge-pull-10,#buddypress div.rtmedia-activity-container .xxlarge-pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .xxlarge-push-11,.rtmedia-activity-container .xxlarge-push-11,#buddypress div.rtmedia-activity-container .xxlarge-push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .xxlarge-pull-11,.rtmedia-activity-container .xxlarge-pull-11,#buddypress div.rtmedia-activity-container .xxlarge-pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375rem;padding-right:0.9375rem;float:left}.rtmedia-container .xxlarge-1,.rtmedia-activity-container .xxlarge-1,#buddypress div.rtmedia-activity-container .xxlarge-1{position:relative;width:8.33333%}.rtmedia-container .xxlarge-2,.rtmedia-activity-container .xxlarge-2,#buddypress div.rtmedia-activity-container .xxlarge-2{position:relative;width:16.66667%}.rtmedia-container .xxlarge-3,.rtmedia-activity-container .xxlarge-3,#buddypress div.rtmedia-activity-container .xxlarge-3{position:relative;width:25%}.rtmedia-container .xxlarge-4,.rtmedia-activity-container .xxlarge-4,#buddypress div.rtmedia-activity-container .xxlarge-4{position:relative;width:33.33333%}.rtmedia-container .xxlarge-5,.rtmedia-activity-container .xxlarge-5,#buddypress div.rtmedia-activity-container .xxlarge-5{position:relative;width:41.66667%}.rtmedia-container .xxlarge-6,.rtmedia-activity-container .xxlarge-6,#buddypress div.rtmedia-activity-container .xxlarge-6{position:relative;width:50%}.rtmedia-container .xxlarge-7,.rtmedia-activity-container .xxlarge-7,#buddypress div.rtmedia-activity-container .xxlarge-7{position:relative;width:58.33333%}.rtmedia-container .xxlarge-8,.rtmedia-activity-container .xxlarge-8,#buddypress div.rtmedia-activity-container .xxlarge-8{position:relative;width:66.66667%}.rtmedia-container .xxlarge-9,.rtmedia-activity-container .xxlarge-9,#buddypress div.rtmedia-activity-container .xxlarge-9{position:relative;width:75%}.rtmedia-container .xxlarge-10,.rtmedia-activity-container .xxlarge-10,#buddypress div.rtmedia-activity-container .xxlarge-10{position:relative;width:83.33333%}.rtmedia-container .xxlarge-11,.rtmedia-activity-container .xxlarge-11,#buddypress div.rtmedia-activity-container .xxlarge-11{position:relative;width:91.66667%}.rtmedia-container .xxlarge-12,.rtmedia-activity-container .xxlarge-12,#buddypress div.rtmedia-activity-container .xxlarge-12{position:relative;width:100%}.rtmedia-container .xxlarge-offset-0,.rtmedia-activity-container .xxlarge-offset-0,#buddypress div.rtmedia-activity-container .xxlarge-offset-0{position:relative;margin-left:0%}.rtmedia-container .xxlarge-offset-1,.rtmedia-activity-container .xxlarge-offset-1,#buddypress div.rtmedia-activity-container .xxlarge-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .xxlarge-offset-2,.rtmedia-activity-container .xxlarge-offset-2,#buddypress div.rtmedia-activity-container .xxlarge-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .xxlarge-offset-3,.rtmedia-activity-container .xxlarge-offset-3,#buddypress div.rtmedia-activity-container .xxlarge-offset-3{position:relative;margin-left:25%}.rtmedia-container .xxlarge-offset-4,.rtmedia-activity-container .xxlarge-offset-4,#buddypress div.rtmedia-activity-container .xxlarge-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .xxlarge-offset-5,.rtmedia-activity-container .xxlarge-offset-5,#buddypress div.rtmedia-activity-container .xxlarge-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .xxlarge-offset-6,.rtmedia-activity-container .xxlarge-offset-6,#buddypress div.rtmedia-activity-container .xxlarge-offset-6{position:relative;margin-left:50%}.rtmedia-container .xxlarge-offset-7,.rtmedia-activity-container .xxlarge-offset-7,#buddypress div.rtmedia-activity-container .xxlarge-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .xxlarge-offset-8,.rtmedia-activity-container .xxlarge-offset-8,#buddypress div.rtmedia-activity-container .xxlarge-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .xxlarge-offset-9,.rtmedia-activity-container .xxlarge-offset-9,#buddypress div.rtmedia-activity-container .xxlarge-offset-9{position:relative;margin-left:75%}.rtmedia-container .xxlarge-offset-10,.rtmedia-activity-container .xxlarge-offset-10,#buddypress div.rtmedia-activity-container .xxlarge-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.xxlarge-centered,.rtmedia-activity-container .column.xxlarge-centered,#buddypress div.rtmedia-activity-container .column.xxlarge-centered,.rtmedia-container .columns.xxlarge-centered,.rtmedia-activity-container .columns.xxlarge-centered,#buddypress div.rtmedia-activity-container .columns.xxlarge-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.xxlarge-uncentered,.rtmedia-activity-container .column.xxlarge-uncentered,#buddypress div.rtmedia-activity-container .column.xxlarge-uncentered,.rtmedia-container .columns.xxlarge-uncentered,.rtmedia-activity-container .columns.xxlarge-uncentered,#buddypress div.rtmedia-activity-container .columns.xxlarge-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.xxlarge-uncentered.opposite,.rtmedia-activity-container .column.xxlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.xxlarge-uncentered.opposite,.rtmedia-container .columns.xxlarge-uncentered.opposite,.rtmedia-activity-container .columns.xxlarge-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.xxlarge-uncentered.opposite{float:right !important}}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small,.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-large-only,.rtmedia-activity-container .hide-for-large-only,#buddypress div.rtmedia-activity-container .hide-for-large-only,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.show-for-small,.rtmedia-activity-container table.show-for-small,#buddypress div.rtmedia-activity-container table.show-for-small,.rtmedia-container table.show-for-small-only,.rtmedia-activity-container table.show-for-small-only,#buddypress div.rtmedia-activity-container table.show-for-small-only,.rtmedia-container table.show-for-medium-down,.rtmedia-activity-container table.show-for-medium-down,#buddypress div.rtmedia-activity-container table.show-for-medium-down,.rtmedia-container table.show-for-large-down,.rtmedia-activity-container table.show-for-large-down,#buddypress div.rtmedia-activity-container table.show-for-large-down,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-up,.rtmedia-activity-container table.hide-for-medium-up,#buddypress div.rtmedia-activity-container table.hide-for-medium-up,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-up,.rtmedia-activity-container table.hide-for-large-up,#buddypress div.rtmedia-activity-container table.hide-for-large-up,.rtmedia-container table.hide-for-large-only,.rtmedia-activity-container table.hide-for-large-only,#buddypress div.rtmedia-activity-container table.hide-for-large-only,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge,.rtmedia-container table.hide-for-xlarge-up,.rtmedia-activity-container table.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-up,.rtmedia-container table.hide-for-xlarge-only,.rtmedia-activity-container table.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.show-for-small,.rtmedia-activity-container thead.show-for-small,#buddypress div.rtmedia-activity-container thead.show-for-small,.rtmedia-container thead.show-for-small-only,.rtmedia-activity-container thead.show-for-small-only,#buddypress div.rtmedia-activity-container thead.show-for-small-only,.rtmedia-container thead.show-for-medium-down,.rtmedia-activity-container thead.show-for-medium-down,#buddypress div.rtmedia-activity-container thead.show-for-medium-down,.rtmedia-container thead.show-for-large-down,.rtmedia-activity-container thead.show-for-large-down,#buddypress div.rtmedia-activity-container thead.show-for-large-down,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-up,.rtmedia-activity-container thead.hide-for-medium-up,#buddypress div.rtmedia-activity-container thead.hide-for-medium-up,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-up,.rtmedia-activity-container thead.hide-for-large-up,#buddypress div.rtmedia-activity-container thead.hide-for-large-up,.rtmedia-container thead.hide-for-large-only,.rtmedia-activity-container thead.hide-for-large-only,#buddypress div.rtmedia-activity-container thead.hide-for-large-only,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge,.rtmedia-container thead.hide-for-xlarge-up,.rtmedia-activity-container thead.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-up,.rtmedia-container thead.hide-for-xlarge-only,.rtmedia-activity-container thead.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.show-for-small,.rtmedia-activity-container tbody.show-for-small,#buddypress div.rtmedia-activity-container tbody.show-for-small,.rtmedia-container tbody.show-for-small-only,.rtmedia-activity-container tbody.show-for-small-only,#buddypress div.rtmedia-activity-container tbody.show-for-small-only,.rtmedia-container tbody.show-for-medium-down,.rtmedia-activity-container tbody.show-for-medium-down,#buddypress div.rtmedia-activity-container tbody.show-for-medium-down,.rtmedia-container tbody.show-for-large-down,.rtmedia-activity-container tbody.show-for-large-down,#buddypress div.rtmedia-activity-container tbody.show-for-large-down,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-up,.rtmedia-activity-container tbody.hide-for-medium-up,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-up,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-up,.rtmedia-activity-container tbody.hide-for-large-up,#buddypress div.rtmedia-activity-container tbody.hide-for-large-up,.rtmedia-container tbody.hide-for-large-only,.rtmedia-activity-container tbody.hide-for-large-only,#buddypress div.rtmedia-activity-container tbody.hide-for-large-only,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge,.rtmedia-container tbody.hide-for-xlarge-up,.rtmedia-activity-container tbody.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-up,.rtmedia-container tbody.hide-for-xlarge-only,.rtmedia-activity-container tbody.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.show-for-small,.rtmedia-activity-container tr.show-for-small,#buddypress div.rtmedia-activity-container tr.show-for-small,.rtmedia-container tr.show-for-small-only,.rtmedia-activity-container tr.show-for-small-only,#buddypress div.rtmedia-activity-container tr.show-for-small-only,.rtmedia-container tr.show-for-medium-down,.rtmedia-activity-container tr.show-for-medium-down,#buddypress div.rtmedia-activity-container tr.show-for-medium-down,.rtmedia-container tr.show-for-large-down,.rtmedia-activity-container tr.show-for-large-down,#buddypress div.rtmedia-activity-container tr.show-for-large-down,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-up,.rtmedia-activity-container tr.hide-for-medium-up,#buddypress div.rtmedia-activity-container tr.hide-for-medium-up,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-up,.rtmedia-activity-container tr.hide-for-large-up,#buddypress div.rtmedia-activity-container tr.hide-for-large-up,.rtmedia-container tr.hide-for-large-only,.rtmedia-activity-container tr.hide-for-large-only,#buddypress div.rtmedia-activity-container tr.hide-for-large-only,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge,.rtmedia-container tr.hide-for-xlarge-up,.rtmedia-activity-container tr.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-up,.rtmedia-container tr.hide-for-xlarge-only,.rtmedia-activity-container tr.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.show-for-small,.rtmedia-activity-container td.show-for-small,#buddypress div.rtmedia-activity-container td.show-for-small,.rtmedia-container td.show-for-small-only,.rtmedia-activity-container td.show-for-small-only,#buddypress div.rtmedia-activity-container td.show-for-small-only,.rtmedia-container td.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-container td.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-container td.show-for-large-down,.rtmedia-container td.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down .rtmedia-activity-container td.show-for-large-down,.rtmedia-container td.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-container td.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-activity-container td.show-for-medium-down #buddypress div.rtmedia-activity-container td.show-for-large-down,#buddypress .rtmedia-activity-container td.show-for-medium-down div.rtmedia-activity-container td.show-for-large-down,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-up,.rtmedia-activity-container td.hide-for-medium-up,#buddypress div.rtmedia-activity-container td.hide-for-medium-up,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-up,.rtmedia-activity-container td.hide-for-large-up,#buddypress div.rtmedia-activity-container td.hide-for-large-up,.rtmedia-container td.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge .rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-container td.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge #buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress .rtmedia-activity-container td.hide-for-xlarge div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container th.show-for-small,.rtmedia-activity-container th.show-for-small,#buddypress div.rtmedia-activity-container th.show-for-small,.rtmedia-container th.show-for-small-only,.rtmedia-activity-container th.show-for-small-only,#buddypress div.rtmedia-activity-container th.show-for-small-only,.rtmedia-container th.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-container th.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-container th.show-for-large-down,.rtmedia-container th.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down .rtmedia-activity-container th.show-for-large-down,.rtmedia-container th.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-container th.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-activity-container th.show-for-medium-down #buddypress div.rtmedia-activity-container th.show-for-large-down,#buddypress .rtmedia-activity-container th.show-for-medium-down div.rtmedia-activity-container th.show-for-large-down,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-up,.rtmedia-activity-container th.hide-for-medium-up,#buddypress div.rtmedia-activity-container th.hide-for-medium-up,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-up,.rtmedia-activity-container th.hide-for-large-up,#buddypress div.rtmedia-activity-container th.hide-for-large-up,.rtmedia-container th.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge .rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-container th.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge #buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress .rtmedia-activity-container th.hide-for-xlarge div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up{display:table-cell !important}@media only screen and (min-width: 40.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-large-only,.rtmedia-activity-container .hide-for-large-only,#buddypress div.rtmedia-activity-container .hide-for-large-only,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small,.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.show-for-medium,.rtmedia-activity-container table.show-for-medium,#buddypress div.rtmedia-activity-container table.show-for-medium,.rtmedia-container table.show-for-medium-down,.rtmedia-activity-container table.show-for-medium-down,#buddypress div.rtmedia-activity-container table.show-for-medium-down,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-medium-only,.rtmedia-activity-container table.show-for-medium-only,#buddypress div.rtmedia-activity-container table.show-for-medium-only,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-up,.rtmedia-activity-container table.hide-for-large-up,#buddypress div.rtmedia-activity-container table.hide-for-large-up,.rtmedia-container table.hide-for-large-only,.rtmedia-activity-container table.hide-for-large-only,#buddypress div.rtmedia-activity-container table.hide-for-large-only,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge,.rtmedia-container table.hide-for-xlarge-up,.rtmedia-activity-container table.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-up,.rtmedia-container table.hide-for-xlarge-only,.rtmedia-activity-container table.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.show-for-medium,.rtmedia-activity-container thead.show-for-medium,#buddypress div.rtmedia-activity-container thead.show-for-medium,.rtmedia-container thead.show-for-medium-down,.rtmedia-activity-container thead.show-for-medium-down,#buddypress div.rtmedia-activity-container thead.show-for-medium-down,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-medium-only,.rtmedia-activity-container thead.show-for-medium-only,#buddypress div.rtmedia-activity-container thead.show-for-medium-only,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-up,.rtmedia-activity-container thead.hide-for-large-up,#buddypress div.rtmedia-activity-container thead.hide-for-large-up,.rtmedia-container thead.hide-for-large-only,.rtmedia-activity-container thead.hide-for-large-only,#buddypress div.rtmedia-activity-container thead.hide-for-large-only,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge,.rtmedia-container thead.hide-for-xlarge-up,.rtmedia-activity-container thead.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-up,.rtmedia-container thead.hide-for-xlarge-only,.rtmedia-activity-container thead.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.show-for-medium,.rtmedia-activity-container tbody.show-for-medium,#buddypress div.rtmedia-activity-container tbody.show-for-medium,.rtmedia-container tbody.show-for-medium-down,.rtmedia-activity-container tbody.show-for-medium-down,#buddypress div.rtmedia-activity-container tbody.show-for-medium-down,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-medium-only,.rtmedia-activity-container tbody.show-for-medium-only,#buddypress div.rtmedia-activity-container tbody.show-for-medium-only,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-up,.rtmedia-activity-container tbody.hide-for-large-up,#buddypress div.rtmedia-activity-container tbody.hide-for-large-up,.rtmedia-container tbody.hide-for-large-only,.rtmedia-activity-container tbody.hide-for-large-only,#buddypress div.rtmedia-activity-container tbody.hide-for-large-only,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge,.rtmedia-container tbody.hide-for-xlarge-up,.rtmedia-activity-container tbody.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-up,.rtmedia-container tbody.hide-for-xlarge-only,.rtmedia-activity-container tbody.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.show-for-medium,.rtmedia-activity-container tr.show-for-medium,#buddypress div.rtmedia-activity-container tr.show-for-medium,.rtmedia-container tr.show-for-medium-down,.rtmedia-activity-container tr.show-for-medium-down,#buddypress div.rtmedia-activity-container tr.show-for-medium-down,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-medium-only,.rtmedia-activity-container tr.show-for-medium-only,#buddypress div.rtmedia-activity-container tr.show-for-medium-only,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-up,.rtmedia-activity-container tr.hide-for-large-up,#buddypress div.rtmedia-activity-container tr.hide-for-large-up,.rtmedia-container tr.hide-for-large-only,.rtmedia-activity-container tr.hide-for-large-only,#buddypress div.rtmedia-activity-container tr.hide-for-large-only,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge,.rtmedia-container tr.hide-for-xlarge-up,.rtmedia-activity-container tr.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-up,.rtmedia-container tr.hide-for-xlarge-only,.rtmedia-activity-container tr.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.show-for-medium,.rtmedia-activity-container td.show-for-medium,#buddypress div.rtmedia-activity-container td.show-for-medium,.rtmedia-container td.show-for-medium-down,.rtmedia-activity-container td.show-for-medium-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-medium-only,.rtmedia-activity-container td.show-for-medium-only,#buddypress div.rtmedia-activity-container td.show-for-medium-only,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-up,.rtmedia-activity-container td.hide-for-large-up,#buddypress div.rtmedia-activity-container td.hide-for-large-up,.rtmedia-container td.hide-for-large-only,.rtmedia-activity-container td.hide-for-large-only,#buddypress div.rtmedia-activity-container td.hide-for-large-only,.rtmedia-container td.hide-for-xlarge,.rtmedia-activity-container td.hide-for-xlarge,#buddypress div.rtmedia-activity-container td.hide-for-xlarge,.rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge-only,.rtmedia-activity-container td.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-only,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container td.hide-for-xxlarge-only,.rtmedia-activity-container td.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.show-for-medium,.rtmedia-activity-container th.show-for-medium,#buddypress div.rtmedia-activity-container th.show-for-medium,.rtmedia-container th.show-for-medium-down,.rtmedia-activity-container th.show-for-medium-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-medium-only,.rtmedia-activity-container th.show-for-medium-only,#buddypress div.rtmedia-activity-container th.show-for-medium-only,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-up,.rtmedia-activity-container th.hide-for-large-up,#buddypress div.rtmedia-activity-container th.hide-for-large-up,.rtmedia-container th.hide-for-large-only,.rtmedia-activity-container th.hide-for-large-only,#buddypress div.rtmedia-activity-container th.hide-for-large-only,.rtmedia-container th.hide-for-xlarge,.rtmedia-activity-container th.hide-for-xlarge,#buddypress div.rtmedia-activity-container th.hide-for-xlarge,.rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge-only,.rtmedia-activity-container th.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-only,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container th.hide-for-xxlarge-only,.rtmedia-activity-container th.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-only{display:table-cell !important}}@media only screen and (min-width: 64.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-large-only,.rtmedia-activity-container .hide-for-large-only,#buddypress div.rtmedia-activity-container .hide-for-large-only,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-large,.rtmedia-activity-container table.show-for-large,#buddypress div.rtmedia-activity-container table.show-for-large,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.show-for-large-only,.rtmedia-activity-container table.show-for-large-only,#buddypress div.rtmedia-activity-container table.show-for-large-only,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge,.rtmedia-container table.hide-for-xlarge-up,.rtmedia-activity-container table.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-up,.rtmedia-container table.hide-for-xlarge-only,.rtmedia-activity-container table.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-large,.rtmedia-activity-container thead.show-for-large,#buddypress div.rtmedia-activity-container thead.show-for-large,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.show-for-large-only,.rtmedia-activity-container thead.show-for-large-only,#buddypress div.rtmedia-activity-container thead.show-for-large-only,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge,.rtmedia-container thead.hide-for-xlarge-up,.rtmedia-activity-container thead.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-up,.rtmedia-container thead.hide-for-xlarge-only,.rtmedia-activity-container thead.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-large,.rtmedia-activity-container tbody.show-for-large,#buddypress div.rtmedia-activity-container tbody.show-for-large,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.show-for-large-only,.rtmedia-activity-container tbody.show-for-large-only,#buddypress div.rtmedia-activity-container tbody.show-for-large-only,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge,.rtmedia-container tbody.hide-for-xlarge-up,.rtmedia-activity-container tbody.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-up,.rtmedia-container tbody.hide-for-xlarge-only,.rtmedia-activity-container tbody.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-large,.rtmedia-activity-container tr.show-for-large,#buddypress div.rtmedia-activity-container tr.show-for-large,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.show-for-large-only,.rtmedia-activity-container tr.show-for-large-only,#buddypress div.rtmedia-activity-container tr.show-for-large-only,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge,.rtmedia-container tr.hide-for-xlarge-up,.rtmedia-activity-container tr.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-up,.rtmedia-container tr.hide-for-xlarge-only,.rtmedia-activity-container tr.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container td.hide-for-medium-only,.rtmedia-activity-container td.hide-for-medium-only,#buddypress div.rtmedia-activity-container td.hide-for-medium-only,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-large,.rtmedia-activity-container td.show-for-large,#buddypress div.rtmedia-activity-container td.show-for-large,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.show-for-large-only,.rtmedia-activity-container td.show-for-large-only,#buddypress div.rtmedia-activity-container td.show-for-large-only,.rtmedia-container td.hide-for-xlarge,.rtmedia-activity-container td.hide-for-xlarge,#buddypress div.rtmedia-activity-container td.hide-for-xlarge,.rtmedia-container td.hide-for-xlarge-up,.rtmedia-activity-container td.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-up,.rtmedia-container td.hide-for-xlarge-only,.rtmedia-activity-container td.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xlarge-only,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container td.hide-for-xxlarge-only,.rtmedia-activity-container td.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down,.rtmedia-container th.hide-for-medium-only,.rtmedia-activity-container th.hide-for-medium-only,#buddypress div.rtmedia-activity-container th.hide-for-medium-only,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-large,.rtmedia-activity-container th.show-for-large,#buddypress div.rtmedia-activity-container th.show-for-large,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.show-for-large-only,.rtmedia-activity-container th.show-for-large-only,#buddypress div.rtmedia-activity-container th.show-for-large-only,.rtmedia-container th.hide-for-xlarge,.rtmedia-activity-container th.hide-for-xlarge,#buddypress div.rtmedia-activity-container th.hide-for-xlarge,.rtmedia-container th.hide-for-xlarge-up,.rtmedia-activity-container th.hide-for-xlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-up,.rtmedia-container th.hide-for-xlarge-only,.rtmedia-activity-container th.hide-for-xlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xlarge-only,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container th.hide-for-xxlarge-only,.rtmedia-activity-container th.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-only{display:table-cell !important}}@media only screen and (min-width: 90.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .hide-for-xlarge-up,.rtmedia-activity-container .hide-for-xlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xlarge-up,.rtmedia-container .hide-for-xlarge-only,.rtmedia-activity-container .hide-for-xlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xlarge-only,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.show-for-xlarge,.rtmedia-activity-container table.show-for-xlarge,#buddypress div.rtmedia-activity-container table.show-for-xlarge,.rtmedia-container table.show-for-xlarge-up,.rtmedia-activity-container table.show-for-xlarge-up,#buddypress div.rtmedia-activity-container table.show-for-xlarge-up,.rtmedia-container table.show-for-xlarge-only,.rtmedia-activity-container table.show-for-xlarge-only,#buddypress div.rtmedia-activity-container table.show-for-xlarge-only,.rtmedia-container table.hide-for-xxlarge-up,.rtmedia-activity-container table.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-up,.rtmedia-container table.hide-for-xxlarge-only,.rtmedia-activity-container table.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.hide-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.show-for-xlarge,.rtmedia-activity-container thead.show-for-xlarge,#buddypress div.rtmedia-activity-container thead.show-for-xlarge,.rtmedia-container thead.show-for-xlarge-up,.rtmedia-activity-container thead.show-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.show-for-xlarge-up,.rtmedia-container thead.show-for-xlarge-only,.rtmedia-activity-container thead.show-for-xlarge-only,#buddypress div.rtmedia-activity-container thead.show-for-xlarge-only,.rtmedia-container thead.hide-for-xxlarge-up,.rtmedia-activity-container thead.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-up,.rtmedia-container thead.hide-for-xxlarge-only,.rtmedia-activity-container thead.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.hide-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.show-for-xlarge,.rtmedia-activity-container tbody.show-for-xlarge,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge,.rtmedia-container tbody.show-for-xlarge-up,.rtmedia-activity-container tbody.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge-up,.rtmedia-container tbody.show-for-xlarge-only,.rtmedia-activity-container tbody.show-for-xlarge-only,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge-only,.rtmedia-container tbody.hide-for-xxlarge-up,.rtmedia-activity-container tbody.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-up,.rtmedia-container tbody.hide-for-xxlarge-only,.rtmedia-activity-container tbody.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.hide-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.show-for-xlarge,.rtmedia-activity-container tr.show-for-xlarge,#buddypress div.rtmedia-activity-container tr.show-for-xlarge,.rtmedia-container tr.show-for-xlarge-up,.rtmedia-activity-container tr.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.show-for-xlarge-up,.rtmedia-container tr.show-for-xlarge-only,.rtmedia-activity-container tr.show-for-xlarge-only,#buddypress div.rtmedia-activity-container tr.show-for-xlarge-only,.rtmedia-container tr.hide-for-xxlarge-up,.rtmedia-activity-container tr.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-up,.rtmedia-container tr.hide-for-xxlarge-only,.rtmedia-activity-container tr.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.hide-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container td.hide-for-medium-only,.rtmedia-activity-container td.hide-for-medium-only,#buddypress div.rtmedia-activity-container td.hide-for-medium-only,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.show-for-xlarge,.rtmedia-activity-container td.show-for-xlarge,#buddypress div.rtmedia-activity-container td.show-for-xlarge,.rtmedia-container td.show-for-xlarge-up,.rtmedia-activity-container td.show-for-xlarge-up,#buddypress div.rtmedia-activity-container td.show-for-xlarge-up,.rtmedia-container td.show-for-xlarge-only,.rtmedia-activity-container td.show-for-xlarge-only,#buddypress div.rtmedia-activity-container td.show-for-xlarge-only,.rtmedia-container td.hide-for-xxlarge-up,.rtmedia-activity-container td.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-up,.rtmedia-container td.hide-for-xxlarge-only,.rtmedia-activity-container td.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.hide-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down,.rtmedia-container th.hide-for-medium-only,.rtmedia-activity-container th.hide-for-medium-only,#buddypress div.rtmedia-activity-container th.hide-for-medium-only,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.show-for-xlarge,.rtmedia-activity-container th.show-for-xlarge,#buddypress div.rtmedia-activity-container th.show-for-xlarge,.rtmedia-container th.show-for-xlarge-up,.rtmedia-activity-container th.show-for-xlarge-up,#buddypress div.rtmedia-activity-container th.show-for-xlarge-up,.rtmedia-container th.show-for-xlarge-only,.rtmedia-activity-container th.show-for-xlarge-only,#buddypress div.rtmedia-activity-container th.show-for-xlarge-only,.rtmedia-container th.hide-for-xxlarge-up,.rtmedia-activity-container th.hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-up,.rtmedia-container th.hide-for-xxlarge-only,.rtmedia-activity-container th.hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.hide-for-xxlarge-only{display:table-cell !important}}@media only screen and (min-width: 120.063em){.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-small-only,.rtmedia-activity-container .hide-for-small-only,#buddypress div.rtmedia-activity-container .hide-for-small-only,.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-medium-only,.rtmedia-activity-container .hide-for-medium-only,#buddypress div.rtmedia-activity-container .hide-for-medium-only,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-xlarge-up,.rtmedia-activity-container .show-for-xlarge-up,#buddypress div.rtmedia-activity-container .show-for-xlarge-up,.rtmedia-container .show-for-xxlarge-up,.rtmedia-activity-container .show-for-xxlarge-up,#buddypress div.rtmedia-activity-container .show-for-xxlarge-up,.rtmedia-container .show-for-xxlarge-only,.rtmedia-activity-container .show-for-xxlarge-only,#buddypress div.rtmedia-activity-container .show-for-xxlarge-only{display:inherit !important}.rtmedia-container .show-for-small-only,.rtmedia-activity-container .show-for-small-only,#buddypress div.rtmedia-activity-container .show-for-small-only,.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-medium-only,.rtmedia-activity-container .show-for-medium-only,#buddypress div.rtmedia-activity-container .show-for-medium-only,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-only,.rtmedia-activity-container .show-for-large-only,#buddypress div.rtmedia-activity-container .show-for-large-only,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge,.rtmedia-container .show-for-xlarge-only,.rtmedia-activity-container .show-for-xlarge-only,#buddypress div.rtmedia-activity-container .show-for-xlarge-only,.rtmedia-container .hide-for-xxlarge-up,.rtmedia-activity-container .hide-for-xxlarge-up,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-up,.rtmedia-container .hide-for-xxlarge-only,.rtmedia-activity-container .hide-for-xxlarge-only,#buddypress div.rtmedia-activity-container .hide-for-xxlarge-only{display:none !important}.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small,.rtmedia-container table.hide-for-small-only,.rtmedia-activity-container table.hide-for-small-only,#buddypress div.rtmedia-activity-container table.hide-for-small-only,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down,.rtmedia-container table.hide-for-medium-only,.rtmedia-activity-container table.hide-for-medium-only,#buddypress div.rtmedia-activity-container table.hide-for-medium-only,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.show-for-xlarge-up,.rtmedia-activity-container table.show-for-xlarge-up,#buddypress div.rtmedia-activity-container table.show-for-xlarge-up,.rtmedia-container table.show-for-xxlarge-up,.rtmedia-activity-container table.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container table.show-for-xxlarge-up,.rtmedia-container table.show-for-xxlarge-only,.rtmedia-activity-container table.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container table.show-for-xxlarge-only{display:table}.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small,.rtmedia-container thead.hide-for-small-only,.rtmedia-activity-container thead.hide-for-small-only,#buddypress div.rtmedia-activity-container thead.hide-for-small-only,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down,.rtmedia-container thead.hide-for-medium-only,.rtmedia-activity-container thead.hide-for-medium-only,#buddypress div.rtmedia-activity-container thead.hide-for-medium-only,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.show-for-xlarge-up,.rtmedia-activity-container thead.show-for-xlarge-up,#buddypress div.rtmedia-activity-container thead.show-for-xlarge-up,.rtmedia-container thead.show-for-xxlarge-up,.rtmedia-activity-container thead.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container thead.show-for-xxlarge-up,.rtmedia-container thead.show-for-xxlarge-only,.rtmedia-activity-container thead.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container thead.show-for-xxlarge-only{display:table-header-group !important}.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small,.rtmedia-container tbody.hide-for-small-only,.rtmedia-activity-container tbody.hide-for-small-only,#buddypress div.rtmedia-activity-container tbody.hide-for-small-only,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down,.rtmedia-container tbody.hide-for-medium-only,.rtmedia-activity-container tbody.hide-for-medium-only,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-only,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.show-for-xlarge-up,.rtmedia-activity-container tbody.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge-up,.rtmedia-container tbody.show-for-xxlarge-up,.rtmedia-activity-container tbody.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container tbody.show-for-xxlarge-up,.rtmedia-container tbody.show-for-xxlarge-only,.rtmedia-activity-container tbody.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container tbody.show-for-xxlarge-only{display:table-row-group !important}.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small,.rtmedia-container tr.hide-for-small-only,.rtmedia-activity-container tr.hide-for-small-only,#buddypress div.rtmedia-activity-container tr.hide-for-small-only,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down,.rtmedia-container tr.hide-for-medium-only,.rtmedia-activity-container tr.hide-for-medium-only,#buddypress div.rtmedia-activity-container tr.hide-for-medium-only,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.show-for-xlarge-up,.rtmedia-activity-container tr.show-for-xlarge-up,#buddypress div.rtmedia-activity-container tr.show-for-xlarge-up,.rtmedia-container tr.show-for-xxlarge-up,.rtmedia-activity-container tr.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container tr.show-for-xxlarge-up,.rtmedia-container tr.show-for-xxlarge-only,.rtmedia-activity-container tr.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container tr.show-for-xxlarge-only{display:table-row !important}.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container td.hide-for-small-only,.rtmedia-activity-container td.hide-for-small-only,#buddypress div.rtmedia-activity-container td.hide-for-small-only,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container td.hide-for-medium-only,.rtmedia-activity-container td.hide-for-medium-only,#buddypress div.rtmedia-activity-container td.hide-for-medium-only,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.show-for-xlarge-up,.rtmedia-activity-container td.show-for-xlarge-up,#buddypress div.rtmedia-activity-container td.show-for-xlarge-up,.rtmedia-container td.show-for-xxlarge-up,.rtmedia-activity-container td.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container td.show-for-xxlarge-up,.rtmedia-container td.show-for-xxlarge-only,.rtmedia-activity-container td.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container td.show-for-xxlarge-only,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small,.rtmedia-container th.hide-for-small-only,.rtmedia-activity-container th.hide-for-small-only,#buddypress div.rtmedia-activity-container th.hide-for-small-only,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down,.rtmedia-container th.hide-for-medium-only,.rtmedia-activity-container th.hide-for-medium-only,#buddypress div.rtmedia-activity-container th.hide-for-medium-only,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.show-for-xlarge-up,.rtmedia-activity-container th.show-for-xlarge-up,#buddypress div.rtmedia-activity-container th.show-for-xlarge-up,.rtmedia-container th.show-for-xxlarge-up,.rtmedia-activity-container th.show-for-xxlarge-up,#buddypress div.rtmedia-activity-container th.show-for-xxlarge-up,.rtmedia-container th.show-for-xxlarge-only,.rtmedia-activity-container th.show-for-xxlarge-only,#buddypress div.rtmedia-activity-container th.show-for-xxlarge-only{display:table-cell !important}}.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape,.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait{display:table}.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape,.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait{display:table-header-group !important}.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape,.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait{display:table-row-group !important}.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape,.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait{display:table-row !important}.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait{display:table-cell !important}@media only screen and (orientation: landscape){.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.show-for-landscape,.rtmedia-activity-container table.show-for-landscape,#buddypress div.rtmedia-activity-container table.show-for-landscape,.rtmedia-container table.hide-for-portrait,.rtmedia-activity-container table.hide-for-portrait,#buddypress div.rtmedia-activity-container table.hide-for-portrait{display:table}.rtmedia-container thead.show-for-landscape,.rtmedia-activity-container thead.show-for-landscape,#buddypress div.rtmedia-activity-container thead.show-for-landscape,.rtmedia-container thead.hide-for-portrait,.rtmedia-activity-container thead.hide-for-portrait,#buddypress div.rtmedia-activity-container thead.hide-for-portrait{display:table-header-group !important}.rtmedia-container tbody.show-for-landscape,.rtmedia-activity-container tbody.show-for-landscape,#buddypress div.rtmedia-activity-container tbody.show-for-landscape,.rtmedia-container tbody.hide-for-portrait,.rtmedia-activity-container tbody.hide-for-portrait,#buddypress div.rtmedia-activity-container tbody.hide-for-portrait{display:table-row-group !important}.rtmedia-container tr.show-for-landscape,.rtmedia-activity-container tr.show-for-landscape,#buddypress div.rtmedia-activity-container tr.show-for-landscape,.rtmedia-container tr.hide-for-portrait,.rtmedia-activity-container tr.hide-for-portrait,#buddypress div.rtmedia-activity-container tr.hide-for-portrait{display:table-row !important}.rtmedia-container td.show-for-landscape,.rtmedia-activity-container td.show-for-landscape,#buddypress div.rtmedia-activity-container td.show-for-landscape,.rtmedia-container td.hide-for-portrait,.rtmedia-activity-container td.hide-for-portrait,#buddypress div.rtmedia-activity-container td.hide-for-portrait,.rtmedia-container th.show-for-landscape,.rtmedia-activity-container th.show-for-landscape,#buddypress div.rtmedia-activity-container th.show-for-landscape,.rtmedia-container th.hide-for-portrait,.rtmedia-activity-container th.hide-for-portrait,#buddypress div.rtmedia-activity-container th.hide-for-portrait{display:table-cell !important}}@media only screen and (orientation: portrait){.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait,.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape{display:inherit !important}.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait,.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape{display:none !important}.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait,.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape{display:table}.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait,.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape{display:table-header-group !important}.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait,.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape{display:table-row-group !important}.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait,.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape{display:table-row !important}.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape{display:table-cell !important}}.rtmedia-container .show-for-touch,.rtmedia-activity-container .show-for-touch,#buddypress div.rtmedia-activity-container .show-for-touch{display:none !important}.rtmedia-container .hide-for-touch,.rtmedia-activity-container .hide-for-touch,#buddypress div.rtmedia-activity-container .hide-for-touch{display:inherit !important}.rtmedia-container .touch .show-for-touch,.rtmedia-activity-container .touch .show-for-touch,#buddypress div.rtmedia-activity-container .touch .show-for-touch{display:inherit !important}.rtmedia-container .touch .hide-for-touch,.rtmedia-activity-container .touch .hide-for-touch,#buddypress div.rtmedia-activity-container .touch .hide-for-touch{display:none !important}.rtmedia-container table.hide-for-touch,.rtmedia-activity-container table.hide-for-touch,#buddypress div.rtmedia-activity-container table.hide-for-touch{display:table}.rtmedia-container .touch table.show-for-touch,.rtmedia-activity-container .touch table.show-for-touch,#buddypress div.rtmedia-activity-container .touch table.show-for-touch{display:table}.rtmedia-container thead.hide-for-touch,.rtmedia-activity-container thead.hide-for-touch,#buddypress div.rtmedia-activity-container thead.hide-for-touch{display:table-header-group !important}.rtmedia-container .touch thead.show-for-touch,.rtmedia-activity-container .touch thead.show-for-touch,#buddypress div.rtmedia-activity-container .touch thead.show-for-touch{display:table-header-group !important}.rtmedia-container tbody.hide-for-touch,.rtmedia-activity-container tbody.hide-for-touch,#buddypress div.rtmedia-activity-container tbody.hide-for-touch{display:table-row-group !important}.rtmedia-container .touch tbody.show-for-touch,.rtmedia-activity-container .touch tbody.show-for-touch,#buddypress div.rtmedia-activity-container .touch tbody.show-for-touch{display:table-row-group !important}.rtmedia-container tr.hide-for-touch,.rtmedia-activity-container tr.hide-for-touch,#buddypress div.rtmedia-activity-container tr.hide-for-touch{display:table-row !important}.rtmedia-container .touch tr.show-for-touch,.rtmedia-activity-container .touch tr.show-for-touch,#buddypress div.rtmedia-activity-container .touch tr.show-for-touch{display:table-row !important}.rtmedia-container td.hide-for-touch,.rtmedia-activity-container td.hide-for-touch,#buddypress div.rtmedia-activity-container td.hide-for-touch{display:table-cell !important}.rtmedia-container .touch td.show-for-touch,.rtmedia-activity-container .touch td.show-for-touch,#buddypress div.rtmedia-activity-container .touch td.show-for-touch{display:table-cell !important}.rtmedia-container th.hide-for-touch,.rtmedia-activity-container th.hide-for-touch,#buddypress div.rtmedia-activity-container th.hide-for-touch{display:table-cell !important}.rtmedia-container .touch th.show-for-touch,.rtmedia-activity-container .touch th.show-for-touch,#buddypress div.rtmedia-activity-container .touch th.show-for-touch{display:table-cell !important}.rtmedia-container .flex-video,.rtmedia-activity-container .flex-video,#buddypress div.rtmedia-activity-container .flex-video{position:relative;padding-top:1.5625rem;padding-bottom:67.5%;height:0;margin-bottom:1rem;overflow:hidden}.rtmedia-container .flex-video.widescreen,.rtmedia-activity-container .flex-video.widescreen,#buddypress div.rtmedia-activity-container .flex-video.widescreen{padding-bottom:57.25%}.rtmedia-container .flex-video.vimeo,.rtmedia-activity-container .flex-video.vimeo,#buddypress div.rtmedia-activity-container .flex-video.vimeo{padding-top:0}.rtmedia-container .flex-video iframe,.rtmedia-activity-container .flex-video iframe,#buddypress div.rtmedia-activity-container .flex-video iframe,.rtmedia-container .flex-video object,.rtmedia-activity-container .flex-video object,#buddypress div.rtmedia-activity-container .flex-video object,.rtmedia-container .flex-video embed,.rtmedia-activity-container .flex-video embed,#buddypress div.rtmedia-activity-container .flex-video embed,.rtmedia-container .flex-video video,.rtmedia-activity-container .flex-video video,#buddypress div.rtmedia-activity-container .flex-video video{position:absolute;top:0;left:0;width:100%;height:100%}.rtmedia-container .tabs,.rtmedia-activity-container .tabs,#buddypress div.rtmedia-activity-container .tabs{*zoom:1;margin-bottom:0 !important}.rtmedia-container .tabs:before,.rtmedia-activity-container .tabs:before,#buddypress div.rtmedia-activity-container .tabs:before,.rtmedia-container .tabs:after,.rtmedia-activity-container .tabs:after,#buddypress div.rtmedia-activity-container .tabs:after{content:" ";display:table}.rtmedia-container .tabs:after,.rtmedia-activity-container .tabs:after,#buddypress div.rtmedia-activity-container .tabs:after{clear:both}.rtmedia-container .tabs dd,.rtmedia-activity-container .tabs dd,#buddypress div.rtmedia-activity-container .tabs dd{position:relative;margin-bottom:0 !important;top:1px;float:left}.rtmedia-container .tabs dd>a,.rtmedia-activity-container .tabs dd>a,#buddypress div.rtmedia-activity-container .tabs dd>a{display:block;background:#efefef;color:#222;padding-top:1rem;padding-right:2rem;padding-bottom:1.0625rem;padding-left:2rem;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-size:1rem}.rtmedia-container .tabs dd>a:hover,.rtmedia-activity-container .tabs dd>a:hover,#buddypress div.rtmedia-activity-container .tabs dd>a:hover{background:#e2e2e2}.rtmedia-container .tabs dd.active a,.rtmedia-activity-container .tabs dd.active a,#buddypress div.rtmedia-activity-container .tabs dd.active a{background:#fff}.rtmedia-container .tabs.radius dd:first-child a,.rtmedia-activity-container .tabs.radius dd:first-child a,#buddypress div.rtmedia-activity-container .tabs.radius dd:first-child a{-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.rtmedia-container .tabs.radius dd:last-child a,.rtmedia-activity-container .tabs.radius dd:last-child a,#buddypress div.rtmedia-activity-container .tabs.radius dd:last-child a{-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.rtmedia-container .tabs.vertical dd,.rtmedia-activity-container .tabs.vertical dd,#buddypress div.rtmedia-activity-container .tabs.vertical dd{position:inherit;float:none;display:block;top:auto}.rtmedia-container .tabs-content,.rtmedia-activity-container .tabs-content,#buddypress div.rtmedia-activity-container .tabs-content{*zoom:1;margin-bottom:1.5rem}.rtmedia-container .tabs-content:before,.rtmedia-activity-container .tabs-content:before,#buddypress div.rtmedia-activity-container .tabs-content:before,.rtmedia-container .tabs-content:after,.rtmedia-activity-container .tabs-content:after,#buddypress div.rtmedia-activity-container .tabs-content:after{content:" ";display:table}.rtmedia-container .tabs-content:after,.rtmedia-activity-container .tabs-content:after,#buddypress div.rtmedia-activity-container .tabs-content:after{clear:both}.rtmedia-container .tabs-content>.content,.rtmedia-activity-container .tabs-content>.content,#buddypress div.rtmedia-activity-container .tabs-content>.content{display:none;float:left;padding:0.9375rem 0}.rtmedia-container .tabs-content>.content.active,.rtmedia-activity-container .tabs-content>.content.active,#buddypress div.rtmedia-activity-container .tabs-content>.content.active{display:block}.rtmedia-container .tabs-content>.content.contained,.rtmedia-activity-container .tabs-content>.content.contained,#buddypress div.rtmedia-activity-container .tabs-content>.content.contained{padding:0.9375rem}.rtmedia-container .tabs-content.vertical,.rtmedia-activity-container .tabs-content.vertical,#buddypress div.rtmedia-activity-container .tabs-content.vertical{display:block}.rtmedia-container .tabs-content.vertical>.content,.rtmedia-activity-container .tabs-content.vertical>.content,#buddypress div.rtmedia-activity-container .tabs-content.vertical>.content{padding:0 0.9375rem}@media only screen and (min-width: 40.063em){.rtmedia-container .tabs.vertical,.rtmedia-activity-container .tabs.vertical,#buddypress div.rtmedia-activity-container .tabs.vertical{width:20%;float:left;margin-bottom:1.25rem}.rtmedia-container .tabs-content.vertical,.rtmedia-activity-container .tabs-content.vertical,#buddypress div.rtmedia-activity-container .tabs-content.vertical{width:80%;float:left;margin-left:-1px}}.rtmedia-container .rtmedia-editor-main dl.tabs dd>a,.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a,#buddypress div.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a{font-size:14px;text-decoration:none;padding:5px 15px;background:#f1f1f1}.rtmedia-container .rtmedia-editor-main dl.tabs dd>a:hover,.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a:hover,#buddypress div.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd>a:hover{background:#dcdcdc}.rtmedia-container .rtmedia-editor-main dl.tabs dd.active>a,.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd.active>a,#buddypress div.rtmedia-activity-container .rtmedia-editor-main dl.tabs dd.active>a{background:#50A1D7;color:#fff}.rtmedia-container .rtmedia-editor-main .tabs-content,.rtmedia-activity-container .rtmedia-editor-main .tabs-content,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .tabs-content{margin-bottom:5px}.rtmedia-container .rtmedia-editor-main .tabs-content .content,.rtmedia-activity-container .rtmedia-editor-main .tabs-content .content,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .tabs-content .content{float:none;padding:10px}.rtmedia-container .rtmedia-editor-main .rtmedia-title-editor,.rtmedia-activity-container .rtmedia-editor-main .rtmedia-title-editor,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .rtmedia-title-editor{display:block;width:100%}.rtmedia-container .rtmedia-editor-main .rtmedia-edit-change-album,.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-change-album,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-change-album{margin-top:15px}.rtmedia-container .rtmedia-editor-main .rtmedia-edit-title label,.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-title label,#buddypress div.rtmedia-activity-container .rtmedia-editor-main .rtmedia-edit-title label{display:block}.rtmedia-container .primary,.rtmedia-activity-container .primary,#buddypress div.rtmedia-activity-container .primary{color:#3475BA}.rtmedia-container .secondary,.rtmedia-activity-container .secondary,#buddypress div.rtmedia-activity-container .secondary{color:#82909D}.rtmedia-container #buddypress li,.rtmedia-activity-container #buddypress li{list-style:none}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{max-width:95%}.rtmedia-container .rtmedia-item-title,.rtmedia-activity-container .rtmedia-item-title,#buddypress div.rtmedia-activity-container .rtmedia-item-title{text-align:center}.rtmedia-container .rtmedia-item-title h4,.rtmedia-activity-container .rtmedia-item-title h4,#buddypress div.rtmedia-activity-container .rtmedia-item-title h4{text-overflow:ellipsis;white-space:nowrap;width:100%;overflow:hidden;font-size:1.1em;text-align:center}.rtmedia-container .rtmedia-success,.rtmedia-activity-container .rtmedia-success,#buddypress div.rtmedia-activity-container .rtmedia-success{display:block;padding:5px;margin-top:15px;border:1px solid #457A1A;background-color:#5DA423;font-weight:bold}.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2{font-size:1.4em;font-weight:bold;line-height:2.4em}.rtmedia-container .drag-drop,.rtmedia-activity-container .drag-drop,#buddypress div.rtmedia-activity-container .drag-drop{border:4px dashed #DDD;text-align:center;background:#fafafa;overflow:hidden;color:#AAAAAA;padding:25px 0}.rtmedia-container .drag-drop.dragover,.rtmedia-activity-container .drag-drop.dragover,#buddypress div.rtmedia-activity-container .drag-drop.dragover{border-color:#83b4d8}.rtmedia-container .drag-drop .drag-drop-info,.rtmedia-activity-container .drag-drop .drag-drop-info,#buddypress div.rtmedia-activity-container .drag-drop .drag-drop-info{font-size:20px;line-height:24px}.rtmedia-container .drag-drop .rtm-album-privacy span,.rtmedia-activity-container .drag-drop .rtm-album-privacy span,#buddypress div.rtmedia-activity-container .drag-drop .rtm-album-privacy span{margin:0 20px 20px 20px;display:inline-block}.rtmedia-container .drag-drop .rtm-select-files span,.rtmedia-activity-container .drag-drop .rtm-select-files span,#buddypress div.rtmedia-activity-container .drag-drop .rtm-select-files span{vertical-align:middle}.rtmedia-container .drag-drop .rtm-seperator,.rtmedia-activity-container .drag-drop .rtm-seperator,#buddypress div.rtmedia-activity-container .drag-drop .rtm-seperator{margin:0px 20px}.rtmedia-container .drag-drop .start-media-upload,.rtmedia-activity-container .drag-drop .start-media-upload,#buddypress div.rtmedia-activity-container .drag-drop .start-media-upload{display:none;margin-top:20px}.rtmedia-container .drag-drop .rtm-file-size-limit,.rtmedia-activity-container .drag-drop .rtm-file-size-limit,#buddypress div.rtmedia-activity-container .drag-drop .rtm-file-size-limit{vertical-align:middle;font-size:16px;line-height:24px}.rtmedia-container .rtm-uploader-main-wrapper .rtm-uploader-tabs,.rtmedia-activity-container .rtm-uploader-main-wrapper .rtm-uploader-tabs,#buddypress div.rtmedia-activity-container .rtm-uploader-main-wrapper .rtm-uploader-tabs{margin-bottom:10px;text-align:left}.rtmedia-container .rtm-uploader-main-wrapper ul,.rtmedia-activity-container .rtm-uploader-main-wrapper ul,#buddypress div.rtmedia-activity-container .rtm-uploader-main-wrapper ul{border-bottom:1px solid #CCC}.rtmedia-container .rtm-uploader-main-wrapper li,.rtmedia-activity-container .rtm-uploader-main-wrapper li,#buddypress div.rtmedia-activity-container .rtm-uploader-main-wrapper li{margin:0 0 -1px 10px;display:inline-block;padding:5px 10px;line-height:25px;background-color:#e4e4e4;border:1px solid #CCC}.rtmedia-container .rtm-uploader-main-wrapper li.active,.rtmedia-activity-container .rtm-uploader-main-wrapper li.active,#buddypress div.rtmedia-activity-container .rtm-uploader-main-wrapper li.active{background:transparent;border-left:1px solid #CCC;border-top:1px solid #CCC;border-right:1px solid #CCC;border-bottom:1px solid #fafafa}.rtmedia-container .rtm-uploader-main-wrapper li:hover,.rtmedia-activity-container .rtm-uploader-main-wrapper li:hover,#buddypress div.rtmedia-activity-container .rtm-uploader-main-wrapper li:hover{cursor:pointer}.rtmedia-container .rtmedia-action-update,.rtmedia-activity-container .rtmedia-action-update,#buddypress div.rtmedia-activity-container .rtmedia-action-update{float:left;margin-top:12px;margin-right:10px}.rtmedia-container .rtmedia-list,.rtmedia-activity-container .rtmedia-list,#buddypress div.rtmedia-activity-container .rtmedia-list{list-style:none}.rtmedia-container .rtmedia-list .rtmedia-list-item,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item{word-wrap:break-word;margin:10px;float:left;list-style:none;position:relative}.rtmedia-container .rtmedia-list .rtmedia-list-item a,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a{text-decoration:none}.rtmedia-container .rtmedia-list .rtmedia-list-item a h4,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4{line-height:1.4em;font-size:1.2em;padding-top:10px}.rtmedia-container .rtmedia-list .rtmedia-list-item .rtmedia-item-selector,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item .rtmedia-item-selector,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item .rtmedia-item-selector{position:absolute}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-music,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music,.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-video,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video{width:100%}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time-rail,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time-rail,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time-rail,.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time-rail,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time-rail,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time-rail{margin:8px 4px 0px 4px;height:0px}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-music .mejs-controls .mejs-time,.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-video .mejs-controls .mejs-time{height:24px}.rtmedia-container .rtmedia-list .rtmedia-list-item.media-type-photo,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-photo,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item.media-type-photo{width:100%}.rtmedia-container .rtmedia-media img,.rtmedia-activity-container .rtmedia-media img,#buddypress div.rtmedia-activity-container .rtmedia-media img{max-width:100%}.rtmedia-container .rtmedia-item-thumbnail,.rtmedia-activity-container .rtmedia-item-thumbnail,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail{text-align:center}.rtmedia-container .rtmedia-item-thumbnail .rtmedia_time,.rtmedia-activity-container .rtmedia-item-thumbnail .rtmedia_time,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail .rtmedia_time{position:absolute;top:2px;right:2px;padding:0 4px;font-weight:bold;font-size:11px;background-color:#000;color:#fff;line-height:14px;opacity:.75;display:inline-block}.rtmedia-container .rtmedia-item-thumbnail img,.rtmedia-activity-container .rtmedia-item-thumbnail img,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail img{vertical-align:middle}.rtmedia-container .rtmedia_next_prev,.rtmedia-activity-container .rtmedia_next_prev,#buddypress div.rtmedia-activity-container .rtmedia_next_prev{clear:both}.rtmedia-container .rtmedia_next_prev a,.rtmedia-activity-container .rtmedia_next_prev a,#buddypress div.rtmedia-activity-container .rtmedia_next_prev a{display:block;clear:both;background-color:#E9E9E9;padding:10px;text-align:center;text-decoration:none;color:#000;margin:15px}.rtmedia-container .rtmedia_next_prev .pagination,.rtmedia-activity-container .rtmedia_next_prev .pagination,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination{clear:both;padding:0;position:relative;font-size:11px;line-height:13px}.rtmedia-container .rtmedia_next_prev .pagination span,.rtmedia-activity-container .rtmedia_next_prev .pagination span,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination span,.rtmedia-container .rtmedia_next_prev .pagination a,.rtmedia-activity-container .rtmedia_next_prev .pagination a,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination a{display:inline;float:left;margin:2px 2px 2px 0;padding:6px 9px 5px 9px;text-decoration:none;width:auto;color:#fff;background:#555;float:none;font-size:13px;line-height:30px}.rtmedia-container .rtmedia_next_prev .pagination span:hover,.rtmedia-activity-container .rtmedia_next_prev .pagination span:hover,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination span:hover,.rtmedia-container .rtmedia_next_prev .pagination a:hover,.rtmedia-activity-container .rtmedia_next_prev .pagination a:hover,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination a:hover{color:#fff;background:#bc360a}.rtmedia-container .rtmedia_next_prev .pagination .current,.rtmedia-activity-container .rtmedia_next_prev .pagination .current,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination .current{padding:6px 9px 5px 9px;background:#bc360a;color:#fff}.rtmedia-container .rtmedia_next_prev .pagination .rtmedia-page-no,.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no{display:inline;float:left;font-size:13px;color:#888}.rtmedia-container .rtmedia_next_prev .pagination .rtmedia-page-no input,.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no input,#buddypress div.rtmedia-activity-container .rtmedia_next_prev .pagination .rtmedia-page-no input{padding:3px;max-width:50px}.rtmedia-container .rtmedia-item-comments-container,.rtmedia-activity-container .rtmedia-item-comments-container,#buddypress div.rtmedia-activity-container .rtmedia-item-comments-container{margin:3% 3%}.rtmedia-container #rtmedia_comment_ul,.rtmedia-activity-container #rtmedia_comment_ul,#buddypress div.rtmedia-activity-container #rtmedia_comment_ul{margin-left:0;margin-bottom:10px}.rtmedia-container .rtmedia-bp-header,.rtmedia-activity-container .rtmedia-bp-header,#buddypress div.rtmedia-activity-container .rtmedia-bp-header{width:460px;margin:auto}.rtmedia-container #div-attache-rtmedia,.rtmedia-activity-container #div-attache-rtmedia,#buddypress div.rtmedia-activity-container #div-attache-rtmedia{display:none}.rtmedia-container #rtMedia-update-queue-list p span,.rtmedia-activity-container #rtMedia-update-queue-list p span{margin-right:20px}.rtmedia-container .rtmedia-move-container,.rtmedia-activity-container .rtmedia-move-container,#buddypress div.rtmedia-activity-container .rtmedia-move-container{display:none;padding:10px;border:1px dashed #999}.rtmedia-container #rtmedia-add-media-button-post-update,.rtmedia-activity-container #rtmedia-add-media-button-post-update,#buddypress div.rtmedia-activity-container #rtmedia-add-media-button-post-update{float:left;margin-top:10px;margin-right:20px}.rtmedia-container #whats-new-post-in-box,.rtmedia-activity-container #whats-new-post-in-box,#buddypress div.rtmedia-activity-container #whats-new-post-in-box{float:left}.rtmedia-container .rtmedia-activity-text,.rtmedia-activity-container .rtmedia-activity-text,#buddypress div.rtmedia-activity-container .rtmedia-activity-text{display:block;padding-bottom:10px}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:auto}.rtmedia-container.rtmedia-single-container .row,.rtmedia-single-container.rtmedia-activity-container .row,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row{background-color:#FFF}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container{padding-top:10px;padding-bottom:10px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media div.mejs-layers div.mejs-poster,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media div.mejs-layers div.mejs-poster{overflow:hidden}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-overlay-button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-overlay-button{margin:-50px 0 0 -50px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-poster,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-poster{overflow:hidden}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media-title,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media-title{margin:0 0 5px 0;display:block;font-weight:bold;letter-spacing:1px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta{padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.userprofile,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.userprofile,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.userprofile{float:left;padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username{padding:0 10px;line-height:16px;font-weight:bold}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a{text-decoration:none}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username a:hover,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a:hover,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username a:hover{text-decoration:underline}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtm-time-privacy,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy{font-size:12px;line-height:24px;margin-bottom:7px;color:#808080}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtm-time-privacy i,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy i,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtm-time-privacy i{margin-left:4px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtmedia-actions-before-description,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description{margin-top:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.rtmedia-actions-before-description>div,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description>div,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.rtmedia-actions-before-description>div{float:left;line-height:20px;display:inline-block}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta button,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button{color:#5E5E5E;background-color:#EBEBEB;background-repeat:repeat-x;background-image:-moz-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-ms-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-webkit-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-o-linear-gradient(top, #f9f9f9, #ebebeb);background-image:linear-gradient(top, #f9f9f9,#ebebeb)}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a{float:left;margin:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li{display:inline-block;float:left;margin-right:5px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li .rtmedia-like,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li .rtmedia-like,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>ul>li .rtmedia-like{display:none}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a{display:inline-block;float:left}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>form,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form{float:left;margin-right:5px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span.like-count,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span.like-count,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span.like-count{background:#EEE;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;-o-border-radius:50%;border-radius:50%;border:1px solid #CCC;color:#999;display:inline;font-size:70%;margin-left:2px;margin-right:2px;padding:3px 6px;text-align:center;vertical-align:middle}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-media-description,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-media-description,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-media-description{line-height:22px;margin:10px 0}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments{background-color:transparent}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments div,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div{background-color:transparent}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtm-like-comments-info,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info{width:100%}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtm-like-comments-info:before,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtm-like-comments-info:before{top:13px;left:20px}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtmedia-like-info,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info{background-color:#EDEFF4;font-size:12px;line-height:16px;padding:3px 5px;position:relative;margin-bottom:2px}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments .rtmedia-like-info i,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info i,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments .rtmedia-like-info i{margin-right:4px}.rtmedia-container #wp-description-editor-tools a.wp-switch-editor,.rtmedia-activity-container #wp-description-editor-tools a.wp-switch-editor{margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border:1px solid;border-color:#DFDFDF #DFDFDF #CCC;font:13px/18px Arial, Helvetica, sans-serif normal;height:auto}.rtmedia-container #description_toolbargroup .mceToolbar td,.rtmedia-activity-container #description_toolbargroup .mceToolbar td{padding:0px}.rtmedia-container #wp-description-editor-container,.rtmedia-activity-container #wp-description-editor-container,#buddypress div.rtmedia-activity-container #wp-description-editor-container{border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#CCC #CCC #DFDFDF}.rtmedia-container .rtmedia-change-cover-arts p,.rtmedia-activity-container .rtmedia-change-cover-arts p,#buddypress div.rtmedia-activity-container .rtmedia-change-cover-arts p{padding:5px 0}.rtmedia-container .rtm-media-loading,.rtmedia-activity-container .rtm-media-loading,#buddypress div.rtmedia-activity-container .rtm-media-loading{text-align:center;padding:20px 0}.rt-clear:after{display:block;height:0;line-height:0;clear:both;content:'.';visibility:hidden}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments{color:#6D84B4;line-height:18px;margin-bottom:5px}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span{display:inline-block;margin-right:5px}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons{padding:0;color:#21759B;font-size:12px;line-height:14px;text-decoration:none}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a:hover,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button:hover,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons:hover{text-decoration:underline}#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span a.rtmedia-like i,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-like i,#buddypress .rtmedia-single-container .rtmedia-single-meta div.rtmedia-actions-before-comments>span button.rtmedia-action-buttons.rtmedia-like i{display:none}#buddypress button.rtm-alert-btn{background-color:#f04124;border-color:#cf280e;color:white}#buddypress div.rtmedia-activity-container ul.rtmedia-list li{float:left;padding:10px}#buddypress div.rtmedia-activity-container ul.rtmedia-list li .rtmedia-item-thumbnail{overflow:hidden;margin:0 auto}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video{float:none}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail{margin:0 auto;overflow:hidden}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-overlay-button{margin:-50px 0 0 -50px}#buddypress .mejs-controls button,.rtmedia-container .mejs-controls button,.rtmedia-activity-container .mejs-controls button,#buddypress div.rtmedia-activity-container .mejs-controls button{padding:4px 8px;border:none;background:rgba(0,0,0,0) url("../../../lib/media-element/controls.png") no-repeat}#buddypress .mejs-controls .mejs-play button,.rtmedia-container .mejs-controls .mejs-play button,.rtmedia-activity-container .mejs-controls .mejs-play button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-play button{background-position:0 0}#buddypress .mejs-controls .mejs-pause button,.rtmedia-container .mejs-controls .mejs-pause button,.rtmedia-activity-container .mejs-controls .mejs-pause button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-pause button{background-position:0 -16px}#buddypress .mejs-controls .mejs-unmute button,.rtmedia-container .mejs-controls .mejs-unmute button,.rtmedia-activity-container .mejs-controls .mejs-unmute button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-unmute button{background-position:-16px 0}#buddypress .mejs-controls .mejs-mute button,.rtmedia-container .mejs-controls .mejs-mute button,.rtmedia-activity-container .mejs-controls .mejs-mute button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-mute button{background-position:-16px -16px}#buddypress .mejs-controls .mejs-fullscreen-button button,.rtmedia-container .mejs-controls .mejs-fullscreen-button button,.rtmedia-activity-container .mejs-controls .mejs-fullscreen-button button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}#buddypress .mejs-controls .mejs-unfullscreen button,.rtmedia-container .mejs-controls .mejs-unfullscreen button,.rtmedia-activity-container .mejs-controls .mejs-unfullscreen button,#buddypress div.rtmedia-activity-container .mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mfp-content #rtmedia-single-media-container .rtmedia-media{text-align:center;background-color:#333;overflow:hidden}.mfp-content #rtmedia-single-media-container .rtmedia-media img{max-height:95%}#rtmedia-action-update{float:left;padding-right:10px}.mfp-ready,.mfp-bg{z-index:9999}div.mfp-bg{background-color:#222222;opacity:0.7}.bp_media_content video{background-color:black}.rtmedia-success{display:block;padding:5px 10px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;background-color:#2ECC71;color:white}.rtmedia-error{color:white;display:block;padding:10px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;background-color:#E74C3C}.rtmp-uploaded-file{width:100%}.close{cursor:pointer;color:red}button.mfp-arrow,button.mfp-arrow:active{margin-top:-30px}button.rtp-lb-close{top:0;right:0}#object-nav li,#group-admins li,.item-list-tabs li{list-style:none}.mejs-video .mejs-controls{position:absolute}.mfp-content #rtmedia-single-media-container .wp-audio-shortcode{height:0px !important}.rtmedia-media-edit .rtmedia-single-edit-title-container,#buddypress .rtmedia-media-edit .rtmedia-single-edit-title-container{margin-bottom:20px}.rtmedia-media-edit .rtmedia-single-edit-title-container .rtmedia-title,#buddypress .rtmedia-media-edit .rtmedia-single-edit-title-container .rtmedia-title{margin:0}.rtmedia-media-edit .rtmedia-edit-title,#buddypress .rtmedia-media-edit .rtmedia-edit-title{margin-bottom:15px}.rtmedia-media-edit .rtmedia-edit-privacy,#buddypress .rtmedia-media-edit .rtmedia-edit-privacy{margin-bottom:10px}.rtmedia-media-edit .rtmedia-editor-description>label,#buddypress .rtmedia-media-edit .rtmedia-editor-description>label{display:block;line-height:24px}.rtmedia-media-edit .rtmedia-editor-description .rtmedia-desc-textarea,#buddypress .rtmedia-media-edit .rtmedia-editor-description .rtmedia-desc-textarea{width:100%;display:inline-block;padding:5px}.rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-menu,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-menu{margin-bottom:15px}.rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-crop-wrap,.rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-group>p,.rtmedia-media-edit .rtmedia-image-editor-cotnainer .wp_attachment_image .thumbnail,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-crop-wrap,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .imgedit-group>p,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .wp_attachment_image .thumbnail{margin-bottom:10px}.rtmedia-media-edit .rtmedia-image-editor-cotnainer .hidden,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer .hidden{display:none}.rtmedia-media-edit .rtmedia-image-editor-cotnainer hr,#buddypress .rtmedia-media-edit .rtmedia-image-editor-cotnainer hr{margin:15px 0 25px 0}.rtmedia-media-edit #rtmedia-image-editor-cotnainer .imgedit-wrap td,#buddypress .rtmedia-media-edit #rtmedia-image-editor-cotnainer .imgedit-wrap td{vertical-align:top}.rtmedia-container #rtm-media-options,.rtmedia-activity-container #rtm-media-options,#buddypress div.rtmedia-activity-container #rtm-media-options,.rtmedia-container,.rtmedia-activity-container,#buddypress div.rtmedia-activity-container{line-height:30px}.rtmedia-container #rtm-media-options [class^="icon-"],.rtmedia-activity-container #rtm-media-options [class^="icon-"],.rtmedia-container #rtm-media-options [class*=" icon-"],.rtmedia-activity-container #rtm-media-options [class*=" icon-"],.rtmedia-container [class^="icon-"],.rtmedia-activity-container [class^="icon-"],#buddypress div.rtmedia-activity-container [class^="icon-"],.rtmedia-container [class*=" icon-"],.rtmedia-activity-container [class*=" icon-"],#buddypress div.rtmedia-activity-container [class*=" icon-"]{font-family:FontAwesome;font-style:normal;font-weight:normal;text-decoration:inherit;cursor:pointer;padding:0;border:none}.rtmedia-container #rtm-media-options [class^="icon-"].icon-2x,.rtmedia-activity-container #rtm-media-options [class^="icon-"].icon-2x,.rtmedia-container #rtm-media-options [class*=" icon-"].icon-2x,.rtmedia-activity-container #rtm-media-options [class*=" icon-"].icon-2x,.rtmedia-container [class^="icon-"].icon-2x,.rtmedia-activity-container [class^="icon-"].icon-2x,#buddypress div.rtmedia-activity-container [class^="icon-"].icon-2x,.rtmedia-container [class*=" icon-"].icon-2x,.rtmedia-activity-container [class*=" icon-"].icon-2x,#buddypress div.rtmedia-activity-container [class*=" icon-"].icon-2x{font-size:1.6em}.rtmedia-container #rtm-media-options [class^="icon-"].icon-3x,.rtmedia-activity-container #rtm-media-options [class^="icon-"].icon-3x,.rtmedia-container #rtm-media-options [class*=" icon-"].icon-3x,.rtmedia-activity-container #rtm-media-options [class*=" icon-"].icon-3x,.rtmedia-container [class^="icon-"].icon-3x,.rtmedia-activity-container [class^="icon-"].icon-3x,#buddypress div.rtmedia-activity-container [class^="icon-"].icon-3x,.rtmedia-container [class*=" icon-"].icon-3x,.rtmedia-activity-container [class*=" icon-"].icon-3x,#buddypress div.rtmedia-activity-container [class*=" icon-"].icon-3x{font-size:3em}.rtmedia-container #rtm-media-options [class^="icon-"]:visited,.rtmedia-activity-container #rtm-media-options [class^="icon-"]:visited,.rtmedia-container #rtm-media-options [class*=" icon-"]:visited,.rtmedia-activity-container #rtm-media-options [class*=" icon-"]:visited,.rtmedia-container [class^="icon-"]:visited,.rtmedia-activity-container [class^="icon-"]:visited,#buddypress div.rtmedia-activity-container [class^="icon-"]:visited,.rtmedia-container [class*=" icon-"]:visited,.rtmedia-activity-container [class*=" icon-"]:visited,#buddypress div.rtmedia-activity-container [class*=" icon-"]:visited{color:#444444}.rtmedia-container #rtm-media-options [class^="icon-"]:hover,.rtmedia-activity-container #rtm-media-options [class^="icon-"]:hover,.rtmedia-container #rtm-media-options [class*=" icon-"]:hover,.rtmedia-activity-container #rtm-media-options [class*=" icon-"]:hover,.rtmedia-container [class^="icon-"]:hover,.rtmedia-activity-container [class^="icon-"]:hover,#buddypress div.rtmedia-activity-container [class^="icon-"]:hover,.rtmedia-container [class*=" icon-"]:hover,.rtmedia-activity-container [class*=" icon-"]:hover,#buddypress div.rtmedia-activity-container [class*=" icon-"]:hover{background:none}.rtmedia-container #rtm-media-options .icon-remove,.rtmedia-activity-container #rtm-media-options .icon-remove,.rtmedia-container .icon-remove,.rtmedia-activity-container .icon-remove,#buddypress div.rtmedia-activity-container .icon-remove{color:red}#rtm-media-options{text-align:right}#rtm-media-options [class^="icon-"],#rtm-media-options [class*=" icon-"]{margin-left:10px;color:#444444}#rtm-media-options .rtmedia-upload-media-link,#rtm-media-options i,#rtm-media-options a,#rtm-media-options button,#rtm-media-options span{font-size:16px;cursor:pointer;color:#444444;text-decoration:none}#rtm-media-options .primary,#rtm-media-options .primary i{color:#3475BA}#rtm-media-options .rtmedia-delete-album{margin-left:0}.rtmedia-inline{display:inline}.rtmedia-container .rtMedia-queue-list,.rtmedia-activity-container .rtMedia-queue-list,#buddypress div.rtmedia-activity-container .rtMedia-queue-list{margin-bottom:10px;line-height:20px;width:100%}.rtmedia-container .rtMedia-queue-list tr td,.rtmedia-activity-container .rtMedia-queue-list tr td,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr td,.rtmedia-container .rtMedia-queue-list tr th,.rtmedia-activity-container .rtMedia-queue-list tr th,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr th{padding:3px 8px}.rtmedia-container .rtMedia-queue-list tr,.rtmedia-activity-container .rtMedia-queue-list tr,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr{color:#333}.rtmedia-container .rtMedia-queue-list tr>td.close,.rtmedia-activity-container .rtMedia-queue-list tr>td.close,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr>td.close{text-align:right}.rtmedia-container .rtMedia-queue-list tr>td.plupload_file_size,.rtmedia-activity-container .rtMedia-queue-list tr>td.plupload_file_size,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr>td.plupload_file_size{text-transform:uppercase}.rtmedia-container .rtMedia-queue-list tr.upload-waiting,.rtmedia-activity-container .rtMedia-queue-list tr.upload-waiting,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-waiting{background-color:#FFFFCC;border-bottom:1px solid #ffeca0}.rtmedia-container .rtMedia-queue-list tr.upload-error,.rtmedia-activity-container .rtMedia-queue-list tr.upload-error,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-error{background-color:#ffe5e5;border-bottom:1px solid #ffcccc}.rtmedia-container .rtMedia-queue-list tr.upload-success,.rtmedia-activity-container .rtMedia-queue-list tr.upload-success,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-success,.rtmedia-container .rtMedia-queue-list tr.upload-progress,.rtmedia-activity-container .rtMedia-queue-list tr.upload-progress,#buddypress div.rtmedia-activity-container .rtMedia-queue-list tr.upload-progress{background-color:#C2FAC1;border-bottom:1px solid #8EE888}.rtmedia-container .rtMedia-queue-list .plupload_media_edit a,.rtmedia-activity-container .rtMedia-queue-list .plupload_media_edit a,#buddypress div.rtmedia-activity-container .rtMedia-queue-list .plupload_media_edit a{text-decoration:none;color:#181818}#rtm-drop-files-title{font-size:24px;text-align:center;margin:-80px 0 40px 0;z-index:0;display:none}.rtm-drag-drop-active{border:4px dashed green !important;opacity:0.5;height:100%;display:block;z-index:9999}.drag-drop p{margin:10px 0}#drag-drop-title{position:absolute;margin-top:-30px;z-index:0}#rtm-upload-start-notice{display:none}#rtm-upload-start-notice>span{color:red;font-size:14px;line-height:20px}#rtm-media-gallery-uploader{display:none;margin-bottom:20px}#rtm-gallery-title-container{margin:0 0 15px 0}#rtm-gallery-title-container .rtm-gallery-title{display:inline-block;margin:0;overflow:hidden;vertical-align:bottom;padding-left:0;padding-right:0}#rtm-gallery-title-container #rtm-media-options{padding:5px 0;display:inline-block}#rtm-gallery-title-container #rtm-media-options .click-nav{float:none}#rtm-gallery-title-container #rtm-media-options .click-nav .clicker,#rtm-gallery-title-container #rtm-media-options .click-nav .clicker>i{font-size:16px}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li a,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li span,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li button,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li input{border:none;padding:2px 5px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;background:none;color:#fff;display:block;width:100%;text-align:left;font-size:13px;line-height:24px}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li a:hover,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li span:hover,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li button:hover,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li input:hover{background-color:#fff;color:#37454D}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li a:hover i,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li span:hover i,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li button:hover i,#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li input:hover i{color:#37454D}#rtm-gallery-title-container #rtm-media-options .click-nav .rtm-options li i{font-size:13px;color:#fff}.rtmedia-container ul#rtmedia_comment_ul li,.rtmedia-activity-container ul#rtmedia_comment_ul li{list-style:none;background:#EDEFF4;margin:0 0 2px 0;padding:5px;width:100%;position:relative;word-wrap:break;line-height:20px}.rtmedia-container ul#rtmedia_comment_ul li.rtmedia-no-comments,.rtmedia-activity-container ul#rtmedia_comment_ul li.rtmedia-no-comments{padding:5px;font-size:12px}.rtmedia-container ul#rtmedia_comment_ul li:hover .rtmedia-delete-comment,.rtmedia-activity-container ul#rtmedia_comment_ul li:hover .rtmedia-delete-comment{display:block}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-details,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-details{overflow:hidden;margin:0;padding:0}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic{float:left;margin:0 10px 0 0;padding:2px 0 0 2px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic img,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-user-pic img{height:35px !important;width:35px !important;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-author,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-author{line-height:18px;font-size:13px;margin-right:5px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-author a,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-author a{color:#3B5998;font-weight:bold;text-decoration:none;line-height:18px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-author a:hover,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-author a:hover{text-decoration:underline}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-content,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-content{line-height:16px;font-size:13px;padding-right:5px}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-comment-date,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-comment-date{display:block;font-size:11px;color:#808080}.rtmedia-container ul#rtmedia_comment_ul li .rtmedia-delete-comment,.rtmedia-activity-container ul#rtmedia_comment_ul li .rtmedia-delete-comment{text-decoration:none;position:absolute;right:0;top:0;color:#3B59A1;display:none;cursor:pointer}.rtmedia-item-comments .rt_media_comment_form textarea{width:100%;font-size:13px;height:50px}.mfp-content{width:90%}.mfp-content #buddypress .rtm-lightbox-container{background:#333;position:relative;-webkit-box-shadow:0 0 10px rgba(0,0,0,0.5);-moz-box-shadow:0 0 10px rgba(0,0,0,0.5);box-shadow:0 0 10px rgba(0,0,0,0.5);border:1px solid #222222}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-media .tagcontainer{display:inline-block;max-width:calc(100% - 4px)}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-media .tagcontainer img{max-height:calc(100% - 4px)}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta{background:#fff;overflow:hidden;padding:20px 0 0 10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents{max-height:100%;overflow-x:hidden;overflow-y:auto;padding:0 20px 0 10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents.logged-in{height:calc(97% - 80px)}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-media-title{font-size:16px;line-height:22px;margin:5px 0 10px 0}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-media-description{font-size:13px;line-height:20px;margin-bottom:10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtm-like-comments-info:before{top:13px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-comment .rtmedia-comment-content{font-size:12px;line-height:18px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-comment .rtmedia-comment-date{font-size:11px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-single-meta-contents .rtmedia-comment .rtmedia-comment-author{font-size:13px;line-height:18px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .username{padding:0 10px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .userprofile{padding:0 10px 10px 0}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .userprofile .avatar{width:40px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments{position:absolute;bottom:10px;width:95%;padding:4px;background-color:#EDEFF4}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments .row{background:none}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments textarea{min-height:30px;max-height:40px;font-size:12px;line-height:14px;padding:4px}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-single-meta .rtm-media-single-comments .rt_media_comment_submit{background-color:#5B74A8;border-color:#29447E #1A356E;color:#FFFFFF;font-weight:bold}.mfp-content #buddypress .rtm-lightbox-container .rtm-mfp-close .mfp-close{height:20px;width:24px;font-size:20px;color:grey;line-height:20px;position:absolute;right:0;z-index:2;top:0;cursor:pointer;font-weight:bold}.mfp-content #buddypress .rtm-lightbox-container .mfp-arrow{background:none;border:none;display:none}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container{padding:0 !important}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container:hover .mfp-arrow,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container:hover .rtm-ltb-title-container,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container:hover .rtm-ltb-action-container{display:block;z-index:99}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container{background-color:rgba(0,0,0,0.6);padding:0 10px;color:#fff;position:absolute;width:100%;display:none}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions{display:inline-block;vertical-align:middle;text-align:right}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions form,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions form,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions form,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions form{display:inline}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .click-nav,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .click-nav,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .click-nav,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .click-nav{float:right;margin-right:0}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions button,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions a,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions button{font-weight:bold;color:#fff;font-size:12px;opacity:0.7;padding:4px 8px}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions button:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions button:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions button:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions a:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions button:hover{opacity:1}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options{background-color:white}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options:before,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options:before,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options:before,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options:before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #fff}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options li,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options li,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options li,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options li{display:block}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons{width:100%;color:#000}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions .rtm-options li .rtmedia-action-buttons:hover,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-author-actions .rtm-options li .rtmedia-action-buttons:hover{color:#21759B}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container{top:0}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title{font-size:14px;width:55%;overflow:hidden;float:left;line-height:30px;max-height:30px}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title a{text-decoration:none;color:#fff;opacity:0.7}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title a:hover{opacity:1}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title span{opacity:0.5}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-50,.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-100{float:left;overflow:hidden}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-50{max-width:50%}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-media-name-width-100{max-width:100%}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtm-ltb-title .rtmedia-album-name{max-width:50%;display:inline-block;overflow:hidden}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-title-container .rtmedia-author-actions{text-align:right;width:44%}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container{bottom:0}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtmedia-actions{text-align:right;display:inline-block;max-width:69%;float:right}.mfp-content #buddypress .rtm-lightbox-container #rtmedia-single-media-container .rtm-ltb-action-container .rtm-ltb-gallery-title{display:inline-block;width:30%}.mfp-content #buddypress .rtm-lightbox-container .rtmedia-media:before{content:'';display:inline-block;height:100%;vertical-align:middle}.mfp-content #buddypress .rtm-lightbox-container #rtm-mejs-video-container{max-width:100%}.mfp-content #buddypress .rtm-lightbox-container #rtm-mejs-video-container{display:inline-block;vertical-align:middle}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio{display:inline-block;max-width:400px}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio .mejs-controls{margin-left:25px;width:79%}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio .mejs-controls .mejs-time-rail{width:134px}.mfp-content #buddypress .rtm-lightbox-container .mejs-audio .mejs-controls .mejs-time-rail .mejs-time-total{width:124px}.rtmedia-admin-notice{padding:4px;text-align:center;margin:2px 0}.rtmedia-info{color:green}.rtmedia-warning{color:red}.mfp-content #rtmedia-single-media-container .wp-audio-shortcode{margin-left:30px}#rtm-media-options .click-nav{position:relative;float:left;margin-right:10px}.rtm-lightbox-container #rtm-media-options-list.click-nav{position:relative}.rtm-lightbox-container #rtm-media-options-list ul{left:-85px}#rtm-media-options ul,.rtm-lightbox-container #rtm-media-options-list ul{position:absolute;right:0;width:170px;z-index:30;padding:10px 5px;background-color:#37454D;margin-top:12px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}#rtm-media-options ul:before,.rtm-lightbox-container #rtm-media-options-list ul:before{content:'';border-width:12px;border-style:inset inset solid;display:block;position:absolute;z-index:9;top:-24px;right:20px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #37454d}#rtm-media-options ul .clicker,.rtm-lightbox-container #rtm-media-options-list ul .clicker{position:relative}#rtm-media-options ul li,.rtm-lightbox-container #rtm-media-options-list ul li{padding:0 5px;list-style:none}#rtm-media-options ul li form,.rtm-lightbox-container #rtm-media-options-list ul li form{display:block}#rtm-media-options ul li .rtmedia-action-buttons,.rtm-lightbox-container #rtm-media-options-list ul li .rtmedia-action-buttons{display:block;padding:8px;color:#fff;width:100%;text-align:left;margin:0;font-size:12px;-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px}#rtm-media-options ul li .rtmedia-action-buttons:hover,.rtm-lightbox-container #rtm-media-options-list ul li .rtmedia-action-buttons:hover{background-color:#EDEFF4;color:#2284B5}.click-nav .no-js ul{display:none}.click-nav .no-js:hover ul{display:block}.morecontent span{display:none}.rtmedia-footer-link{text-align:center;padding:7px}#bp-default .rtmedia-container embed,#bp-default .rtmedia-activity-container embed{height:100%}#bp-default .rtmedia-container .me-plugin,#bp-default .rtmedia-activity-container .me-plugin{height:100%}#bp-default .rtmedia-activity-container .mejs-overlay-button{margin-left:-50px}.rtmedia-save-album{margin-top:15px}.rtmedia-popup{position:relative;background:#FFF;padding:20px;width:auto;max-width:600px;margin:20px auto}.rtmedia-popup .rtm-modal-title{font-size:24px;line-height:24px;margin-bottom:30px;margin-top:0}.rtmedia-popup .rtm-input-medium{width:55%}.rtmedia-popup input,.rtmedia-popup select{margin-right:10px}.rtmedia-popup p{margin-bottom:10px}.rtmedia-popup label{min-width:90px;display:inline-block}.rtmedia-popup>div button{font-size:13px;color:#777;padding:6px 14px;background:#fff;border:1px solid #c1c1c1}.rtmedia-popup>div button:hover{background:#EDEDED}#buddypress #whats-new-options .rtmedia-plupload-container{float:left}#buddypress #whats-new-options #rtmedia-whts-new-upload-container{margin-top:12px}#buddypress #whats-new-options #rtmedia-add-media-button-post-update{margin-top:12px;float:left;margin-right:20px}.rtmedia-list.masonry .rtmedia-list-item,.rtmedia-list.masonry .rtmedia-list-item .rtmedia-item-thumbnail{display:block;position:relative}.rtmedia-list.masonry .rtmedia-list-item:hover .rtmedia-item-title,.rtmedia-list.masonry .rtmedia-list-item .rtmedia-item-thumbnail:hover .rtmedia-item-title{display:block}.rtmedia-list.masonry .rtmedia-item-title{position:absolute;bottom:0;max-width:100%;display:none;width:100%;background-color:rgba(0,0,0,0.6)}.rtmedia-list.masonry .rtmedia-item-title h4{font-size:inherit;color:#ffffff}.rtmedia-list.masonry .rtmedia-item-title a{color:#ffffff}.rtmedia-list.masonry .rtmedia-item-title a:hover{color:#ffffff}.rtmedia-list.masonry .rtmedia-list-item{margin:3px}.rtmedia-list.masonry .rtmedia-list-item a h4{font-size:inherit;padding:5px 2px}
|
1 |
+
.alignleft{float:left}.alignright{float:right}.aligncenter{display:block;margin-left:auto;margin-right:auto;text-align:center}.clear-both{clear:both}.clear-none{clear:none}.clear-left{clear:left}.clear-right{clear:right}.rtm-inline-block{display:inline-block}.rtm-text-left{text-align:left}.rtm-text-right{text-align:right}.rtm-text-center{text-align:center}.rtm-border-0{border:0 !important}.hide{display:none}.rtmedia-success{background-color:#dff0d8;border-bottom:1px solid #e7e7e7;color:#468847;margin:10px 0;padding:8px 14px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.clearfix:after{content:"";display:table;clear:both}#buddypress form#whats-new-form textarea{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;min-height:70px;width:100%}#buddypress #whats-new-options{height:auto !important;overflow:hidden}#buddypress form#whats-new-form p.activity-greeting{line-height:1}#buddypress form#whats-new-form #whats-new-options select{border:1px solid #ccc;font-size:13px;margin-top:0;padding:3px 2px}#whats-new-submit #aw-whats-new-submit{font-size:12px;line-height:18px;padding:4px 6px}#whats-new-post-in-box{float:left;font-size:13px}#buddypress form#whats-new-form #whats-new-submit{margin-top:0}#whats-new-textarea{margin-bottom:10px}.rtmedia-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.rtmedia-container *,.rtmedia-container *:before,.rtmedia-container *:after{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}.rtmedia-list.rtmedia-list{list-style:none;margin:0;padding:0}.rtmedia-list-item>a{border:0;display:inline-block;text-decoration:none}.rtmedia-list-item>a:focus{outline:0}.rtmedia-list-item>a+p{display:none}.rtmedia-list-item>a .rtmedia-item-thumbnail img{display:inline-block}#rtmedia-uploader-form .rtm-plupload-list,#rtmedia_uploader_filelist{list-style:none;margin-left:-4px;margin-right:-4px;padding-left:0;padding-top:10px}#rtmedia-uploader-form .rtm-plupload-list li,#rtmedia_uploader_filelist li{background:#eee;float:left;margin:4px;max-width:110px;padding:5px;position:relative}#rtmedia-uploader-form .rtm-plupload-list li.upload-error,#rtmedia_uploader_filelist li.upload-error{border:1px solid red}#rtmedia-uploader-form .rtm-plupload-list img,#rtmedia_uploader_filelist img{max-width:100%}#rtmedia-uploader-form .rtm-plupload-list canvas,#rtmedia_uploader_filelist canvas{display:block;max-width:100%}.rtm-plupload-list:empty{display:none}.rtmedia-uploader-div,.rtmedia-uploader{clear:both}button#rtmedia-add-media-button-post-update{padding:3px 6px}button#rtmedia-add-media-button-post-update .dashicons{font-size:18px;line-height:20px}.plupload_file_name{font-size:11px;font-weight:bold;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plupload_file_size{color:#666;font-size:10px}.plupload_file_action{background:#eee;position:absolute;height:18px;right:0;top:0;width:18px;z-index:10}.plupload_file_action .dashicons{color:#DD3D36;cursor:pointer;font-size:16px;height:18px;padding:2px 1px;width:18px}.plupload_file_status{height:8px;overflow:hidden;position:relative}.plupload_file_progress{background:#7AD03A;height:4px;position:absolute;top:0}.rtm-form .rtm-field-wrap{margin-bottom:20px}.rtmedia_next_prev{padding:0 10px}.rtm-page-number{float:left}.rtm-page-number .rtm-label{line-height:30px}.rtm-page-number .rtm-label,.rtm-page-number .rtm-go-to-num,.rtm-page-number .rtmedia-page-link{float:left}.rtm-pagination{background:transparent;border:none;color:#888;font-size:small;margin:0;position:relative;display:block;float:left;width:100%;padding:10px 0}.rtm-pagination .rtm-paginate{float:right;font-size:15px}.rtm-pagination .rtm-paginate a,.rtm-pagination .rtm-paginate span{display:inline-block;line-height:1;margin:0 2px;padding:8px;text-decoration:none}.rtm-pagination .rtm-paginate a.rtmedia-page-link{padding:8px}.rtm-pagination .dashicons{font-size:14px;height:auto;line-height:1.2;margin:0;padding:0;width:auto}#rtmedia_go_to_num{font-size:16px;margin:0 5px;padding:4px 5px;width:80px}.rtmedia-upload-not-allowed{background-color:#fcf8e3;border-bottom:1px solid #EEE;color:#c09853;margin-bottom:20px;padding:10px 15px}.plupload_file_name{position:relative}.plupload_file_name .dashicons{background:#eee;color:#DD3D36;cursor:pointer;font-size:14px;height:auto;padding:0 2px 0 5px;position:absolute;right:0;top:0;width:auto}.plupload_file_name .dashicons-yes{color:#7AD03A}.rtmedia-footer-link{clear:both;overflow:hidden;padding:16px 0;position:relative;text-align:center}.rtm-tabs.rtm-tabs{border-bottom:1px solid #eee;list-style:none;margin:0 0 20px;padding:0}.rtm-tabs li{border:1px solid #eee;border-bottom:0;float:left;margin:0 5px;padding:0}.rtm-tabs a{border:0;display:block;padding:5px 15px;text-decoration:none}.rtm-tabs a:focus{background:transparent;box-shadow:0 0 0}.rtm-tabs .active{position:relative}.rtm-tabs .active:after{background:#fff;bottom:-1px;content:' ';height:1px;left:0;position:absolute;width:100%}.rtm-tabs .dashicons{font-size:16px;height:auto;line-height:2;margin-right:8px;width:auto}.rtmedia-edit-media-tabs .rtm-tabs a{border-bottom:0 none}.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:104211;overflow:hidden;position:fixed;background:rgba(0,0,0,0.9)}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:104311;position:fixed;outline:none !important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;max-width:84%;margin:0 auto;right:0;height:100%;left:0;top:0;padding:0 8px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mfp-container:before{content:' ';display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-inline-holder .mfp-content,.mfp-ajax-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-close,.mfp-arrow,.mfp-preloader,.mfp-counter{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none !important}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.mfp-close,button.mfp-arrow{overflow:visible;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;display:block;outline:none;padding:0;z-index:1046;-webkit-box-shadow:none;box-shadow:none}button::-moz-focus-inner{padding:0;border:0}.mfp-close{background:#fff;color:#999;cursor:pointer;font-size:24px;font-style:normal;height:30px;line-height:30px;padding:0;position:absolute;right:1px;text-align:center;text-decoration:none;text-indent:2px;top:0;width:32px;z-index:12}.mfp-close:hover,.mfp-close:focus{opacity:1;filter:alpha(opacity=100)}.mfp-close:active{top:1px}.mfp-image-holder .mfp-close,.mfp-iframe-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{cursor:pointer;position:absolute;opacity:0.65;filter:alpha(opacity=65);margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent;opacity:0;z-index:10;-moz-transition:all 300ms ease-out;-o-transition:all 300ms ease-out;-webkit-transition:all 300ms ease-out;transition:all 300ms ease-out}.rtm-single-media:hover .mfp-arrow{opacity:1}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:hover,.mfp-arrow:focus{opacity:1;filter:alpha(opacity=100)}.mfp-arrow:before,.mfp-arrow:after,.mfp-arrow .mfp-b,.mfp-arrow .mfp-a{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset transparent}.mfp-arrow:after,.mfp-arrow .mfp-a{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before,.mfp-arrow .mfp-b{border-top-width:21px;border-bottom-width:21px;opacity:0.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after,.mfp-arrow-left .mfp-a{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before,.mfp-arrow-left .mfp-b{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right:after,.mfp-arrow-right .mfp-a{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before,.mfp-arrow-right .mfp-b{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:40px 0 40px;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:'';position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}.mfp-preloader{position:absolute;top:50%;left:0;right:0;margin-top:-36px;z-index:1044;font-size:0;width:36px;height:36px;margin-left:auto;margin-right:auto}.mfp-preloader:before{content:'Loading…';position:absolute;width:30px;height:30px}.mfp-preloader:not(:required):before{content:'';border-radius:50%;border:3px solid rgba(255,255,255,0.27);border-top-color:rgba(255,255,255,0.9);animation:spinner .6s linear infinite;-webkit-animation:spinner .6s linear infinite}@keyframes spinner{to{transform:rotate(360deg)}}@-webkit-keyframes spinner{to{-webkit-transform:rotate(360deg)}}@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,0.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,0.6);position:fixed;text-align:center;padding:0}}@media all and (max-width: 900px){.mfp-arrow{-webkit-transform:scale(0.75);transform:scale(0.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}.mfp-content .rtm-lightbox-container{background:#000;margin:0 auto;position:relative}.mfp-content .rtm-single-meta{background:#fff;overflow:hidden;padding:20px 20px 110px;position:relative;vertical-align:top}.rtm-single-media{overflow:hidden;position:relative;text-align:center;vertical-align:middle}.rtm-single-media .mejs-container{margin:0 auto;max-width:inherit}.rtm-ltb-action-container{background-color:rgba(0,0,0,0.6);bottom:0;color:#fff;line-height:38px;opacity:0;padding:0 10px;position:absolute;width:100%;-moz-transition:all 300ms ease-out;-o-transition:all 300ms ease-out;-webkit-transition:all 300ms ease-out;transition:all 300ms ease-out}.rtm-single-media:hover .rtm-ltb-action-container{opacity:1}#buddypress #rtmedia-single-media-container.rtmedia-single-media .button{background:transparent;border:0 none;border-radius:2px;color:rgba(255,255,255,0.5);display:block;font-family:inherit;font-weight:normal;line-height:24px;margin:0;padding:0 6px;text-shadow:0 0 0;text-transform:none}#buddypress #rtmedia-single-media-container.rtmedia-single-media .button:hover{background:rgba(255,255,255,0.2);color:rgba(255,255,255,0.8)}#buddypress #rtmedia-single-media-container.rtmedia-single-media .rtm-options .button{color:#333;margin:0 auto;padding:0 4px 0 0}#buddypress #rtm-media-options-list .rtm-options .button{background:transparent;border:0 none;border-radius:2px;color:rgba(255,255,255,0.5);float:left;font-family:inherit;font-weight:normal;line-height:24px;padding:0 6px;text-shadow:0 0 0;text-transform:none}#buddypress #rtm-media-options-list .rtm-options .rtmedia-delete-favlist{color:#fff;padding:0}.rtm-options.rtm-options{background:#666;color:#fff;display:none;font-size:14px;list-style:none;margin:0;padding:8px 10px;position:absolute;left:0;top:38px;width:180px;z-index:10}.rtm-options li{margin:0;overflow:hidden;padding:2px 0}.rtm-media-options .rtm-options:after{bottom:100%;left:20px;border:solid transparent;content:' ';height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(255,255,255,0);border-bottom-color:#666;border-width:6px;margin-left:-6px}.mfp-content .rtm-options{background:#fff;color:#333;bottom:38px;right:0;left:auto;top:auto}.mfp-content .rtm-options:after{top:100%;right:22px;border:solid transparent;content:' ';height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(255,255,255,0);border-top-color:#fff;border-width:6px;margin-left:-6px}.rtm-options .dashicons{font-size:14px;line-height:24px;margin-right:2px}.rtm-media-options .rtm-options a{border:0;color:#fff;display:block;text-decoration:none}.rtm-ltb-title{color:rgba(255,255,255,0.7);float:left;font-size:13px}.rtm-ltb-title a{color:inherit}.rtm-ltb-title a:hover{border-bottom:1px dotted;color:#fff}.rtm-item-actions{float:right}.rtm-item-actions>div,.rtm-item-actions>form{float:left;margin:0 2px;padding:7px 0;position:relative}.rtmedia-media img{display:inline-block;max-height:inherit;height:auto;max-width:100%;width:auto}.rtm-user-meta-details .username{font-size:16px;line-height:1;margin-bottom:6px}.userprofile{float:left;margin:0 16px 16px 0;max-width:54px}.userprofile a{display:block}.userprofile img{height:auto;max-width:100%}.rtm-time-privacy{color:#999;font-size:12px}.rtm-time-privacy .dashicons{font-size:14px;line-height:1.5}.rtmedia-actions-before-comments>span{float:left;margin-right:10px}.rtmedia-actions-before-comments .rtmedia-comment-link,#buddypress .rtmedia-actions-before-comments .rtmedia-like{border:0;font-size:13px;font-weight:normal;line-height:2;padding:0;text-transform:none}.rtmedia-actions-before-comments .rtmedia-comment-link:hover,#buddypress .rtmedia-actions-before-comments .rtmedia-like:hover{background:transparent}.rtmedia-comment-user-pic{float:left;margin-right:10px;max-width:36px}.rtmedia-comment-user-pic img{height:auto;max-width:100%}.rtm-like-comments-info{position:relative}.rtm-like-comments-info:after{bottom:100%;left:15px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(237,239,244,0);border-bottom-color:#edeff4;border-width:4px;margin-left:-4px}.rtm-comment-list.rtm-comment-list{list-style:none;margin:0;padding:0}.rtm-comment-list li{background:#edeff4;font-size:12px;margin-bottom:1px;padding:10px;position:relative}.rtm-comment-list li:hover .rtmedia-delete-comment{opacity:1}.rtm-comment-list .rtmedia-no-comments{margin:0;padding:5px 10px}.rtmedia-like-info{background:#edeff4;font-size:12px;margin-bottom:1px;padding:5px 10px;position:relative}.rtm-comment-wrap{overflow:hidden}.rtm-comment-wrap .rtmedia-comment-author{font-weight:700}.rtm-comment-wrap .rtmedia-comment-date{color:#999;font-size:11px}.rtmedia-comment-content{margin-top:2px}.rtmedia-delete-comment{color:#999;cursor:pointer;font-size:16px;opacity:0;position:absolute;right:5px;top:5px}.rtmedia-comment-content p{margin:0}.rtmedia-comment-details{line-height:1.5;margin-top:-3px}.rtmedia-item-comments textarea{font-size:14px;padding:4px}.rtm-media-single-comments{background-color:#edeff4;bottom:20px;padding:10px;position:absolute;width:calc(100% - 40px)}.rtm-media-single-comments textarea{font-size:12px;line-height:14px;max-height:40px;min-height:30px;padding:4px}.rtmedia-popup{background:#fff;margin:20px auto;max-width:600px;padding:20px;position:relative;width:auto}.rtmedia-popup .rtm-modal-title{font-size:24px;margin-bottom:20px;margin-top:0}.rtmedia-popup label{display:block;margin-bottom:5px}#rtm-modal-container p{margin-bottom:10px}#rtm-mejs-video-container{margin:0 auto}.rtmedia-media-name{float:left;max-width:140px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.rtm-single-media.rtm-media-type-video{padding-bottom:40px;padding-top:40px}.rtmedia-activity-container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.rtmedia-activity-container *,.rtmedia-activity-container *:before,.rtmedia-activity-container *:after{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}#buddypress ul.rtmedia-list li{border-bottom:0;padding-bottom:0}.rtmedia-activity-container .rtmedia-item-actions{display:none}.rtmedia-activity-container .rtmedia-item-title,.rtmedia-activity-container .rtmedia-item-title a{border:0;color:#666;font-size:13px;margin:5px 0 0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}#rtmedia-whts-new-upload-container div{left:0 !important;position:absolute;top:0 !important}#aw-whats-new-submit,.rtmedia-add-media-button{display:block}.rtm-drag-drop-active{border:4px dashed green !important;display:block;height:100%;opacity:0.5;z-index:9999}#rtm-drop-files-title{background:rgba(0,0,0,0.2);display:none;font-size:14px;height:100%;padding:20px;position:absolute;top:0;width:100%}#rtSelectPrivacy{float:right}.rtmedia-plupload-container{position:relative;float:left}.rtm-upload-button-wrapper{float:left;margin-right:5px}#rtmedia-action-update{margin-right:10px}.rtmedia-list-item.media-type-document,.rtmedia-list-item.media-type-music,.rtmedia-list-item.media-type-video{display:inline-block}.media-type-music .mejs-container{margin-bottom:10px}.rtmedia-album-edit .rtm-checkbox-wrap{background:rgba(255,255,255,0.9);height:30px;line-height:1;padding:10px;position:absolute;z-index:10}.rtmedia-album-edit .rtmedia-item-selector{position:relative;top:-7px}.rtm-single-actions.rtm-item-actions{float:none}.media-item .describe{border-collapse:collapse;width:100%;border-top-style:solid;border-top-width:1px;clear:both;cursor:default}.media-item.media-blank .describe{border:0}.media-item .describe th{vertical-align:top;text-align:left;padding:5px 10px 10px;width:140px}.media-item .describe .align th{padding-top:0}.media-item .media-item-info tr{background-color:transparent}.media-item .describe td{padding:0 8px 8px 0;vertical-align:top}.media-item thead.media-item-info td{padding:4px 10px 0}.media-item .media-item-info .A1B1{padding:0 0 0 10px}.media-item td.savesend{padding-bottom:15px}.media-item .thumbnail{max-height:128px;max-width:128px}#wpbody-content #async-upload-wrap a{display:none}.media-upload-form{margin-top:20px}.media-upload-form td label{margin-right:6px;margin-left:2px}.media-upload-form .align .field label{display:inline;padding:0 0 0 23px;margin:0 1em 0 3px;font-weight:bold}.media-upload-form tr.image-size label{margin:0 0 0 5px;font-weight:bold}.media-upload-form th.label label{font-weight:bold;margin:0.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}abbr.required{border:medium none;text-decoration:none}.media-item .describe input[type="text"],.media-item .describe textarea{width:460px}.media-item .describe p.help{margin:0;padding:0 0 0 5px}.media-item .edit-attachment,.describe-toggle-on,.describe-toggle-off{display:block;line-height:36px;float:right;margin-right:15px}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on{display:none}.media-item.open .describe-toggle-off{display:block}#media-items .media-item{border-style:solid;border-width:1px;min-height:36px;position:relative;margin-top:-1px;width:100%}#media-items{width:623px}.media-new-php #media-items{margin:1em 0}#media-items:empty{border:0 none}.media-item .filename{line-height:36px;overflow:hidden;padding:0 10px}.media-item .error-div{padding-left:10px}.media-item .pinkynail{float:left;margin:2px 2px 0;max-width:40px;max-height:32px}.media-item .startopen,.media-item .startclosed{display:none}.media-item .original{position:relative;height:34px}.media-item .progress{float:right;height:22px;margin:6px 10px 0 0;width:200px;line-height:2em;padding:0;overflow:hidden;margin-bottom:2px;border:1px solid #d1d1d1;background:#f7f7f7;background-image:-webkit-gradient(linear, left bottom, left top, from(#fff), to(#f7f7f7));background-image:-webkit-linear-gradient(bottom, #fff, #f7f7f7);background-image:-moz-linear-gradient(bottom, #fff, #f7f7f7);background-image:-o-linear-gradient(bottom, #fff, #f7f7f7);background-image:linear-gradient(to top, #ffffff,#f7f7f7);-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 0 3px rgba(0,0,0,0.1);box-shadow:inset 0 0 3px rgba(0,0,0,0.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-24px;background-color:#8cc1e9;background-image:-webkit-gradient(linear, left bottom, left top, from(#72a7cf), to(#8cc1e9));background-image:-webkit-linear-gradient(bottom, #72a7cf, #8cc1e9);background-image:-moz-linear-gradient(bottom, #72a7cf, #8cc1e9);background-image:-o-linear-gradient(bottom, #72a7cf, #8cc1e9);background-image:linear-gradient(to top, #72a7cf,#8cc1e9);-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.3);box-shadow:0 0 3px rgba(0,0,0,0.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0 8px;text-shadow:0 1px 0 rgba(255,255,255,0.4);color:rgba(0,0,0,0.6)}.upload-php .fixed .column-parent{width:15%}.js .html-uploader #plupload-upload-ui{display:none}.js .html-uploader #html-upload-ui{display:block}.media-upload-form .media-item.error{margin:0;padding:0}.media-upload-form .media-item.error p,.media-item .error-div{line-height:16px;margin:5px 10px;padding:0}.media-item .error-div a.dismiss{display:block;float:right;margin:5px 4px 0 15px}.find-box{width:600px;height:300px;overflow:hidden;padding:33px 0 51px;position:absolute;z-index:1000}.find-box-head{cursor:move;font-weight:bold;height:2em;line-height:2em;padding:1px 12px;position:absolute;top:5px;width:100%}.find-box-inside{overflow:auto;padding:6px;height:100%}.find-box-search{overflow:hidden;padding:9px;position:relative}.find-box-search .spinner{float:none;left:125px;position:absolute;top:9px}#find-posts-input{float:left;width:140px;height:24px}#find-posts-search{float:left;margin:1px 4px 0 3px}#find-posts-response{margin:8px 0;padding:0 1px 6px}#find-posts-response table{width:100%}#find-posts-response .found-radio{padding:3px 0 0 8px;width:15px}.find-box-buttons{padding:8px;overflow:hidden}.find-box #resize-se{position:absolute;right:1px;bottom:1px}.ui-find-overlay{position:absolute;top:0;left:0;background-color:#000;opacity:0.6;filter:alpha(opacity=60)}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-0.5em 0 2em 0}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border-width:1px;border-style:solid;line-height:1.8em;word-spacing:3px;-webkit-border-radius:6px;border-radius:6px}.drag-drop #drag-drop-area{border:4px dashed #DDDDDD;height:200px}.drag-drop .drag-drop-inside{margin:70px auto 0;width:250px}.drag-drop-inside p{color:#aaa;font-size:14px;margin:5px 0;display:none}.drag-drop .drag-drop-inside p{text-align:center}.drag-drop-inside p.drag-drop-info{font-size:20px}.drag-drop .drag-drop-inside p,.drag-drop-inside p.drag-drop-buttons{display:block}.drag-drop.drag-over #drag-drop-area{border-color:#83b4d8}#plupload-upload-ui{position:relative}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative}.imgedit-settings p{margin:8px 0}.post-php .imgedit-wrap table{width:100%}.describe .imgedit-wrap table td,.wp_attachment_holder .imgedit-wrap table td{vertical-align:top;padding-top:0}.describe .imgedit-wrap table td.imgedit-settings{padding:0 5px}.wp_attachment_holder .imgedit-wrap table td.imgedit-settings{width:250px}td.imgedit-settings input{margin-top:0;vertical-align:middle}.imgedit-wait{position:absolute;top:0;background:#fff url(../../../../../../wp-admin/images/wpspin_light.gif) no-repeat scroll 22px 10px;background-size:16px 16px;opacity:0.7;filter:alpha(opacity=70);width:100%;height:500px;display:none}.spinner{background:url(../../../../../../wp-admin/images/wpspin_light.gif) no-repeat;background-size:16px 16px;display:none;float:right;opacity:0.7;filter:alpha(opacity=70);width:16px;height:16px;margin:5px 5px 0}.no-float{float:none}.media-disabled,.imgedit-settings .disabled{color:grey}.wp_attachment_image,.A1B1{overflow:hidden}.wp_attachment_image .button,.A1B1 .button{float:left}.no-js .wp_attachment_image .button{display:none}.wp_attachment_image .spinner,.A1B1 .spinner{float:left;padding:0 4px 4px;vertical-align:bottom}.imgedit-menu{margin:0 0 12px;min-width:300px}.imgedit-menu div{float:left;width:32px;height:32px}.imgedit-crop-wrap{position:relative}.imgedit-crop{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -9px -31px;margin:0 8px 0 0}.imgedit-crop.disabled:hover{background-position:-9px -31px}.imgedit-crop:hover{background-position:-9px -1px}.imgedit-rleft{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -46px -31px;margin:0 3px}.imgedit-rleft.disabled:hover{background-position:-46px -31px}.imgedit-rleft:hover{background-position:-46px -1px}.imgedit-rright{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -77px -31px;margin:0 8px 0 3px}.imgedit-rright.disabled:hover{background-position:-77px -31px}.imgedit-rright:hover{background-position:-77px -1px}.imgedit-flipv{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -115px -31px;margin:0 3px}.imgedit-flipv.disabled:hover{background-position:-115px -31px}.imgedit-flipv:hover{background-position:-115px -1px}.imgedit-fliph{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -147px -31px;margin:0 8px 0 3px}.imgedit-fliph.disabled:hover{background-position:-147px -31px}.imgedit-fliph:hover{background-position:-147px -1px}.imgedit-undo{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -184px -31px;margin:0 3px}.imgedit-undo.disabled:hover{background-position:-184px -31px}.imgedit-undo:hover{background-position:-184px -1px}.imgedit-redo{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -215px -31px;margin:0 8px 0 3px}.imgedit-redo.disabled:hover{background-position:-215px -31px}.imgedit-redo:hover{background-position:-215px -1px}.imgedit-applyto img{margin:0 8px 0 0}.imgedit-group h3{font-size:18px}.imgedit-group .dashicons{border:0;line-height:1.2}.imgedit-group-top{margin:5px 0}.imgedit-applyto .imgedit-label{padding:2px 0 0;display:block}.imgedit-help{display:none;font-style:italic;margin-bottom:8px}a.imgedit-help-toggle{text-decoration:none}.form-table td.imgedit-response{padding:0}.imgedit-submit{margin:8px 0}.imgedit-submit-btn{margin-left:20px}.imgedit-wrap .nowrap{white-space:nowrap}span.imgedit-scale-warn{color:red;font-size:20px;font-style:normal;visibility:hidden;vertical-align:middle}.wp_attachment_details{margin-bottom:20px}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:0.5}.bp-media-image-editor-cotnainer{margin-top:35px}.wp_attachment_image .bp-media-image-edit{float:left}.wp_attachment_image .spinner{display:none}.bp-media-image-editor-cotnainer .hidden{display:none}.bp-media-image-editor-cotnainer div.updated{margin:5px 0 15px;background-color:#ffffe0;border-color:#e6db55;padding:0 .6em;-webkit-border-radius:3px;border-radius:3px;border-width:1px;border-style:solid}.bp-media-image-editor-cotnainer div.updated p{margin:.5em 0;padding:2px}.rtm-media-gallery-uploader{display:none}.drag-drop{border:4px dashed #DDD;text-align:center;background:#fafafa;overflow:hidden;color:#AAAAAA;margin-top:20px;padding:25px 0}.drag-drop.dragover{border-color:#83b4d8}.drag-drop .drag-drop-info{font-size:20px;line-height:24px}.drag-drop .rtm-select-files span{vertical-align:middle}.drag-drop .rtm-seperator{margin:0px 20px}.drag-drop .start-media-upload{display:none;margin-top:20px}.drag-drop .rtm-file-size-limit{vertical-align:middle;font-size:16px;line-height:24px}.rtm-uploader-main-wrapper .rtm-uploader-tabs{margin-bottom:10px;text-align:left}.rtm-uploader-main-wrapper ul{border-bottom:1px solid #CCC}.rtm-uploader-main-wrapper li{margin:0 0 -1px 10px;display:inline-block;padding:5px 10px;line-height:25px;background-color:#e4e4e4;border:1px solid #CCC}.rtm-uploader-main-wrapper li.active{background:transparent;border-left:1px solid #CCC;border-top:1px solid #CCC;border-right:1px solid #CCC;border-bottom:1px solid #fafafa}.rtm-uploader-main-wrapper li:hover{cursor:pointer}.rtmedia-container .rtmedia-list{margin:10px -5px}.rtmedia-container .rtmedia-list .rtmedia-list-item{float:left;margin:5px;position:relative}.rtmedia-container .rtmedia-list .rtmedia-list-item>a{display:block}.rtmedia-container .rtmedia-list .rtmedia_time{background-color:#000;color:#fff;display:inline-block;font-size:11px;font-weight:bold;line-height:14px;opacity:0.75;padding:0 4px;position:absolute;right:2px;top:2px}.rtmedia-container .rtmedia-list img{vertical-align:top}.rtmedia-container .rtmedia-list .rtmedia-item-title h4{color:#666;font-size:12px;font-weight:normal;margin:5px 0 0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.rtm-load-more{background:#eee;text-align:center}.rtmedia-container .rtm-load-more a{border:0;padding:10px 0}.rtm-load-more .rtm-media-loading{padding:10px 0}.rtm-media-options{line-height:1.4;margin-bottom:10px}.rtm-media-options>div{display:inline-block;cursor:pointer}.rtm-media-options .rtm-media-options-list{margin-right:10px;padding-right:10px;position:relative}.rtm-media-options .rtm-media-options-list:after{background:#999;content:' ';bottom:3px;position:absolute;height:14px;right:0;width:1px}.rtm-media-options .dashicons{font-size:inherit;line-height:1.6}.rtmedia-upload-media-link{cursor:pointer}.rtm-album-privacy span{font-size:16px;display:inline-block;margin:0 20px 20px 20px;vertical-align:top}.rtm-album-privacy label{margin-right:8px}.rtm-album-privacy .dashicons{font-size:16px;line-height:1.5;margin-right:5px}#rtm-media-options-list .rtmedia-delete-album{background:transparent;border:0;color:#fff;font-family:inherit;font-size:inherit;font-weight:inherit;padding:0;text-transform:inherit}#rtm-media-options-list .rtmedia-delete-album:hover{background:transparent;border:0;color:#fff}#buddypress .mejs-controls button{padding:4px 8px;border:none;background:transparent url("../../../lib/media-element/controls.png") no-repeat}#buddypress .mejs-controls .mejs-play button{background-position:0 0}#buddypress .mejs-controls .mejs-pause button{background-position:0 -16px}#buddypress .mejs-controls .mejs-unmute button{background-position:-16px 0}#buddypress .mejs-controls .mejs-mute button{background-position:-16px -16px}#buddypress .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}#buddypress .mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mejs-container .mejs-controls .mejs-time{padding:10px 3px 0}@media only screen and (min-width: 1025px){.mfp-content .rtm-lightbox-container{display:table;table-layout:fixed;width:100%}.mfp-content .rtm-single-media{display:table-cell;width:66.6667%}.mfp-content .rtm-single-meta{display:table-cell;width:33.3333%}.mfp-content .rtmedia-item-comments{max-height:330px;overflow-x:hidden;overflow-y:auto}}.rtl #rtSelectPrivacy{float:left}.rtl .rtmedia-plupload-container{float:right}.rtl .rtm-upload-button-wrapper{float:right}.rtl #whats-new-post-in-box{float:right}.rtl .describe-toggle-off{float:left}.rtl .media-item .pinkynail{float:right}.rtl .media-item .progress{float:left}.rtl .media-item .error-div a.dismiss{float:left}.rtl #find-posts-input{float:right}.rtl #find-posts-search{float:right}.rtl .spinner{float:left}.rtl .wp_attachment_image .button,.rtl .A1B1 .button{float:right}.rtl .wp_attachment_image .spinner,.rtl .A1B1 .spinner{float:right}.rtl .imgedit-menu div{float:right}.rtl .wp_attachment_image .bp-media-image-edit{float:right}.rtl .rtmedia-container .rtmedia-list .rtmedia-list-item{float:right}.rtl #buddypress #rtm-media-options-list .rtm-options .button{float:right}.rtl .rtm-ltb-title{float:right}.rtl .rtm-item-actions{float:left}.rtl .rtm-item-actions>div,.rtl .rtm-item-actions>form{float:right}.rtl .userprofile{float:right}.rtl .rtmedia-actions-before-comments>span{float:right}.rtl .rtmedia-comment-user-pic{float:right}.rtl .rtmedia-media-name{float:right}.rtl #rtmedia-uploader-form .rtm-plupload-list li,.rtl #rtmedia_uploader_filelist li{float:right}.rtl .rtm-page-number{float:right}.rtl .rtm-page-number .rtmedia-page-link{float:right}.rtl .rtm-pagination{float:right}.rtl .rtm-pagination .rtm-paginate{float:left}.rtl .rtm-tabs li{float:right}.rtl .alignleft{float:right}.rtl .alignright{float:left}
|
app/assets/css/sass/.bowerrc
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"directory":"bower_components"}
|
app/assets/css/sass/_activity.scss
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtmedia-activity-container {
|
2 |
+
-webkit-box-sizing: border-box;
|
3 |
+
-moz-box-sizing: border-box;
|
4 |
+
box-sizing: border-box;
|
5 |
+
|
6 |
+
* {
|
7 |
+
&,
|
8 |
+
&:before,
|
9 |
+
&:after {
|
10 |
+
-webkit-box-sizing: inherit;
|
11 |
+
-moz-box-sizing: inherit;
|
12 |
+
box-sizing: inherit;
|
13 |
+
}
|
14 |
+
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
// remove border and padding
|
19 |
+
#buddypress ul.rtmedia-list li {
|
20 |
+
border-bottom: 0;
|
21 |
+
padding-bottom: 0;
|
22 |
+
}
|
23 |
+
|
24 |
+
// hide unnecessory div
|
25 |
+
.rtmedia-activity-container {
|
26 |
+
|
27 |
+
.rtmedia-item-actions {
|
28 |
+
display: none;
|
29 |
+
}
|
30 |
+
|
31 |
+
.rtmedia-item-title {
|
32 |
+
|
33 |
+
&, a {
|
34 |
+
border: 0;
|
35 |
+
color: $gray;
|
36 |
+
font-size: 13px;
|
37 |
+
margin: 5px 0 0;
|
38 |
+
overflow: hidden;
|
39 |
+
text-align: center;
|
40 |
+
text-overflow: ellipsis;
|
41 |
+
white-space: nowrap;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
// Uploader Button
|
48 |
+
#rtmedia-whts-new-upload-container div {
|
49 |
+
left: 0 !important;
|
50 |
+
position: absolute;
|
51 |
+
top: 0 !important;
|
52 |
+
}
|
53 |
+
|
54 |
+
#aw-whats-new-submit,
|
55 |
+
.rtmedia-add-media-button {
|
56 |
+
display: block; // Remove extra space
|
57 |
+
}
|
58 |
+
|
59 |
+
.rtm-drag-drop-active {
|
60 |
+
border: 4px dashed green !important;
|
61 |
+
display: block;
|
62 |
+
height: 100%;
|
63 |
+
opacity: 0.5;
|
64 |
+
z-index: 9999;
|
65 |
+
}
|
66 |
+
|
67 |
+
#rtm-drop-files-title {
|
68 |
+
background: rgba(0, 0, 0, 0.2);
|
69 |
+
display: none;
|
70 |
+
font-size: 14px;
|
71 |
+
height: 100%;
|
72 |
+
padding: 20px;
|
73 |
+
position: absolute;
|
74 |
+
top: 0;
|
75 |
+
width: 100%;
|
76 |
+
}
|
77 |
+
|
78 |
+
#rtSelectPrivacy {
|
79 |
+
float: right;
|
80 |
+
}
|
81 |
+
|
82 |
+
.rtmedia-plupload-container {
|
83 |
+
position: relative;
|
84 |
+
float: left;
|
85 |
+
}
|
86 |
+
|
87 |
+
.rtm-upload-button-wrapper {
|
88 |
+
float: left;
|
89 |
+
margin-right: 5px;
|
90 |
+
}
|
91 |
+
|
92 |
+
#rtmedia-action-update {
|
93 |
+
margin-right: 10px;
|
94 |
+
}
|
95 |
+
|
96 |
+
// Video/Music title make center align
|
97 |
+
.rtmedia-list-item {
|
98 |
+
&.media-type-document,
|
99 |
+
&.media-type-music,
|
100 |
+
&.media-type-video {
|
101 |
+
display: inline-block;
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
.media-type-music {
|
106 |
+
.mejs-container {
|
107 |
+
margin-bottom: 10px;
|
108 |
+
}
|
109 |
+
}
|
app/assets/css/sass/_album.scss
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtmedia-album-edit {
|
2 |
+
|
3 |
+
.rtm-checkbox-wrap {
|
4 |
+
background: rgba($white, 0.9);
|
5 |
+
height: 30px;
|
6 |
+
line-height: 1;
|
7 |
+
padding: 10px;
|
8 |
+
position: absolute;
|
9 |
+
z-index: 10;
|
10 |
+
}
|
11 |
+
|
12 |
+
.rtmedia-item-selector {
|
13 |
+
position: relative;
|
14 |
+
top: -7px;
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
18 |
+
|
19 |
+
.rtm-single-actions.rtm-item-actions {
|
20 |
+
float: none;
|
21 |
+
}
|
app/assets/css/sass/_buddypress.scss
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// BuddyPress Overwites
|
2 |
+
|
3 |
+
#buddypress form#whats-new-form textarea {
|
4 |
+
|
5 |
+
// Fixed for 2012
|
6 |
+
-webkit-box-sizing: border-box;
|
7 |
+
-moz-box-sizing: border-box;
|
8 |
+
box-sizing: border-box;
|
9 |
+
|
10 |
+
min-height: 70px;
|
11 |
+
width: 100%;
|
12 |
+
}
|
13 |
+
|
14 |
+
#buddypress #whats-new-options {
|
15 |
+
height: auto !important;
|
16 |
+
overflow: hidden;
|
17 |
+
}
|
18 |
+
|
19 |
+
#buddypress form#whats-new-form p.activity-greeting {
|
20 |
+
line-height: 1;
|
21 |
+
}
|
22 |
+
|
23 |
+
#buddypress form#whats-new-form #whats-new-options select {
|
24 |
+
border: 1px solid #ccc;
|
25 |
+
font-size: 13px;
|
26 |
+
margin-top: 0;
|
27 |
+
padding: 3px 2px;
|
28 |
+
}
|
29 |
+
|
30 |
+
#whats-new-submit #aw-whats-new-submit {
|
31 |
+
font-size: 12px;
|
32 |
+
line-height: 18px;
|
33 |
+
padding: 4px 6px;
|
34 |
+
}
|
35 |
+
|
36 |
+
#whats-new-post-in-box {
|
37 |
+
float: left;
|
38 |
+
font-size: 13px;
|
39 |
+
}
|
40 |
+
|
41 |
+
#buddypress form#whats-new-form #whats-new-submit {
|
42 |
+
margin-top: 0;
|
43 |
+
}
|
44 |
+
|
45 |
+
#whats-new-textarea {
|
46 |
+
margin-bottom: 10px;
|
47 |
+
}
|
app/assets/css/sass/_img-edit.scss
ADDED
@@ -0,0 +1,702 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*------------------------------------------------------------------------------
|
2 |
+
14.0 - Media Screen
|
3 |
+
------------------------------------------------------------------------------*/
|
4 |
+
|
5 |
+
.media-item .describe {
|
6 |
+
border-collapse: collapse;
|
7 |
+
width: 100%;
|
8 |
+
border-top-style: solid;
|
9 |
+
border-top-width: 1px;
|
10 |
+
clear: both;
|
11 |
+
cursor: default;
|
12 |
+
}
|
13 |
+
|
14 |
+
.media-item.media-blank .describe {
|
15 |
+
border: 0;
|
16 |
+
}
|
17 |
+
|
18 |
+
.media-item .describe th {
|
19 |
+
vertical-align: top;
|
20 |
+
text-align: left;
|
21 |
+
padding: 5px 10px 10px;
|
22 |
+
width: 140px;
|
23 |
+
}
|
24 |
+
|
25 |
+
.media-item .describe .align th {
|
26 |
+
padding-top: 0;
|
27 |
+
}
|
28 |
+
|
29 |
+
.media-item .media-item-info tr {
|
30 |
+
background-color: transparent;
|
31 |
+
}
|
32 |
+
|
33 |
+
.media-item .describe td {
|
34 |
+
padding: 0 8px 8px 0;
|
35 |
+
vertical-align: top;
|
36 |
+
}
|
37 |
+
|
38 |
+
.media-item thead.media-item-info td {
|
39 |
+
padding: 4px 10px 0;
|
40 |
+
}
|
41 |
+
|
42 |
+
.media-item .media-item-info .A1B1 {
|
43 |
+
padding: 0 0 0 10px;
|
44 |
+
}
|
45 |
+
|
46 |
+
.media-item td.savesend {
|
47 |
+
padding-bottom: 15px;
|
48 |
+
}
|
49 |
+
|
50 |
+
.media-item .thumbnail {
|
51 |
+
max-height: 128px;
|
52 |
+
max-width: 128px;
|
53 |
+
}
|
54 |
+
|
55 |
+
#wpbody-content #async-upload-wrap a {
|
56 |
+
display: none;
|
57 |
+
}
|
58 |
+
|
59 |
+
.media-upload-form {
|
60 |
+
margin-top: 20px;
|
61 |
+
}
|
62 |
+
|
63 |
+
.media-upload-form td label {
|
64 |
+
margin-right: 6px;
|
65 |
+
margin-left: 2px;
|
66 |
+
}
|
67 |
+
|
68 |
+
.media-upload-form .align .field label {
|
69 |
+
display: inline;
|
70 |
+
padding: 0 0 0 23px;
|
71 |
+
margin: 0 1em 0 3px;
|
72 |
+
font-weight: bold;
|
73 |
+
}
|
74 |
+
|
75 |
+
.media-upload-form tr.image-size label {
|
76 |
+
margin: 0 0 0 5px;
|
77 |
+
font-weight: bold;
|
78 |
+
}
|
79 |
+
|
80 |
+
.media-upload-form th.label label {
|
81 |
+
font-weight: bold;
|
82 |
+
margin: 0.5em;
|
83 |
+
font-size: 13px;
|
84 |
+
}
|
85 |
+
|
86 |
+
.media-upload-form th.label label span {
|
87 |
+
padding: 0 5px;
|
88 |
+
}
|
89 |
+
|
90 |
+
abbr.required {
|
91 |
+
border: medium none;
|
92 |
+
text-decoration: none;
|
93 |
+
}
|
94 |
+
|
95 |
+
.media-item .describe input[type="text"],
|
96 |
+
.media-item .describe textarea {
|
97 |
+
width: 460px;
|
98 |
+
}
|
99 |
+
|
100 |
+
.media-item .describe p.help {
|
101 |
+
margin: 0;
|
102 |
+
padding: 0 0 0 5px;
|
103 |
+
}
|
104 |
+
|
105 |
+
.media-item .edit-attachment,
|
106 |
+
.describe-toggle-on,
|
107 |
+
.describe-toggle-off {
|
108 |
+
display: block;
|
109 |
+
line-height: 36px;
|
110 |
+
float: right;
|
111 |
+
margin-right: 15px;
|
112 |
+
}
|
113 |
+
|
114 |
+
.media-item .describe-toggle-off,
|
115 |
+
.media-item.open .describe-toggle-on {
|
116 |
+
display: none;
|
117 |
+
}
|
118 |
+
|
119 |
+
.media-item.open .describe-toggle-off {
|
120 |
+
display: block;
|
121 |
+
}
|
122 |
+
|
123 |
+
#media-items .media-item {
|
124 |
+
border-style: solid;
|
125 |
+
border-width: 1px;
|
126 |
+
min-height: 36px;
|
127 |
+
position: relative;
|
128 |
+
margin-top: -1px;
|
129 |
+
width: 100%;
|
130 |
+
}
|
131 |
+
|
132 |
+
#media-items {
|
133 |
+
width: 623px;
|
134 |
+
}
|
135 |
+
|
136 |
+
.media-new-php #media-items {
|
137 |
+
margin: 1em 0;
|
138 |
+
}
|
139 |
+
|
140 |
+
#media-items:empty {
|
141 |
+
border: 0 none;
|
142 |
+
}
|
143 |
+
|
144 |
+
.media-item .filename {
|
145 |
+
line-height: 36px;
|
146 |
+
overflow: hidden;
|
147 |
+
padding: 0 10px;
|
148 |
+
}
|
149 |
+
|
150 |
+
.media-item .error-div {
|
151 |
+
padding-left: 10px;
|
152 |
+
}
|
153 |
+
|
154 |
+
.media-item .pinkynail {
|
155 |
+
float: left;
|
156 |
+
margin: 2px 2px 0;
|
157 |
+
max-width: 40px;
|
158 |
+
max-height: 32px;
|
159 |
+
}
|
160 |
+
|
161 |
+
.media-item .startopen,
|
162 |
+
.media-item .startclosed {
|
163 |
+
display: none;
|
164 |
+
}
|
165 |
+
|
166 |
+
.media-item .original {
|
167 |
+
position: relative;
|
168 |
+
height: 34px;
|
169 |
+
}
|
170 |
+
|
171 |
+
.media-item .progress {
|
172 |
+
float: right;
|
173 |
+
height: 22px;
|
174 |
+
margin: 6px 10px 0 0;
|
175 |
+
width: 200px;
|
176 |
+
line-height: 2em;
|
177 |
+
padding: 0;
|
178 |
+
overflow: hidden;
|
179 |
+
margin-bottom: 2px;
|
180 |
+
border: 1px solid #d1d1d1;
|
181 |
+
background: #f7f7f7;
|
182 |
+
background-image: -webkit-gradient(linear, left bottom, left top, from(#fff), to(#f7f7f7));
|
183 |
+
background-image: -webkit-linear-gradient(bottom, #fff, #f7f7f7);
|
184 |
+
background-image: -moz-linear-gradient(bottom, #fff, #f7f7f7);
|
185 |
+
background-image: -o-linear-gradient(bottom, #fff, #f7f7f7);
|
186 |
+
background-image: linear-gradient(to top, #fff, #f7f7f7);
|
187 |
+
-webkit-border-radius: 3px;
|
188 |
+
border-radius: 3px;
|
189 |
+
-webkit-box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
|
190 |
+
box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
|
191 |
+
}
|
192 |
+
|
193 |
+
.media-item .bar {
|
194 |
+
z-index: 9;
|
195 |
+
width: 0;
|
196 |
+
height: 100%;
|
197 |
+
margin-top: -24px;
|
198 |
+
background-color: #8cc1e9;
|
199 |
+
background-image: -webkit-gradient(linear, left bottom, left top, from(#72a7cf), to(#8cc1e9));
|
200 |
+
background-image: -webkit-linear-gradient(bottom, #72a7cf, #8cc1e9);
|
201 |
+
background-image: -moz-linear-gradient(bottom, #72a7cf, #8cc1e9);
|
202 |
+
background-image: -o-linear-gradient(bottom, #72a7cf, #8cc1e9);
|
203 |
+
background-image: linear-gradient(to top, #72a7cf, #8cc1e9);
|
204 |
+
-webkit-border-radius: 3px;
|
205 |
+
border-radius: 3px;
|
206 |
+
-webkit-box-shadow: 0 0 3px rgba(0,0,0,0.3);
|
207 |
+
box-shadow: 0 0 3px rgba(0,0,0,0.3);
|
208 |
+
}
|
209 |
+
|
210 |
+
.media-item .progress .percent {
|
211 |
+
z-index: 10;
|
212 |
+
position: relative;
|
213 |
+
width: 200px;
|
214 |
+
padding: 0 8px;
|
215 |
+
text-shadow: 0 1px 0 rgba(255,255,255,0.4);
|
216 |
+
color: rgba(0,0,0,0.6);
|
217 |
+
}
|
218 |
+
|
219 |
+
.upload-php .fixed .column-parent {
|
220 |
+
width: 15%;
|
221 |
+
}
|
222 |
+
|
223 |
+
.js .html-uploader #plupload-upload-ui {
|
224 |
+
display: none;
|
225 |
+
}
|
226 |
+
|
227 |
+
.js .html-uploader #html-upload-ui {
|
228 |
+
display: block;
|
229 |
+
}
|
230 |
+
|
231 |
+
.media-upload-form .media-item.error {
|
232 |
+
margin: 0;
|
233 |
+
padding: 0;
|
234 |
+
}
|
235 |
+
|
236 |
+
.media-upload-form .media-item.error p,
|
237 |
+
.media-item .error-div {
|
238 |
+
line-height: 16px;
|
239 |
+
margin: 5px 10px;
|
240 |
+
padding: 0;
|
241 |
+
}
|
242 |
+
|
243 |
+
.media-item .error-div a.dismiss {
|
244 |
+
display: block;
|
245 |
+
float: right;
|
246 |
+
margin: 5px 4px 0 15px;
|
247 |
+
}
|
248 |
+
|
249 |
+
/*------------------------------------------------------------------------------
|
250 |
+
14.1 - Media Library
|
251 |
+
------------------------------------------------------------------------------*/
|
252 |
+
|
253 |
+
.find-box {
|
254 |
+
width: 600px;
|
255 |
+
height: 300px;
|
256 |
+
overflow: hidden;
|
257 |
+
padding: 33px 0 51px;
|
258 |
+
position: absolute;
|
259 |
+
z-index: 1000;
|
260 |
+
}
|
261 |
+
|
262 |
+
.find-box-head {
|
263 |
+
cursor: move;
|
264 |
+
font-weight: bold;
|
265 |
+
height: 2em;
|
266 |
+
line-height: 2em;
|
267 |
+
padding: 1px 12px;
|
268 |
+
position: absolute;
|
269 |
+
top: 5px;
|
270 |
+
width: 100%;
|
271 |
+
}
|
272 |
+
|
273 |
+
.find-box-inside {
|
274 |
+
overflow: auto;
|
275 |
+
padding: 6px;
|
276 |
+
height: 100%;
|
277 |
+
}
|
278 |
+
|
279 |
+
.find-box-search {
|
280 |
+
overflow: hidden;
|
281 |
+
padding: 9px;
|
282 |
+
position: relative;
|
283 |
+
}
|
284 |
+
|
285 |
+
.find-box-search .spinner {
|
286 |
+
float: none;
|
287 |
+
left: 125px;
|
288 |
+
position: absolute;
|
289 |
+
top: 9px;
|
290 |
+
}
|
291 |
+
|
292 |
+
#find-posts-input {
|
293 |
+
float: left;
|
294 |
+
width: 140px;
|
295 |
+
height: 24px;
|
296 |
+
}
|
297 |
+
|
298 |
+
#find-posts-search {
|
299 |
+
float: left;
|
300 |
+
margin: 1px 4px 0 3px;
|
301 |
+
}
|
302 |
+
|
303 |
+
#find-posts-response {
|
304 |
+
margin: 8px 0;
|
305 |
+
padding: 0 1px 6px;
|
306 |
+
}
|
307 |
+
|
308 |
+
#find-posts-response table {
|
309 |
+
width: 100%;
|
310 |
+
}
|
311 |
+
|
312 |
+
#find-posts-response .found-radio {
|
313 |
+
padding: 3px 0 0 8px;
|
314 |
+
width: 15px;
|
315 |
+
}
|
316 |
+
|
317 |
+
.find-box-buttons {
|
318 |
+
padding: 8px;
|
319 |
+
overflow: hidden;
|
320 |
+
}
|
321 |
+
|
322 |
+
.find-box #resize-se {
|
323 |
+
position: absolute;
|
324 |
+
right: 1px;
|
325 |
+
bottom: 1px;
|
326 |
+
}
|
327 |
+
|
328 |
+
.ui-find-overlay {
|
329 |
+
position: absolute;
|
330 |
+
top: 0;
|
331 |
+
left: 0;
|
332 |
+
background-color: #000;
|
333 |
+
opacity: 0.6;
|
334 |
+
filter: alpha(opacity=60);
|
335 |
+
}
|
336 |
+
|
337 |
+
ul#dismissed-updates {
|
338 |
+
display: none;
|
339 |
+
}
|
340 |
+
|
341 |
+
form.upgrade {
|
342 |
+
margin-top: 8px;
|
343 |
+
}
|
344 |
+
|
345 |
+
form.upgrade .hint {
|
346 |
+
font-style: italic;
|
347 |
+
font-size: 85%;
|
348 |
+
margin: -0.5em 0 2em 0;
|
349 |
+
}
|
350 |
+
|
351 |
+
#poststuff .inside .the-tagcloud {
|
352 |
+
margin: 5px 0 10px;
|
353 |
+
padding: 8px;
|
354 |
+
border-width: 1px;
|
355 |
+
border-style: solid;
|
356 |
+
line-height: 1.8em;
|
357 |
+
word-spacing: 3px;
|
358 |
+
-webkit-border-radius: 6px;
|
359 |
+
border-radius: 6px;
|
360 |
+
}
|
361 |
+
|
362 |
+
.drag-drop #drag-drop-area {
|
363 |
+
border: 4px dashed #DDDDDD;
|
364 |
+
height: 200px;
|
365 |
+
}
|
366 |
+
|
367 |
+
.drag-drop .drag-drop-inside {
|
368 |
+
margin: 70px auto 0;
|
369 |
+
width: 250px;
|
370 |
+
}
|
371 |
+
|
372 |
+
.drag-drop-inside p {
|
373 |
+
color: #aaa;
|
374 |
+
font-size: 14px;
|
375 |
+
margin: 5px 0;
|
376 |
+
display: none;
|
377 |
+
}
|
378 |
+
|
379 |
+
.drag-drop .drag-drop-inside p {
|
380 |
+
text-align: center;
|
381 |
+
}
|
382 |
+
|
383 |
+
.drag-drop-inside p.drag-drop-info {
|
384 |
+
font-size: 20px;
|
385 |
+
}
|
386 |
+
|
387 |
+
.drag-drop .drag-drop-inside p,
|
388 |
+
.drag-drop-inside p.drag-drop-buttons {
|
389 |
+
display: block;
|
390 |
+
}
|
391 |
+
|
392 |
+
/*
|
393 |
+
#drag-drop-area:-moz-drag-over {
|
394 |
+
border-color: #83b4d8;
|
395 |
+
}
|
396 |
+
borger color while dragging a file over the uploader drop area */
|
397 |
+
.drag-drop.drag-over #drag-drop-area {
|
398 |
+
border-color: #83b4d8;
|
399 |
+
}
|
400 |
+
|
401 |
+
#plupload-upload-ui {
|
402 |
+
position: relative;
|
403 |
+
}
|
404 |
+
|
405 |
+
/*------------------------------------------------------------------------------
|
406 |
+
14.2 - Image Editor
|
407 |
+
------------------------------------------------------------------------------*/
|
408 |
+
|
409 |
+
.describe .image-editor {
|
410 |
+
vertical-align: top;
|
411 |
+
}
|
412 |
+
|
413 |
+
.imgedit-wrap {
|
414 |
+
position: relative;
|
415 |
+
}
|
416 |
+
|
417 |
+
.imgedit-settings p {
|
418 |
+
margin: 8px 0;
|
419 |
+
}
|
420 |
+
|
421 |
+
.post-php .imgedit-wrap table {
|
422 |
+
width: 100%;
|
423 |
+
}
|
424 |
+
|
425 |
+
.describe .imgedit-wrap table td,
|
426 |
+
.wp_attachment_holder .imgedit-wrap table td {
|
427 |
+
vertical-align: top;
|
428 |
+
padding-top: 0;
|
429 |
+
}
|
430 |
+
|
431 |
+
.describe .imgedit-wrap table td.imgedit-settings {
|
432 |
+
padding: 0 5px;
|
433 |
+
}
|
434 |
+
|
435 |
+
.wp_attachment_holder .imgedit-wrap table td.imgedit-settings {
|
436 |
+
width: 250px;
|
437 |
+
}
|
438 |
+
|
439 |
+
td.imgedit-settings input {
|
440 |
+
margin-top: 0;
|
441 |
+
vertical-align: middle;
|
442 |
+
}
|
443 |
+
|
444 |
+
.imgedit-wait {
|
445 |
+
position: absolute;
|
446 |
+
top: 0;
|
447 |
+
background: #fff url(../../../../../../wp-admin/images/wpspin_light.gif) no-repeat scroll 22px 10px;
|
448 |
+
background-size: 16px 16px;
|
449 |
+
opacity: 0.7;
|
450 |
+
filter: alpha(opacity=70);
|
451 |
+
width: 100%;
|
452 |
+
height: 500px;
|
453 |
+
display: none;
|
454 |
+
}
|
455 |
+
|
456 |
+
.spinner {
|
457 |
+
background: url(../../../../../../wp-admin/images/wpspin_light.gif) no-repeat;
|
458 |
+
background-size: 16px 16px;
|
459 |
+
display: none;
|
460 |
+
float: right;
|
461 |
+
opacity: 0.7;
|
462 |
+
filter: alpha(opacity=70);
|
463 |
+
width: 16px;
|
464 |
+
height: 16px;
|
465 |
+
margin: 5px 5px 0;
|
466 |
+
}
|
467 |
+
|
468 |
+
.no-float {
|
469 |
+
float: none;
|
470 |
+
}
|
471 |
+
|
472 |
+
.media-disabled,
|
473 |
+
.imgedit-settings .disabled {
|
474 |
+
color: grey;
|
475 |
+
}
|
476 |
+
|
477 |
+
.wp_attachment_image,
|
478 |
+
.A1B1 {
|
479 |
+
overflow: hidden;
|
480 |
+
}
|
481 |
+
|
482 |
+
.wp_attachment_image .button,
|
483 |
+
.A1B1 .button {
|
484 |
+
float: left;
|
485 |
+
}
|
486 |
+
|
487 |
+
.no-js .wp_attachment_image .button {
|
488 |
+
display: none;
|
489 |
+
}
|
490 |
+
|
491 |
+
.wp_attachment_image .spinner,
|
492 |
+
.A1B1 .spinner {
|
493 |
+
float: left;
|
494 |
+
padding: 0 4px 4px;
|
495 |
+
vertical-align: bottom;
|
496 |
+
}
|
497 |
+
|
498 |
+
.imgedit-menu {
|
499 |
+
margin: 0 0 12px;
|
500 |
+
min-width: 300px;
|
501 |
+
}
|
502 |
+
|
503 |
+
.imgedit-menu div {
|
504 |
+
float: left;
|
505 |
+
width: 32px;
|
506 |
+
height: 32px;
|
507 |
+
}
|
508 |
+
|
509 |
+
.imgedit-crop-wrap {
|
510 |
+
position: relative;
|
511 |
+
}
|
512 |
+
|
513 |
+
.imgedit-crop {
|
514 |
+
background: transparent url('../../../../../../wp-admin/images/imgedit-icons.png') no-repeat scroll -9px -31px;
|
515 |
+
margin: 0 8px 0 0;
|
516 |
+
}
|
517 |
+
|
518 |
+
.imgedit-crop.disabled:hover {
|
519 |
+
background-position: -9px -31px;
|
520 |
+
}
|
521 |
+
|
522 |
+
.imgedit-crop:hover {
|
523 |
+
background-position: -9px -1px;
|
524 |
+
}
|
525 |
+
|
526 |
+
.imgedit-rleft {
|
527 |
+
background: transparent url('../../../../../../wp-admin/images/imgedit-icons.png') no-repeat scroll -46px -31px;
|
528 |
+
margin: 0 3px;
|
529 |
+
}
|
530 |
+
|
531 |
+
.imgedit-rleft.disabled:hover {
|
532 |
+
background-position: -46px -31px;
|
533 |
+
}
|
534 |
+
|
535 |
+
.imgedit-rleft:hover {
|
536 |
+
background-position: -46px -1px;
|
537 |
+
}
|
538 |
+
|
539 |
+
.imgedit-rright {
|
540 |
+
background: transparent url('../../../../../../wp-admin/images/imgedit-icons.png') no-repeat scroll -77px -31px;
|
541 |
+
margin: 0 8px 0 3px;
|
542 |
+
}
|
543 |
+
|
544 |
+
.imgedit-rright.disabled:hover {
|
545 |
+
background-position: -77px -31px;
|
546 |
+
}
|
547 |
+
|
548 |
+
.imgedit-rright:hover {
|
549 |
+
background-position: -77px -1px;
|
550 |
+
}
|
551 |
+
|
552 |
+
.imgedit-flipv {
|
553 |
+
background: transparent url('../../../../../../wp-admin/images/imgedit-icons.png') no-repeat scroll -115px -31px;
|
554 |
+
margin: 0 3px;
|
555 |
+
}
|
556 |
+
|
557 |
+
.imgedit-flipv.disabled:hover {
|
558 |
+
background-position: -115px -31px;
|
559 |
+
}
|
560 |
+
|
561 |
+
.imgedit-flipv:hover {
|
562 |
+
background-position: -115px -1px;
|
563 |
+
}
|
564 |
+
|
565 |
+
.imgedit-fliph {
|
566 |
+
background: transparent url('../../../../../../wp-admin/images/imgedit-icons.png') no-repeat scroll -147px -31px;
|
567 |
+
margin: 0 8px 0 3px;
|
568 |
+
}
|
569 |
+
|
570 |
+
.imgedit-fliph.disabled:hover {
|
571 |
+
background-position: -147px -31px;
|
572 |
+
}
|
573 |
+
|
574 |
+
.imgedit-fliph:hover {
|
575 |
+
background-position: -147px -1px;
|
576 |
+
}
|
577 |
+
|
578 |
+
.imgedit-undo {
|
579 |
+
background: transparent url('../../../../../../wp-admin/images/imgedit-icons.png') no-repeat scroll -184px -31px;
|
580 |
+
margin: 0 3px;
|
581 |
+
}
|
582 |
+
|
583 |
+
.imgedit-undo.disabled:hover {
|
584 |
+
background-position: -184px -31px;
|
585 |
+
}
|
586 |
+
|
587 |
+
.imgedit-undo:hover {
|
588 |
+
background-position: -184px -1px;
|
589 |
+
}
|
590 |
+
|
591 |
+
.imgedit-redo {
|
592 |
+
background: transparent url('../../../../../../wp-admin/images/imgedit-icons.png') no-repeat scroll -215px -31px;
|
593 |
+
margin: 0 8px 0 3px;
|
594 |
+
}
|
595 |
+
|
596 |
+
.imgedit-redo.disabled:hover {
|
597 |
+
background-position: -215px -31px;
|
598 |
+
}
|
599 |
+
|
600 |
+
.imgedit-redo:hover {
|
601 |
+
background-position: -215px -1px;
|
602 |
+
}
|
603 |
+
|
604 |
+
.imgedit-applyto img {
|
605 |
+
margin: 0 8px 0 0;
|
606 |
+
}
|
607 |
+
|
608 |
+
.imgedit-group {
|
609 |
+
h3 {
|
610 |
+
font-size: 18px;
|
611 |
+
}
|
612 |
+
|
613 |
+
.dashicons {
|
614 |
+
border: 0;
|
615 |
+
line-height: 1.2;
|
616 |
+
}
|
617 |
+
}
|
618 |
+
|
619 |
+
.imgedit-group-top {
|
620 |
+
margin: 5px 0;
|
621 |
+
}
|
622 |
+
|
623 |
+
.imgedit-applyto .imgedit-label {
|
624 |
+
padding: 2px 0 0;
|
625 |
+
display: block;
|
626 |
+
}
|
627 |
+
|
628 |
+
.imgedit-help {
|
629 |
+
display: none;
|
630 |
+
font-style: italic;
|
631 |
+
margin-bottom: 8px;
|
632 |
+
}
|
633 |
+
|
634 |
+
a.imgedit-help-toggle {
|
635 |
+
text-decoration: none;
|
636 |
+
}
|
637 |
+
|
638 |
+
.form-table td.imgedit-response {
|
639 |
+
padding: 0;
|
640 |
+
}
|
641 |
+
|
642 |
+
.imgedit-submit {
|
643 |
+
margin: 8px 0;
|
644 |
+
}
|
645 |
+
|
646 |
+
.imgedit-submit-btn {
|
647 |
+
margin-left: 20px;
|
648 |
+
}
|
649 |
+
|
650 |
+
.imgedit-wrap .nowrap {
|
651 |
+
white-space: nowrap;
|
652 |
+
}
|
653 |
+
|
654 |
+
span.imgedit-scale-warn {
|
655 |
+
color: red;
|
656 |
+
font-size: 20px;
|
657 |
+
font-style: normal;
|
658 |
+
visibility: hidden;
|
659 |
+
vertical-align: middle;
|
660 |
+
}
|
661 |
+
|
662 |
+
.wp_attachment_details {
|
663 |
+
margin-bottom: 20px;
|
664 |
+
}
|
665 |
+
|
666 |
+
.imgedit-menu div {
|
667 |
+
border-color: #d5d5d5;
|
668 |
+
background-color: #f1f1f1;
|
669 |
+
}
|
670 |
+
|
671 |
+
.imgedit-menu div:hover {
|
672 |
+
border-color: #c1c1c1;
|
673 |
+
background-color: #eaeaea;
|
674 |
+
}
|
675 |
+
|
676 |
+
.imgedit-menu div.disabled {
|
677 |
+
border-color: #ccc;
|
678 |
+
background-color: #ddd;
|
679 |
+
filter: alpha(opacity=50);
|
680 |
+
opacity: 0.5;
|
681 |
+
}
|
682 |
+
|
683 |
+
/*------------------------------------------------------------------------------
|
684 |
+
Custom Styles
|
685 |
+
------------------------------------------------------------------------------*/
|
686 |
+
|
687 |
+
.bp-media-image-editor-cotnainer { margin-top : 35px; }
|
688 |
+
.wp_attachment_image .bp-media-image-edit { float: left; }
|
689 |
+
.wp_attachment_image .spinner { display: none; }
|
690 |
+
.bp-media-image-editor-cotnainer .hidden { display: none; }
|
691 |
+
.bp-media-image-editor-cotnainer div.updated {
|
692 |
+
margin: 5px 0 15px;
|
693 |
+
background-color: #ffffe0;
|
694 |
+
border-color: #e6db55;
|
695 |
+
padding: 0 .6em;
|
696 |
+
-webkit-border-radius: 3px;
|
697 |
+
border-radius: 3px;
|
698 |
+
border-width: 1px;
|
699 |
+
border-style: solid;
|
700 |
+
}
|
701 |
+
|
702 |
+
.bp-media-image-editor-cotnainer div.updated p { margin: .5em 0;padding: 2px; }
|
app/assets/css/sass/_magnific.scss
ADDED
@@ -0,0 +1,494 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Magnific Popup CSS */
|
2 |
+
.mfp-bg {
|
3 |
+
top: 0;
|
4 |
+
left: 0;
|
5 |
+
width: 100%;
|
6 |
+
height: 100%;
|
7 |
+
z-index: 104211;
|
8 |
+
overflow: hidden;
|
9 |
+
position: fixed;
|
10 |
+
background: rgba($black, 0.9);
|
11 |
+
}
|
12 |
+
|
13 |
+
.mfp-wrap {
|
14 |
+
top: 0;
|
15 |
+
left: 0;
|
16 |
+
width: 100%;
|
17 |
+
height: 100%;
|
18 |
+
z-index: 104311;
|
19 |
+
position: fixed;
|
20 |
+
outline: none !important;
|
21 |
+
-webkit-backface-visibility: hidden;
|
22 |
+
}
|
23 |
+
|
24 |
+
.mfp-container {
|
25 |
+
text-align: center;
|
26 |
+
position: absolute;
|
27 |
+
width: 100%;
|
28 |
+
max-width: 84%;
|
29 |
+
margin: 0 auto;
|
30 |
+
right: 0;
|
31 |
+
height: 100%;
|
32 |
+
left: 0;
|
33 |
+
top: 0;
|
34 |
+
padding: 0 8px;
|
35 |
+
|
36 |
+
-webkit-box-sizing: border-box;
|
37 |
+
-moz-box-sizing: border-box;
|
38 |
+
box-sizing: border-box;
|
39 |
+
|
40 |
+
&:before {
|
41 |
+
content: ' ';
|
42 |
+
display: inline-block;
|
43 |
+
height: 100%;
|
44 |
+
vertical-align: middle;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
.mfp-align-top .mfp-container:before {
|
49 |
+
display: none;
|
50 |
+
}
|
51 |
+
|
52 |
+
.mfp-content {
|
53 |
+
position: relative;
|
54 |
+
display: inline-block;
|
55 |
+
vertical-align: middle;
|
56 |
+
margin: 0 auto;
|
57 |
+
text-align: left;
|
58 |
+
z-index: 1045;
|
59 |
+
}
|
60 |
+
|
61 |
+
.mfp-inline-holder .mfp-content,
|
62 |
+
.mfp-ajax-holder .mfp-content {
|
63 |
+
width: 100%;
|
64 |
+
cursor: auto;
|
65 |
+
}
|
66 |
+
|
67 |
+
.mfp-ajax-cur {
|
68 |
+
cursor: progress;
|
69 |
+
}
|
70 |
+
|
71 |
+
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
|
72 |
+
cursor: -moz-zoom-out;
|
73 |
+
cursor: -webkit-zoom-out;
|
74 |
+
cursor: zoom-out;
|
75 |
+
}
|
76 |
+
|
77 |
+
.mfp-zoom {
|
78 |
+
cursor: pointer;
|
79 |
+
cursor: -webkit-zoom-in;
|
80 |
+
cursor: -moz-zoom-in;
|
81 |
+
cursor: zoom-in;
|
82 |
+
}
|
83 |
+
|
84 |
+
.mfp-auto-cursor .mfp-content {
|
85 |
+
cursor: auto;
|
86 |
+
}
|
87 |
+
|
88 |
+
.mfp-close,
|
89 |
+
.mfp-arrow,
|
90 |
+
.mfp-preloader,
|
91 |
+
.mfp-counter {
|
92 |
+
-webkit-user-select: none;
|
93 |
+
-moz-user-select: none;
|
94 |
+
user-select: none;
|
95 |
+
}
|
96 |
+
|
97 |
+
.mfp-loading.mfp-figure {
|
98 |
+
display: none;
|
99 |
+
}
|
100 |
+
|
101 |
+
.mfp-hide {
|
102 |
+
display: none !important;
|
103 |
+
}
|
104 |
+
|
105 |
+
.mfp-s-ready .mfp-preloader {
|
106 |
+
display: none;
|
107 |
+
}
|
108 |
+
|
109 |
+
.mfp-s-error .mfp-content {
|
110 |
+
display: none;
|
111 |
+
}
|
112 |
+
|
113 |
+
button.mfp-close, button.mfp-arrow {
|
114 |
+
overflow: visible;
|
115 |
+
cursor: pointer;
|
116 |
+
background: transparent;
|
117 |
+
border: 0;
|
118 |
+
-webkit-appearance: none;
|
119 |
+
display: block;
|
120 |
+
outline: none;
|
121 |
+
padding: 0;
|
122 |
+
z-index: 1046;
|
123 |
+
-webkit-box-shadow: none;
|
124 |
+
box-shadow: none;
|
125 |
+
}
|
126 |
+
|
127 |
+
button::-moz-focus-inner {
|
128 |
+
padding: 0;
|
129 |
+
border: 0;
|
130 |
+
}
|
131 |
+
|
132 |
+
.mfp-close {
|
133 |
+
background: $white;
|
134 |
+
color: #999;
|
135 |
+
cursor: pointer;
|
136 |
+
font-size: 24px;
|
137 |
+
font-style: normal;
|
138 |
+
height: 30px;
|
139 |
+
line-height: 30px;
|
140 |
+
padding: 0;
|
141 |
+
position: absolute;
|
142 |
+
right: 1px;
|
143 |
+
text-align: center;
|
144 |
+
text-decoration: none;
|
145 |
+
text-indent: 2px;
|
146 |
+
top: 0;
|
147 |
+
width: 32px;
|
148 |
+
z-index: 12;
|
149 |
+
}
|
150 |
+
|
151 |
+
.mfp-close:hover,
|
152 |
+
.mfp-close:focus {
|
153 |
+
opacity: 1;
|
154 |
+
filter: alpha(opacity=100);
|
155 |
+
}
|
156 |
+
|
157 |
+
.mfp-close:active {
|
158 |
+
top: 1px;
|
159 |
+
}
|
160 |
+
|
161 |
+
.mfp-image-holder .mfp-close,
|
162 |
+
.mfp-iframe-holder .mfp-close {
|
163 |
+
color: #FFF;
|
164 |
+
right: -6px;
|
165 |
+
text-align: right;
|
166 |
+
padding-right: 6px;
|
167 |
+
width: 100%;
|
168 |
+
}
|
169 |
+
|
170 |
+
.mfp-counter {
|
171 |
+
position: absolute;
|
172 |
+
top: 0;
|
173 |
+
right: 0;
|
174 |
+
color: #CCC;
|
175 |
+
font-size: 12px;
|
176 |
+
line-height: 18px;
|
177 |
+
white-space: nowrap;
|
178 |
+
}
|
179 |
+
|
180 |
+
.mfp-arrow {
|
181 |
+
cursor: pointer;
|
182 |
+
position: absolute;
|
183 |
+
opacity: 0.65;
|
184 |
+
filter: alpha(opacity=65);
|
185 |
+
margin: 0;
|
186 |
+
top: 50%;
|
187 |
+
margin-top: -55px;
|
188 |
+
padding: 0;
|
189 |
+
width: 90px;
|
190 |
+
height: 110px;
|
191 |
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
192 |
+
opacity: 0;
|
193 |
+
z-index: 10;
|
194 |
+
@include transition(all 300ms ease-out);
|
195 |
+
|
196 |
+
.rtm-single-media:hover & {
|
197 |
+
opacity: 1;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
.mfp-arrow:active {
|
202 |
+
margin-top: -54px;
|
203 |
+
}
|
204 |
+
|
205 |
+
.mfp-arrow:hover,
|
206 |
+
.mfp-arrow:focus {
|
207 |
+
opacity: 1;
|
208 |
+
filter: alpha(opacity=100);
|
209 |
+
}
|
210 |
+
|
211 |
+
.mfp-arrow:before,
|
212 |
+
.mfp-arrow:after,
|
213 |
+
.mfp-arrow .mfp-b,
|
214 |
+
.mfp-arrow .mfp-a {
|
215 |
+
content: '';
|
216 |
+
display: block;
|
217 |
+
width: 0;
|
218 |
+
height: 0;
|
219 |
+
position: absolute;
|
220 |
+
left: 0;
|
221 |
+
top: 0;
|
222 |
+
margin-top: 35px;
|
223 |
+
margin-left: 35px;
|
224 |
+
border: medium inset transparent;
|
225 |
+
}
|
226 |
+
|
227 |
+
.mfp-arrow:after,
|
228 |
+
.mfp-arrow .mfp-a {
|
229 |
+
border-top-width: 13px;
|
230 |
+
border-bottom-width: 13px;
|
231 |
+
top: 8px;
|
232 |
+
}
|
233 |
+
|
234 |
+
.mfp-arrow:before,
|
235 |
+
.mfp-arrow .mfp-b {
|
236 |
+
border-top-width: 21px;
|
237 |
+
border-bottom-width: 21px;
|
238 |
+
opacity: 0.7;
|
239 |
+
}
|
240 |
+
|
241 |
+
.mfp-arrow-left {
|
242 |
+
left: 0;
|
243 |
+
}
|
244 |
+
|
245 |
+
.mfp-arrow-left:after,
|
246 |
+
.mfp-arrow-left .mfp-a {
|
247 |
+
border-right: 17px solid #FFF;
|
248 |
+
margin-left: 31px;
|
249 |
+
}
|
250 |
+
|
251 |
+
.mfp-arrow-left:before,
|
252 |
+
.mfp-arrow-left .mfp-b {
|
253 |
+
margin-left: 25px;
|
254 |
+
border-right: 27px solid #3F3F3F;
|
255 |
+
}
|
256 |
+
|
257 |
+
.mfp-arrow-right {
|
258 |
+
right: 0;
|
259 |
+
}
|
260 |
+
|
261 |
+
.mfp-arrow-right:after,
|
262 |
+
.mfp-arrow-right .mfp-a {
|
263 |
+
border-left: 17px solid #FFF;
|
264 |
+
margin-left: 39px;
|
265 |
+
}
|
266 |
+
|
267 |
+
.mfp-arrow-right:before,
|
268 |
+
.mfp-arrow-right .mfp-b {
|
269 |
+
border-left: 27px solid #3F3F3F;
|
270 |
+
}
|
271 |
+
|
272 |
+
.mfp-iframe-holder {
|
273 |
+
padding-top: 40px;
|
274 |
+
padding-bottom: 40px;
|
275 |
+
}
|
276 |
+
|
277 |
+
.mfp-iframe-holder .mfp-content {
|
278 |
+
line-height: 0;
|
279 |
+
width: 100%;
|
280 |
+
max-width: 900px;
|
281 |
+
}
|
282 |
+
|
283 |
+
.mfp-iframe-holder .mfp-close {
|
284 |
+
top: -40px;
|
285 |
+
}
|
286 |
+
|
287 |
+
.mfp-iframe-scaler {
|
288 |
+
width: 100%;
|
289 |
+
height: 0;
|
290 |
+
overflow: hidden;
|
291 |
+
padding-top: 56.25%;
|
292 |
+
}
|
293 |
+
|
294 |
+
.mfp-iframe-scaler iframe {
|
295 |
+
position: absolute;
|
296 |
+
display: block;
|
297 |
+
top: 0;
|
298 |
+
left: 0;
|
299 |
+
width: 100%;
|
300 |
+
height: 100%;
|
301 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
302 |
+
background: #000;
|
303 |
+
}
|
304 |
+
|
305 |
+
/* Main image in popup */
|
306 |
+
img.mfp-img {
|
307 |
+
width: auto;
|
308 |
+
max-width: 100%;
|
309 |
+
height: auto;
|
310 |
+
display: block;
|
311 |
+
line-height: 0;
|
312 |
+
-webkit-box-sizing: border-box;
|
313 |
+
-moz-box-sizing: border-box;
|
314 |
+
box-sizing: border-box;
|
315 |
+
padding: 40px 0 40px;
|
316 |
+
margin: 0 auto;
|
317 |
+
}
|
318 |
+
|
319 |
+
/* The shadow behind the image */
|
320 |
+
.mfp-figure {
|
321 |
+
line-height: 0;
|
322 |
+
}
|
323 |
+
|
324 |
+
.mfp-figure:after {
|
325 |
+
content: '';
|
326 |
+
position: absolute;
|
327 |
+
left: 0;
|
328 |
+
top: 40px;
|
329 |
+
bottom: 40px;
|
330 |
+
display: block;
|
331 |
+
right: 0;
|
332 |
+
width: auto;
|
333 |
+
height: auto;
|
334 |
+
z-index: -1;
|
335 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
336 |
+
background: #444;
|
337 |
+
}
|
338 |
+
|
339 |
+
.mfp-figure small {
|
340 |
+
color: #BDBDBD;
|
341 |
+
display: block;
|
342 |
+
font-size: 12px;
|
343 |
+
line-height: 14px;
|
344 |
+
}
|
345 |
+
|
346 |
+
.mfp-figure figure {
|
347 |
+
margin: 0;
|
348 |
+
}
|
349 |
+
|
350 |
+
.mfp-bottom-bar {
|
351 |
+
margin-top: -36px;
|
352 |
+
position: absolute;
|
353 |
+
top: 100%;
|
354 |
+
left: 0;
|
355 |
+
width: 100%;
|
356 |
+
cursor: auto;
|
357 |
+
}
|
358 |
+
|
359 |
+
.mfp-title {
|
360 |
+
text-align: left;
|
361 |
+
line-height: 18px;
|
362 |
+
color: #F3F3F3;
|
363 |
+
word-wrap: break-word;
|
364 |
+
padding-right: 36px;
|
365 |
+
}
|
366 |
+
|
367 |
+
.mfp-image-holder .mfp-content {
|
368 |
+
max-width: 100%;
|
369 |
+
}
|
370 |
+
|
371 |
+
.mfp-gallery .mfp-image-holder .mfp-figure {
|
372 |
+
cursor: pointer;
|
373 |
+
}
|
374 |
+
|
375 |
+
.mfp-preloader {
|
376 |
+
position: absolute;
|
377 |
+
top: 50%;
|
378 |
+
left: 0;
|
379 |
+
right: 0;
|
380 |
+
margin-top: -36px;
|
381 |
+
z-index: 1044;
|
382 |
+
|
383 |
+
font-size: 0;
|
384 |
+
width: 36px;
|
385 |
+
height: 36px;
|
386 |
+
margin-left: auto;
|
387 |
+
margin-right: auto;
|
388 |
+
|
389 |
+
&:before {
|
390 |
+
content: 'Loading…';
|
391 |
+
position: absolute;
|
392 |
+
width: 30px;
|
393 |
+
height: 30px;
|
394 |
+
}
|
395 |
+
|
396 |
+
// The :not(:required) pseudo class makes sure Internet Exlorer 8 and 9 will show the text "Loading…" as they don't support CSS animations.
|
397 |
+
&:not(:required):before {
|
398 |
+
content: '';
|
399 |
+
border-radius: 50%;
|
400 |
+
border: 3px solid rgba($white, .27);
|
401 |
+
border-top-color: rgba($white, .9);
|
402 |
+
animation: spinner .6s linear infinite;
|
403 |
+
-webkit-animation: spinner .6s linear infinite;
|
404 |
+
}
|
405 |
+
}
|
406 |
+
|
407 |
+
@keyframes spinner {
|
408 |
+
to {transform: rotate(360deg);}
|
409 |
+
}
|
410 |
+
|
411 |
+
@-webkit-keyframes spinner {
|
412 |
+
to {-webkit-transform: rotate(360deg);}
|
413 |
+
}
|
414 |
+
|
415 |
+
|
416 |
+
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
417 |
+
/**
|
418 |
+
* Remove all paddings around the image on small screen
|
419 |
+
*/
|
420 |
+
|
421 |
+
.mfp-img-mobile .mfp-image-holder {
|
422 |
+
padding-left: 0;
|
423 |
+
padding-right: 0;
|
424 |
+
}
|
425 |
+
|
426 |
+
.mfp-img-mobile img.mfp-img {
|
427 |
+
padding: 0;
|
428 |
+
}
|
429 |
+
|
430 |
+
.mfp-img-mobile .mfp-figure:after {
|
431 |
+
top: 0;
|
432 |
+
bottom: 0;
|
433 |
+
}
|
434 |
+
|
435 |
+
.mfp-img-mobile .mfp-figure small {
|
436 |
+
display: inline;
|
437 |
+
margin-left: 5px;
|
438 |
+
}
|
439 |
+
|
440 |
+
.mfp-img-mobile .mfp-bottom-bar {
|
441 |
+
background: rgba(0, 0, 0, 0.6);
|
442 |
+
bottom: 0;
|
443 |
+
margin: 0;
|
444 |
+
top: auto;
|
445 |
+
padding: 3px 5px;
|
446 |
+
position: fixed;
|
447 |
+
-webkit-box-sizing: border-box;
|
448 |
+
-moz-box-sizing: border-box;
|
449 |
+
box-sizing: border-box;
|
450 |
+
}
|
451 |
+
|
452 |
+
.mfp-img-mobile .mfp-bottom-bar:empty {
|
453 |
+
padding: 0;
|
454 |
+
}
|
455 |
+
|
456 |
+
.mfp-img-mobile .mfp-counter {
|
457 |
+
right: 5px;
|
458 |
+
top: 3px;
|
459 |
+
}
|
460 |
+
|
461 |
+
.mfp-img-mobile .mfp-close {
|
462 |
+
top: 0;
|
463 |
+
right: 0;
|
464 |
+
width: 35px;
|
465 |
+
height: 35px;
|
466 |
+
line-height: 35px;
|
467 |
+
background: rgba(0, 0, 0, 0.6);
|
468 |
+
position: fixed;
|
469 |
+
text-align: center;
|
470 |
+
padding: 0;
|
471 |
+
}
|
472 |
+
}
|
473 |
+
|
474 |
+
@media all and (max-width: 900px) {
|
475 |
+
.mfp-arrow {
|
476 |
+
-webkit-transform: scale(0.75);
|
477 |
+
transform: scale(0.75);
|
478 |
+
}
|
479 |
+
|
480 |
+
.mfp-arrow-left {
|
481 |
+
-webkit-transform-origin: 0;
|
482 |
+
transform-origin: 0;
|
483 |
+
}
|
484 |
+
|
485 |
+
.mfp-arrow-right {
|
486 |
+
-webkit-transform-origin: 100%;
|
487 |
+
transform-origin: 100%;
|
488 |
+
}
|
489 |
+
|
490 |
+
.mfp-container {
|
491 |
+
padding-left: 6px;
|
492 |
+
padding-right: 6px;
|
493 |
+
}
|
494 |
+
}
|
app/assets/css/sass/_media-element.scss
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#buddypress {
|
2 |
+
|
3 |
+
.mejs-controls {
|
4 |
+
|
5 |
+
button {
|
6 |
+
padding: 4px 8px;
|
7 |
+
border: none;
|
8 |
+
background: rgba(0, 0, 0, 0) url('../../../lib/media-element/controls.png') no-repeat;
|
9 |
+
}
|
10 |
+
|
11 |
+
.mejs-play {
|
12 |
+
button {
|
13 |
+
background-position: 0 0;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
.mejs-pause {
|
18 |
+
button {
|
19 |
+
background-position: 0 -16px;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
.mejs-unmute {
|
24 |
+
button {
|
25 |
+
background-position: -16px 0;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
.mejs-mute {
|
30 |
+
button {
|
31 |
+
background-position: -16px -16px;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
.mejs-fullscreen-button {
|
36 |
+
button {
|
37 |
+
background-position: -32px 0;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
.mejs-unfullscreen {
|
42 |
+
button {
|
43 |
+
background-position: -32px -16px;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
.mejs-container .mejs-controls .mejs-time {
|
50 |
+
padding: 10px 3px 0;
|
51 |
+
}
|
app/assets/css/sass/_media-tab.scss
ADDED
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtm-media-gallery-uploader {
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
+
|
5 |
+
.drag-drop {
|
6 |
+
border: 4px dashed #DDD;
|
7 |
+
text-align: center;
|
8 |
+
background: #fafafa;
|
9 |
+
overflow: hidden;
|
10 |
+
color: #AAAAAA;
|
11 |
+
margin-top: 20px;
|
12 |
+
padding: 25px 0;
|
13 |
+
|
14 |
+
&.dragover {
|
15 |
+
border-color: #83b4d8;
|
16 |
+
}
|
17 |
+
|
18 |
+
.drag-drop-info {
|
19 |
+
font-size: 20px;
|
20 |
+
line-height: 24px;
|
21 |
+
}
|
22 |
+
|
23 |
+
.rtm-select-files {
|
24 |
+
span {
|
25 |
+
vertical-align: middle;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
.rtm-seperator {
|
30 |
+
margin: 0px 20px;
|
31 |
+
}
|
32 |
+
|
33 |
+
.start-media-upload {
|
34 |
+
display: none;
|
35 |
+
margin-top: 20px;
|
36 |
+
}
|
37 |
+
|
38 |
+
.rtm-file-size-limit {
|
39 |
+
vertical-align: middle;
|
40 |
+
font-size: 16px;
|
41 |
+
line-height: 24px;
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
.rtm-uploader-main-wrapper {
|
46 |
+
.rtm-uploader-tabs {
|
47 |
+
margin-bottom: 10px;
|
48 |
+
text-align: left;
|
49 |
+
}
|
50 |
+
ul{
|
51 |
+
border-bottom: 1px solid #CCC;
|
52 |
+
}
|
53 |
+
li{
|
54 |
+
margin: 0 0 -1px 10px;
|
55 |
+
display: inline-block;
|
56 |
+
padding: 5px 10px;
|
57 |
+
line-height: 25px;
|
58 |
+
background-color: #e4e4e4;
|
59 |
+
border: 1px solid #CCC;
|
60 |
+
&.active{
|
61 |
+
background: transparent;
|
62 |
+
border-left: 1px solid #CCC;
|
63 |
+
border-top: 1px solid #CCC;
|
64 |
+
border-right: 1px solid #CCC;
|
65 |
+
border-bottom: 1px solid #fafafa;
|
66 |
+
}
|
67 |
+
&:hover{
|
68 |
+
cursor: pointer;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
.rtmedia-container .rtmedia-list {
|
74 |
+
|
75 |
+
margin: 10px -5px;
|
76 |
+
|
77 |
+
.rtmedia-list-item {
|
78 |
+
float: left;
|
79 |
+
margin: 5px;
|
80 |
+
position: relative;
|
81 |
+
|
82 |
+
& > a {
|
83 |
+
display: block;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
.rtmedia_time {
|
88 |
+
background-color: #000;
|
89 |
+
color: #fff;
|
90 |
+
display: inline-block;
|
91 |
+
font-size: 11px;
|
92 |
+
font-weight: bold;
|
93 |
+
line-height: 14px;
|
94 |
+
opacity: 0.75;
|
95 |
+
padding: 0 4px;
|
96 |
+
position: absolute;
|
97 |
+
right: 2px;
|
98 |
+
top: 2px;
|
99 |
+
}
|
100 |
+
|
101 |
+
img {
|
102 |
+
vertical-align: top;
|
103 |
+
}
|
104 |
+
|
105 |
+
.rtmedia-item-title {
|
106 |
+
h4 {
|
107 |
+
color: $gray;
|
108 |
+
font-size: 12px;
|
109 |
+
font-weight: normal;
|
110 |
+
margin: 5px 0 0;
|
111 |
+
overflow: hidden;
|
112 |
+
text-align: center;
|
113 |
+
text-overflow: ellipsis;
|
114 |
+
white-space: nowrap;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
.rtm-load-more {
|
120 |
+
background: $light;
|
121 |
+
text-align: center;
|
122 |
+
|
123 |
+
.rtmedia-container & a {
|
124 |
+
border: 0;
|
125 |
+
padding: 10px 0;
|
126 |
+
}
|
127 |
+
|
128 |
+
.rtm-media-loading {
|
129 |
+
padding: 10px 0;
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
.rtm-media-options {
|
134 |
+
line-height: 1.4;
|
135 |
+
margin-bottom: 10px;
|
136 |
+
|
137 |
+
& > div {
|
138 |
+
display: inline-block;
|
139 |
+
cursor: pointer;
|
140 |
+
}
|
141 |
+
|
142 |
+
.rtm-media-options-list {
|
143 |
+
margin-right: 10px;
|
144 |
+
padding-right: 10px;
|
145 |
+
position: relative;
|
146 |
+
|
147 |
+
&:after {
|
148 |
+
background: #999;
|
149 |
+
content: ' ';
|
150 |
+
bottom: 3px;
|
151 |
+
position: absolute;
|
152 |
+
height: 14px;
|
153 |
+
right: 0;
|
154 |
+
width: 1px;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
.dashicons {
|
159 |
+
font-size: inherit;
|
160 |
+
line-height: 1.6;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
.rtmedia-upload-media-link {
|
165 |
+
cursor: pointer;
|
166 |
+
}
|
167 |
+
|
168 |
+
|
169 |
+
.rtm-album-privacy {
|
170 |
+
span {
|
171 |
+
font-size: 16px;
|
172 |
+
display: inline-block;
|
173 |
+
margin: 0 20px 20px 20px;
|
174 |
+
vertical-align: top;
|
175 |
+
}
|
176 |
+
|
177 |
+
label {
|
178 |
+
margin-right: 8px;
|
179 |
+
}
|
180 |
+
|
181 |
+
.dashicons {
|
182 |
+
font-size: 16px;
|
183 |
+
line-height: 1.5;
|
184 |
+
margin-right: 5px;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
#rtm-media-options-list {
|
189 |
+
.rtmedia-delete-album {
|
190 |
+
background: transparent;
|
191 |
+
border: 0;
|
192 |
+
color: $white;
|
193 |
+
font-family: inherit;
|
194 |
+
font-size: inherit;
|
195 |
+
font-weight: inherit;
|
196 |
+
padding: 0;
|
197 |
+
text-transform: inherit;
|
198 |
+
|
199 |
+
&:hover {
|
200 |
+
background: transparent;
|
201 |
+
border: 0;
|
202 |
+
color: $white;
|
203 |
+
}
|
204 |
+
}
|
205 |
+
}
|
app/assets/css/sass/_popup.scss
ADDED
@@ -0,0 +1,439 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Additional Styles
|
2 |
+
.mfp-content {
|
3 |
+
.rtm-lightbox-container {
|
4 |
+
background: $black;
|
5 |
+
margin: 0 auto;
|
6 |
+
position: relative;
|
7 |
+
}
|
8 |
+
|
9 |
+
.rtm-single-meta {
|
10 |
+
background: $white;
|
11 |
+
overflow: hidden;
|
12 |
+
padding: 20px 20px 110px;
|
13 |
+
position: relative;
|
14 |
+
vertical-align: top;
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
18 |
+
|
19 |
+
.rtm-single-media {
|
20 |
+
overflow: hidden; // Safari 1px issue
|
21 |
+
position: relative;
|
22 |
+
text-align: center;
|
23 |
+
vertical-align: middle;
|
24 |
+
|
25 |
+
.mejs-container {
|
26 |
+
margin: 0 auto;
|
27 |
+
max-width: inherit;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
.rtm-ltb-action-container {
|
32 |
+
background-color: rgba($black, 0.6);
|
33 |
+
bottom: 0;
|
34 |
+
color: $white;
|
35 |
+
//height: 38px;
|
36 |
+
line-height: 38px;
|
37 |
+
opacity: 0;
|
38 |
+
padding: 0 10px;
|
39 |
+
position: absolute;
|
40 |
+
width: 100%;
|
41 |
+
@include transition(all 300ms ease-out);
|
42 |
+
|
43 |
+
|
44 |
+
.rtm-single-media:hover & {
|
45 |
+
opacity: 1;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
#buddypress #rtmedia-single-media-container.rtmedia-single-media {
|
50 |
+
.button {
|
51 |
+
background: transparent;
|
52 |
+
border: 0 none;
|
53 |
+
border-radius: 2px;
|
54 |
+
color: rgba($white, 0.5);
|
55 |
+
display: block;
|
56 |
+
font-family: inherit;
|
57 |
+
font-weight: normal;
|
58 |
+
line-height: 24px;
|
59 |
+
margin: 0;
|
60 |
+
padding: 0 6px;
|
61 |
+
text-shadow: 0 0 0;
|
62 |
+
text-transform: none;
|
63 |
+
|
64 |
+
&:hover {
|
65 |
+
background: rgba($white, .2);
|
66 |
+
color: rgba($white, 0.8);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
.rtm-options .button {
|
71 |
+
color: #333;
|
72 |
+
margin: 0 auto;
|
73 |
+
padding: 0 4px 0 0;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
#buddypress #rtm-media-options-list {
|
78 |
+
.rtm-options {
|
79 |
+
.button {
|
80 |
+
background: transparent;
|
81 |
+
border: 0 none;
|
82 |
+
border-radius: 2px;
|
83 |
+
color: rgba($white, 0.5);
|
84 |
+
float: left;
|
85 |
+
font-family: inherit;
|
86 |
+
font-weight: normal;
|
87 |
+
line-height: 24px;
|
88 |
+
padding: 0 6px;
|
89 |
+
text-shadow: 0 0 0;
|
90 |
+
text-transform: none;
|
91 |
+
}
|
92 |
+
|
93 |
+
.rtmedia-delete-favlist {
|
94 |
+
color: $white;
|
95 |
+
padding: 0;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
.rtm-options {
|
101 |
+
|
102 |
+
&.rtm-options {
|
103 |
+
background: $gray;
|
104 |
+
color: $white;
|
105 |
+
display: none;
|
106 |
+
font-size: 14px;
|
107 |
+
list-style: none;
|
108 |
+
margin: 0;
|
109 |
+
padding: 8px 10px;
|
110 |
+
position: absolute;
|
111 |
+
left: 0;
|
112 |
+
top: 38px;
|
113 |
+
width: 180px;
|
114 |
+
z-index: 10;
|
115 |
+
}
|
116 |
+
|
117 |
+
li {
|
118 |
+
margin: 0; // 2012
|
119 |
+
overflow: hidden; // clear float
|
120 |
+
padding: 2px 0;
|
121 |
+
}
|
122 |
+
|
123 |
+
.rtm-media-options & {
|
124 |
+
&:after {
|
125 |
+
bottom: 100%;
|
126 |
+
left: 20px;
|
127 |
+
border: solid transparent;
|
128 |
+
content: ' ';
|
129 |
+
height: 0;
|
130 |
+
width: 0;
|
131 |
+
position: absolute;
|
132 |
+
pointer-events: none;
|
133 |
+
border-color: rgba(255, 255, 255, 0);
|
134 |
+
border-bottom-color: $gray;
|
135 |
+
border-width: 6px;
|
136 |
+
margin-left: -6px;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
.mfp-content & {
|
141 |
+
background: $white;
|
142 |
+
color: #333;
|
143 |
+
bottom: 38px;
|
144 |
+
right: 0;
|
145 |
+
left: auto;
|
146 |
+
top: auto;
|
147 |
+
|
148 |
+
&:after {
|
149 |
+
top: 100%;
|
150 |
+
right: 22px;
|
151 |
+
border: solid transparent;
|
152 |
+
content: ' ';
|
153 |
+
height: 0;
|
154 |
+
width: 0;
|
155 |
+
position: absolute;
|
156 |
+
pointer-events: none;
|
157 |
+
border-color: rgba(255, 255, 255, 0);
|
158 |
+
border-top-color: $white;
|
159 |
+
border-width: 6px;
|
160 |
+
margin-left: -6px;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
.dashicons {
|
165 |
+
font-size: 14px;
|
166 |
+
line-height: 24px;
|
167 |
+
margin-right: 2px;
|
168 |
+
}
|
169 |
+
|
170 |
+
.rtm-media-options & a {
|
171 |
+
border: 0;
|
172 |
+
color: #fff;
|
173 |
+
display: block;
|
174 |
+
text-decoration: none; // 2012
|
175 |
+
}
|
176 |
+
}
|
177 |
+
|
178 |
+
.rtm-ltb-title {
|
179 |
+
color: rgba($white, 0.7);
|
180 |
+
float: left;
|
181 |
+
font-size: 13px;
|
182 |
+
|
183 |
+
a {
|
184 |
+
color: inherit;
|
185 |
+
|
186 |
+
&:hover {
|
187 |
+
border-bottom: 1px dotted;
|
188 |
+
color: $white;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
.rtm-item-actions {
|
194 |
+
float: right;
|
195 |
+
|
196 |
+
& > div,
|
197 |
+
& > form {
|
198 |
+
float: left;
|
199 |
+
margin: 0 2px;
|
200 |
+
padding: 7px 0;
|
201 |
+
position: relative;
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
.rtmedia-media {
|
206 |
+
img {
|
207 |
+
display: inline-block;
|
208 |
+
max-height: inherit;
|
209 |
+
height: auto; // Theme 2014/2013
|
210 |
+
max-width: 100%; // Theme 2014/2013
|
211 |
+
width: auto;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
.rtm-user-meta-details {
|
216 |
+
.username {
|
217 |
+
font-size: 16px;
|
218 |
+
line-height: 1;
|
219 |
+
margin-bottom: 6px;
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
.userprofile {
|
224 |
+
float: left;
|
225 |
+
margin: 0 16px 16px 0;
|
226 |
+
max-width: 54px;
|
227 |
+
|
228 |
+
a {
|
229 |
+
display: block;
|
230 |
+
}
|
231 |
+
|
232 |
+
img {
|
233 |
+
height: auto; // Theme 2014/2013
|
234 |
+
max-width: 100%; // Theme 2014/2013
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
.rtm-time-privacy {
|
239 |
+
color: #999;
|
240 |
+
font-size: 12px;
|
241 |
+
|
242 |
+
.dashicons {
|
243 |
+
font-size: 14px;
|
244 |
+
line-height: 1.5;
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
.rtmedia-actions-before-comments {
|
249 |
+
|
250 |
+
& > span {
|
251 |
+
float: left;
|
252 |
+
margin-right: 10px;
|
253 |
+
}
|
254 |
+
|
255 |
+
.rtmedia-comment-link,
|
256 |
+
#buddypress & .rtmedia-like {
|
257 |
+
border: 0;
|
258 |
+
font-size: 13px;
|
259 |
+
font-weight: normal;
|
260 |
+
line-height: 2;
|
261 |
+
padding: 0;
|
262 |
+
text-transform: none;
|
263 |
+
|
264 |
+
&:hover {
|
265 |
+
background: transparent;
|
266 |
+
}
|
267 |
+
}
|
268 |
+
}
|
269 |
+
|
270 |
+
.rtmedia-comment-user-pic {
|
271 |
+
float: left;
|
272 |
+
margin-right: 10px;
|
273 |
+
max-width: 36px;
|
274 |
+
|
275 |
+
img {
|
276 |
+
height: auto; // Theme 2014/2013
|
277 |
+
max-width: 100%; // Theme 2014/2013
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
.rtm-like-comments-info {
|
282 |
+
position: relative;
|
283 |
+
|
284 |
+
&:after {
|
285 |
+
bottom: 100%;
|
286 |
+
left: 15px;
|
287 |
+
border: solid transparent;
|
288 |
+
content: " ";
|
289 |
+
height: 0;
|
290 |
+
width: 0;
|
291 |
+
position: absolute;
|
292 |
+
pointer-events: none;
|
293 |
+
border-color: rgba(237, 239, 244, 0);
|
294 |
+
border-bottom-color: #edeff4;
|
295 |
+
border-width: 4px;
|
296 |
+
margin-left: -4px;
|
297 |
+
}
|
298 |
+
}
|
299 |
+
|
300 |
+
.rtm-comment-list {
|
301 |
+
|
302 |
+
&.rtm-comment-list {
|
303 |
+
list-style: none;
|
304 |
+
margin: 0;
|
305 |
+
padding: 0;
|
306 |
+
}
|
307 |
+
|
308 |
+
li {
|
309 |
+
background: #edeff4;
|
310 |
+
font-size: 12px;
|
311 |
+
margin-bottom: 1px;
|
312 |
+
padding: 10px;
|
313 |
+
position: relative;
|
314 |
+
|
315 |
+
&:hover {
|
316 |
+
.rtmedia-delete-comment {
|
317 |
+
opacity: 1;
|
318 |
+
}
|
319 |
+
}
|
320 |
+
}
|
321 |
+
|
322 |
+
.rtmedia-no-comments {
|
323 |
+
margin: 0; // 2012
|
324 |
+
padding: 5px 10px;
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
.rtmedia-like-info {
|
329 |
+
background: #edeff4;
|
330 |
+
font-size: 12px;
|
331 |
+
margin-bottom: 1px;
|
332 |
+
padding: 5px 10px;
|
333 |
+
position: relative;
|
334 |
+
}
|
335 |
+
|
336 |
+
.rtm-comment-wrap {
|
337 |
+
overflow: hidden;
|
338 |
+
|
339 |
+
.rtmedia-comment-author {
|
340 |
+
font-weight: 700;
|
341 |
+
}
|
342 |
+
|
343 |
+
.rtmedia-comment-date {
|
344 |
+
color: #999;
|
345 |
+
font-size: 11px;
|
346 |
+
}
|
347 |
+
}
|
348 |
+
|
349 |
+
.rtmedia-comment-content {
|
350 |
+
margin-top: 2px;
|
351 |
+
}
|
352 |
+
|
353 |
+
.rtmedia-delete-comment {
|
354 |
+
color: #999;
|
355 |
+
cursor: pointer;
|
356 |
+
font-size: 16px;
|
357 |
+
opacity: 0;
|
358 |
+
position: absolute;
|
359 |
+
right: 5px;
|
360 |
+
top: 5px;
|
361 |
+
}
|
362 |
+
|
363 |
+
.rtmedia-comment-content {
|
364 |
+
p {
|
365 |
+
margin: 0;
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
.rtmedia-comment-details {
|
370 |
+
line-height: 1.5;
|
371 |
+
margin-top: -3px;
|
372 |
+
}
|
373 |
+
|
374 |
+
.rtmedia-item-comments {
|
375 |
+
textarea {
|
376 |
+
font-size: 14px;
|
377 |
+
padding: 4px;
|
378 |
+
}
|
379 |
+
}
|
380 |
+
|
381 |
+
.rtm-media-single-comments {
|
382 |
+
background-color: #edeff4;
|
383 |
+
bottom: 20px;
|
384 |
+
padding: 10px;
|
385 |
+
position: absolute;
|
386 |
+
width: calc(100% - 40px);
|
387 |
+
|
388 |
+
textarea {
|
389 |
+
font-size: 12px;
|
390 |
+
line-height: 14px;
|
391 |
+
max-height: 40px;
|
392 |
+
min-height: 30px;
|
393 |
+
padding: 4px;
|
394 |
+
}
|
395 |
+
}
|
396 |
+
|
397 |
+
.rtmedia-popup {
|
398 |
+
background: $white;
|
399 |
+
margin: 20px auto;
|
400 |
+
max-width: 600px;
|
401 |
+
padding: 20px;
|
402 |
+
position: relative;
|
403 |
+
width: auto;
|
404 |
+
|
405 |
+
.rtm-modal-title {
|
406 |
+
font-size: 24px;
|
407 |
+
margin-bottom: 20px;
|
408 |
+
margin-top: 0;
|
409 |
+
}
|
410 |
+
|
411 |
+
label {
|
412 |
+
display: block;
|
413 |
+
margin-bottom: 5px;
|
414 |
+
}
|
415 |
+
}
|
416 |
+
|
417 |
+
#rtm-modal-container {
|
418 |
+
p {
|
419 |
+
margin-bottom: 10px;
|
420 |
+
}
|
421 |
+
}
|
422 |
+
|
423 |
+
#rtm-mejs-video-container {
|
424 |
+
margin: 0 auto;
|
425 |
+
}
|
426 |
+
|
427 |
+
.rtmedia-media-name {
|
428 |
+
float: left;
|
429 |
+
max-width: 140px;
|
430 |
+
overflow: hidden;
|
431 |
+
text-align: left;
|
432 |
+
text-overflow: ellipsis;
|
433 |
+
white-space: nowrap;
|
434 |
+
}
|
435 |
+
|
436 |
+
.rtm-single-media.rtm-media-type-video {
|
437 |
+
padding-bottom: 40px;
|
438 |
+
padding-top: 40px;
|
439 |
+
}
|
app/assets/css/sass/_responsive.scss
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@media #{$large-up} {
|
2 |
+
|
3 |
+
.mfp-content {
|
4 |
+
|
5 |
+
.rtm-lightbox-container {
|
6 |
+
display: table;
|
7 |
+
|
8 |
+
// Fixed issue in Firefox and Opera
|
9 |
+
table-layout: fixed;
|
10 |
+
width: 100%;
|
11 |
+
}
|
12 |
+
|
13 |
+
.rtm-single-media {
|
14 |
+
display: table-cell;
|
15 |
+
width: 66.6667%;
|
16 |
+
}
|
17 |
+
|
18 |
+
.rtm-single-meta {
|
19 |
+
display: table-cell;
|
20 |
+
width: 33.3333%;
|
21 |
+
}
|
22 |
+
|
23 |
+
.rtmedia-item-comments {
|
24 |
+
max-height: 330px;
|
25 |
+
overflow-x: hidden;
|
26 |
+
overflow-y: auto;
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
30 |
+
}
|
app/assets/css/sass/_rtl.scss
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtl {
|
2 |
+
#rtSelectPrivacy {
|
3 |
+
float: left;
|
4 |
+
}
|
5 |
+
|
6 |
+
.rtmedia-plupload-container {
|
7 |
+
float: right;
|
8 |
+
}
|
9 |
+
|
10 |
+
.rtm-upload-button-wrapper {
|
11 |
+
float: right;
|
12 |
+
}
|
13 |
+
|
14 |
+
#whats-new-post-in-box {
|
15 |
+
float: right;
|
16 |
+
}
|
17 |
+
|
18 |
+
.describe-toggle-off {
|
19 |
+
float: left;
|
20 |
+
}
|
21 |
+
|
22 |
+
.media-item .pinkynail {
|
23 |
+
float: right;
|
24 |
+
}
|
25 |
+
|
26 |
+
.media-item .progress {
|
27 |
+
float: left;
|
28 |
+
}
|
29 |
+
|
30 |
+
.media-item .error-div a.dismiss {
|
31 |
+
float: left;
|
32 |
+
}
|
33 |
+
|
34 |
+
#find-posts-input {
|
35 |
+
float: right;
|
36 |
+
}
|
37 |
+
|
38 |
+
#find-posts-search {
|
39 |
+
float: right;
|
40 |
+
}
|
41 |
+
|
42 |
+
.spinner {
|
43 |
+
float: left;
|
44 |
+
}
|
45 |
+
|
46 |
+
.wp_attachment_image .button, .A1B1 .button {
|
47 |
+
float: right;
|
48 |
+
}
|
49 |
+
|
50 |
+
.wp_attachment_image .spinner, .A1B1 .spinner {
|
51 |
+
float: right;
|
52 |
+
}
|
53 |
+
|
54 |
+
.imgedit-menu div {
|
55 |
+
float: right;
|
56 |
+
}
|
57 |
+
|
58 |
+
.wp_attachment_image .bp-media-image-edit {
|
59 |
+
float: right;
|
60 |
+
}
|
61 |
+
|
62 |
+
.rtmedia-container .rtmedia-list {
|
63 |
+
.rtmedia-list-item {
|
64 |
+
float: right;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
#buddypress #rtm-media-options-list {
|
69 |
+
.rtm-options {
|
70 |
+
.button {
|
71 |
+
float: right;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
.rtm-ltb-title {
|
77 |
+
float: right;
|
78 |
+
}
|
79 |
+
|
80 |
+
.rtm-item-actions {
|
81 |
+
float: left;
|
82 |
+
}
|
83 |
+
|
84 |
+
.rtm-item-actions {
|
85 |
+
& > div, & > form {
|
86 |
+
float: right;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
.userprofile {
|
91 |
+
float: right;
|
92 |
+
}
|
93 |
+
|
94 |
+
.rtmedia-actions-before-comments {
|
95 |
+
& > span {
|
96 |
+
float: right;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
.rtmedia-comment-user-pic {
|
101 |
+
float: right;
|
102 |
+
}
|
103 |
+
|
104 |
+
.rtmedia-media-name {
|
105 |
+
float: right;
|
106 |
+
}
|
107 |
+
|
108 |
+
#rtmedia-uploader-form .rtm-plupload-list, #rtmedia_uploader_filelist {
|
109 |
+
li {
|
110 |
+
float: right;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
.rtm-page-number {
|
115 |
+
float: right;
|
116 |
+
.rtmedia-page-link {
|
117 |
+
float: right;
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
.rtm-pagination {
|
122 |
+
float: right;
|
123 |
+
.rtm-paginate {
|
124 |
+
float: left;
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
.rtm-tabs {
|
129 |
+
li {
|
130 |
+
float: right;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
.alignleft {
|
135 |
+
float: right;
|
136 |
+
}
|
137 |
+
|
138 |
+
.alignright {
|
139 |
+
float: left;
|
140 |
+
}
|
141 |
+
}
|
app/assets/css/sass/_rtmedia.scss
ADDED
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// rtMedia Defaults
|
2 |
+
|
3 |
+
.rtmedia-container {
|
4 |
+
-webkit-box-sizing: border-box;
|
5 |
+
-moz-box-sizing: border-box;
|
6 |
+
box-sizing: border-box;
|
7 |
+
|
8 |
+
* {
|
9 |
+
&,
|
10 |
+
&:before,
|
11 |
+
&:after {
|
12 |
+
-webkit-box-sizing: inherit;
|
13 |
+
-moz-box-sizing: inherit;
|
14 |
+
box-sizing: inherit;
|
15 |
+
}
|
16 |
+
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
.rtmedia-list {
|
22 |
+
|
23 |
+
// Increased specificity with double class to overwrite defualt styles. 2012
|
24 |
+
&.rtmedia-list {
|
25 |
+
list-style: none;
|
26 |
+
margin: 0; // theme 2015/2014
|
27 |
+
padding: 0; // theme 2013
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
.rtmedia-list-item > a {
|
32 |
+
border: 0;
|
33 |
+
display: inline-block;
|
34 |
+
text-decoration: none; // 2012
|
35 |
+
|
36 |
+
&:focus {
|
37 |
+
outline: 0; // theme 2015
|
38 |
+
}
|
39 |
+
|
40 |
+
& + p {
|
41 |
+
display: none;
|
42 |
+
}
|
43 |
+
|
44 |
+
.rtmedia-item-thumbnail {
|
45 |
+
img {
|
46 |
+
display: inline-block; // Remove extra white space below image.
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
// Uploader
|
52 |
+
#rtmedia-uploader-form .rtm-plupload-list, #rtmedia_uploader_filelist {
|
53 |
+
list-style: none;
|
54 |
+
margin-left: -4px;
|
55 |
+
margin-right: -4px;
|
56 |
+
padding-left: 0;
|
57 |
+
padding-top: 10px;
|
58 |
+
|
59 |
+
li {
|
60 |
+
background: $light;
|
61 |
+
float: left;
|
62 |
+
margin: 4px;
|
63 |
+
max-width: 110px;
|
64 |
+
padding: 5px;
|
65 |
+
position: relative;
|
66 |
+
|
67 |
+
&.upload-error {
|
68 |
+
border: 1px solid red;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
img {
|
73 |
+
max-width: 100%;
|
74 |
+
}
|
75 |
+
|
76 |
+
canvas {
|
77 |
+
display: block;
|
78 |
+
max-width: 100%;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
.rtm-plupload-list {
|
83 |
+
&:empty {
|
84 |
+
display: none;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
.rtmedia-uploader-div,
|
89 |
+
.rtmedia-uploader {
|
90 |
+
clear: both;
|
91 |
+
}
|
92 |
+
|
93 |
+
button#rtmedia-add-media-button-post-update {
|
94 |
+
padding: 3px 6px;
|
95 |
+
|
96 |
+
.dashicons {
|
97 |
+
font-size: 18px;
|
98 |
+
line-height: 20px;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
.plupload_file_name {
|
103 |
+
font-size: 11px;
|
104 |
+
font-weight: bold;
|
105 |
+
line-height: 1.2;
|
106 |
+
overflow: hidden;
|
107 |
+
text-overflow: ellipsis;
|
108 |
+
white-space: nowrap;
|
109 |
+
}
|
110 |
+
|
111 |
+
.plupload_file_size {
|
112 |
+
color: #666;
|
113 |
+
font-size: 10px;
|
114 |
+
}
|
115 |
+
|
116 |
+
.plupload_file_action {
|
117 |
+
background: $light;
|
118 |
+
position: absolute;
|
119 |
+
height: 18px;
|
120 |
+
right: 0;
|
121 |
+
top: 0;
|
122 |
+
width: 18px;
|
123 |
+
z-index: 10;
|
124 |
+
|
125 |
+
.dashicons {
|
126 |
+
color: $error;
|
127 |
+
cursor: pointer;
|
128 |
+
font-size: 16px;
|
129 |
+
height: 18px;
|
130 |
+
padding: 2px 1px;
|
131 |
+
width: 18px;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
.plupload_file_status {
|
136 |
+
height: 8px;
|
137 |
+
overflow: hidden;
|
138 |
+
position: relative;
|
139 |
+
}
|
140 |
+
|
141 |
+
.plupload_file_progress {
|
142 |
+
background: $success;
|
143 |
+
height: 4px;
|
144 |
+
position: absolute;
|
145 |
+
top: 0;
|
146 |
+
}
|
147 |
+
|
148 |
+
.rtm-form {
|
149 |
+
.rtm-field-wrap {
|
150 |
+
margin-bottom: 20px;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
// Pagination
|
155 |
+
.rtmedia_next_prev {
|
156 |
+
padding: 0 10px;
|
157 |
+
}
|
158 |
+
|
159 |
+
.rtm-page-number {
|
160 |
+
float: left;
|
161 |
+
|
162 |
+
.rtm-label {
|
163 |
+
line-height: 30px;
|
164 |
+
}
|
165 |
+
|
166 |
+
.rtm-label,
|
167 |
+
.rtm-go-to-num,
|
168 |
+
.rtmedia-page-link {
|
169 |
+
float: left;
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
.rtm-pagination {
|
174 |
+
|
175 |
+
background: transparent;
|
176 |
+
border: none;
|
177 |
+
color: #888;
|
178 |
+
font-size: small;
|
179 |
+
margin: 0;
|
180 |
+
position: relative;
|
181 |
+
display: block;
|
182 |
+
float: left;
|
183 |
+
width: 100%;
|
184 |
+
padding: 10px 0;
|
185 |
+
|
186 |
+
.rtm-paginate {
|
187 |
+
|
188 |
+
float: right;
|
189 |
+
font-size: 15px;
|
190 |
+
|
191 |
+
a, span {
|
192 |
+
display: inline-block;
|
193 |
+
line-height: 1;
|
194 |
+
margin: 0 2px;
|
195 |
+
padding: 8px;
|
196 |
+
text-decoration: none; //2012
|
197 |
+
}
|
198 |
+
|
199 |
+
a.rtmedia-page-link {
|
200 |
+
padding: 8px;
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
.dashicons {
|
205 |
+
font-size: 14px;
|
206 |
+
height: auto;
|
207 |
+
line-height: 1.2;
|
208 |
+
margin: 0;
|
209 |
+
padding: 0;
|
210 |
+
width: auto;
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
#rtmedia_go_to_num {
|
215 |
+
font-size: 16px;
|
216 |
+
margin: 0 5px;
|
217 |
+
padding: 4px 5px;
|
218 |
+
width: 80px;
|
219 |
+
}
|
220 |
+
|
221 |
+
.rtmedia-upload-not-allowed {
|
222 |
+
background-color: #fcf8e3;
|
223 |
+
border-bottom: 1px solid #EEE;
|
224 |
+
color: #c09853;
|
225 |
+
margin-bottom: 20px;
|
226 |
+
padding: 10px 15px;
|
227 |
+
}
|
228 |
+
|
229 |
+
.plupload_file_name {
|
230 |
+
position: relative;
|
231 |
+
|
232 |
+
.dashicons {
|
233 |
+
background: $light;
|
234 |
+
color: $error;
|
235 |
+
cursor: pointer;
|
236 |
+
font-size: 14px;
|
237 |
+
height: auto;
|
238 |
+
padding: 0 2px 0 5px;
|
239 |
+
position: absolute;
|
240 |
+
right: 0;
|
241 |
+
top: 0;
|
242 |
+
width: auto;
|
243 |
+
}
|
244 |
+
|
245 |
+
.dashicons-yes {
|
246 |
+
color: $success;
|
247 |
+
}
|
248 |
+
}
|
249 |
+
|
250 |
+
// Footer Link
|
251 |
+
.rtmedia-footer-link {
|
252 |
+
clear: both;
|
253 |
+
overflow: hidden;
|
254 |
+
padding: 16px 0;
|
255 |
+
position: relative;
|
256 |
+
text-align: center;
|
257 |
+
}
|
app/assets/css/sass/_tabs.scss
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rtm-tabs {
|
2 |
+
|
3 |
+
// Increased specificity with double class to overwrite defualt styles. 2012
|
4 |
+
&.rtm-tabs {
|
5 |
+
border-bottom: 1px solid $light;
|
6 |
+
list-style: none;
|
7 |
+
margin: 0 0 20px;
|
8 |
+
padding: 0;
|
9 |
+
}
|
10 |
+
|
11 |
+
li {
|
12 |
+
border: 1px solid $light;
|
13 |
+
border-bottom: 0;
|
14 |
+
float: left;
|
15 |
+
margin: 0 5px;
|
16 |
+
padding: 0; // 2013
|
17 |
+
}
|
18 |
+
|
19 |
+
a {
|
20 |
+
border: 0;
|
21 |
+
display: block;
|
22 |
+
padding: 5px 15px;
|
23 |
+
text-decoration: none; //2012
|
24 |
+
|
25 |
+
&:hover {
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
&:focus {
|
30 |
+
background: transparent;
|
31 |
+
box-shadow: 0 0 0;
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
.active {
|
37 |
+
position: relative;
|
38 |
+
|
39 |
+
&:after {
|
40 |
+
background: $white;
|
41 |
+
bottom: -1px;
|
42 |
+
content: ' ';
|
43 |
+
height: 1px;
|
44 |
+
left: 0;
|
45 |
+
position: absolute;
|
46 |
+
width: 100%;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
.dashicons {
|
51 |
+
font-size: 16px;
|
52 |
+
height: auto;
|
53 |
+
line-height: 2;
|
54 |
+
margin-right: 8px;
|
55 |
+
width: auto;
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
59 |
+
|
60 |
+
.rtmedia-edit-media-tabs {
|
61 |
+
.rtm-tabs {
|
62 |
+
a {
|
63 |
+
border-bottom: 0 none;
|
64 |
+
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
app/assets/css/sass/_utility.scss
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Alignleft
|
2 |
+
.alignleft {
|
3 |
+
float: left;
|
4 |
+
}
|
5 |
+
|
6 |
+
// Alignright
|
7 |
+
.alignright {
|
8 |
+
float: right;
|
9 |
+
}
|
10 |
+
|
11 |
+
// Aligncenter
|
12 |
+
.aligncenter {
|
13 |
+
display: block;
|
14 |
+
margin-left: auto;
|
15 |
+
margin-right: auto;
|
16 |
+
text-align: center;
|
17 |
+
}
|
18 |
+
|
19 |
+
// Clear Both
|
20 |
+
.clear-both {
|
21 |
+
clear: both;
|
22 |
+
}
|
23 |
+
|
24 |
+
// Clear None
|
25 |
+
.clear-none {
|
26 |
+
clear: none;
|
27 |
+
}
|
28 |
+
|
29 |
+
// Clear Left
|
30 |
+
.clear-left {
|
31 |
+
clear: left;
|
32 |
+
}
|
33 |
+
|
34 |
+
// Clear Right
|
35 |
+
.clear-right {
|
36 |
+
clear: right;
|
37 |
+
}
|
38 |
+
|
39 |
+
// inline-block
|
40 |
+
.rtm-inline-block {
|
41 |
+
display: inline-block;
|
42 |
+
}
|
43 |
+
|
44 |
+
// Text Left
|
45 |
+
.rtm-text-left {
|
46 |
+
text-align: left;
|
47 |
+
}
|
48 |
+
|
49 |
+
// Text Right
|
50 |
+
.rtm-text-right {
|
51 |
+
text-align: right;
|
52 |
+
}
|
53 |
+
|
54 |
+
// Text Center
|
55 |
+
.rtm-text-center {
|
56 |
+
text-align: center;
|
57 |
+
}
|
58 |
+
|
59 |
+
// Borders
|
60 |
+
.rtm-border-0 {
|
61 |
+
border: 0 !important;
|
62 |
+
}
|
63 |
+
|
64 |
+
.hide {
|
65 |
+
display: none;
|
66 |
+
}
|
67 |
+
|
68 |
+
.rtmedia-success {
|
69 |
+
background-color: #dff0d8;
|
70 |
+
border-bottom: 1px solid #e7e7e7;
|
71 |
+
color: #468847;
|
72 |
+
margin: 10px 0;
|
73 |
+
padding: 8px 14px 8px 14px;
|
74 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
75 |
+
}
|
76 |
+
|
77 |
+
/*------------------------------------*\
|
78 |
+
#CLEARFIX
|
79 |
+
\*------------------------------------*/
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Micro clearfix, as per: css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
|
83 |
+
* Extend the clearfix class with Sass to avoid the `.clearfix` class appearing
|
84 |
+
* over and over in your markup.
|
85 |
+
*/
|
86 |
+
|
87 |
+
.clearfix,
|
88 |
+
%clearfix {
|
89 |
+
|
90 |
+
&:after {
|
91 |
+
content: "";
|
92 |
+
display: table;
|
93 |
+
clear: both;
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
//
|
98 |
+
// @functions
|
99 |
+
//
|
100 |
+
|
101 |
+
|
102 |
+
// RANGES
|
103 |
+
// We use these functions to define ranges for various things, like media queries.
|
104 |
+
@function lower-bound($range){
|
105 |
+
@if length($range) <= 0 {
|
106 |
+
@return 0;
|
107 |
+
}
|
108 |
+
@return nth($range,1);
|
109 |
+
}
|
110 |
+
|
111 |
+
@function upper-bound($range) {
|
112 |
+
@if length($range) < 2 {
|
113 |
+
@return 999999999999;
|
114 |
+
}
|
115 |
+
@return nth($range, 2);
|
116 |
+
}
|
117 |
+
|
118 |
+
// Here we define the lower and upper bounds for each media size
|
119 |
+
$small-range: (0, 640px);
|
120 |
+
$medium-range: (641px, 1024px);
|
121 |
+
$large-range: (1025px, 1920px);
|
122 |
+
|
123 |
+
// Media Queries
|
124 |
+
$screen: "only screen" !default;
|
125 |
+
|
126 |
+
$landscape: "#{$screen} and (orientation: landscape)" !default;
|
127 |
+
$portrait: "#{$screen} and (orientation: portrait)" !default;
|
128 |
+
|
129 |
+
$small-up: $screen !default;
|
130 |
+
$small-only: "#{$screen} and (max-width: #{upper-bound($small-range)})" !default;
|
131 |
+
|
132 |
+
$medium-up: "#{$screen} and (min-width:#{lower-bound($medium-range)})" !default;
|
133 |
+
$medium-only: "#{$screen} and (min-width:#{lower-bound($medium-range)}) and (max-width:#{upper-bound($medium-range)})" !default;
|
134 |
+
|
135 |
+
$large-up: "#{$screen} and (min-width:#{lower-bound($large-range)})" !default;
|
136 |
+
$large-only: "#{$screen} and (min-width:#{lower-bound($large-range)}) and (max-width:#{upper-bound($large-range)})" !default;
|
app/assets/css/sass/_variables.scss
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// ***** Constant Variables ***** //
|
2 |
+
$black: #000000;
|
3 |
+
$white: #FFFFFF;
|
4 |
+
$dark : #222222;
|
5 |
+
$gray: #666666;
|
6 |
+
$light: #EEEEEE;
|
7 |
+
$light-extra: #f2f2f2;
|
8 |
+
$space: 26px;
|
9 |
+
|
10 |
+
$border: #e7e7e7;
|
11 |
+
$border-dark: #dedede;
|
12 |
+
|
13 |
+
$radius: 3px;
|
14 |
+
$rounded: 1000px;
|
15 |
+
$icon-font: 'dashicons';
|
16 |
+
|
17 |
+
// ***** Messages Colors ***** //
|
18 |
+
$notice: #BBBBBB;
|
19 |
+
$info: #2EA2CC;
|
20 |
+
$warning: #FFBA00;
|
21 |
+
$success: #7AD03A;
|
22 |
+
$error: #DD3D36;
|
23 |
+
|
24 |
+
// ***** Links ***** //
|
25 |
+
$link: #269ad6;
|
26 |
+
$link-hover: $link;
|
app/assets/css/sass/main.scss
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// *** This line Import Compass. *** //
|
2 |
+
@import "compass";
|
3 |
+
|
4 |
+
// *** CSS Variables *** //
|
5 |
+
@import "variables";
|
6 |
+
|
7 |
+
// *** Utility Classes *** //
|
8 |
+
@import "utility";
|
9 |
+
|
10 |
+
// *** BuddyPress Overwites *** //
|
11 |
+
@import "buddypress";
|
12 |
+
|
13 |
+
// *** rtMedia Defaults *** //
|
14 |
+
@import "rtmedia";
|
15 |
+
|
16 |
+
// *** Tabs *** //
|
17 |
+
@import "tabs";
|
18 |
+
|
19 |
+
// *** Default Magnific Popup *** //
|
20 |
+
@import "magnific";
|
21 |
+
|
22 |
+
// *** Customize Magnific Popup *** //
|
23 |
+
@import "popup";
|
24 |
+
|
25 |
+
// *** Activity *** //
|
26 |
+
@import "activity";
|
27 |
+
|
28 |
+
// *** Album *** //
|
29 |
+
@import "album";
|
30 |
+
|
31 |
+
// *** Image Edit *** //
|
32 |
+
@import "img-edit";
|
33 |
+
|
34 |
+
// *** Media Tab *** //
|
35 |
+
@import "media-tab";
|
36 |
+
|
37 |
+
// *** Media Element *** //
|
38 |
+
@import "media-element";
|
39 |
+
|
40 |
+
// *** Responsive *** //
|
41 |
+
@import "responsive";
|
42 |
+
|
43 |
+
// *** RTL *** //
|
44 |
+
@import "rtl";
|
app/assets/js/main.js
CHANGED
@@ -1,835 +1,5 @@
|
|
1 |
-
|
2 |
-
*
|
3 |
-
|
4 |
-
//Legacy media element for old activities
|
5 |
-
function
|
6 |
-
return false;
|
7 |
-
}
|
8 |
-
var $current;
|
9 |
-
//window.onbeforeunload= function() { return "Custom message here"; };
|
10 |
-
|
11 |
-
jQuery(document).ready(function() {
|
12 |
-
|
13 |
-
jQuery('body').on('mediapreview', '.bp_media_content video,.bp_media_content audio, video.bp-media-featured-media, audio.bp-media-featured-media', function() {
|
14 |
-
jQuery(this).mediaelementplayer({
|
15 |
-
enableKeyboard: false,
|
16 |
-
startVolume: 1,
|
17 |
-
// if the <video width> is not specified, this is the default
|
18 |
-
defaultVideoWidth: 480,
|
19 |
-
// if the <video height> is not specified, this is the default
|
20 |
-
defaultVideoHeight: 270,
|
21 |
-
// if set, overrides <video width>
|
22 |
-
videoWidth: 1,
|
23 |
-
// if set, overrides <video height>
|
24 |
-
videoHeight: 1,
|
25 |
-
success: function(mediaElement, domElement) {
|
26 |
-
var $thisMediaElement = (mediaElement.id) ? jQuery("#" + mediaElement.id) : jQuery(mediaElement);
|
27 |
-
$thisMediaElement.parents('.mejs-container').find(".mejs-volume-current").css("top", "8px");
|
28 |
-
$thisMediaElement.parents('.mejs-container').find(".mejs-volume-handle").css("top", "5px");
|
29 |
-
}
|
30 |
-
});
|
31 |
-
});
|
32 |
-
jQuery('.bp_media_content video,.bp_media_content audio, video.bp-media-featured-media, audio.bp-media-featured-media').trigger('mediapreview');
|
33 |
-
|
34 |
-
jQuery('ul#activity-stream').on('DOMNodeInserted', function() {
|
35 |
-
jQuery('ul#activity-stream .bp_media_content video,ul#activity-stream .bp_media_content audio').trigger('mediapreview');
|
36 |
-
});
|
37 |
-
var $id, $idtxt;
|
38 |
-
|
39 |
-
jQuery('body').on('click', '.bp-media-featured-media-button', function(e) {
|
40 |
-
e.preventDefault();
|
41 |
-
$idtxt = jQuery(this).closest('.bp-media-image').attr('id');
|
42 |
-
$id = $idtxt.replace('bp-media-id-', '');
|
43 |
-
data = {
|
44 |
-
'media_id': $id,
|
45 |
-
'action': 'bp_set_featured'
|
46 |
-
}
|
47 |
-
jQuery.get(ajaxurl, data, function(response) {
|
48 |
-
if ($id == response) {
|
49 |
-
jQuery('#' + $idtxt).find('.bp-media-featured-media-button').remove();
|
50 |
-
}
|
51 |
-
});
|
52 |
-
})
|
53 |
-
|
54 |
-
|
55 |
-
jQuery('#item-body').on('click', '#bp-media-upload-button', function() {
|
56 |
-
jQuery('#bp-media-move-merge-ui').slideUp();
|
57 |
-
jQuery('#bp-media-delete-ui').slideUp();
|
58 |
-
jQuery('#bp-media-list input').remove();
|
59 |
-
jQuery('#bp-media-show-more').attr('data-move', 0);
|
60 |
-
$parent = jQuery('.bp-media-album-actions');
|
61 |
-
$wrapper = jQuery('.bp-media-upload-wrapper');
|
62 |
-
$description = jQuery('.bp-media-album-description');
|
63 |
-
if ($parent.length > 0 && $wrapper.length <= 0) {
|
64 |
-
if ($description.length > 0)
|
65 |
-
$description.after('<div class="bp-media-action-wrapper bp-media-upload-wrapper"></div>');
|
66 |
-
else
|
67 |
-
$parent.after('<div class="bp-media-action-wrapper bp-media-upload-wrapper"></div>');
|
68 |
-
jQuery('#bp-media-upload-ui').appendTo('.bp-media-upload-wrapper');
|
69 |
-
}
|
70 |
-
jQuery('#bp-media-upload-ui').slideToggle();
|
71 |
-
});
|
72 |
-
|
73 |
-
jQuery('#item-body').on('click', '#bp-media-move-merge-button', function() {
|
74 |
-
jQuery('#bp-media-upload-ui').slideUp();
|
75 |
-
jQuery('#bp-media-delete-ui').slideUp();
|
76 |
-
$parent = jQuery('.bp-media-album-actions');
|
77 |
-
$wrapper = jQuery('.bp-media-move-merge-wrapper');
|
78 |
-
$description = jQuery('.bp-media-album-description');
|
79 |
-
if ($parent.length > 0 && $wrapper.length <= 0) {
|
80 |
-
if ($description.length > 0)
|
81 |
-
$description.after('<div class="bp-media-action-wrapper bp-media-move-merge-wrapper"></div>');
|
82 |
-
else
|
83 |
-
$parent.after('<div class="bp-media-action-wrapper bp-media-move-merge-wrapper"></div>');
|
84 |
-
jQuery('#bp-media-move-merge-ui').appendTo('.bp-media-move-merge-wrapper');
|
85 |
-
}
|
86 |
-
jQuery('#bp-media-move-merge-ui').slideToggle('slow', function() {
|
87 |
-
if (jQuery(this).css('display') == 'none' || jQuery('#bp-media-move-merge-select option:checked').val() == 'merge') {
|
88 |
-
jQuery('#bp-media-list input').remove();
|
89 |
-
jQuery('#bp-media-show-more').attr('data-move', 0);
|
90 |
-
} else if (!jQuery('#bp-media-list input').length) {
|
91 |
-
jQuery('#bp-media-show-more').attr('data-move', 1);
|
92 |
-
jQuery('#bp-media-list h3').each(function() {
|
93 |
-
$media_id = jQuery(this).parent().attr('id').replace('bp-media-item-', '');
|
94 |
-
jQuery(this).prepend('<input type="checkbox" name="move" value="' + $media_id + '" />');
|
95 |
-
});
|
96 |
-
}
|
97 |
-
});
|
98 |
-
});
|
99 |
-
|
100 |
-
jQuery('#item-body').on('click', '#bp-media-delete-button', function() {
|
101 |
-
jQuery('#bp-media-upload-ui').slideUp();
|
102 |
-
jQuery('#bp-media-move-merge-ui').slideUp();
|
103 |
-
$parent = jQuery('.bp-media-album-actions');
|
104 |
-
$wrapper = jQuery('.bp-media-delete-wrapper');
|
105 |
-
$description = jQuery('.bp-media-album-description');
|
106 |
-
if ($parent.length > 0 && $wrapper.length <= 0) {
|
107 |
-
if ($description.length > 0)
|
108 |
-
$description.after('<div class="bp-media-action-wrapper bp-media-delete-wrapper"></div>');
|
109 |
-
else
|
110 |
-
$parent.after('<div class="bp-media-action-wrapper bp-media-delete-wrapper"></div>');
|
111 |
-
jQuery('#bp-media-delete-ui').appendTo('.bp-media-delete-wrapper');
|
112 |
-
}
|
113 |
-
jQuery('#bp-media-delete-ui').slideToggle('slow', function() {
|
114 |
-
if (jQuery(this).css('display') == 'none') {
|
115 |
-
jQuery('#bp-media-list input').remove();
|
116 |
-
jQuery('#bp-media-show-more').attr('data-move', 0);
|
117 |
-
} else if (!jQuery('#bp-media-list input').length) {
|
118 |
-
jQuery('#bp-media-show-more').attr('data-move', 1);
|
119 |
-
jQuery('#bp-media-list h3').each(function() {
|
120 |
-
$media_id = jQuery(this).parent().attr('id').replace('bp-media-item-', '');
|
121 |
-
jQuery(this).prepend('<input type="checkbox" name="move" value="' + $media_id + '" />');
|
122 |
-
});
|
123 |
-
}
|
124 |
-
});
|
125 |
-
});
|
126 |
-
|
127 |
-
jQuery('.rtmedia-container').on('click', '.select-all', function(e) {
|
128 |
-
e.preventDefault();
|
129 |
-
jQuery('.rtmedia-list input').each(function() {
|
130 |
-
jQuery(this).prop('checked', true);
|
131 |
-
});
|
132 |
-
});
|
133 |
-
|
134 |
-
jQuery('.rtmedia-container').on('click', '.unselect-all', function(e) {
|
135 |
-
e.preventDefault();
|
136 |
-
jQuery('.rtmedia-list input').each(function() {
|
137 |
-
jQuery(this).prop('checked', false);
|
138 |
-
});
|
139 |
-
});
|
140 |
-
|
141 |
-
jQuery('#bp-media-move-merge-ui').on('change', '#bp-media-move-merge-select', function() {
|
142 |
-
$this = jQuery(this);
|
143 |
-
if ($this.val() == 'move') {
|
144 |
-
if (!jQuery('#bp-media-list input').length) {
|
145 |
-
jQuery('#bp-media-list h3').each(function() {
|
146 |
-
$media_id = jQuery(this).parent().attr('id').replace('bp-media-item-', '');
|
147 |
-
jQuery(this).prepend('<input type="checkbox" name="move" value="' + $media_id + '" />');
|
148 |
-
});
|
149 |
-
}
|
150 |
-
jQuery('#bp-media-show-more').attr('data-move', 1);
|
151 |
-
jQuery('.bp-media-move-selected-checks').fadeIn();
|
152 |
-
} else if ($this.val() == 'merge') {
|
153 |
-
jQuery('.bp-media-move-selected-checks').fadeOut();
|
154 |
-
jQuery('#bp-media-list input').remove();
|
155 |
-
jQuery('#bp-media-show-more').attr('data-move', 0)
|
156 |
-
}
|
157 |
-
});
|
158 |
-
|
159 |
-
jQuery('#bp-media-move-merge-ui').on('click', '#bp-media-move-merge-media', function() {
|
160 |
-
jQuery(this).siblings('.bp-media-ajax-spinner').show();
|
161 |
-
jQuery(this).prop('disabled', true);
|
162 |
-
jQuery(this).addClass('disabled');
|
163 |
-
$val = jQuery('#bp-media-move-merge-select option:checked').val();
|
164 |
-
if ($val == 'merge') {
|
165 |
-
if (confirm(bp_media_main_strings.merge_confirmation)) {
|
166 |
-
$delete_album = false;
|
167 |
-
// if ( jQuery('.bp-media-can-delete').length ) {
|
168 |
-
// if(confirm(bp_media_main_strings.delete_after_merge))
|
169 |
-
// $delete_album = true;
|
170 |
-
// }
|
171 |
-
$from = jQuery('#bp-media-selected-album').val();
|
172 |
-
$to = jQuery('.bp-media-selected-album-move-merge option:checked').val();
|
173 |
-
if ($from && $to) {
|
174 |
-
var data = {
|
175 |
-
action: 'bp_media_merge_album',
|
176 |
-
from: $from,
|
177 |
-
to: $to,
|
178 |
-
delete_album: $delete_album
|
179 |
-
};
|
180 |
-
jQuery.post(bp_media_vars.ajaxurl, data, function(response) {
|
181 |
-
if (response.length == 0) {
|
182 |
-
jQuery('.item-list-tabs:last').after('<div id="message" class="error"><p>' + bp_media_main_strings.something_went_wrong + '</p></div>');
|
183 |
-
} else if (response == 'redirect') {
|
184 |
-
window.location = window.location.href.replace($from, $to);
|
185 |
-
} else {
|
186 |
-
location.reload();
|
187 |
-
}
|
188 |
-
});
|
189 |
-
}
|
190 |
-
} else {
|
191 |
-
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
192 |
-
jQuery(this).prop('disabled', false);
|
193 |
-
jQuery(this).removeClass('disabled');
|
194 |
-
return false;
|
195 |
-
}
|
196 |
-
} else if ($val == 'move') {
|
197 |
-
$media = new Array();
|
198 |
-
jQuery('input:checkbox[name="move"]:checked').each(function() {
|
199 |
-
$media.push(jQuery(this).val());
|
200 |
-
});
|
201 |
-
if ($media.length) {
|
202 |
-
if (confirm(bp_media_main_strings.are_you_sure)) {
|
203 |
-
var data = {
|
204 |
-
action: 'bp_media_move_selected_media',
|
205 |
-
media: $media,
|
206 |
-
parent: jQuery('.bp-media-selected-album-move-merge option:checked').val()
|
207 |
-
};
|
208 |
-
jQuery.post(bp_media_vars.ajaxurl, data, function(response) {
|
209 |
-
if (response.length == 0) {
|
210 |
-
jQuery('.item-list-tabs:last').after('<div id="message" class="error"><p>' + bp_media_main_strings.something_went_wrong + '</p></div>');
|
211 |
-
} else {
|
212 |
-
location.reload();
|
213 |
-
}
|
214 |
-
});
|
215 |
-
} else {
|
216 |
-
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
217 |
-
jQuery(this).prop('disabled', false);
|
218 |
-
jQuery(this).removeClass('disabled');
|
219 |
-
}
|
220 |
-
} else {
|
221 |
-
alert(bp_media_main_strings.select_media);
|
222 |
-
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
223 |
-
jQuery(this).prop('disabled', false);
|
224 |
-
jQuery(this).removeClass('disabled');
|
225 |
-
}
|
226 |
-
} else {
|
227 |
-
alert(bp_media_main_strings.select_action);
|
228 |
-
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
229 |
-
jQuery(this).prop('disabled', false);
|
230 |
-
jQuery(this).removeClass('disabled');
|
231 |
-
return false;
|
232 |
-
}
|
233 |
-
|
234 |
-
});
|
235 |
-
|
236 |
-
jQuery('#bp-media-delete-ui').on('click', '#bp-media-delete-media', function() {
|
237 |
-
jQuery(this).siblings('.bp-media-ajax-spinner').show();
|
238 |
-
jQuery(this).prop('disabled', true);
|
239 |
-
jQuery(this).addClass('disabled');
|
240 |
-
$media = new Array();
|
241 |
-
jQuery('input:checkbox[name="move"]:checked').each(function() {
|
242 |
-
$media.push(jQuery(this).val());
|
243 |
-
});
|
244 |
-
if ($media.length) {
|
245 |
-
if (confirm(bp_media_main_strings.delete_selected_media)) {
|
246 |
-
var data = {
|
247 |
-
action: 'bp_media_delete_selected_media',
|
248 |
-
media: $media
|
249 |
-
};
|
250 |
-
jQuery.post(bp_media_vars.ajaxurl, data, function(response) {
|
251 |
-
if (response.length == 0) {
|
252 |
-
jQuery('.item-list-tabs:last').after('<div id="message" class="error"><p>' + bp_media_main_strings.something_went_wrong + '</p></div>');
|
253 |
-
} else {
|
254 |
-
location.reload();
|
255 |
-
}
|
256 |
-
});
|
257 |
-
} else {
|
258 |
-
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
259 |
-
jQuery(this).prop('disabled', false);
|
260 |
-
jQuery(this).removeClass('disabled');
|
261 |
-
return false;
|
262 |
-
}
|
263 |
-
} else {
|
264 |
-
alert(bp_media_main_strings.select_media);
|
265 |
-
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
266 |
-
jQuery(this).prop('disabled', false);
|
267 |
-
jQuery(this).removeClass('disabled');
|
268 |
-
}
|
269 |
-
});
|
270 |
-
|
271 |
-
jQuery('#bp-media-upload-ui').bind('dragover', function(e) {
|
272 |
-
jQuery(this).addClass('hover');
|
273 |
-
return 0;
|
274 |
-
});
|
275 |
-
jQuery('#bp-media-upload-ui').bind('dragleave', function(e) {
|
276 |
-
jQuery(this).removeClass('hover');
|
277 |
-
return 0;
|
278 |
-
});
|
279 |
-
|
280 |
-
var bp_media_recent_tabs = jQuery('.media-tabs-container-tabs');
|
281 |
-
if (bp_media_recent_tabs.length > 0) {
|
282 |
-
jQuery(bp_media_recent_tabs).tabs();
|
283 |
-
}
|
284 |
-
|
285 |
-
var tallest = 0;
|
286 |
-
jQuery('#recent-media-tabs .bp-media-tab-panel').each(function() {
|
287 |
-
|
288 |
-
var thisHeight = jQuery(this).height();
|
289 |
-
if (thisHeight > tallest) {
|
290 |
-
tallest = thisHeight;
|
291 |
-
}
|
292 |
-
}).height(tallest);
|
293 |
-
|
294 |
-
|
295 |
-
jQuery('#bp-media-show-more').click(function(e) {
|
296 |
-
e.preventDefault();
|
297 |
-
var data = load_more_data();
|
298 |
-
jQuery.get(bp_media_vars.ajaxurl, data, function(response) {
|
299 |
-
if (response.length == 0)
|
300 |
-
jQuery('#bp-media-show-more').parent().remove();
|
301 |
-
else
|
302 |
-
jQuery('.bp-media-gallery').append(response);
|
303 |
-
});
|
304 |
-
});
|
305 |
-
|
306 |
-
jQuery('#bp-media-show-more-sc').click(function(e) {
|
307 |
-
e.preventDefault();
|
308 |
-
$this = jQuery(this);
|
309 |
-
$this.prop("disabled", true);
|
310 |
-
var data = {
|
311 |
-
action: 'bp_media_load_more_sc',
|
312 |
-
page: parseInt($this.attr('data-page')) + 1,
|
313 |
-
media: $this.attr('data-media'),
|
314 |
-
count: $this.attr('data-count'),
|
315 |
-
title: $this.attr('data-title')
|
316 |
-
};
|
317 |
-
jQuery.get(bp_media_vars.ajaxurl, data, function(response) {
|
318 |
-
if (response.length == 0) {
|
319 |
-
jQuery('#bp-media-show-more-sc').parent().remove();
|
320 |
-
} else {
|
321 |
-
$this.prop("disabled", false);
|
322 |
-
$this.attr('data-page', parseInt($this.attr('data-page')) + 1);
|
323 |
-
jQuery('.bp-media-gallery').append(response);
|
324 |
-
}
|
325 |
-
});
|
326 |
-
});
|
327 |
-
setTimeout(function() {
|
328 |
-
jQuery('.media album_updated .delete-activity,.media_upload .delete-activity').unbind('click').click(function(e) {
|
329 |
-
if (confirm(bp_media_main_strings.delete_activity_media)) {
|
330 |
-
return true;
|
331 |
-
}
|
332 |
-
else {
|
333 |
-
return false;
|
334 |
-
}
|
335 |
-
});
|
336 |
-
|
337 |
-
}, 1000);
|
338 |
-
|
339 |
-
/* Add Featured Image */
|
340 |
-
jQuery('.bp-media-image').on('click', '.bp-media-featured', function(e) {
|
341 |
-
e.preventDefault();
|
342 |
-
var post_id = jQuery(this).attr('data-post-id');
|
343 |
-
var album_id = jQuery(this).attr('data-album-id');
|
344 |
-
var curr_obj = jQuery(this);
|
345 |
-
var data = {
|
346 |
-
action: 'bp_media_set_album_cover',
|
347 |
-
post_id: post_id,
|
348 |
-
album_id: album_id
|
349 |
-
};
|
350 |
-
jQuery.get(bp_media_vars.ajaxurl, data, function(response)
|
351 |
-
{
|
352 |
-
curr_obj.text(response);
|
353 |
-
curr_obj.attr('title', response);
|
354 |
-
}
|
355 |
-
);
|
356 |
-
});
|
357 |
-
|
358 |
-
if (bp_media_vars.lightbox > 0 && !(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent))) {
|
359 |
-
|
360 |
-
jQuery('#bp-media-list,.widget-item-listing,.bp-media-sc-list').on('click', 'li a', function(e) {
|
361 |
-
e.preventDefault();
|
362 |
-
$current = jQuery(this);
|
363 |
-
load_media($current);
|
364 |
-
});
|
365 |
-
jQuery('ul#activity-stream').on('click',
|
366 |
-
'li.media.album_updated ul li a, ul.bp-media-list-media li a, li.activity-item div.activity-content div.activity-inner div.bp_media_content a', function(e) {
|
367 |
-
e.preventDefault();
|
368 |
-
$current = jQuery(this);
|
369 |
-
load_media($current);
|
370 |
-
});
|
371 |
-
jQuery('body').on('click', 'a.modal-next', function(e) {
|
372 |
-
e.preventDefault();
|
373 |
-
if (!$current.parent().hasClass('bp_media_content')) {
|
374 |
-
$next_current = $current.closest('li').next().find('a');
|
375 |
-
if ($next_current.length < 1) {
|
376 |
-
if (jQuery('#bp-media-show-more').length > 0) {
|
377 |
-
var args = load_more_data();
|
378 |
-
var request = jQuery.get(bp_media_vars.ajaxurl, args);
|
379 |
-
chained = request.then(function(data) {
|
380 |
-
if (data.length == 0) {
|
381 |
-
jQuery('#bp-media-show-more').parent().remove();
|
382 |
-
return false;
|
383 |
-
} else {
|
384 |
-
jQuery('#bp-media-list').append(data);
|
385 |
-
return true;
|
386 |
-
}
|
387 |
-
});
|
388 |
-
|
389 |
-
chained.done(function(truth) {
|
390 |
-
if (truth != false) {
|
391 |
-
$next_current = $current.closest('li').next().find('a');
|
392 |
-
$current = $next_current;
|
393 |
-
transit_media($current);
|
394 |
-
}
|
395 |
-
});
|
396 |
-
}
|
397 |
-
} else {
|
398 |
-
$current = $next_current;
|
399 |
-
transit_media($next_current);
|
400 |
-
}
|
401 |
-
}
|
402 |
-
|
403 |
-
|
404 |
-
});
|
405 |
-
jQuery('body').on('click', 'a.modal-prev', function(e) {
|
406 |
-
e.preventDefault();
|
407 |
-
if (!$current.parent().hasClass('bp_media_content')) {
|
408 |
-
if ($current.closest('li').prev().length > 0 && $current.closest('li').prev().find('#bp-media-upload-ui').length < 1) {
|
409 |
-
$current = $current.closest('li').prev().find('a');
|
410 |
-
|
411 |
-
transit_media($current);
|
412 |
-
}
|
413 |
-
}
|
414 |
-
});
|
415 |
-
jQuery(document.documentElement).keyup(function(event) {
|
416 |
-
if (event.keyCode == 37) {
|
417 |
-
jQuery('a.modal-prev').trigger('click');
|
418 |
-
} else if (event.keyCode == 39) {
|
419 |
-
jQuery('a.modal-next').trigger('click');
|
420 |
-
}
|
421 |
-
});
|
422 |
-
|
423 |
-
function load_media($current) {
|
424 |
-
jQuery.get($current.attr('href'), function(response) {
|
425 |
-
$mediacontent = jQuery(response).find('.bp-media-single');
|
426 |
-
$medialoaded = jQuery('<div class="bp-media-ajax-single"></div>');
|
427 |
-
$medialoaded.append($mediacontent);
|
428 |
-
jQuery.modal($medialoaded, {
|
429 |
-
'zIndex': 99999,
|
430 |
-
'autoResize': true,
|
431 |
-
'opacity': 90
|
432 |
-
});
|
433 |
-
do_fixes($medialoaded);
|
434 |
-
jQuery('.bp_media_content video,.bp_media_content audio').trigger('mediapreview');
|
435 |
-
});
|
436 |
-
}
|
437 |
-
function transit_media($current) {
|
438 |
-
$medialoaded = jQuery('.bp-media-ajax-single');
|
439 |
-
$medialoaded.empty();
|
440 |
-
$medialoaded.append(jQuery('<div class="lightbox-spinner" />'));
|
441 |
-
jQuery.get($current.attr('href'), function(response) {
|
442 |
-
$mediacontent = jQuery(response).find('.bp-media-single');
|
443 |
-
$medialoaded = jQuery('.bp-media-ajax-single');
|
444 |
-
$medialoaded.empty();
|
445 |
-
$medialoaded.append($mediacontent);
|
446 |
-
do_fixes($medialoaded);
|
447 |
-
jQuery('.bp_media_content video,.bp_media_content audio').trigger('mediapreview');
|
448 |
-
});
|
449 |
-
}
|
450 |
-
|
451 |
-
function do_fixes($medialoaded) {
|
452 |
-
$medialoaded.find('.bp-media-content-wrap').append('<a class="modal-prev modal-ctrl"><span class="img-icon"></span></a><a class="modal-next modal-ctrl"><span class="img-icon"></span></a>');
|
453 |
-
$medialoaded.find('.bp_media_description').remove();
|
454 |
-
$image = $medialoaded.find('.bp-media-content-wrap .bp_media_content img');
|
455 |
-
if ($image.length < 1) {
|
456 |
-
$image = $medialoaded.find('.bp-media-content-wrap .bp_media_content video');
|
457 |
-
$dimensions = adjust_dimensions($image);
|
458 |
-
adjust_comment_div($dimensions[0]);
|
459 |
-
jQuery.modal.update($dimensions[0], $dimensions[1]);
|
460 |
-
}
|
461 |
-
$form = $medialoaded.find('form.ac-form');
|
462 |
-
if ($form.length > 0) {
|
463 |
-
$form.find('.ac-reply-avatar').remove();
|
464 |
-
$form.html($form.html().replace(' or press esc to cancel.', ''));
|
465 |
-
}
|
466 |
-
$image.load(function() {
|
467 |
-
$dimensions = adjust_dimensions($image);
|
468 |
-
adjust_comment_div($dimensions[0]);
|
469 |
-
jQuery.modal.update($dimensions[0], $dimensions[1]);
|
470 |
-
})
|
471 |
-
}
|
472 |
-
|
473 |
-
function adjust_dimensions($image) {
|
474 |
-
$height = ($image.height() > 480) ? $image.height() : 480;
|
475 |
-
$width = ($image.width() > 640) ? $image.width() : 640;
|
476 |
-
$width = $width + 280;
|
477 |
-
$image.hide();
|
478 |
-
$image.show();
|
479 |
-
return [$height, $width];
|
480 |
-
|
481 |
-
}
|
482 |
-
|
483 |
-
function adjust_comment_div($height) {
|
484 |
-
$medialoaded.find('.bp-media-meta-content-wrap').css({
|
485 |
-
'height': $height,
|
486 |
-
'overflow': 'auto'
|
487 |
-
});
|
488 |
-
}
|
489 |
-
function load_more_data() {
|
490 |
-
if (jQuery('#bp-media-show-more').attr('data-move') == 1)
|
491 |
-
$move = 1;
|
492 |
-
else
|
493 |
-
$move = 0;
|
494 |
-
var data = {
|
495 |
-
action: 'bp_media_load_more',
|
496 |
-
page: ++bp_media_vars.page,
|
497 |
-
current_action: bp_media_vars.current_action,
|
498 |
-
action_variables: bp_media_vars.action_variables,
|
499 |
-
displayed_user: bp_media_vars.displayed_user,
|
500 |
-
loggedin_user: bp_media_vars.loggedin_user,
|
501 |
-
current_group: bp_media_vars.current_group,
|
502 |
-
move: $move
|
503 |
-
};
|
504 |
-
return data;
|
505 |
-
}
|
506 |
-
|
507 |
-
/**** Activity Comments *******************************************************/
|
508 |
-
|
509 |
-
/* Hide all activity comment forms */
|
510 |
-
jQuery('form.ac-form').hide();
|
511 |
-
|
512 |
-
/* Hide excess comments */
|
513 |
-
// if ( jQuery('.activity-comments').length )
|
514 |
-
// bp_legacy_theme_hide_comments();
|
515 |
-
|
516 |
-
jQuery('.bp-media-image-editor').bind('DOMNodeInserted DOMNodeRemoved', function(event) {
|
517 |
-
$id = jQuery('.bp-media-image-editor').attr('id').replace('image-editor-', '');
|
518 |
-
if (!jQuery('#imgedit-save-target-' + $id).length) {
|
519 |
-
jQuery('#imgedit-y-' + $id).after('<p id="imgedit-save-target-' + $id + '" style="display: none;"><input type="checkbox" style="display:none;" checked="checked" name="imgedit-target-' + $id + '" value="all"></p>');
|
520 |
-
}
|
521 |
-
});
|
522 |
-
|
523 |
-
/* Activity list event delegation */
|
524 |
-
jQuery('body').on('click', '.bp-media-ajax-single div.activity', function(event) {
|
525 |
-
var target = jQuery(event.target);
|
526 |
-
if (target.hasClass('bp-media-featured')) {
|
527 |
-
var post_id = target.attr('data-post-id');
|
528 |
-
var album_id = target.attr('data-album-id');
|
529 |
-
var data = {
|
530 |
-
action: 'bp_media_set_album_cover',
|
531 |
-
post_id: post_id,
|
532 |
-
album_id: album_id
|
533 |
-
};
|
534 |
-
target.addClass('loading');
|
535 |
-
jQuery.get(bp_media_vars.ajaxurl, data, function(response)
|
536 |
-
{
|
537 |
-
target.removeClass('loading');
|
538 |
-
target.fadeOut(200, function() {
|
539 |
-
jQuery(this).html(response);
|
540 |
-
jQuery(this).attr('title', response);
|
541 |
-
jQuery(this).fadeIn(200);
|
542 |
-
});
|
543 |
-
|
544 |
-
}
|
545 |
-
);
|
546 |
-
}
|
547 |
-
|
548 |
-
/* Favoriting activity stream items */
|
549 |
-
if (target.hasClass('fav') || target.hasClass('unfav')) {
|
550 |
-
event.preventDefault();
|
551 |
-
var type = target.hasClass('fav') ? 'fav' : 'unfav';
|
552 |
-
var parent = target.closest('.activity_update');
|
553 |
-
var parent_id = parent.attr('id').substr(9, parent.attr('id').length);
|
554 |
-
|
555 |
-
target.addClass('loading');
|
556 |
-
|
557 |
-
jQuery.post(ajaxurl, {
|
558 |
-
action: 'activity_mark_' + type,
|
559 |
-
'cookie': encodeURIComponent(document.cookie),
|
560 |
-
'id': parent_id
|
561 |
-
},
|
562 |
-
function(response) {
|
563 |
-
target.removeClass('loading');
|
564 |
-
|
565 |
-
target.fadeOut(200, function() {
|
566 |
-
jQuery(this).html(response);
|
567 |
-
jQuery(this).attr('title', 'fav' == type ? BP_DTheme.remove_fav : BP_DTheme.mark_as_fav);
|
568 |
-
jQuery(this).fadeIn(200);
|
569 |
-
});
|
570 |
-
|
571 |
-
if ('fav' == type) {
|
572 |
-
if (!jQuery('.item-list-tabs #activity-favorites').length)
|
573 |
-
jQuery('.item-list-tabs ul #activity-mentions').before('<li id="activity-favorites"><a href="#">' + BP_DTheme.my_favs + ' <span>0</span></a></li>');
|
574 |
-
|
575 |
-
target.removeClass('fav');
|
576 |
-
target.addClass('unfav');
|
577 |
-
|
578 |
-
jQuery('.item-list-tabs ul #activity-favorites span').html(Number(jQuery('.item-list-tabs ul #activity-favorites span').html()) + 1);
|
579 |
-
} else {
|
580 |
-
target.removeClass('unfav');
|
581 |
-
target.addClass('fav');
|
582 |
-
|
583 |
-
jQuery('.item-list-tabs ul #activity-favorites span').html(Number(jQuery('.item-list-tabs ul #activity-favorites span').html()) - 1);
|
584 |
-
|
585 |
-
if (!Number(jQuery('.item-list-tabs ul #activity-favorites span').html())) {
|
586 |
-
if (jQuery('.item-list-tabs ul #activity-favorites').hasClass('selected'))
|
587 |
-
bp_activity_request(null, null);
|
588 |
-
|
589 |
-
jQuery('.item-list-tabs ul #activity-favorites').remove();
|
590 |
-
}
|
591 |
-
}
|
592 |
-
|
593 |
-
if ('activity-favorites' == jQuery('.item-list-tabs li.selected').attr('id'))
|
594 |
-
target.parent().parent().parent().slideUp(100);
|
595 |
-
});
|
596 |
-
|
597 |
-
return false;
|
598 |
-
}
|
599 |
-
/* Comment / comment reply links */
|
600 |
-
if (target.hasClass('acomment-reply') || target.parent().hasClass('acomment-reply')) {
|
601 |
-
if (target.parent().hasClass('acomment-reply'))
|
602 |
-
target = target.parent();
|
603 |
-
|
604 |
-
var id = target.attr('id');
|
605 |
-
ids = id.split('-');
|
606 |
-
|
607 |
-
var a_id = ids[2]
|
608 |
-
var c_id = target.attr('href').substr(10, target.attr('href').length);
|
609 |
-
var form = jQuery('.bp-media-ajax-single #ac-form-' + a_id);
|
610 |
-
|
611 |
-
form.css('display', 'none');
|
612 |
-
form.removeClass('root');
|
613 |
-
jQuery('.ac-form').hide();
|
614 |
-
|
615 |
-
/* Hide any error messages */
|
616 |
-
form.children('div').each(function() {
|
617 |
-
if (jQuery(this).hasClass('error'))
|
618 |
-
jQuery(this).hide();
|
619 |
-
});
|
620 |
-
|
621 |
-
|
622 |
-
if (ids[1] != 'comment') {
|
623 |
-
jQuery('.bp-media-ajax-single #acomment-' + c_id).append(form);
|
624 |
-
} else {
|
625 |
-
jQuery('.bp-media-ajax-single #activity-' + a_id + ' .activity-comments').append(form);
|
626 |
-
}
|
627 |
-
|
628 |
-
if (form.parent().hasClass('activity-comments'))
|
629 |
-
form.addClass('root');
|
630 |
-
|
631 |
-
form.slideDown(200);
|
632 |
-
jQuery.scrollTo(form, 500, {
|
633 |
-
offset: -100,
|
634 |
-
easing: 'easeOutQuad'
|
635 |
-
});
|
636 |
-
jQuery('.bp-media-ajax-single #ac-form-' + ids[2] + ' textarea').focus();
|
637 |
-
|
638 |
-
return false;
|
639 |
-
}
|
640 |
-
|
641 |
-
/* Activity comment posting */
|
642 |
-
if (target.attr('name') == 'ac_form_submit') {
|
643 |
-
var form = target.closest('form');
|
644 |
-
var form_parent = form.parent();
|
645 |
-
var form_id = form.attr('id').split('-');
|
646 |
-
|
647 |
-
if (!form_parent.hasClass('activity-comments')) {
|
648 |
-
var tmp_id = form_parent.attr('id').split('-');
|
649 |
-
var comment_id = tmp_id[1];
|
650 |
-
} else {
|
651 |
-
var comment_id = form_id[2];
|
652 |
-
}
|
653 |
-
|
654 |
-
var content = jQuery(target.closest('.ac-reply-content').find('textarea'));
|
655 |
-
// var content = jQuery( target.closest())'#' + form.attr('id') + ' textarea' );
|
656 |
-
|
657 |
-
/* Hide any error messages */
|
658 |
-
jQuery('.bp-media-ajax-single #' + form.attr('id') + ' div.error').hide();
|
659 |
-
target.addClass('loading').prop('disabled', true);
|
660 |
-
content.addClass('loading').prop('disabled', true);
|
661 |
-
|
662 |
-
var ajaxdata = {
|
663 |
-
action: 'new_activity_comment',
|
664 |
-
'cookie': encodeURIComponent(document.cookie),
|
665 |
-
'_wpnonce_new_activity_comment': jQuery("#_wpnonce_new_activity_comment").val(),
|
666 |
-
'comment_id': comment_id,
|
667 |
-
'form_id': form_id[2],
|
668 |
-
'content': content.val()
|
669 |
-
};
|
670 |
-
|
671 |
-
// Akismet
|
672 |
-
var ak_nonce = jQuery('#_bp_as_nonce_' + comment_id).val();
|
673 |
-
if (ak_nonce) {
|
674 |
-
ajaxdata['_bp_as_nonce_' + comment_id] = ak_nonce;
|
675 |
-
}
|
676 |
-
|
677 |
-
jQuery.post(ajaxurl, ajaxdata, function(response) {
|
678 |
-
target.removeClass('loading');
|
679 |
-
content.removeClass('loading');
|
680 |
-
|
681 |
-
/* Check for errors and append if found. */
|
682 |
-
if (response[0] + response[1] == '-1') {
|
683 |
-
form.append(jQuery(response.substr(2, response.length)).hide().fadeIn(200));
|
684 |
-
} else {
|
685 |
-
form.fadeOut(200, function() {
|
686 |
-
form_parent_id = jQuery('#' + form.parent().attr('id'));
|
687 |
-
if (0 == form.parent().children('ul').length) {
|
688 |
-
if (form.parent().hasClass('activity-comments')) {
|
689 |
-
form_parent_id.prepend('<ul></ul>');
|
690 |
-
} else {
|
691 |
-
form_parent_id.parent().append('<ul></ul>');
|
692 |
-
}
|
693 |
-
}
|
694 |
-
|
695 |
-
/* Preceeding whitespace breaks output with jQuery 1.9.0 */
|
696 |
-
var the_comment = jQuery.trim(response);
|
697 |
-
//var addnl_comment = jQuery.trim( response );
|
698 |
-
|
699 |
-
//form.parent().children('ul').append( jQuery( the_comment ).hide().fadeIn( 200 ) );
|
700 |
-
form_parent_id.children('ul').append(jQuery(the_comment).hide().fadeIn(200));
|
701 |
-
|
702 |
-
form.children('textarea').val('');
|
703 |
-
form.parent().parent().addClass('has-comments');
|
704 |
-
});
|
705 |
-
jQuery('.bp-media-ajax-single #' + form.attr('id') + ' textarea').val('');
|
706 |
-
|
707 |
-
/* Increase the "Reply (X)" button count */
|
708 |
-
jQuery('.bp-media-ajax-single #activity-' + form_id[2] + ' a.acomment-reply span').html(Number(jQuery('#activity-' + form_id[2] + ' a.acomment-reply span').html()) + 1);
|
709 |
-
}
|
710 |
-
|
711 |
-
jQuery(target).prop("disabled", false);
|
712 |
-
jQuery(content).prop("disabled", false);
|
713 |
-
});
|
714 |
-
|
715 |
-
return false;
|
716 |
-
}
|
717 |
-
|
718 |
-
/* Deleting an activity comment */
|
719 |
-
if (target.hasClass('acomment-delete')) {
|
720 |
-
var link_href = target.attr('href');
|
721 |
-
var comment_li = target.parent().parent();
|
722 |
-
var form = comment_li.parents('div.activity-comments').children('form');
|
723 |
-
|
724 |
-
var nonce = link_href.split('_wpnonce=');
|
725 |
-
nonce = nonce[1];
|
726 |
-
|
727 |
-
var comment_id = link_href.split('cid=');
|
728 |
-
comment_id = comment_id[1].split('&');
|
729 |
-
comment_id = comment_id[0];
|
730 |
-
|
731 |
-
target.addClass('loading');
|
732 |
-
|
733 |
-
/* Remove any error messages */
|
734 |
-
jQuery('.activity-comments ul .error').remove();
|
735 |
-
|
736 |
-
/* Reset the form position */
|
737 |
-
comment_li.parents('.activity-comments').append(form);
|
738 |
-
|
739 |
-
jQuery.post(ajaxurl, {
|
740 |
-
action: 'delete_activity_comment',
|
741 |
-
'cookie': encodeURIComponent(document.cookie),
|
742 |
-
'_wpnonce': nonce,
|
743 |
-
'id': comment_id
|
744 |
-
},
|
745 |
-
function(response) {
|
746 |
-
/* Check for errors and append if found. */
|
747 |
-
if (response[0] + response[1] == '-1') {
|
748 |
-
comment_li.prepend(jQuery(response.substr(2, response.length)).hide().fadeIn(200));
|
749 |
-
} else {
|
750 |
-
var children = jQuery('#' + comment_li.attr('id') + ' ul').children('li');
|
751 |
-
var child_count = 0;
|
752 |
-
jQuery(children).each(function() {
|
753 |
-
if (!jQuery(this).is(':hidden'))
|
754 |
-
child_count++;
|
755 |
-
});
|
756 |
-
comment_li.fadeOut(200);
|
757 |
-
|
758 |
-
/* Decrease the "Reply (X)" button count */
|
759 |
-
var count_span = jQuery('#' + comment_li.parents('#activity-stream > li').attr('id') + ' a.acomment-reply span');
|
760 |
-
var new_count = count_span.html() - (1 + child_count);
|
761 |
-
count_span.html(new_count);
|
762 |
-
|
763 |
-
/* If that was the last comment for the item, remove the has-comments class to clean up the styling */
|
764 |
-
if (0 == new_count) {
|
765 |
-
jQuery(comment_li.parents('#activity-stream > li')).removeClass('has-comments');
|
766 |
-
}
|
767 |
-
}
|
768 |
-
});
|
769 |
-
|
770 |
-
return false;
|
771 |
-
}
|
772 |
-
|
773 |
-
// Spam an activity stream comment
|
774 |
-
if (target.hasClass('spam-activity-comment')) {
|
775 |
-
var link_href = target.attr('href');
|
776 |
-
var comment_li = target.parent().parent();
|
777 |
-
|
778 |
-
target.addClass('loading');
|
779 |
-
|
780 |
-
// Remove any error messages
|
781 |
-
jQuery('.activity-comments ul div.error').remove();
|
782 |
-
|
783 |
-
// Reset the form position
|
784 |
-
comment_li.parents('.activity-comments').append(comment_li.parents('.activity-comments').children('form'));
|
785 |
-
|
786 |
-
jQuery.post(ajaxurl, {
|
787 |
-
action: 'bp_spam_activity_comment',
|
788 |
-
'cookie': encodeURIComponent(document.cookie),
|
789 |
-
'_wpnonce': link_href.split('_wpnonce=')[1],
|
790 |
-
'id': link_href.split('cid=')[1].split('&')[0]
|
791 |
-
},
|
792 |
-
function(response) {
|
793 |
-
// Check for errors and append if found.
|
794 |
-
if (response[0] + response[1] == '-1') {
|
795 |
-
comment_li.prepend(jQuery(response.substr(2, response.length)).hide().fadeIn(200));
|
796 |
-
|
797 |
-
} else {
|
798 |
-
var children = jQuery('#' + comment_li.attr('id') + ' ul').children('li');
|
799 |
-
var child_count = 0;
|
800 |
-
jQuery(children).each(function() {
|
801 |
-
if (!jQuery(this).is(':hidden')) {
|
802 |
-
child_count++;
|
803 |
-
}
|
804 |
-
});
|
805 |
-
comment_li.fadeOut(200);
|
806 |
-
|
807 |
-
// Decrease the "Reply (X)" button count
|
808 |
-
var parent_li = comment_li.parents('#activity-stream > li');
|
809 |
-
jQuery('#' + parent_li.attr('id') + ' a.acomment-reply span').html(jQuery('#' + parent_li.attr('id') + ' a.acomment-reply span').html() - (1 + child_count));
|
810 |
-
}
|
811 |
-
});
|
812 |
-
|
813 |
-
return false;
|
814 |
-
}
|
815 |
-
|
816 |
-
/* Showing hidden comments - pause for half a second */
|
817 |
-
if (target.parent().hasClass('show-all')) {
|
818 |
-
target.parent().addClass('loading');
|
819 |
-
|
820 |
-
setTimeout(function() {
|
821 |
-
target.parent().parent().children('li').fadeIn(200, function() {
|
822 |
-
target.parent().remove();
|
823 |
-
});
|
824 |
-
}, 600);
|
825 |
-
|
826 |
-
return false;
|
827 |
-
}
|
828 |
-
});
|
829 |
-
|
830 |
-
}
|
831 |
-
|
832 |
-
jQuery('.rtmedia-item-thumbnail a').magnificPopup({type: 'ajax'});
|
833 |
-
|
834 |
-
});
|
835 |
-
|
1 |
+
/*!
|
2 |
+
* rtMedia JavaScript Library
|
3 |
+
* @package rtMedia
|
4 |
+
*/function apply_rtMagnificPopup(a){jQuery("document").ready(function(b){var c="";c="undefined"==typeof rtmedia_load_more?"Loading media":rtmedia_load_more,"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&(b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").length>0&&b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").addClass("no-popup"),rtMagnificPopup=jQuery(a).magnificPopup({delegate:"a:not(.no-popup, .mejs-time-slider, .mejs-volume-slider, .mejs-horizontal-volume-slider)",type:"ajax",tLoading:c+" #%curr%...",mainClass:"mfp-img-mobile",preload:[1,3],closeOnBgClick:!0,gallery:{enabled:!0,navigateByImgClick:!0,arrowMarkup:"",preload:[0,1]},image:{tError:'<a href="%url%">The image #%curr%</a> could not be loaded.',titleSrc:function(a){return a.el.attr("title")+"<small>by Marsel Van Oosten</small>"}},callbacks:{ajaxContentAdded:function(){var a=jQuery.magnificPopup.instance,c=a.currItem.el,d=c.parent();if(d.is("li")||(d=d.parent()),d.is(":nth-last-child(2)")){{d.next()}"block"==jQuery("#rtMedia-galary-next").css("display")&&jQuery("#rtMedia-galary-next").click()}var e=a.items.length;if(a.index==e-1&&!d.is(":last-child"))return void c.click();$container=this.content.find(".tagcontainer"),$container.length>0&&($context=$container.find("img"),$container.find(".tagcontainer").css({height:$context.css("height"),width:$context.css("width")}));var f={};"undefined"!=typeof _wpmejsSettings&&(f.pluginPath=_wpmejsSettings.pluginPath),b(".mfp-content .wp-audio-shortcode,.mfp-content .wp-video-shortcode,.mfp-content .bp_media_content video").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270}),b(".mfp-content .mejs-audio .mejs-controls").css("position","relative"),rtMediaHook.call("rtmedia_js_popup_after_content_added",[])},close:function(a){rtmedia_init_action_dropdown()},BeforeChange:function(a){}}}))})}function rtmedia_init_action_dropdown(){var a,b;jQuery(".click-nav > span, .click-nav > div").toggleClass("no-js js"),jQuery(".click-nav .js ul").hide(),jQuery(".click-nav .clicker").click(function(c){a=jQuery("#rtm-media-options .click-nav .clicker").next("ul"),b=jQuery(this).next("ul"),jQuery.each(a,function(a,c){jQuery(c).html()!=b.html()&&jQuery(c).hide()}),jQuery(b).toggle(),c.stopPropagation()})}function bp_media_create_element(a){return!1}function rtmedia_version_compare(a,b){if(typeof a+typeof b!="stringstring")return!1;for(var c=a.split("."),d=b.split("."),e=0,f=Math.max(c.length,d.length);f>e;e++){if(c[e]&&!d[e]&&parseInt(c[e])>0||parseInt(c[e])>parseInt(d[e]))return!0;if(d[e]&&!c[e]&&parseInt(d[e])>0||parseInt(c[e])<parseInt(d[e]))return!1}return!0}function rtm_is_element_exist(a){return jQuery(a).length>0?!0:!1}function rtm_masonry_reload(a){setTimeout(function(){a.masonry("reload")},250)}function rtmediaGetParameterByName(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null==c?"":decodeURIComponent(c[1].replace(/\+/g," "))}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}:{top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},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..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.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 c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{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(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.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 c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}),"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.elem=c,d.$elem=a(c),d.options=a.extend({},a.fn.rtTab.options,b),d.rtTabs()},rtTabs:function(){var c=this,d=c.options.activeTab;c.$elem.find("li:nth-child("+d+")").addClass("active"),c.rtTabContent(activeTabContent="yes"),c.rtClick();var e="false"===c.$elem.attr("data-hash")?!1:!0;if(e===!0){var f=b.location.hash;f&&c.$elem.find("li").find("a[href="+f+"]").trigger("click"),a(b).on("hashchange",function(){var a=b.location.hash;c.$elem.find("li").find("a[href="+a+"]").trigger("click")})}},rtClick:function(){var c=this,d=c.$elem.find("li"),e=d.find("a");e.on("click",function(e){e.preventDefault(),d.removeClass("active"),c.rtTabContent(),a(this).parent().addClass("active");var f=a(this).attr("href");a(f).removeClass("hide");var g="false"===c.$elem.attr("data-hash")?!1:!0;if(g===!0){var h=a(b).scrollTop();location.hash=a(this).attr("href"),a(b).scrollTop(h)}"function"==typeof c.options.onComplete&&c.options.onComplete.apply(c.elem,arguments)})},rtTabContent:function(b){var c=this,d=c.$elem.find("li"),e=d.find("a");e.each(function(){var c=a(this),d=c.attr("href");"yes"===b?c.parent().hasClass("active")||a(d).addClass("hide"):a(d).addClass("hide")})}};a.fn.rtTab=function(b){return this.each(function(){var c=Object.create(e);c.init(b,this),a.data(this,"rtTab",c)})},a.fn.rtTab.options={activeTab:1,onComplete:null}}(jQuery,window,document);var rtMagnificPopup,rtm_masonry_container,rtMediaHook={hooks:[],is_break:!1,register:function(a,b){"undefined"==typeof rtMediaHook.hooks[a]&&(rtMediaHook.hooks[a]=[]),rtMediaHook.hooks[a].push(b)},call:function(a,b){if("undefined"!=typeof rtMediaHook.hooks[a])for(i=0;i<rtMediaHook.hooks[a].length;++i)if(1!=rtMediaHook.hooks[a][i](b))return rtMediaHook.is_break=!0,!1;return!0}};jQuery("document").ready(function(a){function b(){if(jQuery("#rtmedia-media-view-form").length>0){var a=jQuery("#rtmedia-media-view-form").attr("action");jQuery.post(a,{},function(a){})}}function c(){var a=jQuery.magnificPopup.instance;jQuery(".mfp-arrow-right").on("click",function(b){a.next()}),jQuery(".mfp-arrow-left").on("click",function(b){a.prev()}),jQuery(".mfp-content .rtmedia-media").swipe({swipeLeft:function(b,c,d,e,f){a.next()},swipeRight:function(b,c,d,e,f){a.prev()},threshold:0})}function d(){jQuery(document).on("focusin","#comment_content",function(){jQuery(document).unbind("keydown")}),jQuery(document).on("focusout","#comment_content",function(){var a=jQuery.magnificPopup.instance;jQuery(document).on("keydown",function(b){37===b.keyCode?a.prev():39===b.keyCode&&a.next()})})}function e(){jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()})}a(".rtm-tabs").rtTab(),jQuery(".rtmedia-modal-link").length>0&&a(".rtmedia-modal-link").magnificPopup({type:"inline",midClick:!0,closeBtnInside:!0}),a("#rt_media_comment_form").submit(function(b){return""==a.trim(a("#comment_content").val())?(alert(rtmedia_empty_comment_msg),!1):!0}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&apply_rtMagnificPopup(".rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container"),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(d){return!0}if("activity_get_older_updates"==b.data.action){var e=b.success;a.success=function(a){e(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}else if("get_single_activity_content"==b.data.action){var e=b.success;a.success=function(a){e(a),setTimeout(function(){apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),jQuery("ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270})},900)}}}),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(d){return!0}if("activity_get_older_updates"==b.data.action){var e=b.success;a.success=function(a){e(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}}),jQuery(".rtmedia-container").on("click",".select-all",function(a){jQuery(this).toggleClass("unselect-all").toggleClass("select-all"),jQuery(this).attr("title",rtmedia_unselect_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!0)}),jQuery(".rtmedia-list-item").addClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".unselect-all",function(a){jQuery(this).toggleClass("select-all").toggleClass("unselect-all"),jQuery(this).attr("title",rtmedia_select_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!1)}),jQuery(".rtmedia-list-item").removeClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".rtmedia-move",function(a){jQuery(".rtmedia-delete-container").slideUp(),jQuery(".rtmedia-move-container").slideToggle()}),jQuery("#rtmedia-create-album-modal").on("click","#rtmedia_create_new_album",function(b){if($albumname=jQuery.trim(jQuery("#rtmedia_album_name").val()),$context=jQuery.trim(jQuery("#rtmedia_album_context").val()),$context_id=jQuery.trim(jQuery("#rtmedia_album_context_id").val()),$privacy=jQuery.trim(jQuery("#rtmedia_select_album_privacy").val()),$create_album_nonce=jQuery.trim(jQuery("#rtmedia_create_album_nonce").val()),""!=$albumname){var c={action:"rtmedia_create_album",name:$albumname,context:$context,context_id:$context_id,create_album_nonce:$create_album_nonce};""!==$privacy&&(c.privacy=$privacy),a("#rtmedia_create_new_album").attr("disabled","disabled");var d=a("#rtmedia_create_new_album").html();a("#rtmedia_create_new_album").prepend("<img src='"+rMedia_loading_file+"' />"),jQuery.post(rtmedia_ajax_url,c,function(b){if(b=b.trim()){b=b.trim();var c=!0;jQuery(".rtmedia-user-album-list").each(function(){if(jQuery(this).children("optgroup").each(function(){return jQuery(this).attr("value")===$context?(c=!1,void jQuery(this).append('<option value="'+b+'">'+$albumname+"</option>")):void 0}),c){var a=$context.charAt(0).toUpperCase()+$context.slice(1),d='<optgroup value="'+$context+'" label="'+a+' Albums"><option value="'+b+'">'+$albumname+"</option></optgroup>";jQuery(this).append(d)}}),jQuery('select.rtmedia-user-album-list option[value="'+b+'"]').prop("selected",!0),jQuery(".rtmedia-create-new-album-container").slideToggle(),jQuery("#rtmedia_album_name").val(""),jQuery("#rtmedia-create-album-modal").append("<div class='rtmedia-success rtmedia-create-album-alert'><b>"+$albumname+"</b>"+rtmedia_album_created_msg+"</div>"),setTimeout(function(){jQuery(".rtmedia-create-album-alert").remove()},4e3),setTimeout(function(){galleryObj.reloadView(),
|
5 |
+
jQuery(".close-reveal-modal").click()},2e3)}else alert(rtmedia_something_wrong_msg);a("#rtmedia_create_new_album").removeAttr("disabled"),a("#rtmedia_create_new_album").html(d)})}else alert(rtmedia_empty_album_name_msg)}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_delete_confirmation)&&jQuery(this).closest("form").attr("action","../../../media/delete").submit():alert(rtmedia_no_media_selected)}),jQuery(".rtmedia-container").on("click",".rtmedia-move-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_move_confirmation)&&jQuery(this).closest("form").attr("action","").submit():alert(rtmedia_no_media_selected)}),b(),rtMediaHook.register("rtmedia_js_popup_after_content_added",function(){b(),e(),c(),d();var f=a(window).height();jQuery(".rtm-lightbox-container .mejs-video").css({height:.8*f,"max-height":.8*f,"over-flow":"hidden"}),jQuery(".mfp-content .rtmedia-media").css({"max-height":.87*f,"over-flow":"hidden"}),rtmedia_init_action_dropdown(),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").shorten({showChars:130});var g=a(".rtm-gallery-title"),h="";h=a.isEmptyObject(g)?a("#subnav.item-list-tabs li.selected ").html():g.html(),""!=h&&a(".rtm-ltb-gallery-title .ltb-title").html(h);var i=a("#subnav.item-list-tabs li.selected span").html();return a("li.total").html(i),!0});{var f=jQuery("#drag-drop-area"),g=jQuery("#whats-new");f.html()}jQuery("#rtmedia-upload-container").after("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&jQuery("#whats-new-textarea").append("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),jQuery(document).on("dragover",function(a){jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&g.addClass("rtm-drag-drop-active"),f.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show()}).on("dragleave",function(a){a.preventDefault(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(g.removeClass("rtm-drag-drop-active"),g.removeAttr("style")),f.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}).on("drop",function(a){a.preventDefault(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(g.removeClass("rtm-drag-drop-active"),g.removeAttr("style")),f.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-album",function(a){a.preventDefault(),confirm(rtmedia_album_delete_confirmation)&&jQuery(this).closest("form").submit()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()}),rtmedia_init_action_dropdown(),a(document).click(function(){a(".click-nav ul").is(":visible")&&a(".click-nav ul",this).hide()}),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").length>0&&a(".rtm-more").shorten({showChars:200}),"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&(rtm_masonry_container=jQuery(".rtmedia-container .rtmedia-list"),rtm_masonry_container.masonry({itemSelector:".rtmedia-list-item"}),setInterval(function(){jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())}),rtm_masonry_reload(rtm_masonry_container)},1e3),jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())})),jQuery(".rtm-uploader-tabs").length>0&&jQuery(".rtm-uploader-tabs li").click(function(a){jQuery(this).hasClass("active")||(jQuery(this).siblings().removeClass("active"),jQuery(this).parents(".rtm-uploader-tabs").siblings().hide(),class_name=jQuery(this).attr("class"),jQuery(this).parents(".rtm-uploader-tabs").siblings('[data-id="'+class_name+'"]').show(),jQuery(this).addClass("active"))})}),function(a){a.fn.shorten=function(b){var c={showChars:100,ellipsesText:"...",moreText:"more",lessText:"less"};return b&&a.extend(c,b),a(document).off("click",".morelink"),a(document).on({click:function(){var b=a(this);return b.hasClass("less")?(b.removeClass("less"),b.html(c.moreText)):(b.addClass("less"),b.html(c.lessText)),b.parent().prev().toggle(),b.prev().toggle(),!1}},".morelink"),this.each(function(){var b=a(this);if(!b.hasClass("shortened")){b.addClass("shortened");var d=b.html();if(d.length>c.showChars){var e=d.substr(0,c.showChars),f=d.substr(c.showChars,d.length-c.showChars),g=e+'<span class="moreellipses">'+c.ellipsesText+' </span><span class="morecontent"><span>'+f+'</span> <a href="#" class="morelink">'+c.moreText+"</a></span>";b.html(g),a(".morecontent span").hide()}}})}}(jQuery),window.onload=function(){"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&rtm_masonry_reload(rtm_masonry_container)};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/assets/js/rtMedia.backbone.js
CHANGED
@@ -1,514 +1,514 @@
|
|
1 |
var galleryObj;
|
2 |
var nextpage = 2;
|
3 |
var upload_sync = false;
|
4 |
-
var activity_id = -1;
|
5 |
var uploaderObj;
|
6 |
var objUploadView;
|
7 |
var rtmedia_load_template_flag = true;
|
8 |
|
9 |
jQuery( function ( $ ) {
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
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 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
|
|
|
|
356 |
apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content' ) );
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
// upload_error_sep = ",";
|
382 |
-
// var tr = "<tr style='background-color:lightpink;color:black' id='" + file.id + "'><td>" + file.name + "(" + plupload.formatSize(file.size) + ")" + "</td><td colspan='4'> " + rtmedia_max_file_msg + plupload.formatSize(uploaderObj.uploader.settings.max_file_size) + "</td></tr>"
|
383 |
-
// $("#rtMedia-queue-list tbody").append(tr);
|
384 |
-
return true;
|
385 |
-
}
|
386 |
-
var tmp_array = file.name.split( "." );
|
387 |
-
if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
|
388 |
-
var ext_array = uploaderObj.uploader.settings.filters.mime_types[0].extensions.split( ',' );
|
389 |
-
} else {
|
390 |
-
var ext_array = uploaderObj.uploader.settings.filters[0].extensions.split( ',' );
|
391 |
-
}
|
392 |
-
if ( tmp_array.length > 1 ) {
|
393 |
-
var ext = tmp_array[tmp_array.length - 1];
|
394 |
-
ext = ext.toLowerCase();
|
395 |
-
if ( jQuery.inArray( ext, ext_array ) === -1 ) {
|
396 |
-
return true;
|
397 |
-
}
|
398 |
-
} else {
|
399 |
-
return true;
|
400 |
-
}
|
401 |
-
|
402 |
-
if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
|
403 |
-
uploaderObj.uploader.settings.filters.mime_types[0].title;
|
404 |
} else {
|
405 |
-
|
406 |
}
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
e.preventDefault();
|
431 |
|
432 |
rtm_file_label = this;
|
433 |
-
|
434 |
-
|
435 |
|
436 |
jQuery( rtm_file_label ).hide();
|
437 |
-
|
438 |
-
rtm_file_title_input = '#text_' + file.id;
|
439 |
|
440 |
// show/create text box to edit media title
|
441 |
-
if( jQuery( rtm_file_title_input ).length
|
442 |
-
jQuery(
|
443 |
} else {
|
444 |
jQuery( rtm_file_title_input ).show();
|
|
|
445 |
}
|
|
|
446 |
jQuery( rtm_file_title_input ).focus();
|
447 |
|
448 |
// set new media title
|
449 |
-
jQuery( rtm_file_title_input ).keyup( function( e ){
|
450 |
if( this.value != '' ) {
|
451 |
file.title = this.value;
|
452 |
}
|
453 |
-
|
|
|
454 |
return false;
|
455 |
}
|
456 |
-
});
|
457 |
|
458 |
// hide input box for media title and show label of media title
|
459 |
-
jQuery( rtm_file_title_input ).blur( function( e ){
|
460 |
-
if( this.value != '' ) {
|
461 |
jQuery( rtm_file_title_input ).hide();
|
462 |
-
jQuery(
|
|
|
463 |
}
|
|
|
|
|
464 |
jQuery( rtm_file_label ).show();
|
465 |
-
});
|
466 |
} );
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
rtMediaHook.call( 'rtmedia_js_after_files_added', [up, files] );
|
474 |
-
|
475 |
-
// if (upload_size_error) {
|
476 |
-
// // alert(upload_error + " because max file size is " + plupload.formatSize(uploaderObj.uploader.settings.max_file_size) );
|
477 |
-
// }
|
478 |
-
} );
|
479 |
-
|
480 |
-
uploaderObj.uploader.bind( 'Error', function ( up, err ) {
|
481 |
-
|
482 |
-
if ( err.code == -600 ) { //file size error // if file size is greater than server's max allowed size
|
483 |
-
var tmp_array;
|
484 |
-
var ext = tr = '';
|
485 |
-
tmp_array = err.file.name.split( "." );
|
486 |
-
if ( tmp_array.length > 1 ) {
|
487 |
-
ext = tmp_array[tmp_array.length - 1];
|
488 |
-
if ( !(typeof(up.settings.upload_size) != "undefined" && typeof(up.settings.upload_size[ext]) != "undefined" && typeof(up.settings.upload_size[ext]['size']) ) ) {
|
489 |
-
tr = "<tr class='upload-error'><td>" + err.file.name.substring( 0, 40 ) + "</td><td> " + rtmedia_max_file_msg + plupload.formatSize( up.settings.max_file_size / 1024 * 1024 ) + " <i class='rtmicon-info-circle' title='" + window.file_size_info + "'></i></td><td>" + plupload.formatSize( err.file.size ) + "</td><td></td><td class='close error_delete'>×</td></tr>";
|
490 |
-
}
|
491 |
-
}
|
492 |
-
//append the message to the file queue
|
493 |
-
$( "#rtMedia-queue-list tbody" ).append( tr );
|
494 |
-
}
|
495 |
-
else {
|
496 |
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
$( "#rtMedia-queue-list tbody" ).append( tr );
|
502 |
}
|
503 |
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
jQuery( '.start-media-upload' ).on( 'click', function ( e ) {
|
513 |
e.preventDefault();
|
514 |
var allow_upload = rtMediaHook.call( 'rtmedia_js_upload_file', true );
|
@@ -518,630 +518,701 @@ jQuery( function ( $ ) {
|
|
518 |
uploaderObj.uploadFiles();
|
519 |
} );
|
520 |
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
$( '#' + media_id ).remove();
|
639 |
-
}
|
640 |
-
} );
|
641 |
-
}
|
642 |
-
} );
|
643 |
|
644 |
|
645 |
} );
|
646 |
-
/** History Code for route
|
647 |
-
|
648 |
-
var rtMediaRouter = Backbone.Router.extend({
|
649 |
-
routes: {
|
650 |
-
"media/*": "getMedia"
|
651 |
-
}
|
652 |
-
});
|
653 |
-
var app_router = new rtMediaRouter;
|
654 |
-
app_router.on('route:getMedia', function() {
|
655 |
-
// Note the variable in the route definition being passed in here
|
656 |
-
});
|
657 |
-
Backbone.history.start({pushState: true});
|
658 |
-
|
659 |
-
**/
|
660 |
-
|
661 |
|
662 |
/** Activity Update Js **/
|
663 |
|
664 |
jQuery( document ).ready( function ( $ ) {
|
665 |
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
}, 100 );
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
$( "#rtm-upload-start-notice" ).css( 'display', 'block' ); // show the file upload notice to the user
|
761 |
-
|
762 |
-
$( "#" + file.id + " td.plupload_delete" ).click( function ( e ) {
|
763 |
-
e.preventDefault();
|
764 |
-
objUploadView.uploader.removeFile( upl.getFile( file.id ) );
|
765 |
-
$( "#" + file.id ).remove();
|
766 |
-
return false;
|
767 |
-
} );
|
768 |
|
769 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
770 |
$( "#label_" + file.id ).click( function ( e ) {
|
771 |
e.preventDefault();
|
772 |
|
773 |
rtm_file_label = this;
|
774 |
-
|
775 |
-
|
776 |
|
777 |
jQuery( rtm_file_label ).hide();
|
778 |
-
|
779 |
-
rtm_file_title_input = '#text_' + file.id;
|
780 |
|
781 |
// show/create text box to edit media title
|
782 |
-
if( jQuery( rtm_file_title_input ).length
|
783 |
-
jQuery(
|
784 |
} else {
|
785 |
jQuery( rtm_file_title_input ).show();
|
|
|
786 |
}
|
|
|
787 |
jQuery( rtm_file_title_input ).focus();
|
788 |
|
789 |
// set new media title
|
790 |
-
jQuery( rtm_file_title_input ).keyup( function( e ){
|
791 |
if( this.value != '' ) {
|
792 |
file.title = this.value;
|
793 |
}
|
794 |
-
|
|
|
795 |
return false;
|
796 |
}
|
797 |
-
});
|
798 |
|
799 |
// hide input box for media title and show label of media title
|
800 |
-
jQuery( rtm_file_title_input ).blur( function( e ){
|
801 |
-
if( this.value != '' ) {
|
802 |
jQuery( rtm_file_title_input ).hide();
|
803 |
-
jQuery(
|
|
|
804 |
}
|
805 |
-
jQuery( rtm_file_label ).show();
|
806 |
-
});
|
807 |
-
} );
|
808 |
-
} );
|
809 |
-
|
810 |
-
$.each( objUploadView.upload_remove_array, function ( i, rfile ) {
|
811 |
-
if ( upl.getFile( rfile ) )
|
812 |
-
upl.removeFile( upl.getFile( rfile ) );
|
813 |
-
} );
|
814 |
-
} );
|
815 |
-
|
816 |
-
objUploadView.uploader.bind( 'FileUploaded', function ( up, file, res ) {
|
817 |
-
if ( /MSIE (\d+\.\d+);/.test( navigator.userAgent ) ) { //test for MSIE x.x;
|
818 |
-
var ieversion = new Number( RegExp.$1 ) // capture x.x portion and store as a number
|
819 |
-
|
820 |
-
if ( ieversion < 10 ) {
|
821 |
-
try {
|
822 |
-
if ( typeof JSON.parse( res.response ) !== "undefined" )
|
823 |
-
res.status = 200;
|
824 |
-
}
|
825 |
-
catch ( e ) {
|
826 |
-
}
|
827 |
-
}
|
828 |
-
}
|
829 |
|
830 |
-
|
831 |
-
|
832 |
-
var objIds = JSON.parse( res.response );
|
833 |
-
$.each( objIds, function ( key, val ) {
|
834 |
-
activity_attachemnt_ids.push( val );
|
835 |
-
if ( $( "#whats-new-form" ).find( "#rtmedia_attached_id_" + val ).length < 1 ) {
|
836 |
-
$( "#whats-new-form" ).append( "<input type='hidden' name='rtMedia_attached_files[]' data-mode='rtMedia-update' id='rtmedia_attached_id_" + val + "' value='"
|
837 |
-
+ val + "' />" );
|
838 |
-
}
|
839 |
} );
|
840 |
-
}
|
841 |
-
|
842 |
-
}
|
843 |
-
rtMediaHook.call( 'rtmedia_js_after_file_upload', [up, file, res.response] );
|
844 |
-
}
|
845 |
-
} );
|
846 |
-
|
847 |
-
objUploadView.uploader.bind( 'Error', function ( up, err ) {
|
848 |
-
|
849 |
-
if ( err.code == -600 ) { //file size error // if file size is greater than server's max allowed size
|
850 |
-
var tmp_array;
|
851 |
-
var ext = tr = '';
|
852 |
-
tmp_array = err.file.name.split( "." );
|
853 |
-
if ( tmp_array.length > 1 ) {
|
854 |
-
|
855 |
-
ext = tmp_array[tmp_array.length - 1];
|
856 |
-
if ( !(typeof(up.settings.upload_size) != "undefined" && typeof(up.settings.upload_size[ext]) != "undefined" && (up.settings.upload_size[ext]["size"] < 1 || (up.settings.upload_size[ext]["size"] * 1024 * 1024) >= err.file.size )) ) {
|
857 |
-
tr = "<tr class='upload-error'><td>" + err.file.name.substring( 0, 40 ) + "(" + plupload.formatSize( err.file.size ) + ")" + "</td><td> " + rtmedia_max_file_msg + plupload.formatSize( up.settings.max_file_size / 1024 * 1024 ) + " <i class='rtmicon-info-circled' title='" + window.file_size_info + "'></i></td><td>" + plupload.formatSize( err.file.size ) + "</td><td></td><td class='close error_delete'>×</td></tr>";
|
858 |
-
}
|
859 |
-
}
|
860 |
-
//append the message to the file queue
|
861 |
-
$( "#rtMedia-queue-list tbody" ).append( tr );
|
862 |
-
}
|
863 |
-
else {
|
864 |
-
if ( err.code == -601 ) { // file extension error
|
865 |
-
err.message = rtmedia_file_extension_error_msg;
|
866 |
-
}
|
867 |
-
var tr = "<tr class='upload-error'><td>" + (err.file ? err.file.name.substring( 0, 40 ) : "") + "</td><td>" + err.message + " <i class='rtmicon-info-circled' title='" + window.file_extn_info + "'></i></td><td>" + plupload.formatSize( err.file.size ) + "</td><td></td><td class='close error_delete'>×</td></tr>";
|
868 |
-
$( "#rtMedia-queue-list tbody" ).append( tr );
|
869 |
-
}
|
870 |
-
|
871 |
-
jQuery( '.error_delete' ).on( 'click', function ( e ) {
|
872 |
-
e.preventDefault();
|
873 |
-
jQuery( this ).parent( 'tr' ).remove();
|
874 |
-
} );
|
875 |
-
$( "#rtm-upload-start-notice" ).css( 'display', 'block' ); // show the file upload notice to the user
|
876 |
-
return false;
|
877 |
-
|
878 |
-
} );
|
879 |
|
880 |
-
|
|
|
|
|
|
|
881 |
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
var object = '';
|
888 |
-
var item_id = jq( "#whats-new-post-in" ).val();
|
889 |
-
if ( item_id == undefined )
|
890 |
-
item_id = 0;
|
891 |
-
if ( item_id > 0 ) {
|
892 |
-
object = "group";
|
893 |
-
} else {
|
894 |
-
object = "profile";
|
895 |
-
}
|
896 |
-
|
897 |
-
up.settings.multipart_params.context = object;
|
898 |
-
up.settings.multipart_params.context_id = item_id;
|
899 |
-
up.settings.multipart_params.title = files.title.split( '.' )[ 0 ];
|
900 |
-
// if privacy dropdown is not disabled, then get the privacy value of the update
|
901 |
-
if ( jQuery( "select.privacy" ).prop( 'disabled' ) === false ) {
|
902 |
-
up.settings.multipart_params.privacy = jQuery( "select.privacy" ).val();
|
903 |
-
}
|
904 |
-
} );
|
905 |
-
objUploadView.uploader.bind( 'UploadComplete', function ( up, files ) {
|
906 |
-
media_uploading = true;
|
907 |
-
$( "#aw-whats-new-submit" ).click();
|
908 |
-
//remove the current file list
|
909 |
-
$( "#rtMedia-queue-list tr" ).remove();
|
910 |
-
$( "#rtm-upload-start-notice" ).hide();
|
911 |
-
//$("#aw-whats-new-submit").removeAttr('disabled');
|
912 |
-
window.onbeforeunload = null;
|
913 |
-
} );
|
914 |
-
objUploadView.uploader.bind( 'UploadProgress', function ( up, file ) {
|
915 |
-
$( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploading_msg + '( ' + file.percent + '% )' );
|
916 |
-
$( "#" + file.id ).addClass( 'upload-progress' );
|
917 |
-
if ( file.percent == 100 ) {
|
918 |
-
$( "#" + file.id ).toggleClass( 'upload-success' );
|
919 |
-
}
|
920 |
-
|
921 |
-
window.onbeforeunload = function (evt) {
|
922 |
-
var message = rtmedia_upload_progress_error_message;
|
923 |
-
return message;
|
924 |
-
};
|
925 |
-
} );
|
926 |
-
|
927 |
-
$( "#rtMedia-start-upload" ).hide();
|
928 |
-
|
929 |
-
var change_flag = false
|
930 |
-
var media_uploading = false;
|
931 |
-
$.ajaxPrefilter( function ( options, originalOptions, jqXHR ) {
|
932 |
-
// Modify options, control originalOptions, store jqXHR, etc
|
933 |
-
try {
|
934 |
-
if ( originalOptions.data == null || typeof(originalOptions.data) == "undefined" || typeof(originalOptions.data.action) == "undefined" ) {
|
935 |
-
return true;
|
936 |
-
}
|
937 |
-
} catch ( e ) {
|
938 |
-
return true;
|
939 |
-
}
|
940 |
-
if ( originalOptions.data.action == 'post_update' || originalOptions.data.action == 'activity_widget_filter' ) {
|
941 |
-
var temp = activity_attachemnt_ids;
|
942 |
-
while ( activity_attachemnt_ids.length > 0 ) {
|
943 |
-
options.data += "&rtMedia_attached_files[]=" + activity_attachemnt_ids.pop();
|
944 |
-
}
|
945 |
-
options.data += "&rtmedia-privacy=" + jQuery( "select.privacy" ).val();
|
946 |
-
activity_attachemnt_ids = temp;
|
947 |
-
if ( jQuery( '#rtmp-url-no-scrapper' ).length > 0 && jQuery( '#rtmp-url-no-scrapper' ).val() != '0' ) {
|
948 |
-
options.data += "&rtmp_link_url=" + jQuery( "#rtmp-url-scrapper-url-hidden" ).val(); // URL link preview
|
949 |
-
options.data += "&rtmp_link_title=" + jQuery( "#rtmp-url-scrapper-title-hidden" ).val(); // URL link preview
|
950 |
-
options.data += "&rtmp_link_img=" + jQuery( '#rtmp-url-scrapper-img-hidden' ).val(); // URL link preview
|
951 |
-
options.data += "&rtmp_link_description=" + jQuery( "#rtmp-url-scrapper-description-hidden" ).val(); // URL link preview
|
952 |
-
}
|
953 |
-
var orignalSuccess = originalOptions.success;
|
954 |
-
options.beforeSend = function () {
|
955 |
-
if ( originalOptions.data.action == 'post_update' ) {
|
956 |
-
if ( $.trim( $( "#whats-new" ).val() ) == "" ) {
|
957 |
-
$('#whats-new-form' ).prepend( '<div id="message" class="error"><p>' + rtmedia_empty_activity_msg + '</p></div>' );
|
958 |
-
$("#aw-whats-new-submit").prop("disabled", true).removeClass('loading');
|
959 |
-
return false;
|
960 |
-
}
|
961 |
-
}
|
962 |
-
if ( !media_uploading && objUploadView.uploader.files.length > 0 ) {
|
963 |
-
$( "#whats-new-post-in" ).attr( 'disabled', 'disabled' );
|
964 |
-
$( "#rtmedia-add-media-button-post-update" ).attr( 'disabled', 'disabled' );
|
965 |
-
objUploadView.uploadFiles()
|
966 |
-
media_uploading = true;
|
967 |
-
return false;
|
968 |
-
} else {
|
969 |
-
media_uploading = false;
|
970 |
-
return true;
|
971 |
-
}
|
972 |
-
|
973 |
-
|
974 |
-
}
|
975 |
-
options.success = function ( response ) {
|
976 |
-
orignalSuccess( response );
|
977 |
-
if ( response[0] + response[1] == '-1' ) {
|
978 |
-
//Error
|
979 |
-
|
980 |
-
} else {
|
981 |
-
if ( originalOptions.data.action == 'activity_widget_filter' ) {
|
982 |
-
$( "div.activity" ).bind( "fadeIn", function () {
|
983 |
-
apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content' ) );
|
984 |
-
rtMediaHook.call( 'rtmedia_js_after_activity_added', [] );
|
985 |
-
} );
|
986 |
-
$( "div.activity" ).fadeIn( 100 );
|
987 |
-
}
|
988 |
-
jQuery( "input[data-mode=rtMedia-update]" ).remove();
|
989 |
-
while ( objUploadView.uploader.files.pop() != undefined ) {
|
990 |
-
}
|
991 |
-
objUploadView.uploader.refresh();
|
992 |
-
$('#rtmedia-whts-new-upload-container > div' ).css( 'top','0' );
|
993 |
-
$('#rtmedia-whts-new-upload-container > div' ).css( 'left','0' );
|
994 |
-
$( '#rtMedia-update-queue-list' ).html( '' );
|
995 |
-
//$("#div-attache-rtmedia").hide();
|
996 |
-
apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content' ) );
|
997 |
-
jQuery( 'ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode' ).mediaelementplayer( {
|
998 |
-
|
999 |
-
// if the <video width> is not specified, this is the default
|
1000 |
-
defaultVideoWidth: 480,
|
1001 |
-
// if the <video height> is not specified, this is the default
|
1002 |
-
defaultVideoHeight: 270,
|
1003 |
-
// if set, overrides <video width>
|
1004 |
-
//videoWidth: 1,
|
1005 |
-
// if set, overrides <video height>
|
1006 |
-
//videoHeight: 1
|
1007 |
-
} );
|
1008 |
-
rtMediaHook.call( 'rtmedia_js_after_activity_added', [] );
|
1009 |
-
}
|
1010 |
-
$( "#whats-new-post-in" ).removeAttr( 'disabled' );
|
1011 |
-
$( "#rtmedia-add-media-button-post-update" ).removeAttr( 'disabled' );
|
1012 |
-
|
1013 |
}
|
|
|
|
|
1014 |
}
|
1015 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1016 |
} );
|
1017 |
/**
|
1018 |
* rtMedia Comment Js
|
1019 |
*/
|
1020 |
jQuery( document ).ready( function ( $ ) {
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1078 |
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1095 |
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
$( '.rtmedia-like-info' ).removeClass( 'hide' );
|
1104 |
-
} else {
|
1105 |
-
$( '.rtmedia-like-info' ).addClass( 'hide' );
|
1106 |
-
}
|
1107 |
-
}
|
1108 |
-
} );
|
1109 |
|
|
|
|
|
|
|
1110 |
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
var that = this;
|
1115 |
-
$( this ).attr( 'disabled', 'disabled' );
|
1116 |
-
var url = $( this ).parent().attr( "action" );
|
1117 |
-
$( that ).prepend( "<img class='rtm-featured-loading' src='" + rMedia_loading_file + "' />" );
|
1118 |
-
$.ajax( {
|
1119 |
-
url: url,
|
1120 |
-
type: 'post',
|
1121 |
-
data: "json=true",
|
1122 |
-
success: function ( data ) {
|
1123 |
-
try {
|
1124 |
-
data = JSON.parse( data );
|
1125 |
-
} catch ( e ) {
|
1126 |
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
|
|
|
|
|
|
|
|
1131 |
}
|
1132 |
} );
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
jQuery( "#div-attache-rtmedia" ).find( "input[type=file]" ).each( function () {
|
1137 |
-
//$(this).attr("capture", "camera");
|
1138 |
-
// $(this).attr("accept", $(this).attr("accept") + ';capture=camera');
|
1139 |
-
|
1140 |
-
} );
|
1141 |
-
|
1142 |
-
// manually trigger fadein event so that we can bind some function on this event. It is used in activity when content getting load via ajax
|
1143 |
-
var _old_fadein = $.fn.fadeIn;
|
1144 |
-
jQuery.fn.fadeIn = function () {
|
1145 |
-
return _old_fadein.apply( this, arguments ).trigger( "fadeIn" );
|
1146 |
-
};
|
1147 |
-
} );
|
1 |
var galleryObj;
|
2 |
var nextpage = 2;
|
3 |
var upload_sync = false;
|
4 |
+
var activity_id = - 1;
|
5 |
var uploaderObj;
|
6 |
var objUploadView;
|
7 |
var rtmedia_load_template_flag = true;
|
8 |
|
9 |
jQuery( function ( $ ) {
|
10 |
|
11 |
+
var o_is_album, o_is_edit_allowed;
|
12 |
+
if ( typeof ( is_album ) == "undefined" ) {
|
13 |
+
o_is_album = new Array( "" );
|
14 |
+
} else {
|
15 |
+
o_is_album = is_album
|
16 |
+
}
|
17 |
+
if ( typeof ( is_edit_allowed ) == "undefined" ) {
|
18 |
+
o_is_edit_allowed = new Array( "" )
|
19 |
+
} else {
|
20 |
+
o_is_edit_allowed = is_edit_allowed;
|
21 |
+
}
|
22 |
+
|
23 |
+
rtMedia = window.rtMedia || { };
|
24 |
+
|
25 |
+
rtMedia = window.rtMedia || { };
|
26 |
+
|
27 |
+
rtMedia.Context = Backbone.Model.extend( {
|
28 |
+
url: function () {
|
29 |
+
var url = rtmedia_media_slug + "/";
|
30 |
+
if ( ! upload_sync && nextpage > 0 )
|
31 |
+
url += 'pg/' + nextpage + '/'
|
32 |
+
return url;
|
33 |
+
},
|
34 |
+
defaults: {
|
35 |
+
"context": "post",
|
36 |
+
"context_id": false
|
37 |
+
}
|
38 |
+
} );
|
39 |
+
|
40 |
+
rtMedia.Media = Backbone.Model.extend( {
|
41 |
+
defaults: {
|
42 |
+
"id": 0,
|
43 |
+
"blog_id": false,
|
44 |
+
"media_id": false,
|
45 |
+
"media_author": false,
|
46 |
+
"media_title": false,
|
47 |
+
"album_id": false,
|
48 |
+
"media_type": "photo",
|
49 |
+
"activity_id": false,
|
50 |
+
"privacy": 0,
|
51 |
+
"views": 0,
|
52 |
+
"downloads": 0,
|
53 |
+
"ratings_average": 0,
|
54 |
+
"ratings_total": 0,
|
55 |
+
"ratings_count": 0,
|
56 |
+
"likes": 0,
|
57 |
+
"dislikes": 0,
|
58 |
+
"guid": false,
|
59 |
+
"width": 0,
|
60 |
+
"height": 0,
|
61 |
+
"rt_permalink": false,
|
62 |
+
"duration": "0:00"
|
63 |
+
// "next" : -1,
|
64 |
+
// "prev" : -1
|
65 |
+
}
|
66 |
+
|
67 |
+
} );
|
68 |
+
|
69 |
+
rtMedia.Gallery = Backbone.Collection.extend( {
|
70 |
+
model: rtMedia.Media,
|
71 |
+
url: function () {
|
72 |
+
var temp = window.location.pathname;
|
73 |
+
var url = '';
|
74 |
+
if ( temp.indexOf( "/" + rtmedia_media_slug + "/" ) == - 1 ) {
|
75 |
+
url = rtmedia_media_slug + '/';
|
76 |
+
} else {
|
77 |
+
if ( temp.indexOf( 'pg/' ) == - 1 )
|
78 |
+
url = temp;
|
79 |
+
else
|
80 |
+
url = window.location.pathname.substr( 0, window.location.pathname.lastIndexOf( "pg/" ) );
|
81 |
+
}
|
82 |
+
if ( ! upload_sync && nextpage > 1 ) {
|
83 |
+
if ( url.substr( url.length - 1 ) != "/" )
|
84 |
+
url += "/"
|
85 |
+
url += 'pg/' + nextpage + '/';
|
86 |
+
}
|
87 |
+
return url;
|
88 |
+
},
|
89 |
+
getNext: function ( page, el, element ) {
|
90 |
+
if ( jQuery( '.rtmedia-no-media-found' ).length > 0 ) {
|
91 |
+
jQuery( '.rtmedia-no-media-found' ).replaceWith( "<ul class='rtmedia-list rtmedia-list-media'></ul>" );
|
92 |
+
}
|
93 |
+
that = this;
|
94 |
+
if ( rtmedia_load_template_flag == true ) {
|
95 |
+
if ( jQuery( '.rtmedia_gallery_wrapper' ).find( 'input[name=media_title]' ).length > 0 ) {
|
96 |
+
template_url += '&media_title=' + jQuery( '.rtmedia_gallery_wrapper' ).find( 'input[name=media_title]' ).val();
|
97 |
+
}
|
98 |
+
if ( jQuery( '.rtmedia_gallery_wrapper' ).find( 'input[name=lightbox]' ).length > 0 ) {
|
99 |
+
template_url += '&lightbox=' + jQuery( '.rtmedia_gallery_wrapper' ).find( 'input[name=lightbox]' ).val();
|
100 |
+
}
|
101 |
+
$( "#rtmedia-gallery-item-template" ).load( template_url, {
|
102 |
+
backbone: true,
|
103 |
+
is_album: o_is_album,
|
104 |
+
is_edit_allowed: o_is_edit_allowed
|
105 |
+
}, function () {
|
106 |
+
rtmedia_load_template_flag = false;
|
107 |
+
that.getNext( page, el, element );
|
108 |
+
} );
|
109 |
+
}
|
110 |
+
|
111 |
+
if ( ! rtmedia_load_template_flag ) {
|
112 |
+
var query = {
|
113 |
+
json: true,
|
114 |
+
rtmedia_page: nextpage
|
115 |
+
};
|
116 |
+
if ( el == undefined ) {
|
117 |
+
el = jQuery( ".rtmedia-list" ).parent().parent();
|
118 |
+
}
|
119 |
+
if ( el != undefined ) {
|
120 |
+
if ( element != undefined ) {
|
121 |
+
$( element ).parent().parent().prevAll( "input[type=hidden]" ).each( function ( e ) {
|
122 |
+
query[$( this ).attr( "name" )] = $( this ).val();
|
123 |
+
} );
|
124 |
+
}
|
125 |
+
$( el ).find( "input[type=hidden]" ).each( function ( e ) {
|
126 |
+
query[$( this ).attr( "name" )] = $( this ).val();
|
127 |
+
} );
|
128 |
+
}
|
129 |
+
this.fetch( {
|
130 |
+
data: query,
|
131 |
+
success: function ( model, response ) {
|
132 |
+
jQuery( '.rtm-media-loading' ).hide();
|
133 |
+
var list_el = "";
|
134 |
+
if ( typeof ( element ) === "undefined" )
|
135 |
+
list_el = $( ".rtmedia-list" )[0];
|
136 |
+
else
|
137 |
+
list_el = element.parent().siblings( '.rtmedia-list' );
|
138 |
+
nextpage = response.next;
|
139 |
+
|
140 |
+
if ( nextpage < 1 ) {
|
141 |
+
if ( typeof el == "object" ) {
|
142 |
+
jQuery( el ).find( '.rtmedia_next_prev' ).children( '#rtMedia-galary-next' ).hide();
|
143 |
+
}
|
144 |
+
//$("#rtMedia-galary-next").show();
|
145 |
+
}
|
146 |
+
|
147 |
+
var galleryViewObj = new rtMedia.GalleryView( {
|
148 |
+
collection: new rtMedia.Gallery( response.data ),
|
149 |
+
el: list_el
|
150 |
+
} );
|
151 |
+
//element.show();
|
152 |
+
jQuery( '.rtmedia-container .rtmedia-list' ).css( 'opacity', '1' );
|
153 |
+
rtMediaHook.call( 'rtmedia_after_gallery_load' );
|
154 |
+
|
155 |
+
jQuery( '.rtmedia-container .rtmedia_next_prev .rtm-pagination' ).remove();
|
156 |
+
jQuery( '.rtmedia-container .rtmedia_next_prev .clear' ).remove();
|
157 |
+
jQuery( '.rtmedia-container .rtmedia_next_prev .rtm-media-loading' ).remove();
|
158 |
+
jQuery( '.rtmedia-container .rtmedia_next_prev br' ).remove();
|
159 |
+
jQuery( '.rtmedia-container .rtmedia_next_prev' ).append( response.pagination );
|
160 |
+
}
|
161 |
+
} );
|
162 |
+
}
|
163 |
+
},
|
164 |
+
reloadView: function () {
|
165 |
+
upload_sync = true;
|
166 |
+
nextpage = 1;
|
167 |
+
jQuery( '.rtmedia-container .rtmedia-list' ).css( 'opacity', '0.5' );
|
168 |
+
this.getNext();
|
169 |
+
}
|
170 |
+
|
171 |
+
|
172 |
+
} );
|
173 |
+
|
174 |
+
rtMedia.MediaView = Backbone.View.extend( {
|
175 |
+
tagName: 'li',
|
176 |
+
className: 'rtmedia-list-item',
|
177 |
+
initialize: function () {
|
178 |
+
this.template = _.template( $( "#rtmedia-gallery-item-template" ).html() );
|
179 |
+
this.model.bind( 'change', this.render );
|
180 |
+
this.model.bind( 'remove', this.unrender );
|
181 |
+
this.render();
|
182 |
+
},
|
183 |
+
render: function () {
|
184 |
+
$( this.el ).html( this.template( this.model.toJSON() ) );
|
185 |
+
return this.el;
|
186 |
+
},
|
187 |
+
unrender: function () {
|
188 |
+
$( this.el ).remove();
|
189 |
+
},
|
190 |
+
remove: function () {
|
191 |
+
this.model.destroy();
|
192 |
+
}
|
193 |
+
} );
|
194 |
+
|
195 |
+
rtMedia.GalleryView = Backbone.View.extend( {
|
196 |
+
tagName: 'ul',
|
197 |
+
className: 'rtmedia-list',
|
198 |
+
initialize: function () {
|
199 |
+
this.template = _.template( $( "#rtmedia-gallery-item-template" ).html() );
|
200 |
+
this.render();
|
201 |
+
},
|
202 |
+
render: function () {
|
203 |
+
|
204 |
+
that = this;
|
205 |
+
|
206 |
+
if ( upload_sync ) {
|
207 |
+
$( that.el ).html( '' );
|
208 |
+
}
|
209 |
+
|
210 |
+
if ( typeof ( rtmedia_load_more_or_pagination ) != 'undefined' && rtmedia_load_more_or_pagination == 'pagination' ) {
|
211 |
+
$( that.el ).html( '' );
|
212 |
+
}
|
213 |
+
|
214 |
+
$.each( this.collection.toJSON(), function ( key, media ) {
|
215 |
+
$( that.el ).append( that.template( media ) );
|
216 |
+
} );
|
217 |
+
|
218 |
+
if ( upload_sync ) {
|
219 |
+
upload_sync = false;
|
220 |
+
}
|
221 |
+
if ( nextpage > 1 ) {
|
222 |
+
$( that.el ).siblings( '.rtmedia_next_prev' ).children( '#rtMedia-galary-next' ).show();
|
223 |
+
//$("#rtMedia-galary-next").show();
|
224 |
+
}
|
225 |
+
if ( typeof rtmedia_masonry_layout != "undefined" && rtmedia_masonry_layout == "true" && jQuery( '.rtmedia-container .rtmedia-list.rtm-no-masonry' ).length == 0 ) {
|
226 |
+
rtm_masonry_reload( rtm_masonry_container );
|
227 |
+
}
|
228 |
+
},
|
229 |
+
appendTo: function ( media ) {
|
230 |
+
//console.log("append");
|
231 |
+
var mediaView = new rtMedia.MediaView( {
|
232 |
+
model: media
|
233 |
+
} );
|
234 |
+
$( this.el ).append( mediaView.render().el );
|
235 |
+
}
|
236 |
+
} );
|
237 |
+
|
238 |
+
|
239 |
+
galleryObj = new rtMedia.Gallery();
|
240 |
+
|
241 |
+
$( "body" ).append( '<script id="rtmedia-gallery-item-template" type="text/template"></script>' );
|
242 |
+
|
243 |
+
$( document ).on( "click", "#rtMedia-galary-next", function ( e ) {
|
244 |
+
if ( jQuery( '.rtm-media-loading' ).length == 0 ) {
|
245 |
+
$( this ).before( "<div class='rtm-media-loading'><img src='" + rMedia_loading_media + "' /></div>" );
|
246 |
+
} else {
|
247 |
+
jQuery( '.rtm-media-loading' ).show();
|
248 |
+
}
|
249 |
+
$( this ).hide();
|
250 |
+
e.preventDefault();
|
251 |
+
galleryObj.getNext( nextpage, $( this ).parent().parent().parent(), $( this ) );
|
252 |
+
} );
|
253 |
+
|
254 |
+
$( document ).on( "click", ".rtmedia-page-link", function ( e ) {
|
255 |
+
if ( jQuery( '.rtm-media-loading' ).length == 0 ) {
|
256 |
+
$( '.rtm-pagination' ).before( "<div class='rtm-media-loading'><img src='" + rMedia_loading_media + "' /></div>" );
|
257 |
+
} else {
|
258 |
+
jQuery( '.rtm-media-loading' ).show();
|
259 |
+
}
|
260 |
+
|
261 |
+
e.preventDefault();
|
262 |
+
if ( $( this ).data( 'page-type' ) == 'page' ) {
|
263 |
+
nextpage = $( this ).data( 'page' );
|
264 |
+
} else if ( $( this ).data( 'page-type' ) == 'prev' ) {
|
265 |
+
if ( nextpage == - 1 ) {
|
266 |
+
nextpage = parseInt( $( '#rtmedia_last_page' ).val() ) - 1;
|
267 |
+
} else {
|
268 |
+
nextpage -= 2;
|
269 |
+
}
|
270 |
+
} else if ( $( this ).data( 'page-type' ) == 'num' ) {
|
271 |
+
if ( parseInt( $( '#rtmedia_go_to_num' ).val() ) > parseInt( $( '#rtmedia_last_page' ).val() ) ) {
|
272 |
+
nextpage = parseInt( $( '#rtmedia_last_page' ).val() );
|
273 |
+
} else {
|
274 |
+
nextpage = parseInt( $( '#rtmedia_go_to_num' ).val() );
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
if ( $( this ).data( 'page-type' ) == 'num' ) {
|
279 |
+
galleryObj.getNext( nextpage, $( this ).parent().parent().parent().parent().parent(), $( this ).parent().parent() );
|
280 |
+
} else {
|
281 |
+
galleryObj.getNext( nextpage, $( this ).parent().parent().parent().parent().parent(), $( this ).parent().parent() );
|
282 |
+
}
|
283 |
+
} );
|
284 |
+
|
285 |
+
if ( window.location.pathname.indexOf( rtmedia_media_slug ) != - 1 ) {
|
286 |
+
var tempNext = window.location.pathname.substring( window.location.pathname.lastIndexOf( "pg/" ) + 5, window.location.pathname.lastIndexOf( "/" ) );
|
287 |
+
if ( isNaN( tempNext ) === false ) {
|
288 |
+
nextpage = parseInt( tempNext ) + 1;
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
|
293 |
+
window.UploadView = Backbone.View.extend( {
|
294 |
+
events: {
|
295 |
+
"click #rtMedia-start-upload": "uploadFiles"
|
296 |
+
},
|
297 |
+
initialize: function ( config ) {
|
298 |
+
this.uploader = new plupload.Uploader( config );
|
299 |
+
},
|
300 |
+
render: function () {
|
301 |
+
|
302 |
+
},
|
303 |
+
initUploader: function ( a ) {
|
304 |
+
if ( typeof ( a ) !== "undefined" )
|
305 |
+
a = false;// if rtmediapro widget calls the function, dont show max size note.
|
306 |
+
this.uploader.init();
|
307 |
+
//The plupload HTML5 code gives a negative z-index making add files button unclickable
|
308 |
+
$( ".plupload.html5" ).css( {
|
309 |
+
zIndex: 0
|
310 |
+
} );
|
311 |
+
$( "#rtMedia-upload-button" ).css( {
|
312 |
+
zIndex: 2
|
313 |
+
} );
|
314 |
+
if ( a !== false ) {
|
315 |
+
window.file_size_info = rtmedia_max_file_msg + this.uploader.settings.max_file_size_msg;
|
316 |
+
if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
|
317 |
+
file_extn = this.uploader.settings.filters.mime_types[0].extensions;
|
318 |
+
} else {
|
319 |
+
file_extn = this.uploader.settings.filters[0].extensions;
|
320 |
+
}
|
321 |
+
window.file_extn_info = rtmedia_allowed_file_formats + " : " + file_extn.split( ',' ).join( ', ' );
|
322 |
+
|
323 |
+
var info = window.file_size_info + "\n" + window.file_extn_info;
|
324 |
+
$( ".rtm-file-size-limit" ).attr( 'title', info );
|
325 |
+
//$("#rtMedia-upload-button").after("<span>( <strong>" + rtmedia_max_file_msg + "</strong> "+ this.uploader.settings.max_file_size_msg + ")</span>");
|
326 |
+
}
|
327 |
+
|
328 |
+
return this;
|
329 |
+
},
|
330 |
+
uploadFiles: function ( e ) {
|
331 |
+
if ( e != undefined )
|
332 |
+
e.preventDefault();
|
333 |
+
this.uploader.start();
|
334 |
+
return false;
|
335 |
+
}
|
336 |
+
|
337 |
+
} );
|
338 |
+
|
339 |
+
|
340 |
+
if ( $( "#rtMedia-upload-button" ).length > 0 ) {
|
341 |
+
if ( typeof rtmedia_upload_type_filter == "object" && rtmedia_upload_type_filter.length > 0 ) {
|
342 |
+
rtMedia_plupload_config.filters[0].extensions = rtmedia_upload_type_filter.join();
|
343 |
+
}
|
344 |
+
uploaderObj = new UploadView( rtMedia_plupload_config );
|
345 |
+
uploaderObj.initUploader();
|
346 |
+
|
347 |
+
|
348 |
+
uploaderObj.uploader.bind( 'UploadComplete', function ( up, files ) {
|
349 |
+
activity_id = - 1;
|
350 |
+
var hook_respo = rtMediaHook.call( 'rtmedia_js_after_files_uploaded' );
|
351 |
+
if ( typeof rtmedia_gallery_reload_on_upload != "undefined" && rtmedia_gallery_reload_on_upload == '1' ) { //reload gallery view when upload completes if enabled( by default enabled)
|
352 |
+
if ( hook_respo != false ) {
|
353 |
+
galleryObj.reloadView();
|
354 |
+
}
|
355 |
+
}
|
356 |
+
jQuery( '#rtmedia_uploader_filelist li.plupload_queue_li' ).remove();
|
357 |
+
jQuery( '.start-media-upload' ).hide();
|
358 |
apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content' ) );
|
359 |
+
window.onbeforeunload = null;
|
360 |
+
} );
|
361 |
+
|
362 |
+
uploaderObj.uploader.bind( 'FilesAdded', function ( up, files ) {
|
363 |
+
var upload_size_error = false;
|
364 |
+
var upload_error = "";
|
365 |
+
var upload_error_sep = "";
|
366 |
+
var upload_remove_array = [ ];
|
367 |
+
$.each( files, function ( i, file ) {
|
368 |
+
//set file title along with file
|
369 |
+
rtm_file_name_array = file.name.split( '.' );
|
370 |
+
file.title = rtm_file_name_array[0];
|
371 |
+
|
372 |
+
var hook_respo = rtMediaHook.call( 'rtmedia_js_file_added', [ up, file, "#rtmedia_uploader_filelist" ] );
|
373 |
+
|
374 |
+
if ( hook_respo == false ) {
|
375 |
+
file.status = - 1;
|
376 |
+
upload_remove_array.push( file.id );
|
377 |
+
return true;
|
378 |
+
}
|
379 |
+
|
380 |
+
jQuery( '.rtmedia-upload-input' ).attr( 'value', rtmedia_add_more_files_msg );
|
381 |
+
if( typeof rtmedia_direct_upload_enabled != 'undefined' && rtmedia_direct_upload_enabled == '1' ) {
|
382 |
+
jQuery( '.start-media-upload' ).hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
} else {
|
384 |
+
jQuery( '.start-media-upload' ).show();
|
385 |
}
|
386 |
+
if ( uploaderObj.uploader.settings.max_file_size < file.size ) {
|
387 |
+
return true;
|
388 |
+
}
|
389 |
+
var tmp_array = file.name.split( "." );
|
390 |
+
if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
|
391 |
+
var ext_array = uploaderObj.uploader.settings.filters.mime_types[0].extensions.split( ',' );
|
392 |
+
} else {
|
393 |
+
var ext_array = uploaderObj.uploader.settings.filters[0].extensions.split( ',' );
|
394 |
+
}
|
395 |
+
if ( tmp_array.length > 1 ) {
|
396 |
+
var ext = tmp_array[tmp_array.length - 1];
|
397 |
+
ext = ext.toLowerCase();
|
398 |
+
if ( jQuery.inArray( ext, ext_array ) === - 1 ) {
|
399 |
+
return true;
|
400 |
+
}
|
401 |
+
} else {
|
402 |
+
return true;
|
403 |
+
}
|
404 |
+
|
405 |
+
if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
|
406 |
+
uploaderObj.uploader.settings.filters.mime_types[0].title;
|
407 |
+
} else {
|
408 |
+
uploaderObj.uploader.settings.filters[0].title;
|
409 |
+
}
|
410 |
+
|
411 |
+
// Creating list of media to preview selected files
|
412 |
+
rtmedia_selected_file_list( plupload, file, '', '' );
|
413 |
+
|
414 |
+
//Delete Function
|
415 |
+
$( "#" + file.id + " .plupload_delete .remove-from-queue" ).click( function ( e ) {
|
416 |
+
e.preventDefault();
|
417 |
+
uploaderObj.uploader.removeFile( up.getFile( file.id ) );
|
418 |
+
$( "#" + file.id ).remove();
|
419 |
+
rtMediaHook.call( 'rtmedia_js_file_remove', [ up, file ] );
|
420 |
+
return false;
|
421 |
+
} );
|
422 |
+
|
423 |
+
// To change the name of the uploading file
|
424 |
+
$( "#label_" + file.id ).click( function ( e ) {
|
425 |
e.preventDefault();
|
426 |
|
427 |
rtm_file_label = this;
|
428 |
+
rtm_file_title_input = '#text_' + file.id;
|
429 |
+
rtm_file_title_save = '#save_' + file.id;
|
430 |
|
431 |
jQuery( rtm_file_label ).hide();
|
432 |
+
jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ).hide();
|
|
|
433 |
|
434 |
// show/create text box to edit media title
|
435 |
+
if( jQuery( rtm_file_title_input ).length === 0 ) {
|
436 |
+
jQuery( rtm_file_label ).parent( '.plupload_file_name' ).prepend( '<input type="text" id="text_' + file.id + '" value="' + file.title + '" style="width: 75%;" /><span id="save_' + file.id + '" title="Save Change" class="rtmicon dashicons dashicons-yes"></span>' );
|
437 |
} else {
|
438 |
jQuery( rtm_file_title_input ).show();
|
439 |
+
jQuery( rtm_file_title_save ).show();
|
440 |
}
|
441 |
+
|
442 |
jQuery( rtm_file_title_input ).focus();
|
443 |
|
444 |
// set new media title
|
445 |
+
jQuery( rtm_file_title_input ).keyup( function( e ) {
|
446 |
if( this.value != '' ) {
|
447 |
file.title = this.value;
|
448 |
}
|
449 |
+
|
450 |
+
if( e.keyCode == '13' ) {
|
451 |
return false;
|
452 |
}
|
453 |
+
} );
|
454 |
|
455 |
// hide input box for media title and show label of media title
|
456 |
+
jQuery( rtm_file_title_input ).blur( function( e ) {
|
457 |
+
if ( this.value != '' ) {
|
458 |
jQuery( rtm_file_title_input ).hide();
|
459 |
+
jQuery( rtm_file_title_save ).hide();
|
460 |
+
jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ).text( file.title + "." + rtm_file_name_array[ 1 ] );
|
461 |
}
|
462 |
+
|
463 |
+
jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ).show();
|
464 |
jQuery( rtm_file_label ).show();
|
465 |
+
} );
|
466 |
} );
|
467 |
+
} );
|
468 |
+
|
469 |
+
$.each( upload_remove_array, function ( i, rfile ) {
|
470 |
+
if ( up.getFile( rfile ) )
|
471 |
+
up.removeFile( up.getFile( rfile ) );
|
472 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
473 |
|
474 |
+
rtMediaHook.call( 'rtmedia_js_after_files_added', [ up, files ] );
|
475 |
+
|
476 |
+
if( typeof rtmedia_direct_upload_enabled != 'undefined' && rtmedia_direct_upload_enabled == '1' ) {
|
477 |
+
jQuery( '.start-media-upload' ).trigger( 'click' );
|
|
|
478 |
}
|
479 |
|
480 |
+
} );
|
481 |
+
|
482 |
+
uploaderObj.uploader.bind( 'Error', function ( up, err ) {
|
483 |
+
|
484 |
+
if ( err.code == - 600 ) { //file size error // if file size is greater than server's max allowed size
|
485 |
+
var tmp_array;
|
486 |
+
var ext = tr = '';
|
487 |
+
tmp_array = err.file.name.split( "." );
|
488 |
+
if ( tmp_array.length > 1 ) {
|
489 |
+
ext = tmp_array[tmp_array.length - 1];
|
490 |
+
if ( ! ( typeof ( up.settings.upload_size ) != "undefined" && typeof ( up.settings.upload_size[ext] ) != "undefined" && typeof ( up.settings.upload_size[ext]['size'] ) ) ) {
|
491 |
+
rtmedia_selected_file_list( plupload, err.file, up, err );
|
492 |
+
}
|
493 |
+
}
|
494 |
+
}
|
495 |
+
else {
|
496 |
+
|
497 |
+
if ( err.code == - 601 ) { // file extension error
|
498 |
+
err.message = rtmedia_file_extension_error_msg;
|
499 |
+
}
|
500 |
+
|
501 |
+
rtmedia_selected_file_list( plupload, err.file, '', err );
|
502 |
+
}
|
503 |
+
|
504 |
+
jQuery( '.plupload_delete' ).on( 'click', function ( e ) {
|
505 |
+
e.preventDefault();
|
506 |
+
jQuery( this ).parent().parent( 'li' ).remove();
|
507 |
+
} );
|
508 |
+
return false;
|
509 |
+
|
510 |
+
} );
|
511 |
+
|
512 |
jQuery( '.start-media-upload' ).on( 'click', function ( e ) {
|
513 |
e.preventDefault();
|
514 |
var allow_upload = rtMediaHook.call( 'rtmedia_js_upload_file', true );
|
518 |
uploaderObj.uploadFiles();
|
519 |
} );
|
520 |
|
521 |
+
uploaderObj.uploader.bind( 'UploadProgress', function ( up, file ) {
|
522 |
+
//$("#" + file.id + " .plupload_file_status").html(file.percent + "%");
|
523 |
+
//$( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploading_msg + '( ' + file.percent + '% )' );
|
524 |
+
$( "#" + file.id + " .plupload_file_status" ).html( '<div class="plupload_file_progress ui-widget-header" style="width: ' + file.percent + '%;"></div>' );
|
525 |
+
$( "#" + file.id ).addClass( 'upload-progress' );
|
526 |
+
if ( file.percent == 100 ) {
|
527 |
+
$( "#" + file.id ).toggleClass( 'upload-success' );
|
528 |
+
}
|
529 |
+
|
530 |
+
window.onbeforeunload = function ( evt ) {
|
531 |
+
var message = rtmedia_upload_progress_error_message;
|
532 |
+
return message;
|
533 |
+
};
|
534 |
+
} );
|
535 |
+
|
536 |
+
uploaderObj.uploader.bind( 'BeforeUpload', function ( up, file ) {
|
537 |
+
up.settings.multipart_params.title = file.title.split( '.' )[ 0 ];
|
538 |
+
var privacy = $( "#rtm-file_upload-ui select.privacy" ).val();
|
539 |
+
if ( privacy !== undefined ) {
|
540 |
+
up.settings.multipart_params.privacy = $( "#rtm-file_upload-ui select.privacy" ).val();
|
541 |
+
}
|
542 |
+
if ( jQuery( "#rt_upload_hf_redirect" ).length > 0 )
|
543 |
+
up.settings.multipart_params.redirect = up.files.length;
|
544 |
+
jQuery( "#rtmedia-uploader-form input[type=hidden]" ).each( function () {
|
545 |
+
up.settings.multipart_params[$( this ).attr( "name" )] = $( this ).val();
|
546 |
+
} );
|
547 |
+
up.settings.multipart_params.activity_id = activity_id;
|
548 |
+
if ( $( '#rtmedia-uploader-form .rtmedia-user-album-list' ).length > 0 )
|
549 |
+
up.settings.multipart_params.album_id = $( '#rtmedia-uploader-form .rtmedia-user-album-list' ).find( ":selected" ).val();
|
550 |
+
else if ( $( '#rtmedia-uploader-form .rtmedia-current-album' ).length > 0 )
|
551 |
+
up.settings.multipart_params.album_id = $( '#rtmedia-uploader-form .rtmedia-current-album' ).val();
|
552 |
+
} );
|
553 |
+
|
554 |
+
uploaderObj.uploader.bind( 'FileUploaded', function ( up, file, res ) {
|
555 |
+
if ( /MSIE (\d+\.\d+);/.test( navigator.userAgent ) ) { //test for MSIE x.x;
|
556 |
+
var ieversion = new Number( RegExp.$1 ) // capture x.x portion and store as a number
|
557 |
+
|
558 |
+
if ( ieversion < 10 ) {
|
559 |
+
if ( typeof res.response !== "undefined" )
|
560 |
+
res.status = 200;
|
561 |
+
}
|
562 |
+
}
|
563 |
+
var rtnObj;
|
564 |
+
try {
|
565 |
+
|
566 |
+
rtnObj = JSON.parse( res.response );
|
567 |
+
uploaderObj.uploader.settings.multipart_params.activity_id = rtnObj.activity_id;
|
568 |
+
activity_id = rtnObj.activity_id;
|
569 |
+
if ( rtnObj.permalink != '' ) {
|
570 |
+
$( "#" + file.id + " .plupload_file_name" ).html( "<a href='" + rtnObj.permalink + "' target='_blank' title='" + rtnObj.permalink + "'>" + file.title.substring( 0, 40 ).replace( /(<([^>]+)>)/ig, "" ) + "</a>" );
|
571 |
+
$( "#" + file.id + " .plupload_media_edit" ).html( "<a href='" + rtnObj.permalink + "edit' target='_blank'><span title='" + rtmedia_edit_media + "'><i class='dashicons dashicons-edit rtmicon'></i> " + rtmedia_edit + "</span></a>" );
|
572 |
+
$( "#" + file.id + " .plupload_delete" ).html( "<span id='" + rtnObj.media_id + "' class='rtmedia-delete-uploaded-media' title='" + rtmedia_delete + "'>×</span>" );
|
573 |
+
}
|
574 |
+
|
575 |
+
} catch ( e ) {
|
576 |
+
// console.log('Invalid Activity ID');
|
577 |
+
}
|
578 |
+
if ( res.status == 200 || res.status == 302 ) {
|
579 |
+
if ( uploaderObj.upload_count == undefined )
|
580 |
+
uploaderObj.upload_count = 1;
|
581 |
+
else
|
582 |
+
uploaderObj.upload_count ++;
|
583 |
+
|
584 |
+
if ( uploaderObj.upload_count == up.files.length && jQuery( "#rt_upload_hf_redirect" ).length > 0 && jQuery.trim( rtnObj.redirect_url.indexOf( "http" ) == 0 ) ) {
|
585 |
+
window.location = rtnObj.redirect_url;
|
586 |
+
}
|
587 |
+
|
588 |
+
$( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploaded_msg );
|
589 |
+
rtMediaHook.call( 'rtmedia_js_after_file_upload', [ up, file, res.response ] );
|
590 |
+
} else {
|
591 |
+
$( "#" + file.id + " .plupload_file_status" ).html( rtmedia_upload_failed_msg );
|
592 |
+
}
|
593 |
+
|
594 |
+
files = up.files;
|
595 |
+
lastfile = files[files.length - 1];
|
596 |
+
|
597 |
+
|
598 |
+
} );
|
599 |
+
|
600 |
+
uploaderObj.uploader.refresh();//refresh the uploader for opera/IE fix on media page
|
601 |
+
|
602 |
+
$( "#rtMedia-start-upload" ).click( function ( e ) {
|
603 |
+
uploaderObj.uploadFiles( e );
|
604 |
+
} );
|
605 |
+
$( "#rtMedia-start-upload" ).hide();
|
606 |
+
|
607 |
+
jQuery( document ).on( 'click', '#rtm_show_upload_ui', function () {
|
608 |
+
jQuery( '#rtm-media-gallery-uploader' ).slideToggle();
|
609 |
+
uploaderObj.uploader.refresh();//refresh the uploader for opera/IE fix on media page
|
610 |
+
jQuery( '#rtm_show_upload_ui' ).toggleClass( 'primary' );
|
611 |
+
} );
|
612 |
+
} else {
|
613 |
+
jQuery( document ).on( 'click', '#rtm_show_upload_ui', function () {
|
614 |
+
jQuery( '#rtm-media-gallery-uploader' ).slideToggle();
|
615 |
+
jQuery( '#rtm_show_upload_ui' ).toggleClass( 'primary' );
|
616 |
+
} );
|
617 |
+
}
|
618 |
+
|
619 |
+
jQuery( document ).on( 'click', '.plupload_delete .rtmedia-delete-uploaded-media', function () {
|
620 |
+
var that = $( this );
|
621 |
+
if ( confirm( rtmedia_delete_uploaded_media ) ) {
|
622 |
+
var nonce = $( '#rtmedia-upload-container #rtmedia_media_delete_nonce' ).val();
|
623 |
+
var media_id = $( this ).attr( 'id' );
|
624 |
+
var data = {
|
625 |
+
action: 'delete_uploaded_media',
|
626 |
+
nonce: nonce,
|
627 |
+
media_id: media_id
|
628 |
+
}
|
629 |
+
|
630 |
+
$.post( ajaxurl, data, function ( response ) {
|
631 |
+
if ( response == '1' ) {
|
632 |
+
that.closest( 'tr' ).remove();
|
633 |
+
$( '#' + media_id ).remove();
|
634 |
+
}
|
635 |
+
} );
|
636 |
+
}
|
637 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
638 |
|
639 |
|
640 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
641 |
|
642 |
/** Activity Update Js **/
|
643 |
|
644 |
jQuery( document ).ready( function ( $ ) {
|
645 |
|
646 |
+
//handling the "post update: button on activity page
|
647 |
+
jQuery( '#aw-whats-new-submit' ).removeAttr( 'disabled' );
|
648 |
+
jQuery( document ).on( "blur", '#whats-new', function () {
|
649 |
+
setTimeout( function () {
|
650 |
+
jQuery( '#aw-whats-new-submit' ).removeAttr( 'disabled' );
|
651 |
+
}, 100 );
|
652 |
+
} );
|
653 |
+
jQuery( '#aw-whats-new-submit' ).on( 'click', function ( e ) {
|
654 |
+
setTimeout( function () {
|
655 |
+
jQuery( '#aw-whats-new-submit' ).removeAttr( 'disabled' );
|
656 |
+
}, 100 );
|
657 |
+
} );
|
658 |
+
|
659 |
+
// when user changes the value in activity "post in" dropdown, hide the privacy dropdown and show when posting in profile.
|
660 |
+
jQuery( '#whats-new-post-in' ).on( 'change', function ( e ) {
|
661 |
+
if ( jQuery( this ).val() == '0' ) {
|
662 |
+
jQuery( "#rtmedia-action-update .privacy" ).prop( 'disabled', false ).show();
|
663 |
+
} else {
|
664 |
+
jQuery( "#rtmedia-action-update .privacy" ).prop( 'disabled', true ).hide();
|
665 |
+
}
|
666 |
+
} );
|
667 |
+
|
668 |
+
if ( typeof rtMedia_update_plupload_config == 'undefined' ) {
|
669 |
+
return false;
|
670 |
+
}
|
671 |
+
var activity_attachemnt_ids = [ ];
|
672 |
+
|
673 |
+
objUploadView = new UploadView( rtMedia_update_plupload_config );
|
674 |
+
objUploadView.initUploader();
|
675 |
+
|
676 |
+
setTimeout( function () {
|
677 |
+
if ( $( "#rtmedia-add-media-button-post-update" ).length > 0 ) {
|
678 |
+
$( "#whats-new-options" ).prepend( $( ".rtmedia-plupload-container" ) );
|
679 |
+
if ( $( "#rtm-file_upload-ui .privacy" ).length > 0 ) {
|
680 |
+
$( ".rtmedia-plupload-container" ).append( $( "#rtm-file_upload-ui .privacy" ) );
|
681 |
+
}
|
682 |
+
$( '#rtmedia-whts-new-upload-container > div' ).css( 'top', '0' );
|
683 |
+
$( '#rtmedia-whts-new-upload-container > div' ).css( 'left', '0' );
|
684 |
+
}
|
685 |
}, 100 );
|
686 |
+
|
687 |
+
if ( $( '#whats-new-options' ).length > 0 && $( '.rtmedia-uploader-div' ).length > 0 ) {
|
688 |
+
$( '#whats-new-options' ).append( $( '.rtmedia-uploader-div' ) );
|
689 |
+
}
|
690 |
+
|
691 |
+
$( "#whats-new-form" ).on( 'click', '#rtmedia-add-media-button-post-update', function ( e ) {
|
692 |
+
objUploadView.uploader.refresh();
|
693 |
+
$( '#rtmedia-whts-new-upload-container > div' ).css( 'top', '0' );
|
694 |
+
$( '#rtmedia-whts-new-upload-container > div' ).css( 'left', '0' );
|
695 |
+
} );
|
696 |
+
//whats-new-post-in
|
697 |
+
|
698 |
+
objUploadView.upload_remove_array = [ ];
|
699 |
+
objUploadView.uploader.bind( 'FilesAdded', function ( upl, rfiles ) {
|
700 |
+
//$("#aw-whats-new-submit").attr('disabled', 'disabled');
|
701 |
+
|
702 |
+
$.each( rfiles, function ( i, file ) {
|
703 |
+
|
704 |
+
//set file title along with file
|
705 |
+
rtm_file_name_array = file.name.split( '.' );
|
706 |
+
file.title = rtm_file_name_array[0];
|
707 |
+
|
708 |
+
var hook_respo = rtMediaHook.call( 'rtmedia_js_file_added', [ upl, file, "#rtmedia_uploader_filelist" ] );
|
709 |
+
|
710 |
+
if ( hook_respo == false ) {
|
711 |
+
file.status = - 1;
|
712 |
+
objUploadView.upload_remove_array.push( file.id );
|
713 |
+
return true;
|
714 |
+
}
|
715 |
+
|
716 |
+
if ( objUploadView.uploader.settings.max_file_size < file.size ) {
|
717 |
+
return true;
|
718 |
+
}
|
719 |
+
|
720 |
+
var tmp_array = file.name.split( "." );
|
721 |
+
|
722 |
+
if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
|
723 |
+
var ext_array = objUploadView.uploader.settings.filters.mime_types[0].extensions.split( ',' );
|
724 |
+
} else {
|
725 |
+
var ext_array = objUploadView.uploader.settings.filters[0].extensions.split( ',' );
|
726 |
+
}
|
727 |
+
if ( tmp_array.length > 1 ) {
|
728 |
+
var ext = tmp_array[tmp_array.length - 1];
|
729 |
+
ext = ext.toLowerCase();
|
730 |
+
if ( jQuery.inArray( ext, ext_array ) === - 1 ) {
|
731 |
+
return true;
|
732 |
+
}
|
733 |
+
} else {
|
734 |
+
return true;
|
735 |
+
}
|
736 |
+
|
737 |
+
rtmedia_selected_file_list( plupload, file, '', '' );
|
738 |
+
|
739 |
+
jQuery( '#whats-new-content' ).css( 'padding-bottom', '0px' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
740 |
|
741 |
+
$( "#" + file.id + " .plupload_delete" ).click( function ( e ) {
|
742 |
+
e.preventDefault();
|
743 |
+
objUploadView.uploader.removeFile( upl.getFile( file.id ) );
|
744 |
+
$( "#" + file.id ).remove();
|
745 |
+
return false;
|
746 |
+
} );
|
747 |
+
|
748 |
+
// To change the name of the uploading file
|
749 |
$( "#label_" + file.id ).click( function ( e ) {
|
750 |
e.preventDefault();
|
751 |
|
752 |
rtm_file_label = this;
|
753 |
+
rtm_file_title_input = '#text_' + file.id;
|
754 |
+
rtm_file_title_save = '#save_' + file.id;
|
755 |
|
756 |
jQuery( rtm_file_label ).hide();
|
757 |
+
jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ).hide();
|
|
|
758 |
|
759 |
// show/create text box to edit media title
|
760 |
+
if( jQuery( rtm_file_title_input ).length === 0 ) {
|
761 |
+
jQuery( rtm_file_label ).parent( '.plupload_file_name' ).prepend( '<input type="text" id="text_' + file.id + '" value="' + file.title + '" style="width: 75%;" /><span id="save_' + file.id + '" title="Save Change" class="rtmicon dashicons dashicons-yes"></span>' );
|
762 |
} else {
|
763 |
jQuery( rtm_file_title_input ).show();
|
764 |
+
jQuery( rtm_file_title_save ).show();
|
765 |
}
|
766 |
+
|
767 |
jQuery( rtm_file_title_input ).focus();
|
768 |
|
769 |
// set new media title
|
770 |
+
jQuery( rtm_file_title_input ).keyup( function( e ) {
|
771 |
if( this.value != '' ) {
|
772 |
file.title = this.value;
|
773 |
}
|
774 |
+
|
775 |
+
if( e.keyCode == '13' ) {
|
776 |
return false;
|
777 |
}
|
778 |
+
} );
|
779 |
|
780 |
// hide input box for media title and show label of media title
|
781 |
+
jQuery( rtm_file_title_input ).blur( function( e ) {
|
782 |
+
if ( this.value != '' ) {
|
783 |
jQuery( rtm_file_title_input ).hide();
|
784 |
+
jQuery( rtm_file_title_save ).hide();
|
785 |
+
jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ).text( file.title + "." + rtm_file_name_array[ 1 ] );
|
786 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
787 |
|
788 |
+
jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ).show();
|
789 |
+
jQuery( rtm_file_label ).show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
790 |
} );
|
791 |
+
} );
|
792 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
793 |
|
794 |
+
$.each( objUploadView.upload_remove_array, function ( i, rfile ) {
|
795 |
+
if ( upl.getFile( rfile ) )
|
796 |
+
upl.removeFile( upl.getFile( rfile ) );
|
797 |
+
} );
|
798 |
|
799 |
+
if( jQuery.trim( jQuery( "#whats-new" ).val() ) != "" ) {
|
800 |
+
var allow_upload = rtMediaHook.call( 'rtmedia_js_upload_file', true );
|
801 |
+
|
802 |
+
if( allow_upload == false ) {
|
803 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
}
|
805 |
+
|
806 |
+
objUploadView.uploadFiles();
|
807 |
}
|
808 |
+
} );
|
809 |
+
|
810 |
+
objUploadView.uploader.bind( 'FileUploaded', function ( up, file, res ) {
|
811 |
+
if ( /MSIE (\d+\.\d+);/.test( navigator.userAgent ) ) { //test for MSIE x.x;
|
812 |
+
var ieversion = new Number( RegExp.$1 ) // capture x.x portion and store as a number
|
813 |
+
|
814 |
+
if ( ieversion < 10 ) {
|
815 |
+
try {
|
816 |
+
if ( typeof JSON.parse( res.response ) !== "undefined" )
|
817 |
+
res.status = 200;
|
818 |
+
}
|
819 |
+
catch ( e ) {
|
820 |
+
}
|
821 |
+
}
|
822 |
+
}
|
823 |
+
|
824 |
+
if ( res.status == 200 ) {
|
825 |
+
try {
|
826 |
+
var objIds = JSON.parse( res.response );
|
827 |
+
$.each( objIds, function ( key, val ) {
|
828 |
+
activity_attachemnt_ids.push( val );
|
829 |
+
if ( $( "#whats-new-form" ).find( "#rtmedia_attached_id_" + val ).length < 1 ) {
|
830 |
+
$( "#whats-new-form" ).append( "<input type='hidden' name='rtMedia_attached_files[]' data-mode='rtMedia-update' id='rtmedia_attached_id_" + val + "' value='"
|
831 |
+
+ val + "' />" );
|
832 |
+
}
|
833 |
+
} );
|
834 |
+
} catch ( e ) {
|
835 |
+
|
836 |
+
}
|
837 |
+
rtMediaHook.call( 'rtmedia_js_after_file_upload', [ up, file, res.response ] );
|
838 |
+
}
|
839 |
+
} );
|
840 |
+
|
841 |
+
objUploadView.uploader.bind( 'Error', function ( up, err ) {
|
842 |
+
|
843 |
+
if ( err.code == - 600 ) { //file size error // if file size is greater than server's max allowed size
|
844 |
+
var tmp_array;
|
845 |
+
var ext = tr = '';
|
846 |
+
tmp_array = err.file.name.split( "." );
|
847 |
+
if ( tmp_array.length > 1 ) {
|
848 |
+
|
849 |
+
ext = tmp_array[tmp_array.length - 1];
|
850 |
+
if ( ! ( typeof ( up.settings.upload_size ) != "undefined" && typeof ( up.settings.upload_size[ext] ) != "undefined" && ( up.settings.upload_size[ext]["size"] < 1 || ( up.settings.upload_size[ext]["size"] * 1024 * 1024 ) >= err.file.size ) ) ) {
|
851 |
+
rtmedia_selected_file_list( plupload, err.file, up, err );
|
852 |
+
}
|
853 |
+
}
|
854 |
+
}
|
855 |
+
else {
|
856 |
+
if ( err.code == - 601 ) { // file extension error
|
857 |
+
err.message = rtmedia_file_extension_error_msg;
|
858 |
+
}
|
859 |
+
|
860 |
+
rtmedia_selected_file_list( plupload, err.file, '', err );
|
861 |
+
}
|
862 |
+
|
863 |
+
jQuery( '.plupload_delete' ).on( 'click', function ( e ) {
|
864 |
+
e.preventDefault();
|
865 |
+
jQuery( this ).parent().parent( 'li' ).remove();
|
866 |
+
} );
|
867 |
+
|
868 |
+
return false;
|
869 |
+
|
870 |
+
} );
|
871 |
+
|
872 |
+
objUploadView.uploader.bind( 'BeforeUpload', function ( up, files ) {
|
873 |
+
|
874 |
+
$.each( objUploadView.upload_remove_array, function ( i, rfile ) {
|
875 |
+
if ( up.getFile( rfile ) )
|
876 |
+
up.removeFile( up.getFile( rfile ) );
|
877 |
+
} );
|
878 |
+
|
879 |
+
var object = '';
|
880 |
+
var item_id = jq( "#whats-new-post-in" ).val();
|
881 |
+
if ( item_id == undefined )
|
882 |
+
item_id = 0;
|
883 |
+
if ( item_id > 0 ) {
|
884 |
+
object = "group";
|
885 |
+
} else {
|
886 |
+
object = "profile";
|
887 |
+
}
|
888 |
+
|
889 |
+
up.settings.multipart_params.context = object;
|
890 |
+
up.settings.multipart_params.context_id = item_id;
|
891 |
+
up.settings.multipart_params.title = files.title.split( '.' )[ 0 ];
|
892 |
+
// if privacy dropdown is not disabled, then get the privacy value of the update
|
893 |
+
if ( jQuery( "select.privacy" ).prop( 'disabled' ) === false ) {
|
894 |
+
up.settings.multipart_params.privacy = jQuery( "select.privacy" ).val();
|
895 |
+
}
|
896 |
+
} );
|
897 |
+
objUploadView.uploader.bind( 'UploadComplete', function ( up, files ) {
|
898 |
+
media_uploading = true;
|
899 |
+
$( "#aw-whats-new-submit" ).click();
|
900 |
+
$( '#rtmedia_uploader_filelist li.plupload_queue_li' ).remove();
|
901 |
+
//$("#aw-whats-new-submit").removeAttr('disabled');
|
902 |
+
window.onbeforeunload = null;
|
903 |
+
} );
|
904 |
+
objUploadView.uploader.bind( 'UploadProgress', function ( up, file ) {
|
905 |
+
//$( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploading_msg + '( ' + file.percent + '% )' );
|
906 |
+
$( "#" + file.id + " .plupload_file_status" ).html( '<div class="plupload_file_progress ui-widget-header" style="width: ' + file.percent + '%;"></div>' );
|
907 |
+
$( "#" + file.id ).addClass( 'upload-progress' );
|
908 |
+
if ( file.percent == 100 ) {
|
909 |
+
$( "#" + file.id ).toggleClass( 'upload-success' );
|
910 |
+
}
|
911 |
+
|
912 |
+
window.onbeforeunload = function ( evt ) {
|
913 |
+
var message = rtmedia_upload_progress_error_message;
|
914 |
+
return message;
|
915 |
+
};
|
916 |
+
} );
|
917 |
+
|
918 |
+
$( "#rtMedia-start-upload" ).hide();
|
919 |
+
|
920 |
+
var change_flag = false
|
921 |
+
var media_uploading = false;
|
922 |
+
$.ajaxPrefilter( function ( options, originalOptions, jqXHR ) {
|
923 |
+
// Modify options, control originalOptions, store jqXHR, etc
|
924 |
+
try {
|
925 |
+
if ( originalOptions.data == null || typeof ( originalOptions.data ) == "undefined" || typeof ( originalOptions.data.action ) == "undefined" ) {
|
926 |
+
return true;
|
927 |
+
}
|
928 |
+
} catch ( e ) {
|
929 |
+
return true;
|
930 |
+
}
|
931 |
+
if ( originalOptions.data.action == 'post_update' || originalOptions.data.action == 'activity_widget_filter' ) {
|
932 |
+
var temp = activity_attachemnt_ids;
|
933 |
+
while ( activity_attachemnt_ids.length > 0 ) {
|
934 |
+
options.data += "&rtMedia_attached_files[]=" + activity_attachemnt_ids.pop();
|
935 |
+
}
|
936 |
+
options.data += "&rtmedia-privacy=" + jQuery( "select.privacy" ).val();
|
937 |
+
activity_attachemnt_ids = temp;
|
938 |
+
if ( jQuery( '#rtmp-url-no-scrapper' ).length > 0 && jQuery( '#rtmp-url-no-scrapper' ).val() != '0' ) {
|
939 |
+
options.data += "&rtmp_link_url=" + jQuery( "#rtmp-url-scrapper-url-hidden" ).val(); // URL link preview
|
940 |
+
options.data += "&rtmp_link_title=" + jQuery( "#rtmp-url-scrapper-title-hidden" ).val(); // URL link preview
|
941 |
+
options.data += "&rtmp_link_img=" + jQuery( '#rtmp-url-scrapper-img-hidden' ).val(); // URL link preview
|
942 |
+
options.data += "&rtmp_link_description=" + jQuery( "#rtmp-url-scrapper-description-hidden" ).val(); // URL link preview
|
943 |
+
}
|
944 |
+
var orignalSuccess = originalOptions.success;
|
945 |
+
options.beforeSend = function () {
|
946 |
+
if ( originalOptions.data.action == 'post_update' ) {
|
947 |
+
if ( $.trim( $( "#whats-new" ).val() ) == "" ) {
|
948 |
+
$( '#whats-new-form' ).prepend( '<div id="message" class="error"><p>' + rtmedia_empty_activity_msg + '</p></div>' );
|
949 |
+
$( "#aw-whats-new-submit" ).prop( "disabled", true ).removeClass( 'loading' );
|
950 |
+
return false;
|
951 |
+
}
|
952 |
+
}
|
953 |
+
if ( ! media_uploading && objUploadView.uploader.files.length > 0 ) {
|
954 |
+
$( "#whats-new-post-in" ).attr( 'disabled', 'disabled' );
|
955 |
+
$( "#rtmedia-add-media-button-post-update" ).attr( 'disabled', 'disabled' );
|
956 |
+
objUploadView.uploadFiles()
|
957 |
+
media_uploading = true;
|
958 |
+
return false;
|
959 |
+
} else {
|
960 |
+
media_uploading = false;
|
961 |
+
return true;
|
962 |
+
}
|
963 |
+
|
964 |
+
|
965 |
+
}
|
966 |
+
options.success = function ( response ) {
|
967 |
+
orignalSuccess( response );
|
968 |
+
if ( response[0] + response[1] == '-1' ) {
|
969 |
+
//Error
|
970 |
+
|
971 |
+
} else {
|
972 |
+
if ( originalOptions.data.action == 'activity_widget_filter' ) {
|
973 |
+
$( "div.activity" ).bind( "fadeIn", function () {
|
974 |
+
apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content' ) );
|
975 |
+
rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
|
976 |
+
} );
|
977 |
+
$( "div.activity" ).fadeIn( 100 );
|
978 |
+
}
|
979 |
+
jQuery( "input[data-mode=rtMedia-update]" ).remove();
|
980 |
+
while ( objUploadView.uploader.files.pop() != undefined ) {
|
981 |
+
}
|
982 |
+
objUploadView.uploader.refresh();
|
983 |
+
$( '#rtmedia-whts-new-upload-container > div' ).css( { 'top': '0', 'left': '0' } );
|
984 |
+
$( '#rtMedia-update-queue-list' ).html( '' );
|
985 |
+
//$("#div-attache-rtmedia").hide();
|
986 |
+
apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content' ) );
|
987 |
+
jQuery( 'ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode' ).mediaelementplayer( {
|
988 |
+
// if the <video width> is not specified, this is the default
|
989 |
+
defaultVideoWidth: 480,
|
990 |
+
// if the <video height> is not specified, this is the default
|
991 |
+
defaultVideoHeight: 270,
|
992 |
+
// if set, overrides <video width>
|
993 |
+
//videoWidth: 1,
|
994 |
+
// if set, overrides <video height>
|
995 |
+
//videoHeight: 1
|
996 |
+
} );
|
997 |
+
rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
|
998 |
+
}
|
999 |
+
$( "#whats-new-post-in" ).removeAttr( 'disabled' );
|
1000 |
+
$( "#rtmedia-add-media-button-post-update" ).removeAttr( 'disabled' );
|
1001 |
+
|
1002 |
+
}
|
1003 |
+
}
|
1004 |
+
} );
|
1005 |
} );
|
1006 |
/**
|
1007 |
* rtMedia Comment Js
|
1008 |
*/
|
1009 |
jQuery( document ).ready( function ( $ ) {
|
1010 |
+
jQuery( document ).on( "click", "#rt_media_comment_form #rt_media_comment_submit", function ( e ) {
|
1011 |
+
e.preventDefault();
|
1012 |
+
if ( $.trim( $( "#comment_content" ).val() ) == "" ) {
|
1013 |
+
alert( rtmedia_empty_comment_msg );
|
1014 |
+
return false;
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
$( this ).attr( 'disabled', 'disabled' );
|
1018 |
+
|
1019 |
+
$.ajax( {
|
1020 |
+
url: jQuery( "#rt_media_comment_form" ).attr( "action" ),
|
1021 |
+
type: 'post',
|
1022 |
+
data: jQuery( "#rt_media_comment_form" ).serialize() + "&rtajax=true",
|
1023 |
+
success: function ( data ) {
|
1024 |
+
$( '#rtmedia-no-comments' ).remove();
|
1025 |
+
$( "#rtmedia_comment_ul" ).append( data );
|
1026 |
+
$( "#comment_content" ).val( "" );
|
1027 |
+
$( "#rt_media_comment_form #rt_media_comment_submit" ).removeAttr( 'disabled' );
|
1028 |
+
rtMediaHook.call( 'rtmedia_js_after_comment_added', [ ] );
|
1029 |
+
}
|
1030 |
+
} );
|
1031 |
+
|
1032 |
+
|
1033 |
+
return false;
|
1034 |
+
} );
|
1035 |
+
|
1036 |
+
//Delete comment
|
1037 |
+
jQuery( document ).on( 'click', '.rtmedia-delete-comment', function ( e ) {
|
1038 |
+
e.preventDefault();
|
1039 |
+
var ask_confirmation = true
|
1040 |
+
ask_confirmation = rtMediaHook.call( 'rtmedia_js_delete_comment_confirmation', [ ask_confirmation ] );
|
1041 |
+
if ( ask_confirmation && ! confirm( rtmedia_media_comment_delete_confirmation ) )
|
1042 |
+
return false;
|
1043 |
+
var current_comment = jQuery( this );
|
1044 |
+
var current_comment_parent = current_comment.parent();
|
1045 |
+
var comment_id = current_comment.data( 'id' );
|
1046 |
+
current_comment_parent.css( 'opacity', '0.4' );
|
1047 |
+
if ( comment_id == '' || isNaN( comment_id ) ) {
|
1048 |
+
return false;
|
1049 |
+
}
|
1050 |
+
var action = current_comment.closest( 'ul' ).data( "action" );
|
1051 |
+
|
1052 |
+
jQuery.ajax( {
|
1053 |
+
url: action,
|
1054 |
+
type: 'post',
|
1055 |
+
data: { comment_id: comment_id },
|
1056 |
+
success: function ( res ) {
|
1057 |
+
if ( res != 'undefined' && res == 1 ) {
|
1058 |
+
current_comment.closest( 'li' ).hide( 1000, function () {
|
1059 |
+
current_comment.closest( 'li' ).remove();
|
1060 |
+
} );
|
1061 |
+
} else {
|
1062 |
+
current_comment.css( 'opacity', '1' );
|
1063 |
+
}
|
1064 |
+
rtMediaHook.call( 'rtmedia_js_after_comment_deleted', [ ] );
|
1065 |
+
}
|
1066 |
+
} );
|
1067 |
+
|
1068 |
+
} );
|
1069 |
+
|
1070 |
+
$( document ).on( "click", '.rtmedia-like', function ( e ) {
|
1071 |
+
e.preventDefault();
|
1072 |
+
var that = this;
|
1073 |
+
$( this ).attr( 'disabled', 'disabled' );
|
1074 |
+
var url = $( this ).parent().attr( "action" );
|
1075 |
+
$( that ).prepend( "<img class='rtm-like-loading' src='" + rMedia_loading_file + "' style='width:10px' />" );
|
1076 |
+
$.ajax( {
|
1077 |
+
url: url,
|
1078 |
+
type: 'post',
|
1079 |
+
data: "json=true",
|
1080 |
+
success: function ( data ) {
|
1081 |
+
try {
|
1082 |
+
data = JSON.parse( data );
|
1083 |
+
} catch ( e ) {
|
1084 |
+
|
1085 |
+
}
|
1086 |
+
$( '.rtmedia-like span' ).html( data.next );
|
1087 |
+
$( '.rtm-like-loading' ).remove();
|
1088 |
+
$( that ).removeAttr( 'disabled' );
|
1089 |
+
//update the like counter
|
1090 |
+
$( '.rtmedia-like-counter' ).html( data.count );
|
1091 |
+
if ( data.count > 0 ) {
|
1092 |
+
$( '.rtmedia-like-info' ).removeClass( 'hide' );
|
1093 |
+
} else {
|
1094 |
+
$( '.rtmedia-like-info' ).addClass( 'hide' );
|
1095 |
+
}
|
1096 |
+
}
|
1097 |
+
} );
|
1098 |
+
|
1099 |
+
|
1100 |
+
} );
|
1101 |
+
$( document ).on( "click", '.rtmedia-featured, .rtmedia-group-featured', function ( e ) {
|
1102 |
+
e.preventDefault();
|
1103 |
+
var that = this;
|
1104 |
+
$( this ).attr( 'disabled', 'disabled' );
|
1105 |
+
var url = $( this ).parent().attr( "action" );
|
1106 |
+
$( that ).prepend( "<img class='rtm-featured-loading' src='" + rMedia_loading_file + "' />" );
|
1107 |
+
$.ajax( {
|
1108 |
+
url: url,
|
1109 |
+
type: 'post',
|
1110 |
+
data: "json=true",
|
1111 |
+
success: function ( data ) {
|
1112 |
+
try {
|
1113 |
+
data = JSON.parse( data );
|
1114 |
+
} catch ( e ) {
|
1115 |
+
|
1116 |
+
}
|
1117 |
+
$( that ).find( 'span' ).html( data.next );
|
1118 |
+
$( '.rtm-featured-loading' ).remove();
|
1119 |
+
$( that ).removeAttr( 'disabled' );
|
1120 |
+
}
|
1121 |
+
} );
|
1122 |
+
|
1123 |
+
|
1124 |
+
} );
|
1125 |
+
jQuery( "#div-attache-rtmedia" ).find( "input[type=file]" ).each( function () {
|
1126 |
+
//$(this).attr("capture", "camera");
|
1127 |
+
// $(this).attr("accept", $(this).attr("accept") + ';capture=camera');
|
1128 |
+
|
1129 |
+
} );
|
1130 |
+
|
1131 |
+
// manually trigger fadein event so that we can bind some function on this event. It is used in activity when content getting load via ajax
|
1132 |
+
var _old_fadein = $.fn.fadeIn;
|
1133 |
+
jQuery.fn.fadeIn = function () {
|
1134 |
+
return _old_fadein.apply( this, arguments ).trigger( "fadeIn" );
|
1135 |
+
};
|
1136 |
+
} );
|
1137 |
|
1138 |
+
function rtmedia_selected_file_list( plupload, file, uploader, error ) {
|
1139 |
+
var icon = '', err_msg = '', upload_progress = '', title = '';
|
1140 |
+
|
1141 |
+
if ( error == '' ) {
|
1142 |
+
upload_progress = '<div class="plupload_file_progress ui-widget-header" style="width: 0%;">';
|
1143 |
+
upload_progress += '</div>';
|
1144 |
+
icon = '<span id="label_' + file.id + '" class="dashicons dashicons-edit rtmicon" title="Edit File Name"></span>';
|
1145 |
+
} else if ( error.code == - 600 ) {
|
1146 |
+
err_msg = ( uploader != '' ) ? rtmedia_max_file_msg + uploader.settings.max_file_size : window.file_size_info;
|
1147 |
+
title = "title='" + err_msg + "'";
|
1148 |
+
icon = '<i class="dashicons dashicons-info rtmicon" ' + title + '></i>';
|
1149 |
+
} else if ( error.code == - 601 ) {
|
1150 |
+
err_msg = error.message + '. ' + window.file_extn_info;
|
1151 |
+
title = "title='" + err_msg + "'";
|
1152 |
+
icon = '<i class="dashicons dashicons-info rtmicon" ' + title + '></i>';
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
var rtmedia_plupload_file = '<li class="plupload_file ui-state-default plupload_queue_li" id="' + file.id + '" ' + title + '>';
|
1156 |
+
rtmedia_plupload_file += '<div id="file_thumb_' + file.id + '" class="plupload_file_thumb">';
|
1157 |
+
rtmedia_plupload_file += '</div>';
|
1158 |
+
rtmedia_plupload_file += '<div class="plupload_file_status">';
|
1159 |
+
rtmedia_plupload_file += upload_progress;
|
1160 |
+
rtmedia_plupload_file += '</div>';
|
1161 |
+
rtmedia_plupload_file += '<div class="plupload_file_name" title="' + ( file.name ? file.name : '' ) + '">';
|
1162 |
+
rtmedia_plupload_file += '<span class="plupload_file_name_wrapper">';
|
1163 |
+
rtmedia_plupload_file += ( file.name ? file.name : '' );
|
1164 |
+
rtmedia_plupload_file += '</span>';
|
1165 |
+
rtmedia_plupload_file += icon;
|
1166 |
+
rtmedia_plupload_file += '</div>';
|
1167 |
+
rtmedia_plupload_file += '<div class="plupload_file_action">';
|
1168 |
+
rtmedia_plupload_file += '<div class="plupload_action_icon ui-icon plupload_delete">';
|
1169 |
+
rtmedia_plupload_file += '<span class="remove-from-queue dashicons dashicons-dismiss"></span>';
|
1170 |
+
rtmedia_plupload_file += '</div>';
|
1171 |
+
rtmedia_plupload_file += '</div>';
|
1172 |
+
rtmedia_plupload_file += '<div class="plupload_file_size">';
|
1173 |
+
rtmedia_plupload_file += plupload.formatSize( file.size );
|
1174 |
+
rtmedia_plupload_file += '</div>';
|
1175 |
+
rtmedia_plupload_file += '<div class="plupload_file_fields">';
|
1176 |
+
rtmedia_plupload_file += '</div>';
|
1177 |
+
rtmedia_plupload_file += '</li>';
|
1178 |
+
|
1179 |
+
jQuery( rtmedia_plupload_file ).appendTo( '#rtmedia_uploader_filelist' );
|
1180 |
+
var type = file.type;
|
1181 |
+
var media_title = file.name;
|
1182 |
+
var ext = media_title.substring( media_title.lastIndexOf( "." ) + 1, media_title.length );
|
1183 |
+
|
1184 |
+
if ( /image/i.test( type ) ) {
|
1185 |
+
if( ext === 'gif' ) {
|
1186 |
+
jQuery( '<img src="' + rtmedia_media_thumbs[ 'photo' ] + '" />' ).appendTo( '#file_thumb_' + file.id );
|
1187 |
+
} else {
|
1188 |
+
var img = new mOxie.Image();
|
1189 |
|
1190 |
+
img.onload = function () {
|
1191 |
+
this.embed( jQuery( '#file_thumb_' + file.id ).get( 0 ), {
|
1192 |
+
width: 100,
|
1193 |
+
height: 60,
|
1194 |
+
crop: true
|
1195 |
+
} );
|
1196 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
1197 |
|
1198 |
+
img.onembedded = function () {
|
1199 |
+
this.destroy();
|
1200 |
+
};
|
1201 |
|
1202 |
+
img.onerror = function () {
|
1203 |
+
this.destroy();
|
1204 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1205 |
|
1206 |
+
img.load( file.getSource() );
|
1207 |
+
}
|
1208 |
+
} else {
|
1209 |
+
jQuery.each( rtmedia_exteansions, function( key, value ) {
|
1210 |
+
if( value.indexOf( ext ) >= 0 ) {
|
1211 |
+
jQuery( '<img src="' + rtmedia_media_thumbs[ key ] + '" />' ).appendTo( '#file_thumb_' + file.id );
|
1212 |
+
|
1213 |
+
return false;
|
1214 |
}
|
1215 |
} );
|
1216 |
+
}
|
1217 |
+
|
1218 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/assets/js/rtMedia.js
CHANGED
@@ -1,197 +1,169 @@
|
|
1 |
var rtMagnificPopup;
|
2 |
var rtm_masonry_container;
|
3 |
-
function apply_rtMagnificPopup(selector){
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
//
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
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 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
// if set, overrides <video height>
|
98 |
-
//videoHeight: 1
|
99 |
-
});
|
100 |
-
$('.mfp-content .mejs-audio .mejs-controls').css('position', 'relative');
|
101 |
-
rtMediaHook.call('rtmedia_js_popup_after_content_added', []);
|
102 |
-
},
|
103 |
-
close: function(e) {
|
104 |
-
//console.log(e);
|
105 |
-
rtmedia_init_action_dropdown();
|
106 |
-
},
|
107 |
-
BeforeChange: function(e) {
|
108 |
-
//console.log(e);
|
109 |
-
}
|
110 |
-
}
|
111 |
-
});
|
112 |
-
}
|
113 |
-
|
114 |
-
if (jQuery(window).width() < 600) {
|
115 |
-
jQuery('#whats-new').focus( function(){
|
116 |
-
jQuery("#whats-new-options").animate({
|
117 |
-
height:'100px'
|
118 |
-
});
|
119 |
-
});
|
120 |
-
jQuery('#whats-new').blur( function(){
|
121 |
-
jQuery("#whats-new-options").animate({
|
122 |
-
height:'100px'
|
123 |
-
});
|
124 |
-
});
|
125 |
-
}
|
126 |
-
});
|
127 |
}
|
|
|
128 |
var rtMediaHook = {
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
}
|
148 |
|
149 |
//drop-down js
|
150 |
function rtmedia_init_action_dropdown() {
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
});
|
167 |
}
|
168 |
|
169 |
-
jQuery('document').ready(function($) {
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
$('.rtmedia-modal-link').magnificPopup({
|
174 |
-
type:'inline',
|
175 |
-
midClick: true, // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href
|
176 |
-
closeBtnInside:true,
|
177 |
|
178 |
-
|
179 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
185 |
|
186 |
-
|
187 |
-
if ($.trim($("#comment_content").val()) == "") {
|
188 |
-
alert( rtmedia_empty_comment_msg );
|
189 |
-
return false;
|
190 |
-
} else {
|
191 |
-
return true;
|
192 |
-
}
|
193 |
|
194 |
-
|
|
|
|
|
|
|
195 |
|
196 |
//Remove title from popup duplication
|
197 |
$("li.rtmedia-list-item p a").each(function(e) {
|
@@ -242,339 +214,335 @@ jQuery('document').ready(function($) {
|
|
242 |
}
|
243 |
});
|
244 |
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
}
|
388 |
-
}
|
389 |
-
|
390 |
-
rtmedia_media_view_counts();
|
391 |
-
rtMediaHook.register('rtmedia_js_popup_after_content_added',
|
392 |
-
function() {
|
393 |
-
rtmedia_media_view_counts();
|
394 |
-
rtmedia_init_media_deleting();
|
395 |
-
rtmedia_init_popup_navigation();
|
396 |
-
rtmedia_disable_popup_navigation_comment_focus();
|
397 |
-
var height = $(window).height() ;
|
398 |
-
//console.log( height );
|
399 |
-
// , .mfp-content #buddypress .rtmedia-container,
|
400 |
-
jQuery('.mfp-content .rtm-lightbox-container .rtmedia-single-meta, .mfp-content .rtm-lightbox-container #rtmedia-single-media-container .rtmedia-media, .rtm-lightbox-container .mejs-video').css({ 'height' : height*0.8, 'max-height' : height*0.8, 'over-flow' : 'hidden' });
|
401 |
-
//mejs-video
|
402 |
-
//init the options dropdown menu
|
403 |
-
rtmedia_init_action_dropdown();
|
404 |
-
//get focus on comment textarea when comment-link is clicked
|
405 |
-
jQuery('.rtmedia-comment-link').on('click', function(e){
|
406 |
-
e.preventDefault();
|
407 |
-
jQuery('#comment_content').focus();
|
408 |
-
});
|
409 |
-
|
410 |
-
jQuery(".rtm-more").shorten({ // shorten the media description to 100 characters
|
411 |
-
"showChars" : 130
|
412 |
-
});
|
413 |
-
|
414 |
-
//show gallery title in lightbox at bottom
|
415 |
-
var gal_title = $('.rtm-gallery-title'), title = "";
|
416 |
-
if(! $.isEmptyObject(gal_title) ){
|
417 |
-
title = gal_title.html();
|
418 |
-
}else {
|
419 |
-
title = $('#subnav.item-list-tabs li.selected ').html();
|
420 |
-
}
|
421 |
-
if( title != ""){
|
422 |
-
$('.rtm-ltb-gallery-title .ltb-title').html(title);
|
423 |
-
}
|
424 |
-
|
425 |
-
//show the index of the current image
|
426 |
-
// var index = jQuery.magnificPopup.instance.index;
|
427 |
-
// $('.media-index').html(index+1);
|
428 |
-
|
429 |
-
//show image counts
|
430 |
-
var counts = $('#subnav.item-list-tabs li.selected span').html();
|
431 |
-
$('li.total').html(counts);
|
432 |
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
jQuery(document).on('focusin','#comment_content', function(){
|
462 |
-
jQuery(document).unbind('keydown');
|
463 |
-
});
|
464 |
-
jQuery(document).on('focusout','#comment_content',function(){
|
465 |
-
var rtm_mfp = jQuery.magnificPopup.instance;
|
466 |
-
jQuery(document).on('keydown',function(e) {
|
467 |
-
if (e.keyCode === 37) {
|
468 |
-
rtm_mfp.prev();
|
469 |
-
} else if (e.keyCode === 39) {
|
470 |
-
rtm_mfp.next();
|
471 |
-
}
|
472 |
-
});
|
473 |
-
});
|
474 |
-
}
|
475 |
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
|
490 |
// activityArea.css('height','150px');
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
jQuery('.rtmedia-container').on('click', '.rtmedia-delete-album' , function(e) {
|
525 |
-
e.preventDefault();
|
526 |
-
if(confirm(rtmedia_album_delete_confirmation)) {
|
527 |
-
jQuery(this).closest('form').submit();
|
528 |
-
}
|
529 |
-
});
|
530 |
-
|
531 |
-
jQuery('.rtmedia-container').on('click', '.rtmedia-delete-media', function(e) {
|
532 |
-
e.preventDefault();
|
533 |
-
if(confirm(rtmedia_media_delete_confirmation)) {
|
534 |
-
jQuery(this).closest('form').submit();
|
535 |
-
}
|
536 |
-
});
|
537 |
-
|
538 |
-
|
539 |
-
// jQuery(document).on('click', '#rtm_show_upload_ui', function(){
|
540 |
-
// jQuery('#rtm-media-gallery-uploader').slideToggle();
|
541 |
-
// });
|
542 |
-
|
543 |
-
rtmedia_init_action_dropdown();
|
544 |
-
$(document).click(function() {
|
545 |
-
if ($('.click-nav ul').is(':visible')) {
|
546 |
-
$('.click-nav ul', this).hide();
|
547 |
-
}
|
548 |
-
});
|
549 |
-
|
550 |
-
//get focus on comment textarea when comment-link is clicked
|
551 |
-
jQuery('.rtmedia-comment-link').on('click', function(e){
|
552 |
-
e.preventDefault();
|
553 |
-
jQuery('#comment_content').focus();
|
554 |
-
});
|
555 |
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
|
562 |
// masonry code
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
|
579 |
if( jQuery( '.rtm-uploader-tabs' ).length > 0 ){
|
580 |
jQuery( '.rtm-uploader-tabs li' ).click( function( e ){
|
@@ -592,8 +560,8 @@ jQuery('document').ready(function($) {
|
|
592 |
|
593 |
|
594 |
//Legacy media element for old activities
|
595 |
-
function bp_media_create_element(id) {
|
596 |
-
|
597 |
}
|
598 |
|
599 |
/*
|
@@ -601,98 +569,99 @@ function bp_media_create_element(id) {
|
|
601 |
* To change this template file, choose Tools | Templates
|
602 |
* and open the template in the editor.
|
603 |
*/
|
604 |
-
(function($) {
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
|
|
654 |
|
655 |
function rtmedia_version_compare( left, right ) {
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
}
|
670 |
|
671 |
function rtm_is_element_exist( el ) {
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
}
|
678 |
|
679 |
function rtm_masonry_reload( el ) {
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
}
|
685 |
|
686 |
-
window.onload=function(){
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
};
|
691 |
|
692 |
// Get query string parameters from url
|
693 |
-
function rtmediaGetParameterByName(name) {
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
}
|
1 |
var rtMagnificPopup;
|
2 |
var rtm_masonry_container;
|
3 |
+
function apply_rtMagnificPopup( selector ) {
|
4 |
+
jQuery( 'document' ).ready( function ( $ ) {
|
5 |
+
var rt_load_more = "";
|
6 |
+
if ( typeof ( rtmedia_load_more ) === "undefined" ) {
|
7 |
+
rt_load_more = "Loading media";
|
8 |
+
} else {
|
9 |
+
rt_load_more = rtmedia_load_more;
|
10 |
+
}
|
11 |
+
if ( typeof(rtmedia_lightbox_enabled) != 'undefined' && rtmedia_lightbox_enabled == '1' ) { // if lightbox is enabled.
|
12 |
+
|
13 |
+
if ( $( '.activity-item .rtmedia-activity-container .rtmedia-list-item > a' ).siblings( 'p' ).children( 'a' ).length > 0 ) {
|
14 |
+
$( '.activity-item .rtmedia-activity-container .rtmedia-list-item > a' ).siblings( 'p' ).children( 'a' ).addClass( 'no-popup' );
|
15 |
+
}
|
16 |
+
|
17 |
+
rtMagnificPopup = jQuery( selector ).magnificPopup( {
|
18 |
+
delegate: 'a:not(.no-popup, .mejs-time-slider, .mejs-volume-slider, .mejs-horizontal-volume-slider)',
|
19 |
+
type: 'ajax',
|
20 |
+
tLoading: rt_load_more + ' #%curr%...',
|
21 |
+
mainClass: 'mfp-img-mobile',
|
22 |
+
preload: [ 1, 3 ],
|
23 |
+
closeOnBgClick: true,
|
24 |
+
gallery: {
|
25 |
+
enabled: true,
|
26 |
+
navigateByImgClick: true,
|
27 |
+
arrowMarkup: '', // disabled default arrows
|
28 |
+
preload: [ 0, 1 ] // Will preload 0 - before current, and 1 after the current image
|
29 |
+
},
|
30 |
+
image: {
|
31 |
+
tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
|
32 |
+
titleSrc: function ( item ) {
|
33 |
+
return item.el.attr( 'title' ) + '<small>by Marsel Van Oosten</small>';
|
34 |
+
}
|
35 |
+
},
|
36 |
+
callbacks: {
|
37 |
+
ajaxContentAdded: function () {
|
38 |
+
|
39 |
+
// When last second media is encountered in lightbox, load more medias if available
|
40 |
+
var mfp = jQuery.magnificPopup.instance;
|
41 |
+
var current_media = mfp.currItem.el;
|
42 |
+
var li = current_media.parent();
|
43 |
+
if ( ! li.is( 'li' ) ) {
|
44 |
+
li = li.parent();
|
45 |
+
}
|
46 |
+
if ( li.is( ':nth-last-child(2)' ) ) { // if its last second media
|
47 |
+
var last_li = li.next();
|
48 |
+
if ( jQuery( '#rtMedia-galary-next' ).css( 'display' ) == 'block' ) { // if more medias are available
|
49 |
+
jQuery( '#rtMedia-galary-next' ).click(); // load more
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
var items = mfp.items.length;
|
54 |
+
if ( mfp.index == ( items - 1 ) && ! ( li.is( ":last-child" ) ) ) {
|
55 |
+
current_media.click();
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
|
59 |
+
$container = this.content.find( '.tagcontainer' );
|
60 |
+
if ( $container.length > 0 ) {
|
61 |
+
$context = $container.find( 'img' );
|
62 |
+
$container.find( '.tagcontainer' ).css(
|
63 |
+
{
|
64 |
+
'height': $context.css( 'height' ),
|
65 |
+
'width': $context.css( 'width' )
|
66 |
+
} );
|
67 |
+
|
68 |
+
}
|
69 |
+
var settings = { };
|
70 |
+
|
71 |
+
if ( typeof _wpmejsSettings !== 'undefined' )
|
72 |
+
settings.pluginPath = _wpmejsSettings.pluginPath;
|
73 |
+
$( '.mfp-content .wp-audio-shortcode,.mfp-content .wp-video-shortcode,.mfp-content .bp_media_content video' ).mediaelementplayer( {
|
74 |
+
// if the <video width> is not specified, this is the default
|
75 |
+
defaultVideoWidth: 480,
|
76 |
+
// if the <video height> is not specified, this is the default
|
77 |
+
defaultVideoHeight: 270,
|
78 |
+
// if set, overrides <video width>
|
79 |
+
//videoWidth: 1,
|
80 |
+
// if set, overrides <video height>
|
81 |
+
//videoHeight: 1
|
82 |
+
} );
|
83 |
+
$( '.mfp-content .mejs-audio .mejs-controls' ).css( 'position', 'relative' );
|
84 |
+
rtMediaHook.call( 'rtmedia_js_popup_after_content_added', [ ] );
|
85 |
+
},
|
86 |
+
close: function ( e ) {
|
87 |
+
//console.log(e);
|
88 |
+
rtmedia_init_action_dropdown();
|
89 |
+
},
|
90 |
+
BeforeChange: function ( e ) {
|
91 |
+
//console.log(e);
|
92 |
+
}
|
93 |
+
}
|
94 |
+
} );
|
95 |
+
}
|
96 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
+
|
99 |
var rtMediaHook = {
|
100 |
+
hooks: [ ],
|
101 |
+
is_break: false,
|
102 |
+
register: function ( name, callback ) {
|
103 |
+
if ( 'undefined' == typeof ( rtMediaHook.hooks[name] ) )
|
104 |
+
rtMediaHook.hooks[name] = [ ]
|
105 |
+
rtMediaHook.hooks[name].push( callback )
|
106 |
+
},
|
107 |
+
call: function ( name, arguments ) {
|
108 |
+
if ( 'undefined' != typeof ( rtMediaHook.hooks[name] ) )
|
109 |
+
for ( i = 0; i < rtMediaHook.hooks[name].length; ++ i ) {
|
110 |
+
if ( true != rtMediaHook.hooks[name][i]( arguments ) ) {
|
111 |
+
rtMediaHook.is_break = true;
|
112 |
+
return false;
|
113 |
+
break;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
return true;
|
117 |
+
}
|
118 |
}
|
119 |
|
120 |
//drop-down js
|
121 |
function rtmedia_init_action_dropdown() {
|
122 |
+
var all_ul;
|
123 |
+
var curr_ul;
|
124 |
+
jQuery( '.click-nav > span, .click-nav > div' ).toggleClass( 'no-js js' );
|
125 |
+
jQuery( '.click-nav .js ul' ).hide();
|
126 |
+
jQuery( '.click-nav .clicker' ).click( function ( e ) {
|
127 |
+
all_ul = jQuery( '#rtm-media-options .click-nav .clicker' ).next( 'ul' );
|
128 |
+
curr_ul = jQuery( this ).next( 'ul' );
|
129 |
+
jQuery.each( all_ul, function ( index, value ) {
|
130 |
+
if ( jQuery( value ).html() != curr_ul.html() ) { // check clicked option with other options
|
131 |
+
jQuery( value ).hide();
|
132 |
+
}
|
133 |
+
} );
|
134 |
+
jQuery( curr_ul ).toggle();
|
135 |
+
e.stopPropagation();
|
136 |
+
} );
|
|
|
137 |
}
|
138 |
|
139 |
+
jQuery( 'document' ).ready( function ( $ ) {
|
140 |
|
141 |
+
// Tabs
|
142 |
+
$( '.rtm-tabs' ).rtTab();
|
|
|
|
|
|
|
|
|
143 |
|
144 |
+
// open magnific popup as modal for create album/playlist
|
145 |
+
if ( jQuery( '.rtmedia-modal-link' ).length > 0 ) {
|
146 |
+
$( '.rtmedia-modal-link' ).magnificPopup( {
|
147 |
+
type: 'inline',
|
148 |
+
midClick: true, // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href
|
149 |
+
closeBtnInside: true,
|
150 |
+
} );
|
151 |
+
}
|
152 |
|
153 |
+
$( "#rt_media_comment_form" ).submit( function ( e ) {
|
154 |
+
if ( $.trim( $( "#comment_content" ).val() ) == "" ) {
|
155 |
+
alert( rtmedia_empty_comment_msg );
|
156 |
+
return false;
|
157 |
+
} else {
|
158 |
+
return true;
|
159 |
+
}
|
160 |
|
161 |
+
} )
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
+
//Remove title from popup duplication
|
164 |
+
$( "li.rtmedia-list-item p a" ).each( function ( e ) {
|
165 |
+
$( this ).addClass( "no-popup" );
|
166 |
+
} );
|
167 |
|
168 |
//Remove title from popup duplication
|
169 |
$("li.rtmedia-list-item p a").each(function(e) {
|
214 |
}
|
215 |
});
|
216 |
|
217 |
+
jQuery.ajaxPrefilter( function ( options, originalOptions, jqXHR ) {
|
218 |
+
try {
|
219 |
+
if ( originalOptions.data == null || typeof ( originalOptions.data ) == "undefined" || typeof ( originalOptions.data.action ) == "undefined" ) {
|
220 |
+
return true;
|
221 |
+
}
|
222 |
+
} catch ( e ) {
|
223 |
+
return true;
|
224 |
+
}
|
225 |
+
if ( originalOptions.data.action == 'activity_get_older_updates' ) {
|
226 |
+
var orignalSuccess = originalOptions.success;
|
227 |
+
options.success = function ( response ) {
|
228 |
+
orignalSuccess( response );
|
229 |
+
apply_rtMagnificPopup( '.rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content' );
|
230 |
+
rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
|
231 |
+
}
|
232 |
+
}
|
233 |
+
} );
|
234 |
+
|
235 |
+
jQuery( '.rtmedia-container' ).on( 'click', '.select-all', function ( e ) {
|
236 |
+
jQuery( this ).toggleClass( 'unselect-all' ).toggleClass( 'select-all' );
|
237 |
+
jQuery( this ).attr( 'title', rtmedia_unselect_all_visible );
|
238 |
+
jQuery( '.rtmedia-list input' ).each( function () {
|
239 |
+
jQuery( this ).prop( 'checked', true );
|
240 |
+
} );
|
241 |
+
jQuery( '.rtmedia-list-item' ).addClass( 'bulk-selected' );
|
242 |
+
} );
|
243 |
+
|
244 |
+
jQuery( '.rtmedia-container' ).on( 'click', '.unselect-all', function ( e ) {
|
245 |
+
jQuery( this ).toggleClass( 'select-all' ).toggleClass( 'unselect-all' );
|
246 |
+
jQuery( this ).attr( 'title', rtmedia_select_all_visible );
|
247 |
+
jQuery( '.rtmedia-list input' ).each( function () {
|
248 |
+
jQuery( this ).prop( 'checked', false );
|
249 |
+
} );
|
250 |
+
jQuery( '.rtmedia-list-item' ).removeClass( 'bulk-selected' );
|
251 |
+
} );
|
252 |
+
|
253 |
+
jQuery( '.rtmedia-container' ).on( 'click', '.rtmedia-move', function ( e ) {
|
254 |
+
jQuery( '.rtmedia-delete-container' ).slideUp();
|
255 |
+
jQuery( '.rtmedia-move-container' ).slideToggle();
|
256 |
+
} );
|
257 |
+
|
258 |
+
jQuery( '#rtmedia-create-album-modal' ).on( 'click', '#rtmedia_create_new_album', function ( e ) {
|
259 |
+
$albumname = jQuery.trim( jQuery( '#rtmedia_album_name' ).val() );
|
260 |
+
$context = jQuery.trim( jQuery( '#rtmedia_album_context' ).val() );
|
261 |
+
$context_id = jQuery.trim( jQuery( '#rtmedia_album_context_id' ).val() );
|
262 |
+
$privacy = jQuery.trim( jQuery( '#rtmedia_select_album_privacy' ).val() );
|
263 |
+
$create_album_nonce = jQuery.trim( jQuery( '#rtmedia_create_album_nonce' ).val() );
|
264 |
+
|
265 |
+
if ( $albumname != '' ) {
|
266 |
+
var data = {
|
267 |
+
action: 'rtmedia_create_album',
|
268 |
+
name: $albumname,
|
269 |
+
context: $context,
|
270 |
+
context_id: $context_id,
|
271 |
+
create_album_nonce: $create_album_nonce
|
272 |
+
};
|
273 |
+
|
274 |
+
if ( $privacy !== "" ) {
|
275 |
+
data[ 'privacy' ] = $privacy;
|
276 |
+
}
|
277 |
+
|
278 |
+
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
279 |
+
$( "#rtmedia_create_new_album" ).attr( 'disabled', 'disabled' );
|
280 |
+
var old_val = $( "#rtmedia_create_new_album" ).html();
|
281 |
+
$( "#rtmedia_create_new_album" ).prepend( "<img src='" + rMedia_loading_file + "' />" );
|
282 |
+
|
283 |
+
jQuery.post( rtmedia_ajax_url, data, function ( response ) {
|
284 |
+
response = response.trim();
|
285 |
+
|
286 |
+
if ( response ) {
|
287 |
+
response = response.trim();
|
288 |
+
var flag = true;
|
289 |
+
|
290 |
+
jQuery( '.rtmedia-user-album-list' ).each( function () {
|
291 |
+
jQuery( this ).children( 'optgroup' ).each( function () {
|
292 |
+
if ( jQuery( this ).attr( 'value' ) === $context ) {
|
293 |
+
flag = false;
|
294 |
+
|
295 |
+
jQuery( this ).append( '<option value="' + response + '">' + $albumname + '</option>' );
|
296 |
+
|
297 |
+
return;
|
298 |
+
}
|
299 |
+
} );
|
300 |
+
|
301 |
+
if ( flag ) {
|
302 |
+
var label = $context.charAt( 0 ).toUpperCase() + $context.slice( 1 );
|
303 |
+
var opt_html = '<optgroup value="' + $context + '" label="' + label + ' Albums"><option value="' + response + '">' + $albumname + '</option></optgroup>';
|
304 |
+
|
305 |
+
jQuery( this ).append( opt_html );
|
306 |
+
}
|
307 |
+
} );
|
308 |
+
|
309 |
+
jQuery( 'select.rtmedia-user-album-list option[value="' + response + '"]' ).prop( 'selected', true );
|
310 |
+
jQuery( '.rtmedia-create-new-album-container' ).slideToggle();
|
311 |
+
jQuery( '#rtmedia_album_name' ).val( "" );
|
312 |
+
jQuery( "#rtmedia-create-album-modal" ).append( "<div class='rtmedia-success rtmedia-create-album-alert'><b>" + $albumname + "</b>" + rtmedia_album_created_msg + "</div>" );
|
313 |
+
|
314 |
+
setTimeout( function () {
|
315 |
+
jQuery( ".rtmedia-create-album-alert" ).remove();
|
316 |
+
}, 4000 );
|
317 |
+
|
318 |
+
setTimeout( function () {
|
319 |
+
galleryObj.reloadView();
|
320 |
+
jQuery( ".close-reveal-modal" ).click();
|
321 |
+
}, 2000 );
|
322 |
+
} else {
|
323 |
+
alert( rtmedia_something_wrong_msg );
|
324 |
+
}
|
325 |
+
|
326 |
+
$( "#rtmedia_create_new_album" ).removeAttr( 'disabled' );
|
327 |
+
$( "#rtmedia_create_new_album" ).html( old_val );
|
328 |
+
} );
|
329 |
+
} else {
|
330 |
+
alert( rtmedia_empty_album_name_msg );
|
331 |
+
}
|
332 |
+
} );
|
333 |
+
|
334 |
+
jQuery( '.rtmedia-container' ).on( 'click', '.rtmedia-delete-selected', function ( e ) {
|
335 |
+
if ( jQuery( '.rtmedia-list :checkbox:checked' ).length > 0 ) {
|
336 |
+
if ( confirm( rtmedia_selected_media_delete_confirmation ) ) {
|
337 |
+
jQuery( this ).closest( 'form' ).attr( 'action', '../../../media/delete' ).submit();
|
338 |
+
}
|
339 |
+
} else {
|
340 |
+
alert( rtmedia_no_media_selected );
|
341 |
+
}
|
342 |
+
} );
|
343 |
+
|
344 |
+
jQuery( '.rtmedia-container' ).on( 'click', '.rtmedia-move-selected', function ( e ) {
|
345 |
+
if ( jQuery( '.rtmedia-list :checkbox:checked' ).length > 0 ) {
|
346 |
+
if ( confirm( rtmedia_selected_media_move_confirmation ) ) {
|
347 |
+
jQuery( this ).closest( 'form' ).attr( 'action', '' ).submit();
|
348 |
+
}
|
349 |
+
} else {
|
350 |
+
alert( rtmedia_no_media_selected );
|
351 |
+
}
|
352 |
+
|
353 |
+
} );
|
354 |
+
|
355 |
+
function rtmedia_media_view_counts() {
|
356 |
+
//var view_count_action = jQuery('#rtmedia-media-view-form').attr("action");
|
357 |
+
if ( jQuery( '#rtmedia-media-view-form' ).length > 0 ) {
|
358 |
+
var url = jQuery( '#rtmedia-media-view-form' ).attr( "action" );
|
359 |
+
jQuery.post( url,
|
360 |
+
{
|
361 |
+
}, function ( data ) {
|
362 |
+
|
363 |
+
} );
|
364 |
+
}
|
365 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
|
367 |
+
rtmedia_media_view_counts();
|
368 |
+
rtMediaHook.register( 'rtmedia_js_popup_after_content_added',
|
369 |
+
function () {
|
370 |
+
rtmedia_media_view_counts();
|
371 |
+
rtmedia_init_media_deleting();
|
372 |
+
rtmedia_init_popup_navigation();
|
373 |
+
rtmedia_disable_popup_navigation_comment_focus();
|
374 |
+
var height = $( window ).height();
|
375 |
+
jQuery( '.rtm-lightbox-container .mejs-video' ).css( { 'height': height * 0.8, 'max-height': height * 0.8, 'over-flow': 'hidden' } );
|
376 |
+
jQuery( '.mfp-content .rtmedia-media' ).css( { 'max-height': height * 0.87, 'over-flow': 'hidden' } );
|
377 |
+
//mejs-video
|
378 |
+
//init the options dropdown menu
|
379 |
+
rtmedia_init_action_dropdown();
|
380 |
+
//get focus on comment textarea when comment-link is clicked
|
381 |
+
jQuery( '.rtmedia-comment-link' ).on( 'click', function ( e ) {
|
382 |
+
e.preventDefault();
|
383 |
+
jQuery( '#comment_content' ).focus();
|
384 |
+
} );
|
385 |
+
|
386 |
+
jQuery( ".rtm-more" ).shorten( { // shorten the media description to 100 characters
|
387 |
+
"showChars": 130
|
388 |
+
} );
|
389 |
+
|
390 |
+
//show gallery title in lightbox at bottom
|
391 |
+
var gal_title = $( '.rtm-gallery-title' ), title = "";
|
392 |
+
if ( ! $.isEmptyObject( gal_title ) ) {
|
393 |
+
title = gal_title.html();
|
394 |
+
} else {
|
395 |
+
title = $( '#subnav.item-list-tabs li.selected ' ).html();
|
396 |
+
}
|
397 |
+
if ( title != "" ) {
|
398 |
+
$( '.rtm-ltb-gallery-title .ltb-title' ).html( title );
|
399 |
+
}
|
400 |
+
|
401 |
+
//show image counts
|
402 |
+
var counts = $( '#subnav.item-list-tabs li.selected span' ).html();
|
403 |
+
$( 'li.total' ).html( counts );
|
404 |
+
|
405 |
+
return true;
|
406 |
+
}
|
407 |
+
);
|
408 |
+
|
409 |
+
function rtmedia_init_popup_navigation() {
|
410 |
+
var rtm_mfp = jQuery.magnificPopup.instance;
|
411 |
+
jQuery( '.mfp-arrow-right' ).on( 'click', function ( e ) {
|
412 |
+
rtm_mfp.next();
|
413 |
+
} );
|
414 |
+
jQuery( '.mfp-arrow-left' ).on( 'click', function ( e ) {
|
415 |
+
rtm_mfp.prev();
|
416 |
+
} );
|
417 |
+
|
418 |
+
jQuery( '.mfp-content .rtmedia-media' ).swipe( {
|
419 |
+
//Generic swipe handler for all directions
|
420 |
+
swipeLeft: function ( event, direction, distance, duration, fingerCount ) // bind leftswipe
|
421 |
+
{
|
422 |
+
rtm_mfp.next();
|
423 |
+
},
|
424 |
+
swipeRight: function ( event, direction, distance, duration, fingerCount ) // bind rightswipe
|
425 |
+
{
|
426 |
+
rtm_mfp.prev();
|
427 |
+
},
|
428 |
+
threshold: 0
|
429 |
+
} );
|
430 |
+
}
|
431 |
|
432 |
+
function rtmedia_disable_popup_navigation_comment_focus() {
|
433 |
+
jQuery( document ).on( 'focusin', '#comment_content', function () {
|
434 |
+
jQuery( document ).unbind( 'keydown' );
|
435 |
+
} );
|
436 |
+
jQuery( document ).on( 'focusout', '#comment_content', function () {
|
437 |
+
var rtm_mfp = jQuery.magnificPopup.instance;
|
438 |
+
jQuery( document ).on( 'keydown', function ( e ) {
|
439 |
+
if ( e.keyCode === 37 ) {
|
440 |
+
rtm_mfp.prev();
|
441 |
+
} else if ( e.keyCode === 39 ) {
|
442 |
+
rtm_mfp.next();
|
443 |
+
}
|
444 |
+
} );
|
445 |
+
} );
|
446 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
|
448 |
+
var dragArea = jQuery( "#drag-drop-area" );
|
449 |
+
var activityArea = jQuery( '#whats-new' );
|
450 |
+
var content = dragArea.html();
|
451 |
+
jQuery( '#rtmedia-upload-container' ).after( "<div id='rtm-drop-files-title'>" + rtmedia_drop_media_msg + "</div>" );
|
452 |
+
if ( typeof rtmedia_bp_enable_activity != "undefined" && rtmedia_bp_enable_activity == "1" ) {
|
453 |
+
jQuery( '#whats-new-textarea' ).append( "<div id='rtm-drop-files-title'>" + rtmedia_drop_media_msg + "</div>" );
|
454 |
+
}
|
455 |
+
jQuery( document )
|
456 |
+
.on( 'dragover', function ( e ) {
|
457 |
+
jQuery( '#rtm-media-gallery-uploader' ).show();
|
458 |
+
if ( typeof rtmedia_bp_enable_activity != "undefined" && rtmedia_bp_enable_activity == "1" ) {
|
459 |
+
activityArea.addClass( 'rtm-drag-drop-active' );
|
460 |
+
}
|
461 |
|
462 |
// activityArea.css('height','150px');
|
463 |
+
dragArea.addClass( 'rtm-drag-drop-active' );
|
464 |
+
jQuery( '#rtm-drop-files-title' ).show();
|
465 |
+
} )
|
466 |
+
.on( "dragleave", function ( e ) {
|
467 |
+
e.preventDefault();
|
468 |
+
if ( typeof rtmedia_bp_enable_activity != "undefined" && rtmedia_bp_enable_activity == "1" ) {
|
469 |
+
activityArea.removeClass( 'rtm-drag-drop-active' );
|
470 |
+
activityArea.removeAttr( 'style' );
|
471 |
+
}
|
472 |
+
dragArea.removeClass( 'rtm-drag-drop-active' );
|
473 |
+
jQuery( '#rtm-drop-files-title' ).hide();
|
474 |
+
|
475 |
+
} )
|
476 |
+
.on( "drop", function ( e ) {
|
477 |
+
e.preventDefault();
|
478 |
+
if ( typeof rtmedia_bp_enable_activity != "undefined" && rtmedia_bp_enable_activity == "1" ) {
|
479 |
+
activityArea.removeClass( 'rtm-drag-drop-active' );
|
480 |
+
activityArea.removeAttr( 'style' );
|
481 |
+
}
|
482 |
+
dragArea.removeClass( 'rtm-drag-drop-active' );
|
483 |
+
jQuery( '#rtm-drop-files-title' ).hide();
|
484 |
+
} );
|
485 |
+
|
486 |
+
|
487 |
+
function rtmedia_init_media_deleting() {
|
488 |
+
jQuery( '.rtmedia-container' ).on( 'click', '.rtmedia-delete-media', function ( e ) {
|
489 |
+
e.preventDefault();
|
490 |
+
if ( confirm( rtmedia_media_delete_confirmation ) ) {
|
491 |
+
jQuery( this ).closest( 'form' ).submit();
|
492 |
+
}
|
493 |
+
} );
|
494 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
|
496 |
+
jQuery( '.rtmedia-container' ).on( 'click', '.rtmedia-delete-album', function ( e ) {
|
497 |
+
e.preventDefault();
|
498 |
+
if ( confirm( rtmedia_album_delete_confirmation ) ) {
|
499 |
+
jQuery( this ).closest( 'form' ).submit();
|
500 |
+
}
|
501 |
+
} );
|
502 |
+
|
503 |
+
jQuery( '.rtmedia-container' ).on( 'click', '.rtmedia-delete-media', function ( e ) {
|
504 |
+
e.preventDefault();
|
505 |
+
if ( confirm( rtmedia_media_delete_confirmation ) ) {
|
506 |
+
jQuery( this ).closest( 'form' ).submit();
|
507 |
+
}
|
508 |
+
} );
|
509 |
+
|
510 |
+
rtmedia_init_action_dropdown();
|
511 |
+
|
512 |
+
$( document ).click( function () {
|
513 |
+
if ( $( '.click-nav ul' ).is( ':visible' ) ) {
|
514 |
+
$( '.click-nav ul', this ).hide();
|
515 |
+
}
|
516 |
+
} );
|
517 |
+
|
518 |
+
//get focus on comment textarea when comment-link is clicked
|
519 |
+
jQuery( '.rtmedia-comment-link' ).on( 'click', function ( e ) {
|
520 |
+
e.preventDefault();
|
521 |
+
jQuery( '#comment_content' ).focus();
|
522 |
+
} );
|
523 |
+
|
524 |
+
if ( jQuery( '.rtm-more' ).length > 0 ) {
|
525 |
+
$( ".rtm-more" ).shorten( { // shorten the media description to 100 characters
|
526 |
+
"showChars": 200
|
527 |
+
} );
|
528 |
+
}
|
529 |
|
530 |
// masonry code
|
531 |
+
if ( typeof rtmedia_masonry_layout != "undefined" && rtmedia_masonry_layout == "true" && jQuery( '.rtmedia-container .rtmedia-list.rtm-no-masonry' ).length == 0 ) {
|
532 |
+
rtm_masonry_container = jQuery( '.rtmedia-container .rtmedia-list' )
|
533 |
+
rtm_masonry_container.masonry( {
|
534 |
+
itemSelector: '.rtmedia-list-item'
|
535 |
+
} );
|
536 |
+
setInterval( function () {
|
537 |
+
jQuery.each( jQuery( '.rtmedia-list.masonry .rtmedia-item-title' ), function ( i, item ) {
|
538 |
+
jQuery( item ).width( jQuery( item ).siblings( '.rtmedia-item-thumbnail' ).children( 'img' ).width() );
|
539 |
+
} );
|
540 |
+
rtm_masonry_reload( rtm_masonry_container );
|
541 |
+
}, 1000 );
|
542 |
+
jQuery.each( jQuery( '.rtmedia-list.masonry .rtmedia-item-title' ), function ( i, item ) {
|
543 |
+
jQuery( item ).width( jQuery( item ).siblings( '.rtmedia-item-thumbnail' ).children( 'img' ).width() );
|
544 |
+
} );
|
545 |
+
}
|
546 |
|
547 |
if( jQuery( '.rtm-uploader-tabs' ).length > 0 ){
|
548 |
jQuery( '.rtm-uploader-tabs li' ).click( function( e ){
|
560 |
|
561 |
|
562 |
//Legacy media element for old activities
|
563 |
+
function bp_media_create_element( id ) {
|
564 |
+
return false;
|
565 |
}
|
566 |
|
567 |
/*
|
569 |
* To change this template file, choose Tools | Templates
|
570 |
* and open the template in the editor.
|
571 |
*/
|
572 |
+
( function ( $ ) {
|
573 |
+
$.fn.shorten = function ( settings ) {
|
574 |
+
|
575 |
+
var config = {
|
576 |
+
showChars: 100,
|
577 |
+
ellipsesText: "...",
|
578 |
+
moreText: "more",
|
579 |
+
lessText: "less"
|
580 |
+
};
|
581 |
+
|
582 |
+
if ( settings ) {
|
583 |
+
$.extend( config, settings );
|
584 |
+
}
|
585 |
+
|
586 |
+
$( document ).off( "click", '.morelink' );
|
587 |
+
|
588 |
+
$( document ).on( { click: function () {
|
589 |
+
|
590 |
+
var $this = $( this );
|
591 |
+
if ( $this.hasClass( 'less' ) ) {
|
592 |
+
$this.removeClass( 'less' );
|
593 |
+
$this.html( config.moreText );
|
594 |
+
} else {
|
595 |
+
$this.addClass( 'less' );
|
596 |
+
$this.html( config.lessText );
|
597 |
+
}
|
598 |
+
$this.parent().prev().toggle();
|
599 |
+
$this.prev().toggle();
|
600 |
+
return false;
|
601 |
+
}
|
602 |
+
}, '.morelink' );
|
603 |
+
|
604 |
+
return this.each( function () {
|
605 |
+
var $this = $( this );
|
606 |
+
if ( $this.hasClass( "shortened" ) )
|
607 |
+
return;
|
608 |
+
|
609 |
+
$this.addClass( "shortened" );
|
610 |
+
var content = $this.html();
|
611 |
+
if ( content.length > config.showChars ) {
|
612 |
+
var c = content.substr( 0, config.showChars );
|
613 |
+
var h = content.substr( config.showChars, content.length - config.showChars );
|
614 |
+
var html = c + '<span class="moreellipses">' + config.ellipsesText + ' </span><span class="morecontent"><span>' + h + '</span> <a href="#" class="morelink">' + config.moreText + '</a></span>';
|
615 |
+
$this.html( html );
|
616 |
+
$( ".morecontent span" ).hide();
|
617 |
+
}
|
618 |
+
} );
|
619 |
+
|
620 |
+
};
|
621 |
+
|
622 |
+
} )( jQuery );
|
623 |
|
624 |
function rtmedia_version_compare( left, right ) {
|
625 |
+
if ( typeof left + typeof right != 'stringstring' )
|
626 |
+
return false;
|
627 |
+
var a = left.split( '.' )
|
628 |
+
, b = right.split( '.' )
|
629 |
+
, i = 0, len = Math.max( a.length, b.length );
|
630 |
+
for ( ; i < len; i ++ ) {
|
631 |
+
if ( ( a[i] && ! b[i] && parseInt( a[i] ) > 0 ) || ( parseInt( a[i] ) > parseInt( b[i] ) ) ) {
|
632 |
+
return true;
|
633 |
+
} else if ( ( b[i] && ! a[i] && parseInt( b[i] ) > 0 ) || ( parseInt( a[i] ) < parseInt( b[i] ) ) ) {
|
634 |
+
return false;
|
635 |
+
}
|
636 |
+
}
|
637 |
+
return true;
|
638 |
}
|
639 |
|
640 |
function rtm_is_element_exist( el ) {
|
641 |
+
if ( jQuery( el ).length > 0 ) {
|
642 |
+
return true;
|
643 |
+
} else {
|
644 |
+
return false;
|
645 |
+
}
|
646 |
}
|
647 |
|
648 |
function rtm_masonry_reload( el ) {
|
649 |
+
setTimeout( function () {
|
650 |
+
// we make masonry recalculate the element based on their current state.
|
651 |
+
el.masonry( 'reload' );
|
652 |
+
}, 250 );
|
653 |
}
|
654 |
|
655 |
+
window.onload = function () {
|
656 |
+
if ( typeof rtmedia_masonry_layout != "undefined" && rtmedia_masonry_layout == "true" && jQuery( '.rtmedia-container .rtmedia-list.rtm-no-masonry' ).length == 0 ) {
|
657 |
+
rtm_masonry_reload( rtm_masonry_container );
|
658 |
+
}
|
659 |
};
|
660 |
|
661 |
// Get query string parameters from url
|
662 |
+
function rtmediaGetParameterByName( name ) {
|
663 |
+
name = name.replace( /[\[]/, "\\\[" ).replace( /[\]]/, "\\\]" );
|
664 |
+
var regex = new RegExp( "[\\?&]" + name + "=([^&#]*)" ),
|
665 |
+
results = regex.exec( location.search );
|
666 |
+
return results == null ? "" : decodeURIComponent( results[1].replace( /\+/g, " " ) );
|
667 |
+
}
|
app/assets/js/vendors/magnific-popup.js
ADDED
@@ -0,0 +1,2002 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Magnific Popup - v1.0.0 - 2015-01-03
|
2 |
+
* http://dimsemenov.com/plugins/magnific-popup/
|
3 |
+
* Copyright (c) 2015 Dmitry Semenov; */
|
4 |
+
;
|
5 |
+
( function ( factory ) {
|
6 |
+
if ( typeof define === 'function' && define.amd ) {
|
7 |
+
// AMD. Register as an anonymous module.
|
8 |
+
define( [ 'jquery' ], factory );
|
9 |
+
} else if ( typeof exports === 'object' ) {
|
10 |
+
// Node/CommonJS
|
11 |
+
factory( require( 'jquery' ) );
|
12 |
+
} else {
|
13 |
+
// Browser globals
|
14 |
+
factory( window.jQuery || window.Zepto );
|
15 |
+
}
|
16 |
+
}( function ( $ ) {
|
17 |
+
|
18 |
+
/*>>core*/
|
19 |
+
/**
|
20 |
+
*
|
21 |
+
* Magnific Popup Core JS file
|
22 |
+
*
|
23 |
+
*/
|
24 |
+
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Private static constants
|
28 |
+
*/
|
29 |
+
var CLOSE_EVENT = 'Close',
|
30 |
+
BEFORE_CLOSE_EVENT = 'BeforeClose',
|
31 |
+
AFTER_CLOSE_EVENT = 'AfterClose',
|
32 |
+
BEFORE_APPEND_EVENT = 'BeforeAppend',
|
33 |
+
MARKUP_PARSE_EVENT = 'MarkupParse',
|
34 |
+
OPEN_EVENT = 'Open',
|
35 |
+
CHANGE_EVENT = 'Change',
|
36 |
+
NS = 'mfp',
|
37 |
+
EVENT_NS = '.' + NS,
|
38 |
+
READY_CLASS = 'mfp-ready',
|
39 |
+
REMOVING_CLASS = 'mfp-removing',
|
40 |
+
PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Private vars
|
45 |
+
*/
|
46 |
+
/*jshint -W079 */
|
47 |
+
var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
|
48 |
+
MagnificPopup = function () {
|
49 |
+
},
|
50 |
+
_isJQ = ! ! ( window.jQuery ),
|
51 |
+
_prevStatus,
|
52 |
+
_window = $( window ),
|
53 |
+
_document,
|
54 |
+
_prevContentType,
|
55 |
+
_wrapClasses,
|
56 |
+
_currPopupType;
|
57 |
+
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Private functions
|
61 |
+
*/
|
62 |
+
var _mfpOn = function ( name, f ) {
|
63 |
+
mfp.ev.on( NS + name + EVENT_NS, f );
|
64 |
+
},
|
65 |
+
_getEl = function ( className, appendTo, html, raw ) {
|
66 |
+
var el = document.createElement( 'div' );
|
67 |
+
el.className = 'mfp-' + className;
|
68 |
+
if ( html ) {
|
69 |
+
el.innerHTML = html;
|
70 |
+
}
|
71 |
+
if ( ! raw ) {
|
72 |
+
el = $( el );
|
73 |
+
if ( appendTo ) {
|
74 |
+
el.appendTo( appendTo );
|
75 |
+
}
|
76 |
+
} else if ( appendTo ) {
|
77 |
+
appendTo.appendChild( el );
|
78 |
+
}
|
79 |
+
return el;
|
80 |
+
},
|
81 |
+
_mfpTrigger = function ( e, data ) {
|
82 |
+
mfp.ev.triggerHandler( NS + e, data );
|
83 |
+
|
84 |
+
if ( mfp.st.callbacks ) {
|
85 |
+
// converts "mfpEventName" to "eventName" callback and triggers it if it's present
|
86 |
+
e = e.charAt( 0 ).toLowerCase() + e.slice( 1 );
|
87 |
+
if ( mfp.st.callbacks[e] ) {
|
88 |
+
mfp.st.callbacks[e].apply( mfp, $.isArray( data ) ? data : [ data ] );
|
89 |
+
}
|
90 |
+
}
|
91 |
+
},
|
92 |
+
_getCloseBtn = function ( type ) {
|
93 |
+
if ( type !== _currPopupType || ! mfp.currTemplate.closeBtn ) {
|
94 |
+
mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace( '%title%', mfp.st.tClose ) );
|
95 |
+
_currPopupType = type;
|
96 |
+
}
|
97 |
+
return mfp.currTemplate.closeBtn;
|
98 |
+
},
|
99 |
+
// Initialize Magnific Popup only when called at least once
|
100 |
+
_checkInstance = function () {
|
101 |
+
if ( ! $.magnificPopup.instance ) {
|
102 |
+
/*jshint -W020 */
|
103 |
+
mfp = new MagnificPopup();
|
104 |
+
mfp.init();
|
105 |
+
$.magnificPopup.instance = mfp;
|
106 |
+
}
|
107 |
+
},
|
108 |
+
// CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
|
109 |
+
supportsTransitions = function () {
|
110 |
+
var s = document.createElement( 'p' ).style, // 's' for style. better to create an element if body yet to exist
|
111 |
+
v = [ 'ms', 'O', 'Moz', 'Webkit' ]; // 'v' for vendor
|
112 |
+
|
113 |
+
if ( s['transition'] !== undefined ) {
|
114 |
+
return true;
|
115 |
+
}
|
116 |
+
|
117 |
+
while ( v.length ) {
|
118 |
+
if ( v.pop() + 'Transition' in s ) {
|
119 |
+
return true;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
return false;
|
124 |
+
};
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Public functions
|
130 |
+
*/
|
131 |
+
MagnificPopup.prototype = {
|
132 |
+
constructor: MagnificPopup,
|
133 |
+
/**
|
134 |
+
* Initializes Magnific Popup plugin.
|
135 |
+
* This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
|
136 |
+
*/
|
137 |
+
init: function () {
|
138 |
+
var appVersion = navigator.appVersion;
|
139 |
+
mfp.isIE7 = appVersion.indexOf( "MSIE 7." ) !== - 1;
|
140 |
+
mfp.isIE8 = appVersion.indexOf( "MSIE 8." ) !== - 1;
|
141 |
+
mfp.isLowIE = mfp.isIE7 || mfp.isIE8;
|
142 |
+
mfp.isAndroid = ( /android/gi ).test( appVersion );
|
143 |
+
mfp.isIOS = ( /iphone|ipad|ipod/gi ).test( appVersion );
|
144 |
+
mfp.supportsTransition = supportsTransitions();
|
145 |
+
|
146 |
+
// We disable fixed positioned lightbox on devices that don't handle it nicely.
|
147 |
+
// If you know a better way of detecting this - let me know.
|
148 |
+
mfp.probablyMobile = ( mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test( navigator.userAgent ) );
|
149 |
+
_document = $( document );
|
150 |
+
|
151 |
+
mfp.popupsCache = { };
|
152 |
+
},
|
153 |
+
/**
|
154 |
+
* Opens popup
|
155 |
+
* @param data [description]
|
156 |
+
*/
|
157 |
+
open: function ( data ) {
|
158 |
+
|
159 |
+
var i;
|
160 |
+
|
161 |
+
if ( data.isObj === false ) {
|
162 |
+
// convert jQuery collection to array to avoid conflicts later
|
163 |
+
mfp.items = data.items.toArray();
|
164 |
+
|
165 |
+
mfp.index = 0;
|
166 |
+
var items = data.items,
|
167 |
+
item;
|
168 |
+
for ( i = 0; i < items.length; i ++ ) {
|
169 |
+
item = items[i];
|
170 |
+
if ( item.parsed ) {
|
171 |
+
item = item.el[0];
|
172 |
+
}
|
173 |
+
if ( item === data.el[0] ) {
|
174 |
+
mfp.index = i;
|
175 |
+
break;
|
176 |
+
}
|
177 |
+
}
|
178 |
+
} else {
|
179 |
+
mfp.items = $.isArray( data.items ) ? data.items : [ data.items ];
|
180 |
+
mfp.index = data.index || 0;
|
181 |
+
}
|
182 |
+
|
183 |
+
// if popup is already opened - we just update the content
|
184 |
+
if ( mfp.isOpen ) {
|
185 |
+
mfp.updateItemHTML();
|
186 |
+
return;
|
187 |
+
}
|
188 |
+
|
189 |
+
mfp.types = [ ];
|
190 |
+
_wrapClasses = '';
|
191 |
+
if ( data.mainEl && data.mainEl.length ) {
|
192 |
+
mfp.ev = data.mainEl.eq( 0 );
|
193 |
+
} else {
|
194 |
+
mfp.ev = _document;
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( data.key ) {
|
198 |
+
if ( ! mfp.popupsCache[data.key] ) {
|
199 |
+
mfp.popupsCache[data.key] = { };
|
200 |
+
}
|
201 |
+
mfp.currTemplate = mfp.popupsCache[data.key];
|
202 |
+
} else {
|
203 |
+
mfp.currTemplate = { };
|
204 |
+
}
|
205 |
+
|
206 |
+
|
207 |
+
|
208 |
+
mfp.st = $.extend( true, { }, $.magnificPopup.defaults, data );
|
209 |
+
mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? ! mfp.probablyMobile : mfp.st.fixedContentPos;
|
210 |
+
|
211 |
+
if ( mfp.st.modal ) {
|
212 |
+
mfp.st.closeOnContentClick = false;
|
213 |
+
mfp.st.closeOnBgClick = false;
|
214 |
+
mfp.st.showCloseBtn = false;
|
215 |
+
mfp.st.enableEscapeKey = false;
|
216 |
+
}
|
217 |
+
|
218 |
+
|
219 |
+
// Building markup
|
220 |
+
// main containers are created only once
|
221 |
+
if ( ! mfp.bgOverlay ) {
|
222 |
+
|
223 |
+
// Dark overlay
|
224 |
+
mfp.bgOverlay = _getEl( 'bg' ).on( 'click' + EVENT_NS, function () {
|
225 |
+
mfp.close();
|
226 |
+
} );
|
227 |
+
|
228 |
+
mfp.wrap = _getEl( 'wrap' ).attr( 'tabindex', - 1 ).on( 'click' + EVENT_NS, function ( e ) {
|
229 |
+
if ( mfp._checkIfClose( e.target ) ) {
|
230 |
+
mfp.close();
|
231 |
+
}
|
232 |
+
} );
|
233 |
+
|
234 |
+
mfp.container = _getEl( 'container', mfp.wrap );
|
235 |
+
}
|
236 |
+
|
237 |
+
mfp.contentContainer = _getEl( 'content' );
|
238 |
+
if ( mfp.st.preloader ) {
|
239 |
+
mfp.preloader = _getEl( 'preloader', mfp.container, mfp.st.tLoading );
|
240 |
+
}
|
241 |
+
|
242 |
+
|
243 |
+
// Initializing modules
|
244 |
+
var modules = $.magnificPopup.modules;
|
245 |
+
for ( i = 0; i < modules.length; i ++ ) {
|
246 |
+
var n = modules[i];
|
247 |
+
n = n.charAt( 0 ).toUpperCase() + n.slice( 1 );
|
248 |
+
mfp['init' + n].call( mfp );
|
249 |
+
}
|
250 |
+
_mfpTrigger( 'BeforeOpen' );
|
251 |
+
|
252 |
+
|
253 |
+
if ( mfp.st.showCloseBtn ) {
|
254 |
+
// Close button
|
255 |
+
if ( ! mfp.st.closeBtnInside ) {
|
256 |
+
mfp.wrap.append( _getCloseBtn() );
|
257 |
+
} else {
|
258 |
+
_mfpOn( MARKUP_PARSE_EVENT, function ( e, template, values, item ) {
|
259 |
+
values.close_replaceWith = _getCloseBtn( item.type );
|
260 |
+
} );
|
261 |
+
_wrapClasses += ' mfp-close-btn-in';
|
262 |
+
}
|
263 |
+
}
|
264 |
+
|
265 |
+
if ( mfp.st.alignTop ) {
|
266 |
+
_wrapClasses += ' mfp-align-top';
|
267 |
+
}
|
268 |
+
|
269 |
+
|
270 |
+
|
271 |
+
if ( mfp.fixedContentPos ) {
|
272 |
+
mfp.wrap.css( {
|
273 |
+
overflow: mfp.st.overflowY,
|
274 |
+
overflowX: 'hidden',
|
275 |
+
overflowY: mfp.st.overflowY
|
276 |
+
} );
|
277 |
+
} else {
|
278 |
+
mfp.wrap.css( {
|
279 |
+
top: _window.scrollTop(),
|
280 |
+
position: 'absolute'
|
281 |
+
} );
|
282 |
+
}
|
283 |
+
if ( mfp.st.fixedBgPos === false || ( mfp.st.fixedBgPos === 'auto' && ! mfp.fixedContentPos ) ) {
|
284 |
+
mfp.bgOverlay.css( {
|
285 |
+
height: _document.height(),
|
286 |
+
position: 'absolute'
|
287 |
+
} );
|
288 |
+
}
|
289 |
+
|
290 |
+
|
291 |
+
|
292 |
+
if ( mfp.st.enableEscapeKey ) {
|
293 |
+
// Close on ESC key
|
294 |
+
_document.on( 'keyup' + EVENT_NS, function ( e ) {
|
295 |
+
if ( e.keyCode === 27 ) {
|
296 |
+
mfp.close();
|
297 |
+
}
|
298 |
+
} );
|
299 |
+
}
|
300 |
+
|
301 |
+
_window.on( 'resize' + EVENT_NS, function () {
|
302 |
+
mfp.updateSize();
|
303 |
+
} );
|
304 |
+
|
305 |
+
|
306 |
+
if ( ! mfp.st.closeOnContentClick ) {
|
307 |
+
_wrapClasses += ' mfp-auto-cursor';
|
308 |
+
}
|
309 |
+
|
310 |
+
if ( _wrapClasses )
|
311 |
+
mfp.wrap.addClass( _wrapClasses );
|
312 |
+
|
313 |
+
|
314 |
+
// this triggers recalculation of layout, so we get it once to not to trigger twice
|
315 |
+
var windowHeight = mfp.wH = _window.height();
|
316 |
+
|
317 |
+
|
318 |
+
var windowStyles = { };
|
319 |
+
|
320 |
+
if ( mfp.fixedContentPos ) {
|
321 |
+
if ( mfp._hasScrollBar( windowHeight ) ) {
|
322 |
+
var s = mfp._getScrollbarSize();
|
323 |
+
if ( s ) {
|
324 |
+
windowStyles.marginRight = s;
|
325 |
+
}
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
+
if ( mfp.fixedContentPos ) {
|
330 |
+
if ( ! mfp.isIE7 ) {
|
331 |
+
windowStyles.overflow = 'hidden';
|
332 |
+
} else {
|
333 |
+
// ie7 double-scroll bug
|
334 |
+
$( 'body, html' ).css( 'overflow', 'hidden' );
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
+
|
339 |
+
|
340 |
+
var classesToadd = mfp.st.mainClass;
|
341 |
+
if ( mfp.isIE7 ) {
|
342 |
+
classesToadd += ' mfp-ie7';
|
343 |
+
}
|
344 |
+
if ( classesToadd ) {
|
345 |
+
mfp._addClassToMFP( classesToadd );
|
346 |
+
}
|
347 |
+
|
348 |
+
// add content
|
349 |
+
mfp.updateItemHTML();
|
350 |
+
|
351 |
+
_mfpTrigger( 'BuildControls' );
|
352 |
+
|
353 |
+
// remove scrollbar, add margin e.t.c
|
354 |
+
$( 'html' ).css( windowStyles );
|
355 |
+
|
356 |
+
// add everything to DOM
|
357 |
+
mfp.bgOverlay.add( mfp.wrap ).prependTo( mfp.st.prependTo || $( document.body ) );
|
358 |
+
|
359 |
+
// Save last focused element
|
360 |
+
mfp._lastFocusedEl = document.activeElement;
|
361 |
+
|
362 |
+
// Wait for next cycle to allow CSS transition
|
363 |
+
setTimeout( function () {
|
364 |
+
|
365 |
+
if ( mfp.content ) {
|
366 |
+
mfp._addClassToMFP( READY_CLASS );
|
367 |
+
mfp._setFocus();
|
368 |
+
} else {
|
369 |
+
// if content is not defined (not loaded e.t.c) we add class only for BG
|
370 |
+
mfp.bgOverlay.addClass( READY_CLASS );
|
371 |
+
}
|
372 |
+
|
373 |
+
// Trap the focus in popup
|
374 |
+
_document.on( 'focusin' + EVENT_NS, mfp._onFocusIn );
|
375 |
+
|
376 |
+
}, 16 );
|
377 |
+
|
378 |
+
mfp.isOpen = true;
|
379 |
+
mfp.updateSize( windowHeight );
|
380 |
+
_mfpTrigger( OPEN_EVENT );
|
381 |
+
|
382 |
+
return data;
|
383 |
+
},
|
384 |
+
/**
|
385 |
+
* Closes the popup
|
386 |
+
*/
|
387 |
+
close: function () {
|
388 |
+
if ( ! mfp.isOpen )
|
389 |
+
return;
|
390 |
+
_mfpTrigger( BEFORE_CLOSE_EVENT );
|
391 |
+
|
392 |
+
mfp.isOpen = false;
|
393 |
+
// for CSS3 animation
|
394 |
+
if ( mfp.st.removalDelay && ! mfp.isLowIE && mfp.supportsTransition ) {
|
395 |
+
mfp._addClassToMFP( REMOVING_CLASS );
|
396 |
+
setTimeout( function () {
|
397 |
+
mfp._close();
|
398 |
+
}, mfp.st.removalDelay );
|
399 |
+
} else {
|
400 |
+
mfp._close();
|
401 |
+
}
|
402 |
+
},
|
403 |
+
/**
|
404 |
+
* Helper for close() function
|
405 |
+
*/
|
406 |
+
_close: function () {
|
407 |
+
_mfpTrigger( CLOSE_EVENT );
|
408 |
+
|
409 |
+
var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
|
410 |
+
|
411 |
+
mfp.bgOverlay.detach();
|
412 |
+
mfp.wrap.detach();
|
413 |
+
mfp.container.empty();
|
414 |
+
|
415 |
+
if ( mfp.st.mainClass ) {
|
416 |
+
classesToRemove += mfp.st.mainClass + ' ';
|
417 |
+
}
|
418 |
+
|
419 |
+
mfp._removeClassFromMFP( classesToRemove );
|
420 |
+
|
421 |
+
if ( mfp.fixedContentPos ) {
|
422 |
+
var windowStyles = { marginRight: '' };
|
423 |
+
if ( mfp.isIE7 ) {
|
424 |
+
$( 'body, html' ).css( 'overflow', '' );
|
425 |
+
} else {
|
426 |
+
windowStyles.overflow = '';
|
427 |
+
}
|
428 |
+
$( 'html' ).css( windowStyles );
|
429 |
+
}
|
430 |
+
|
431 |
+
_document.off( 'keyup' + EVENT_NS + ' focusin' + EVENT_NS );
|
432 |
+
mfp.ev.off( EVENT_NS );
|
433 |
+
|
434 |
+
// clean up DOM elements that aren't removed
|
435 |
+
mfp.wrap.attr( 'class', 'mfp-wrap' ).removeAttr( 'style' );
|
436 |
+
mfp.bgOverlay.attr( 'class', 'mfp-bg' );
|
437 |
+
mfp.container.attr( 'class', 'mfp-container' );
|
438 |
+
|
439 |
+
// remove close button from target element
|
440 |
+
if ( mfp.st.showCloseBtn &&
|
441 |
+
( ! mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true ) ) {
|
442 |
+
if ( mfp.currTemplate.closeBtn )
|
443 |
+
mfp.currTemplate.closeBtn.detach();
|
444 |
+
}
|
445 |
+
|
446 |
+
|
447 |
+
if ( mfp._lastFocusedEl ) {
|
448 |
+
$( mfp._lastFocusedEl ).focus(); // put tab focus back
|
449 |
+
}
|
450 |
+
mfp.currItem = null;
|
451 |
+
mfp.content = null;
|
452 |
+
mfp.currTemplate = null;
|
453 |
+
mfp.prevHeight = 0;
|
454 |
+
|
455 |
+
_mfpTrigger( AFTER_CLOSE_EVENT );
|
456 |
+
},
|
457 |
+
updateSize: function ( winHeight ) {
|
458 |
+
|
459 |
+
if ( mfp.isIOS ) {
|
460 |
+
// fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
|
461 |
+
var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
|
462 |
+
var height = window.innerHeight * zoomLevel;
|
463 |
+
mfp.wrap.css( 'height', height );
|
464 |
+
mfp.wH = height;
|
465 |
+
} else {
|
466 |
+
mfp.wH = winHeight || _window.height();
|
467 |
+
}
|
468 |
+
// Fixes #84: popup incorrectly positioned with position:relative on body
|
469 |
+
if ( ! mfp.fixedContentPos ) {
|
470 |
+
mfp.wrap.css( 'height', mfp.wH );
|
471 |
+
}
|
472 |
+
|
473 |
+
_mfpTrigger( 'Resize' );
|
474 |
+
|
475 |
+
},
|
476 |
+
/**
|
477 |
+
* Set content of popup based on current index
|
478 |
+
*/
|
479 |
+
updateItemHTML: function () {
|
480 |
+
var item = mfp.items[mfp.index];
|
481 |
+
|
482 |
+
// Detach and perform modifications
|
483 |
+
mfp.contentContainer.detach();
|
484 |
+
|
485 |
+
if ( mfp.content )
|
486 |
+
mfp.content.detach();
|
487 |
+
|
488 |
+
if ( ! item.parsed ) {
|
489 |
+
item = mfp.parseEl( mfp.index );
|
490 |
+
}
|
491 |
+
|
492 |
+
var type = item.type;
|
493 |
+
|
494 |
+
_mfpTrigger( 'BeforeChange', [ mfp.currItem ? mfp.currItem.type : '', type ] );
|
495 |
+
// BeforeChange event works like so:
|
496 |
+
// _mfpOn('BeforeChange', function(e, prevType, newType) { });
|
497 |
+
|
498 |
+
mfp.currItem = item;
|
499 |
+
|
500 |
+
|
501 |
+
|
502 |
+
|
503 |
+
|
504 |
+
if ( ! mfp.currTemplate[type] ) {
|
505 |
+
var markup = mfp.st[type] ? mfp.st[type].markup : false;
|
506 |
+
|
507 |
+
// allows to modify markup
|
508 |
+
_mfpTrigger( 'FirstMarkupParse', markup );
|
509 |
+
|
510 |
+
if ( markup ) {
|
511 |
+
mfp.currTemplate[type] = $( markup );
|
512 |
+
} else {
|
513 |
+
// if there is no markup found we just define that template is parsed
|
514 |
+
mfp.currTemplate[type] = true;
|
515 |
+
}
|
516 |
+
}
|
517 |
+
|
518 |
+
if ( _prevContentType && _prevContentType !== item.type ) {
|
519 |
+
mfp.container.removeClass( 'mfp-' + _prevContentType + '-holder' );
|
520 |
+
}
|
521 |
+
|
522 |
+
var newContent = mfp['get' + type.charAt( 0 ).toUpperCase() + type.slice( 1 )]( item, mfp.currTemplate[type] );
|
523 |
+
mfp.appendContent( newContent, type );
|
524 |
+
|
525 |
+
item.preloaded = true;
|
526 |
+
|
527 |
+
_mfpTrigger( CHANGE_EVENT, item );
|
528 |
+
_prevContentType = item.type;
|
529 |
+
|
530 |
+
// Append container back after its content changed
|
531 |
+
mfp.container.prepend( mfp.contentContainer );
|
532 |
+
|
533 |
+
_mfpTrigger( 'AfterChange' );
|
534 |
+
},
|
535 |
+
/**
|
536 |
+
* Set HTML content of popup
|
537 |
+
*/
|
538 |
+
appendContent: function ( newContent, type ) {
|
539 |
+
mfp.content = newContent;
|
540 |
+
|
541 |
+
if ( newContent ) {
|
542 |
+
if ( mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
|
543 |
+
mfp.currTemplate[type] === true ) {
|
544 |
+
// if there is no markup, we just append close button element inside
|
545 |
+
if ( ! mfp.content.find( '.mfp-close' ).length ) {
|
546 |
+
mfp.content.append( _getCloseBtn() );
|
547 |
+
}
|
548 |
+
} else {
|
549 |
+
mfp.content = newContent;
|
550 |
+
}
|
551 |
+
} else {
|
552 |
+
mfp.content = '';
|
553 |
+
}
|
554 |
+
|
555 |
+
_mfpTrigger( BEFORE_APPEND_EVENT );
|
556 |
+
mfp.container.addClass( 'mfp-' + type + '-holder' );
|
557 |
+
|
558 |
+
mfp.contentContainer.append( mfp.content );
|
559 |
+
},
|
560 |
+
/**
|
561 |
+
* Creates Magnific Popup data object based on given data
|
562 |
+
* @param {int} index Index of item to parse
|
563 |
+
*/
|
564 |
+
parseEl: function ( index ) {
|
565 |
+
var item = mfp.items[index],
|
566 |
+
type;
|
567 |
+
|
568 |
+
if ( item.tagName ) {
|
569 |
+
item = { el: $( item ) };
|
570 |
+
} else {
|
571 |
+
type = item.type;
|
572 |
+
item = { data: item, src: item.src };
|
573 |
+
}
|
574 |
+
|
575 |
+
if ( item.el ) {
|
576 |
+
var types = mfp.types;
|
577 |
+
|
578 |
+
// check for 'mfp-TYPE' class
|
579 |
+
for ( var i = 0; i < types.length; i ++ ) {
|
580 |
+
if ( item.el.hasClass( 'mfp-' + types[i] ) ) {
|
581 |
+
type = types[i];
|
582 |
+
break;
|
583 |
+
}
|
584 |
+
}
|
585 |
+
|
586 |
+
item.src = item.el.attr( 'data-mfp-src' );
|
587 |
+
if ( ! item.src ) {
|
588 |
+
item.src = item.el.attr( 'href' );
|
589 |
+
}
|
590 |
+
}
|
591 |
+
|
592 |
+
item.type = type || mfp.st.type || 'inline';
|
593 |
+
item.index = index;
|
594 |
+
item.parsed = true;
|
595 |
+
mfp.items[index] = item;
|
596 |
+
_mfpTrigger( 'ElementParse', item );
|
597 |
+
|
598 |
+
return mfp.items[index];
|
599 |
+
},
|
600 |
+
/**
|
601 |
+
* Initializes single popup or a group of popups
|
602 |
+
*/
|
603 |
+
addGroup: function ( el, options ) {
|
604 |
+
var eHandler = function ( e ) {
|
605 |
+
e.mfpEl = this;
|
606 |
+
mfp._openClick( e, el, options );
|
607 |
+
};
|
608 |
+
|
609 |
+
if ( ! options ) {
|
610 |
+
options = { };
|
611 |
+
}
|
612 |
+
|
613 |
+
var eName = 'click.magnificPopup';
|
614 |
+
options.mainEl = el;
|
615 |
+
|
616 |
+
if ( options.items ) {
|
617 |
+
options.isObj = true;
|
618 |
+
el.off( eName ).on( eName, eHandler );
|
619 |
+
} else {
|
620 |
+
options.isObj = false;
|
621 |
+
if ( options.delegate ) {
|
622 |
+
el.off( eName ).on( eName, options.delegate, eHandler );
|
623 |
+
} else {
|
624 |
+
options.items = el;
|
625 |
+
el.off( eName ).on( eName, eHandler );
|
626 |
+
}
|
627 |
+
}
|
628 |
+
},
|
629 |
+
_openClick: function ( e, el, options ) {
|
630 |
+
var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
|
631 |
+
|
632 |
+
|
633 |
+
if ( ! midClick && ( e.which === 2 || e.ctrlKey || e.metaKey ) ) {
|
634 |
+
return;
|
635 |
+
}
|
636 |
+
|
637 |
+
var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
|
638 |
+
|
639 |
+
if ( disableOn ) {
|
640 |
+
if ( $.isFunction( disableOn ) ) {
|
641 |
+
if ( ! disableOn.call( mfp ) ) {
|
642 |
+
return true;
|
643 |
+
}
|
644 |
+
} else { // else it's number
|
645 |
+
if ( _window.width() < disableOn ) {
|
646 |
+
return true;
|
647 |
+
}
|
648 |
+
}
|
649 |
+
}
|
650 |
+
|
651 |
+
if ( e.type ) {
|
652 |
+
e.preventDefault();
|
653 |
+
|
654 |
+
// This will prevent popup from closing if element is inside and popup is already opened
|
655 |
+
if ( mfp.isOpen ) {
|
656 |
+
e.stopPropagation();
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
|
661 |
+
options.el = $( e.mfpEl );
|
662 |
+
if ( options.delegate ) {
|
663 |
+
options.items = el.find( options.delegate );
|
664 |
+
}
|
665 |
+
mfp.open( options );
|
666 |
+
},
|
667 |
+
/**
|
668 |
+
* Updates text on preloader
|
669 |
+
*/
|
670 |
+
updateStatus: function ( status, text ) {
|
671 |
+
|
672 |
+
if ( mfp.preloader ) {
|
673 |
+
if ( _prevStatus !== status ) {
|
674 |
+
mfp.container.removeClass( 'mfp-s-' + _prevStatus );
|
675 |
+
}
|
676 |
+
|
677 |
+
if ( ! text && status === 'loading' ) {
|
678 |
+
text = mfp.st.tLoading;
|
679 |
+
}
|
680 |
+
|
681 |
+
var data = {
|
682 |
+
status: status,
|
683 |
+
text: text
|
684 |
+
};
|
685 |
+
// allows to modify status
|
686 |
+
_mfpTrigger( 'UpdateStatus', data );
|
687 |
+
|
688 |
+
status = data.status;
|
689 |
+
text = data.text;
|
690 |
+
|
691 |
+
mfp.preloader.html( text );
|
692 |
+
|
693 |
+
mfp.preloader.find( 'a' ).on( 'click', function ( e ) {
|
694 |
+
e.stopImmediatePropagation();
|
695 |
+
} );
|
696 |
+
|
697 |
+
mfp.container.addClass( 'mfp-s-' + status );
|
698 |
+
_prevStatus = status;
|
699 |
+
}
|
700 |
+
},
|
701 |
+
/*
|
702 |
+
"Private" helpers that aren't private at all
|
703 |
+
*/
|
704 |
+
// Check to close popup or not
|
705 |
+
// "target" is an element that was clicked
|
706 |
+
_checkIfClose: function ( target ) {
|
707 |
+
|
708 |
+
if ( $( target ).hasClass( PREVENT_CLOSE_CLASS ) ) {
|
709 |
+
return;
|
710 |
+
}
|
711 |
+
|
712 |
+
var closeOnContent = mfp.st.closeOnContentClick;
|
713 |
+
var closeOnBg = mfp.st.closeOnBgClick;
|
714 |
+
|
715 |
+
if ( closeOnContent && closeOnBg ) {
|
716 |
+
return true;
|
717 |
+
} else {
|
718 |
+
|
719 |
+
// We close the popup if click is on close button or on preloader. Or if there is no content.
|
720 |
+
if ( ! mfp.content || $( target ).hasClass( 'mfp-close' ) || ( mfp.preloader && target === mfp.preloader[0] ) ) {
|
721 |
+
return true;
|
722 |
+
}
|
723 |
+
|
724 |
+
// if click is outside the content
|
725 |
+
if ( ( target !== mfp.content[0] && ! $.contains( mfp.content[0], target ) ) ) {
|
726 |
+
if ( closeOnBg ) {
|
727 |
+
// last check, if the clicked element is in DOM, (in case it's removed onclick)
|
728 |
+
if ( $.contains( document, target ) ) {
|
729 |
+
return true;
|
730 |
+
}
|
731 |
+
}
|
732 |
+
} else if ( closeOnContent ) {
|
733 |
+
return true;
|
734 |
+
}
|
735 |
+
|
736 |
+
}
|
737 |
+
return false;
|
738 |
+
},
|
739 |
+
_addClassToMFP: function ( cName ) {
|
740 |
+
mfp.bgOverlay.addClass( cName );
|
741 |
+
mfp.wrap.addClass( cName );
|
742 |
+
},
|
743 |
+
_removeClassFromMFP: function ( cName ) {
|
744 |
+
this.bgOverlay.removeClass( cName );
|
745 |
+
mfp.wrap.removeClass( cName );
|
746 |
+
},
|
747 |
+
_hasScrollBar: function ( winHeight ) {
|
748 |
+
return ( ( mfp.isIE7 ? _document.height() : document.body.scrollHeight ) > ( winHeight || _window.height() ) );
|
749 |
+
},
|
750 |
+
_setFocus: function () {
|
751 |
+
( mfp.st.focus ? mfp.content.find( mfp.st.focus ).eq( 0 ) : mfp.wrap ).focus();
|
752 |
+
},
|
753 |
+
_onFocusIn: function ( e ) {
|
754 |
+
if ( e.target !== mfp.wrap[0] && ! $.contains( mfp.wrap[0], e.target ) ) {
|
755 |
+
mfp._setFocus();
|
756 |
+
return false;
|
757 |
+
}
|
758 |
+
},
|
759 |
+
_parseMarkup: function ( template, values, item ) {
|
760 |
+
var arr;
|
761 |
+
if ( item.data ) {
|
762 |
+
values = $.extend( item.data, values );
|
763 |
+
}
|
764 |
+
_mfpTrigger( MARKUP_PARSE_EVENT, [ template, values, item ] );
|
765 |
+
|
766 |
+
$.each( values, function ( key, value ) {
|
767 |
+
if ( value === undefined || value === false ) {
|
768 |
+
return true;
|
769 |
+
}
|
770 |
+
arr = key.split( '_' );
|
771 |
+
if ( arr.length > 1 ) {
|
772 |
+
var el = template.find( EVENT_NS + '-' + arr[0] );
|
773 |
+
|
774 |
+
if ( el.length > 0 ) {
|
775 |
+
var attr = arr[1];
|
776 |
+
if ( attr === 'replaceWith' ) {
|
777 |
+
if ( el[0] !== value[0] ) {
|
778 |
+
el.replaceWith( value );
|
779 |
+
}
|
780 |
+
} else if ( attr === 'img' ) {
|
781 |
+
if ( el.is( 'img' ) ) {
|
782 |
+
el.attr( 'src', value );
|
783 |
+
} else {
|
784 |
+
el.replaceWith( '<img src="' + value + '" class="' + el.attr( 'class' ) + '" />' );
|
785 |
+
}
|
786 |
+
} else {
|
787 |
+
el.attr( arr[1], value );
|
788 |
+
}
|
789 |
+
}
|
790 |
+
|
791 |
+
} else {
|
792 |
+
template.find( EVENT_NS + '-' + key ).html( value );
|
793 |
+
}
|
794 |
+
} );
|
795 |
+
},
|
796 |
+
_getScrollbarSize: function () {
|
797 |
+
// thx David
|
798 |
+
if ( mfp.scrollbarSize === undefined ) {
|
799 |
+
var scrollDiv = document.createElement( "div" );
|
800 |
+
scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
|
801 |
+
document.body.appendChild( scrollDiv );
|
802 |
+
mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
|
803 |
+
document.body.removeChild( scrollDiv );
|
804 |
+
}
|
805 |
+
return mfp.scrollbarSize;
|
806 |
+
}
|
807 |
+
|
808 |
+
}; /* MagnificPopup core prototype end */
|
809 |
+
|
810 |
+
|
811 |
+
|
812 |
+
|
813 |
+
/**
|
814 |
+
* Public static functions
|
815 |
+
*/
|
816 |
+
$.magnificPopup = {
|
817 |
+
instance: null,
|
818 |
+
proto: MagnificPopup.prototype,
|
819 |
+
modules: [ ],
|
820 |
+
open: function ( options, index ) {
|
821 |
+
_checkInstance();
|
822 |
+
|
823 |
+
if ( ! options ) {
|
824 |
+
options = { };
|
825 |
+
} else {
|
826 |
+
options = $.extend( true, { }, options );
|
827 |
+
}
|
828 |
+
|
829 |
+
|
830 |
+
options.isObj = true;
|
831 |
+
options.index = index || 0;
|
832 |
+
return this.instance.open( options );
|
833 |
+
},
|
834 |
+
close: function () {
|
835 |
+
return $.magnificPopup.instance && $.magnificPopup.instance.close();
|
836 |
+
},
|
837 |
+
registerModule: function ( name, module ) {
|
838 |
+
if ( module.options ) {
|
839 |
+
$.magnificPopup.defaults[name] = module.options;
|
840 |
+
}
|
841 |
+
$.extend( this.proto, module.proto );
|
842 |
+
this.modules.push( name );
|
843 |
+
},
|
844 |
+
defaults: {
|
845 |
+
// Info about options is in docs:
|
846 |
+
// http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
|
847 |
+
|
848 |
+
disableOn: 0,
|
849 |
+
key: null,
|
850 |
+
midClick: false,
|
851 |
+
mainClass: '',
|
852 |
+
preloader: true,
|
853 |
+
focus: '', // CSS selector of input to focus after popup is opened
|
854 |
+
|
855 |
+
closeOnContentClick: false,
|
856 |
+
closeOnBgClick: true,
|
857 |
+
closeBtnInside: true,
|
858 |
+
showCloseBtn: true,
|
859 |
+
enableEscapeKey: true,
|
860 |
+
modal: false,
|
861 |
+
alignTop: false,
|
862 |
+
removalDelay: 0,
|
863 |
+
prependTo: null,
|
864 |
+
fixedContentPos: 'auto',
|
865 |
+
fixedBgPos: 'auto',
|
866 |
+
overflowY: 'auto',
|
867 |
+
closeMarkup: '<button title="%title%" type="button" class="mfp-close">×</button>',
|
868 |
+
tClose: 'Close (Esc)',
|
869 |
+
tLoading: 'Loading...'
|
870 |
+
|
871 |
+
}
|
872 |
+
};
|
873 |
+
|
874 |
+
|
875 |
+
|
876 |
+
$.fn.magnificPopup = function ( options ) {
|
877 |
+
_checkInstance();
|
878 |
+
|
879 |
+
var jqEl = $( this );
|
880 |
+
|
881 |
+
// We call some API method of first param is a string
|
882 |
+
if ( typeof options === "string" ) {
|
883 |
+
|
884 |
+
if ( options === 'open' ) {
|
885 |
+
var items,
|
886 |
+
itemOpts = _isJQ ? jqEl.data( 'magnificPopup' ) : jqEl[0].magnificPopup,
|
887 |
+
index = parseInt( arguments[1], 10 ) || 0;
|
888 |
+
|
889 |
+
if ( itemOpts.items ) {
|
890 |
+
items = itemOpts.items[index];
|
891 |
+
} else {
|
892 |
+
items = jqEl;
|
893 |
+
if ( itemOpts.delegate ) {
|
894 |
+
items = items.find( itemOpts.delegate );
|
895 |
+
}
|
896 |
+
items = items.eq( index );
|
897 |
+
}
|
898 |
+
mfp._openClick( { mfpEl: items }, jqEl, itemOpts );
|
899 |
+
} else {
|
900 |
+
if ( mfp.isOpen )
|
901 |
+
mfp[options].apply( mfp, Array.prototype.slice.call( arguments, 1 ) );
|
902 |
+
}
|
903 |
+
|
904 |
+
} else {
|
905 |
+
// clone options obj
|
906 |
+
options = $.extend( true, { }, options );
|
907 |
+
|
908 |
+
/*
|
909 |
+
* As Zepto doesn't support .data() method for objects
|
910 |
+
* and it works only in normal browsers
|
911 |
+
* we assign "options" object directly to the DOM element. FTW!
|
912 |
+
*/
|
913 |
+
if ( _isJQ ) {
|
914 |
+
jqEl.data( 'magnificPopup', options );
|
915 |
+
} else {
|
916 |
+
jqEl[0].magnificPopup = options;
|
917 |
+
}
|
918 |
+
|
919 |
+
mfp.addGroup( jqEl, options );
|
920 |
+
|
921 |
+
}
|
922 |
+
return jqEl;
|
923 |
+
};
|
924 |
+
|
925 |
+
|
926 |
+
//Quick benchmark
|
927 |
+
/*
|
928 |
+
var start = performance.now(),
|
929 |
+
i,
|
930 |
+
rounds = 1000;
|
931 |
+
|
932 |
+
for(i = 0; i < rounds; i++) {
|
933 |
+
|
934 |
+
}
|
935 |
+
console.log('Test #1:', performance.now() - start);
|
936 |
+
|
937 |
+
start = performance.now();
|
938 |
+
for(i = 0; i < rounds; i++) {
|
939 |
+
|
940 |
+
}
|
941 |
+
console.log('Test #2:', performance.now() - start);
|
942 |
+
*/
|
943 |
+
|
944 |
+
|
945 |
+
/*>>core*/
|
946 |
+
|
947 |
+
/*>>inline*/
|
948 |
+
|
949 |
+
var INLINE_NS = 'inline',
|
950 |
+
_hiddenClass,
|
951 |
+
_inlinePlaceholder,
|
952 |
+
_lastInlineElement,
|
953 |
+
_putInlineElementsBack = function () {
|
954 |
+
if ( _lastInlineElement ) {
|
955 |
+
_inlinePlaceholder.after( _lastInlineElement.addClass( _hiddenClass ) ).detach();
|
956 |
+
_lastInlineElement = null;
|
957 |
+
}
|
958 |
+
};
|
959 |
+
|
960 |
+
$.magnificPopup.registerModule( INLINE_NS, {
|
961 |
+
options: {
|
962 |
+
hiddenClass: 'hide', // will be appended with `mfp-` prefix
|
963 |
+
markup: '',
|
964 |
+
tNotFound: 'Content not found'
|
965 |
+
},
|
966 |
+
proto: {
|
967 |
+
initInline: function () {
|
968 |
+
mfp.types.push( INLINE_NS );
|
969 |
+
|
970 |
+
_mfpOn( CLOSE_EVENT + '.' + INLINE_NS, function () {
|
971 |
+
_putInlineElementsBack();
|
972 |
+
} );
|
973 |
+
},
|
974 |
+
getInline: function ( item, template ) {
|
975 |
+
|
976 |
+
_putInlineElementsBack();
|
977 |
+
|
978 |
+
if ( item.src ) {
|
979 |
+
var inlineSt = mfp.st.inline,
|
980 |
+
el = $( item.src );
|
981 |
+
|
982 |
+
if ( el.length ) {
|
983 |
+
|
984 |
+
// If target element has parent - we replace it with placeholder and put it back after popup is closed
|
985 |
+
var parent = el[0].parentNode;
|
986 |
+
if ( parent && parent.tagName ) {
|
987 |
+
if ( ! _inlinePlaceholder ) {
|
988 |
+
_hiddenClass = inlineSt.hiddenClass;
|
989 |
+
_inlinePlaceholder = _getEl( _hiddenClass );
|
990 |
+
_hiddenClass = 'mfp-' + _hiddenClass;
|
991 |
+
}
|
992 |
+
// replace target inline element with placeholder
|
993 |
+
_lastInlineElement = el.after( _inlinePlaceholder ).detach().removeClass( _hiddenClass );
|
994 |
+
}
|
995 |
+
|
996 |
+
mfp.updateStatus( 'ready' );
|
997 |
+
} else {
|
998 |
+
mfp.updateStatus( 'error', inlineSt.tNotFound );
|
999 |
+
el = $( '<div>' );
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
item.inlineElement = el;
|
1003 |
+
return el;
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
mfp.updateStatus( 'ready' );
|
1007 |
+
mfp._parseMarkup( template, { }, item );
|
1008 |
+
return template;
|
1009 |
+
}
|
1010 |
+
}
|
1011 |
+
} );
|
1012 |
+
|
1013 |
+
/*>>inline*/
|
1014 |
+
|
1015 |
+
/*>>ajax*/
|
1016 |
+
var AJAX_NS = 'ajax',
|
1017 |
+
_ajaxCur,
|
1018 |
+
_removeAjaxCursor = function () {
|
1019 |
+
if ( _ajaxCur ) {
|
1020 |
+
$( document.body ).removeClass( _ajaxCur );
|
1021 |
+
}
|
1022 |
+
},
|
1023 |
+
_destroyAjaxRequest = function () {
|
1024 |
+
_removeAjaxCursor();
|
1025 |
+
if ( mfp.req ) {
|
1026 |
+
mfp.req.abort();
|
1027 |
+
}
|
1028 |
+
};
|
1029 |
+
|
1030 |
+
$.magnificPopup.registerModule( AJAX_NS, {
|
1031 |
+
options: {
|
1032 |
+
settings: null,
|
1033 |
+
cursor: 'mfp-ajax-cur',
|
1034 |
+
tError: '<a href="%url%">The content</a> could not be loaded.'
|
1035 |
+
},
|
1036 |
+
proto: {
|
1037 |
+
initAjax: function () {
|
1038 |
+
mfp.types.push( AJAX_NS );
|
1039 |
+
_ajaxCur = mfp.st.ajax.cursor;
|
1040 |
+
|
1041 |
+
_mfpOn( CLOSE_EVENT + '.' + AJAX_NS, _destroyAjaxRequest );
|
1042 |
+
_mfpOn( 'BeforeChange.' + AJAX_NS, _destroyAjaxRequest );
|
1043 |
+
},
|
1044 |
+
getAjax: function ( item ) {
|
1045 |
+
|
1046 |
+
if ( _ajaxCur ) {
|
1047 |
+
$( document.body ).addClass( _ajaxCur );
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
mfp.updateStatus( 'loading' );
|
1051 |
+
|
1052 |
+
var opts = $.extend( {
|
1053 |
+
url: item.src,
|
1054 |
+
success: function ( data, textStatus, jqXHR ) {
|
1055 |
+
var temp = {
|
1056 |
+
data: data,
|
1057 |
+
xhr: jqXHR
|
1058 |
+
};
|
1059 |
+
|
1060 |
+
_mfpTrigger( 'ParseAjax', temp );
|
1061 |
+
|
1062 |
+
mfp.appendContent( $( temp.data ), AJAX_NS );
|
1063 |
+
|
1064 |
+
item.finished = true;
|
1065 |
+
|
1066 |
+
_removeAjaxCursor();
|
1067 |
+
|
1068 |
+
mfp._setFocus();
|
1069 |
+
|
1070 |
+
setTimeout( function () {
|
1071 |
+
mfp.wrap.addClass( READY_CLASS );
|
1072 |
+
}, 16 );
|
1073 |
+
|
1074 |
+
mfp.updateStatus( 'ready' );
|
1075 |
+
|
1076 |
+
_mfpTrigger( 'AjaxContentAdded' );
|
1077 |
+
},
|
1078 |
+
error: function () {
|
1079 |
+
_removeAjaxCursor();
|
1080 |
+
item.finished = item.loadError = true;
|
1081 |
+
mfp.updateStatus( 'error', mfp.st.ajax.tError.replace( '%url%', item.src ) );
|
1082 |
+
}
|
1083 |
+
}, mfp.st.ajax.settings );
|
1084 |
+
|
1085 |
+
mfp.req = $.ajax( opts );
|
1086 |
+
|
1087 |
+
return '';
|
1088 |
+
}
|
1089 |
+
}
|
1090 |
+
} );
|
1091 |
+
|
1092 |
+
|
1093 |
+
|
1094 |
+
|
1095 |
+
|
1096 |
+
|
1097 |
+
|
1098 |
+
/*>>ajax*/
|
1099 |
+
|
1100 |
+
/*>>image*/
|
1101 |
+
var _imgInterval,
|
1102 |
+
_getTitle = function ( item ) {
|
1103 |
+
if ( item.data && item.data.title !== undefined )
|
1104 |
+
return item.data.title;
|
1105 |
+
|
1106 |
+
var src = mfp.st.image.titleSrc;
|
1107 |
+
|
1108 |
+
if ( src ) {
|
1109 |
+
if ( $.isFunction( src ) ) {
|
1110 |
+
return src.call( mfp, item );
|
1111 |
+
} else if ( item.el ) {
|
1112 |
+
return item.el.attr( src ) || '';
|
1113 |
+
}
|
1114 |
+
}
|
1115 |
+
return '';
|
1116 |
+
};
|
1117 |
+
|
1118 |
+
$.magnificPopup.registerModule( 'image', {
|
1119 |
+
options: {
|
1120 |
+
markup: '<div class="mfp-figure">' +
|
1121 |
+
'<div class="mfp-close"></div>' +
|
1122 |
+
'<figure>' +
|
1123 |
+
'<div class="mfp-img"></div>' +
|
1124 |
+
'<figcaption>' +
|
1125 |
+
'<div class="mfp-bottom-bar">' +
|
1126 |
+
'<div class="mfp-title"></div>' +
|
1127 |
+
'<div class="mfp-counter"></div>' +
|
1128 |
+
'</div>' +
|
1129 |
+
'</figcaption>' +
|
1130 |
+
'</figure>' +
|
1131 |
+
'</div>',
|
1132 |
+
cursor: 'mfp-zoom-out-cur',
|
1133 |
+
titleSrc: 'title',
|
1134 |
+
verticalFit: true,
|
1135 |
+
tError: '<a href="%url%">The image</a> could not be loaded.'
|
1136 |
+
},
|
1137 |
+
proto: {
|
1138 |
+
initImage: function () {
|
1139 |
+
var imgSt = mfp.st.image,
|
1140 |
+
ns = '.image';
|
1141 |
+
|
1142 |
+
mfp.types.push( 'image' );
|
1143 |
+
|
1144 |
+
_mfpOn( OPEN_EVENT + ns, function () {
|
1145 |
+
if ( mfp.currItem.type === 'image' && imgSt.cursor ) {
|
1146 |
+
$( document.body ).addClass( imgSt.cursor );
|
1147 |
+
}
|
1148 |
+
} );
|
1149 |
+
|
1150 |
+
_mfpOn( CLOSE_EVENT + ns, function () {
|
1151 |
+
if ( imgSt.cursor ) {
|
1152 |
+
$( document.body ).removeClass( imgSt.cursor );
|
1153 |
+
}
|
1154 |
+
_window.off( 'resize' + EVENT_NS );
|
1155 |
+
} );
|
1156 |
+
|
1157 |
+
_mfpOn( 'Resize' + ns, mfp.resizeImage );
|
1158 |
+
if ( mfp.isLowIE ) {
|
1159 |
+
_mfpOn( 'AfterChange', mfp.resizeImage );
|
1160 |
+
}
|
1161 |
+
},
|
1162 |
+
resizeImage: function () {
|
1163 |
+
var item = mfp.currItem;
|
1164 |
+
if ( ! item || ! item.img )
|
1165 |
+
return;
|
1166 |
+
|
1167 |
+
if ( mfp.st.image.verticalFit ) {
|
1168 |
+
var decr = 0;
|
1169 |
+
// fix box-sizing in ie7/8
|
1170 |
+
if ( mfp.isLowIE ) {
|
1171 |
+
decr = parseInt( item.img.css( 'padding-top' ), 10 ) + parseInt( item.img.css( 'padding-bottom' ), 10 );
|
1172 |
+
}
|
1173 |
+
item.img.css( 'max-height', mfp.wH - decr );
|
1174 |
+
}
|
1175 |
+
},
|
1176 |
+
_onImageHasSize: function ( item ) {
|
1177 |
+
if ( item.img ) {
|
1178 |
+
|
1179 |
+
item.hasSize = true;
|
1180 |
+
|
1181 |
+
if ( _imgInterval ) {
|
1182 |
+
clearInterval( _imgInterval );
|
1183 |
+
}
|
1184 |
+
|
1185 |
+
item.isCheckingImgSize = false;
|
1186 |
+
|
1187 |
+
_mfpTrigger( 'ImageHasSize', item );
|
1188 |
+
|
1189 |
+
if ( item.imgHidden ) {
|
1190 |
+
if ( mfp.content )
|
1191 |
+
mfp.content.removeClass( 'mfp-loading' );
|
1192 |
+
|
1193 |
+
item.imgHidden = false;
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
}
|
1197 |
+
},
|
1198 |
+
/**
|
1199 |
+
* Function that loops until the image has size to display elements that rely on it asap
|
1200 |
+
*/
|
1201 |
+
findImageSize: function ( item ) {
|
1202 |
+
|
1203 |
+
var counter = 0,
|
1204 |
+
img = item.img[0],
|
1205 |
+
mfpSetInterval = function ( delay ) {
|
1206 |
+
|
1207 |
+
if ( _imgInterval ) {
|
1208 |
+
clearInterval( _imgInterval );
|
1209 |
+
}
|
1210 |
+
// decelerating interval that checks for size of an image
|
1211 |
+
_imgInterval = setInterval( function () {
|
1212 |
+
if ( img.naturalWidth > 0 ) {
|
1213 |
+
mfp._onImageHasSize( item );
|
1214 |
+
return;
|
1215 |
+
}
|
1216 |
+
|
1217 |
+
if ( counter > 200 ) {
|
1218 |
+
clearInterval( _imgInterval );
|
1219 |
+
}
|
1220 |
+
|
1221 |
+
counter ++;
|
1222 |
+
if ( counter === 3 ) {
|
1223 |
+
mfpSetInterval( 10 );
|
1224 |
+
} else if ( counter === 40 ) {
|
1225 |
+
mfpSetInterval( 50 );
|
1226 |
+
} else if ( counter === 100 ) {
|
1227 |
+
mfpSetInterval( 500 );
|
1228 |
+
}
|
1229 |
+
}, delay );
|
1230 |
+
};
|
1231 |
+
|
1232 |
+
mfpSetInterval( 1 );
|
1233 |
+
},
|
1234 |
+
getImage: function ( item, template ) {
|
1235 |
+
|
1236 |
+
var guard = 0,
|
1237 |
+
// image load complete handler
|
1238 |
+
onLoadComplete = function () {
|
1239 |
+
if ( item ) {
|
1240 |
+
if ( item.img[0].complete ) {
|
1241 |
+
item.img.off( '.mfploader' );
|
1242 |
+
|
1243 |
+
if ( item === mfp.currItem ) {
|
1244 |
+
mfp._onImageHasSize( item );
|
1245 |
+
|
1246 |
+
mfp.updateStatus( 'ready' );
|
1247 |
+
}
|
1248 |
+
|
1249 |
+
item.hasSize = true;
|
1250 |
+
item.loaded = true;
|
1251 |
+
|
1252 |
+
_mfpTrigger( 'ImageLoadComplete' );
|
1253 |
+
|
1254 |
+
}
|
1255 |
+
else {
|
1256 |
+
// if image complete check fails 200 times (20 sec), we assume that there was an error.
|
1257 |
+
guard ++;
|
1258 |
+
if ( guard < 200 ) {
|
1259 |
+
setTimeout( onLoadComplete, 100 );
|
1260 |
+
} else {
|
1261 |
+
onLoadError();
|
1262 |
+
}
|
1263 |
+
}
|
1264 |
+
}
|
1265 |
+
},
|
1266 |
+
// image error handler
|
1267 |
+
onLoadError = function () {
|
1268 |
+
if ( item ) {
|
1269 |
+
item.img.off( '.mfploader' );
|
1270 |
+
if ( item === mfp.currItem ) {
|
1271 |
+
mfp._onImageHasSize( item );
|
1272 |
+
mfp.updateStatus( 'error', imgSt.tError.replace( '%url%', item.src ) );
|
1273 |
+
}
|
1274 |
+
|
1275 |
+
item.hasSize = true;
|
1276 |
+
item.loaded = true;
|
1277 |
+
item.loadError = true;
|
1278 |
+
}
|
1279 |
+
},
|
1280 |
+
imgSt = mfp.st.image;
|
1281 |
+
|
1282 |
+
|
1283 |
+
var el = template.find( '.mfp-img' );
|
1284 |
+
if ( el.length ) {
|
1285 |
+
var img = document.createElement( 'img' );
|
1286 |
+
img.className = 'mfp-img';
|
1287 |
+
if ( item.el && item.el.find( 'img' ).length ) {
|
1288 |
+
img.alt = item.el.find( 'img' ).attr( 'alt' );
|
1289 |
+
}
|
1290 |
+
item.img = $( img ).on( 'load.mfploader', onLoadComplete ).on( 'error.mfploader', onLoadError );
|
1291 |
+
img.src = item.src;
|
1292 |
+
|
1293 |
+
// without clone() "error" event is not firing when IMG is replaced by new IMG
|
1294 |
+
// TODO: find a way to avoid such cloning
|
1295 |
+
if ( el.is( 'img' ) ) {
|
1296 |
+
item.img = item.img.clone();
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
img = item.img[0];
|
1300 |
+
if ( img.naturalWidth > 0 ) {
|
1301 |
+
item.hasSize = true;
|
1302 |
+
} else if ( ! img.width ) {
|
1303 |
+
item.hasSize = false;
|
1304 |
+
}
|
1305 |
+
}
|
1306 |
+
|
1307 |
+
mfp._parseMarkup( template, {
|
1308 |
+
title: _getTitle( item ),
|
1309 |
+
img_replaceWith: item.img
|
1310 |
+
}, item );
|
1311 |
+
|
1312 |
+
mfp.resizeImage();
|
1313 |
+
|
1314 |
+
if ( item.hasSize ) {
|
1315 |
+
if ( _imgInterval )
|
1316 |
+
clearInterval( _imgInterval );
|
1317 |
+
|
1318 |
+
if ( item.loadError ) {
|
1319 |
+
template.addClass( 'mfp-loading' );
|
1320 |
+
mfp.updateStatus( 'error', imgSt.tError.replace( '%url%', item.src ) );
|
1321 |
+
} else {
|
1322 |
+
template.removeClass( 'mfp-loading' );
|
1323 |
+
mfp.updateStatus( 'ready' );
|
1324 |
+
}
|
1325 |
+
return template;
|
1326 |
+
}
|
1327 |
+
|
1328 |
+
mfp.updateStatus( 'loading' );
|
1329 |
+
item.loading = true;
|
1330 |
+
|
1331 |
+
if ( ! item.hasSize ) {
|
1332 |
+
item.imgHidden = true;
|
1333 |
+
template.addClass( 'mfp-loading' );
|
1334 |
+
mfp.findImageSize( item );
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
return template;
|
1338 |
+
}
|
1339 |
+
}
|
1340 |
+
} );
|
1341 |
+
|
1342 |
+
|
1343 |
+
|
1344 |
+
/*>>image*/
|
1345 |
+
|
1346 |
+
/*>>zoom*/
|
1347 |
+
var hasMozTransform,
|
1348 |
+
getHasMozTransform = function () {
|
1349 |
+
if ( hasMozTransform === undefined ) {
|
1350 |
+
hasMozTransform = document.createElement( 'p' ).style.MozTransform !== undefined;
|
1351 |
+
}
|
1352 |
+
return hasMozTransform;
|
1353 |
+
};
|
1354 |
+
|
1355 |
+
$.magnificPopup.registerModule( 'zoom', {
|
1356 |
+
options: {
|
1357 |
+
enabled: false,
|
1358 |
+
easing: 'ease-in-out',
|
1359 |
+
duration: 300,
|
1360 |
+
opener: function ( element ) {
|
1361 |
+
return element.is( 'img' ) ? element : element.find( 'img' );
|
1362 |
+
}
|
1363 |
+
},
|
1364 |
+
proto: {
|
1365 |
+
initZoom: function () {
|
1366 |
+
var zoomSt = mfp.st.zoom,
|
1367 |
+
ns = '.zoom',
|
1368 |
+
image;
|
1369 |
+
|
1370 |
+
if ( ! zoomSt.enabled || ! mfp.supportsTransition ) {
|
1371 |
+
return;
|
1372 |
+
}
|
1373 |
+
|
1374 |
+
var duration = zoomSt.duration,
|
1375 |
+
getElToAnimate = function ( image ) {
|
1376 |
+
var newImg = image.clone().removeAttr( 'style' ).removeAttr( 'class' ).addClass( 'mfp-animated-image' ),
|
1377 |
+
transition = 'all ' + ( zoomSt.duration / 1000 ) + 's ' + zoomSt.easing,
|
1378 |
+
cssObj = {
|
1379 |
+
position: 'fixed',
|
1380 |
+
zIndex: 9999,
|
1381 |
+
left: 0,
|
1382 |
+
top: 0,
|
1383 |
+
'-webkit-backface-visibility': 'hidden'
|
1384 |
+
},
|
1385 |
+
t = 'transition';
|
1386 |
+
|
1387 |
+
cssObj['-webkit-' + t] = cssObj['-moz-' + t] = cssObj['-o-' + t] = cssObj[t] = transition;
|
1388 |
+
|
1389 |
+
newImg.css( cssObj );
|
1390 |
+
return newImg;
|
1391 |
+
},
|
1392 |
+
showMainContent = function () {
|
1393 |
+
mfp.content.css( 'visibility', 'visible' );
|
1394 |
+
},
|
1395 |
+
openTimeout,
|
1396 |
+
animatedImg;
|
1397 |
+
|
1398 |
+
_mfpOn( 'BuildControls' + ns, function () {
|
1399 |
+
if ( mfp._allowZoom() ) {
|
1400 |
+
|
1401 |
+
clearTimeout( openTimeout );
|
1402 |
+
mfp.content.css( 'visibility', 'hidden' );
|
1403 |
+
|
1404 |
+
// Basically, all code below does is clones existing image, puts in on top of the current one and animated it
|
1405 |
+
|
1406 |
+
image = mfp._getItemToZoom();
|
1407 |
+
|
1408 |
+
if ( ! image ) {
|
1409 |
+
showMainContent();
|
1410 |
+
return;
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
animatedImg = getElToAnimate( image );
|
1414 |
+
|
1415 |
+
animatedImg.css( mfp._getOffset() );
|
1416 |
+
|
1417 |
+
mfp.wrap.append( animatedImg );
|
1418 |
+
|
1419 |
+
openTimeout = setTimeout( function () {
|
1420 |
+
animatedImg.css( mfp._getOffset( true ) );
|
1421 |
+
openTimeout = setTimeout( function () {
|
1422 |
+
|
1423 |
+
showMainContent();
|
1424 |
+
|
1425 |
+
setTimeout( function () {
|
1426 |
+
animatedImg.remove();
|
1427 |
+
image = animatedImg = null;
|
1428 |
+
_mfpTrigger( 'ZoomAnimationEnded' );
|
1429 |
+
}, 16 ); // avoid blink when switching images
|
1430 |
+
|
1431 |
+
}, duration ); // this timeout equals animation duration
|
1432 |
+
|
1433 |
+
}, 16 ); // by adding this timeout we avoid short glitch at the beginning of animation
|
1434 |
+
|
1435 |
+
|
1436 |
+
// Lots of timeouts...
|
1437 |
+
}
|
1438 |
+
} );
|
1439 |
+
_mfpOn( BEFORE_CLOSE_EVENT + ns, function () {
|
1440 |
+
if ( mfp._allowZoom() ) {
|
1441 |
+
|
1442 |
+
clearTimeout( openTimeout );
|
1443 |
+
|
1444 |
+
mfp.st.removalDelay = duration;
|
1445 |
+
|
1446 |
+
if ( ! image ) {
|
1447 |
+
image = mfp._getItemToZoom();
|
1448 |
+
if ( ! image ) {
|
1449 |
+
return;
|
1450 |
+
}
|
1451 |
+
animatedImg = getElToAnimate( image );
|
1452 |
+
}
|
1453 |
+
|
1454 |
+
|
1455 |
+
animatedImg.css( mfp._getOffset( true ) );
|
1456 |
+
mfp.wrap.append( animatedImg );
|
1457 |
+
mfp.content.css( 'visibility', 'hidden' );
|
1458 |
+
|
1459 |
+
setTimeout( function () {
|
1460 |
+
animatedImg.css( mfp._getOffset() );
|
1461 |
+
}, 16 );
|
1462 |
+
}
|
1463 |
+
|
1464 |
+
} );
|
1465 |
+
|
1466 |
+
_mfpOn( CLOSE_EVENT + ns, function () {
|
1467 |
+
if ( mfp._allowZoom() ) {
|
1468 |
+
showMainContent();
|
1469 |
+
if ( animatedImg ) {
|
1470 |
+
animatedImg.remove();
|
1471 |
+
}
|
1472 |
+
image = null;
|
1473 |
+
}
|
1474 |
+
} );
|
1475 |
+
},
|
1476 |
+
_allowZoom: function () {
|
1477 |
+
return mfp.currItem.type === 'image';
|
1478 |
+
},
|
1479 |
+
_getItemToZoom: function () {
|
1480 |
+
if ( mfp.currItem.hasSize ) {
|
1481 |
+
return mfp.currItem.img;
|
1482 |
+
} else {
|
1483 |
+
return false;
|
1484 |
+
}
|
1485 |
+
},
|
1486 |
+
// Get element postion relative to viewport
|
1487 |
+
_getOffset: function ( isLarge ) {
|
1488 |
+
var el;
|
1489 |
+
if ( isLarge ) {
|
1490 |
+
el = mfp.currItem.img;
|
1491 |
+
} else {
|
1492 |
+
el = mfp.st.zoom.opener( mfp.currItem.el || mfp.currItem );
|
1493 |
+
}
|
1494 |
+
|
1495 |
+
var offset = el.offset();
|
1496 |
+
var paddingTop = parseInt( el.css( 'padding-top' ), 10 );
|
1497 |
+
var paddingBottom = parseInt( el.css( 'padding-bottom' ), 10 );
|
1498 |
+
offset.top -= ( $( window ).scrollTop() - paddingTop );
|
1499 |
+
|
1500 |
+
|
1501 |
+
/*
|
1502 |
+
|
1503 |
+
Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
|
1504 |
+
|
1505 |
+
*/
|
1506 |
+
var obj = {
|
1507 |
+
width: el.width(),
|
1508 |
+
// fix Zepto height+padding issue
|
1509 |
+
height: ( _isJQ ? el.innerHeight() : el[0].offsetHeight ) - paddingBottom - paddingTop
|
1510 |
+
};
|
1511 |
+
|
1512 |
+
// I hate to do this, but there is no another option
|
1513 |
+
if ( getHasMozTransform() ) {
|
1514 |
+
obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
|
1515 |
+
} else {
|
1516 |
+
obj.left = offset.left;
|
1517 |
+
obj.top = offset.top;
|
1518 |
+
}
|
1519 |
+
return obj;
|
1520 |
+
}
|
1521 |
+
|
1522 |
+
}
|
1523 |
+
} );
|
1524 |
+
|
1525 |
+
|
1526 |
+
|
1527 |
+
/*>>zoom*/
|
1528 |
+
|
1529 |
+
/*>>iframe*/
|
1530 |
+
|
1531 |
+
var IFRAME_NS = 'iframe',
|
1532 |
+
_emptyPage = '//about:blank',
|
1533 |
+
_fixIframeBugs = function ( isShowing ) {
|
1534 |
+
if ( mfp.currTemplate[IFRAME_NS] ) {
|
1535 |
+
var el = mfp.currTemplate[IFRAME_NS].find( 'iframe' );
|
1536 |
+
if ( el.length ) {
|
1537 |
+
// reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
|
1538 |
+
if ( ! isShowing ) {
|
1539 |
+
el[0].src = _emptyPage;
|
1540 |
+
}
|
1541 |
+
|
1542 |
+
// IE8 black screen bug fix
|
1543 |
+
if ( mfp.isIE8 ) {
|
1544 |
+
el.css( 'display', isShowing ? 'block' : 'none' );
|
1545 |
+
}
|
1546 |
+
}
|
1547 |
+
}
|
1548 |
+
};
|
1549 |
+
|
1550 |
+
$.magnificPopup.registerModule( IFRAME_NS, {
|
1551 |
+
options: {
|
1552 |
+
markup: '<div class="mfp-iframe-scaler">' +
|
1553 |
+
'<div class="mfp-close"></div>' +
|
1554 |
+
'<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>' +
|
1555 |
+
'</div>',
|
1556 |
+
srcAction: 'iframe_src',
|
1557 |
+
// we don't care and support only one default type of URL by default
|
1558 |
+
patterns: {
|
1559 |
+
youtube: {
|
1560 |
+
index: 'youtube.com',
|
1561 |
+
id: 'v=',
|
1562 |
+
src: '//www.youtube.com/embed/%id%?autoplay=1'
|
1563 |
+
},
|
1564 |
+
vimeo: {
|
1565 |
+
index: 'vimeo.com/',
|
1566 |
+
id: '/',
|
1567 |
+
src: '//player.vimeo.com/video/%id%?autoplay=1'
|
1568 |
+
},
|
1569 |
+
gmaps: {
|
1570 |
+
index: '//maps.google.',
|
1571 |
+
src: '%id%&output=embed'
|
1572 |
+
}
|
1573 |
+
}
|
1574 |
+
},
|
1575 |
+
proto: {
|
1576 |
+
initIframe: function () {
|
1577 |
+
mfp.types.push( IFRAME_NS );
|
1578 |
+
|
1579 |
+
_mfpOn( 'BeforeChange', function ( e, prevType, newType ) {
|
1580 |
+
if ( prevType !== newType ) {
|
1581 |
+
if ( prevType === IFRAME_NS ) {
|
1582 |
+
_fixIframeBugs(); // iframe if removed
|
1583 |
+
} else if ( newType === IFRAME_NS ) {
|
1584 |
+
_fixIframeBugs( true ); // iframe is showing
|
1585 |
+
}
|
1586 |
+
}// else {
|
1587 |
+
// iframe source is switched, don't do anything
|
1588 |
+
//}
|
1589 |
+
} );
|
1590 |
+
|
1591 |
+
_mfpOn( CLOSE_EVENT + '.' + IFRAME_NS, function () {
|
1592 |
+
_fixIframeBugs();
|
1593 |
+
} );
|
1594 |
+
},
|
1595 |
+
getIframe: function ( item, template ) {
|
1596 |
+
var embedSrc = item.src;
|
1597 |
+
var iframeSt = mfp.st.iframe;
|
1598 |
+
|
1599 |
+
$.each( iframeSt.patterns, function () {
|
1600 |
+
if ( embedSrc.indexOf( this.index ) > - 1 ) {
|
1601 |
+
if ( this.id ) {
|
1602 |
+
if ( typeof this.id === 'string' ) {
|
1603 |
+
embedSrc = embedSrc.substr( embedSrc.lastIndexOf( this.id ) + this.id.length, embedSrc.length );
|
1604 |
+
} else {
|
1605 |
+
embedSrc = this.id.call( this, embedSrc );
|
1606 |
+
}
|
1607 |
+
}
|
1608 |
+
embedSrc = this.src.replace( '%id%', embedSrc );
|
1609 |
+
return false; // break;
|
1610 |
+
}
|
1611 |
+
} );
|
1612 |
+
|
1613 |
+
var dataObj = { };
|
1614 |
+
if ( iframeSt.srcAction ) {
|
1615 |
+
dataObj[iframeSt.srcAction] = embedSrc;
|
1616 |
+
}
|
1617 |
+
mfp._parseMarkup( template, dataObj, item );
|
1618 |
+
|
1619 |
+
mfp.updateStatus( 'ready' );
|
1620 |
+
|
1621 |
+
return template;
|
1622 |
+
}
|
1623 |
+
}
|
1624 |
+
} );
|
1625 |
+
|
1626 |
+
|
1627 |
+
|
1628 |
+
/*>>iframe*/
|
1629 |
+
|
1630 |
+
/*>>gallery*/
|
1631 |
+
/**
|
1632 |
+
* Get looped index depending on number of slides
|
1633 |
+
*/
|
1634 |
+
var _getLoopedId = function ( index ) {
|
1635 |
+
var numSlides = mfp.items.length;
|
1636 |
+
if ( index > numSlides - 1 ) {
|
1637 |
+
return index - numSlides;
|
1638 |
+
} else if ( index < 0 ) {
|
1639 |
+
return numSlides + index;
|
1640 |
+
}
|
1641 |
+
return index;
|
1642 |
+
},
|
1643 |
+
_replaceCurrTotal = function ( text, curr, total ) {
|
1644 |
+
return text.replace( /%curr%/gi, curr + 1 ).replace( /%total%/gi, total );
|
1645 |
+
};
|
1646 |
+
|
1647 |
+
$.magnificPopup.registerModule( 'gallery', {
|
1648 |
+
options: {
|
1649 |
+
enabled: false,
|
1650 |
+
arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
|
1651 |
+
preload: [ 0, 2 ],
|
1652 |
+
navigateByImgClick: true,
|
1653 |
+
arrows: true,
|
1654 |
+
tPrev: 'Previous (Left arrow key)',
|
1655 |
+
tNext: 'Next (Right arrow key)',
|
1656 |
+
tCounter: '%curr% of %total%'
|
1657 |
+
},
|
1658 |
+
proto: {
|
1659 |
+
initGallery: function () {
|
1660 |
+
|
1661 |
+
var gSt = mfp.st.gallery,
|
1662 |
+
ns = '.mfp-gallery',
|
1663 |
+
supportsFastClick = Boolean( $.fn.mfpFastClick );
|
1664 |
+
|
1665 |
+
mfp.direction = true; // true - next, false - prev
|
1666 |
+
|
1667 |
+
if ( ! gSt || ! gSt.enabled )
|
1668 |
+
return false;
|
1669 |
+
|
1670 |
+
_wrapClasses += ' mfp-gallery';
|
1671 |
+
|
1672 |
+
_mfpOn( OPEN_EVENT + ns, function () {
|
1673 |
+
|
1674 |
+
if ( gSt.navigateByImgClick ) {
|
1675 |
+
mfp.wrap.on( 'click' + ns, '.mfp-img', function () {
|
1676 |
+
if ( mfp.items.length > 1 ) {
|
1677 |
+
mfp.next();
|
1678 |
+
return false;
|
1679 |
+
}
|
1680 |
+
} );
|
1681 |
+
}
|
1682 |
+
|
1683 |
+
_document.on( 'keydown' + ns, function ( e ) {
|
1684 |
+
if ( e.keyCode === 37 ) {
|
1685 |
+
mfp.prev();
|
1686 |
+
} else if ( e.keyCode === 39 ) {
|
1687 |
+
mfp.next();
|
1688 |
+
}
|
1689 |
+
} );
|
1690 |
+
} );
|
1691 |
+
|
1692 |
+
_mfpOn( 'UpdateStatus' + ns, function ( e, data ) {
|
1693 |
+
if ( data.text ) {
|
1694 |
+
data.text = _replaceCurrTotal( data.text, mfp.currItem.index, mfp.items.length );
|
1695 |
+
}
|
1696 |
+
} );
|
1697 |
+
|
1698 |
+
_mfpOn( MARKUP_PARSE_EVENT + ns, function ( e, element, values, item ) {
|
1699 |
+
var l = mfp.items.length;
|
1700 |
+
values.counter = l > 1 ? _replaceCurrTotal( gSt.tCounter, item.index, l ) : '';
|
1701 |
+
} );
|
1702 |
+
|
1703 |
+
_mfpOn( 'BuildControls' + ns, function () {
|
1704 |
+
if ( mfp.items.length > 1 && gSt.arrows && ! mfp.arrowLeft ) {
|
1705 |
+
var markup = gSt.arrowMarkup,
|
1706 |
+
arrowLeft = mfp.arrowLeft = $( markup.replace( /%title%/gi, gSt.tPrev ).replace( /%dir%/gi, 'left' ) ).addClass( PREVENT_CLOSE_CLASS ),
|
1707 |
+
arrowRight = mfp.arrowRight = $( markup.replace( /%title%/gi, gSt.tNext ).replace( /%dir%/gi, 'right' ) ).addClass( PREVENT_CLOSE_CLASS );
|
1708 |
+
|
1709 |
+
var eName = supportsFastClick ? 'mfpFastClick' : 'click';
|
1710 |
+
arrowLeft[eName]( function () {
|
1711 |
+
mfp.prev();
|
1712 |
+
} );
|
1713 |
+
arrowRight[eName]( function () {
|
1714 |
+
mfp.next();
|
1715 |
+
} );
|
1716 |
+
|
1717 |
+
// Polyfill for :before and :after (adds elements with classes mfp-a and mfp-b)
|
1718 |
+
if ( mfp.isIE7 ) {
|
1719 |
+
_getEl( 'b', arrowLeft[0], false, true );
|
1720 |
+
_getEl( 'a', arrowLeft[0], false, true );
|
1721 |
+
_getEl( 'b', arrowRight[0], false, true );
|
1722 |
+
_getEl( 'a', arrowRight[0], false, true );
|
1723 |
+
}
|
1724 |
+
|
1725 |
+
mfp.container.append( arrowLeft.add( arrowRight ) );
|
1726 |
+
}
|
1727 |
+
} );
|
1728 |
+
|
1729 |
+
_mfpOn( CHANGE_EVENT + ns, function () {
|
1730 |
+
if ( mfp._preloadTimeout )
|
1731 |
+
clearTimeout( mfp._preloadTimeout );
|
1732 |
+
|
1733 |
+
mfp._preloadTimeout = setTimeout( function () {
|
1734 |
+
mfp.preloadNearbyImages();
|
1735 |
+
mfp._preloadTimeout = null;
|
1736 |
+
}, 16 );
|
1737 |
+
} );
|
1738 |
+
|
1739 |
+
|
1740 |
+
_mfpOn( CLOSE_EVENT + ns, function () {
|
1741 |
+
_document.off( ns );
|
1742 |
+
mfp.wrap.off( 'click' + ns );
|
1743 |
+
|
1744 |
+
if ( mfp.arrowLeft && supportsFastClick ) {
|
1745 |
+
mfp.arrowLeft.add( mfp.arrowRight ).destroyMfpFastClick();
|
1746 |
+
}
|
1747 |
+
mfp.arrowRight = mfp.arrowLeft = null;
|
1748 |
+
} );
|
1749 |
+
|
1750 |
+
},
|
1751 |
+
next: function () {
|
1752 |
+
mfp.direction = true;
|
1753 |
+
mfp.index = _getLoopedId( mfp.index + 1 );
|
1754 |
+
mfp.updateItemHTML();
|
1755 |
+
},
|
1756 |
+
prev: function () {
|
1757 |
+
mfp.direction = false;
|
1758 |
+
mfp.index = _getLoopedId( mfp.index - 1 );
|
1759 |
+
mfp.updateItemHTML();
|
1760 |
+
},
|
1761 |
+
goTo: function ( newIndex ) {
|
1762 |
+
mfp.direction = ( newIndex >= mfp.index );
|
1763 |
+
mfp.index = newIndex;
|
1764 |
+
mfp.updateItemHTML();
|
1765 |
+
},
|
1766 |
+
preloadNearbyImages: function () {
|
1767 |
+
var p = mfp.st.gallery.preload,
|
1768 |
+
preloadBefore = Math.min( p[0], mfp.items.length ),
|
1769 |
+
preloadAfter = Math.min( p[1], mfp.items.length ),
|
1770 |
+
i;
|
1771 |
+
|
1772 |
+
for ( i = 1; i <= ( mfp.direction ? preloadAfter : preloadBefore ); i ++ ) {
|
1773 |
+
mfp._preloadItem( mfp.index + i );
|
1774 |
+
}
|
1775 |
+
for ( i = 1; i <= ( mfp.direction ? preloadBefore : preloadAfter ); i ++ ) {
|
1776 |
+
mfp._preloadItem( mfp.index - i );
|
1777 |
+
}
|
1778 |
+
},
|
1779 |
+
_preloadItem: function ( index ) {
|
1780 |
+
index = _getLoopedId( index );
|
1781 |
+
|
1782 |
+
if ( mfp.items[index].preloaded ) {
|
1783 |
+
return;
|
1784 |
+
}
|
1785 |
+
|
1786 |
+
var item = mfp.items[index];
|
1787 |
+
if ( ! item.parsed ) {
|
1788 |
+
item = mfp.parseEl( index );
|
1789 |
+
}
|
1790 |
+
|
1791 |
+
_mfpTrigger( 'LazyLoad', item );
|
1792 |
+
|
1793 |
+
if ( item.type === 'image' ) {
|
1794 |
+
item.img = $( '<img class="mfp-img" />' ).on( 'load.mfploader', function () {
|
1795 |
+
item.hasSize = true;
|
1796 |
+
} ).on( 'error.mfploader', function () {
|
1797 |
+
item.hasSize = true;
|
1798 |
+
item.loadError = true;
|
1799 |
+
_mfpTrigger( 'LazyLoadError', item );
|
1800 |
+
} ).attr( 'src', item.src );
|
1801 |
+
}
|
1802 |
+
|
1803 |
+
|
1804 |
+
item.preloaded = true;
|
1805 |
+
}
|
1806 |
+
}
|
1807 |
+
} );
|
1808 |
+
|
1809 |
+
/*
|
1810 |
+
Touch Support that might be implemented some day
|
1811 |
+
|
1812 |
+
addSwipeGesture: function() {
|
1813 |
+
var startX,
|
1814 |
+
moved,
|
1815 |
+
multipleTouches;
|
1816 |
+
|
1817 |
+
return;
|
1818 |
+
|
1819 |
+
var namespace = '.mfp',
|
1820 |
+
addEventNames = function(pref, down, move, up, cancel) {
|
1821 |
+
mfp._tStart = pref + down + namespace;
|
1822 |
+
mfp._tMove = pref + move + namespace;
|
1823 |
+
mfp._tEnd = pref + up + namespace;
|
1824 |
+
mfp._tCancel = pref + cancel + namespace;
|
1825 |
+
};
|
1826 |
+
|
1827 |
+
if(window.navigator.msPointerEnabled) {
|
1828 |
+
addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
|
1829 |
+
} else if('ontouchstart' in window) {
|
1830 |
+
addEventNames('touch', 'start', 'move', 'end', 'cancel');
|
1831 |
+
} else {
|
1832 |
+
return;
|
1833 |
+
}
|
1834 |
+
_window.on(mfp._tStart, function(e) {
|
1835 |
+
var oE = e.originalEvent;
|
1836 |
+
multipleTouches = moved = false;
|
1837 |
+
startX = oE.pageX || oE.changedTouches[0].pageX;
|
1838 |
+
}).on(mfp._tMove, function(e) {
|
1839 |
+
if(e.originalEvent.touches.length > 1) {
|
1840 |
+
multipleTouches = e.originalEvent.touches.length;
|
1841 |
+
} else {
|
1842 |
+
//e.preventDefault();
|
1843 |
+
moved = true;
|
1844 |
+
}
|
1845 |
+
}).on(mfp._tEnd + ' ' + mfp._tCancel, function(e) {
|
1846 |
+
if(moved && !multipleTouches) {
|
1847 |
+
var oE = e.originalEvent,
|
1848 |
+
diff = startX - (oE.pageX || oE.changedTouches[0].pageX);
|
1849 |
+
|
1850 |
+
if(diff > 20) {
|
1851 |
+
mfp.next();
|
1852 |
+
} else if(diff < -20) {
|
1853 |
+
mfp.prev();
|
1854 |
+
}
|
1855 |
+
}
|
1856 |
+
});
|
1857 |
+
},
|
1858 |
+
*/
|
1859 |
+
|
1860 |
+
|
1861 |
+
/*>>gallery*/
|
1862 |
+
|
1863 |
+
/*>>retina*/
|
1864 |
+
|
1865 |
+
var RETINA_NS = 'retina';
|
1866 |
+
|
1867 |
+
$.magnificPopup.registerModule( RETINA_NS, {
|
1868 |
+
options: {
|
1869 |
+
replaceSrc: function ( item ) {
|
1870 |
+
return item.src.replace( /\.\w+$/, function ( m ) {
|
1871 |
+
return '@2x' + m;
|
1872 |
+
} );
|
1873 |
+
},
|
1874 |
+
ratio: 1 // Function or number. Set to 1 to disable.
|
1875 |
+
},
|
1876 |
+
proto: {
|
1877 |
+
initRetina: function () {
|
1878 |
+
if ( window.devicePixelRatio > 1 ) {
|
1879 |
+
|
1880 |
+
var st = mfp.st.retina,
|
1881 |
+
ratio = st.ratio;
|
1882 |
+
|
1883 |
+
ratio = ! isNaN( ratio ) ? ratio : ratio();
|
1884 |
+
|
1885 |
+
if ( ratio > 1 ) {
|
1886 |
+
_mfpOn( 'ImageHasSize' + '.' + RETINA_NS, function ( e, item ) {
|
1887 |
+
item.img.css( {
|
1888 |
+
'max-width': item.img[0].naturalWidth / ratio,
|
1889 |
+
'width': '100%'
|
1890 |
+
} );
|
1891 |
+
} );
|
1892 |
+
_mfpOn( 'ElementParse' + '.' + RETINA_NS, function ( e, item ) {
|
1893 |
+
item.src = st.replaceSrc( item, ratio );
|
1894 |
+
} );
|
1895 |
+
}
|
1896 |
+
}
|
1897 |
+
|
1898 |
+
}
|
1899 |
+
}
|
1900 |
+
} );
|
1901 |
+
|
1902 |
+
/*>>retina*/
|
1903 |
+
|
1904 |
+
/*>>fastclick*/
|
1905 |
+
/**
|
1906 |
+
* FastClick event implementation. (removes 300ms delay on touch devices)
|
1907 |
+
* Based on https://developers.google.com/mobile/articles/fast_buttons
|
1908 |
+
*
|
1909 |
+
* You may use it outside the Magnific Popup by calling just:
|
1910 |
+
*
|
1911 |
+
* $('.your-el').mfpFastClick(function() {
|
1912 |
+
* console.log('Clicked!');
|
1913 |
+
* });
|
1914 |
+
*
|
1915 |
+
* To unbind:
|
1916 |
+
* $('.your-el').destroyMfpFastClick();
|
1917 |
+
*
|
1918 |
+
*
|
1919 |
+
* Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound.
|
1920 |
+
* If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick
|
1921 |
+
*
|
1922 |
+
*/
|
1923 |
+
|
1924 |
+
( function () {
|
1925 |
+
var ghostClickDelay = 1000,
|
1926 |
+
supportsTouch = 'ontouchstart' in window,
|
1927 |
+
unbindTouchMove = function () {
|
1928 |
+
_window.off( 'touchmove' + ns + ' touchend' + ns );
|
1929 |
+
},
|
1930 |
+
eName = 'mfpFastClick',
|
1931 |
+
ns = '.' + eName;
|
1932 |
+
|
1933 |
+
|
1934 |
+
// As Zepto.js doesn't have an easy way to add custom events (like jQuery), so we implement it in this way
|
1935 |
+
$.fn.mfpFastClick = function ( callback ) {
|
1936 |
+
|
1937 |
+
return $( this ).each( function () {
|
1938 |
+
|
1939 |
+
var elem = $( this ),
|
1940 |
+
lock;
|
1941 |
+
|
1942 |
+
if ( supportsTouch ) {
|
1943 |
+
|
1944 |
+
var timeout,
|
1945 |
+
startX,
|
1946 |
+
startY,
|
1947 |
+
pointerMoved,
|
1948 |
+
point,
|
1949 |
+
numPointers;
|
1950 |
+
|
1951 |
+
elem.on( 'touchstart' + ns, function ( e ) {
|
1952 |
+
pointerMoved = false;
|
1953 |
+
numPointers = 1;
|
1954 |
+
|
1955 |
+
point = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0];
|
1956 |
+
startX = point.clientX;
|
1957 |
+
startY = point.clientY;
|
1958 |
+
|
1959 |
+
_window.on( 'touchmove' + ns, function ( e ) {
|
1960 |
+
point = e.originalEvent ? e.originalEvent.touches : e.touches;
|
1961 |
+
numPointers = point.length;
|
1962 |
+
point = point[0];
|
1963 |
+
if ( Math.abs( point.clientX - startX ) > 10 ||
|
1964 |
+
Math.abs( point.clientY - startY ) > 10 ) {
|
1965 |
+
pointerMoved = true;
|
1966 |
+
unbindTouchMove();
|
1967 |
+
}
|
1968 |
+
} ).on( 'touchend' + ns, function ( e ) {
|
1969 |
+
unbindTouchMove();
|
1970 |
+
if ( pointerMoved || numPointers > 1 ) {
|
1971 |
+
return;
|
1972 |
+
}
|
1973 |
+
lock = true;
|
1974 |
+
e.preventDefault();
|
1975 |
+
clearTimeout( timeout );
|
1976 |
+
timeout = setTimeout( function () {
|
1977 |
+
lock = false;
|
1978 |
+
}, ghostClickDelay );
|
1979 |
+
callback();
|
1980 |
+
} );
|
1981 |
+
} );
|
1982 |
+
|
1983 |
+
}
|
1984 |
+
|
1985 |
+
elem.on( 'click' + ns, function () {
|
1986 |
+
if ( ! lock ) {
|
1987 |
+
callback();
|
1988 |
+
}
|
1989 |
+
} );
|
1990 |
+
} );
|
1991 |
+
};
|
1992 |
+
|
1993 |
+
$.fn.destroyMfpFastClick = function () {
|
1994 |
+
$( this ).off( 'touchstart' + ns + ' click' + ns );
|
1995 |
+
if ( supportsTouch )
|
1996 |
+
_window.off( 'touchmove' + ns + ' touchend' + ns );
|
1997 |
+
};
|
1998 |
+
} )();
|
1999 |
+
|
2000 |
+
/*>>fastclick*/
|
2001 |
+
_checkInstance();
|
2002 |
+
} ) );
|
app/helper/RTMediaAddon.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* Description of RTMediaAddon
|
5 |
*
|
@@ -9,11 +8,13 @@
|
|
9 |
* @author Gagandeep Singh <gagandeep.singh@rtcamp.com>
|
10 |
* @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
|
11 |
*/
|
12 |
-
if ( ! class_exists( 'RTMediaAddon' ) ){
|
13 |
|
14 |
class RTMediaAddon {
|
15 |
|
16 |
public $enquiry_link = 'http://rtcamp.com/contact/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media';
|
|
|
|
|
17 |
|
18 |
/**
|
19 |
* Show coming_soon_div.
|
@@ -24,7 +25,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
24 |
*
|
25 |
* @return void
|
26 |
*/
|
27 |
-
public function coming_soon_div(){
|
28 |
return '<div class="coming-soon coming-soon-l"></div> <a class="coming-soon coming-soon-r" href="' . $this->enquiry_link . '" target="_blank"></a>';
|
29 |
}
|
30 |
|
@@ -37,25 +38,27 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
37 |
*
|
38 |
* @return void
|
39 |
*/
|
40 |
-
public static function render_addons( $page = '' ){
|
41 |
global $wp_settings_sections, $wp_settings_fields;
|
42 |
|
43 |
-
|
|
|
|
|
44 |
return;
|
45 |
}
|
46 |
|
47 |
-
foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
|
48 |
|
49 |
-
if ( $section['callback'] ){
|
50 |
-
call_user_func( $section['callback'], $section );
|
51 |
}
|
52 |
|
53 |
-
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ){
|
54 |
continue;
|
55 |
}
|
56 |
|
57 |
echo '<table class="form-table">';
|
58 |
-
do_settings_fields( $page, $section['id'] );
|
59 |
echo '</table>';
|
60 |
}
|
61 |
}
|
@@ -69,13 +72,14 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
69 |
*
|
70 |
* @return void
|
71 |
*/
|
72 |
-
public function get_addons(){
|
73 |
$tabs = array();
|
74 |
global $rtmedia_admin;
|
75 |
$tabs[] = array(
|
76 |
'title' => __( 'Plugins', 'rtmedia' ),
|
77 |
'name' => __( 'Plugins', 'rtmedia' ),
|
78 |
'href' => '#rtm-plugins',
|
|
|
79 |
'callback' => array( $this, 'plugins_content' )
|
80 |
);
|
81 |
|
@@ -83,66 +87,13 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
83 |
'title' => __( 'Audio/Video Encoding', 'rtmedia' ),
|
84 |
'name' => __( 'Audio/Video Encoding', 'rtmedia' ),
|
85 |
'href' => '#rtm-services',
|
|
|
86 |
'callback' => array( $rtmedia_admin->rtmedia_encoding, 'encoding_service_intro' )
|
87 |
);
|
88 |
|
89 |
-
|
90 |
-
'title' => __('Themes', 'rtmedia'),
|
91 |
-
'name' => __('Themes', 'rtmedia'),
|
92 |
-
'href' => '#bpm-themes',
|
93 |
-
'callback' => array($this, 'themes_content')
|
94 |
-
);*/
|
95 |
-
|
96 |
-
?>
|
97 |
-
<div id="rtm-addons">
|
98 |
-
<div class="horizontal-tabs">
|
99 |
-
<dl class='tabs' data-tab>
|
100 |
-
<?php
|
101 |
-
$i = 1;
|
102 |
-
foreach ( $tabs as $tab ) {
|
103 |
-
$active_class = '';
|
104 |
-
if ( 1 == $i ){
|
105 |
-
$active_class = 'active';
|
106 |
-
}
|
107 |
-
$i ++;
|
108 |
-
?>
|
109 |
-
<dd class="<?php echo $active_class ?>">
|
110 |
-
<a id="tab-<?php echo substr( $tab['href'], 1 ) ?>" title="<?php echo $tab['title'] ?>" href="<?php echo $tab['href'] ?>" class="rtmedia-tab-title <?php echo sanitize_title( $tab['name'] ) ?>"><?php echo $tab['name'] ?></a>
|
111 |
-
</dd>
|
112 |
-
<?php
|
113 |
-
}
|
114 |
-
?>
|
115 |
-
</dl>
|
116 |
-
|
117 |
-
<?php
|
118 |
-
$k = 1;
|
119 |
-
$active_class = '';
|
120 |
-
echo "<div class='tabs-content'>";
|
121 |
-
foreach ( $tabs as $tab ) {
|
122 |
-
$active_class = '';
|
123 |
-
if ( 1 == $k ){
|
124 |
-
$active_class = ' active';
|
125 |
-
}
|
126 |
-
$k ++;
|
127 |
-
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
128 |
-
$icon = '<i class="' . $tab['icon'] . '"></i>';
|
129 |
-
}
|
130 |
-
$tab_without_hash = explode( '#', $tab['href'] );
|
131 |
-
$tab_without_hash = $tab_without_hash[1];
|
132 |
-
echo '<div class="row content' . $active_class . '" id="' . $tab_without_hash . '">';
|
133 |
-
echo '<div class="large-12 columns">';
|
134 |
-
call_user_func( $tab['callback'] );
|
135 |
-
echo '</div>';
|
136 |
-
echo '</div>';
|
137 |
-
}
|
138 |
-
echo '</div>';
|
139 |
-
?>
|
140 |
-
</div>
|
141 |
-
</div>
|
142 |
-
<?php
|
143 |
}
|
144 |
|
145 |
-
|
146 |
/**
|
147 |
* Display plugins in Addons Section.
|
148 |
*
|
@@ -152,9 +103,9 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
152 |
*
|
153 |
* @return void
|
154 |
*/
|
155 |
-
public function plugins_content( $args = '' ){
|
156 |
-
$img_src = RTMEDIA_URL . 'app/assets/img/';
|
157 |
-
$addons
|
158 |
'general' => array(
|
159 |
array(
|
160 |
'title' => __( 'rtMedia Social Sync', 'rtmedia' ),
|
@@ -172,62 +123,62 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
172 |
array(
|
173 |
'title' => __( 'rtMedia Photo Watermark', 'rtmedia' ),
|
174 |
'img_src' => $img_src . 'rtmedia-watermark-240x184.png',
|
175 |
-
'product_link' => 'http://rtcamp.com/
|
176 |
'desc' => '<p>' . __( 'rtMedia Photo Watermark add-on let you add text or copyright on your images uploaded using rtMedia.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have either ImageMagick or GD library installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
177 |
'price' => '$49',
|
178 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
179 |
-
'buy_now' => 'https://rtcamp.com/
|
180 |
'category' => 'photo',
|
181 |
'purchased' => ( defined( 'RTMEDIA_WATERMARK_URL' ) || file_exists( WP_PLUGIN_DIR . '/rtmedia-photo-watermak/index.php' ) ) ? true : false,
|
182 |
),
|
183 |
array(
|
184 |
'title' => __( 'rtMedia Photo Tagging', 'rtmedia' ),
|
185 |
'img_src' => $img_src . 'rtmedia-phototagging-240x184.png',
|
186 |
-
'product_link' => 'http://rtcamp.com/
|
187 |
'desc' => '<p>' . __( 'rtMedia Photo Tagging add-on enables tagging on photos uploaded using BuddyPress Media.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
188 |
'price' => '$49',
|
189 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
190 |
-
'buy_now' => 'https://rtcamp.com/
|
191 |
'category' => 'photo',
|
192 |
'purchased' => ( defined( 'RTMEDIA_PHOTO_TAGGING_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-photo-tag/index.php' ) ) ? true : false,
|
193 |
),
|
194 |
array(
|
195 |
'title' => __( 'rtMedia Instagram', 'rtmedia' ),
|
196 |
'img_src' => $img_src . 'rtmedia-instagram-240x184.png',
|
197 |
-
'product_link' => 'http://rtcamp.com/
|
198 |
'desc' => '<p>' . __( 'rtMedia Instagram adds Instagram like filters to images uploaded with rtMedia.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
199 |
'price' => '$49',
|
200 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
201 |
-
'buy_now' => 'https://rtcamp.com/
|
202 |
'category' => 'photo',
|
203 |
'purchased' => ( defined( 'RTMEDIA_INSTAGRAM_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-instagram/index.php' ) ) ? true : false,
|
204 |
),
|
205 |
),
|
206 |
-
'video'=> array(
|
207 |
array(
|
208 |
'title' => __( 'rtMedia Kaltura Add-on', 'rtmedia' ),
|
209 |
'img_src' => $img_src . 'rtmedia-kaltura-240x184.png',
|
210 |
-
'product_link' => 'http://rtcamp.com/
|
211 |
'desc' => '<p>' . __( 'Add support for more video formats using Kaltura video solution.', 'rtmedia' ) . '</p> <p>' . __( 'Works with Kaltura.com, self-hosted Kaltura-CE and Kaltura-on-premise.', 'rtmedia' ) . '</p>',
|
212 |
'price' => '$199',
|
213 |
'demo_link' => 'http://demo.rtcamp.com/bpm-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
214 |
-
'buy_now' => 'https://rtcamp.com/
|
215 |
'category' => 'video',
|
216 |
'purchased' => ( defined( 'RTMEDIA_KALTURA_PATH' ) || file_exists( WP_PLUGIN_DIR . '/bpm-kaltura/index.php' ) ) ? true : false,
|
217 |
),
|
218 |
array(
|
219 |
'title' => __( 'rtMedia FFMPEG Add-on', 'rtmedia' ),
|
220 |
'img_src' => $img_src . 'rtmedia-ffmpeg-240x184.png',
|
221 |
-
'product_link' => 'http://rtcamp.com/
|
222 |
'desc' => '<p>' . __( 'Add supports for more audio & video formats using open-source media-node.', 'rtmedia' ) . '</p> <p>' . __( 'Media node comes with automated setup script for Ubuntu/Debian.', 'rtmedia' ) . '</p>',
|
223 |
'price' => '$199',
|
224 |
'demo_link' => 'http://demo.rtcamp.com/bpm-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
225 |
-
'buy_now' => 'https://rtcamp.com/
|
226 |
'category' => 'video',
|
227 |
'purchased' => ( defined( 'RTMEDIA_FFMPEG_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-ffmpeg/index.php' ) ) ? true : false,
|
228 |
),
|
229 |
),
|
230 |
-
'membership'=> array(
|
231 |
array(
|
232 |
'title' => __( 'rtMedia Membership Add-on', 'rtmedia' ),
|
233 |
'img_src' => $img_src . 'rtmedia-membership-240x184.png',
|
@@ -240,22 +191,22 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
240 |
),
|
241 |
),
|
242 |
);
|
243 |
-
$addons
|
244 |
|
245 |
-
$general_addons = $addons['general'];
|
246 |
-
$photo_addons = $addons['photo'];
|
247 |
-
$video_addons = $addons['video'];
|
248 |
-
$membership_addons = $addons['membership'];
|
249 |
|
250 |
-
echo '<h3>';
|
251 |
-
|
252 |
echo '</h3>';
|
253 |
|
254 |
foreach ( $general_addons as $key => $value ) {
|
255 |
$this->addon( $value );
|
256 |
}
|
257 |
|
258 |
-
echo '<h3>';
|
259 |
_e( 'rtMedia Addons for Photos', 'rtmedia' );
|
260 |
echo '</h3>';
|
261 |
|
@@ -263,7 +214,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
263 |
$this->addon( $value );
|
264 |
}
|
265 |
|
266 |
-
echo '<h3>';
|
267 |
_e( 'rtMedia Addons for Audio/Video', 'rtmedia' );
|
268 |
echo '</h3>';
|
269 |
|
@@ -271,7 +222,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
271 |
$this->addon( $value );
|
272 |
}
|
273 |
|
274 |
-
echo '<h3>';
|
275 |
_e( 'rtMedia Addon for Membership', 'rtmedia' );
|
276 |
echo '</h3>';
|
277 |
|
@@ -289,7 +240,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
289 |
*
|
290 |
* @return void
|
291 |
*/
|
292 |
-
public function services_content( $args = '' ){
|
293 |
$objEncoding->encoding_service_intro();
|
294 |
}
|
295 |
|
@@ -302,11 +253,10 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
302 |
*
|
303 |
* @return void
|
304 |
*/
|
305 |
-
public function themes_content( $args = '' ){
|
306 |
echo '<h3>' . __( 'Coming Soon !!', 'rtmedia' ) . '</h3>';
|
307 |
}
|
308 |
|
309 |
-
|
310 |
/**
|
311 |
* Define addon.
|
312 |
*
|
@@ -316,7 +266,7 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
316 |
*
|
317 |
* @return void
|
318 |
*/
|
319 |
-
public function addon( $args ){
|
320 |
global $rtmedia;
|
321 |
|
322 |
$defaults = array(
|
@@ -331,35 +281,51 @@ if ( ! class_exists( 'RTMediaAddon' ) ){
|
|
331 |
'category' => 'photo',
|
332 |
'purchased' => false,
|
333 |
);
|
334 |
-
$args
|
335 |
extract( $args );
|
336 |
|
337 |
$coming_soon ? ' coming-soon' : '';
|
338 |
|
339 |
-
if( $purchased ){
|
340 |
-
$purchase_link = '<span class="rtm-addon-purchased alignright product_type_simple">' . __( 'Purchased', 'rtmedia' ) . '</span>';
|
341 |
} else {
|
342 |
-
$purchase_link = '<a class="
|
343 |
}
|
344 |
|
345 |
$coming_soon_div = ( $coming_soon ) ? $this->coming_soon_div() : '';
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
}
|
362 |
|
363 |
}
|
364 |
|
365 |
-
}
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Description of RTMediaAddon
|
4 |
*
|
8 |
* @author Gagandeep Singh <gagandeep.singh@rtcamp.com>
|
9 |
* @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
|
10 |
*/
|
11 |
+
if ( ! class_exists( 'RTMediaAddon' ) ) {
|
12 |
|
13 |
class RTMediaAddon {
|
14 |
|
15 |
public $enquiry_link = 'http://rtcamp.com/contact/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media';
|
16 |
+
// current page
|
17 |
+
public static $page;
|
18 |
|
19 |
/**
|
20 |
* Show coming_soon_div.
|
25 |
*
|
26 |
* @return void
|
27 |
*/
|
28 |
+
public function coming_soon_div() {
|
29 |
return '<div class="coming-soon coming-soon-l"></div> <a class="coming-soon coming-soon-r" href="' . $this->enquiry_link . '" target="_blank"></a>';
|
30 |
}
|
31 |
|
38 |
*
|
39 |
* @return void
|
40 |
*/
|
41 |
+
public static function render_addons( $page = '' ) {
|
42 |
global $wp_settings_sections, $wp_settings_fields;
|
43 |
|
44 |
+
self::$page = $page;
|
45 |
+
|
46 |
+
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ) {
|
47 |
return;
|
48 |
}
|
49 |
|
50 |
+
foreach ( ( array ) $wp_settings_sections[ $page ] as $section ) {
|
51 |
|
52 |
+
if ( $section[ 'callback' ] ) {
|
53 |
+
call_user_func( $section[ 'callback' ], $section );
|
54 |
}
|
55 |
|
56 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section[ 'id' ] ] ) ) {
|
57 |
continue;
|
58 |
}
|
59 |
|
60 |
echo '<table class="form-table">';
|
61 |
+
do_settings_fields( $page, $section[ 'id' ] );
|
62 |
echo '</table>';
|
63 |
}
|
64 |
}
|
72 |
*
|
73 |
* @return void
|
74 |
*/
|
75 |
+
public function get_addons() {
|
76 |
$tabs = array();
|
77 |
global $rtmedia_admin;
|
78 |
$tabs[] = array(
|
79 |
'title' => __( 'Plugins', 'rtmedia' ),
|
80 |
'name' => __( 'Plugins', 'rtmedia' ),
|
81 |
'href' => '#rtm-plugins',
|
82 |
+
'icon' => 'dashicons-admin-plugins',
|
83 |
'callback' => array( $this, 'plugins_content' )
|
84 |
);
|
85 |
|
87 |
'title' => __( 'Audio/Video Encoding', 'rtmedia' ),
|
88 |
'name' => __( 'Audio/Video Encoding', 'rtmedia' ),
|
89 |
'href' => '#rtm-services',
|
90 |
+
'icon' => 'dashicons-playlist-video',
|
91 |
'callback' => array( $rtmedia_admin->rtmedia_encoding, 'encoding_service_intro' )
|
92 |
);
|
93 |
|
94 |
+
RTMediaAdmin::render_admin_ui( self::$page, $tabs );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
|
|
|
97 |
/**
|
98 |
* Display plugins in Addons Section.
|
99 |
*
|
103 |
*
|
104 |
* @return void
|
105 |
*/
|
106 |
+
public function plugins_content( $args = '' ) {
|
107 |
+
$img_src = RTMEDIA_URL . 'app/assets/admin/img/';
|
108 |
+
$addons = array(
|
109 |
'general' => array(
|
110 |
array(
|
111 |
'title' => __( 'rtMedia Social Sync', 'rtmedia' ),
|
123 |
array(
|
124 |
'title' => __( 'rtMedia Photo Watermark', 'rtmedia' ),
|
125 |
'img_src' => $img_src . 'rtmedia-watermark-240x184.png',
|
126 |
+
'product_link' => 'http://rtcamp.com/products/rtmedia-photo-watermark/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
127 |
'desc' => '<p>' . __( 'rtMedia Photo Watermark add-on let you add text or copyright on your images uploaded using rtMedia.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have either ImageMagick or GD library installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
128 |
'price' => '$49',
|
129 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
130 |
+
'buy_now' => 'https://rtcamp.com/products/rtmedia-photo-watermark/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
131 |
'category' => 'photo',
|
132 |
'purchased' => ( defined( 'RTMEDIA_WATERMARK_URL' ) || file_exists( WP_PLUGIN_DIR . '/rtmedia-photo-watermak/index.php' ) ) ? true : false,
|
133 |
),
|
134 |
array(
|
135 |
'title' => __( 'rtMedia Photo Tagging', 'rtmedia' ),
|
136 |
'img_src' => $img_src . 'rtmedia-phototagging-240x184.png',
|
137 |
+
'product_link' => 'http://rtcamp.com/products/rtmedia-photo-tagging/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
138 |
'desc' => '<p>' . __( 'rtMedia Photo Tagging add-on enables tagging on photos uploaded using BuddyPress Media.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
139 |
'price' => '$49',
|
140 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
141 |
+
'buy_now' => 'https://rtcamp.com/products/rtmedia-photo-tagging/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
142 |
'category' => 'photo',
|
143 |
'purchased' => ( defined( 'RTMEDIA_PHOTO_TAGGING_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-photo-tag/index.php' ) ) ? true : false,
|
144 |
),
|
145 |
array(
|
146 |
'title' => __( 'rtMedia Instagram', 'rtmedia' ),
|
147 |
'img_src' => $img_src . 'rtmedia-instagram-240x184.png',
|
148 |
+
'product_link' => 'http://rtcamp.com/products/rtmedia-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
149 |
'desc' => '<p>' . __( 'rtMedia Instagram adds Instagram like filters to images uploaded with rtMedia.', 'rtmedia' ) . '</p> <p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>',
|
150 |
'price' => '$49',
|
151 |
'demo_link' => 'http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
152 |
+
'buy_now' => 'https://rtcamp.com/products/rtmedia-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
153 |
'category' => 'photo',
|
154 |
'purchased' => ( defined( 'RTMEDIA_INSTAGRAM_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-instagram/index.php' ) ) ? true : false,
|
155 |
),
|
156 |
),
|
157 |
+
'video' => array(
|
158 |
array(
|
159 |
'title' => __( 'rtMedia Kaltura Add-on', 'rtmedia' ),
|
160 |
'img_src' => $img_src . 'rtmedia-kaltura-240x184.png',
|
161 |
+
'product_link' => 'http://rtcamp.com/products/rtmedia-kaltura-add-on/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
162 |
'desc' => '<p>' . __( 'Add support for more video formats using Kaltura video solution.', 'rtmedia' ) . '</p> <p>' . __( 'Works with Kaltura.com, self-hosted Kaltura-CE and Kaltura-on-premise.', 'rtmedia' ) . '</p>',
|
163 |
'price' => '$199',
|
164 |
'demo_link' => 'http://demo.rtcamp.com/bpm-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
165 |
+
'buy_now' => 'https://rtcamp.com/products/rtmedia-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
166 |
'category' => 'video',
|
167 |
'purchased' => ( defined( 'RTMEDIA_KALTURA_PATH' ) || file_exists( WP_PLUGIN_DIR . '/bpm-kaltura/index.php' ) ) ? true : false,
|
168 |
),
|
169 |
array(
|
170 |
'title' => __( 'rtMedia FFMPEG Add-on', 'rtmedia' ),
|
171 |
'img_src' => $img_src . 'rtmedia-ffmpeg-240x184.png',
|
172 |
+
'product_link' => 'http://rtcamp.com/products/buddypress-media-ffmpeg-converter/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
173 |
'desc' => '<p>' . __( 'Add supports for more audio & video formats using open-source media-node.', 'rtmedia' ) . '</p> <p>' . __( 'Media node comes with automated setup script for Ubuntu/Debian.', 'rtmedia' ) . '</p>',
|
174 |
'price' => '$199',
|
175 |
'demo_link' => 'http://demo.rtcamp.com/bpm-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
176 |
+
'buy_now' => 'https://rtcamp.com/products/rtmedia-ffmpeg/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
|
177 |
'category' => 'video',
|
178 |
'purchased' => ( defined( 'RTMEDIA_FFMPEG_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-ffmpeg/index.php' ) ) ? true : false,
|
179 |
),
|
180 |
),
|
181 |
+
'membership' => array(
|
182 |
array(
|
183 |
'title' => __( 'rtMedia Membership Add-on', 'rtmedia' ),
|
184 |
'img_src' => $img_src . 'rtmedia-membership-240x184.png',
|
191 |
),
|
192 |
),
|
193 |
);
|
194 |
+
$addons = apply_filters( 'rtmedia_addons', $addons );
|
195 |
|
196 |
+
$general_addons = $addons[ 'general' ];
|
197 |
+
$photo_addons = $addons[ 'photo' ];
|
198 |
+
$video_addons = $addons[ 'video' ];
|
199 |
+
$membership_addons = $addons[ 'membership' ];
|
200 |
|
201 |
+
echo '<h3 class="rtm-option-title">';
|
202 |
+
_e( 'rtMedia Addons', 'rtmedia' );
|
203 |
echo '</h3>';
|
204 |
|
205 |
foreach ( $general_addons as $key => $value ) {
|
206 |
$this->addon( $value );
|
207 |
}
|
208 |
|
209 |
+
echo '<h3 class="rtm-option-title">';
|
210 |
_e( 'rtMedia Addons for Photos', 'rtmedia' );
|
211 |
echo '</h3>';
|
212 |
|
214 |
$this->addon( $value );
|
215 |
}
|
216 |
|
217 |
+
echo '<h3 class="rtm-option-title">';
|
218 |
_e( 'rtMedia Addons for Audio/Video', 'rtmedia' );
|
219 |
echo '</h3>';
|
220 |
|
222 |
$this->addon( $value );
|
223 |
}
|
224 |
|
225 |
+
echo '<h3 class="rtm-option-title">';
|
226 |
_e( 'rtMedia Addon for Membership', 'rtmedia' );
|
227 |
echo '</h3>';
|
228 |
|
240 |
*
|
241 |
* @return void
|
242 |
*/
|
243 |
+
public function services_content( $args = '' ) {
|
244 |
$objEncoding->encoding_service_intro();
|
245 |
}
|
246 |
|
253 |
*
|
254 |
* @return void
|
255 |
*/
|
256 |
+
public function themes_content( $args = '' ) {
|
257 |
echo '<h3>' . __( 'Coming Soon !!', 'rtmedia' ) . '</h3>';
|
258 |
}
|
259 |
|
|
|
260 |
/**
|
261 |
* Define addon.
|
262 |
*
|
266 |
*
|
267 |
* @return void
|
268 |
*/
|
269 |
+
public function addon( $args ) {
|
270 |
global $rtmedia;
|
271 |
|
272 |
$defaults = array(
|
281 |
'category' => 'photo',
|
282 |
'purchased' => false,
|
283 |
);
|
284 |
+
$args = wp_parse_args( $args, $defaults );
|
285 |
extract( $args );
|
286 |
|
287 |
$coming_soon ? ' coming-soon' : '';
|
288 |
|
289 |
+
if ( $purchased ) {
|
290 |
+
$purchase_link = '<span class="rtm-addon-purchased button-primary disabled alignright product_type_simple">' . __( 'Purchased', 'rtmedia' ) . '</span>';
|
291 |
} else {
|
292 |
+
$purchase_link = '<a class="button-primary alignright product_type_simple" href="' . $buy_now . '" target="_blank">' . __( 'Buy Now', 'rtmedia' ) . '</a>';
|
293 |
}
|
294 |
|
295 |
$coming_soon_div = ( $coming_soon ) ? $this->coming_soon_div() : '';
|
296 |
+
?>
|
297 |
+
<div class="plugin-card clearfix rtm-plugin-card">
|
298 |
+
|
299 |
+
<div class="plugin-card-top">
|
300 |
+
<a class="rtm-logo" href="<?php echo $product_link; ?>" title="<?php echo $title; ?>" target="_blank">
|
301 |
+
<img width="240" height="184" title="<?php echo $title; ?>" alt="<?php echo $title; ?>" src="<?php echo $img_src; ?>" />
|
302 |
+
</a>
|
303 |
+
|
304 |
+
<div class="name column-name">
|
305 |
+
<h4><a href="<?php echo $product_link; ?>" title="<?php echo $title; ?>" target="_blank"><?php echo $title; ?></a></h4>
|
306 |
+
</div>
|
307 |
+
|
308 |
+
<div class="desc column-description">
|
309 |
+
<?php echo $desc; ?>
|
310 |
+
</div>
|
311 |
+
</div>
|
312 |
+
|
313 |
+
<div class="plugin-card-bottom">
|
314 |
+
<span class="price alignleft">
|
315 |
+
<span class="amount"><?php echo $price; ?></span>
|
316 |
+
</span>
|
317 |
+
<?php
|
318 |
+
echo $purchase_link;
|
319 |
+
|
320 |
+
if ( $demo_link != '' ) {
|
321 |
+
echo '<a class="alignright rtm-live-demo button" href="' . $demo_link . '" title="' . $title . '" target="_blank">' . __( 'Live Demo', 'rtmedia' ) . '</a>';
|
322 |
+
}
|
323 |
+
?>
|
324 |
+
</div>
|
325 |
+
</div>
|
326 |
+
<?php
|
327 |
}
|
328 |
|
329 |
}
|
330 |
|
331 |
+
}
|
app/helper/RTMediaLicense.php
CHANGED
@@ -8,26 +8,108 @@
|
|
8 |
*/
|
9 |
class RTMediaLicense {
|
10 |
|
11 |
-
static
|
|
|
|
|
|
|
|
|
|
|
12 |
global $wp_actions;
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
?>
|
16 |
<div id="rtm-licenses">
|
17 |
-
|
|
|
|
|
18 |
}
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
?>
|
|
|
|
|
24 |
</div>
|
25 |
-
|
26 |
-
}
|
|
|
27 |
?>
|
28 |
-
<div>You may be interested in <a href="<?php echo admin_url( 'admin.php?page=rtmedia-addons' ) ?>">rtMedia Addons</a>.</div>
|
29 |
-
|
30 |
}
|
31 |
}
|
32 |
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
*/
|
9 |
class RTMediaLicense {
|
10 |
|
11 |
+
static $page;
|
12 |
+
|
13 |
+
static function render_license( $page = '' ) {
|
14 |
+
|
15 |
+
self::$page = $page;
|
16 |
+
|
17 |
global $wp_actions;
|
18 |
|
19 |
+
$tabs = apply_filters( 'rtmedia_license_tabs', array() );
|
20 |
+
$addon_installed = false;
|
21 |
+
if ( ! empty( $tabs ) && is_array( $tabs ) ) {
|
22 |
+
$addon_installed = true;
|
23 |
+
foreach ( $tabs as $key => $tab ) {
|
24 |
+
$tabs[ $key ][ 'callback' ] = array( 'RTMediaLicense', 'render_license_section' );
|
25 |
+
}
|
26 |
?>
|
27 |
<div id="rtm-licenses">
|
28 |
+
<?php RTMediaAdmin::render_admin_ui( self::$page, $tabs ); ?>
|
29 |
+
</div>
|
30 |
+
<?php
|
31 |
}
|
32 |
|
33 |
+
// For add-on which aren't updated with the latest code
|
34 |
+
if ( did_action( 'rtmedia_addon_license_details' ) ) {
|
35 |
+
$addon_installed = true;
|
36 |
?>
|
37 |
+
<div id="rtm-licenses">
|
38 |
+
<?php do_action( 'rtmedia_addon_license_details' ); ?>
|
39 |
</div>
|
40 |
+
<?php
|
41 |
+
}
|
42 |
+
if ( ! $addon_installed ) {
|
43 |
?>
|
44 |
+
<div class="rtm-license-404">You may be interested in <a href="<?php echo admin_url( 'admin.php?page=rtmedia-addons' ); ?>">rtMedia Addons</a>.</div>
|
45 |
+
<?php
|
46 |
}
|
47 |
}
|
48 |
|
49 |
+
static function render_license_section( $page = '', $args = '' ) {
|
50 |
+
|
51 |
+
$license = ( isset( $args[ 'license_key' ] ) ) ? $args[ 'license_key' ] : false;
|
52 |
+
$status = ( isset( $args[ 'status' ] ) ) ? $args[ 'status' ] : false;
|
53 |
+
|
54 |
+
if ( $status !== false && $status == 'valid' ) {
|
55 |
+
$status_class = 'activated rtm-success';
|
56 |
+
$status_value = __( 'Activated', 'rtmedia' );
|
57 |
+
} else {
|
58 |
+
$status_class = 'deactivated rtm-warning';
|
59 |
+
$status_value = __( 'Deactivated', 'rtmedia' );
|
60 |
+
}
|
61 |
+
|
62 |
+
$el_id = $args[ 'addon_id' ];
|
63 |
+
$license_key_id = $args[ 'key_id' ];
|
64 |
+
$license_status_id = $args[ 'status_id' ];
|
65 |
+
?>
|
66 |
+
<div class="rtm-addon-license">
|
67 |
+
<div class="rtm-license-status-wrap <?php echo $status_class ?>">
|
68 |
+
<span class="rtm-addon-license-status-label"><?php _e( 'Status: ', 'rtmedia' ); ?></span>
|
69 |
+
<span class="rtm-addon-license-status"><?php echo $status_value; ?></span>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<form method="post">
|
73 |
+
<table class="form-table">
|
74 |
+
<tbody>
|
75 |
+
<tr>
|
76 |
+
<th scope="row">
|
77 |
+
<?php _e( 'License Key', 'rtmedia' ); ?>
|
78 |
+
</th>
|
79 |
+
<td>
|
80 |
+
<input id="<?php echo $license_key_id ?>" name="<?php echo $license_key_id ?>" type="text"
|
81 |
+
class="regular-text" value="<?php esc_attr_e( $license ); ?>"/>
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
|
85 |
+
<?php if ( false !== $license ) { ?>
|
86 |
+
<tr>
|
87 |
+
<th scope="row">
|
88 |
+
<?php _e( 'Activate / Deactivate License', 'rtmedia' ); ?>
|
89 |
+
</th>
|
90 |
+
<td>
|
91 |
+
<?php
|
92 |
+
$nonce_action = 'edd_' . $el_id . '_nonce';
|
93 |
+
$nonce_name = 'edd_' . $el_id . '_nonce';
|
94 |
+
if ( $status !== false && $status == 'valid' ) {
|
95 |
+
$btn_name = 'edd_' . $el_id . '_license_deactivate';
|
96 |
+
$btn_val = __( 'Deactivate License', 'rtmedia' );
|
97 |
+
} else {
|
98 |
+
$btn_name = 'edd_' . $el_id . '_license_activate';
|
99 |
+
$btn_val = __( 'Activate License', 'rtmedia' );
|
100 |
+
}
|
101 |
+
?>
|
102 |
+
<?php wp_nonce_field( $nonce_action, $nonce_name ); ?>
|
103 |
+
<input type="submit" class="button-secondary" name="<?php echo $btn_name; ?>" value="<?php echo $btn_val; ?>"/>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
<?php } ?>
|
107 |
+
</tbody>
|
108 |
+
</table>
|
109 |
+
<?php submit_button( 'Save Key' ); ?>
|
110 |
+
</form>
|
111 |
+
</div>
|
112 |
+
<?php
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
app/helper/RTMediaModel.php
CHANGED
@@ -241,9 +241,9 @@ class RTMediaModel extends RTDBModel {
|
|
241 |
|
242 |
$sql .= ' LIMIT ' . $offset . ',' . $per_page;
|
243 |
}
|
244 |
-
|
245 |
$results = $wpdb->get_results( $sql );
|
246 |
-
|
247 |
return $results;
|
248 |
}
|
249 |
|
241 |
|
242 |
$sql .= ' LIMIT ' . $offset . ',' . $per_page;
|
243 |
}
|
244 |
+
|
245 |
$results = $wpdb->get_results( $sql );
|
246 |
+
|
247 |
return $results;
|
248 |
}
|
249 |
|
app/helper/RTMediaSettings.php
CHANGED
@@ -57,6 +57,7 @@ if ( ! class_exists( 'RTMediaSettings' ) ){
|
|
57 |
'rtmedia_affiliate_id' => '',
|
58 |
'rtmedia_enable_api' => 0,
|
59 |
'general_masonry_layout' => 0,
|
|
|
60 |
);
|
61 |
|
62 |
$defaults = apply_filters( 'rtmedia_general_content_default_values', $defaults );
|
@@ -143,6 +144,11 @@ if ( ! class_exists( 'RTMediaSettings' ) ){
|
|
143 |
if ( isset( $options['general_videothumbs'] ) && intval( $options['general_videothumbs'] ) > 10 ){
|
144 |
$options['general_videothumbs'] = 10;
|
145 |
}
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
// Checking if number of media perpage is integer or not
|
148 |
if( isset( $options[ 'general_perPageMedia' ] ) ) {
|
@@ -152,7 +158,7 @@ if ( ! class_exists( 'RTMediaSettings' ) ){
|
|
152 |
$options[ 'general_perPageMedia' ] = round( $options[ 'general_perPageMedia' ] );
|
153 |
}
|
154 |
}
|
155 |
-
|
156 |
return $options;
|
157 |
}
|
158 |
|
@@ -182,8 +188,12 @@ if ( ! class_exists( 'RTMediaSettings' ) ){
|
|
182 |
if ( $is_rewrite_rule_flush ){
|
183 |
flush_rewrite_rules( false );
|
184 |
}
|
|
|
|
|
|
|
|
|
185 |
if( isset( $_SERVER['HTTP_REFERER'] ) ){
|
186 |
-
wp_redirect( $_SERVER['HTTP_REFERER'] );
|
187 |
}
|
188 |
global $rtmedia;
|
189 |
$rtmedia->options = $options;
|
57 |
'rtmedia_affiliate_id' => '',
|
58 |
'rtmedia_enable_api' => 0,
|
59 |
'general_masonry_layout' => 0,
|
60 |
+
'general_direct_upload' => 0,
|
61 |
);
|
62 |
|
63 |
$defaults = apply_filters( 'rtmedia_general_content_default_values', $defaults );
|
144 |
if ( isset( $options['general_videothumbs'] ) && intval( $options['general_videothumbs'] ) > 10 ){
|
145 |
$options['general_videothumbs'] = 10;
|
146 |
}
|
147 |
+
|
148 |
+
// Checking if video_thumbnails value is less then 0
|
149 |
+
if ( isset( $options['general_videothumbs'] ) && intval( $options['general_videothumbs'] ) <= 0 ){
|
150 |
+
$options['general_videothumbs'] = 2;
|
151 |
+
}
|
152 |
|
153 |
// Checking if number of media perpage is integer or not
|
154 |
if( isset( $options[ 'general_perPageMedia' ] ) ) {
|
158 |
$options[ 'general_perPageMedia' ] = round( $options[ 'general_perPageMedia' ] );
|
159 |
}
|
160 |
}
|
161 |
+
|
162 |
return $options;
|
163 |
}
|
164 |
|
188 |
if ( $is_rewrite_rule_flush ){
|
189 |
flush_rewrite_rules( false );
|
190 |
}
|
191 |
+
$settings_saved = '';
|
192 |
+
if( !isset( $_GET[ 'settings-saved' ] ) ) {
|
193 |
+
$settings_saved = '&settings-saved=true';
|
194 |
+
}
|
195 |
if( isset( $_SERVER['HTTP_REFERER'] ) ){
|
196 |
+
wp_redirect( $_SERVER['HTTP_REFERER'] . $settings_saved );
|
197 |
}
|
198 |
global $rtmedia;
|
199 |
$rtmedia->options = $options;
|
app/helper/RTMediaSupport.php
CHANGED
@@ -5,12 +5,14 @@
|
|
5 |
* @author Gagandeep Singh <gagandeep.singh@rtcamp.com>
|
6 |
* @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
|
7 |
*/
|
8 |
-
if ( ! class_exists( 'RTMediaSupport' ) ){
|
9 |
|
10 |
class RTMediaSupport {
|
11 |
|
12 |
var $debug_info;
|
13 |
var $curr_sub_tab;
|
|
|
|
|
14 |
|
15 |
/**
|
16 |
* Constructor
|
@@ -21,15 +23,15 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
21 |
*
|
22 |
* @return void
|
23 |
*/
|
24 |
-
public function __construct( $init = true ){
|
25 |
|
26 |
-
if ( ! is_admin() ){
|
27 |
return;
|
28 |
}
|
29 |
|
30 |
$this->curr_sub_tab = 'support';
|
31 |
-
if ( isset( $_REQUEST['tab'] ) ){
|
32 |
-
$this->curr_sub_tab = $_REQUEST['tab'];
|
33 |
}
|
34 |
}
|
35 |
|
@@ -42,22 +44,24 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
42 |
*
|
43 |
* @return void
|
44 |
*/
|
45 |
-
public function get_support_content(){
|
46 |
$tabs = array();
|
47 |
global $rtmedia_admin;
|
48 |
$tabs[] = array(
|
49 |
-
'title' => __( '
|
50 |
-
'name' => __( '
|
51 |
'href' => '#support',
|
|
|
52 |
'callback' => array( $this, 'call_get_form' ),
|
53 |
);
|
54 |
$tabs[] = array(
|
55 |
'title' => __( 'Debug Info', 'rtmedia' ),
|
56 |
'name' => __( 'Debug Info', 'rtmedia' ),
|
57 |
'href' => '#debug',
|
|
|
58 |
'callback' => array( $this, 'debug_info_html' ),
|
59 |
);
|
60 |
-
if ( $this->is_migration_required() ){ //if any un-migrated media is there
|
61 |
$tabs[] = array(
|
62 |
'title' => __( 'Migration', 'rtmedia' ),
|
63 |
'name' => __( 'Migration', 'rtmedia' ),
|
@@ -67,53 +71,9 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
67 |
}
|
68 |
?>
|
69 |
<div id="rtm-support">
|
70 |
-
|
71 |
-
<dl class='tabs' data-tab>
|
72 |
-
<?php
|
73 |
-
$i = 1;
|
74 |
-
foreach ( $tabs as $tab ) {
|
75 |
-
$active_class = '';
|
76 |
-
if ( 1 == $i ){
|
77 |
-
$active_class = 'active';
|
78 |
-
}
|
79 |
-
$i ++;
|
80 |
-
?>
|
81 |
-
<dd class="<?php echo $active_class ?>">
|
82 |
-
<a id="tab-<?php echo substr( $tab['href'], 1 ) ?>"
|
83 |
-
title="<?php echo $tab['title'] ?>" href="<?php echo $tab['href'] ?>"
|
84 |
-
class="rtmedia-tab-title <?php echo sanitize_title( $tab['name'] ) ?>"><?php echo $tab['name'] ?></a>
|
85 |
-
</dd>
|
86 |
-
<?php
|
87 |
-
}
|
88 |
-
?>
|
89 |
-
</dl>
|
90 |
-
<?php
|
91 |
-
$k = 1;
|
92 |
-
$active_class = '';
|
93 |
-
echo "<div class='tabs-content'>";
|
94 |
-
foreach ( $tabs as $tab ) {
|
95 |
-
$active_class = '';
|
96 |
-
if ( 1 == $k ){
|
97 |
-
$active_class = ' active';
|
98 |
-
}
|
99 |
-
$k ++;
|
100 |
-
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
101 |
-
$icon = '<i class="' . $tab['icon'] . '"></i>';
|
102 |
-
}
|
103 |
-
$tab_without_hash = explode( '#', $tab['href'] );
|
104 |
-
$tab_without_hash = $tab_without_hash[1];
|
105 |
-
echo '<div class="row content' . $active_class . '" id="' . $tab_without_hash . '">';
|
106 |
-
echo '<div class="large-12 columns">';
|
107 |
-
call_user_func( $tab['callback'] );
|
108 |
-
echo '</div>';
|
109 |
-
echo '</div>';
|
110 |
-
}
|
111 |
-
echo '</div>';
|
112 |
-
?>
|
113 |
-
</div>
|
114 |
</div>
|
115 |
-
|
116 |
-
|
117 |
}
|
118 |
|
119 |
/**
|
@@ -125,25 +85,28 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
125 |
*
|
126 |
* @return void
|
127 |
*/
|
128 |
-
public function render_support( $page = '' ){
|
|
|
|
|
|
|
129 |
global $wp_settings_sections, $wp_settings_fields;
|
130 |
|
131 |
-
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ){
|
132 |
return;
|
133 |
}
|
134 |
|
135 |
-
foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
|
136 |
|
137 |
-
if ( $section['callback'] ){
|
138 |
-
call_user_func( $section['callback'], $section );
|
139 |
}
|
140 |
|
141 |
-
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ){
|
142 |
continue;
|
143 |
}
|
144 |
|
145 |
echo '<table class="form-table">';
|
146 |
-
do_settings_fields( $page, $section['id'] );
|
147 |
echo '</table>';
|
148 |
}
|
149 |
}
|
@@ -157,7 +120,7 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
157 |
*
|
158 |
* @return void
|
159 |
*/
|
160 |
-
public function service_selector(){
|
161 |
?>
|
162 |
<div>
|
163 |
<form name="rtmedia_service_select_form" method="post">
|
@@ -165,17 +128,23 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
165 |
<label class="bp-media-label" for="select_support"><?php _e( 'Service', 'rtmedia' ); ?>:</label>
|
166 |
<select name="rtmedia_service_select">
|
167 |
<option
|
168 |
-
value="premium_support" <?php
|
169 |
-
|
170 |
-
|
|
|
|
|
171 |
<option
|
172 |
-
value="bug_report" <?php
|
173 |
-
|
174 |
-
|
|
|
|
|
175 |
<option
|
176 |
-
value="new_feature" <?php
|
177 |
-
|
178 |
-
|
|
|
|
|
179 |
</select>
|
180 |
<input name="support_submit" value="<?php esc_attr_e( 'Submit', 'rtmedia' ); ?>" type="submit" class="button"/>
|
181 |
</p>
|
@@ -184,7 +153,6 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
184 |
<?php
|
185 |
}
|
186 |
|
187 |
-
|
188 |
/**
|
189 |
* Call rtmedia admin support form.
|
190 |
*
|
@@ -194,11 +162,11 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
194 |
*
|
195 |
* @return void
|
196 |
*/
|
197 |
-
public function call_get_form(){
|
198 |
-
if ( isset( $_REQUEST['page'] ) && 'rtmedia-support' == $_REQUEST['page'] ){
|
199 |
//echo "<h2 class='nav-tab-wrapper'>".$this->rtmedia_support_sub_tabs()."</h2>";
|
200 |
-
if ( 'support' == $this->curr_sub_tab ){
|
201 |
-
echo "<div id='rtmedia_service_contact_container'><form name='rtmedia_service_contact_detail' method='post'>";
|
202 |
$this->get_form( 'premium_support' );
|
203 |
echo '</form></div>';
|
204 |
}
|
@@ -214,20 +182,20 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
214 |
*
|
215 |
* @return array $rtmedia_plugins
|
216 |
*/
|
217 |
-
public function get_plugin_info(){
|
218 |
-
$active_plugins = (array) get_option( 'active_plugins', array() );
|
219 |
-
if ( is_multisite() ){
|
220 |
$active_plugins = array_merge( $active_plugins, rtmedia_get_site_option( 'active_sitewide_plugins', array() ) );
|
221 |
}
|
222 |
$rtmedia_plugins = array();
|
223 |
foreach ( $active_plugins as $plugin ) {
|
224 |
-
$plugin_data
|
225 |
$version_string = '';
|
226 |
-
if ( ! empty( $plugin_data['Name'] ) ){
|
227 |
-
$rtmedia_plugins[] = $plugin_data['Name'] . ' ' . __( 'by', 'rtmedia' ) . ' ' . $plugin_data['Author'] . ' ' . __( 'version', 'rtmedia' ) . ' ' . $plugin_data['Version'] . $version_string;
|
228 |
}
|
229 |
}
|
230 |
-
if ( 0 == sizeof( $rtmedia_plugins ) ){
|
231 |
return false;
|
232 |
} else {
|
233 |
return implode( ', <br/>', $rtmedia_plugins );
|
@@ -243,19 +211,19 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
243 |
*
|
244 |
* @return array $result
|
245 |
*/
|
246 |
-
public function rtmedia_scan_template_files( $template_path ){
|
247 |
-
$files
|
248 |
$result = array();
|
249 |
-
if ( $files ){
|
250 |
foreach ( $files as $key => $value ) {
|
251 |
-
if ( ! in_array( $value, array( '.', '..' ) ) ){
|
252 |
-
if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ){
|
253 |
$sub_files = $this->rtmedia_scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value );
|
254 |
foreach ( $sub_files as $sub_file ) {
|
255 |
$result[] = str_replace( ABSPATH . 'wp-content/', '', RTMediaTemplate::locate_template( substr( $sub_file, 0, ( sizeof( $sub_file ) - 5 ) ) ) );
|
256 |
}
|
257 |
} else {
|
258 |
-
if ( 'main.php' != $value ){
|
259 |
$result[] = $value;
|
260 |
}
|
261 |
}
|
@@ -275,45 +243,45 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
275 |
*
|
276 |
* @return void
|
277 |
*/
|
278 |
-
public function debug_info(){
|
279 |
global $wpdb, $wp_version, $bp;
|
280 |
-
$debug_info
|
281 |
-
$debug_info['Home URL']
|
282 |
-
$debug_info['Site URL']
|
283 |
-
$debug_info['PHP']
|
284 |
-
$debug_info['MYSQL']
|
285 |
-
$debug_info['WordPress']
|
286 |
-
$debug_info['BuddyPress'] = ( isset( $bp->version ) ) ? $bp->version : '-NA-';
|
287 |
-
$debug_info['rtMedia']
|
288 |
-
$debug_info['OS']
|
289 |
-
if ( extension_loaded( 'imagick' ) ){
|
290 |
$imagickobj = new Imagick();
|
291 |
-
$imagick
|
292 |
} else {
|
293 |
-
$imagick['versionString'] = 'Not Installed';
|
294 |
}
|
295 |
-
$debug_info['Imagick'] = $imagick['versionString'];
|
296 |
-
if ( extension_loaded( 'gd' ) ){
|
297 |
$gd = gd_info();
|
298 |
} else {
|
299 |
-
$gd['GD Version'] = 'Not Installed';
|
300 |
}
|
301 |
-
$debug_info['GD']
|
302 |
-
$debug_info['[php.ini] post_max_size']
|
303 |
-
$debug_info['[php.ini] upload_max_filesize'] = ini_get( 'upload_max_filesize' );
|
304 |
-
$debug_info['[php.ini] memory_limit']
|
305 |
-
$debug_info['Installed Plugins']
|
306 |
-
$active_theme
|
307 |
-
$debug_info['Theme Name']
|
308 |
-
$debug_info['Theme Version']
|
309 |
-
$debug_info['Author URL']
|
310 |
-
$debug_info['Template Overrides']
|
311 |
|
312 |
$rtMedia_model = new RTMediaModel();
|
313 |
-
$sql
|
314 |
global $wpdb;
|
315 |
$results = $wpdb->get_results( $sql );
|
316 |
-
if ( $results ){
|
317 |
foreach ( $results as $media ) {
|
318 |
$debug_info[ 'Total ' . ucfirst( $media->media_type ) . 's' ] = $media->count;
|
319 |
}
|
@@ -330,28 +298,27 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
330 |
*
|
331 |
* @return void
|
332 |
*/
|
333 |
-
public function debug_info_html(){
|
334 |
$this->debug_info();
|
335 |
?>
|
336 |
-
<div id="debug-info">
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
</div><?php
|
354 |
-
|
355 |
}
|
356 |
|
357 |
/**
|
@@ -363,9 +330,9 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
363 |
*
|
364 |
* @return bool
|
365 |
*/
|
366 |
-
public function is_migration_required(){
|
367 |
$pending_rtmedia_migrate = rtmedia_get_site_option( 'rtMigration-pending-count' );
|
368 |
-
if ( ( false === $pending_rtmedia_migrate || 0 == $pending_rtmedia_migrate ) ){
|
369 |
return false;
|
370 |
}
|
371 |
|
@@ -381,17 +348,17 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
381 |
*
|
382 |
* @return bool
|
383 |
*/
|
384 |
-
public function migration_html( $page = '' ){
|
385 |
$pending_rtmedia_migrate = rtmedia_get_site_option( 'rtMigration-pending-count' );
|
386 |
|
387 |
$content = ' ';
|
388 |
-
$flag
|
389 |
-
if ( ( false === $pending_rtmedia_migrate || 0 == $pending_rtmedia_migrate ) ){
|
390 |
$content .= __( 'There is no media found to migrate.', 'rtmedia' );
|
391 |
$flag = false;
|
392 |
}
|
393 |
$content = apply_filters( 'rtmedia_migration_content_filter', $content );
|
394 |
-
if ( $flag ){
|
395 |
$content .= ' <div class="rtmedia-migration-support">';
|
396 |
$content .= ' <p>' . __( 'Click', 'rtmedia' ) . ' <a href="' . get_admin_url() . 'admin.php?page=rtmedia-migration">' . __( 'here', 'rtmedia' ) . '</a>' . __( 'here to migrate media from rtMedia 2.x to rtMedia 3.0+.', 'rtmedia' ) . '</p>';
|
397 |
$content .= '</div>';
|
@@ -400,7 +367,7 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
400 |
<div id="rtmedia-migration-html">
|
401 |
<?php echo $content; ?>
|
402 |
</div>
|
403 |
-
|
404 |
}
|
405 |
|
406 |
/**
|
@@ -412,11 +379,11 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
412 |
*
|
413 |
* @return void
|
414 |
*/
|
415 |
-
public function get_form( $form = '' ){
|
416 |
-
if ( empty( $form ) ){
|
417 |
-
$form = ( isset( $_POST['form'] ) ) ? $_POST['form'] : '';
|
418 |
}
|
419 |
-
if ( $form == '' ){
|
420 |
$form = 'premium_support';
|
421 |
}
|
422 |
global $current_user;
|
@@ -428,91 +395,75 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
428 |
$meta_title = __( 'Submit a New Feature Request', 'rtmedia' );
|
429 |
break;
|
430 |
case 'premium_support':
|
431 |
-
$meta_title = __( 'Submit
|
432 |
break;
|
433 |
}
|
434 |
|
435 |
-
if ( 'premium_support' == $form ){
|
436 |
-
if ( ! defined( 'RTMEDIA_PRO_VERSION' ) ){
|
437 |
-
$content = '<
|
438 |
-
$content .= '<p>' . __( 'If
|
|
|
439 |
|
440 |
echo $content;
|
441 |
-
|
442 |
} else {
|
443 |
?>
|
444 |
-
<h3><?php echo $meta_title; ?></h3>
|
445 |
-
<div id="support-form" class="bp-media-form">
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
<
|
462 |
-
<
|
463 |
-
<
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
<
|
476 |
-
<input type="
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
<
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
<input class="bp-media-input" id="ssh_ftp_username" type="text" name="ssh_ftp_username" value="<?php echo ( isset( $_REQUEST['ssh_ftp_username'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['ssh_ftp_username'] ) ) ) : ''; ?>"/>
|
499 |
-
</li>
|
500 |
-
<li>
|
501 |
-
<label class="bp-media-label" for="ssh_ftp_pwd"><?php _e( 'Your SSH / FTP password:', 'rtmedia' ); ?></label>
|
502 |
-
<input class="bp-media-input" id="ssh_ftp_pwd" type="password" name="ssh_ftp_pwd" value="<?php echo ( isset( $_REQUEST['ssh_ftp_pwd'] ) ) ? esc_attr( stripslashes( trim( $_REQUEST['ssh_ftp_pwd'] ) ) ) : ''; ?>"/>
|
503 |
-
</li>
|
504 |
-
</ul>
|
505 |
-
</div><!-- .submit-bug-box --><?php } ?>
|
506 |
-
|
507 |
-
<?php submit_button( 'Submit', 'primary', 'rtmedia-submit-request', false ); ?>
|
508 |
-
<?php submit_button( 'Cancel', 'secondary', 'cancel-request', false ); ?>
|
509 |
-
<?php
|
510 |
}
|
511 |
}
|
512 |
-
|
513 |
-
// if (DOING_AJAX) {
|
514 |
-
// die();
|
515 |
-
// }
|
516 |
}
|
517 |
|
518 |
/**
|
@@ -524,28 +475,28 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
524 |
*
|
525 |
* @return void
|
526 |
*/
|
527 |
-
public function submit_request(){
|
528 |
$this->debug_info();
|
529 |
global $rtmedia;
|
530 |
-
$form_data = wp_parse_args( $_POST['form_data'] );
|
531 |
foreach ( $form_data as $key => $formdata ) {
|
532 |
-
if ( '' == $formdata && 'phone' != $key ){
|
533 |
echo 'false';
|
534 |
die();
|
535 |
}
|
536 |
}
|
537 |
-
if ( 'premium_support' == $form_data['request_type'] ){
|
538 |
$mail_type = 'Premium Support';
|
539 |
-
$title
|
540 |
-
} elseif ( 'new_feature' == $form_data['request_type'] ) {
|
541 |
$mail_type = 'New Feature Request';
|
542 |
-
$title
|
543 |
-
} elseif ( 'bug_report' == $form_data['request_type'] ) {
|
544 |
$mail_type = 'Bug Report';
|
545 |
-
$title
|
546 |
} else {
|
547 |
$mail_type = 'Bug Report';
|
548 |
-
$title
|
549 |
}
|
550 |
$message = '<html>
|
551 |
<head>
|
@@ -554,58 +505,58 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
554 |
<body>
|
555 |
<table>
|
556 |
<tr>
|
557 |
-
<td>Name</td><td>' . strip_tags( $form_data['name'] ) . '</td>
|
558 |
</tr>
|
559 |
<tr>
|
560 |
-
<td>Email</td><td>' . strip_tags( $form_data['email'] ) . '</td>
|
561 |
</tr>
|
562 |
<tr>
|
563 |
-
<td>Website</td><td>' . strip_tags( $form_data['website'] ) . '</td>
|
564 |
</tr>
|
565 |
<tr>
|
566 |
-
<td>Phone</td><td>' . strip_tags( $form_data['phone'] ) . '</td>
|
567 |
</tr>
|
568 |
<tr>
|
569 |
-
<td>Subject</td><td>' . strip_tags( $form_data['subject'] ) . '</td>
|
570 |
</tr>
|
571 |
<tr>
|
572 |
-
<td>Details</td><td>' . strip_tags( $form_data['details'] ) . '</td>
|
573 |
</tr>
|
574 |
<tr>
|
575 |
-
<td>Request ID</td><td>' . strip_tags( $form_data['request_id'] ) . '</td>
|
576 |
</tr>
|
577 |
<tr>
|
578 |
-
<td>Server Address</td><td>' . strip_tags( $form_data['server_address'] ) . '</td>
|
579 |
</tr>
|
580 |
<tr>
|
581 |
-
<td>IP Address</td><td>' . strip_tags( $form_data['ip_address'] ) . '</td>
|
582 |
</tr>
|
583 |
<tr>
|
584 |
-
<td>Server Type</td><td>' . strip_tags( $form_data['server_type'] ) . '</td>
|
585 |
</tr>
|
586 |
<tr>
|
587 |
-
<td>User Agent</td><td>' . strip_tags( $form_data['user_agent'] ) . '</td>
|
588 |
</tr>';
|
589 |
-
if ( 'bug_report' == $form_data['request_type'] ){
|
590 |
$message .= '<tr>
|
591 |
-
<td>WordPress Admin Username</td><td>' . strip_tags( $form_data['wp_admin_username'] ) . '</td>
|
592 |
</tr>
|
593 |
<tr>
|
594 |
-
<td>WordPress Admin Password</td><td>' . strip_tags( $form_data['wp_admin_pwd'] ) . '</td>
|
595 |
</tr>
|
596 |
<tr>
|
597 |
-
<td>SSH FTP Host</td><td>' . strip_tags( $form_data['ssh_ftp_host'] ) . '</td>
|
598 |
</tr>
|
599 |
<tr>
|
600 |
-
<td>SSH FTP Username</td><td>' . strip_tags( $form_data['ssh_ftp_username'] ) . '</td>
|
601 |
</tr>
|
602 |
<tr>
|
603 |
-
<td>SSH FTP Password</td><td>' . strip_tags( $form_data['ssh_ftp_pwd'] ) . '</td>
|
604 |
</tr>
|
605 |
';
|
606 |
}
|
607 |
$message .= '</table>';
|
608 |
-
if ( $this->debug_info ){
|
609 |
$message .= '<h3>' . __( 'Debug Info', 'rtmedia' ) . '</h3>';
|
610 |
$message .= '<table>';
|
611 |
foreach ( $this->debug_info as $configuration => $value ) {
|
@@ -618,16 +569,16 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
618 |
$message .= '</body>
|
619 |
</html>';
|
620 |
add_filter( 'wp_mail_content_type', create_function( '', 'return "text/html";' ) );
|
621 |
-
$headers = 'From: ' . $form_data['name'] . ' <' . $form_data['email'] . '>' . "\r\n";
|
622 |
-
if ( isset( $rtmedia->support_email ) ){
|
623 |
$support_email = $rtmedia->support_email;
|
624 |
} else {
|
625 |
$support_email = 'support@rtcamp.com';
|
626 |
}
|
627 |
$support_email = 'support@rtcamp.com';
|
628 |
-
if ( wp_mail( $support_email, '[rtmedia] ' . $mail_type . ' from ' . str_replace( array( 'http://', 'https://' ), '', $form_data['website'] ), $message, $headers ) ){
|
629 |
echo '<div class="rtmedia-success" style="margin:10px 0;">';
|
630 |
-
if ( 'new_feature' == $form_data['request_type'] ){
|
631 |
echo '<p>' . __( 'Thank you for your Feedback/Suggestion.', 'rtmedia' ) . '</p>';
|
632 |
} else {
|
633 |
echo '<p>' . __( 'Thank you for posting your support request.', 'rtmedia' ) . '</p>';
|
@@ -646,4 +597,4 @@ if ( ! class_exists( 'RTMediaSupport' ) ){
|
|
646 |
|
647 |
}
|
648 |
|
649 |
-
}
|
5 |
* @author Gagandeep Singh <gagandeep.singh@rtcamp.com>
|
6 |
* @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
|
7 |
*/
|
8 |
+
if ( ! class_exists( 'RTMediaSupport' ) ) {
|
9 |
|
10 |
class RTMediaSupport {
|
11 |
|
12 |
var $debug_info;
|
13 |
var $curr_sub_tab;
|
14 |
+
// current page
|
15 |
+
public static $page;
|
16 |
|
17 |
/**
|
18 |
* Constructor
|
23 |
*
|
24 |
* @return void
|
25 |
*/
|
26 |
+
public function __construct( $init = true ) {
|
27 |
|
28 |
+
if ( ! is_admin() ) {
|
29 |
return;
|
30 |
}
|
31 |
|
32 |
$this->curr_sub_tab = 'support';
|
33 |
+
if ( isset( $_REQUEST[ 'tab' ] ) ) {
|
34 |
+
$this->curr_sub_tab = $_REQUEST[ 'tab' ];
|
35 |
}
|
36 |
}
|
37 |
|
44 |
*
|
45 |
* @return void
|
46 |
*/
|
47 |
+
public function get_support_content() {
|
48 |
$tabs = array();
|
49 |
global $rtmedia_admin;
|
50 |
$tabs[] = array(
|
51 |
+
'title' => __( 'Support', 'rtmedia' ),
|
52 |
+
'name' => __( 'Support', 'rtmedia' ),
|
53 |
'href' => '#support',
|
54 |
+
'icon' => 'dashicons-businessman',
|
55 |
'callback' => array( $this, 'call_get_form' ),
|
56 |
);
|
57 |
$tabs[] = array(
|
58 |
'title' => __( 'Debug Info', 'rtmedia' ),
|
59 |
'name' => __( 'Debug Info', 'rtmedia' ),
|
60 |
'href' => '#debug',
|
61 |
+
'icon' => 'dashicons-admin-tools',
|
62 |
'callback' => array( $this, 'debug_info_html' ),
|
63 |
);
|
64 |
+
if ( $this->is_migration_required() ) { //if any un-migrated media is there
|
65 |
$tabs[] = array(
|
66 |
'title' => __( 'Migration', 'rtmedia' ),
|
67 |
'name' => __( 'Migration', 'rtmedia' ),
|
71 |
}
|
72 |
?>
|
73 |
<div id="rtm-support">
|
74 |
+
<?php RTMediaAdmin::render_admin_ui( self::$page, $tabs ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
</div>
|
76 |
+
<?php
|
|
|
77 |
}
|
78 |
|
79 |
/**
|
85 |
*
|
86 |
* @return void
|
87 |
*/
|
88 |
+
public function render_support( $page = '' ) {
|
89 |
+
|
90 |
+
self::$page = $page;
|
91 |
+
|
92 |
global $wp_settings_sections, $wp_settings_fields;
|
93 |
|
94 |
+
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ) {
|
95 |
return;
|
96 |
}
|
97 |
|
98 |
+
foreach ( ( array ) $wp_settings_sections[ $page ] as $section ) {
|
99 |
|
100 |
+
if ( $section[ 'callback' ] ) {
|
101 |
+
call_user_func( $section[ 'callback' ], $section );
|
102 |
}
|
103 |
|
104 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section[ 'id' ] ] ) ) {
|
105 |
continue;
|
106 |
}
|
107 |
|
108 |
echo '<table class="form-table">';
|
109 |
+
do_settings_fields( $page, $section[ 'id' ] );
|
110 |
echo '</table>';
|
111 |
}
|
112 |
}
|
120 |
*
|
121 |
* @return void
|
122 |
*/
|
123 |
+
public function service_selector() {
|
124 |
?>
|
125 |
<div>
|
126 |
<form name="rtmedia_service_select_form" method="post">
|
128 |
<label class="bp-media-label" for="select_support"><?php _e( 'Service', 'rtmedia' ); ?>:</label>
|
129 |
<select name="rtmedia_service_select">
|
130 |
<option
|
131 |
+
value="premium_support" <?php
|
132 |
+
if ( 'premium_support' == $_POST[ 'form' ] ) {
|
133 |
+
echo 'selected';
|
134 |
+
}
|
135 |
+
?>><?php _e( 'Premium Support', 'rtmedia' ); ?></option>
|
136 |
<option
|
137 |
+
value="bug_report" <?php
|
138 |
+
if ( 'bug_report' == $_POST[ 'form' ] ) {
|
139 |
+
echo 'selected';
|
140 |
+
}
|
141 |
+
?>><?php _e( 'Bug Report', 'rtmedia' ); ?></option>
|
142 |
<option
|
143 |
+
value="new_feature" <?php
|
144 |
+
if ( 'new_feature' == $_POST[ 'form' ] ) {
|
145 |
+
echo 'selected';
|
146 |
+
}
|
147 |
+
?>><?php _e( 'New Feature', 'rtmedia' ); ?></option>
|
148 |
</select>
|
149 |
<input name="support_submit" value="<?php esc_attr_e( 'Submit', 'rtmedia' ); ?>" type="submit" class="button"/>
|
150 |
</p>
|
153 |
<?php
|
154 |
}
|
155 |
|
|
|
156 |
/**
|
157 |
* Call rtmedia admin support form.
|
158 |
*
|
162 |
*
|
163 |
* @return void
|
164 |
*/
|
165 |
+
public function call_get_form( $page = '' ) {
|
166 |
+
if ( isset( $_REQUEST[ 'page' ] ) && 'rtmedia-support' == $_REQUEST[ 'page' ] ) {
|
167 |
//echo "<h2 class='nav-tab-wrapper'>".$this->rtmedia_support_sub_tabs()."</h2>";
|
168 |
+
if ( 'support' == $this->curr_sub_tab ) {
|
169 |
+
echo "<div id='rtmedia_service_contact_container' class='rtm-support-container'><form name='rtmedia_service_contact_detail' method='post'>";
|
170 |
$this->get_form( 'premium_support' );
|
171 |
echo '</form></div>';
|
172 |
}
|
182 |
*
|
183 |
* @return array $rtmedia_plugins
|
184 |
*/
|
185 |
+
public function get_plugin_info() {
|
186 |
+
$active_plugins = ( array ) get_option( 'active_plugins', array() );
|
187 |
+
if ( is_multisite() ) {
|
188 |
$active_plugins = array_merge( $active_plugins, rtmedia_get_site_option( 'active_sitewide_plugins', array() ) );
|
189 |
}
|
190 |
$rtmedia_plugins = array();
|
191 |
foreach ( $active_plugins as $plugin ) {
|
192 |
+
$plugin_data = @get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
|
193 |
$version_string = '';
|
194 |
+
if ( ! empty( $plugin_data[ 'Name' ] ) ) {
|
195 |
+
$rtmedia_plugins[] = $plugin_data[ 'Name' ] . ' ' . __( 'by', 'rtmedia' ) . ' ' . $plugin_data[ 'Author' ] . ' ' . __( 'version', 'rtmedia' ) . ' ' . $plugin_data[ 'Version' ] . $version_string;
|
196 |
}
|
197 |
}
|
198 |
+
if ( 0 == sizeof( $rtmedia_plugins ) ) {
|
199 |
return false;
|
200 |
} else {
|
201 |
return implode( ', <br/>', $rtmedia_plugins );
|
211 |
*
|
212 |
* @return array $result
|
213 |
*/
|
214 |
+
public function rtmedia_scan_template_files( $template_path ) {
|
215 |
+
$files = scandir( $template_path );
|
216 |
$result = array();
|
217 |
+
if ( $files ) {
|
218 |
foreach ( $files as $key => $value ) {
|
219 |
+
if ( ! in_array( $value, array( '.', '..' ) ) ) {
|
220 |
+
if ( is_dir( $template_path . DIRECTORY_SEPARATOR . $value ) ) {
|
221 |
$sub_files = $this->rtmedia_scan_template_files( $template_path . DIRECTORY_SEPARATOR . $value );
|
222 |
foreach ( $sub_files as $sub_file ) {
|
223 |
$result[] = str_replace( ABSPATH . 'wp-content/', '', RTMediaTemplate::locate_template( substr( $sub_file, 0, ( sizeof( $sub_file ) - 5 ) ) ) );
|
224 |
}
|
225 |
} else {
|
226 |
+
if ( 'main.php' != $value ) {
|
227 |
$result[] = $value;
|
228 |
}
|
229 |
}
|
243 |
*
|
244 |
* @return void
|
245 |
*/
|
246 |
+
public function debug_info() {
|
247 |
global $wpdb, $wp_version, $bp;
|
248 |
+
$debug_info = array();
|
249 |
+
$debug_info[ 'Home URL' ] = home_url();
|
250 |
+
$debug_info[ 'Site URL' ] = site_url();
|
251 |
+
$debug_info[ 'PHP' ] = PHP_VERSION;
|
252 |
+
$debug_info[ 'MYSQL' ] = $wpdb->db_version();
|
253 |
+
$debug_info[ 'WordPress' ] = $wp_version;
|
254 |
+
$debug_info[ 'BuddyPress' ] = ( isset( $bp->version ) ) ? $bp->version : '-NA-';
|
255 |
+
$debug_info[ 'rtMedia' ] = RTMEDIA_VERSION;
|
256 |
+
$debug_info[ 'OS' ] = PHP_OS;
|
257 |
+
if ( extension_loaded( 'imagick' ) ) {
|
258 |
$imagickobj = new Imagick();
|
259 |
+
$imagick = $message = preg_replace( " #((http|https|ftp)://(\S*?\.\S*?))(\s|\;|\)|\]|\[|\{|\}|,|\"|'|:|\<|$|\.\s)#ie", "'<a href=\"$1\" target=\"_blank\">$3</a>$4'", $imagickobj->getversion() );
|
260 |
} else {
|
261 |
+
$imagick[ 'versionString' ] = 'Not Installed';
|
262 |
}
|
263 |
+
$debug_info[ 'Imagick' ] = $imagick[ 'versionString' ];
|
264 |
+
if ( extension_loaded( 'gd' ) ) {
|
265 |
$gd = gd_info();
|
266 |
} else {
|
267 |
+
$gd[ 'GD Version' ] = 'Not Installed';
|
268 |
}
|
269 |
+
$debug_info[ 'GD' ] = $gd[ 'GD Version' ];
|
270 |
+
$debug_info[ '[php.ini] post_max_size' ] = ini_get( 'post_max_size' );
|
271 |
+
$debug_info[ '[php.ini] upload_max_filesize' ] = ini_get( 'upload_max_filesize' );
|
272 |
+
$debug_info[ '[php.ini] memory_limit' ] = ini_get( 'memory_limit' );
|
273 |
+
$debug_info[ 'Installed Plugins' ] = $this->get_plugin_info();
|
274 |
+
$active_theme = wp_get_theme();
|
275 |
+
$debug_info[ 'Theme Name' ] = $active_theme->Name;
|
276 |
+
$debug_info[ 'Theme Version' ] = $active_theme->Version;
|
277 |
+
$debug_info[ 'Author URL' ] = $active_theme->{'Author URI'};
|
278 |
+
$debug_info[ 'Template Overrides' ] = implode( ', <br/>', $this->rtmedia_scan_template_files( RTMEDIA_PATH . '/templates/' ) );
|
279 |
|
280 |
$rtMedia_model = new RTMediaModel();
|
281 |
+
$sql = "select media_type, count(id) as count from {$rtMedia_model->table_name} where blog_id = '" . get_current_blog_id() . "' group by media_type";
|
282 |
global $wpdb;
|
283 |
$results = $wpdb->get_results( $sql );
|
284 |
+
if ( $results ) {
|
285 |
foreach ( $results as $media ) {
|
286 |
$debug_info[ 'Total ' . ucfirst( $media->media_type ) . 's' ] = $media->count;
|
287 |
}
|
298 |
*
|
299 |
* @return void
|
300 |
*/
|
301 |
+
public function debug_info_html( $page = '' ) {
|
302 |
$this->debug_info();
|
303 |
?>
|
304 |
+
<div id="debug-info" class="rtm-option-wrapper">
|
305 |
+
<h3 class="rtm-option-title"><?php _e( 'Debug Info', 'rtmedia' ); ?></h3>
|
306 |
+
<table class="form-table rtm-debug-info">
|
307 |
+
<tbody>
|
308 |
+
<?php
|
309 |
+
if ( $this->debug_info ) {
|
310 |
+
foreach ( $this->debug_info as $configuration => $value ) {
|
311 |
+
?>
|
312 |
+
<tr>
|
313 |
+
<th scope="row"><?php echo $configuration; ?></th>
|
314 |
+
<td><?php echo $value; ?></td>
|
315 |
+
</tr><?php
|
316 |
+
}
|
317 |
+
}
|
318 |
+
?>
|
319 |
+
</tbody>
|
320 |
+
</table>
|
321 |
</div><?php
|
|
|
322 |
}
|
323 |
|
324 |
/**
|
330 |
*
|
331 |
* @return bool
|
332 |
*/
|
333 |
+
public function is_migration_required() {
|
334 |
$pending_rtmedia_migrate = rtmedia_get_site_option( 'rtMigration-pending-count' );
|
335 |
+
if ( ( false === $pending_rtmedia_migrate || 0 == $pending_rtmedia_migrate ) ) {
|
336 |
return false;
|
337 |
}
|
338 |
|
348 |
*
|
349 |
* @return bool
|
350 |
*/
|
351 |
+
public function migration_html( $page = '' ) {
|
352 |
$pending_rtmedia_migrate = rtmedia_get_site_option( 'rtMigration-pending-count' );
|
353 |
|
354 |
$content = ' ';
|
355 |
+
$flag = true;
|
356 |
+
if ( ( false === $pending_rtmedia_migrate || 0 == $pending_rtmedia_migrate ) ) {
|
357 |
$content .= __( 'There is no media found to migrate.', 'rtmedia' );
|
358 |
$flag = false;
|
359 |
}
|
360 |
$content = apply_filters( 'rtmedia_migration_content_filter', $content );
|
361 |
+
if ( $flag ) {
|
362 |
$content .= ' <div class="rtmedia-migration-support">';
|
363 |
$content .= ' <p>' . __( 'Click', 'rtmedia' ) . ' <a href="' . get_admin_url() . 'admin.php?page=rtmedia-migration">' . __( 'here', 'rtmedia' ) . '</a>' . __( 'here to migrate media from rtMedia 2.x to rtMedia 3.0+.', 'rtmedia' ) . '</p>';
|
364 |
$content .= '</div>';
|
367 |
<div id="rtmedia-migration-html">
|
368 |
<?php echo $content; ?>
|
369 |
</div>
|
370 |
+
<?php
|
371 |
}
|
372 |
|
373 |
/**
|
379 |
*
|
380 |
* @return void
|
381 |
*/
|
382 |
+
public function get_form( $form = '' ) {
|
383 |
+
if ( empty( $form ) ) {
|
384 |
+
$form = ( isset( $_POST[ 'form' ] ) ) ? $_POST[ 'form' ] : '';
|
385 |
}
|
386 |
+
if ( $form == '' ) {
|
387 |
$form = 'premium_support';
|
388 |
}
|
389 |
global $current_user;
|
395 |
$meta_title = __( 'Submit a New Feature Request', 'rtmedia' );
|
396 |
break;
|
397 |
case 'premium_support':
|
398 |
+
$meta_title = __( 'Submit Support Request', 'rtmedia' );
|
399 |
break;
|
400 |
}
|
401 |
|
402 |
+
if ( 'premium_support' == $form ) {
|
403 |
+
if ( ! defined( 'RTMEDIA_PRO_VERSION' ) ) {
|
404 |
+
$content = '<h3 class="rtm-option-title">' . $meta_title . '</h3>';
|
405 |
+
$content .= '<p>' . __( 'If your site has some issues due to rtMedia and you want support, feel free to create a support topic on <a target="_blank" href="http://community.rtcamp.com/c/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media">Community Forum</a>.', 'rtmedia' ) . '</p>';
|
406 |
+
$content .= '<p>' . __( 'If you have any suggestions, enhancements or bug reports, you can open a new issue on <a target="_blank" href="https://github.com/rtCamp/buddypress-media/issues/new">GitHub</a>.', 'rtmedia' ) . '</p>';
|
407 |
|
408 |
echo $content;
|
|
|
409 |
} else {
|
410 |
?>
|
411 |
+
<h3 class="rtm-option-title"><?php echo $meta_title; ?></h3>
|
412 |
+
<div id="support-form" class="bp-media-form rtm-support-form rtm-option-wrapper">
|
413 |
+
|
414 |
+
<div class="rtm-form-filed clearfix">
|
415 |
+
<label class="bp-media-label" for="name"><?php _e( 'Name', 'rtmedia' ); ?></label>
|
416 |
+
<input class="bp-media-input" id="name" type="text" name="name" value="" required />
|
417 |
+
<span class="rtm-tooltip">
|
418 |
+
<i class="dashicons dashicons-info rtmicon"></i>
|
419 |
+
<span class="rtm-tip">
|
420 |
+
<?php _e( 'Use actual user name which used during purchased.', 'rtmedia' ); ?>
|
421 |
+
</span>
|
422 |
+
</span>
|
423 |
+
</div>
|
424 |
+
|
425 |
+
<div class="rtm-form-filed clearfix">
|
426 |
+
<label class="bp-media-label" for="email"><?php _e( 'Email', 'rtmedia' ); ?></label>
|
427 |
+
<input id="email" class="bp-media-input" type="text" name="email" value="" required />
|
428 |
+
<span class="rtm-tooltip">
|
429 |
+
<i class="dashicons dashicons-info rtmicon"></i>
|
430 |
+
<span class="rtm-tip">
|
431 |
+
<?php _e( 'Use email id which used during purchased', 'rtmedia' ); ?>
|
432 |
+
</span>
|
433 |
+
</span>
|
434 |
+
</div>
|
435 |
+
|
436 |
+
<div class="rtm-form-filed clearfix">
|
437 |
+
<label class="bp-media-label" for="website"><?php _e( 'Website', 'rtmedia' ); ?></label>
|
438 |
+
<input id="website" class="bp-media-input" type="text" name="website" value="<?php echo ( isset( $_REQUEST[ 'website' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'website' ] ) ) ) : get_bloginfo( 'url' ); ?>" required />
|
439 |
+
</div>
|
440 |
+
|
441 |
+
<div class="rtm-form-filed clearfix">
|
442 |
+
<label class="bp-media-label" for="subject"><?php _e( 'Subject', 'rtmedia' ); ?></label>
|
443 |
+
<input id="subject" class="bp-media-input" type="text" name="subject" value="<?php echo ( isset( $_REQUEST[ 'subject' ] ) ) ? esc_attr( stripslashes( trim( $_REQUEST[ 'subject' ] ) ) ) : ''; ?>" required />
|
444 |
+
</div>
|
445 |
+
|
446 |
+
<div class="rtm-form-filed clearfix">
|
447 |
+
<label class="bp-media-label" for="details"><?php _e( 'Details', 'rtmedia' ); ?></label>
|
448 |
+
<textarea id="details" class="bp-media-textarea" name="details" required><?php echo ( isset( $_REQUEST[ 'details' ] ) ) ? esc_textarea( stripslashes( trim( $_REQUEST[ 'details' ] ) ) ) : ''; ?></textarea>
|
449 |
+
|
450 |
+
<input type="hidden" name="request_type" value="<?php echo $form; ?>" />
|
451 |
+
<input type="hidden" name="request_id" value="<?php echo wp_create_nonce( date( 'YmdHis' ) ); ?>" />
|
452 |
+
<input type="hidden" name="server_address" value="<?php echo $_SERVER[ 'SERVER_ADDR' ]; ?>" />
|
453 |
+
<input type="hidden" name="ip_address" value="<?php echo $_SERVER[ 'REMOTE_ADDR' ]; ?>" />
|
454 |
+
<input type="hidden" name="server_type" value="<?php echo $_SERVER[ 'SERVER_SOFTWARE' ]; ?>" />
|
455 |
+
<input type="hidden" name="user_agent" value="<?php echo $_SERVER[ 'HTTP_USER_AGENT' ]; ?>" />
|
456 |
+
</div>
|
457 |
+
</div><!-- .submit-bug-box -->
|
458 |
+
|
459 |
+
<div class="rtm-form-filed rtm-button-wrapper clearfix">
|
460 |
+
<?php submit_button( 'Submit', 'primary', 'rtmedia-submit-request', false ); ?>
|
461 |
+
<?php submit_button( 'Cancel', 'secondary', 'cancel-request', false ); ?>
|
462 |
+
</div>
|
463 |
+
|
464 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
}
|
466 |
}
|
|
|
|
|
|
|
|
|
467 |
}
|
468 |
|
469 |
/**
|
475 |
*
|
476 |
* @return void
|
477 |
*/
|
478 |
+
public function submit_request() {
|
479 |
$this->debug_info();
|
480 |
global $rtmedia;
|
481 |
+
$form_data = wp_parse_args( $_POST[ 'form_data' ] );
|
482 |
foreach ( $form_data as $key => $formdata ) {
|
483 |
+
if ( '' == $formdata && 'phone' != $key ) {
|
484 |
echo 'false';
|
485 |
die();
|
486 |
}
|
487 |
}
|
488 |
+
if ( 'premium_support' == $form_data[ 'request_type' ] ) {
|
489 |
$mail_type = 'Premium Support';
|
490 |
+
$title = __( 'rtMedia Premium Support Request from', 'rtmedia' );
|
491 |
+
} elseif ( 'new_feature' == $form_data[ 'request_type' ] ) {
|
492 |
$mail_type = 'New Feature Request';
|
493 |
+
$title = __( 'rtMedia New Feature Request from', 'rtmedia' );
|
494 |
+
} elseif ( 'bug_report' == $form_data[ 'request_type' ] ) {
|
495 |
$mail_type = 'Bug Report';
|
496 |
+
$title = __( 'rtMedia Bug Report from', 'rtmedia' );
|
497 |
} else {
|
498 |
$mail_type = 'Bug Report';
|
499 |
+
$title = __( 'rtMedia Contact from', 'rtmedia' );
|
500 |
}
|
501 |
$message = '<html>
|
502 |
<head>
|
505 |
<body>
|
506 |
<table>
|
507 |
<tr>
|
508 |
+
<td>Name</td><td>' . strip_tags( $form_data[ 'name' ] ) . '</td>
|
509 |
</tr>
|
510 |
<tr>
|
511 |
+
<td>Email</td><td>' . strip_tags( $form_data[ 'email' ] ) . '</td>
|
512 |
</tr>
|
513 |
<tr>
|
514 |
+
<td>Website</td><td>' . strip_tags( $form_data[ 'website' ] ) . '</td>
|
515 |
</tr>
|
516 |
<tr>
|
517 |
+
<td>Phone</td><td>' . strip_tags( $form_data[ 'phone' ] ) . '</td>
|
518 |
</tr>
|
519 |
<tr>
|
520 |
+
<td>Subject</td><td>' . strip_tags( $form_data[ 'subject' ] ) . '</td>
|
521 |
</tr>
|
522 |
<tr>
|
523 |
+
<td>Details</td><td>' . strip_tags( $form_data[ 'details' ] ) . '</td>
|
524 |
</tr>
|
525 |
<tr>
|
526 |
+
<td>Request ID</td><td>' . strip_tags( $form_data[ 'request_id' ] ) . '</td>
|
527 |
</tr>
|
528 |
<tr>
|
529 |
+
<td>Server Address</td><td>' . strip_tags( $form_data[ 'server_address' ] ) . '</td>
|
530 |
</tr>
|
531 |
<tr>
|
532 |
+
<td>IP Address</td><td>' . strip_tags( $form_data[ 'ip_address' ] ) . '</td>
|
533 |
</tr>
|
534 |
<tr>
|
535 |
+
<td>Server Type</td><td>' . strip_tags( $form_data[ 'server_type' ] ) . '</td>
|
536 |
</tr>
|
537 |
<tr>
|
538 |
+
<td>User Agent</td><td>' . strip_tags( $form_data[ 'user_agent' ] ) . '</td>
|
539 |
</tr>';
|
540 |
+
if ( 'bug_report' == $form_data[ 'request_type' ] ) {
|
541 |
$message .= '<tr>
|
542 |
+
<td>WordPress Admin Username</td><td>' . strip_tags( $form_data[ 'wp_admin_username' ] ) . '</td>
|
543 |
</tr>
|
544 |
<tr>
|
545 |
+
<td>WordPress Admin Password</td><td>' . strip_tags( $form_data[ 'wp_admin_pwd' ] ) . '</td>
|
546 |
</tr>
|
547 |
<tr>
|
548 |
+
<td>SSH FTP Host</td><td>' . strip_tags( $form_data[ 'ssh_ftp_host' ] ) . '</td>
|
549 |
</tr>
|
550 |
<tr>
|
551 |
+
<td>SSH FTP Username</td><td>' . strip_tags( $form_data[ 'ssh_ftp_username' ] ) . '</td>
|
552 |
</tr>
|
553 |
<tr>
|
554 |
+
<td>SSH FTP Password</td><td>' . strip_tags( $form_data[ 'ssh_ftp_pwd' ] ) . '</td>
|
555 |
</tr>
|
556 |
';
|
557 |
}
|
558 |
$message .= '</table>';
|
559 |
+
if ( $this->debug_info ) {
|
560 |
$message .= '<h3>' . __( 'Debug Info', 'rtmedia' ) . '</h3>';
|
561 |
$message .= '<table>';
|
562 |
foreach ( $this->debug_info as $configuration => $value ) {
|
569 |
$message .= '</body>
|
570 |
</html>';
|
571 |
add_filter( 'wp_mail_content_type', create_function( '', 'return "text/html";' ) );
|
572 |
+
$headers = 'From: ' . $form_data[ 'name' ] . ' <' . $form_data[ 'email' ] . '>' . "\r\n";
|
573 |
+
if ( isset( $rtmedia->support_email ) ) {
|
574 |
$support_email = $rtmedia->support_email;
|
575 |
} else {
|
576 |
$support_email = 'support@rtcamp.com';
|
577 |
}
|
578 |
$support_email = 'support@rtcamp.com';
|
579 |
+
if ( wp_mail( $support_email, '[rtmedia] ' . $mail_type . ' from ' . str_replace( array( 'http://', 'https://' ), '', $form_data[ 'website' ] ), $message, $headers ) ) {
|
580 |
echo '<div class="rtmedia-success" style="margin:10px 0;">';
|
581 |
+
if ( 'new_feature' == $form_data[ 'request_type' ] ) {
|
582 |
echo '<p>' . __( 'Thank you for your Feedback/Suggestion.', 'rtmedia' ) . '</p>';
|
583 |
} else {
|
584 |
echo '<p>' . __( 'Thank you for posting your support request.', 'rtmedia' ) . '</p>';
|
597 |
|
598 |
}
|
599 |
|
600 |
+
}
|
app/helper/RTMediaThemes.php
CHANGED
@@ -7,6 +7,9 @@
|
|
7 |
*/
|
8 |
class RTMediaThemes {
|
9 |
|
|
|
|
|
|
|
10 |
/**
|
11 |
* Render themes
|
12 |
*
|
@@ -16,25 +19,27 @@ class RTMediaThemes {
|
|
16 |
*
|
17 |
* @return void
|
18 |
*/
|
19 |
-
public static function render_themes( $page = '' ){
|
20 |
global $wp_settings_sections, $wp_settings_fields;
|
21 |
|
22 |
-
|
|
|
|
|
23 |
return;
|
24 |
}
|
25 |
|
26 |
-
foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
|
27 |
|
28 |
-
if ( $section['callback'] ){
|
29 |
-
call_user_func( $section['callback'], $section );
|
30 |
}
|
31 |
|
32 |
-
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section['id'] ] ) ){
|
33 |
continue;
|
34 |
}
|
35 |
|
36 |
echo '<table class="form-table">';
|
37 |
-
do_settings_fields( $page, $section['id'] );
|
38 |
echo '</table>';
|
39 |
}
|
40 |
}
|
@@ -48,66 +53,24 @@ class RTMediaThemes {
|
|
48 |
*
|
49 |
* @return void
|
50 |
*/
|
51 |
-
public function get_themes(){
|
52 |
$tabs = array();
|
53 |
global $rtmedia_admin;
|
54 |
$tabs[] = array(
|
55 |
-
'title' => __( '
|
56 |
-
'name' => __( '
|
57 |
'href' => '#rtmedia-themes',
|
|
|
58 |
'callback' => array( $this, 'rtmedia_themes_content' )
|
59 |
);
|
60 |
$tabs[] = array(
|
61 |
'title' => __( '3rd Party Themes', 'rtmedia' ),
|
62 |
'name' => __( '3rd Party Themes', 'rtmedia' ),
|
63 |
'href' => '#rtmedia-themes-3',
|
|
|
64 |
'callback' => array( $this, 'rtmedia_3rd_party_themes_content' )
|
65 |
);
|
66 |
-
|
67 |
-
<div id="rtm-themes">
|
68 |
-
<div class="horizontal-tabs">
|
69 |
-
<dl class='tabs' data-tab>
|
70 |
-
<?php
|
71 |
-
$i = 1;
|
72 |
-
foreach ( $tabs as $tab ) {
|
73 |
-
$active_class = '';
|
74 |
-
if ( 1 == $i ){
|
75 |
-
$active_class = 'active';
|
76 |
-
}
|
77 |
-
$i ++;
|
78 |
-
?>
|
79 |
-
<dd class="<?php echo $active_class ?>">
|
80 |
-
<a id="tab-<?php echo substr( $tab['href'], 1 ) ?>" title="<?php echo $tab['title'] ?>" href="<?php echo $tab['href'] ?>" class="rtmedia-tab-title <?php echo sanitize_title( $tab['name'] ) ?>"><?php echo $tab['name'] ?></a>
|
81 |
-
</dd>
|
82 |
-
<?php
|
83 |
-
}
|
84 |
-
?>
|
85 |
-
</dl>
|
86 |
-
|
87 |
-
<?php
|
88 |
-
$k = 1;
|
89 |
-
$active_class = '';
|
90 |
-
echo "<div class='tabs-content'>";
|
91 |
-
foreach ( $tabs as $tab ) {
|
92 |
-
$active_class = '';
|
93 |
-
if ( 1 == $k ){
|
94 |
-
$active_class = ' active';
|
95 |
-
}
|
96 |
-
$k ++;
|
97 |
-
if ( isset( $tab['icon'] ) && ! empty( $tab['icon'] ) ){
|
98 |
-
$icon = '<i class="' . $tab['icon'] . '"></i>';
|
99 |
-
}
|
100 |
-
$tab_without_hash = explode( '#', $tab['href'] );
|
101 |
-
$tab_without_hash = $tab_without_hash[1];
|
102 |
-
echo '<div class="content' . $active_class . '" id="' . $tab_without_hash . '">';
|
103 |
-
call_user_func( $tab['callback'] );
|
104 |
-
echo '</div>';
|
105 |
-
}
|
106 |
-
echo '</div>';
|
107 |
-
?>
|
108 |
-
</div>
|
109 |
-
</div>
|
110 |
-
<?php
|
111 |
}
|
112 |
|
113 |
/**
|
@@ -119,70 +82,105 @@ class RTMediaThemes {
|
|
119 |
*
|
120 |
* @return void
|
121 |
*/
|
122 |
-
public function rtmedia_themes_content(){
|
123 |
|
124 |
|
125 |
$rtdating = wp_get_theme( 'rtdating' );
|
126 |
-
if( $rtdating->exists() ){
|
127 |
$rtdating_purchase = '';
|
128 |
} else {
|
129 |
$rtdating_purchase = '<a href="https://rtcamp.com/products/rtdating/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank">Buy rtDating</a> | ';
|
130 |
}
|
131 |
|
132 |
$inspirebook = wp_get_theme( 'inspirebook' );
|
133 |
-
if( $inspirebook->exists() ){
|
134 |
$inspirebook_purchase = '';
|
135 |
} else {
|
136 |
$inspirebook_purchase = '<a href="https://rtcamp.com/products/inspirebook/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank">Buy InspireBook</a> | ';
|
137 |
}
|
138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
?>
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
<div>
|
149 |
-
<
|
150 |
-
<
|
151 |
-
</
|
152 |
-
|
153 |
-
<
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
</div>
|
182 |
-
|
|
|
183 |
</div>
|
184 |
</div>
|
185 |
-
|
|
|
186 |
}
|
187 |
|
188 |
/**
|
@@ -194,70 +192,120 @@ class RTMediaThemes {
|
|
194 |
*
|
195 |
* @return void
|
196 |
*/
|
197 |
-
public function rtmedia_3rd_party_themes_content(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
?>
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
250 |
</div>
|
251 |
</div>
|
252 |
-
<hr>
|
253 |
-
<div class="row">
|
254 |
-
<div class="columns large-12">
|
255 |
-
<h3><?php _e( 'Are you a developer?', 'rtmedia' ); ?></h3>
|
256 |
|
257 |
-
|
258 |
-
|
259 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
</div>
|
261 |
-
|
262 |
}
|
263 |
-
|
|
7 |
*/
|
8 |
class RTMediaThemes {
|
9 |
|
10 |
+
// current page
|
11 |
+
public static $page;
|
12 |
+
|
13 |
/**
|
14 |
* Render themes
|
15 |
*
|
19 |
*
|
20 |
* @return void
|
21 |
*/
|
22 |
+
public static function render_themes( $page = '' ) {
|
23 |
global $wp_settings_sections, $wp_settings_fields;
|
24 |
|
25 |
+
self::$page = $page;
|
26 |
+
|
27 |
+
if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[ $page ] ) ) {
|
28 |
return;
|
29 |
}
|
30 |
|
31 |
+
foreach ( ( array ) $wp_settings_sections[ $page ] as $section ) {
|
32 |
|
33 |
+
if ( $section[ 'callback' ] ) {
|
34 |
+
call_user_func( $section[ 'callback' ], $section );
|
35 |
}
|
36 |
|
37 |
+
if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[ $page ] ) || ! isset( $wp_settings_fields[ $page ][ $section[ 'id' ] ] ) ) {
|
38 |
continue;
|
39 |
}
|
40 |
|
41 |
echo '<table class="form-table">';
|
42 |
+
do_settings_fields( $page, $section[ 'id' ] );
|
43 |
echo '</table>';
|
44 |
}
|
45 |
}
|
53 |
*
|
54 |
* @return void
|
55 |
*/
|
56 |
+
public function get_themes() {
|
57 |
$tabs = array();
|
58 |
global $rtmedia_admin;
|
59 |
$tabs[] = array(
|
60 |
+
'title' => __( 'Themes By rtCamp', 'rtmedia' ),
|
61 |
+
'name' => __( 'Themes By rtCamp', 'rtmedia' ),
|
62 |
'href' => '#rtmedia-themes',
|
63 |
+
'icon' => 'dashicons-admin-appearance',
|
64 |
'callback' => array( $this, 'rtmedia_themes_content' )
|
65 |
);
|
66 |
$tabs[] = array(
|
67 |
'title' => __( '3rd Party Themes', 'rtmedia' ),
|
68 |
'name' => __( '3rd Party Themes', 'rtmedia' ),
|
69 |
'href' => '#rtmedia-themes-3',
|
70 |
+
'icon' => 'dashicons-randomize',
|
71 |
'callback' => array( $this, 'rtmedia_3rd_party_themes_content' )
|
72 |
);
|
73 |
+
RTMediaAdmin::render_admin_ui( self::$page, $tabs );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
|
76 |
/**
|
82 |
*
|
83 |
* @return void
|
84 |
*/
|
85 |
+
public function rtmedia_themes_content() {
|
86 |
|
87 |
|
88 |
$rtdating = wp_get_theme( 'rtdating' );
|
89 |
+
if ( $rtdating->exists() ) {
|
90 |
$rtdating_purchase = '';
|
91 |
} else {
|
92 |
$rtdating_purchase = '<a href="https://rtcamp.com/products/rtdating/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank">Buy rtDating</a> | ';
|
93 |
}
|
94 |
|
95 |
$inspirebook = wp_get_theme( 'inspirebook' );
|
96 |
+
if ( $inspirebook->exists() ) {
|
97 |
$inspirebook_purchase = '';
|
98 |
} else {
|
99 |
$inspirebook_purchase = '<a href="https://rtcamp.com/products/inspirebook/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media" target="_blank">Buy InspireBook</a> | ';
|
100 |
}
|
101 |
|
102 |
+
|
103 |
+
$themes = array(
|
104 |
+
'rtdating' => array(
|
105 |
+
'name' => __( 'rtDating', 'rtmedia' ),
|
106 |
+
'image' => RTMEDIA_URL . 'app/assets/admin/img/rtDating.png',
|
107 |
+
'demo_url' => 'http://demo.rtcamp.com/rtdating/',
|
108 |
+
'author' => __( 'rtCamp', 'rtmedia' ),
|
109 |
+
'author_url' => 'https://rtcamp.com/',
|
110 |
+
'buy_url' => 'https://rtcamp.com/products/rtdating/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media',
|
111 |
+
'description' => __( 'rtDating is a unique, clean and modern theme only for WordPress. This theme is mostly useful for dating sites and community websites. It can also be use for any other WordPress based website.', 'rtmedia' ),
|
112 |
+
'tags' => 'black, green, white, light, dark, two-columns, three-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready',
|
113 |
+
),
|
114 |
+
'inspirebook' => array(
|
115 |
+
'name' => __( 'InspireBook', 'rtmedia' ),
|
116 |
+
'image' => RTMEDIA_URL . 'app/assets/admin/img/rtmedia-theme-InspireBook.png',
|
117 |
+
'demo_url' => 'http://demo.rtcamp.com/inspirebook/',
|
118 |
+
'author' => __( 'rtCamp', 'rtmedia' ),
|
119 |
+
'author_url' => 'https://rtcamp.com/',
|
120 |
+
'buy_url' => 'https://rtcamp.com/products/inspirebook/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media',
|
121 |
+
'description' => __( 'InspireBook is a premium WordPress theme, designed especially for BuddyPress and rtMedia powered social-networks.', 'rtmedia' ),
|
122 |
+
'tags' => 'black, blue, white, light, one-column, two-columns, right-sidebar, custom-header, custom-background, custom-menu, editor-style, theme-options, threaded-comments, sticky-post, translation-ready, responsive-layout, full-width-template, buddypress',
|
123 |
+
)
|
124 |
+
);
|
125 |
?>
|
126 |
+
|
127 |
+
<div class="theme-browser rtm-theme-browser rendered">
|
128 |
+
<div class="themes rtm-themes clearfix">
|
129 |
+
|
130 |
+
<?php
|
131 |
+
foreach ( $themes as $theme ) {
|
132 |
+
?>
|
133 |
+
|
134 |
+
<div class="theme rtm-theme">
|
135 |
+
<div class="theme-screenshot">
|
136 |
+
<img src="<?php echo $theme[ 'image' ]; ?>" />
|
137 |
+
</div>
|
138 |
+
|
139 |
+
<span class="more-details"><?php _e( 'Theme Details' ); ?></span>
|
140 |
+
|
141 |
+
<h3 class="theme-name"><?php echo $theme[ 'name' ]; ?></h3>
|
142 |
+
|
143 |
+
<div class="theme-actions">
|
144 |
+
<a class="button load-customize hide-if-no-customize" href="<?php echo $theme[ 'demo_url' ]; ?>"><?php _e( 'Live Demo' ); ?></a>
|
145 |
+
<a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme[ 'buy_url' ]; ?>"><?php _e( 'Buy Now' ); ?></a>
|
146 |
+
</div>
|
147 |
+
|
148 |
+
<div class="rtm-theme-content hide">
|
149 |
+
<div class="theme-wrap">
|
150 |
+
<div class="theme-header">
|
151 |
+
<button class="left rtm-previous dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
|
152 |
+
<button class="right rtm-next dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button>
|
153 |
+
<button class="close rtm-close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close overlay' ); ?></span></button>
|
154 |
+
</div>
|
155 |
+
|
156 |
+
<div class="theme-about">
|
157 |
+
<div class="theme-screenshots">
|
158 |
+
<div class="screenshot">
|
159 |
+
<a href="<?php echo $theme[ 'buy_url' ]; ?>" target="_blank"><img src="<?php echo $theme[ 'image' ]; ?>"/></a>
|
160 |
+
</div>
|
161 |
+
</div>
|
162 |
+
|
163 |
+
<div class="theme-info">
|
164 |
+
<h3 class="theme-name"><?php echo $theme[ 'name' ]; ?></h3>
|
165 |
+
<h4 class="theme-author">By <a href="https://rtcamp.com/"><?php echo $theme[ 'author' ]; ?></a></h4>
|
166 |
+
<p class="theme-description"><?php echo $theme[ 'description' ]; ?> <a href="<?php echo $theme[ 'buy_url' ]; ?>" class="rtmedia-theme-inner-a" target="_blank"><?php _e( 'Read More' ); ?></a></p>
|
167 |
+
<p class="theme-tags"><span><?php _e( 'Tags:' ); ?></span><?php echo $theme[ 'tags' ]; ?></p>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
|
171 |
+
<div class="theme-actions">
|
172 |
+
<a class="button load-customize hide-if-no-customize" href="<?php echo $theme[ 'demo_url' ]; ?>"><?php _e( 'Live Demo' ); ?></a>
|
173 |
+
<a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme[ 'buy_url' ]; ?>"><?php _e( 'Buy Now' ); ?></a>
|
174 |
+
</div>
|
175 |
+
</div>
|
176 |
+
</div>
|
177 |
</div>
|
178 |
+
|
179 |
+
<?php } ?>
|
180 |
</div>
|
181 |
</div>
|
182 |
+
|
183 |
+
<?php
|
184 |
}
|
185 |
|
186 |
/**
|
192 |
*
|
193 |
* @return void
|
194 |
*/
|
195 |
+
public function rtmedia_3rd_party_themes_content() {
|
196 |
+
|
197 |
+
$themes = array(
|
198 |
+
'msocial' => array(
|
199 |
+
'name' => __( '(M) SOCIAL NETWORK BUDDYPRESS THEME', 'rtmedia' ),
|
200 |
+
'image' => RTMEDIA_URL . 'app/assets/admin/img/rtmedia-theme-msocial.jpg',
|
201 |
+
'demo_url' => 'http://rt.cx/msocial',
|
202 |
+
'author' => __( 'gavick', 'rtmedia' ),
|
203 |
+
'author_url' => 'http://rt.cx/msocial',
|
204 |
+
'buy_url' => 'http://rt.cx/msocial',
|
205 |
+
'description' => __( '(M)Social is a sophisticated, vibrant community theme that offers incredible grid layouts, with full BuddyPress support so your users can interact with each other, create their own pages, and share their thoughts and images with the community. ', 'rtmedia' ),
|
206 |
+
'tags' => 'responsive, WPML, BuddyPress, social, business',
|
207 |
+
),
|
208 |
+
'klein' => array(
|
209 |
+
'name' => __( 'Klein', 'rtmedia' ),
|
210 |
+
'image' => RTMEDIA_URL . 'app/assets/admin/img/rtmedia-theme-klein.jpg',
|
211 |
+
'demo_url' => 'http://rt.cx/klein',
|
212 |
+
'author' => __( 'dunhakdis', 'rtmedia' ),
|
213 |
+
'author_url' => 'http://rt.cx/klein',
|
214 |
+
'buy_url' => 'http://rt.cx/klein',
|
215 |
+
'description' => __( 'Klein is an innovative WordPress theme built to support BuddyPress, bbPress, and WooCommerce out of the box. Perfect for websites that interacts with many users.', 'rtmedia' ),
|
216 |
+
'tags' => 'bbpress, bp, buddypress, buddypress flat design, buddypress theme, community, responsive buddypress, responsive buddypress theme, social network, wordpress community theme',
|
217 |
+
),
|
218 |
+
'sweetdate' => array(
|
219 |
+
'name' => __( 'SweetDate', 'rtmedia' ),
|
220 |
+
'image' => RTMEDIA_URL . 'app/assets/admin/img/rtmedia-theme-sweetdate.png',
|
221 |
+
'demo_url' => 'http://rt.cx/sweetdate',
|
222 |
+
'author' => __( 'SeventhQueen', 'rtmedia' ),
|
223 |
+
'author_url' => 'http://rt.cx/sweetdate',
|
224 |
+
'buy_url' => 'http://rt.cx/sweetdate',
|
225 |
+
'description' => __( 'SweetDate is a unique, clean and modern Premium Wordpress theme. It is perfect for a dating or community website but can be used as well for any other domain. They added all the things you need to create a perfect community system.', 'rtmedia' ),
|
226 |
+
'tags' => 'bbpress, buddypress, clean, community, creative, dating, facebook, foundation, mailchimp, retina, seo, social, woocommerce, wordpress, zurb',
|
227 |
+
),
|
228 |
+
'kleo' => array(
|
229 |
+
'name' => __( 'KLEO', 'rtmedia' ),
|
230 |
+
'image' => RTMEDIA_URL . 'app/assets/admin/img/rtmedia-theme-kleo.png',
|
231 |
+
'demo_url' => 'http://rt.cx/kleo',
|
232 |
+
'author' => __( 'SeventhQueen', 'rtmedia' ),
|
233 |
+
'author_url' => 'http://rt.cx/kleo',
|
234 |
+
'buy_url' => 'http://rt.cx/kleo',
|
235 |
+
'description' => __( 'You no longer need to be a professional developer or designer to create an awesome website. Let your imagination run wild and create the site of your dreams. KLEO has all the tools to get you started.', 'rtmedia' ),
|
236 |
+
'tags' => 'bbpress, Bootstrap 3, buddypress, clean design, community theme, e-commerce theme, multi-purpose, responsive design, retina, woocommerce, wordpress theme',
|
237 |
+
)
|
238 |
+
);
|
239 |
?>
|
240 |
+
|
241 |
+
|
242 |
+
<div class="theme-browser rtm-theme-browser rendered">
|
243 |
+
<div class="themes rtm-themes clearfix">
|
244 |
+
|
245 |
+
<?php
|
246 |
+
foreach ( $themes as $theme ) {
|
247 |
+
?>
|
248 |
+
|
249 |
+
<div class="theme rtm-theme">
|
250 |
+
<div class="theme-screenshot">
|
251 |
+
<img src="<?php echo $theme[ 'image' ]; ?>" />
|
252 |
+
</div>
|
253 |
+
|
254 |
+
<span class="more-details"><?php _e( 'Theme Details' ); ?></span>
|
255 |
+
|
256 |
+
<h3 class="theme-name"><?php echo $theme[ 'name' ]; ?></h3>
|
257 |
+
|
258 |
+
<div class="theme-actions">
|
259 |
+
<a class="button load-customize hide-if-no-customize" href="<?php echo $theme[ 'demo_url' ]; ?>"><?php _e( 'Live Demo' ); ?></a>
|
260 |
+
<a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme[ 'buy_url' ]; ?>"><?php _e( 'Buy Now' ); ?></a>
|
261 |
+
</div>
|
262 |
+
|
263 |
+
<div class="rtm-theme-content hide">
|
264 |
+
<div class="theme-wrap">
|
265 |
+
<div class="theme-header">
|
266 |
+
<button class="left rtm-previous dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
|
267 |
+
<button class="right rtm-next dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button>
|
268 |
+
<button class="close rtm-close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close overlay' ); ?></span></button>
|
269 |
+
</div>
|
270 |
+
|
271 |
+
<div class="theme-about">
|
272 |
+
<div class="theme-screenshots">
|
273 |
+
<div class="screenshot">
|
274 |
+
<a href="<?php echo $theme[ 'buy_url' ]; ?>" target="_blank"><img src="<?php echo $theme[ 'image' ]; ?>"/></a>
|
275 |
+
</div>
|
276 |
+
</div>
|
277 |
+
|
278 |
+
<div class="theme-info">
|
279 |
+
<h3 class="theme-name"><?php echo $theme[ 'name' ]; ?></h3>
|
280 |
+
<h4 class="theme-author">By <a href="<?php echo $theme[ 'author_url' ]; ?>"><?php echo $theme[ 'author' ]; ?></a></h4>
|
281 |
+
<p class="theme-description"><?php echo $theme[ 'description' ]; ?> <a href="<?php echo $theme[ 'buy_url' ]; ?>" class="rtmedia-theme-inner-a" target="_blank"><?php _e( 'Read More' ); ?></a></p>
|
282 |
+
<p class="theme-tags"><span><?php _e( 'Tags:' ); ?></span><?php echo $theme[ 'tags' ]; ?></p>
|
283 |
+
</div>
|
284 |
+
</div>
|
285 |
+
|
286 |
+
<div class="theme-actions">
|
287 |
+
<a class="button load-customize hide-if-no-customize" href="<?php echo $theme[ 'demo_url' ]; ?>"><?php _e( 'Live Demo' ); ?></a>
|
288 |
+
<a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme[ 'buy_url' ]; ?>"><?php _e( 'Buy Now' ); ?></a>
|
289 |
+
</div>
|
290 |
+
</div>
|
291 |
+
</div>
|
292 |
+
</div>
|
293 |
+
|
294 |
+
<?php } ?>
|
295 |
</div>
|
296 |
</div>
|
|
|
|
|
|
|
|
|
297 |
|
298 |
+
<div class="rtmedia-theme-warning rtm-warning"><?php _e( 'These are the third party themes. For any issues or queries regarding these themes please contact theme developers.', 'rtmedia' ) ?></div>
|
299 |
+
|
300 |
+
<div>
|
301 |
+
<h3 class="rtm-option-title"><?php _e( 'Are you a developer?', 'rtmedia' ); ?></h3>
|
302 |
+
|
303 |
+
<p>
|
304 |
+
<?php _e( 'If you have developed a rtMedia compatible theme and would like it to list here, please email us at', 'rtmedia' ) ?>
|
305 |
+
<a href="mailto:product@rtcamp.com"><?php _e( 'product@rtcamp.com', 'rtmedia' ) ?></a>.
|
306 |
+
</p>
|
307 |
</div>
|
308 |
+
<?php
|
309 |
}
|
310 |
+
|
311 |
+
}
|
app/helper/rtDimensions.php
CHANGED
@@ -25,7 +25,7 @@ class rtDimensions extends rtForm {
|
|
25 |
*
|
26 |
* @return int $id_count
|
27 |
*/
|
28 |
-
private function get_default_id(){
|
29 |
return self::$id_count;
|
30 |
}
|
31 |
|
@@ -38,7 +38,7 @@ class rtDimensions extends rtForm {
|
|
38 |
*
|
39 |
* @return int $id_count
|
40 |
*/
|
41 |
-
private function update_default_id(){
|
42 |
self::$id_count ++;
|
43 |
}
|
44 |
|
@@ -51,7 +51,7 @@ class rtDimensions extends rtForm {
|
|
51 |
*
|
52 |
* @return string $default_class
|
53 |
*/
|
54 |
-
private function get_default_class(){
|
55 |
return self::$default_class;
|
56 |
}
|
57 |
|
@@ -65,12 +65,12 @@ class rtDimensions extends rtForm {
|
|
65 |
*
|
66 |
* @return string $html
|
67 |
*/
|
68 |
-
private function embedd_class( $element, $class = null ){
|
69 |
$html = 'class = "' . $this->get_default_class();
|
70 |
|
71 |
-
if ( isset( $class ) ){
|
72 |
|
73 |
-
if ( is_array( $class ) ){
|
74 |
$html .= ' ' . implode( ' ', $class );
|
75 |
} else {
|
76 |
throw new rtFormsInvalidArgumentsException( 'class [' . $element . ']' );
|
@@ -90,9 +90,10 @@ class rtDimensions extends rtForm {
|
|
90 |
*
|
91 |
* @return string $html
|
92 |
*/
|
93 |
-
protected function generate_dimensions( $attributes ){
|
94 |
$element = 'rtDimension';
|
95 |
global $rtmedia;
|
|
|
96 |
$defaults = array(
|
97 |
'desc' => '', 'show_desc' => false,
|
98 |
);
|
@@ -100,51 +101,41 @@ class rtDimensions extends rtForm {
|
|
100 |
$attributes = wp_parse_args( $attributes, $defaults );
|
101 |
extract( $attributes );
|
102 |
|
103 |
-
$html = '
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
$html .= 'id="' . $this->get_default_class() . '-' . $this->get_default_id() . '" ';
|
109 |
-
$this->update_default_id();
|
110 |
-
}
|
111 |
-
|
112 |
-
if ( isset( $attributes['class'] ) ){
|
113 |
-
$html .= self::embedd_class( $element, $attributes['class'] );
|
114 |
-
} else {
|
115 |
-
$html .= self::embedd_class( $element );
|
116 |
-
}
|
117 |
-
$html .= '>';
|
118 |
-
|
119 |
-
$html .= parent::get_textbox( array(
|
120 |
-
'name' => "rtmedia-options[{$key}_width]", 'value' => $width, 'class' => array( 'small-text large-offset-1' ), 'show_desc' => $show_desc,
|
121 |
-
) );
|
122 |
|
123 |
-
if ( isset( $height ) ){
|
124 |
-
$html .= parent::
|
125 |
-
|
126 |
-
|
127 |
}
|
128 |
|
129 |
-
if ( isset( $crop ) ){
|
130 |
-
$html .= parent::
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
|
|
138 |
}
|
139 |
|
140 |
-
if ( $desc && $show_desc ){
|
141 |
$html .= '<span class="clearfix large-offset-3 description">' . $desc . '</span>';
|
142 |
}
|
143 |
|
144 |
-
$html .= '</div>';
|
145 |
|
146 |
-
if ( isset( $attributes['label'] ) ){
|
147 |
-
$html = parent::enclose_label( 'container', $html, $attributes['label'] );
|
148 |
}
|
149 |
|
150 |
return $html;
|
@@ -159,7 +150,7 @@ class rtDimensions extends rtForm {
|
|
159 |
*
|
160 |
* @return void
|
161 |
*/
|
162 |
-
public function get_dimensions( $attributes = '' ){
|
163 |
return $this->generate_dimensions( $attributes );
|
164 |
}
|
165 |
|
25 |
*
|
26 |
* @return int $id_count
|
27 |
*/
|
28 |
+
private function get_default_id() {
|
29 |
return self::$id_count;
|
30 |
}
|
31 |
|
38 |
*
|
39 |
* @return int $id_count
|
40 |
*/
|
41 |
+
private function update_default_id() {
|
42 |
self::$id_count ++;
|
43 |
}
|
44 |
|
51 |
*
|
52 |
* @return string $default_class
|
53 |
*/
|
54 |
+
private function get_default_class() {
|
55 |
return self::$default_class;
|
56 |
}
|
57 |
|
65 |
*
|
66 |
* @return string $html
|
67 |
*/
|
68 |
+
private function embedd_class( $element, $class = null ) {
|
69 |
$html = 'class = "' . $this->get_default_class();
|
70 |
|
71 |
+
if ( isset( $class ) ) {
|
72 |
|
73 |
+
if ( is_array( $class ) ) {
|
74 |
$html .= ' ' . implode( ' ', $class );
|
75 |
} else {
|
76 |
throw new rtFormsInvalidArgumentsException( 'class [' . $element . ']' );
|
90 |
*
|
91 |
* @return string $html
|
92 |
*/
|
93 |
+
protected function generate_dimensions( $attributes ) {
|
94 |
$element = 'rtDimension';
|
95 |
global $rtmedia;
|
96 |
+
$options = $rtmedia->options;
|
97 |
$defaults = array(
|
98 |
'desc' => '', 'show_desc' => false,
|
99 |
);
|
101 |
$attributes = wp_parse_args( $attributes, $defaults );
|
102 |
extract( $attributes );
|
103 |
|
104 |
+
$html = '';
|
105 |
|
106 |
+
$html .= '<td>' . parent::get_number( array(
|
107 |
+
'name' => "rtmedia-options[{$key}_width]", 'value' => $width, 'class' => array( 'small-text large-offset-1' ), 'show_desc' => $show_desc,
|
108 |
+
) ) . '</td>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
|
110 |
+
if ( isset( $height ) ) {
|
111 |
+
$html .= '<td>' . parent::get_number( array(
|
112 |
+
'name' => "rtmedia-options[{$key}_height]", 'value' => $height, 'class' => array( 'small-text large-offset-1' ), 'show_desc' => $show_desc,
|
113 |
+
) ) . '</td>';
|
114 |
}
|
115 |
|
116 |
+
if ( isset( $crop ) ) {
|
117 |
+
$html .= '<td>' . parent::get_switch(
|
118 |
+
array(
|
119 |
+
'name' => "rtmedia-options[{$key}_crop]",
|
120 |
+
'rtForm_options' => array(
|
121 |
+
array(
|
122 |
+
'' => 1, //label would be blank
|
123 |
+
'checked' => $crop,
|
124 |
+
),
|
125 |
+
),
|
126 |
+
'value' => ( isset( $options[ "rtmedia-options[{$key}_crop]" ] ) ) ? $options[ "rtmedia-options[{$key}_crop]" ] : '0',
|
127 |
+
'show_desc' => $show_desc,
|
128 |
+
) ) . '</td>';
|
129 |
}
|
130 |
|
131 |
+
if ( $desc && $show_desc ) {
|
132 |
$html .= '<span class="clearfix large-offset-3 description">' . $desc . '</span>';
|
133 |
}
|
134 |
|
135 |
+
// $html .= '</div>';
|
136 |
|
137 |
+
if ( isset( $attributes[ 'label' ] ) ) {
|
138 |
+
$html = parent::enclose_label( 'container', $html, $attributes[ 'label' ] );
|
139 |
}
|
140 |
|
141 |
return $html;
|
150 |
*
|
151 |
* @return void
|
152 |
*/
|
153 |
+
public function get_dimensions( $attributes = '' ) {
|
154 |
return $this->generate_dimensions( $attributes );
|
155 |
}
|
156 |
|
app/helper/rtForm.php
CHANGED
@@ -67,12 +67,12 @@
|
|
67 |
*
|
68 |
* @author udit
|
69 |
*/
|
70 |
-
|
71 |
-
if ( ! class_exists( 'rtForm' ) ){
|
72 |
|
73 |
class rtForm {
|
74 |
|
75 |
private $element_id;
|
|
|
76 |
/**
|
77 |
* default id counts
|
78 |
* if id for any element is not given then these count will be used in id generation
|
@@ -88,20 +88,18 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
88 |
'rtHidden' => 0,
|
89 |
'rtWysiwyg' => 0,
|
90 |
);
|
91 |
-
|
92 |
private static $default_classes = array(
|
93 |
-
'rtText' => '
|
94 |
-
'rtNumber' => '
|
95 |
-
'rtDate' => '
|
96 |
-
'rtRadio' => '
|
97 |
-
'rtCheckbox' => '
|
98 |
-
'rtSelect' => '
|
99 |
-
'rtTextarea' => '
|
100 |
-
'rtHidden' => '
|
101 |
-
'rtWysiwyg' => '
|
102 |
);
|
103 |
|
104 |
-
|
105 |
/**
|
106 |
* Get default html id.
|
107 |
*
|
@@ -110,7 +108,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
110 |
* @param string $element
|
111 |
*
|
112 |
*/
|
113 |
-
private function get_default_id( $element ){
|
114 |
return self::$id_counts[ $element ];
|
115 |
}
|
116 |
|
@@ -122,7 +120,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
122 |
* @param string $element
|
123 |
*
|
124 |
*/
|
125 |
-
private function update_default_id( $element ){
|
126 |
self::$id_counts[ $element ] ++;
|
127 |
}
|
128 |
|
@@ -134,11 +132,10 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
134 |
* @param string $element
|
135 |
*
|
136 |
*/
|
137 |
-
private function get_default_class( $element ){
|
138 |
return self::$default_classes[ $element ];
|
139 |
}
|
140 |
|
141 |
-
|
142 |
/**
|
143 |
* Embedd html class to html output.
|
144 |
*
|
@@ -149,13 +146,13 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
149 |
*
|
150 |
* @return string $html
|
151 |
*/
|
152 |
-
private function embedd_class( $element, $class = null ){
|
153 |
|
154 |
$html = 'class="' . $this->get_default_class( $element );
|
155 |
|
156 |
-
if ( isset( $class ) ){
|
157 |
|
158 |
-
if ( is_array( $class ) ){
|
159 |
$html .= ' ' . implode( ' ', $class );
|
160 |
} else {
|
161 |
throw new rtFormInvalidArgumentsException( 'class [' . $element . ']' );
|
@@ -176,10 +173,10 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
176 |
*
|
177 |
* @return string $html
|
178 |
*/
|
179 |
-
private function generate_element_id( $element, $id = null ){
|
180 |
|
181 |
$html = 'id="';
|
182 |
-
if ( isset( $id ) ){
|
183 |
$html .= $id . '"';
|
184 |
$this->element_id = $id;
|
185 |
} else {
|
@@ -202,15 +199,15 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
202 |
*
|
203 |
* @return string $html
|
204 |
*/
|
205 |
-
private function generate_element_name( $element, $multiple, $name ){
|
206 |
|
207 |
$html = 'name="';
|
208 |
-
if ( $multiple ){
|
209 |
|
210 |
$html .= isset( $name ) ? $name . '[]' : $element . '[]';
|
211 |
|
212 |
// for select - add multiple = multiple
|
213 |
-
if ( 'rtSelect' == $element ){
|
214 |
$html .= 'multiple = "multiple"';
|
215 |
}
|
216 |
} else {
|
@@ -231,7 +228,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
231 |
*
|
232 |
* @return string $html
|
233 |
*/
|
234 |
-
private function generate_element_value( $element, $attributes ){
|
235 |
|
236 |
$html = '';
|
237 |
switch ( $element ) {
|
@@ -239,12 +236,12 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
239 |
case 'rtNumber': //number
|
240 |
case 'rtText' : //text
|
241 |
$html .= 'value="';
|
242 |
-
$html .= ( isset( $attributes['value'] ) ) ? $attributes['value'] : '';
|
243 |
$html .= '" ';
|
244 |
break;
|
245 |
|
246 |
case 'rtTextarea' :
|
247 |
-
|
248 |
* no process --- handled in between the start tab and end tag.
|
249 |
* <textarea> value </textarea>
|
250 |
*/
|
@@ -252,7 +249,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
252 |
|
253 |
case 'rtCheckbox' : //checkbox
|
254 |
case 'rtRadio' : //radio
|
255 |
-
$html .= 'value = "' . $attributes['value'] . '">';
|
256 |
break;
|
257 |
}
|
258 |
|
@@ -268,11 +265,11 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
268 |
*
|
269 |
* @return string $html
|
270 |
*/
|
271 |
-
private function generate_element_desc( $attributes ){
|
272 |
|
273 |
-
if ( isset( $attributes['desc'] ) ){
|
274 |
|
275 |
-
$html = '<span class="clearfix large-offset-3 description">' . $attributes['desc'] . '</span>';
|
276 |
|
277 |
return $html;
|
278 |
}
|
@@ -289,9 +286,9 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
289 |
*
|
290 |
* @return string $html
|
291 |
*/
|
292 |
-
private function embedd_misc_attributes( $misc ){
|
293 |
|
294 |
-
if ( ! is_array( $misc ) ){
|
295 |
throw new rtFormInvalidArgumentsException( 'attributes : misc' );
|
296 |
|
297 |
return;
|
@@ -317,35 +314,35 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
317 |
*
|
318 |
* @return string $html
|
319 |
*/
|
320 |
-
private function processAttributes( $element, $attributes, $container = false ){
|
321 |
|
322 |
/* generating the id on its own if not provided otherwise taken from the parameter provided */
|
323 |
-
if ( isset( $attributes['id'] ) ){
|
324 |
-
$html = $this->generate_element_id( $element, $attributes['id'] ) . ' ';
|
325 |
} else {
|
326 |
$html = $this->generate_element_id( $element ) . ' ';
|
327 |
}
|
328 |
|
329 |
/* name attrbute according to multiple flag */
|
330 |
-
$multiple = ( isset( $attributes['multiple'] ) && $attributes['multiple'] ) ? true : false;
|
331 |
-
$name
|
332 |
$html .= $this->generate_element_name( $element, $multiple, $name ) . ' ';
|
333 |
|
334 |
/*
|
335 |
* list down all the classes provided along with the default class of rtForms.
|
336 |
* default class of rtForms will always be attached irrespective of the attributes provided.
|
337 |
*/
|
338 |
-
if ( ! $container ){
|
339 |
|
340 |
-
if ( isset( $attributes['class'] ) ){
|
341 |
-
$html .= $this->embedd_class( $element, $attributes['class'] );
|
342 |
} else {
|
343 |
$html .= $this->embedd_class( $element );
|
344 |
}
|
345 |
}
|
346 |
|
347 |
-
if ( isset( $attributes['misc'] ) ){
|
348 |
-
$html .= ' ' . $this->embedd_misc_attributes( $attributes['misc'] );
|
349 |
}
|
350 |
|
351 |
$html .= $this->generate_element_value( $element, $attributes );
|
@@ -360,54 +357,55 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
360 |
*
|
361 |
* @param string $element
|
362 |
* @param array $attrib
|
363 |
-
* @param
|
364 |
*
|
365 |
* @return string $html
|
366 |
*/
|
367 |
-
private function container_enclosed_elements( $element, $attrib, $rtForm_options ){
|
368 |
|
369 |
$html = '';
|
370 |
$size = count( $rtForm_options );
|
371 |
-
if ( isset( $attrib['id'] ) ){
|
372 |
-
$id = $attrib['id'];
|
373 |
}
|
374 |
|
375 |
foreach ( $rtForm_options as $opt ) {
|
376 |
|
377 |
-
if ( isset( $attrib['id'] ) && $size > 1 ){
|
378 |
-
$attrib['id'] = $id . '-' . $this->get_default_id( $element );
|
379 |
$this->update_default_id( $element );
|
380 |
}
|
381 |
|
382 |
-
foreach ( (array) $opt as $key => $val ) {
|
383 |
|
384 |
-
if ( 'checked' == $key ){
|
385 |
-
$attrib['checked'] = $val;
|
386 |
} else {
|
387 |
-
if ( 'selected' == $key ){
|
388 |
-
$attrib['selected'] = $val;
|
389 |
} else {
|
390 |
-
if ( 'desc' == $key ){
|
391 |
-
$attrib['desc'] = $val;
|
392 |
} else {
|
393 |
-
if ( 'id' == $key ){
|
394 |
-
$attrib['id'] = $val;
|
395 |
} else {
|
396 |
-
$attrib['key']
|
397 |
-
$attrib['value'] = $val;
|
398 |
}
|
399 |
}
|
400 |
}
|
401 |
}
|
402 |
}
|
403 |
|
404 |
-
$checked = ( isset( $attrib['checked'] ) && $attrib['checked'] ) ? 'checked=checked' : '';
|
405 |
-
if ( isset( $attrib['switch'] ) && $attrib['switch'] ){
|
406 |
$switch = 'data-toggle="switch"';
|
407 |
} else {
|
408 |
$switch = '';
|
409 |
}
|
410 |
|
|
|
411 |
switch ( $element ) {
|
412 |
case 'rtRadio' :
|
413 |
$data = '<input type="radio" ' . $checked . ' ';
|
@@ -416,39 +414,44 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
416 |
$data = '<input type="checkbox" ' . $checked . ' ' . $switch . ' ';
|
417 |
break;
|
418 |
case 'rtSelect' :
|
419 |
-
$selected = ( $attrib['selected'] ) ? 'selected=selected' : '';
|
420 |
-
$data
|
421 |
break;
|
422 |
}
|
423 |
|
424 |
-
if ( 'rtSelect' != $element ){
|
425 |
$data .= $this->processAttributes( $element, $attrib, true );
|
426 |
|
427 |
-
|
|
|
|
|
|
|
428 |
|
429 |
-
|
430 |
|
|
|
431 |
} else {
|
432 |
-
if ( ( isset( $attrib['switch'] ) && $attrib['switch'] ) || ( isset( $attrib['switch_square'] ) && $attrib['switch_square'] ) ){
|
433 |
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
|
|
438 |
}
|
439 |
} else {
|
440 |
-
$data = $this->enclose_label( $element, $data, $attrib['key'] );
|
441 |
}
|
442 |
}
|
443 |
|
444 |
-
$data .= '
|
445 |
}
|
446 |
|
447 |
$html .= $data;
|
448 |
|
449 |
-
unset( $attrib['id'] );
|
450 |
-
unset( $attrib['key'] );
|
451 |
-
unset( $attrib['value'] );
|
452 |
}
|
453 |
|
454 |
return $html;
|
@@ -463,22 +466,22 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
463 |
* @param array $attributes
|
464 |
*
|
465 |
*/
|
466 |
-
private function parse_multiple_options( $element, $attributes ){
|
467 |
|
468 |
-
if ( is_array( $attributes ) ){
|
469 |
|
470 |
-
if ( isset( $attributes['rtForm_options'] ) && is_array( $attributes['rtForm_options'] ) ){
|
471 |
|
472 |
$attribKeys = array_keys( $attributes );
|
473 |
-
$attrib
|
474 |
|
475 |
foreach ( $attribKeys as $key ) {
|
476 |
-
if ( 'rtForm_options' != $key ){
|
477 |
$attrib[ $key ] = $attributes[ $key ];
|
478 |
}
|
479 |
}
|
480 |
|
481 |
-
$rtForm_options = (array) $attributes['rtForm_options'];
|
482 |
|
483 |
return array( 'attrib' => $attrib, 'rtForm_options' => $rtForm_options, );
|
484 |
} else {
|
@@ -501,16 +504,16 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
501 |
*
|
502 |
* @return string $data
|
503 |
*/
|
504 |
-
protected function enclose_label( $element, $html, $label, $class = false ){
|
505 |
|
506 |
$labelClass = '';
|
507 |
-
if ( ! empty( $class ) && is_array( $class ) ){
|
508 |
$labelClass = 'class="' . implode( ' ', $class ) . '"';
|
509 |
}
|
510 |
|
511 |
$data = '<label for="' . $this->element_id . '" ' . $labelClass . '>';
|
512 |
|
513 |
-
if ( 'rtRadio' == $element || 'rtCheckbox' == $element ){
|
514 |
$data .= $html . ' ' . $label;
|
515 |
} else {
|
516 |
$data .= $label . ' ' . $html;
|
@@ -530,10 +533,10 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
530 |
*
|
531 |
* @return string $html
|
532 |
*/
|
533 |
-
protected function generate_textbox( $attributes ){
|
534 |
|
535 |
$element = 'rtText';
|
536 |
-
if ( is_array( $attributes ) ){
|
537 |
|
538 |
/* Starting the input tag */
|
539 |
$html = '<input type="text" ';
|
@@ -544,15 +547,15 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
544 |
/* ending the tag */
|
545 |
$html .= ' />';
|
546 |
|
547 |
-
if ( isset( $attributes['label'] ) ){
|
548 |
-
if ( isset( $attributes['labelClass'] ) ){
|
549 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
550 |
} else {
|
551 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
552 |
}
|
553 |
}
|
554 |
|
555 |
-
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
556 |
$html .= $this->generate_element_desc( $attributes );
|
557 |
}
|
558 |
|
@@ -571,7 +574,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
571 |
*
|
572 |
* @return string
|
573 |
*/
|
574 |
-
public function get_textbox( $attributes = '' ){
|
575 |
|
576 |
return $this->generate_textbox( $attributes );
|
577 |
}
|
@@ -585,38 +588,38 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
585 |
*
|
586 |
* @return string $html
|
587 |
*/
|
588 |
-
protected function generate_number( $attributes ){
|
589 |
|
590 |
$element = 'rtNumber';
|
591 |
-
if ( is_array( $attributes ) ){
|
592 |
|
593 |
/* Starting the input tag */
|
594 |
$html = '<input type="number" ';
|
595 |
|
596 |
/* generating attributes */
|
597 |
$html .= $this->processAttributes( $element, $attributes );
|
598 |
-
if ( isset( $attributes['min'] ) ){
|
599 |
-
$html .= " min='" . $attributes['min'] . "' ";
|
600 |
}
|
601 |
-
if ( isset( $attributes['max'] ) ){
|
602 |
-
$html .= " max='" . $attributes['max'] . "' ";
|
603 |
}
|
604 |
-
if ( isset( $attributes['step'] ) ){
|
605 |
-
$html .= " step='" . $attributes['step'] . "' ";
|
606 |
}
|
607 |
|
608 |
/* ending the tag */
|
609 |
$html .= ' />';
|
610 |
|
611 |
-
if ( isset( $attributes['label'] ) ){
|
612 |
-
if ( isset( $attributes['labelClass'] ) ){
|
613 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
614 |
} else {
|
615 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
616 |
}
|
617 |
}
|
618 |
|
619 |
-
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
620 |
$html .= $this->generate_element_desc( $attributes );
|
621 |
}
|
622 |
|
@@ -635,7 +638,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
635 |
*
|
636 |
* @return string
|
637 |
*/
|
638 |
-
public function get_number( $attributes = '' ){
|
639 |
|
640 |
return $this->generate_number( $attributes );
|
641 |
}
|
@@ -649,25 +652,25 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
649 |
*
|
650 |
* @return string $html
|
651 |
*/
|
652 |
-
protected function generate_date( $attributes ){
|
653 |
|
654 |
$element = 'rtDate';
|
655 |
-
if ( is_array( $attributes ) ){
|
656 |
$html = '<input type="date" ';
|
657 |
|
658 |
$html .= $this->processAttributes( $element, $attributes );
|
659 |
|
660 |
$html .= ' />';
|
661 |
|
662 |
-
if ( isset( $attributes['label'] ) ){
|
663 |
-
if ( isset( $attributes['labelClass'] ) ){
|
664 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
665 |
} else {
|
666 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
667 |
}
|
668 |
}
|
669 |
|
670 |
-
if ( isset( $attributes['show_desc'] ) && $attributes['desc'] ){
|
671 |
$html .= $this->generate_element_desc( $attributes );
|
672 |
}
|
673 |
|
@@ -686,7 +689,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
686 |
*
|
687 |
* @return string
|
688 |
*/
|
689 |
-
public function get_date( $attributes ){
|
690 |
return $this->generate_date( $attributes );
|
691 |
}
|
692 |
|
@@ -699,10 +702,10 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
699 |
*
|
700 |
* @return string $html
|
701 |
*/
|
702 |
-
protected function generate_hidden( $attributes ){
|
703 |
|
704 |
$element = 'rtHidden';
|
705 |
-
if ( is_array( $attributes ) ){
|
706 |
|
707 |
/* Starting the input tag */
|
708 |
$html = '<input type="hidden" ';
|
@@ -713,15 +716,15 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
713 |
/* ending the tag */
|
714 |
$html .= ' />';
|
715 |
|
716 |
-
if ( isset( $attributes['label'] ) ){
|
717 |
-
if ( isset( $attributes['labelClass'] ) ){
|
718 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
719 |
} else {
|
720 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
721 |
}
|
722 |
}
|
723 |
|
724 |
-
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
725 |
$html .= $this->generate_element_desc( $attributes );
|
726 |
}
|
727 |
|
@@ -740,7 +743,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
740 |
*
|
741 |
* @return string
|
742 |
*/
|
743 |
-
public function get_hidden( $attributes = '' ){
|
744 |
|
745 |
return $this->generate_hidden( $attributes );
|
746 |
}
|
@@ -754,28 +757,28 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
754 |
*
|
755 |
* @return string $html
|
756 |
*/
|
757 |
-
protected function generate_textarea( $attributes ){
|
758 |
|
759 |
$element = 'rtTextarea';
|
760 |
-
if ( is_array( $attributes ) ){
|
761 |
|
762 |
$html = '<textarea ';
|
763 |
$html .= $this->processAttributes( $element, $attributes );
|
764 |
$html .= '>';
|
765 |
|
766 |
-
$html .= ( isset( $attributes['value'] ) ) ? $attributes['value'] : '';
|
767 |
|
768 |
$html .= '</textarea>';
|
769 |
|
770 |
-
if ( isset( $attributes['label'] ) ){
|
771 |
-
if ( isset( $attributes['labelClass'] ) ){
|
772 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
773 |
} else {
|
774 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
775 |
}
|
776 |
}
|
777 |
|
778 |
-
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
779 |
$html .= $this->generate_element_desc( $attributes );
|
780 |
}
|
781 |
|
@@ -794,13 +797,11 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
794 |
*
|
795 |
* @return string
|
796 |
*/
|
797 |
-
public function get_textarea( $attributes = '' ){
|
798 |
|
799 |
return $this->generate_textarea( $attributes );
|
800 |
}
|
801 |
|
802 |
-
|
803 |
-
|
804 |
/* wysiwyg
|
805 |
*
|
806 |
* pending as of now.
|
@@ -844,21 +845,21 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
844 |
*
|
845 |
* @return string $container
|
846 |
*/
|
847 |
-
protected function generate_radio( $attributes ){
|
848 |
|
849 |
$element = 'rtRadio';
|
850 |
-
$html
|
851 |
|
852 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
853 |
-
$html .= $this->container_enclosed_elements( $element, $meta['attrib'], $meta['rtForm_options'] );
|
854 |
|
855 |
-
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
856 |
$html .= $this->generate_element_desc( $attributes );
|
857 |
}
|
858 |
|
859 |
$container = '<span ';
|
860 |
-
if ( isset( $attributes['class'] ) ){
|
861 |
-
$container .= $this->embedd_class( $element, $attributes['class'] );
|
862 |
} else {
|
863 |
$container .= $this->embedd_class( $element );
|
864 |
}
|
@@ -883,7 +884,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
883 |
*
|
884 |
* @return string
|
885 |
*/
|
886 |
-
public function get_radio( $attributes = '' ){
|
887 |
|
888 |
return $this->generate_radio( $attributes );
|
889 |
}
|
@@ -897,21 +898,21 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
897 |
*
|
898 |
* @return string $container
|
899 |
*/
|
900 |
-
protected function generate_checkbox( $attributes ){
|
901 |
|
902 |
$element = 'rtCheckbox';
|
903 |
-
$html
|
904 |
|
905 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
906 |
-
$html .= $this->container_enclosed_elements( $element, $meta['attrib'], $meta['rtForm_options'] );
|
907 |
|
908 |
-
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
909 |
$html .= $this->generate_element_desc( $attributes );
|
910 |
}
|
911 |
|
912 |
$container = '<span ';
|
913 |
-
if ( isset( $attributes['class'] ) ){
|
914 |
-
$container .= $this->embedd_class( $element, $attributes['class'] );
|
915 |
} else {
|
916 |
$container .= $this->embedd_class( $element );
|
917 |
}
|
@@ -936,7 +937,7 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
936 |
*
|
937 |
* @return string
|
938 |
*/
|
939 |
-
public function get_checkbox( $attributes = '' ){
|
940 |
|
941 |
return $this->generate_checkbox( $attributes );
|
942 |
}
|
@@ -950,9 +951,9 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
950 |
*
|
951 |
* @return string
|
952 |
*/
|
953 |
-
public function get_switch( $attributes = '' ){
|
954 |
|
955 |
-
$attributes['switch'] = true;
|
956 |
|
957 |
return $this->generate_checkbox( $attributes );
|
958 |
}
|
@@ -966,9 +967,9 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
966 |
*
|
967 |
* @return string
|
968 |
*/
|
969 |
-
public function get_switch_square( $attributes = '' ){
|
970 |
|
971 |
-
$attributes['switch_square'] = true;
|
972 |
|
973 |
return $this->generate_checkbox( $attributes );
|
974 |
}
|
@@ -982,48 +983,48 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
982 |
*
|
983 |
* @return string $html
|
984 |
*/
|
985 |
-
protected function generate_select( $attributes ){
|
986 |
|
987 |
-
if ( is_array( $attributes ) ){
|
988 |
$element = 'rtSelect';
|
989 |
-
$html
|
990 |
|
991 |
-
if ( isset( $attributes['id'] ) ){
|
992 |
-
$id = $attributes['id'];
|
993 |
} else {
|
994 |
$id = $element . $this->get_default_id( $element );
|
995 |
$this->update_default_id( $element );
|
996 |
}
|
997 |
$html .= $this->generate_element_id( $element, $id ) . ' ';
|
998 |
-
$multiple = ( isset( $attributes['multiple'] ) && $attributes['multiple'] ) ? true : false;
|
999 |
-
$name
|
1000 |
$html .= $this->generate_element_name( $element, $multiple, $name ) . ' ';
|
1001 |
-
if ( isset( $attributes['class'] ) ){
|
1002 |
-
$html .= $this->embedd_class( $element, $attributes['class'] );
|
1003 |
} else {
|
1004 |
$html .= $this->embedd_class( $element );
|
1005 |
}
|
1006 |
|
1007 |
-
if ( isset( $attributes['misc'] ) ){
|
1008 |
-
$html .= ' ' . $this->embedd_misc_attributes( $attributes['misc'] );
|
1009 |
}
|
1010 |
|
1011 |
$html .= '>';
|
1012 |
|
1013 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
1014 |
-
$html .= $this->container_enclosed_elements( $element, $meta['attrib'], $meta['rtForm_options'] );
|
1015 |
|
1016 |
$html .= '</select>';
|
1017 |
|
1018 |
-
if ( isset( $attributes['label'] ) ){
|
1019 |
-
if ( isset( $attributes['labelClass'] ) ){
|
1020 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'], $attributes['labelClass'] );
|
1021 |
} else {
|
1022 |
-
$html = $this->enclose_label( $element, $html, $attributes['label'] );
|
1023 |
}
|
1024 |
}
|
1025 |
|
1026 |
-
if ( isset( $attributes['show_desc'] ) && $attributes['show_desc'] ){
|
1027 |
$html .= $this->generate_element_desc( $attributes );
|
1028 |
}
|
1029 |
|
@@ -1031,7 +1032,6 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
1031 |
} else {
|
1032 |
throw new rtFormInvalidArgumentsException( 'attributes' );
|
1033 |
}
|
1034 |
-
|
1035 |
}
|
1036 |
|
1037 |
/**
|
@@ -1043,9 +1043,11 @@ if ( ! class_exists( 'rtForm' ) ){
|
|
1043 |
*
|
1044 |
* @return string
|
1045 |
*/
|
1046 |
-
public function get_select( $attributes = '' ){
|
1047 |
|
1048 |
return $this->generate_select( $attributes );
|
1049 |
}
|
|
|
1050 |
}
|
|
|
1051 |
}
|
67 |
*
|
68 |
* @author udit
|
69 |
*/
|
70 |
+
if ( ! class_exists( 'rtForm' ) ) {
|
|
|
71 |
|
72 |
class rtForm {
|
73 |
|
74 |
private $element_id;
|
75 |
+
|
76 |
/**
|
77 |
* default id counts
|
78 |
* if id for any element is not given then these count will be used in id generation
|
88 |
'rtHidden' => 0,
|
89 |
'rtWysiwyg' => 0,
|
90 |
);
|
|
|
91 |
private static $default_classes = array(
|
92 |
+
'rtText' => 'rtm-form-text',
|
93 |
+
'rtNumber' => 'rtm-form-number',
|
94 |
+
'rtDate' => 'rtm-form-date',
|
95 |
+
'rtRadio' => 'rtm-form-radio',
|
96 |
+
'rtCheckbox' => 'rtm-form-checkbox',
|
97 |
+
'rtSelect' => 'rtm-form-select',
|
98 |
+
'rtTextarea' => 'rtm-form-textarea',
|
99 |
+
'rtHidden' => 'rtm-form-hidden',
|
100 |
+
'rtWysiwyg' => 'rtm-form-wysiwyg',
|
101 |
);
|
102 |
|
|
|
103 |
/**
|
104 |
* Get default html id.
|
105 |
*
|
108 |
* @param string $element
|
109 |
*
|
110 |
*/
|
111 |
+
private function get_default_id( $element ) {
|
112 |
return self::$id_counts[ $element ];
|
113 |
}
|
114 |
|
120 |
* @param string $element
|
121 |
*
|
122 |
*/
|
123 |
+
private function update_default_id( $element ) {
|
124 |
self::$id_counts[ $element ] ++;
|
125 |
}
|
126 |
|
132 |
* @param string $element
|
133 |
*
|
134 |
*/
|
135 |
+
private function get_default_class( $element ) {
|
136 |
return self::$default_classes[ $element ];
|
137 |
}
|
138 |
|
|
|
139 |
/**
|
140 |
* Embedd html class to html output.
|
141 |
*
|
146 |
*
|
147 |
* @return string $html
|
148 |
*/
|
149 |
+
private function embedd_class( $element, $class = null ) {
|
150 |
|
151 |
$html = 'class="' . $this->get_default_class( $element );
|
152 |
|
153 |
+
if ( isset( $class ) ) {
|
154 |
|
155 |
+
if ( is_array( $class ) ) {
|
156 |
$html .= ' ' . implode( ' ', $class );
|
157 |
} else {
|
158 |
throw new rtFormInvalidArgumentsException( 'class [' . $element . ']' );
|
173 |
*
|
174 |
* @return string $html
|
175 |
*/
|
176 |
+
private function generate_element_id( $element, $id = null ) {
|
177 |
|
178 |
$html = 'id="';
|
179 |
+
if ( isset( $id ) ) {
|
180 |
$html .= $id . '"';
|
181 |
$this->element_id = $id;
|
182 |
} else {
|
199 |
*
|
200 |
* @return string $html
|
201 |
*/
|
202 |
+
private function generate_element_name( $element, $multiple, $name ) {
|
203 |
|
204 |
$html = 'name="';
|
205 |
+
if ( $multiple ) {
|
206 |
|
207 |
$html .= isset( $name ) ? $name . '[]' : $element . '[]';
|
208 |
|
209 |
// for select - add multiple = multiple
|
210 |
+
if ( 'rtSelect' == $element ) {
|
211 |
$html .= 'multiple = "multiple"';
|
212 |
}
|
213 |
} else {
|
228 |
*
|
229 |
* @return string $html
|
230 |
*/
|
231 |
+
private function generate_element_value( $element, $attributes ) {
|
232 |
|
233 |
$html = '';
|
234 |
switch ( $element ) {
|
236 |
case 'rtNumber': //number
|
237 |
case 'rtText' : //text
|
238 |
$html .= 'value="';
|
239 |
+
$html .= ( isset( $attributes[ 'value' ] ) ) ? $attributes[ 'value' ] : '';
|
240 |
$html .= '" ';
|
241 |
break;
|
242 |
|
243 |
case 'rtTextarea' :
|
244 |
+
/* * textarea
|
245 |
* no process --- handled in between the start tab and end tag.
|
246 |
* <textarea> value </textarea>
|
247 |
*/
|
249 |
|
250 |
case 'rtCheckbox' : //checkbox
|
251 |
case 'rtRadio' : //radio
|
252 |
+
$html .= 'value = "' . $attributes[ 'value' ] . '">';
|
253 |
break;
|
254 |
}
|
255 |
|
265 |
*
|
266 |
* @return string $html
|
267 |
*/
|
268 |
+
private function generate_element_desc( $attributes ) {
|
269 |
|
270 |
+
if ( isset( $attributes[ 'desc' ] ) ) {
|
271 |
|
272 |
+
$html = '<span class="clearfix large-offset-3 description">' . $attributes[ 'desc' ] . '</span>';
|
273 |
|
274 |
return $html;
|
275 |
}
|
286 |
*
|
287 |
* @return string $html
|
288 |
*/
|
289 |
+
private function embedd_misc_attributes( $misc ) {
|
290 |
|
291 |
+
if ( ! is_array( $misc ) ) {
|
292 |
throw new rtFormInvalidArgumentsException( 'attributes : misc' );
|
293 |
|
294 |
return;
|
314 |
*
|
315 |
* @return string $html
|
316 |
*/
|
317 |
+
private function processAttributes( $element, $attributes, $container = false ) {
|
318 |
|
319 |
/* generating the id on its own if not provided otherwise taken from the parameter provided */
|
320 |
+
if ( isset( $attributes[ 'id' ] ) ) {
|
321 |
+
$html = $this->generate_element_id( $element, $attributes[ 'id' ] ) . ' ';
|
322 |
} else {
|
323 |
$html = $this->generate_element_id( $element ) . ' ';
|
324 |
}
|
325 |
|
326 |
/* name attrbute according to multiple flag */
|
327 |
+
$multiple = ( isset( $attributes[ 'multiple' ] ) && $attributes[ 'multiple' ] ) ? true : false;
|
328 |
+
$name = ( isset( $attributes[ 'name' ] ) ) ? $attributes[ 'name' ] : $element;
|
329 |
$html .= $this->generate_element_name( $element, $multiple, $name ) . ' ';
|
330 |
|
331 |
/*
|
332 |
* list down all the classes provided along with the default class of rtForms.
|
333 |
* default class of rtForms will always be attached irrespective of the attributes provided.
|
334 |
*/
|
335 |
+
if ( ! $container ) {
|
336 |
|
337 |
+
if ( isset( $attributes[ 'class' ] ) ) {
|
338 |
+
$html .= $this->embedd_class( $element, $attributes[ 'class' ] );
|
339 |
} else {
|
340 |
$html .= $this->embedd_class( $element );
|
341 |
}
|
342 |
}
|
343 |
|
344 |
+
if ( isset( $attributes[ 'misc' ] ) ) {
|
345 |
+
$html .= ' ' . $this->embedd_misc_attributes( $attributes[ 'misc' ] );
|
346 |
}
|
347 |
|
348 |
$html .= $this->generate_element_value( $element, $attributes );
|
357 |
*
|
358 |
* @param string $element
|
359 |
* @param array $attrib
|
360 |
+
* @param array $rtForm_options
|
361 |
*
|
362 |
* @return string $html
|
363 |
*/
|
364 |
+
private function container_enclosed_elements( $element, $attrib, $rtForm_options ) {
|
365 |
|
366 |
$html = '';
|
367 |
$size = count( $rtForm_options );
|
368 |
+
if ( isset( $attrib[ 'id' ] ) ) {
|
369 |
+
$id = $attrib[ 'id' ];
|
370 |
}
|
371 |
|
372 |
foreach ( $rtForm_options as $opt ) {
|
373 |
|
374 |
+
if ( isset( $attrib[ 'id' ] ) && $size > 1 ) {
|
375 |
+
$attrib[ 'id' ] = $id . '-' . $this->get_default_id( $element );
|
376 |
$this->update_default_id( $element );
|
377 |
}
|
378 |
|
379 |
+
foreach ( ( array ) $opt as $key => $val ) {
|
380 |
|
381 |
+
if ( 'checked' == $key ) {
|
382 |
+
$attrib[ 'checked' ] = $val;
|
383 |
} else {
|
384 |
+
if ( 'selected' == $key ) {
|
385 |
+
$attrib[ 'selected' ] = $val;
|
386 |
} else {
|
387 |
+
if ( 'desc' == $key ) {
|
388 |
+
$attrib[ 'desc' ] = $val;
|
389 |
} else {
|
390 |
+
if ( 'id' == $key ) {
|
391 |
+
$attrib[ 'id' ] = $val;
|
392 |
} else {
|
393 |
+
$attrib[ 'key' ] = $key;
|
394 |
+
$attrib[ 'value' ] = $val;
|
395 |
}
|
396 |
}
|
397 |
}
|
398 |
}
|
399 |
}
|
400 |
|
401 |
+
$checked = ( isset( $attrib[ 'checked' ] ) && $attrib[ 'checked' ] ) ? 'checked=checked' : '';
|
402 |
+
if ( isset( $attrib[ 'switch' ] ) && $attrib[ 'switch' ] ) {
|
403 |
$switch = 'data-toggle="switch"';
|
404 |
} else {
|
405 |
$switch = '';
|
406 |
}
|
407 |
|
408 |
+
$data = '';
|
409 |
switch ( $element ) {
|
410 |
case 'rtRadio' :
|
411 |
$data = '<input type="radio" ' . $checked . ' ';
|
414 |
$data = '<input type="checkbox" ' . $checked . ' ' . $switch . ' ';
|
415 |
break;
|
416 |
case 'rtSelect' :
|
417 |
+
$selected = ( $attrib[ 'selected' ] ) ? 'selected=selected' : '';
|
418 |
+
$data = '<option value="' . $attrib[ 'value' ] . '" ' . $selected . '>' . $attrib[ 'key' ] . '</option>';
|
419 |
break;
|
420 |
}
|
421 |
|
422 |
+
if ( 'rtSelect' != $element ) {
|
423 |
$data .= $this->processAttributes( $element, $attrib, true );
|
424 |
|
425 |
+
// span elements for checkbox on/off switch
|
426 |
+
if ( 'rtCheckbox' == $element ) {
|
427 |
+
$data .= '<span class="switch-label" data-on="On" data-off="Off"></span><span class="switch-handle"></span>';
|
428 |
+
}
|
429 |
|
430 |
+
if ( isset( $attrib[ 'switch_square' ] ) && $attrib[ 'switch_square' ] ) {
|
431 |
|
432 |
+
$data = '<div class="rt-switch switch-square" data-on-label="<i class=\'fui-check\'></i>" data-off-label="<i class=\'fui-cross\'></i>">' . $data . '</div>';
|
433 |
} else {
|
434 |
+
if ( ( isset( $attrib[ 'switch' ] ) && $attrib[ 'switch' ] ) || ( isset( $attrib[ 'switch_square' ] ) && $attrib[ 'switch_square' ] ) ) {
|
435 |
|
436 |
+
$label_class = array( 'switch' );
|
437 |
+
|
438 |
+
$data = $this->enclose_label( $element, $data, $attrib[ 'key' ], $label_class );
|
439 |
+
if ( $size > 1 ) {
|
440 |
+
$data = '<div>' . $data . '</div>';
|
441 |
}
|
442 |
} else {
|
443 |
+
$data = $this->enclose_label( $element, $data, $attrib[ 'key' ] );
|
444 |
}
|
445 |
}
|
446 |
|
447 |
+
$data .= '';
|
448 |
}
|
449 |
|
450 |
$html .= $data;
|
451 |
|
452 |
+
unset( $attrib[ 'id' ] );
|
453 |
+
unset( $attrib[ 'key' ] );
|
454 |
+
unset( $attrib[ 'value' ] );
|
455 |
}
|
456 |
|
457 |
return $html;
|
466 |
* @param array $attributes
|
467 |
*
|
468 |
*/
|
469 |
+
private function parse_multiple_options( $element, $attributes ) {
|
470 |
|
471 |
+
if ( is_array( $attributes ) ) {
|
472 |
|
473 |
+
if ( isset( $attributes[ 'rtForm_options' ] ) && is_array( $attributes[ 'rtForm_options' ] ) ) {
|
474 |
|
475 |
$attribKeys = array_keys( $attributes );
|
476 |
+
$attrib = array();
|
477 |
|
478 |
foreach ( $attribKeys as $key ) {
|
479 |
+
if ( 'rtForm_options' != $key ) {
|
480 |
$attrib[ $key ] = $attributes[ $key ];
|
481 |
}
|
482 |
}
|
483 |
|
484 |
+
$rtForm_options = ( array ) $attributes[ 'rtForm_options' ];
|
485 |
|
486 |
return array( 'attrib' => $attrib, 'rtForm_options' => $rtForm_options, );
|
487 |
} else {
|
504 |
*
|
505 |
* @return string $data
|
506 |
*/
|
507 |
+
protected function enclose_label( $element, $html, $label, $class = false ) {
|
508 |
|
509 |
$labelClass = '';
|
510 |
+
if ( ! empty( $class ) && is_array( $class ) ) {
|
511 |
$labelClass = 'class="' . implode( ' ', $class ) . '"';
|
512 |
}
|
513 |
|
514 |
$data = '<label for="' . $this->element_id . '" ' . $labelClass . '>';
|
515 |
|
516 |
+
if ( 'rtRadio' == $element || 'rtCheckbox' == $element ) {
|
517 |
$data .= $html . ' ' . $label;
|
518 |
} else {
|
519 |
$data .= $label . ' ' . $html;
|
533 |
*
|
534 |
* @return string $html
|
535 |
*/
|
536 |
+
protected function generate_textbox( $attributes ) {
|
537 |
|
538 |
$element = 'rtText';
|
539 |
+
if ( is_array( $attributes ) ) {
|
540 |
|
541 |
/* Starting the input tag */
|
542 |
$html = '<input type="text" ';
|
547 |
/* ending the tag */
|
548 |
$html .= ' />';
|
549 |
|
550 |
+
if ( isset( $attributes[ 'label' ] ) ) {
|
551 |
+
if ( isset( $attributes[ 'labelClass' ] ) ) {
|
552 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ], $attributes[ 'labelClass' ] );
|
553 |
} else {
|
554 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ] );
|
555 |
}
|
556 |
}
|
557 |
|
558 |
+
if ( isset( $attributes[ 'show_desc' ] ) && $attributes[ 'show_desc' ] ) {
|
559 |
$html .= $this->generate_element_desc( $attributes );
|
560 |
}
|
561 |
|
574 |
*
|
575 |
* @return string
|
576 |
*/
|
577 |
+
public function get_textbox( $attributes = '' ) {
|
578 |
|
579 |
return $this->generate_textbox( $attributes );
|
580 |
}
|
588 |
*
|
589 |
* @return string $html
|
590 |
*/
|
591 |
+
protected function generate_number( $attributes ) {
|
592 |
|
593 |
$element = 'rtNumber';
|
594 |
+
if ( is_array( $attributes ) ) {
|
595 |
|
596 |
/* Starting the input tag */
|
597 |
$html = '<input type="number" ';
|
598 |
|
599 |
/* generating attributes */
|
600 |
$html .= $this->processAttributes( $element, $attributes );
|
601 |
+
if ( isset( $attributes[ 'min' ] ) ) {
|
602 |
+
$html .= " min='" . $attributes[ 'min' ] . "' ";
|
603 |
}
|
604 |
+
if ( isset( $attributes[ 'max' ] ) ) {
|
605 |
+
$html .= " max='" . $attributes[ 'max' ] . "' ";
|
606 |
}
|
607 |
+
if ( isset( $attributes[ 'step' ] ) ) {
|
608 |
+
$html .= " step='" . $attributes[ 'step' ] . "' ";
|
609 |
}
|
610 |
|
611 |
/* ending the tag */
|
612 |
$html .= ' />';
|
613 |
|
614 |
+
if ( isset( $attributes[ 'label' ] ) ) {
|
615 |
+
if ( isset( $attributes[ 'labelClass' ] ) ) {
|
616 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ], $attributes[ 'labelClass' ] );
|
617 |
} else {
|
618 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ] );
|
619 |
}
|
620 |
}
|
621 |
|
622 |
+
if ( isset( $attributes[ 'show_desc' ] ) && $attributes[ 'show_desc' ] ) {
|
623 |
$html .= $this->generate_element_desc( $attributes );
|
624 |
}
|
625 |
|
638 |
*
|
639 |
* @return string
|
640 |
*/
|
641 |
+
public function get_number( $attributes = '' ) {
|
642 |
|
643 |
return $this->generate_number( $attributes );
|
644 |
}
|
652 |
*
|
653 |
* @return string $html
|
654 |
*/
|
655 |
+
protected function generate_date( $attributes ) {
|
656 |
|
657 |
$element = 'rtDate';
|
658 |
+
if ( is_array( $attributes ) ) {
|
659 |
$html = '<input type="date" ';
|
660 |
|
661 |
$html .= $this->processAttributes( $element, $attributes );
|
662 |
|
663 |
$html .= ' />';
|
664 |
|
665 |
+
if ( isset( $attributes[ 'label' ] ) ) {
|
666 |
+
if ( isset( $attributes[ 'labelClass' ] ) ) {
|
667 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ], $attributes[ 'labelClass' ] );
|
668 |
} else {
|
669 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ] );
|
670 |
}
|
671 |
}
|
672 |
|
673 |
+
if ( isset( $attributes[ 'show_desc' ] ) && $attributes[ 'desc' ] ) {
|
674 |
$html .= $this->generate_element_desc( $attributes );
|
675 |
}
|
676 |
|
689 |
*
|
690 |
* @return string
|
691 |
*/
|
692 |
+
public function get_date( $attributes ) {
|
693 |
return $this->generate_date( $attributes );
|
694 |
}
|
695 |
|
702 |
*
|
703 |
* @return string $html
|
704 |
*/
|
705 |
+
protected function generate_hidden( $attributes ) {
|
706 |
|
707 |
$element = 'rtHidden';
|
708 |
+
if ( is_array( $attributes ) ) {
|
709 |
|
710 |
/* Starting the input tag */
|
711 |
$html = '<input type="hidden" ';
|
716 |
/* ending the tag */
|
717 |
$html .= ' />';
|
718 |
|
719 |
+
if ( isset( $attributes[ 'label' ] ) ) {
|
720 |
+
if ( isset( $attributes[ 'labelClass' ] ) ) {
|
721 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ], $attributes[ 'labelClass' ] );
|
722 |
} else {
|
723 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ] );
|
724 |
}
|
725 |
}
|
726 |
|
727 |
+
if ( isset( $attributes[ 'show_desc' ] ) && $attributes[ 'show_desc' ] ) {
|
728 |
$html .= $this->generate_element_desc( $attributes );
|
729 |
}
|
730 |
|
743 |
*
|
744 |
* @return string
|
745 |
*/
|
746 |
+
public function get_hidden( $attributes = '' ) {
|
747 |
|
748 |
return $this->generate_hidden( $attributes );
|
749 |
}
|
757 |
*
|
758 |
* @return string $html
|
759 |
*/
|
760 |
+
protected function generate_textarea( $attributes ) {
|
761 |
|
762 |
$element = 'rtTextarea';
|
763 |
+
if ( is_array( $attributes ) ) {
|
764 |
|
765 |
$html = '<textarea ';
|
766 |
$html .= $this->processAttributes( $element, $attributes );
|
767 |
$html .= '>';
|
768 |
|
769 |
+
$html .= ( isset( $attributes[ 'value' ] ) ) ? $attributes[ 'value' ] : '';
|
770 |
|
771 |
$html .= '</textarea>';
|
772 |
|
773 |
+
if ( isset( $attributes[ 'label' ] ) ) {
|
774 |
+
if ( isset( $attributes[ 'labelClass' ] ) ) {
|
775 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ], $attributes[ 'labelClass' ] );
|
776 |
} else {
|
777 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ] );
|
778 |
}
|
779 |
}
|
780 |
|
781 |
+
if ( isset( $attributes[ 'show_desc' ] ) && $attributes[ 'show_desc' ] ) {
|
782 |
$html .= $this->generate_element_desc( $attributes );
|
783 |
}
|
784 |
|
797 |
*
|
798 |
* @return string
|
799 |
*/
|
800 |
+
public function get_textarea( $attributes = '' ) {
|
801 |
|
802 |
return $this->generate_textarea( $attributes );
|
803 |
}
|
804 |
|
|
|
|
|
805 |
/* wysiwyg
|
806 |
*
|
807 |
* pending as of now.
|
845 |
*
|
846 |
* @return string $container
|
847 |
*/
|
848 |
+
protected function generate_radio( $attributes ) {
|
849 |
|
850 |
$element = 'rtRadio';
|
851 |
+
$html = '';
|
852 |
|
853 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
854 |
+
$html .= $this->container_enclosed_elements( $element, $meta[ 'attrib' ], $meta[ 'rtForm_options' ] );
|
855 |
|
856 |
+
if ( isset( $attributes[ 'show_desc' ] ) && $attributes[ 'show_desc' ] ) {
|
857 |
$html .= $this->generate_element_desc( $attributes );
|
858 |
}
|
859 |
|
860 |
$container = '<span ';
|
861 |
+
if ( isset( $attributes[ 'class' ] ) ) {
|
862 |
+
$container .= $this->embedd_class( $element, $attributes[ 'class' ] );
|
863 |
} else {
|
864 |
$container .= $this->embedd_class( $element );
|
865 |
}
|
884 |
*
|
885 |
* @return string
|
886 |
*/
|
887 |
+
public function get_radio( $attributes = '' ) {
|
888 |
|
889 |
return $this->generate_radio( $attributes );
|
890 |
}
|
898 |
*
|
899 |
* @return string $container
|
900 |
*/
|
901 |
+
protected function generate_checkbox( $attributes ) {
|
902 |
|
903 |
$element = 'rtCheckbox';
|
904 |
+
$html = '';
|
905 |
|
906 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
907 |
+
$html .= $this->container_enclosed_elements( $element, $meta[ 'attrib' ], $meta[ 'rtForm_options' ] );
|
908 |
|
909 |
+
if ( isset( $attributes[ 'show_desc' ] ) && $attributes[ 'show_desc' ] ) {
|
910 |
$html .= $this->generate_element_desc( $attributes );
|
911 |
}
|
912 |
|
913 |
$container = '<span ';
|
914 |
+
if ( isset( $attributes[ 'class' ] ) ) {
|
915 |
+
$container .= $this->embedd_class( $element, $attributes[ 'class' ] );
|
916 |
} else {
|
917 |
$container .= $this->embedd_class( $element );
|
918 |
}
|
937 |
*
|
938 |
* @return string
|
939 |
*/
|
940 |
+
public function get_checkbox( $attributes = '' ) {
|
941 |
|
942 |
return $this->generate_checkbox( $attributes );
|
943 |
}
|
951 |
*
|
952 |
* @return string
|
953 |
*/
|
954 |
+
public function get_switch( $attributes = '' ) {
|
955 |
|
956 |
+
$attributes[ 'switch' ] = true;
|
957 |
|
958 |
return $this->generate_checkbox( $attributes );
|
959 |
}
|
967 |
*
|
968 |
* @return string
|
969 |
*/
|
970 |
+
public function get_switch_square( $attributes = '' ) {
|
971 |
|
972 |
+
$attributes[ 'switch_square' ] = true;
|
973 |
|
974 |
return $this->generate_checkbox( $attributes );
|
975 |
}
|
983 |
*
|
984 |
* @return string $html
|
985 |
*/
|
986 |
+
protected function generate_select( $attributes ) {
|
987 |
|
988 |
+
if ( is_array( $attributes ) ) {
|
989 |
$element = 'rtSelect';
|
990 |
+
$html = '<select ';
|
991 |
|
992 |
+
if ( isset( $attributes[ 'id' ] ) ) {
|
993 |
+
$id = $attributes[ 'id' ];
|
994 |
} else {
|
995 |
$id = $element . $this->get_default_id( $element );
|
996 |
$this->update_default_id( $element );
|
997 |
}
|
998 |
$html .= $this->generate_element_id( $element, $id ) . ' ';
|
999 |
+
$multiple = ( isset( $attributes[ 'multiple' ] ) && $attributes[ 'multiple' ] ) ? true : false;
|
1000 |
+
$name = ( isset( $attributes[ 'name' ] ) ) ? $attributes[ 'name' ] : $element;
|
1001 |
$html .= $this->generate_element_name( $element, $multiple, $name ) . ' ';
|
1002 |
+
if ( isset( $attributes[ 'class' ] ) ) {
|
1003 |
+
$html .= $this->embedd_class( $element, $attributes[ 'class' ] );
|
1004 |
} else {
|
1005 |
$html .= $this->embedd_class( $element );
|
1006 |
}
|
1007 |
|
1008 |
+
if ( isset( $attributes[ 'misc' ] ) ) {
|
1009 |
+
$html .= ' ' . $this->embedd_misc_attributes( $attributes[ 'misc' ] );
|
1010 |
}
|
1011 |
|
1012 |
$html .= '>';
|
1013 |
|
1014 |
$meta = $this->parse_multiple_options( $element, $attributes );
|
1015 |
+
$html .= $this->container_enclosed_elements( $element, $meta[ 'attrib' ], $meta[ 'rtForm_options' ] );
|
1016 |
|
1017 |
$html .= '</select>';
|
1018 |
|
1019 |
+
if ( isset( $attributes[ 'label' ] ) ) {
|
1020 |
+
if ( isset( $attributes[ 'labelClass' ] ) ) {
|
1021 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ], $attributes[ 'labelClass' ] );
|
1022 |
} else {
|
1023 |
+
$html = $this->enclose_label( $element, $html, $attributes[ 'label' ] );
|
1024 |
}
|
1025 |
}
|
1026 |
|
1027 |
+
if ( isset( $attributes[ 'show_desc' ] ) && $attributes[ 'show_desc' ] ) {
|
1028 |
$html .= $this->generate_element_desc( $attributes );
|
1029 |
}
|
1030 |
|
1032 |
} else {
|
1033 |
throw new rtFormInvalidArgumentsException( 'attributes' );
|
1034 |
}
|
|
|
1035 |
}
|
1036 |
|
1037 |
/**
|
1043 |
*
|
1044 |
* @return string
|
1045 |
*/
|
1046 |
+
public function get_select( $attributes = '' ) {
|
1047 |
|
1048 |
return $this->generate_select( $attributes );
|
1049 |
}
|
1050 |
+
|
1051 |
}
|
1052 |
+
|
1053 |
}
|
app/importers/BPMediaAlbumimporter.php
CHANGED
@@ -12,17 +12,17 @@
|
|
12 |
*/
|
13 |
class BPMediaAlbumimporter extends BPMediaImporter {
|
14 |
|
15 |
-
function __construct(){
|
16 |
global $wpdb;
|
17 |
parent::__construct();
|
18 |
$table = "{$wpdb->base_prefix}bp_album";
|
19 |
-
if ( BPMediaImporter::table_exists( $table ) && BPMediaAlbumimporter::_active( 'bp-album/loader.php' ) != - 1 && ! $this->column_exists( 'import_status' ) ){
|
20 |
$this->update_table();
|
21 |
}
|
22 |
}
|
23 |
|
24 |
-
function update_table(){
|
25 |
-
if ( $this->column_exists( 'import_status' ) ){
|
26 |
return;
|
27 |
}
|
28 |
global $wpdb;
|
@@ -34,20 +34,20 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
34 |
ADD COLUMN favorites TINYINT (1) NOT NULL DEFAULT 0" );
|
35 |
}
|
36 |
|
37 |
-
function column_exists( $column ){
|
38 |
global $wpdb;
|
39 |
|
40 |
return $wpdb->query( "SHOW COLUMNS FROM {$wpdb->base_prefix}bp_album LIKE '$column'" );
|
41 |
}
|
42 |
|
43 |
-
function ui(){
|
44 |
global $wpdb;
|
45 |
$bp_album_active = BPMediaImporter::_active( 'bp-album/loader.php' );
|
46 |
-
$table
|
47 |
-
if ( BPMediaImporter::table_exists( $table ) ){
|
48 |
|
49 |
$this->progress = new rtProgress();
|
50 |
-
$total
|
51 |
// print_r($total);
|
52 |
$remaining_comments = $this->get_remaining_comments();
|
53 |
// print_r($remaining_comments);
|
@@ -57,16 +57,16 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
57 |
// print_R($finished_users);
|
58 |
$finished_comments = $this->get_finished_comments();
|
59 |
// print_r($finished_comments);
|
60 |
-
$total_comments = (int) $finished_comments + (int) $remaining_comments;
|
61 |
// print_r($total_comments);
|
62 |
-
$completed_users_favorites = (int) get_site_option( 'bp_media_bp_album_favorite_import_status', 0 );
|
63 |
// print_r($completed_users_favorites);
|
64 |
$users = count_users();
|
65 |
// print_r($users);
|
66 |
|
67 |
echo '<div id="bpmedia-bpalbumimporter">';
|
68 |
-
if ( ( $finished[0]->media != $total[0]->media ) || ( $users['total_users'] > $completed_users_favorites ) ){
|
69 |
-
if ( 1 != $bp_album_active ){
|
70 |
echo '<div id="setting-error-bp-album-importer" class="error settings-error below-h2">
|
71 |
<p><strong>' . __( 'Warning!', 'rtmedia' ) . '</strong> ' . sprintf( __( 'This import process is irreversible. Although everything is tested, please take a <a target="_blank" href="http://codex.wordpress.org/WordPress_Backups">backup of your database and files</a>, before proceeding. If you don\'t know your way around databases and files, consider <a target="_blank" href="%s">hiring us</a>, or another professional.', 'rtmedia' ), 'http://rtcamp.com/contact/?purpose=buddypress&utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media' ) . '</p>';
|
72 |
echo '<p>' . __( 'If you have set "WP_DEBUG" in you wp-config.php file, please make sure it is set to "false", so that it doesn\'t conflict with the import process.', 'rtmedia' ) . '</p></div>';
|
@@ -77,26 +77,26 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
77 |
echo '<div class="bp-album-importer-wizard">';
|
78 |
echo '<div class="bp-album-users">';
|
79 |
echo '<strong>';
|
80 |
-
echo __( 'Users', 'rtmedia' ) . ': <span class="finished">' . $finished_users[0]->users . '</span> / <span class="total">' . $total[0]->users . '</span>';
|
81 |
echo '</strong>';
|
82 |
-
if ( 0 != $total[0]->users ){
|
83 |
-
$users_progress = $this->progress->progress( $finished_users[0]->users, $total[0]->users );
|
84 |
$this->progress->progress_ui( $users_progress );
|
85 |
}
|
86 |
echo '</div>';
|
87 |
echo '<br />';
|
88 |
echo '<div class="bp-album-media">';
|
89 |
echo '<strong>';
|
90 |
-
echo __( 'Media', 'rtmedia' ) . ': <span class="finished">' . $finished[0]->media . '</span> / <span class="total">' . $total[0]->media . '</span>';
|
91 |
echo '</strong>';
|
92 |
$progress = 100;
|
93 |
-
if ( 0 != $total[0]->media ){
|
94 |
-
$todo
|
95 |
-
$steps
|
96 |
$laststep = $todo % 5;
|
97 |
-
$progress = $this->progress->progress( $finished[0]->media, $total[0]->media );
|
98 |
-
echo '<input type="hidden" value="' . $finished[0]->media . '" name="finished"/>';
|
99 |
-
echo '<input type="hidden" value="' . $total[0]->media . '" name="total"/>';
|
100 |
echo '<input type="hidden" value="' . $todo . '" name="todo"/>';
|
101 |
echo '<input type="hidden" value="' . $steps . '" name="steps"/>';
|
102 |
echo '<input type="hidden" value="' . $laststep . '" name="laststep"/>';
|
@@ -105,7 +105,7 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
105 |
echo '</div>';
|
106 |
echo '<br>';
|
107 |
echo '<div class="bp-album-comments">';
|
108 |
-
if ( 0 != $total_comments ){
|
109 |
echo '<strong>';
|
110 |
echo __( 'Comments', 'rtmedia' ) . ': <span class="finished">' . $finished_comments . '</span> / <span class="total">' . $total_comments . '</span>';
|
111 |
echo '</strong>';
|
@@ -116,13 +116,13 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
116 |
echo '<p><strong>' . __( 'Comments: 0/0 (No comments to import)', 'rtmedia' ) . '</strong></p>';
|
117 |
}
|
118 |
echo '</div>';
|
119 |
-
if ( 0 != $completed_users_favorites ){
|
120 |
echo '<br />';
|
121 |
echo '<div class="bp-album-favorites">';
|
122 |
echo '<strong>';
|
123 |
-
echo __( 'User\'s Favorites', 'rtmedia' ) . ': <span class="finished">' . $completed_users_favorites . '</span> / <span class="total">' . $users['total_users'] . '</span>';
|
124 |
echo '</strong>';
|
125 |
-
$favorites_progress = $this->progress->progress( $completed_users_favorites, $users['total_users'] );
|
126 |
$this->progress->progress_ui( $favorites_progress );
|
127 |
echo '</div>';
|
128 |
}
|
@@ -134,7 +134,7 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
134 |
}
|
135 |
} else {
|
136 |
$corrupt_media = BPMediaAlbumimporter::get_corrupt_media();
|
137 |
-
if ( $corrupt_media ){
|
138 |
echo '<div class="error below-h2">';
|
139 |
echo '<p><strong>' . __( 'Some of the media failed to import. The file might be corrupt or deleted.', 'rtmedia' ) . '</strong></p>';
|
140 |
echo '<p>' . sprintf( __( 'The following %d BP Album Media id\'s could not be imported', 'rtmedia' ), count( $corrupt_media ) ) . ': </p>';
|
@@ -165,17 +165,17 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
165 |
echo '<br />';
|
166 |
echo '<strong>' . __( 'Why don\'t you try adding some instagram like effects to your images?', 'rtmedia' ) . '</strong>';
|
167 |
echo '<div class="bp-media-addon">
|
168 |
-
<a href="http://rtcamp.com/
|
169 |
<img width="240" height="184" title="BuddyPress-Media Instagram" alt="BuddyPress-Media Instagram" src="' . $img_src . 'BuddyPressMedia-Instagram.png?ref=bp-album-importer">
|
170 |
</a>
|
171 |
-
<h4><a href="http://rtcamp.com/
|
172 |
<div class="product_desc">
|
173 |
<p>' . __( 'BuddyPress Media Instagram adds Instagram like filters to images uploaded with BuddyPress Media.', 'rtmedia' ) . '</p>
|
174 |
<p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>
|
175 |
</div>
|
176 |
<div class="product_footer">
|
177 |
<span class="price alignleft"><span class="amount">$19</span></span>
|
178 |
-
<a class="add_to_cart_button alignright product_type_simple" href="http://rtcamp.com/
|
179 |
<a class="alignleft product_demo_link" href="http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">' . __( 'Live Demo', 'rtmedia' ) . '</a>
|
180 |
</div></div>';
|
181 |
}
|
@@ -186,44 +186,44 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
186 |
}
|
187 |
}
|
188 |
|
189 |
-
function create_album( $author_id, $album_name = 'Imported Media' ){
|
190 |
global $bp_media, $wpdb;
|
191 |
|
192 |
-
if ( array_key_exists( 'bp_album_import_name', $bp_media->options ) ){
|
193 |
-
if ( '' != $bp_media->options['bp_album_import_name'] ){
|
194 |
-
$album_name = $bp_media->options['bp_album_import_name'];
|
195 |
}
|
196 |
}
|
197 |
|
198 |
-
$query
|
199 |
$result = $wpdb->get_results( $query );
|
200 |
-
if ( count( $result ) < 1 ){
|
201 |
$album = new BPMediaAlbum();
|
202 |
$album->add_album( $album_name, $author_id );
|
203 |
$album_id = $album->get_id();
|
204 |
} else {
|
205 |
-
$album_id = $result[0]->ID;
|
206 |
}
|
207 |
$wpdb->update( $wpdb->base_prefix . 'bp_activity', array( 'secondary_item_id' => - 999 ), array( 'id' => get_post_meta( $album_id, 'bp_media_child_activity', true ) ) );
|
208 |
|
209 |
return $album_id;
|
210 |
}
|
211 |
|
212 |
-
static function get_total_count(){
|
213 |
global $wpdb;
|
214 |
$table = $wpdb->base_prefix . 'bp_album';
|
215 |
-
if ( BPMediaAlbumimporter::table_exists( $table ) ){
|
216 |
return $wpdb->get_results( "SELECT COUNT(DISTINCT owner_id) as users, COUNT(id) as media FROM $table" );
|
217 |
}
|
218 |
|
219 |
return 0;
|
220 |
}
|
221 |
|
222 |
-
function get_remaining_comments(){
|
223 |
global $wpdb;
|
224 |
$bp_album_table = $wpdb->base_prefix . 'bp_album';
|
225 |
$activity_table = $wpdb->base_prefix . 'bp_activity';
|
226 |
-
if ( $this->table_exists( $bp_album_table ) ){
|
227 |
return $wpdb->get_var( "SELECT SUM( b.count ) AS total
|
228 |
FROM (
|
229 |
SELECT (
|
@@ -244,11 +244,11 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
244 |
return 0;
|
245 |
}
|
246 |
|
247 |
-
function get_finished_comments(){
|
248 |
global $wpdb;
|
249 |
$bp_album_table = $wpdb->base_prefix . 'bp_album';
|
250 |
$activity_table = $wpdb->base_prefix . 'bp_activity';
|
251 |
-
if ( $this->table_exists( $bp_album_table ) ){
|
252 |
return $wpdb->get_var( "SELECT COUNT( activity.id ) AS count
|
253 |
FROM $activity_table AS activity
|
254 |
INNER JOIN $bp_album_table AS album ON ( activity.item_id = album.import_status )
|
@@ -259,10 +259,10 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
259 |
return 0;
|
260 |
}
|
261 |
|
262 |
-
static function get_completed_users(){
|
263 |
global $wpdb;
|
264 |
$table = $wpdb->base_prefix . 'bp_album';
|
265 |
-
if ( BPMediaAlbumimporter::table_exists( $table ) ){
|
266 |
return $wpdb->get_results( "SELECT COUNT( DISTINCT owner_id ) AS users
|
267 |
FROM $table
|
268 |
WHERE owner_id NOT
|
@@ -277,62 +277,62 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
277 |
return 0;
|
278 |
}
|
279 |
|
280 |
-
static function get_completed_media(){
|
281 |
global $wpdb;
|
282 |
$table = $wpdb->base_prefix . 'bp_album';
|
283 |
-
if ( BPMediaAlbumimporter::table_exists( $table ) ){
|
284 |
return $wpdb->get_results( "SELECT COUNT(id) as media FROM $table WHERE import_status!=0" );
|
285 |
}
|
286 |
|
287 |
return 0;
|
288 |
}
|
289 |
|
290 |
-
static function get_corrupt_media(){
|
291 |
global $wpdb;
|
292 |
$table = $wpdb->base_prefix . 'bp_album';
|
293 |
-
if ( BPMediaAlbumimporter::table_exists( $table ) ){
|
294 |
return $wpdb->get_results( "SELECT id,title,pic_org_url FROM $table WHERE import_status=-1" );
|
295 |
}
|
296 |
|
297 |
return 0;
|
298 |
}
|
299 |
|
300 |
-
static function batch_import( $count = 5 ){
|
301 |
global $wpdb;
|
302 |
-
$table
|
303 |
$bp_album_data = $wpdb->get_results( "SELECT * FROM $table WHERE import_status = 0 ORDER BY owner_id LIMIT $count" );
|
304 |
|
305 |
return $bp_album_data;
|
306 |
}
|
307 |
|
308 |
-
static function bpmedia_ajax_import_callback(){
|
309 |
|
310 |
-
$page
|
311 |
-
$count
|
312 |
$bp_album_data = BPMediaAlbumimporter::batch_import( $count );
|
313 |
global $wpdb;
|
314 |
-
$table
|
315 |
-
$activity_table
|
316 |
$activity_meta_table = $wpdb->base_prefix . 'bp_activity_meta';
|
317 |
-
$comments
|
318 |
foreach ( $bp_album_data as &$bp_album_item ) {
|
319 |
|
320 |
-
if ( get_site_option( 'bp_media_bp_album_importer_base_path' ) == '' ){
|
321 |
$base_path = pathinfo( $bp_album_item->pic_org_path );
|
322 |
-
update_site_option( 'bp_media_bp_album_importer_base_path', $base_path['dirname'] );
|
323 |
}
|
324 |
$bpm_host_wp = new BPMediaHostWordpress();
|
325 |
$bpm_host_wp->check_and_create_album( 0, 0, $bp_album_item->owner_id );
|
326 |
-
$album_id
|
327 |
$imported_media_id = BPMediaImporter::add_media( $album_id, $bp_album_item->title, $bp_album_item->description, $bp_album_item->pic_org_path, $bp_album_item->privacy, $bp_album_item->owner_id, 'Imported Media' );
|
328 |
$wpdb->update( $table, array( 'import_status' => ( $imported_media_id ) ? $imported_media_id : - 1 ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
329 |
-
if ( $imported_media_id ){
|
330 |
-
$comments += (int) BPMediaAlbumimporter::update_recorded_time_and_comments( $imported_media_id, $bp_album_item->id, "{$wpdb->base_prefix}bp_album" );
|
331 |
$bp_album_media_id = $wpdb->get_var( "SELECT activity.id from $activity_table as activity INNER JOIN $table as album ON ( activity.item_id = album.id ) WHERE activity.item_id = $bp_album_item->id AND activity.component = 'album' AND activity.type='bp_album_picture'" );
|
332 |
$wpdb->update( $table, array( 'old_activity_id' => $bp_album_media_id ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
333 |
$bp_new_activity_id = $wpdb->get_var( "SELECT id from $activity_table WHERE item_id = $imported_media_id AND component = 'activity' AND type='activity_update' AND secondary_item_id=0" );
|
334 |
$wpdb->update( $table, array( 'new_activity_id' => $bp_new_activity_id ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
335 |
-
if ( $wpdb->update( $activity_meta_table, array( 'activity_id' => $bp_new_activity_id ), array( 'activity_id' => $bp_album_media_id, 'meta_key' => 'favorite_count' ), array( '%d' ), array( '%d' ) ) ){
|
336 |
$wpdb->update( $table, array( 'favorites' => 1 ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
337 |
}
|
338 |
}
|
@@ -340,37 +340,37 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
340 |
|
341 |
$finished_users = BPMediaAlbumimporter::get_completed_users();
|
342 |
|
343 |
-
echo json_encode( array( 'page' => $page, 'users' => $finished_users[0]->users, 'comments' => $comments ) );
|
344 |
die();
|
345 |
}
|
346 |
|
347 |
-
static function bpmedia_ajax_import_favorites(){
|
348 |
global $wpdb;
|
349 |
$table = $wpdb->base_prefix . 'bp_album';
|
350 |
$users = count_users();
|
351 |
-
echo json_encode( array( 'favorites' => $wpdb->get_var( "SELECT COUNT(id) from $table WHERE favorites != 0" ), 'users' => $users['total_users'], 'offset' => (int) get_site_option( 'bp_media_bp_album_favorite_import_status', 0 ) ) );
|
352 |
die();
|
353 |
}
|
354 |
|
355 |
-
static function bpmedia_ajax_import_step_favorites(){
|
356 |
-
$offset
|
357 |
-
$redirect = isset( $_POST['redirect'] ) ? $_POST['redirect'] : false;
|
358 |
global $wpdb;
|
359 |
-
$table
|
360 |
$blogusers = get_users( array( 'meta_key' => 'bp_favorite_activities', 'offset' => $offset, 'number' => 1 ) );
|
361 |
-
if ( $blogusers ){
|
362 |
foreach ( $blogusers as $user ) {
|
363 |
$favorite_activities = get_user_meta( $user->ID, 'bp_favorite_activities', true );
|
364 |
-
if ( $favorite_activities ){
|
365 |
$new_favorite_activities = $favorite_activities;
|
366 |
foreach ( $favorite_activities as $key => $favorite ) {
|
367 |
-
if ( $new_act = $wpdb->get_var( "SELECT new_activity_id from $table WHERE old_activity_id = $favorite" ) ){
|
368 |
$new_favorite_activities[ $key ] = $new_act;
|
369 |
}
|
370 |
}
|
371 |
update_user_meta( $user->ID, 'bp_favorite_activities', $new_favorite_activities );
|
372 |
}
|
373 |
-
$completed_users_favorites = (int) get_site_option( 'bp_media_bp_album_favorite_import_status', 0 ) + 1;
|
374 |
update_site_option( 'bp_media_bp_album_favorite_import_status', $completed_users_favorites );
|
375 |
}
|
376 |
}
|
@@ -378,18 +378,18 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
378 |
die();
|
379 |
}
|
380 |
|
381 |
-
static function cleanup_after_install(){
|
382 |
global $wpdb;
|
383 |
$table = $wpdb->base_prefix . 'bp_album';
|
384 |
-
$dir
|
385 |
BPMediaImporter::cleanup( $table, $dir );
|
386 |
die();
|
387 |
}
|
388 |
|
389 |
-
static function update_recorded_time_and_comments( $media, $bp_album_id, $table ){
|
390 |
global $wpdb;
|
391 |
-
if ( function_exists( 'bp_activity_add' ) ){
|
392 |
-
if ( ! is_object( $media ) ){
|
393 |
try {
|
394 |
$media = new BPMediaHostWordpress( $media );
|
395 |
} catch ( exception $e ) {
|
@@ -397,15 +397,15 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
397 |
}
|
398 |
}
|
399 |
$activity_id = get_post_meta( $media->get_id(), 'bp_media_child_activity', true );
|
400 |
-
if ( $activity_id ){
|
401 |
-
$date_uploaded
|
402 |
$old_activity_id = $wpdb->get_var( "SELECT id from {$wpdb->base_prefix}bp_activity WHERE component = 'album' AND type = 'bp_album_picture' AND item_id = $bp_album_id" );
|
403 |
-
if ( $old_activity_id ){
|
404 |
$comments = $wpdb->get_results( "SELECT id,secondary_item_id from {$wpdb->base_prefix}bp_activity WHERE component = 'activity' AND type = 'activity_comment' AND item_id = $old_activity_id" );
|
405 |
foreach ( $comments as $comment ) {
|
406 |
$update = array( 'item_id' => $activity_id );
|
407 |
-
if ( $comment->secondary_item_id == $old_activity_id ){
|
408 |
-
$update['secondary_item_id'] = $activity_id;
|
409 |
}
|
410 |
$wpdb->update( $wpdb->base_prefix . 'bp_activity', $update, array( 'id' => $comment->id ) );
|
411 |
BP_Activity_Activity::rebuild_activity_comment_tree( $activity_id );
|
@@ -420,7 +420,7 @@ class BPMediaAlbumimporter extends BPMediaImporter {
|
|
420 |
}
|
421 |
}
|
422 |
|
423 |
-
static function bp_album_deactivate(){
|
424 |
deactivate_plugins( 'bp-album/loader.php' );
|
425 |
die( true );
|
426 |
}
|
12 |
*/
|
13 |
class BPMediaAlbumimporter extends BPMediaImporter {
|
14 |
|
15 |
+
function __construct() {
|
16 |
global $wpdb;
|
17 |
parent::__construct();
|
18 |
$table = "{$wpdb->base_prefix}bp_album";
|
19 |
+
if ( BPMediaImporter::table_exists( $table ) && BPMediaAlbumimporter::_active( 'bp-album/loader.php' ) != - 1 && ! $this->column_exists( 'import_status' ) ) {
|
20 |
$this->update_table();
|
21 |
}
|
22 |
}
|
23 |
|
24 |
+
function update_table() {
|
25 |
+
if ( $this->column_exists( 'import_status' ) ) {
|
26 |
return;
|
27 |
}
|
28 |
global $wpdb;
|
34 |
ADD COLUMN favorites TINYINT (1) NOT NULL DEFAULT 0" );
|
35 |
}
|
36 |
|
37 |
+
function column_exists( $column ) {
|
38 |
global $wpdb;
|
39 |
|
40 |
return $wpdb->query( "SHOW COLUMNS FROM {$wpdb->base_prefix}bp_album LIKE '$column'" );
|
41 |
}
|
42 |
|
43 |
+
function ui() {
|
44 |
global $wpdb;
|
45 |
$bp_album_active = BPMediaImporter::_active( 'bp-album/loader.php' );
|
46 |
+
$table = "{$wpdb->base_prefix}bp_album";
|
47 |
+
if ( BPMediaImporter::table_exists( $table ) ) {
|
48 |
|
49 |
$this->progress = new rtProgress();
|
50 |
+
$total = BPMediaAlbumimporter::get_total_count();
|
51 |
// print_r($total);
|
52 |
$remaining_comments = $this->get_remaining_comments();
|
53 |
// print_r($remaining_comments);
|
57 |
// print_R($finished_users);
|
58 |
$finished_comments = $this->get_finished_comments();
|
59 |
// print_r($finished_comments);
|
60 |
+
$total_comments = ( int ) $finished_comments + ( int ) $remaining_comments;
|
61 |
// print_r($total_comments);
|
62 |
+
$completed_users_favorites = ( int ) get_site_option( 'bp_media_bp_album_favorite_import_status', 0 );
|
63 |
// print_r($completed_users_favorites);
|
64 |
$users = count_users();
|
65 |
// print_r($users);
|
66 |
|
67 |
echo '<div id="bpmedia-bpalbumimporter">';
|
68 |
+
if ( ( $finished[ 0 ]->media != $total[ 0 ]->media ) || ( $users[ 'total_users' ] > $completed_users_favorites ) ) {
|
69 |
+
if ( 1 != $bp_album_active ) {
|
70 |
echo '<div id="setting-error-bp-album-importer" class="error settings-error below-h2">
|
71 |
<p><strong>' . __( 'Warning!', 'rtmedia' ) . '</strong> ' . sprintf( __( 'This import process is irreversible. Although everything is tested, please take a <a target="_blank" href="http://codex.wordpress.org/WordPress_Backups">backup of your database and files</a>, before proceeding. If you don\'t know your way around databases and files, consider <a target="_blank" href="%s">hiring us</a>, or another professional.', 'rtmedia' ), 'http://rtcamp.com/contact/?purpose=buddypress&utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media' ) . '</p>';
|
72 |
echo '<p>' . __( 'If you have set "WP_DEBUG" in you wp-config.php file, please make sure it is set to "false", so that it doesn\'t conflict with the import process.', 'rtmedia' ) . '</p></div>';
|
77 |
echo '<div class="bp-album-importer-wizard">';
|
78 |
echo '<div class="bp-album-users">';
|
79 |
echo '<strong>';
|
80 |
+
echo __( 'Users', 'rtmedia' ) . ': <span class="finished">' . $finished_users[ 0 ]->users . '</span> / <span class="total">' . $total[ 0 ]->users . '</span>';
|
81 |
echo '</strong>';
|
82 |
+
if ( 0 != $total[ 0 ]->users ) {
|
83 |
+
$users_progress = $this->progress->progress( $finished_users[ 0 ]->users, $total[ 0 ]->users );
|
84 |
$this->progress->progress_ui( $users_progress );
|
85 |
}
|
86 |
echo '</div>';
|
87 |
echo '<br />';
|
88 |
echo '<div class="bp-album-media">';
|
89 |
echo '<strong>';
|
90 |
+
echo __( 'Media', 'rtmedia' ) . ': <span class="finished">' . $finished[ 0 ]->media . '</span> / <span class="total">' . $total[ 0 ]->media . '</span>';
|
91 |
echo '</strong>';
|
92 |
$progress = 100;
|
93 |
+
if ( 0 != $total[ 0 ]->media ) {
|
94 |
+
$todo = $total[ 0 ]->media - $finished[ 0 ]->media;
|
95 |
+
$steps = ceil( $todo / 5 );
|
96 |
$laststep = $todo % 5;
|
97 |
+
$progress = $this->progress->progress( $finished[ 0 ]->media, $total[ 0 ]->media );
|
98 |
+
echo '<input type="hidden" value="' . $finished[ 0 ]->media . '" name="finished"/>';
|
99 |
+
echo '<input type="hidden" value="' . $total[ 0 ]->media . '" name="total"/>';
|
100 |
echo '<input type="hidden" value="' . $todo . '" name="todo"/>';
|
101 |
echo '<input type="hidden" value="' . $steps . '" name="steps"/>';
|
102 |
echo '<input type="hidden" value="' . $laststep . '" name="laststep"/>';
|
105 |
echo '</div>';
|
106 |
echo '<br>';
|
107 |
echo '<div class="bp-album-comments">';
|
108 |
+
if ( 0 != $total_comments ) {
|
109 |
echo '<strong>';
|
110 |
echo __( 'Comments', 'rtmedia' ) . ': <span class="finished">' . $finished_comments . '</span> / <span class="total">' . $total_comments . '</span>';
|
111 |
echo '</strong>';
|
116 |
echo '<p><strong>' . __( 'Comments: 0/0 (No comments to import)', 'rtmedia' ) . '</strong></p>';
|
117 |
}
|
118 |
echo '</div>';
|
119 |
+
if ( 0 != $completed_users_favorites ) {
|
120 |
echo '<br />';
|
121 |
echo '<div class="bp-album-favorites">';
|
122 |
echo '<strong>';
|
123 |
+
echo __( 'User\'s Favorites', 'rtmedia' ) . ': <span class="finished">' . $completed_users_favorites . '</span> / <span class="total">' . $users[ 'total_users' ] . '</span>';
|
124 |
echo '</strong>';
|
125 |
+
$favorites_progress = $this->progress->progress( $completed_users_favorites, $users[ 'total_users' ] );
|
126 |
$this->progress->progress_ui( $favorites_progress );
|
127 |
echo '</div>';
|
128 |
}
|
134 |
}
|
135 |
} else {
|
136 |
$corrupt_media = BPMediaAlbumimporter::get_corrupt_media();
|
137 |
+
if ( $corrupt_media ) {
|
138 |
echo '<div class="error below-h2">';
|
139 |
echo '<p><strong>' . __( 'Some of the media failed to import. The file might be corrupt or deleted.', 'rtmedia' ) . '</strong></p>';
|
140 |
echo '<p>' . sprintf( __( 'The following %d BP Album Media id\'s could not be imported', 'rtmedia' ), count( $corrupt_media ) ) . ': </p>';
|
165 |
echo '<br />';
|
166 |
echo '<strong>' . __( 'Why don\'t you try adding some instagram like effects to your images?', 'rtmedia' ) . '</strong>';
|
167 |
echo '<div class="bp-media-addon">
|
168 |
+
<a href="http://rtcamp.com/products/buddypress-media-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">
|
169 |
<img width="240" height="184" title="BuddyPress-Media Instagram" alt="BuddyPress-Media Instagram" src="' . $img_src . 'BuddyPressMedia-Instagram.png?ref=bp-album-importer">
|
170 |
</a>
|
171 |
+
<h4><a href="http://rtcamp.com/products/buddypress-media-instagram/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">BuddyPress-Media Instagram</a></h4>
|
172 |
<div class="product_desc">
|
173 |
<p>' . __( 'BuddyPress Media Instagram adds Instagram like filters to images uploaded with BuddyPress Media.', 'rtmedia' ) . '</p>
|
174 |
<p><strong>' . __( 'Important', 'rtmedia' ) . ':</strong> ' . __( 'You need to have ImageMagick installed on your server for this addon to work.', 'rtmedia' ) . '</p>
|
175 |
</div>
|
176 |
<div class="product_footer">
|
177 |
<span class="price alignleft"><span class="amount">$19</span></span>
|
178 |
+
<a class="add_to_cart_button alignright product_type_simple" href="http://rtcamp.com/products/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer&add-to-cart=34379" target="_blank">' . __( 'Buy Now', 'rtmedia' ) . '</a>
|
179 |
<a class="alignleft product_demo_link" href="http://demo.rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&utm_content=bp-album-importer" title="BuddyPress-Media Instagram" target="_blank">' . __( 'Live Demo', 'rtmedia' ) . '</a>
|
180 |
</div></div>';
|
181 |
}
|
186 |
}
|
187 |
}
|
188 |
|
189 |
+
function create_album( $author_id, $album_name = 'Imported Media' ) {
|
190 |
global $bp_media, $wpdb;
|
191 |
|
192 |
+
if ( array_key_exists( 'bp_album_import_name', $bp_media->options ) ) {
|
193 |
+
if ( '' != $bp_media->options[ 'bp_album_import_name' ] ) {
|
194 |
+
$album_name = $bp_media->options[ 'bp_album_import_name' ];
|
195 |
}
|
196 |
}
|
197 |
|
198 |
+
$query = "SELECT ID from $wpdb->posts WHERE post_type='bp_media_album' AND post_status = 'publish' AND post_author = $author_id AND post_title LIKE '{$album_name}'";
|
199 |
$result = $wpdb->get_results( $query );
|
200 |
+
if ( count( $result ) < 1 ) {
|
201 |
$album = new BPMediaAlbum();
|
202 |
$album->add_album( $album_name, $author_id );
|
203 |
$album_id = $album->get_id();
|
204 |
} else {
|
205 |
+
$album_id = $result[ 0 ]->ID;
|
206 |
}
|
207 |
$wpdb->update( $wpdb->base_prefix . 'bp_activity', array( 'secondary_item_id' => - 999 ), array( 'id' => get_post_meta( $album_id, 'bp_media_child_activity', true ) ) );
|
208 |
|
209 |
return $album_id;
|
210 |
}
|
211 |
|
212 |
+
static function get_total_count() {
|
213 |
global $wpdb;
|
214 |
$table = $wpdb->base_prefix . 'bp_album';
|
215 |
+
if ( BPMediaAlbumimporter::table_exists( $table ) ) {
|
216 |
return $wpdb->get_results( "SELECT COUNT(DISTINCT owner_id) as users, COUNT(id) as media FROM $table" );
|
217 |
}
|
218 |
|
219 |
return 0;
|
220 |
}
|
221 |
|
222 |
+
function get_remaining_comments() {
|
223 |
global $wpdb;
|
224 |
$bp_album_table = $wpdb->base_prefix . 'bp_album';
|
225 |
$activity_table = $wpdb->base_prefix . 'bp_activity';
|
226 |
+
if ( $this->table_exists( $bp_album_table ) ) {
|
227 |
return $wpdb->get_var( "SELECT SUM( b.count ) AS total
|
228 |
FROM (
|
229 |
SELECT (
|
244 |
return 0;
|
245 |
}
|
246 |
|
247 |
+
function get_finished_comments() {
|
248 |
global $wpdb;
|
249 |
$bp_album_table = $wpdb->base_prefix . 'bp_album';
|
250 |
$activity_table = $wpdb->base_prefix . 'bp_activity';
|
251 |
+
if ( $this->table_exists( $bp_album_table ) ) {
|
252 |
return $wpdb->get_var( "SELECT COUNT( activity.id ) AS count
|
253 |
FROM $activity_table AS activity
|
254 |
INNER JOIN $bp_album_table AS album ON ( activity.item_id = album.import_status )
|
259 |
return 0;
|
260 |
}
|
261 |
|
262 |
+
static function get_completed_users() {
|
263 |
global $wpdb;
|
264 |
$table = $wpdb->base_prefix . 'bp_album';
|
265 |
+
if ( BPMediaAlbumimporter::table_exists( $table ) ) {
|
266 |
return $wpdb->get_results( "SELECT COUNT( DISTINCT owner_id ) AS users
|
267 |
FROM $table
|
268 |
WHERE owner_id NOT
|
277 |
return 0;
|
278 |
}
|
279 |
|
280 |
+
static function get_completed_media() {
|
281 |
global $wpdb;
|
282 |
$table = $wpdb->base_prefix . 'bp_album';
|
283 |
+
if ( BPMediaAlbumimporter::table_exists( $table ) ) {
|
284 |
return $wpdb->get_results( "SELECT COUNT(id) as media FROM $table WHERE import_status!=0" );
|
285 |
}
|
286 |
|
287 |
return 0;
|
288 |
}
|
289 |
|
290 |
+
static function get_corrupt_media() {
|
291 |
global $wpdb;
|
292 |
$table = $wpdb->base_prefix . 'bp_album';
|
293 |
+
if ( BPMediaAlbumimporter::table_exists( $table ) ) {
|
294 |
return $wpdb->get_results( "SELECT id,title,pic_org_url FROM $table WHERE import_status=-1" );
|
295 |
}
|
296 |
|
297 |
return 0;
|
298 |
}
|
299 |
|
300 |
+
static function batch_import( $count = 5 ) {
|
301 |
global $wpdb;
|
302 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
303 |
$bp_album_data = $wpdb->get_results( "SELECT * FROM $table WHERE import_status = 0 ORDER BY owner_id LIMIT $count" );
|
304 |
|
305 |
return $bp_album_data;
|
306 |
}
|
307 |
|
308 |
+
static function bpmedia_ajax_import_callback() {
|
309 |
|
310 |
+
$page = isset( $_GET[ 'page' ] ) ? $_GET[ 'page' ] : 1;
|
311 |
+
$count = isset( $_GET[ 'count' ] ) ? $_GET[ 'count' ] : 5;
|
312 |
$bp_album_data = BPMediaAlbumimporter::batch_import( $count );
|
313 |
global $wpdb;
|
314 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
315 |
+
$activity_table = $wpdb->base_prefix . 'bp_activity';
|
316 |
$activity_meta_table = $wpdb->base_prefix . 'bp_activity_meta';
|
317 |
+
$comments = 0;
|
318 |
foreach ( $bp_album_data as &$bp_album_item ) {
|
319 |
|
320 |
+
if ( get_site_option( 'bp_media_bp_album_importer_base_path' ) == '' ) {
|
321 |
$base_path = pathinfo( $bp_album_item->pic_org_path );
|
322 |
+
update_site_option( 'bp_media_bp_album_importer_base_path', $base_path[ 'dirname' ] );
|
323 |
}
|
324 |
$bpm_host_wp = new BPMediaHostWordpress();
|
325 |
$bpm_host_wp->check_and_create_album( 0, 0, $bp_album_item->owner_id );
|
326 |
+
$album_id = BPMediaAlbumimporter::create_album( $bp_album_item->owner_id, 'Imported Media' );
|
327 |
$imported_media_id = BPMediaImporter::add_media( $album_id, $bp_album_item->title, $bp_album_item->description, $bp_album_item->pic_org_path, $bp_album_item->privacy, $bp_album_item->owner_id, 'Imported Media' );
|
328 |
$wpdb->update( $table, array( 'import_status' => ( $imported_media_id ) ? $imported_media_id : - 1 ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
329 |
+
if ( $imported_media_id ) {
|
330 |
+
$comments += ( int ) BPMediaAlbumimporter::update_recorded_time_and_comments( $imported_media_id, $bp_album_item->id, "{$wpdb->base_prefix}bp_album" );
|
331 |
$bp_album_media_id = $wpdb->get_var( "SELECT activity.id from $activity_table as activity INNER JOIN $table as album ON ( activity.item_id = album.id ) WHERE activity.item_id = $bp_album_item->id AND activity.component = 'album' AND activity.type='bp_album_picture'" );
|
332 |
$wpdb->update( $table, array( 'old_activity_id' => $bp_album_media_id ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
333 |
$bp_new_activity_id = $wpdb->get_var( "SELECT id from $activity_table WHERE item_id = $imported_media_id AND component = 'activity' AND type='activity_update' AND secondary_item_id=0" );
|
334 |
$wpdb->update( $table, array( 'new_activity_id' => $bp_new_activity_id ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
335 |
+
if ( $wpdb->update( $activity_meta_table, array( 'activity_id' => $bp_new_activity_id ), array( 'activity_id' => $bp_album_media_id, 'meta_key' => 'favorite_count' ), array( '%d' ), array( '%d' ) ) ) {
|
336 |
$wpdb->update( $table, array( 'favorites' => 1 ), array( 'id' => $bp_album_item->id ), array( '%d' ), array( '%d' ) );
|
337 |
}
|
338 |
}
|
340 |
|
341 |
$finished_users = BPMediaAlbumimporter::get_completed_users();
|
342 |
|
343 |
+
echo json_encode( array( 'page' => $page, 'users' => $finished_users[ 0 ]->users, 'comments' => $comments ) );
|
344 |
die();
|
345 |
}
|
346 |
|
347 |
+
static function bpmedia_ajax_import_favorites() {
|
348 |
global $wpdb;
|
349 |
$table = $wpdb->base_prefix . 'bp_album';
|
350 |
$users = count_users();
|
351 |
+
echo json_encode( array( 'favorites' => $wpdb->get_var( "SELECT COUNT(id) from $table WHERE favorites != 0" ), 'users' => $users[ 'total_users' ], 'offset' => ( int ) get_site_option( 'bp_media_bp_album_favorite_import_status', 0 ) ) );
|
352 |
die();
|
353 |
}
|
354 |
|
355 |
+
static function bpmedia_ajax_import_step_favorites() {
|
356 |
+
$offset = isset( $_POST[ 'offset' ] ) ? $_POST[ 'offset' ] : 0;
|
357 |
+
$redirect = isset( $_POST[ 'redirect' ] ) ? $_POST[ 'redirect' ] : false;
|
358 |
global $wpdb;
|
359 |
+
$table = $wpdb->base_prefix . 'bp_album';
|
360 |
$blogusers = get_users( array( 'meta_key' => 'bp_favorite_activities', 'offset' => $offset, 'number' => 1 ) );
|
361 |
+
if ( $blogusers ) {
|
362 |
foreach ( $blogusers as $user ) {
|
363 |
$favorite_activities = get_user_meta( $user->ID, 'bp_favorite_activities', true );
|
364 |
+
if ( $favorite_activities ) {
|
365 |
$new_favorite_activities = $favorite_activities;
|
366 |
foreach ( $favorite_activities as $key => $favorite ) {
|
367 |
+
if ( $new_act = $wpdb->get_var( "SELECT new_activity_id from $table WHERE old_activity_id = $favorite" ) ) {
|
368 |
$new_favorite_activities[ $key ] = $new_act;
|
369 |
}
|
370 |
}
|
371 |
update_user_meta( $user->ID, 'bp_favorite_activities', $new_favorite_activities );
|
372 |
}
|
373 |
+
$completed_users_favorites = ( int ) get_site_option( 'bp_media_bp_album_favorite_import_status', 0 ) + 1;
|
374 |
update_site_option( 'bp_media_bp_album_favorite_import_status', $completed_users_favorites );
|
375 |
}
|
376 |
}
|
378 |
die();
|
379 |
}
|
380 |
|
381 |
+
static function cleanup_after_install() {
|
382 |
global $wpdb;
|
383 |
$table = $wpdb->base_prefix . 'bp_album';
|
384 |
+
$dir = get_site_option( 'bp_media_bp_album_importer_base_path' );
|
385 |
BPMediaImporter::cleanup( $table, $dir );
|
386 |
die();
|
387 |
}
|
388 |
|
389 |
+
static function update_recorded_time_and_comments( $media, $bp_album_id, $table ) {
|
390 |
global $wpdb;
|
391 |
+
if ( function_exists( 'bp_activity_add' ) ) {
|
392 |
+
if ( ! is_object( $media ) ) {
|
393 |
try {
|
394 |
$media = new BPMediaHostWordpress( $media );
|
395 |
} catch ( exception $e ) {
|
397 |
}
|
398 |
}
|
399 |
$activity_id = get_post_meta( $media->get_id(), 'bp_media_child_activity', true );
|
400 |
+
if ( $activity_id ) {
|
401 |
+
$date_uploaded = $wpdb->get_var( "SELECT date_uploaded from $table WHERE id = $bp_album_id" );
|
402 |
$old_activity_id = $wpdb->get_var( "SELECT id from {$wpdb->base_prefix}bp_activity WHERE component = 'album' AND type = 'bp_album_picture' AND item_id = $bp_album_id" );
|
403 |
+
if ( $old_activity_id ) {
|
404 |
$comments = $wpdb->get_results( "SELECT id,secondary_item_id from {$wpdb->base_prefix}bp_activity WHERE component = 'activity' AND type = 'activity_comment' AND item_id = $old_activity_id" );
|
405 |
foreach ( $comments as $comment ) {
|
406 |
$update = array( 'item_id' => $activity_id );
|
407 |
+
if ( $comment->secondary_item_id == $old_activity_id ) {
|
408 |
+
$update[ 'secondary_item_id' ] = $activity_id;
|
409 |
}
|
410 |
$wpdb->update( $wpdb->base_prefix . 'bp_activity', $update, array( 'id' => $comment->id ) );
|
411 |
BP_Activity_Activity::rebuild_activity_comment_tree( $activity_id );
|
420 |
}
|
421 |
}
|
422 |
|
423 |
+
static function bp_album_deactivate() {
|
424 |
deactivate_plugins( 'bp-album/loader.php' );
|
425 |
die( true );
|
426 |
}
|
app/main/RTMedia.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
|
4 |
}
|
5 |
|
6 |
/**
|
@@ -13,750 +13,747 @@ if (!defined('ABSPATH')) {
|
|
13 |
*
|
14 |
* @author Faishal <faishal.saiyed@rtcamp.com>
|
15 |
*/
|
16 |
-
class RTMedia
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
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 |
-
add_action('plugins_loaded', array($this, '
|
89 |
-
add_action('plugins_loaded', array($this, '
|
90 |
-
add_action('
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
}
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
left join
|
132 |
-
$model->table_name r ON ( p.ID = r.media_id and blog_id = '".get_current_blog_id()."' )
|
133 |
set
|
134 |
-
post_parent = {$row["media_id"]}
|
135 |
where
|
136 |
p.guid like '%/rtMedia/%'
|
137 |
and (p.post_parent = 0 or p.post_parent is NULL)
|
138 |
and not r.id is NULL
|
139 |
and r.media_type <> 'album'";
|
140 |
-
|
|
|
|
|
141 |
}
|
142 |
-
|
143 |
-
}
|
144 |
-
}
|
145 |
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
if
|
|
|
160 |
global $wpdb;
|
161 |
$model = new RTMediaModel();
|
162 |
$sql_group = " UPDATE $model->table_name m join {$wpdb->prefix}bp_groups bp on m.context_id = bp.id SET m.privacy = 0 where m.context = 'group' and bp.status = 'public' and m.privacy <> 80 ";
|
163 |
-
$wpdb->query($sql_group);
|
164 |
$sql_group = " UPDATE $model->table_name m join {$wpdb->prefix}bp_groups bp on m.context_id = bp.id SET m.privacy = 20 where m.context = 'group' and ( bp.status = 'private' OR bp.status = 'hidden' ) and m.privacy <> 80 ";
|
165 |
-
$wpdb->query($sql_group);
|
166 |
}
|
167 |
-
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
-
|
171 |
-
global $wpdb;
|
172 |
-
$model = new RTMediaModel();
|
173 |
-
$interaction_model = new RTMediaInteractionModel();
|
174 |
-
$update_media_sql = "ALTER TABLE ".$model->table_name." CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci";
|
175 |
-
$wpdb->query($update_media_sql);
|
176 |
-
$update_media_meta_sql = "ALTER TABLE ".$wpdb->base_prefix.$model->meta_table_name." CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci";
|
177 |
-
$wpdb->query($update_media_meta_sql);
|
178 |
-
$update_media_interaction_sql = "ALTER TABLE ".$interaction_model->table_name." CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci";
|
179 |
-
$wpdb->query($update_media_interaction_sql);
|
180 |
-
}
|
181 |
|
182 |
-
|
|
|
183 |
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
/* if new options added via filter then it needs to be updated */
|
191 |
-
$this->options = $rtmedia_options;
|
192 |
-
}
|
193 |
-
$this->add_image_sizes();
|
194 |
-
$this->set_image_quality();
|
195 |
-
}
|
196 |
-
|
197 |
-
public function set_image_quality() {
|
198 |
-
add_filter( 'jpeg_quality', array ($this, 'rtmedia_jpeg_quality' ) );
|
199 |
-
}
|
200 |
-
|
201 |
-
public function rtmedia_jpeg_quality( $quality ) {
|
202 |
-
$quality = isset( $this->options[ 'general_jpeg_image_quality' ] ) ? $this->options[ 'general_jpeg_image_quality' ] : 90;
|
203 |
-
|
204 |
-
return $quality;
|
205 |
-
}
|
206 |
|
207 |
-
|
208 |
-
|
209 |
-
$image_sizes["thumbnail"] = array("width" => $this->options["defaultSizes_photo_thumbnail_width"], "height" => $this->options["defaultSizes_photo_thumbnail_height"], "crop" => ($this->options["defaultSizes_photo_thumbnail_crop"] == "0") ? false : true);
|
210 |
-
$image_sizes["activity"] = array("width" => $this->options["defaultSizes_photo_medium_width"], "height" => $this->options["defaultSizes_photo_medium_height"], "crop" => ($this->options["defaultSizes_photo_medium_crop"] == "0") ? false : true);
|
211 |
-
$image_sizes["single"] = array("width" => $this->options["defaultSizes_photo_large_width"], "height" => $this->options["defaultSizes_photo_large_height"], "crop" => ($this->options["defaultSizes_photo_large_crop"] == "0") ? false : true);
|
212 |
-
$image_sizes["featured"] = array("width" => $this->options["defaultSizes_featured_default_width"], "height" => $this->options["defaultSizes_featured_default_height"], "crop" => ($this->options["defaultSizes_featured_default_crop"] == "0") ? false : true);
|
213 |
-
return $image_sizes;
|
214 |
-
}
|
215 |
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
function custom_style_for_image_size() {
|
226 |
-
if( apply_filters( 'rtmedia_custom_image_style', true ) ) {
|
227 |
-
|
228 |
<style type="text/css">
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
</style>
|
240 |
-
|
241 |
}
|
242 |
-
|
243 |
}
|
244 |
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
|
258 |
function custom_style_for_gallery_image_size() {
|
259 |
?>
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
<?php
|
274 |
}
|
275 |
|
276 |
function custom_style_for_gallery_image_size_masonry() {
|
277 |
-
if( intval( $this->options['defaultSizes_photo_thumbnail_height'] ) > 0 ) {
|
278 |
-
|
279 |
.rtmedia-container .rtmedia-list .rtmedia-list-item .rtmedia-item-thumbnail {
|
280 |
-
|
281 |
}
|
282 |
-
|
283 |
}
|
284 |
-
if( intval( $this->options['defaultSizes_photo_thumbnail_width'] ) > 0 ) {
|
285 |
?>
|
286 |
.rtmedia-container .rtmedia-list .rtmedia-list-item .rtmedia-item-thumbnail {
|
287 |
-
|
288 |
}
|
289 |
-
|
290 |
}
|
291 |
}
|
292 |
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
|
434 |
-
|
435 |
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
|
442 |
-
|
443 |
-
|
444 |
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
|
471 |
-
|
472 |
|
473 |
-
|
474 |
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
|
488 |
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
|
529 |
-
|
530 |
-
|
1 |
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
}
|
5 |
|
6 |
/**
|
13 |
*
|
14 |
* @author Faishal <faishal.saiyed@rtcamp.com>
|
15 |
*/
|
16 |
+
class RTMedia {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* @var string default thumbnail url fallback for all media types
|
20 |
+
*/
|
21 |
+
private $default_thumbnail;
|
22 |
+
|
23 |
+
/**
|
24 |
+
*
|
25 |
+
* @var array allowed media types
|
26 |
+
*/
|
27 |
+
public $allowed_types;
|
28 |
+
|
29 |
+
/**
|
30 |
+
*
|
31 |
+
* @var array privacy settings
|
32 |
+
*/
|
33 |
+
public $privacy_settings;
|
34 |
+
|
35 |
+
/**
|
36 |
+
*
|
37 |
+
* @var array default media sizes
|
38 |
+
*/
|
39 |
+
public $default_sizes;
|
40 |
+
|
41 |
+
/**
|
42 |
+
*
|
43 |
+
* @var object default application wide privacy levels
|
44 |
+
*/
|
45 |
+
public $default_privacy = array(
|
46 |
+
'0' => 'Public',
|
47 |
+
'20' => 'Users',
|
48 |
+
'40' => 'Friends',
|
49 |
+
'60' => 'Private'
|
50 |
+
);
|
51 |
+
|
52 |
+
/**
|
53 |
+
*
|
54 |
+
* @var string Support forum url
|
55 |
+
*/
|
56 |
+
public $support_url = 'http://rtcamp.com/support/forum/buddypress-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media';
|
57 |
+
|
58 |
+
/**
|
59 |
+
*
|
60 |
+
* @var int Number of media items to show in one view.
|
61 |
+
*/
|
62 |
+
public $posts_per_page = 10;
|
63 |
+
|
64 |
+
/**
|
65 |
+
*
|
66 |
+
* @var array The types of activity BuddyPress Media creates
|
67 |
+
*/
|
68 |
+
public $activity_types = array(
|
69 |
+
'media_upload',
|
70 |
+
'album_updated',
|
71 |
+
'album_created'
|
72 |
+
);
|
73 |
+
public $options;
|
74 |
+
public $render_options;
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Constructs the class
|
78 |
+
* Defines constants and excerpt lengths, initiates admin notices,
|
79 |
+
* loads and initiates the plugin, loads translations.
|
80 |
+
* Initialises media counter
|
81 |
+
*
|
82 |
+
* @global int $bp_media_counter Media counter
|
83 |
+
*/
|
84 |
+
public function __construct() {
|
85 |
+
$this->default_thumbnail = apply_filters( 'rtmedia_default_thumbnail', RTMEDIA_URL . 'app/assets/admin/img/thumb_default.png' );
|
86 |
+
add_action( 'init', array( $this, 'check_global_album' ) );
|
87 |
+
add_action( 'plugins_loaded', array( $this, 'admin_init' ) );
|
88 |
+
add_action( 'plugins_loaded', array( $this, 'load_translation' ), 10 );
|
89 |
+
add_action( 'plugins_loaded', array( $this, 'init' ), 20 );
|
90 |
+
add_action( 'wp_enqueue_scripts', array( 'RTMediaGalleryShortcode', 'register_scripts' ) );
|
91 |
+
add_action( 'wp_enqueue_scripts', array( &$this, 'enqueue_scripts_styles' ), 999 );
|
92 |
+
include(RTMEDIA_PATH . 'app/main/controllers/template/rt-template-functions.php');
|
93 |
+
add_filter( 'intermediate_image_sizes_advanced', array( $this, 'filter_image_sizes_details' ) );
|
94 |
+
add_filter( 'intermediate_image_sizes', array( $this, 'filter_image_sizes' ) );
|
95 |
+
add_filter( "site_option_upload_filetypes", array( &$this, "filter_allow_mime_type_mu" ), 1, 1 );
|
96 |
+
add_filter( 'image_size_names_choose', array( $this, 'rtmedia_custom_image_sizes_choose' ) );
|
97 |
+
}
|
|
|
98 |
|
99 |
+
function filter_allow_mime_type_mu( $options ) {
|
100 |
+
$allowed_types = array();
|
101 |
+
$this->allowed_types = apply_filters( 'rtmedia_allowed_types', $this->allowed_types );
|
102 |
+
foreach ( $this->allowed_types as $type ) {
|
103 |
+
if ( $type[ 'extn' ] != "" && call_user_func( "is_rtmedia_upload_" . $type[ "name" ] . "_enabled" ) ) {
|
104 |
+
foreach ( $type[ 'extn' ] as $extn ) {
|
105 |
+
$allowed_types[] = $extn;
|
106 |
+
}
|
107 |
+
}
|
108 |
+
}
|
109 |
+
$ext = apply_filters( 'rtmedia_plupload_files_filter', array( array( 'title' => "Media Files", 'extensions' => implode( ",", $allowed_types ) ) ) );
|
110 |
+
$ext_arr = explode( ",", $ext[ 0 ][ "extensions" ] );
|
111 |
+
$options = trim( $options );
|
112 |
+
foreach ( $ext_arr as $f_ext ) {
|
113 |
+
if ( $f_ext && strpos( $options, $f_ext ) === false ) {
|
114 |
+
$options .= " " . $f_ext;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
return $options;
|
118 |
+
}
|
119 |
|
120 |
+
function fix_parent_id() {
|
121 |
+
$site_global = rtmedia_get_site_option( 'rtmedia-global-albums' );
|
122 |
+
if ( $site_global && is_array( $site_global ) && isset( $site_global[ 0 ] ) ) {
|
123 |
+
$model = new RTMediaModel();
|
124 |
+
$album_row = $model->get_by_id( $site_global[ 0 ] );
|
125 |
+
if ( isset( $album_row[ "result" ] ) && count( $album_row[ "result" ] ) > 0 ) {
|
126 |
+
global $wpdb;
|
127 |
+
$row = $album_row[ "result" ][ 0 ];
|
128 |
+
if ( isset( $row[ "media_id" ] ) ) {
|
129 |
+
$sql = "update $wpdb->posts p
|
130 |
left join
|
131 |
+
$model->table_name r ON ( p.ID = r.media_id and blog_id = '" . get_current_blog_id() . "' )
|
132 |
set
|
133 |
+
post_parent = {$row[ "media_id" ]}
|
134 |
where
|
135 |
p.guid like '%/rtMedia/%'
|
136 |
and (p.post_parent = 0 or p.post_parent is NULL)
|
137 |
and not r.id is NULL
|
138 |
and r.media_type <> 'album'";
|
139 |
+
$wpdb->query( $sql );
|
140 |
+
}
|
141 |
+
}
|
142 |
}
|
143 |
+
}
|
|
|
|
|
144 |
|
145 |
+
function fix_privacy() {
|
146 |
+
global $wpdb;
|
147 |
+
$model = new RTMediaModel();
|
148 |
+
$update_sql = "UPDATE $model->table_name SET privacy = '80' where privacy = '-1' ";
|
149 |
+
$wpdb->query( $update_sql );
|
150 |
+
}
|
151 |
|
152 |
+
/*
|
153 |
+
* Update media privacy of the medias having context=group
|
154 |
+
* update privacy of groups medias according to the privacy of the group 0->public, 20-> private/hidden
|
155 |
+
*/
|
156 |
+
|
157 |
+
function fix_group_media_privacy() {
|
158 |
+
//if buddypress is active and groups are enabled
|
159 |
+
if ( class_exists( 'BuddyPress' ) ) {
|
160 |
global $wpdb;
|
161 |
$model = new RTMediaModel();
|
162 |
$sql_group = " UPDATE $model->table_name m join {$wpdb->prefix}bp_groups bp on m.context_id = bp.id SET m.privacy = 0 where m.context = 'group' and bp.status = 'public' and m.privacy <> 80 ";
|
163 |
+
$wpdb->query( $sql_group );
|
164 |
$sql_group = " UPDATE $model->table_name m join {$wpdb->prefix}bp_groups bp on m.context_id = bp.id SET m.privacy = 20 where m.context = 'group' and ( bp.status = 'private' OR bp.status = 'hidden' ) and m.privacy <> 80 ";
|
165 |
+
$wpdb->query( $sql_group );
|
166 |
}
|
167 |
+
}
|
168 |
|
169 |
+
function fix_db_collation() {
|
170 |
+
global $wpdb;
|
171 |
+
$model = new RTMediaModel();
|
172 |
+
$interaction_model = new RTMediaInteractionModel();
|
173 |
+
$update_media_sql = "ALTER TABLE " . $model->table_name . " CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci";
|
174 |
+
$wpdb->query( $update_media_sql );
|
175 |
+
$update_media_meta_sql = "ALTER TABLE " . $wpdb->base_prefix . $model->meta_table_name . " CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci";
|
176 |
+
$wpdb->query( $update_media_meta_sql );
|
177 |
+
$update_media_interaction_sql = "ALTER TABLE " . $interaction_model->table_name . " CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci";
|
178 |
+
$wpdb->query( $update_media_interaction_sql );
|
179 |
+
}
|
180 |
|
181 |
+
function set_site_options() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
+
$rtmedia_options = rtmedia_get_site_option( 'rtmedia-options' );
|
184 |
+
$bp_media_options = rtmedia_get_site_option( 'bp_media_options' );
|
185 |
|
186 |
+
if ( $rtmedia_options == false ) {
|
187 |
+
$this->init_site_options();
|
188 |
+
} else {
|
189 |
+
/* if new options added via filter then it needs to be updated */
|
190 |
+
$this->options = $rtmedia_options;
|
191 |
+
}
|
192 |
+
$this->add_image_sizes();
|
193 |
+
$this->set_image_quality();
|
194 |
+
}
|
195 |
|
196 |
+
public function set_image_quality() {
|
197 |
+
add_filter( 'jpeg_quality', array( $this, 'rtmedia_jpeg_quality' ) );
|
198 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
|
200 |
+
public function rtmedia_jpeg_quality( $quality ) {
|
201 |
+
$quality = isset( $this->options[ 'general_jpeg_image_quality' ] ) ? $this->options[ 'general_jpeg_image_quality' ] : 90;
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
|
203 |
+
return $quality;
|
204 |
+
}
|
205 |
+
|
206 |
+
public function image_sizes() {
|
207 |
+
$image_sizes = array();
|
208 |
+
$image_sizes[ "thumbnail" ] = array( "width" => $this->options[ "defaultSizes_photo_thumbnail_width" ], "height" => $this->options[ "defaultSizes_photo_thumbnail_height" ], "crop" => ($this->options[ "defaultSizes_photo_thumbnail_crop" ] == "0") ? false : true );
|
209 |
+
$image_sizes[ "activity" ] = array( "width" => $this->options[ "defaultSizes_photo_medium_width" ], "height" => $this->options[ "defaultSizes_photo_medium_height" ], "crop" => ($this->options[ "defaultSizes_photo_medium_crop" ] == "0") ? false : true );
|
210 |
+
$image_sizes[ "single" ] = array( "width" => $this->options[ "defaultSizes_photo_large_width" ], "height" => $this->options[ "defaultSizes_photo_large_height" ], "crop" => ($this->options[ "defaultSizes_photo_large_crop" ] == "0") ? false : true );
|
211 |
+
$image_sizes[ "featured" ] = array( "width" => $this->options[ "defaultSizes_featured_default_width" ], "height" => $this->options[ "defaultSizes_featured_default_height" ], "crop" => ($this->options[ "defaultSizes_featured_default_crop" ] == "0") ? false : true );
|
212 |
+
return $image_sizes;
|
213 |
+
}
|
214 |
+
|
215 |
+
public function add_image_sizes() {
|
216 |
+
$bp_media_sizes = $this->image_sizes();
|
217 |
+
add_image_size( "rt_media_thumbnail", $bp_media_sizes[ 'thumbnail' ][ "width" ], $bp_media_sizes[ 'thumbnail' ][ "height" ], $bp_media_sizes[ 'thumbnail' ][ "crop" ] );
|
218 |
+
add_image_size( "rt_media_activity_image", $bp_media_sizes[ 'activity' ][ "width" ], $bp_media_sizes[ 'activity' ][ "height" ], $bp_media_sizes[ 'activity' ][ "crop" ] );
|
219 |
+
add_image_size( "rt_media_single_image", $bp_media_sizes[ 'single' ][ "width" ], $bp_media_sizes[ 'single' ][ "height" ], $bp_media_sizes[ 'single' ][ "crop" ] );
|
220 |
+
add_image_size( "rt_media_featured_image", $bp_media_sizes[ 'featured' ][ "width" ], $bp_media_sizes[ 'featured' ][ "height" ], $bp_media_sizes[ 'featured' ][ "crop" ] );
|
221 |
+
add_action( 'wp_head', array( &$this, 'custom_style_for_image_size' ) );
|
222 |
+
}
|
223 |
|
224 |
function custom_style_for_image_size() {
|
225 |
+
if ( apply_filters( 'rtmedia_custom_image_style', true ) ) {
|
226 |
+
?>
|
227 |
<style type="text/css">
|
228 |
+
<?php
|
229 |
+
$this->custom_style_for_activity_image_size();
|
230 |
+
global $rtmedia;
|
231 |
+
if ( isset( $rtmedia->options[ 'general_masonry_layout' ] ) && $rtmedia->options[ 'general_masonry_layout' ] == '1' ) {
|
232 |
+
$this->custom_style_for_gallery_image_size_masonry();
|
233 |
+
} else {
|
234 |
+
$this->custom_style_for_gallery_image_size();
|
235 |
+
}
|
236 |
+
do_action( 'rtmedia_custom_styles' );
|
237 |
+
?>
|
238 |
</style>
|
239 |
+
<?php
|
240 |
}
|
|
|
241 |
}
|
242 |
|
243 |
+
function custom_style_for_activity_image_size() {
|
244 |
+
?>
|
245 |
+
.rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail {
|
246 |
+
max-width: <?php echo $this->options[ "defaultSizes_photo_medium_width" ]; ?>px;
|
247 |
+
max-height: <?php echo $this->options[ "defaultSizes_photo_medium_height" ]; ?>px;
|
248 |
+
}
|
249 |
+
.rtmedia-activity-container .mejs-container.mejs-video{
|
250 |
+
min-height: <?php echo $this->options[ "defaultSizes_video_activityPlayer_height" ]; ?>px;
|
251 |
+
min-width: <?php echo $this->options[ "defaultSizes_video_activityPlayer_width" ]; ?>px;
|
252 |
+
}
|
253 |
+
<?php
|
254 |
+
}
|
255 |
|
256 |
function custom_style_for_gallery_image_size() {
|
257 |
?>
|
258 |
+
.rtmedia-container ul.rtmedia-list li.rtmedia-list-item div.rtmedia-item-thumbnail {
|
259 |
+
width: <?php echo $this->options[ "defaultSizes_photo_thumbnail_width" ]; ?>px;
|
260 |
+
height: <?php echo $this->options[ "defaultSizes_photo_thumbnail_height" ]; ?>px;
|
261 |
+
line-height: <?php echo $this->options[ "defaultSizes_photo_thumbnail_height" ]; ?>px;
|
262 |
+
}
|
263 |
+
.rtmedia-container ul.rtmedia-list li.rtmedia-list-item div.rtmedia-item-thumbnail img {
|
264 |
+
max-width: <?php echo $this->options[ "defaultSizes_photo_thumbnail_width" ]; ?>px;
|
265 |
+
max-height: <?php echo $this->options[ "defaultSizes_photo_thumbnail_height" ]; ?>px;
|
266 |
+
}
|
267 |
+
.rtmedia-container .rtmedia-list .rtmedia-list-item {
|
268 |
+
width: <?php echo intval( $this->options[ "defaultSizes_photo_thumbnail_width" ] ); ?>px;
|
269 |
+
}
|
270 |
+
<?php
|
|
|
271 |
}
|
272 |
|
273 |
function custom_style_for_gallery_image_size_masonry() {
|
274 |
+
if ( intval( $this->options[ 'defaultSizes_photo_thumbnail_height' ] ) > 0 ) {
|
275 |
+
?>
|
276 |
.rtmedia-container .rtmedia-list .rtmedia-list-item .rtmedia-item-thumbnail {
|
277 |
+
max-height: <?php echo intval( $this->options[ "defaultSizes_photo_thumbnail_height" ] ); ?>px;
|
278 |
}
|
279 |
+
<?php
|
280 |
}
|
281 |
+
if ( intval( $this->options[ 'defaultSizes_photo_thumbnail_width' ] ) > 0 ) {
|
282 |
?>
|
283 |
.rtmedia-container .rtmedia-list .rtmedia-list-item .rtmedia-item-thumbnail {
|
284 |
+
max-width: <?php echo intval( $this->options[ "defaultSizes_photo_thumbnail_width" ] ); ?>px;
|
285 |
}
|
286 |
+
<?php
|
287 |
}
|
288 |
}
|
289 |
|
290 |
+
/**
|
291 |
+
* Default allowed media types array
|
292 |
+
*/
|
293 |
+
function set_allowed_types() {
|
294 |
+
$allowed_types = array(
|
295 |
+
'photo' => array(
|
296 |
+
'name' => 'photo',
|
297 |
+
'plural' => 'photos',
|
298 |
+
'label' => __( 'Photo', 'rtmedia' ),
|
299 |
+
'plural_label' => __( 'Photos', 'rtmedia' ),
|
300 |
+
'extn' => array( 'jpg', 'jpeg', 'png', 'gif' ),
|
301 |
+
'thumbnail' => RTMEDIA_URL . 'app/assets/admin/img/image_thumb.png',
|
302 |
+
'settings_visibility' => true
|
303 |
+
),
|
304 |
+
'video' => array(
|
305 |
+
'name' => 'video',
|
306 |
+
'plural' => 'videos',
|
307 |
+
'label' => __( 'Video', 'rtmedia' ),
|
308 |
+
'plural_label' => __( 'Videos', 'rtmedia' ),
|
309 |
+
'extn' => array( 'mp4' ),
|
310 |
+
'thumbnail' => RTMEDIA_URL . 'app/assets/admin/img/video_thumb.png',
|
311 |
+
'settings_visibility' => true
|
312 |
+
),
|
313 |
+
'music' => array(
|
314 |
+
'name' => 'music',
|
315 |
+
'plural' => 'music',
|
316 |
+
'label' => __( 'Music', 'rtmedia' ),
|
317 |
+
'plural_label' => __( 'Music', 'rtmedia' ),
|
318 |
+
'extn' => array( 'mp3' ),
|
319 |
+
'thumbnail' => RTMEDIA_URL . 'app/assets/admin/img/audio_thumb.png',
|
320 |
+
'settings_visibility' => true
|
321 |
+
)
|
322 |
+
);
|
323 |
+
|
324 |
+
// filter for hooking additional media types
|
325 |
+
$allowed_types = apply_filters( 'rtmedia_allowed_types', $allowed_types );
|
326 |
+
|
327 |
+
// sanitize all the types
|
328 |
+
$allowed_types = $this->sanitize_allowed_types( $allowed_types );
|
329 |
+
|
330 |
+
// set the allowed types property
|
331 |
+
$this->allowed_types = $allowed_types;
|
332 |
+
}
|
333 |
|
334 |
+
/**
|
335 |
+
* Sanitize all media sizes after hooking custom media types
|
336 |
+
*
|
337 |
+
* @param array $allowed_types allowed media types after hooking custom types
|
338 |
+
* @return array $allowed_types sanitized media types
|
339 |
+
*/
|
340 |
+
function sanitize_allowed_types( $allowed_types ) {
|
341 |
+
// check if the array is formatted properly
|
342 |
+
if ( ! is_array( $allowed_types ) && count( $allowed_types ) < 1 )
|
343 |
+
return;
|
344 |
+
|
345 |
+
//loop through each type
|
346 |
+
foreach ( $allowed_types as $key => &$type ) {
|
347 |
+
|
348 |
+
if ( ! isset( $type[ 'name' ] ) || // check if a name is set
|
349 |
+
empty( $type[ 'name' ] ) ||
|
350 |
+
//commented this section for playlist // !isset($type['extn']) || // check if file extensions are set
|
351 |
+
//commented this section for playlist // empty($type['extn']) ||
|
352 |
+
strstr( $type[ 'name' ], " " ) || strstr( $type[ 'name' ], "_" ) ) {
|
353 |
+
unset( $allowed_types[ $key ] ); // if not unset this type
|
354 |
+
continue;
|
355 |
+
}
|
356 |
+
$slug = strtoupper( $type[ 'name' ] );
|
357 |
+
if ( defined( "RTMEDIA_" . $slug . "_LABEL" ) ) {
|
358 |
+
$type[ 'label' ] = constant( "RTMEDIA_" . $slug . "_LABEL" );
|
359 |
+
}
|
360 |
+
if ( defined( "RTMEDIA_" . $slug . "_PLURAL_LABEL" ) ) {
|
361 |
+
$type[ 'plural_label' ] = constant( "RTMEDIA_" . $slug . "_PLURAL_LABEL" );
|
362 |
+
}
|
363 |
+
// if thumbnail is not supplied, use the default thumbnail
|
364 |
+
if ( ! isset( $type[ 'thumbnail' ] ) || empty( $type[ 'thumbnail' ] ) ) {
|
365 |
+
$type[ 'thumbnail' ] = $this->default_thumbnail;
|
366 |
+
}
|
367 |
+
}
|
368 |
+
return $allowed_types;
|
369 |
+
}
|
370 |
|
371 |
+
/**
|
372 |
+
* Set the default sizes
|
373 |
+
*/
|
374 |
+
function set_default_sizes() {
|
375 |
+
$this->default_sizes = array(
|
376 |
+
'photo' => array(
|
377 |
+
'thumbnail' => array( 'width' => 150, 'height' => 150, 'crop' => 1 ),
|
378 |
+
'medium' => array( 'width' => 320, 'height' => 240, 'crop' => 1 ),
|
379 |
+
'large' => array( 'width' => 800, 'height' => 0, 'crop' => 1 )
|
380 |
+
),
|
381 |
+
'video' => array(
|
382 |
+
'activityPlayer' => array( 'width' => 320, 'height' => 240 ),
|
383 |
+
'singlePlayer' => array( 'width' => 640, 'height' => 480 )
|
384 |
+
),
|
385 |
+
'music' => array(
|
386 |
+
'activityPlayer' => array( 'width' => 320 ),
|
387 |
+
'singlePlayer' => array( 'width' => 640 )
|
388 |
+
),
|
389 |
+
'featured' => array(
|
390 |
+
'default' => array( 'width' => 100, 'height' => 100, 'crop' => 1 )
|
391 |
+
)
|
392 |
+
);
|
393 |
+
|
394 |
+
$this->default_sizes = apply_filters( 'rtmedia_allowed_sizes', $this->default_sizes );
|
395 |
+
}
|
396 |
|
397 |
+
/**
|
398 |
+
* Set privacy options
|
399 |
+
*/
|
400 |
+
function set_privacy() {
|
401 |
+
|
402 |
+
$this->privacy_settings = array(
|
403 |
+
'levels' => array(
|
404 |
+
60 => __( 'Private - Visible only to the user', 'rtmedia' ),
|
405 |
+
40 => __( 'Friends - Visible to user\'s friends', 'rtmedia' ),
|
406 |
+
20 => __( 'Logged in Users - Visible to registered users', 'rtmedia' ),
|
407 |
+
0 => __( 'Public - Visible to the world', 'rtmedia' )
|
408 |
+
)
|
409 |
+
);
|
410 |
+
$this->privacy_settings = apply_filters( 'rtmedia_privacy_levels', $this->privacy_settings );
|
411 |
+
|
412 |
+
if ( function_exists( 'bp_is_active' ) && ! bp_is_active( 'friends' ) ) {
|
413 |
+
unset( $this->privacy_settings[ 'levels' ][ 40 ] );
|
414 |
+
}
|
415 |
+
}
|
416 |
|
417 |
+
/**
|
418 |
+
* Load admin screens
|
419 |
+
*
|
420 |
+
* @global RTMediaAdmin $rtmedia_admin Class for loading admin screen
|
421 |
+
*/
|
422 |
+
function admin_init() {
|
423 |
+
global $rtmedia_admin;
|
424 |
+
$rtmedia_admin = new RTMediaAdmin();
|
425 |
+
}
|
426 |
|
427 |
+
function media_screen() {
|
428 |
+
return;
|
429 |
+
}
|
430 |
|
431 |
+
function get_user_link( $user ) {
|
432 |
|
433 |
+
if ( function_exists( 'bp_core_get_user_domain' ) ) {
|
434 |
+
$parent_link = bp_core_get_user_domain( $user );
|
435 |
+
} else {
|
436 |
+
$parent_link = get_author_posts_url( $user );
|
437 |
+
}
|
438 |
|
439 |
+
return $parent_link;
|
440 |
+
}
|
441 |
|
442 |
+
public function init_buddypress_options() {
|
443 |
+
/**
|
444 |
+
* BuddyPress Settings
|
445 |
+
*/
|
446 |
+
$bp_media_options = rtmedia_get_site_option( 'bp_media_options' );
|
447 |
+
|
448 |
+
$group = 0;
|
449 |
+
if ( isset( $bp_media_options[ 'enable_on_group' ] ) && ! empty( $bp_media_options[ 'enable_on_group' ] ) )
|
450 |
+
$group = $bp_media_options[ 'enable_on_group' ];
|
451 |
+
else if ( function_exists( "bp_is_active" ) )
|
452 |
+
$group = bp_is_active( 'groups' );
|
453 |
+
$this->options[ 'buddypress_enableOnGroup' ] = $group;
|
454 |
+
|
455 |
+
$activity = 0;
|
456 |
+
if ( isset( $bp_media_options[ 'activity_upload' ] ) && ! empty( $bp_media_options[ 'activity_upload' ] ) )
|
457 |
+
$activity = $bp_media_options[ 'activity_upload' ];
|
458 |
+
else if ( function_exists( "bp_is_active" ) )
|
459 |
+
$activity = bp_is_active( 'activity' );
|
460 |
+
$this->options[ 'buddypress_enableOnActivity' ] = $activity;
|
461 |
+
|
462 |
+
$this->options[ 'buddypress_enableOnProfile' ] = 1;
|
463 |
+
|
464 |
+
/* Last settings updated in options. Update them in DB & after this no other option would be saved in db */
|
465 |
+
rtmedia_update_site_option( 'rtmedia-options', $this->options );
|
466 |
+
}
|
467 |
|
468 |
+
public function init_site_options() {
|
469 |
|
470 |
+
$bp_media_options = rtmedia_get_site_option( 'bp_media_options' );
|
471 |
|
472 |
+
$defaults = array(
|
473 |
+
'general_enableAlbums' => 0,
|
474 |
+
'general_enableComments' => 0,
|
475 |
+
'general_downloadButton' => (isset( $bp_media_options[ 'download_enabled' ] )) ? $bp_media_options[ 'download_enabled' ] : 0,
|
476 |
+
'general_enableLightbox' => (isset( $bp_media_options[ 'enable_lightbox' ] )) ? $bp_media_options[ 'enable_lightbox' ] : 0,
|
477 |
+
'general_perPageMedia' => (isset( $bp_media_options[ 'default_count' ] )) ? $bp_media_options[ 'default_count' ] : 10,
|
478 |
+
'general_enableMediaEndPoint' => 0,
|
479 |
+
'general_showAdminMenu' => (isset( $bp_media_options[ 'show_admin_menu' ] )) ? $bp_media_options[ 'show_admin_menu' ] : 0,
|
480 |
+
'general_videothumbs' => 2,
|
481 |
+
'general_jpeg_image_quality' => 90,
|
482 |
+
'general_AllowUserData' => 1
|
483 |
+
);
|
484 |
|
485 |
|
486 |
+
foreach ( $this->allowed_types as $type ) {
|
487 |
+
// invalid keys handled in sanitize method
|
488 |
+
$defaults[ 'allowedTypes_' . $type[ 'name' ] . '_enabled' ] = 1;
|
489 |
+
$defaults[ 'allowedTypes_' . $type[ 'name' ] . '_featured' ] = 0;
|
490 |
+
}
|
491 |
|
492 |
+
/* Previous Sizes values from buddypress is migrated */
|
493 |
+
foreach ( $this->default_sizes as $type => $typeValue ) {
|
494 |
+
foreach ( $typeValue as $size => $sizeValue ) {
|
495 |
+
foreach ( $sizeValue as $dimension => $value ) {
|
496 |
+
switch ( $type ) {
|
497 |
+
case 'photo':
|
498 |
+
if ( isset( $bp_media_options[ 'sizes' ][ 'image' ][ $size ][ $dimension ] ) && ! empty( $bp_media_options[ 'sizes' ][ 'image' ][ $size ][ $dimension ] ) )
|
499 |
+
$value = $bp_media_options[ 'sizes' ][ 'image' ][ $size ][ $dimension ];
|
500 |
+
break;
|
501 |
+
case 'video':
|
502 |
+
case 'music':
|
503 |
+
$old = ($type == 'video') ? 'video' : ($type == 'music') ? 'audio' : '';
|
504 |
+
switch ( $size ) {
|
505 |
+
case 'activityPlayer':
|
506 |
+
if ( isset( $bp_media_options[ 'sizes' ][ $old ][ 'medium' ][ $dimension ] ) && ! empty( $bp_media_options[ 'sizes' ][ $old ][ 'medium' ][ $dimension ] ) )
|
507 |
+
$value = $bp_media_options[ 'sizes' ][ $old ][ 'medium' ][ $dimension ];
|
508 |
+
break;
|
509 |
+
case 'singlePlayer':
|
510 |
+
if ( isset( $bp_media_options[ 'sizes' ][ $old ][ 'large' ][ $dimension ] ) && ! empty( $bp_media_options[ 'sizes' ][ $old ][ 'large' ][ $dimension ] ) )
|
511 |
+
$value = $bp_media_options[ 'sizes' ][ $old ][ 'large' ][ $dimension ];
|
512 |
+
break;
|
513 |
+
}
|
514 |
+
break;
|
515 |
+
}
|
516 |
+
$defaults[ 'defaultSizes_' . $type . '_' . $size . '_' . $dimension ] = $value;
|
517 |
+
}
|
518 |
+
}
|
519 |
+
}
|
520 |
|
521 |
+
/* Privacy */
|
522 |
+
$defaults[ 'privacy_enabled' ] = (isset( $bp_media_options[ 'privacy_enabled' ] )) ? $bp_media_options[ 'privacy_enabled' ] : 0;
|
523 |
+
$defaults[ 'privacy_default' ] = (isset( $bp_media_options[ 'default_privacy_level' ] )) ? $bp_media_options[ 'default_privacy_level' ] : 0;
|
524 |
+
$defaults[ 'privacy_userOverride' ] = (isset( $bp_media_options[ 'privacy_override_enabled' ] )) ? $bp_media_options[ 'privacy_override_enabled' ] : 0;
|
525 |
|
526 |
+
$defaults[ 'styles_custom' ] = (isset( $bp_media_options[ 'styles_custom' ] )) ? $bp_media_options[ 'styles_custom' ] : '';
|
527 |
+
$defaults[ 'styles_enabled' ] = (isset( $bp_media_options[ 'styles_enabled' ] )) ? $bp_media_opti
|