Version Description
Download this release
Release Info
Developer | pasyuk |
Plugin | Gmedia Photo Gallery |
Version | 1.16.4 |
Comparing to | |
See all releases |
Code changes from version 1.14.7 to 1.16.4
- admin/admin.php +8 -5
- admin/ajax.php +1 -0
- admin/assets/css/gmedia.admin.css +12 -1
- admin/assets/js/gmedia.admin.js +1 -2
- admin/pages/galleries/tpl/modal-build-query.php +1 -1
- admin/pages/library/tpl/edit-item.php +1 -1
- admin/pages/modules/functions.php +3 -3
- admin/pages/settings/tpl/common.php +9 -0
- admin/pages/terms/tpl/album-edit-item.php +1 -1
- app/access.php +5 -0
- assets/gmedia.global.front.css +2 -1
- config/setup.php +2 -1
- config/update.php +1 -0
- grand-media.php +905 -892
- inc/core.php +5 -2
- inc/db.connect.php +3 -3
- inc/functions.php +1 -1
- load-template.php +1 -1
- module/amron/css/gm_vit_itemMenu.css +29 -0
- module/amron/css/gm_vit_modalWin.css +289 -0
- module/amron/css/gm_vit_slider.css +399 -0
- module/amron/css/style.css +512 -0
- module/amron/index.php +25 -0
- module/amron/init.php +23 -0
- module/amron/js/components/gm_vit_itemMenu.js +18 -0
- module/amron/js/components/gm_vit_modalWin.js +32 -0
- module/amron/js/components/gm_vit_slider.js +91 -0
- module/amron/js/script.js +90 -0
- module/amron/screenshot.png +0 -0
- module/amron/settings.php +337 -0
- module/cubik-lite/css/style.css +0 -2
- module/cubik-lite/img/google@2x.png +0 -0
- module/cubik-lite/index.php +1 -1
- module/cubik-lite/js/script.js +0 -5
- module/phantom/css/style.css +0 -2
- module/phantom/img/google@2x.png +0 -0
- module/phantom/index.php +1 -1
- module/phantom/init.php +5 -5
- module/phantom/js/jquery.gmPhantom.js +7 -12
- module/phantom/settings.php +2 -2
- module/photomania/css/styles.photomania.css +0 -4
- module/photomania/img/google@2x.png +0 -0
- module/photomania/index.php +1 -1
- module/photomania/init.php +0 -2
- module/photomania/js/photomania.js +0 -4
- readme.txt +40 -19
admin/admin.php
CHANGED
@@ -133,7 +133,9 @@ class GmediaAdmin {
|
|
133 |
if ( current_user_can( 'gmedia_module_manage' ) ) {
|
134 |
global $gmGallery;
|
135 |
if ( $gmGallery->options['modules_update'] ) {
|
136 |
-
$count
|
|
|
|
|
137 |
$count .= " <span class='update-plugins count-{$gmGallery->options['modules_new']}' style='background-color: #367236;'><span class='plugin-count gm-module-count gm-modules-new-count' title='" . __( 'New Modules', 'grand-media' ) . "'>{$gmGallery->options['modules_new']}</span></span>";
|
138 |
}
|
139 |
}
|
@@ -152,8 +154,8 @@ class GmediaAdmin {
|
|
152 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Gmedia Galleries', 'grand-media' ), __( 'Galleries', 'grand-media' ), 'gmedia_gallery_manage', 'GrandMedia_Galleries', array( &$this, 'shell' ) );
|
153 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Modules', 'grand-media' ), __( 'Modules', 'grand-media' ), 'gmedia_gallery_manage', 'GrandMedia_Modules', array( &$this, 'shell' ) );
|
154 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Gmedia Settings', 'grand-media' ), __( 'Settings', 'grand-media' ), 'manage_options', 'GrandMedia_Settings', array( &$this, 'shell' ) );
|
155 |
-
|
156 |
-
$this->pages[] = add_submenu_page( 'GrandMedia', __( '
|
157 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Gmedia Logs', 'grand-media' ), __( 'Gmedia Logs', 'grand-media' ), 'manage_options', 'GrandMedia_Logs', array( &$this, 'shell' ) );
|
158 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Gmedia Support', 'grand-media' ), __( 'Support', 'grand-media' ), 'manage_options', 'GrandMedia_Support', array( &$this, 'shell' ) );
|
159 |
}
|
@@ -282,7 +284,9 @@ class GmediaAdmin {
|
|
282 |
}
|
283 |
$menuData = '';
|
284 |
if ( $menuItem[2] == 'GrandMedia_Modules' && gm_user_can( 'module_manage' ) ) {
|
285 |
-
|
|
|
|
|
286 |
$menuData .= '<span class="badge badge-error pull-right gm-module-count-' . $gmGallery->options['modules_update'] . '" title="' . __( 'Modules Updates', 'grand-media' ) . '">' . $gmGallery->options['modules_update'] . '</span>';
|
287 |
}
|
288 |
|
@@ -306,7 +310,6 @@ class GmediaAdmin {
|
|
306 |
<img src="<?php echo plugins_url( '/grand-media/admin/assets/img/icon-128x128.png' ) ?>" width="90" height="90">
|
307 |
</div>
|
308 |
<?php printf( __( '<p>Hey %s,<br>Please help us improve <b>Gmedia Gallery</b>! If you opt-in, some data about your usage of <b>Gmedia Gallery</b> will be sent to <a href="https://codeasily.com/" target="_blank" tabindex="1">codeasily.com</a>.
|
309 |
-
These data also required if you will use Gmedia iOS application on your iPhone.
|
310 |
If you skip this, that\'s okay! <b>Gmedia Gallery</b> will still work just fine.</p>', 'grand-media' ), $current_user->display_name ); ?>
|
311 |
</div>
|
312 |
<div class="gm-message-actions">
|
133 |
if ( current_user_can( 'gmedia_module_manage' ) ) {
|
134 |
global $gmGallery;
|
135 |
if ( $gmGallery->options['modules_update'] ) {
|
136 |
+
$count .= " <span class='update-plugins count-{$gmGallery->options['modules_update']}' style='background-color: #bb391b;'><span class='plugin-count gm-module-count gm-modules-update-count' title='" . __( 'Modules Updates', 'grand-media' ) . "'>{$gmGallery->options['modules_update']}</span></span>";
|
137 |
+
}
|
138 |
+
if ( $gmGallery->options['modules_new'] && !empty( $gmGallery->options['notify_new_modules'] ) ) {
|
139 |
$count .= " <span class='update-plugins count-{$gmGallery->options['modules_new']}' style='background-color: #367236;'><span class='plugin-count gm-module-count gm-modules-new-count' title='" . __( 'New Modules', 'grand-media' ) . "'>{$gmGallery->options['modules_new']}</span></span>";
|
140 |
}
|
141 |
}
|
154 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Gmedia Galleries', 'grand-media' ), __( 'Galleries', 'grand-media' ), 'gmedia_gallery_manage', 'GrandMedia_Galleries', array( &$this, 'shell' ) );
|
155 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Modules', 'grand-media' ), __( 'Modules', 'grand-media' ), 'gmedia_gallery_manage', 'GrandMedia_Modules', array( &$this, 'shell' ) );
|
156 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Gmedia Settings', 'grand-media' ), __( 'Settings', 'grand-media' ), 'manage_options', 'GrandMedia_Settings', array( &$this, 'shell' ) );
|
157 |
+
//$this->pages[] = add_submenu_page( 'GrandMedia', __( 'iOS Application', 'grand-media' ), __( 'iOS Application', 'grand-media' ), 'gmedia_settings', 'GrandMedia_App', array( &$this, 'shell' ) );
|
158 |
+
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'WordPress Media Library', 'grand-media' ), __( 'WP Media Library', 'grand-media' ), 'gmedia_import', 'GrandMedia_WordpressLibrary', array( &$this, 'shell' ) );
|
159 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Gmedia Logs', 'grand-media' ), __( 'Gmedia Logs', 'grand-media' ), 'manage_options', 'GrandMedia_Logs', array( &$this, 'shell' ) );
|
160 |
$this->pages[] = add_submenu_page( 'GrandMedia', __( 'Gmedia Support', 'grand-media' ), __( 'Support', 'grand-media' ), 'manage_options', 'GrandMedia_Support', array( &$this, 'shell' ) );
|
161 |
}
|
284 |
}
|
285 |
$menuData = '';
|
286 |
if ( $menuItem[2] == 'GrandMedia_Modules' && gm_user_can( 'module_manage' ) ) {
|
287 |
+
if ( !empty( $gmGallery->options['notify_new_modules'] ) ) {
|
288 |
+
$menuData .= '<span class="badge badge-success pull-right gm-module-count-' . $gmGallery->options['modules_new'] . '" title="' . __( 'New Modules', 'grand-media' ) . '">' . $gmGallery->options['modules_new'] . '</span>';
|
289 |
+
}
|
290 |
$menuData .= '<span class="badge badge-error pull-right gm-module-count-' . $gmGallery->options['modules_update'] . '" title="' . __( 'Modules Updates', 'grand-media' ) . '">' . $gmGallery->options['modules_update'] . '</span>';
|
291 |
}
|
292 |
|
310 |
<img src="<?php echo plugins_url( '/grand-media/admin/assets/img/icon-128x128.png' ) ?>" width="90" height="90">
|
311 |
</div>
|
312 |
<?php printf( __( '<p>Hey %s,<br>Please help us improve <b>Gmedia Gallery</b>! If you opt-in, some data about your usage of <b>Gmedia Gallery</b> will be sent to <a href="https://codeasily.com/" target="_blank" tabindex="1">codeasily.com</a>.
|
|
|
313 |
If you skip this, that\'s okay! <b>Gmedia Gallery</b> will still work just fine.</p>', 'grand-media' ), $current_user->display_name ); ?>
|
314 |
</div>
|
315 |
<div class="gm-message-actions">
|
admin/ajax.php
CHANGED
@@ -1811,6 +1811,7 @@ function gmedia_import_handler(){
|
|
1811 |
foreach($wpMediaLib as $item){
|
1812 |
$wp_media[] = array(
|
1813 |
'file' => get_attached_file($item->ID),
|
|
|
1814 |
'title' => $item->post_title,
|
1815 |
'description' => $item->post_content
|
1816 |
);
|
1811 |
foreach($wpMediaLib as $item){
|
1812 |
$wp_media[] = array(
|
1813 |
'file' => get_attached_file($item->ID),
|
1814 |
+
'author' => $item->author,
|
1815 |
'title' => $item->post_title,
|
1816 |
'description' => $item->post_content
|
1817 |
);
|
admin/assets/css/gmedia.admin.css
CHANGED
@@ -116,6 +116,10 @@ div.gmedia-modal .row {
|
|
116 |
padding: 0;
|
117 |
}
|
118 |
|
|
|
|
|
|
|
|
|
119 |
body.gmedia-blank div#gmedia-container {
|
120 |
margin:0;
|
121 |
position:static;
|
@@ -322,7 +326,7 @@ div#gm-list-table::before {
|
|
322 |
padding-left:0;
|
323 |
padding-right:0;
|
324 |
}
|
325 |
-
.list-group-item.d-row {
|
326 |
position:relative;
|
327 |
color:inherit;
|
328 |
z-index:1;
|
@@ -1569,6 +1573,13 @@ select[multiple].input-group-xs > .input-group-btn > .btn {
|
|
1569 |
border-top-left-radius:0;
|
1570 |
}
|
1571 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1572 |
.notice.updated.gm-message {
|
1573 |
margin-left: 0;
|
1574 |
margin-bottom: 30px;
|
116 |
padding: 0;
|
117 |
}
|
118 |
|
119 |
+
div#gmedia-container form.row {
|
120 |
+
padding: 15px 0;
|
121 |
+
}
|
122 |
+
|
123 |
body.gmedia-blank div#gmedia-container {
|
124 |
margin:0;
|
125 |
position:static;
|
326 |
padding-left:0;
|
327 |
padding-right:0;
|
328 |
}
|
329 |
+
div.list-group-item.d-row {
|
330 |
position:relative;
|
331 |
color:inherit;
|
332 |
z-index:1;
|
1573 |
border-top-left-radius:0;
|
1574 |
}
|
1575 |
|
1576 |
+
.input-group-addon.btn-primary {
|
1577 |
+
color: #fff;
|
1578 |
+
background-color: #337ab7;
|
1579 |
+
border-color: #2e6da4;
|
1580 |
+
cursor: pointer;
|
1581 |
+
}
|
1582 |
+
|
1583 |
.notice.updated.gm-message {
|
1584 |
margin-left: 0;
|
1585 |
margin-bottom: 30px;
|
admin/assets/js/gmedia.admin.js
CHANGED
@@ -636,9 +636,8 @@ var GmediaTerms = {
|
|
636 |
|
637 |
// Date/Time picker
|
638 |
if(jQuery.fn.datetimepicker){
|
639 |
-
jQuery('.input-group.gmedia_date').datetimepicker({format: 'YYYY-MM-DD HH:mm:ss', focusOnShow:
|
640 |
}
|
641 |
-
|
642 |
}
|
643 |
};
|
644 |
|
636 |
|
637 |
// Date/Time picker
|
638 |
if(jQuery.fn.datetimepicker){
|
639 |
+
jQuery('.input-group.gmedia_date').datetimepicker({format: 'YYYY-MM-DD HH:mm:ss', focusOnShow: true, ignoreReadonly: true, allowInputToggle: true});
|
640 |
}
|
|
|
641 |
}
|
642 |
};
|
643 |
|
admin/pages/galleries/tpl/modal-build-query.php
CHANGED
@@ -126,7 +126,7 @@ global $user_ID, $gmDB, $gmCore
|
|
126 |
<div class="row">
|
127 |
<div class="col-xs-4">
|
128 |
<select name="terms_relation" class="form-control input-sm">
|
129 |
-
<option <?php selected($query_data['terms_relation'], ''); ?> value=""><?php _e('Default (
|
130 |
<option <?php selected($query_data['terms_relation'], 'AND'); ?> value="AND"><?php _e('AND'); ?></option>
|
131 |
<option <?php selected($query_data['terms_relation'], 'OR'); ?> value="OR"><?php _e('OR'); ?></option>
|
132 |
</select>
|
126 |
<div class="row">
|
127 |
<div class="col-xs-4">
|
128 |
<select name="terms_relation" class="form-control input-sm">
|
129 |
+
<option <?php selected($query_data['terms_relation'], ''); ?> value=""><?php _e('Default (OR)'); ?></option>
|
130 |
<option <?php selected($query_data['terms_relation'], 'AND'); ?> value="AND"><?php _e('AND'); ?></option>
|
131 |
<option <?php selected($query_data['terms_relation'], 'OR'); ?> value="OR"><?php _e('OR'); ?></option>
|
132 |
</select>
|
admin/pages/library/tpl/edit-item.php
CHANGED
@@ -196,7 +196,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
196 |
|
197 |
<div class="input-group gmedia_date input-group-sm" data-date-format="YYYY-MM-DD HH:mm:ss">
|
198 |
<input name="date" type="text" class="form-control input-sm" value="<?php echo $item->date; ?>" readonly />
|
199 |
-
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
|
200 |
</div>
|
201 |
</div>
|
202 |
<div class="form-group status-item bg-status-<?php echo $item->status; ?>">
|
196 |
|
197 |
<div class="input-group gmedia_date input-group-sm" data-date-format="YYYY-MM-DD HH:mm:ss">
|
198 |
<input name="date" type="text" class="form-control input-sm" value="<?php echo $item->date; ?>" readonly />
|
199 |
+
<span class="input-group-addon btn-primary"><span class="glyphicon glyphicon-calendar"></span></span>
|
200 |
</div>
|
201 |
</div>
|
202 |
<div class="form-group status-item bg-status-<?php echo $item->status; ?>">
|
admin/pages/modules/functions.php
CHANGED
@@ -29,11 +29,11 @@ function gmedia_module_action_buttons($module){
|
|
29 |
$buttons['update2'] = '<a class="btn btn-warning" target="_blank" href="' . esc_url( $module['buy'] ) . '">' . __( 'Download Update (no license required)', 'grand-media' ) . " (v{$module['update']})</a>";
|
30 |
}
|
31 |
}
|
32 |
-
if(('remote' != $module['place']) && ('
|
33 |
$buttons['delete'] = '<a class="btn btn-danger" href="' . wp_nonce_url($gmCore->get_admin_url(array('delete_module' => $module['name']), array(), $gmProcessor->url), 'gmedia_module_delete', '_wpnonce_module_delete') . '">' . __('Delete Module', 'grand-media') . '</a>';
|
34 |
}
|
35 |
if(!empty($module['download'])){
|
36 |
-
$buttons['download'] = '<a class="btn btn-link" href="' . $module['download'] . '" download="
|
37 |
}
|
38 |
|
39 |
return $buttons;
|
@@ -56,7 +56,7 @@ function gmedia_module_preset_more_data(&$item){
|
|
56 |
$item->taxonomy = 'gmedia_module';
|
57 |
$item->description = array();
|
58 |
$item->global = $user_ID;
|
59 |
-
$item->status = $gmCore->_get('preset_module', '
|
60 |
} else{
|
61 |
if(($preset_module = $gmCore->_get('preset_module')) && $item->status != $preset_module){
|
62 |
$item = new stdClass();
|
29 |
$buttons['update2'] = '<a class="btn btn-warning" target="_blank" href="' . esc_url( $module['buy'] ) . '">' . __( 'Download Update (no license required)', 'grand-media' ) . " (v{$module['update']})</a>";
|
30 |
}
|
31 |
}
|
32 |
+
if(('remote' != $module['place']) && ('amron' != $module['name']) && gm_user_can('module_manage')){
|
33 |
$buttons['delete'] = '<a class="btn btn-danger" href="' . wp_nonce_url($gmCore->get_admin_url(array('delete_module' => $module['name']), array(), $gmProcessor->url), 'gmedia_module_delete', '_wpnonce_module_delete') . '">' . __('Delete Module', 'grand-media') . '</a>';
|
34 |
}
|
35 |
if(!empty($module['download'])){
|
36 |
+
$buttons['download'] = '<a class="btn btn-link" href="' . $module['download'] . '" download="' . $module['name'] . '">' . __('Download module ZIP', 'grand-media') . '</a>';
|
37 |
}
|
38 |
|
39 |
return $buttons;
|
56 |
$item->taxonomy = 'gmedia_module';
|
57 |
$item->description = array();
|
58 |
$item->global = $user_ID;
|
59 |
+
$item->status = $gmCore->_get('preset_module', 'amron');
|
60 |
} else{
|
61 |
if(($preset_module = $gmCore->_get('preset_module')) && $item->status != $preset_module){
|
62 |
$item = new stdClass();
|
admin/pages/settings/tpl/common.php
CHANGED
@@ -163,6 +163,15 @@ if(!defined('ABSPATH')){
|
|
163 |
<p class="help-block"><?php _e('Chosen module will be used for terms pages.', 'grand-media'); ?></p>
|
164 |
</div>
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
<hr />
|
167 |
<div class="form-group">
|
168 |
<label><?php _e('Choose what to show on Author Profile pages', 'grand-media'); ?></label>
|
163 |
<p class="help-block"><?php _e('Chosen module will be used for terms pages.', 'grand-media'); ?></p>
|
164 |
</div>
|
165 |
|
166 |
+
<hr />
|
167 |
+
<div class="form-group">
|
168 |
+
<label><?php _e('Notifications', 'grand-media'); ?></label>
|
169 |
+
<div class="checkbox" style="margin:0;">
|
170 |
+
<input type="hidden" name="set[notify_new_modules]" value="0"/>
|
171 |
+
<label><input type="checkbox" name="set[notify_new_modules]" value="1" <?php checked($gmGallery->options['notify_new_modules'], '1'); ?> /> <?php _e('Show notification label about new modules (green conter)', 'grand-media'); ?> </label>
|
172 |
+
</div>
|
173 |
+
</div>
|
174 |
+
|
175 |
<hr />
|
176 |
<div class="form-group">
|
177 |
<label><?php _e('Choose what to show on Author Profile pages', 'grand-media'); ?></label>
|
admin/pages/terms/tpl/album-edit-item.php
CHANGED
@@ -164,7 +164,7 @@ $_module_preset = !empty($term->meta['_module_preset'][0])? $term->meta['_module
|
|
164 |
|
165 |
<div class="input-group gmedia_date input-group-sm" data-date-format="YYYY-MM-DD HH:mm:ss">
|
166 |
<input name="term[post_date]" type="text" readonly="readonly" class="form-control input-sm" value="<?php echo $term->post_date; ?>" tabindex="-1"/>
|
167 |
-
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
|
168 |
</div>
|
169 |
</div>
|
170 |
<?php } ?>
|
164 |
|
165 |
<div class="input-group gmedia_date input-group-sm" data-date-format="YYYY-MM-DD HH:mm:ss">
|
166 |
<input name="term[post_date]" type="text" readonly="readonly" class="form-control input-sm" value="<?php echo $term->post_date; ?>" tabindex="-1"/>
|
167 |
+
<span class="input-group-addon btn-primary"><span class="glyphicon glyphicon-calendar"></span></span>
|
168 |
</div>
|
169 |
</div>
|
170 |
<?php } ?>
|
app/access.php
CHANGED
@@ -1267,6 +1267,11 @@ function gmedia_ios_app_processor($action, $data, $filter = true, $cache = true)
|
|
1267 |
}
|
1268 |
unset($meta['_rating']);
|
1269 |
|
|
|
|
|
|
|
|
|
|
|
1270 |
if(!empty($data['meta']) && !empty($meta)){
|
1271 |
foreach($meta as $key => $val){
|
1272 |
if('_peaks' == $key){
|
1267 |
}
|
1268 |
unset($meta['_rating']);
|
1269 |
|
1270 |
+
if(isset($meta['_related'][0])){
|
1271 |
+
$gmedias[ $i ]->meta['related'] = maybe_unserialize($meta['_related'][0]);
|
1272 |
+
}
|
1273 |
+
unset($meta['_related']);
|
1274 |
+
|
1275 |
if(!empty($data['meta']) && !empty($meta)){
|
1276 |
foreach($meta as $key => $val){
|
1277 |
if('_peaks' == $key){
|
assets/gmedia.global.front.css
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
.
|
|
1 |
+
.gmedia-gallery * { box-sizing: border-box !important; }
|
2 |
+
.mfp-gmedia-open .mfp-arrow { top: auto !important; margin-top: auto !important; }
|
config/setup.php
CHANGED
@@ -58,7 +58,8 @@ function gmedia_default_options(){
|
|
58 |
$gm['in_album_orderby'] = 'ID';
|
59 |
$gm['in_album_order'] = 'DESC';
|
60 |
$gm['in_album_status'] = 'publish';
|
61 |
-
$gm['default_gmedia_module'] = '
|
|
|
62 |
|
63 |
$gm['isolation_mode'] = '0';
|
64 |
$gm['shortcode_raw'] = '0';
|
58 |
$gm['in_album_orderby'] = 'ID';
|
59 |
$gm['in_album_order'] = 'DESC';
|
60 |
$gm['in_album_status'] = 'publish';
|
61 |
+
$gm['default_gmedia_module'] = 'amron';
|
62 |
+
$gm['notify_new_modules'] = '1';
|
63 |
|
64 |
$gm['isolation_mode'] = '0';
|
65 |
$gm['shortcode_raw'] = '0';
|
config/update.php
CHANGED
@@ -886,6 +886,7 @@ function gmedia_quite_update(){
|
|
886 |
$gmCore->app_service('app_updatecron');
|
887 |
}
|
888 |
|
|
|
889 |
$gmCore->delete_folder($gmCore->upload['path'] . '/module/phantom');
|
890 |
$gmCore->delete_folder($gmCore->upload['path'] . '/module/jq-mplayer');
|
891 |
$gmCore->delete_folder($gmCore->upload['path'] . '/module/wp-videoplayer');
|
886 |
$gmCore->app_service('app_updatecron');
|
887 |
}
|
888 |
|
889 |
+
$gmCore->delete_folder($gmCore->upload['path'] . '/module/amron');
|
890 |
$gmCore->delete_folder($gmCore->upload['path'] . '/module/phantom');
|
891 |
$gmCore->delete_folder($gmCore->upload['path'] . '/module/jq-mplayer');
|
892 |
$gmCore->delete_folder($gmCore->upload['path'] . '/module/wp-videoplayer');
|
grand-media.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin Name: Gmedia Gallery
|
4 |
* Plugin URI: http://wordpress.org/extend/plugins/grand-media/
|
5 |
* Description: Gmedia Gallery - powerful media library plugin for creating beautiful galleries and managing files.
|
6 |
-
* Version: 1.
|
7 |
* Author: Rattus
|
8 |
* Author URI: https://codeasily.com/
|
9 |
* Requires at least: 3.7
|
10 |
-
* Tested up to:
|
11 |
* Text Domain: grand-media
|
12 |
* Domain Path: /lang
|
13 |
*
|
@@ -32,447 +32,448 @@
|
|
32 |
*/
|
33 |
|
34 |
// Stop direct call
|
35 |
-
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])){
|
36 |
-
|
37 |
}
|
38 |
|
39 |
-
if( !class_exists('Gmedia')){
|
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 |
-
// Pass the init check or show a message
|
146 |
-
if(get_option('gmediaInitCheck')){
|
147 |
-
add_action('admin_notices', array(&$this, 'admin_notices'));
|
148 |
-
}
|
149 |
-
|
150 |
-
require_once(dirname(__FILE__) . '/admin/functions.php');
|
151 |
-
|
152 |
-
require_once(dirname(__FILE__) . '/admin/class.processor.php');
|
153 |
-
|
154 |
-
} else{
|
155 |
-
|
156 |
-
// Add the script and style files
|
157 |
-
//add_action('wp_enqueue_scripts', array(&$this, 'load_scripts'), 4);
|
158 |
-
|
159 |
-
require_once(dirname(__FILE__) . '/inc/frontend.filters.php');
|
160 |
-
|
161 |
-
// Add a version number to the header
|
162 |
-
add_action('wp_head', array(&$this, 'gmedia_head_meta'));
|
163 |
-
add_action('wp_footer', array(&$this, 'load_module_scripts'));
|
164 |
-
|
165 |
-
}
|
166 |
-
|
167 |
-
add_action('gmedia_head', array(&$this, 'gmedia_head_meta'));
|
168 |
-
add_action('gmedia_head', array(&$this, 'load_scripts'), 2);
|
169 |
-
add_action('gmedia_head', 'wp_print_head_scripts', 9);
|
170 |
-
add_action('gmedia_enqueue_scripts', array(&$this, 'load_module_scripts'));
|
171 |
|
172 |
-
|
173 |
-
|
|
|
|
|
174 |
|
175 |
-
|
176 |
|
177 |
-
|
178 |
-
$lk = strtolower($this->options['license_key']);
|
179 |
-
$db_version = get_option('gmediaDbVersion');
|
180 |
-
echo "\n<!-- <meta name='GmediaGallery' version='{$this->version}/{$db_version}' license='{$lk}' /> -->\n";
|
181 |
-
}
|
182 |
|
183 |
-
|
184 |
-
echo '<div id="message" class="error"><p><strong>' . get_option('gmediaInitCheck') . '</strong></p></div>';
|
185 |
-
delete_option('gmediaInitCheck');
|
186 |
-
}
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
*/
|
191 |
-
function required_version(){
|
192 |
-
global $wp_version;
|
193 |
|
194 |
-
|
195 |
-
if(version_compare($wp_version, $this->minium_WP, '<')){
|
196 |
-
$note = sprintf(__('Sorry, Gmedia Gallery works only under WordPress %s or higher', 'grand-media'), $this->minium_WP);
|
197 |
-
update_option('gmediaInitCheck', $note);
|
198 |
-
add_action('admin_notices', array(&$this, 'admin_notices'));
|
199 |
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
$note = sprintf(__('Attention! Your server php version is: %s. Gmedia Gallery requires php version 5.3+ in order to run properly. Please upgrade your server!', 'grand-media'), phpversion());
|
204 |
-
update_option('gmediaInitCheck', $note);
|
205 |
-
add_action('admin_notices', array(&$this, 'admin_notices'));
|
206 |
|
207 |
-
|
208 |
-
}
|
209 |
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
* Called via Setup and register_activate hook after gmedia_install() function
|
215 |
-
*/
|
216 |
-
function gmedia_after_activation(){
|
217 |
-
global $gmCore;
|
218 |
-
|
219 |
-
delete_option('gmediaActivated');
|
220 |
-
|
221 |
-
flush_rewrite_rules(false);
|
222 |
-
|
223 |
-
if((int) $this->options['mobile_app']){
|
224 |
-
wp_clear_scheduled_hook('gmedia_app_cronjob');
|
225 |
-
wp_schedule_event(time(), 'gmedia_app', 'gmedia_app_cronjob');
|
226 |
-
|
227 |
-
$gmCore->app_service('app_activateplugin');
|
228 |
-
}
|
229 |
-
|
230 |
-
$wp_installing = (bool) (defined('WP_INSTALLING') && WP_INSTALLING);
|
231 |
-
if( !wp_next_scheduled('gmedia_modules_update') && !$wp_installing){
|
232 |
-
wp_schedule_event(time(), 'daily', 'gmedia_modules_update');
|
233 |
-
}
|
234 |
-
}
|
235 |
-
|
236 |
-
function upgrade(){
|
237 |
-
// Queue upgrades
|
238 |
-
$current_version = get_option('gmediaVersion', null);
|
239 |
-
$current_db_version = get_option('gmediaDbVersion', null);
|
240 |
-
|
241 |
-
if(null === $current_db_version){
|
242 |
-
add_option("gmediaDbVersion", GMEDIA_DBVERSION);
|
243 |
-
} elseif(version_compare($current_db_version, GMEDIA_DBVERSION, '<')){
|
244 |
-
require_once(dirname(__FILE__) . '/config/update.php');
|
245 |
-
|
246 |
-
if(get_transient('gmediaUpgrade') || (isset($_GET['do_update']) && ('gmedia' == $_GET['do_update']))){
|
247 |
-
add_action('admin_notices', 'gmedia_upgrade_process_admin_notice');
|
248 |
-
} else{
|
249 |
-
add_action('admin_notices', 'gmedia_upgrade_required_admin_notice');
|
250 |
-
}
|
251 |
-
}
|
252 |
|
253 |
-
|
254 |
-
|
255 |
|
256 |
-
|
257 |
-
add_action('init', 'gmedia_flush_rewrite_rules', 1000);
|
258 |
-
} elseif(version_compare($current_version, GMEDIA_VERSION, '<')){
|
259 |
-
require_once(dirname(__FILE__) . '/config/update.php');
|
260 |
|
261 |
-
|
262 |
-
|
263 |
-
|
|
|
|
|
264 |
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
global $gmCore;
|
270 |
-
$gmCore->app_service('app_updatecron');
|
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 |
-
include_once(dirname(__FILE__) . '/config/setup.php');
|
298 |
-
// Load the options
|
299 |
-
$default_options = gmedia_default_options();
|
300 |
-
$db_options = get_option('gmediaOptions');
|
301 |
-
if( !is_array($db_options)){
|
302 |
-
$db_options = array();
|
303 |
-
}
|
304 |
-
$this->options = array_merge($default_options, $db_options);
|
305 |
-
}
|
306 |
|
307 |
-
|
|
|
|
|
308 |
|
309 |
-
|
310 |
-
|
311 |
-
require_once(dirname(__FILE__) . '/admin/ajax.php');
|
312 |
-
} else{
|
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 |
// $files = glob($module['path'] . '/css/*.css', GLOB_NOSORT);
|
477 |
// if(!empty($files)){
|
478 |
// $files = array_map('basename', $files);
|
@@ -480,520 +481,532 @@ if( !class_exists('Gmedia')){
|
|
480 |
// $this->import_styles[] = "{$module['url']}/css/{$file}";
|
481 |
// }
|
482 |
// }
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
}
|
496 |
-
}
|
497 |
-
$this->do_module = array();
|
498 |
-
if( !empty($this->import_styles)){
|
499 |
-
add_action('wp_print_head_scripts', array(&$this, 'print_import_styles'), 1);
|
500 |
-
add_action('wp_print_footer_scripts', array(&$this, 'print_import_styles'), 1);
|
501 |
-
}
|
502 |
-
if($xmlhttprequest){
|
503 |
-
$this->print_import_styles();
|
504 |
-
}
|
505 |
-
}
|
506 |
-
|
507 |
-
/** Return module styles like <style>@import(...)</style>
|
508 |
-
*
|
509 |
-
* @param $module
|
510 |
-
*
|
511 |
-
* @return string
|
512 |
-
*/
|
513 |
-
function load_module_styles($module){
|
514 |
-
$module_styles = '';
|
515 |
-
$files = glob($module['path'] . '/css/*.css', GLOB_NOSORT);
|
516 |
-
if( !empty($files)){
|
517 |
-
$files = array_map('basename', $files);
|
518 |
-
foreach($files as $file){
|
519 |
-
$src = "{$module['url']}/css/{$file}";
|
520 |
-
if('http' !== substr($src, 0, 4)){
|
521 |
-
$src = site_url($src);
|
522 |
-
}
|
523 |
-
$module_styles .= "@import url('{$src}') all;";
|
524 |
-
}
|
525 |
-
}
|
526 |
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
}
|
542 |
-
}
|
543 |
-
|
544 |
-
/**
|
545 |
-
* Call user function to all blogs in network
|
546 |
-
* called during register_activation hook
|
547 |
-
*
|
548 |
-
* @param $pfunction string UserFunction name
|
549 |
-
* @param $networkwide bool Check if plugin has been activated for the entire blog network.
|
550 |
-
*
|
551 |
-
* @return void
|
552 |
-
*/
|
553 |
-
static function network_propagate($pfunction, $networkwide){
|
554 |
-
|
555 |
-
include_once(dirname(__FILE__) . '/config/setup.php');
|
556 |
-
|
557 |
-
if(function_exists('is_multisite') && is_multisite()){
|
558 |
-
// check if it is a network activation - if so, run the activation function
|
559 |
-
// for each blog id
|
560 |
-
if($networkwide){
|
561 |
-
global $wpdb;
|
562 |
-
//$old_blog = $wpdb->blogid;
|
563 |
-
// Get all blog ids
|
564 |
-
$blogids = $wpdb->get_col("SELECT blog_id FROM {$wpdb->blogs}");
|
565 |
-
foreach($blogids as $blog_id){
|
566 |
-
switch_to_blog($blog_id);
|
567 |
-
call_user_func($pfunction);
|
568 |
}
|
569 |
-
|
570 |
-
|
|
|
571 |
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
/**
|
579 |
-
* @param $networkwide
|
580 |
-
*/
|
581 |
-
function activate($networkwide){
|
582 |
-
$this->network_propagate('gmedia_install', $networkwide);
|
583 |
-
}
|
584 |
-
|
585 |
-
/**
|
586 |
-
* @param $networkwide
|
587 |
-
*/
|
588 |
-
function deactivate($networkwide){
|
589 |
-
$this->network_propagate('gmedia_deactivate', $networkwide);
|
590 |
-
}
|
591 |
-
|
592 |
-
/*
|
593 |
-
static function uninstall($networkwide) {
|
594 |
-
//wp_die( '<h1>This is run on <code>init</code> during uninstallation</h1>', 'Uninstallation hook example' );
|
595 |
-
Gmedia::network_propagate('gmedia_uninstall', $networkwide);
|
596 |
-
}
|
597 |
-
*/
|
598 |
-
|
599 |
-
/**
|
600 |
-
* @param $blog_id
|
601 |
-
* @param $user_id
|
602 |
-
* @param $domain
|
603 |
-
* @param $path
|
604 |
-
* @param $site_id
|
605 |
-
* @param $meta
|
606 |
-
*/
|
607 |
-
function new_blog($blog_id, $user_id, $domain, $path, $site_id, $meta){
|
608 |
-
if(is_plugin_active_for_network(GMEDIA_FOLDER . '/grand-media.php')){
|
609 |
-
include_once(dirname(__FILE__) . '/config/setup.php');
|
610 |
-
switch_to_blog($blog_id);
|
611 |
-
gmedia_install();
|
612 |
-
restore_current_blog();
|
613 |
-
}
|
614 |
-
}
|
615 |
-
|
616 |
-
/**
|
617 |
-
* @param $user_id
|
618 |
-
* @param $reassign
|
619 |
-
*/
|
620 |
-
function reassign_media($user_id, $reassign){
|
621 |
-
global $gmDB;
|
622 |
-
$gmDB->reassign_media($user_id, $reassign);
|
623 |
-
}
|
624 |
-
|
625 |
-
/**
|
626 |
-
* Register Gmedia Post Types
|
627 |
-
*/
|
628 |
-
function gmedia_post_type(){
|
629 |
-
$args = array(
|
630 |
-
'label' => __('Gmedia Posts', 'grand-media'),
|
631 |
-
'supports' => array('comments'),
|
632 |
-
'hierarchical' => false,
|
633 |
-
'public' => true,
|
634 |
-
'show_ui' => false,
|
635 |
-
'show_in_menu' => false,
|
636 |
-
'show_in_admin_bar' => true,
|
637 |
-
'show_in_nav_menus' => false,
|
638 |
-
'can_export' => false,
|
639 |
-
'has_archive' => (bool) ((int) $this->options['gmedia_has_archive']), //'gmedia-library',
|
640 |
-
'publicly_queryable' => true,
|
641 |
-
'exclude_from_search' => (bool) ((int) $this->options['gmedia_exclude_from_search']),
|
642 |
-
'rewrite' => array('slug' => $this->options['gmedia_post_slug']),
|
643 |
-
'map_meta_cap' => true,
|
644 |
-
'capabilities' => array(
|
645 |
-
'read_private_posts' => 'read_private_gmedia_posts',
|
646 |
-
// 'edit_comment' => 'edit_gmedia_comment',
|
647 |
-
// 'moderate_comments' => 'moderate_gmedia_comments',
|
648 |
-
// 'edit_post' => 'edit_gmedia_post',
|
649 |
-
// 'edit_posts' => 'edit_gmedia_posts',
|
650 |
-
'create_posts' => false
|
651 |
-
)
|
652 |
-
);
|
653 |
-
register_post_type('gmedia', $args);
|
654 |
-
|
655 |
-
$args['label'] = __('Gmedia Albums', 'grand-media');
|
656 |
-
$args['show_in_nav_menus'] = true;
|
657 |
-
$args['hierarchical'] = true;
|
658 |
-
$args['has_archive'] = (bool) ((int) $this->options['gmedia_album_has_archive']);
|
659 |
-
$args['exclude_from_search'] = (bool) ((int) $this->options['gmedia_album_exclude_from_search']);
|
660 |
-
$args['rewrite'] = array('slug' => $this->options['gmedia_album_post_slug']);
|
661 |
-
register_post_type('gmedia_album', $args);
|
662 |
-
|
663 |
-
$args['label'] = __('Gmedia Galleries', 'grand-media');
|
664 |
-
$args['has_archive'] = (bool) ((int) $this->options['gmedia_gallery_has_archive']);
|
665 |
-
$args['exclude_from_search'] = (bool) ((int) $this->options['gmedia_gallery_exclude_from_search']);
|
666 |
-
$args['rewrite'] = array('slug' => $this->options['gmedia_gallery_post_slug']);
|
667 |
-
register_post_type('gmedia_gallery', $args);
|
668 |
-
|
669 |
-
add_filter('get_gmedia_metadata', array($this, 'get_gmedia_metadata'), 10, 4);
|
670 |
-
add_filter('get_gmedia_term_metadata', array($this, 'get_gmedia_term_metadata'), 10, 4);
|
671 |
-
add_filter('get_edit_post_link', array($this, 'gmedia_post_type_edit_link'), 10, 3);
|
672 |
-
|
673 |
-
|
674 |
-
$args = array(
|
675 |
-
'hierarchical' => false,
|
676 |
-
'public' => true,
|
677 |
-
'show_ui' => false,
|
678 |
-
'show_admin_column' => false,
|
679 |
-
'show_in_nav_menus' => false,
|
680 |
-
'show_tagcloud' => false,
|
681 |
-
'rewrite' => array('slug' => 'gmedia-category')
|
682 |
-
);
|
683 |
-
$args['labels'] = array(
|
684 |
-
'name' => _x('Gmedia Categories', 'Taxonomy General Name', 'grand-media'),
|
685 |
-
'singular_name' => _x('Gmedia Category', 'Taxonomy Singular Name', 'grand-media'),
|
686 |
-
'menu_name' => __('Gmedia Categories', 'grand-media')
|
687 |
-
);
|
688 |
-
register_taxonomy('gmedia_category', null, $args);
|
689 |
-
|
690 |
-
$args['rewrite'] = array('slug' => 'gmedia-tag');
|
691 |
-
$args['labels'] = array(
|
692 |
-
'name' => _x('Gmedia Tags', 'Taxonomy General Name', 'grand-media'),
|
693 |
-
'singular_name' => _x('Gmedia Tag', 'Taxonomy Singular Name', 'grand-media'),
|
694 |
-
'menu_name' => __('Gmedia Tags', 'grand-media')
|
695 |
-
);
|
696 |
-
register_taxonomy('gmedia_tag', null, $args);
|
697 |
-
|
698 |
-
add_filter('wp_link_query_args', array($this, 'exclude_gmedia_from_link_query'));
|
699 |
-
|
700 |
-
if( !empty($this->options['flush_rewrite_rules'])){
|
701 |
-
unset($this->options['flush_rewrite_rules']);
|
702 |
-
update_option('gmediaOptions', $this->options);
|
703 |
-
flush_rewrite_rules(false);
|
704 |
-
}
|
705 |
-
}
|
706 |
-
|
707 |
-
/**
|
708 |
-
* Get gmedia metadata
|
709 |
-
*
|
710 |
-
* @param $meta
|
711 |
-
* @param $post_ID
|
712 |
-
* @param $meta_key
|
713 |
-
* @param $single
|
714 |
-
*
|
715 |
-
* @return array|string
|
716 |
-
*/
|
717 |
-
function get_gmedia_metadata($meta, $post_ID, $meta_key, $single){
|
718 |
-
global $gmDB;
|
719 |
-
$gmedia_id = get_post_meta($post_ID, '_gmedia_ID', true);
|
720 |
-
$meta = $gmDB->get_metadata('gmedia', $gmedia_id, $meta_key, $single);
|
721 |
-
|
722 |
-
return $meta;
|
723 |
-
}
|
724 |
-
|
725 |
-
/**
|
726 |
-
* Get gmedia term metadata
|
727 |
-
*
|
728 |
-
* @param $meta
|
729 |
-
* @param $post_ID
|
730 |
-
* @param $meta_key
|
731 |
-
* @param $single
|
732 |
-
*
|
733 |
-
* @return array|string
|
734 |
-
*/
|
735 |
-
function get_gmedia_term_metadata($meta, $post_ID, $meta_key, $single){
|
736 |
-
global $gmDB;
|
737 |
-
$gmedia_term_id = get_post_meta($post_ID, '_gmedia_term_ID', true);
|
738 |
-
$meta = $gmDB->get_metadata('gmedia_term', $gmedia_term_id, $meta_key, $single);
|
739 |
-
|
740 |
-
return $meta;
|
741 |
-
}
|
742 |
-
|
743 |
-
/**
|
744 |
-
* Edit link for gmedia
|
745 |
-
*
|
746 |
-
* @param $link
|
747 |
-
* @param $post_ID
|
748 |
-
* @param $context
|
749 |
-
*
|
750 |
-
* @return string|void
|
751 |
-
*/
|
752 |
-
function gmedia_post_type_edit_link($link, $post_ID, $context){
|
753 |
-
$post = get_post($post_ID);
|
754 |
-
if(isset($post->ID) && 'gmedia' == substr($post->post_type, 0, 6)){
|
755 |
-
global $gmDB;
|
756 |
-
if($post->post_type == 'gmedia'){
|
757 |
-
$gmedia_id = get_post_meta($post->ID, '_gmedia_ID', true);
|
758 |
-
$gmedia = $gmDB->get_gmedia($gmedia_id);
|
759 |
-
if($gmedia){
|
760 |
-
$link = admin_url("admin.php?page=GrandMedia&mode=edit&gmedia__in={$gmedia->ID}");
|
761 |
-
} else{
|
762 |
-
wp_delete_post($post->ID, true);
|
763 |
-
$link = '#';
|
764 |
-
}
|
765 |
-
} else{
|
766 |
-
$term_id = get_post_meta($post->ID, '_gmedia_term_ID', true);
|
767 |
-
$term = $gmDB->get_term($term_id);
|
768 |
-
if($term){
|
769 |
-
if($term->taxonomy == 'gmedia_album'){
|
770 |
-
$link = admin_url("admin.php?page=GrandMedia_Albums&edit_term={$term->term_id}");
|
771 |
-
} elseif($term->taxonomy == 'gmedia_gallery'){
|
772 |
-
$link = admin_url("admin.php?page=GrandMedia_Galleries&edit_term={$term->term_id}");
|
773 |
-
}
|
774 |
-
} else{
|
775 |
-
wp_delete_post($post->ID, true);
|
776 |
-
$link = '#';
|
777 |
-
}
|
778 |
-
}
|
779 |
-
}
|
780 |
-
|
781 |
-
return $link;
|
782 |
-
}
|
783 |
-
|
784 |
-
function register_gmedia_widget(){
|
785 |
-
require_once(dirname(__FILE__) . '/inc/widget.php');
|
786 |
-
register_widget('GrandMedia_Gallery_Widget');
|
787 |
-
register_widget('GrandMedia_Album_Widget');
|
788 |
-
}
|
789 |
-
|
790 |
-
/**
|
791 |
-
* @param $query
|
792 |
-
*
|
793 |
-
* @return mixed
|
794 |
-
*/
|
795 |
-
function exclude_gmedia_from_link_query($query){
|
796 |
-
if(($key = array_search('gmedia', $query['post_type'])) !== false){
|
797 |
-
unset($query['post_type'][ $key ]);
|
798 |
-
}
|
799 |
-
|
800 |
-
return $query;
|
801 |
-
}
|
802 |
-
|
803 |
-
/**
|
804 |
-
* @param $shedules
|
805 |
-
*
|
806 |
-
* @return array
|
807 |
-
*/
|
808 |
-
function gmedia_cron_schedules($shedules){
|
809 |
-
$gmedia_shedules = array('gmedia_app' => array('interval' => 5 * DAY_IN_SECONDS, 'display' => __('Gmedia App Defined')));
|
810 |
-
$shedules = array_merge($shedules, $gmedia_shedules);
|
811 |
-
|
812 |
-
return $shedules;
|
813 |
-
}
|
814 |
-
|
815 |
-
function gmedia_app_cronjob(){
|
816 |
-
global $gmCore;
|
817 |
-
$gmCore->app_service('app_updatecron');
|
818 |
-
}
|
819 |
-
|
820 |
-
function gmedia_modules_update(){
|
821 |
-
global $gmCore;
|
822 |
-
$gmCore->modules_update();
|
823 |
-
}
|
824 |
-
|
825 |
-
|
826 |
-
/*
|
827 |
-
// PLUGIN MESSAGE ON PLUGINS PAGE
|
828 |
-
function check_message_version($file)
|
829 |
-
{
|
830 |
-
static $this_plugin;
|
831 |
-
global $wp_version;
|
832 |
-
if (!$this_plugin) $this_plugin = GMEDIA_FOLDER;
|
833 |
-
|
834 |
-
if ($file == $this_plugin ){
|
835 |
-
$checkfile = "http://codeasily.com/grand-flam.chk";
|
836 |
-
|
837 |
-
$message = wp_remote_fopen($checkfile);
|
838 |
-
|
839 |
-
if($message)
|
840 |
-
{
|
841 |
-
preg_match( '|grand'.str_replace('.','',GMEDIA_VERSION).':(.*)$|mi', $message, $theMessage );
|
842 |
-
$columns = 5;
|
843 |
-
if ( !empty( $theMessage ) )
|
844 |
-
{
|
845 |
-
$theMessage = trim($theMessage[1]);
|
846 |
-
echo '<td colspan="'.$columns.'" class="plugin-update" style="line-height:1.2em; font-size:11px; padding:1px;"><div id="flag-update-msg" style="padding-bottom:1px;" >'.$theMessage.'</div></td>';
|
847 |
-
} else {
|
848 |
-
return;
|
849 |
-
}
|
850 |
-
}
|
851 |
-
}
|
852 |
-
}
|
853 |
-
*/
|
854 |
-
|
855 |
-
function add_plugin_links($links, $file){
|
856 |
-
if($file == plugin_basename(__FILE__)){
|
857 |
-
$links[] = '<a href="admin.php?page=GrandMedia_Settings">' . __('Settings', 'grand-media') . '</a>';
|
858 |
-
$links[] = '<a href="admin.php?page=GrandMedia_Modules">' . __('Modules', 'grand-media') . '</a>';
|
859 |
-
$links[] = '<a href="https://codeasily.com/product/one-site-license/">' . __('Get Premium', 'grand-media') . '</a>';
|
860 |
-
$links[] = '<a href="https://codeasily.com/donate/">' . __('Donate', 'grand-media') . '</a>';
|
861 |
-
}
|
862 |
-
|
863 |
-
return $links;
|
864 |
-
}
|
865 |
-
|
866 |
-
function add_plugin_feedback(){
|
867 |
-
global $pagenow;
|
868 |
-
if('plugins.php' !== $pagenow){
|
869 |
-
return;
|
870 |
-
}
|
871 |
-
?>
|
872 |
-
<script type="text/javascript">
|
873 |
-
jQuery(function($){
|
874 |
-
function gm_parse_query(s){
|
875 |
-
var j = {}, res = s.split(/&/gm).map(function(e){
|
876 |
-
var o = e.split(/=/), pt = j;
|
877 |
-
if(typeof o[1] == 'undefined'){
|
878 |
-
o[1] = '';
|
879 |
-
}
|
880 |
-
o[0].replace(/^(\w+)\[([^&]*)\]/, '$1][$2').split(/\]\[/).map(function(e, i, a){
|
881 |
-
if(e === ''){
|
882 |
-
e = Object.keys(pt).length;
|
883 |
-
}
|
884 |
-
pt = (pt[e] = pt[e] || (i == a.length - 1? decodeURIComponent(o[1].replace(/\+/, ' ')) : {}));
|
885 |
-
});
|
886 |
-
});
|
887 |
-
return j;
|
888 |
}
|
889 |
|
890 |
-
$('
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
parent.siblings('.has-input').find('.reason-input').hide().find('input').prop('disabled', true);
|
900 |
-
if(parent.hasClass('has-input')){
|
901 |
-
if($(this).is(':checked')){
|
902 |
-
$('.reason-input', parent).show().find('input').prop('disabled', false);
|
903 |
-
}
|
904 |
-
}
|
905 |
-
});
|
906 |
-
$('#gmedia-feedback .gm-button-submit-deactivate').on('click', function(e){
|
907 |
-
e.preventDefault();
|
908 |
-
|
909 |
-
var feedback = $('#gmedia-feedback input').serialize();
|
910 |
-
feedback = gm_parse_query(feedback);
|
911 |
-
|
912 |
-
if(feedback.reason === ''){
|
913 |
-
window.location = deactivate_link;
|
914 |
-
return;
|
915 |
-
}
|
916 |
-
|
917 |
-
$('#gmedia-feedback .spinner').addClass('is-active');
|
918 |
-
var post_data = {
|
919 |
-
action: 'gmedia_feedback',
|
920 |
-
data: feedback,
|
921 |
-
_wpnonce_gmedia_feedback: '<?php echo wp_create_nonce('gmedia_feedback'); ?>'
|
922 |
-
};
|
923 |
-
$.post(ajaxurl, post_data).always(function(data){
|
924 |
-
$('#gmedia-feedback .spinner').removeClass('is-active');
|
925 |
-
window.location = deactivate_link;
|
926 |
-
});
|
927 |
-
return false;
|
928 |
-
});
|
929 |
-
$('#gmedia-feedback .gm-button-close').on('click', function(){
|
930 |
-
$('#gmedia-feedback').remove();
|
931 |
-
return false;
|
932 |
-
});
|
933 |
-
|
934 |
-
return false;
|
935 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
936 |
});
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
998 |
|
999 |
}
|
3 |
* Plugin Name: Gmedia Gallery
|
4 |
* Plugin URI: http://wordpress.org/extend/plugins/grand-media/
|
5 |
* Description: Gmedia Gallery - powerful media library plugin for creating beautiful galleries and managing files.
|
6 |
+
* Version: 1.16.4
|
7 |
* Author: Rattus
|
8 |
* Author URI: https://codeasily.com/
|
9 |
* Requires at least: 3.7
|
10 |
+
* Tested up to: 5.2
|
11 |
* Text Domain: grand-media
|
12 |
* Domain Path: /lang
|
13 |
*
|
32 |
*/
|
33 |
|
34 |
// Stop direct call
|
35 |
+
if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
|
36 |
+
die( 'You are not allowed to call this page directly.' );
|
37 |
}
|
38 |
|
39 |
+
if ( ! class_exists( 'Gmedia' ) ) {
|
40 |
+
/**
|
41 |
+
* Class Gmedia
|
42 |
+
*/
|
43 |
+
class Gmedia {
|
44 |
|
45 |
+
var $version = '1.16.4';
|
46 |
+
var $dbversion = '1.8.0';
|
47 |
+
var $minium_WP = '3.7';
|
48 |
+
var $options = '';
|
49 |
+
var $do_module = array();
|
50 |
+
var $import_styles = array();
|
51 |
+
var $shortcode = array();
|
52 |
|
53 |
+
/**
|
54 |
+
*
|
55 |
+
*/
|
56 |
+
function __construct() {
|
57 |
|
58 |
+
// Stop the plugin if we missed the requirements
|
59 |
+
if ( ! $this->required_version() ) {
|
60 |
+
return;
|
61 |
+
}
|
62 |
|
63 |
+
// Get some constants first
|
64 |
+
include_once( dirname( __FILE__ ) . '/config.php' );
|
65 |
+
$this->load_options();
|
66 |
+
$this->define_constant();
|
67 |
+
$this->define_tables();
|
68 |
|
69 |
+
// Load global libraries
|
70 |
+
require_once( dirname( __FILE__ ) . '/inc/core.php' );
|
71 |
+
require_once( dirname( __FILE__ ) . '/inc/db.connect.php' );
|
72 |
+
require_once( dirname( __FILE__ ) . '/inc/permalinks.php' );
|
73 |
|
74 |
+
if ( $this->options['debug_mode'] ) {
|
75 |
+
ini_set( 'display_errors', true );
|
76 |
+
error_reporting( E_ALL );
|
77 |
+
} else {
|
78 |
+
@ini_set( 'display_errors', true ); //Ensure that Fatal errors are displayed.
|
79 |
+
error_reporting( E_CORE_ERROR | E_COMPILE_ERROR | E_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR );
|
80 |
+
}
|
81 |
|
82 |
+
$this->plugin_name = plugin_basename( __FILE__ );
|
83 |
|
84 |
+
add_filter( 'cron_schedules', array( &$this, 'gmedia_cron_schedules' ) );
|
85 |
|
86 |
+
// Init options & tables during activation & deregister init option
|
87 |
+
register_activation_hook( $this->plugin_name, array( &$this, 'activate' ) );
|
88 |
+
register_deactivation_hook( $this->plugin_name, array( &$this, 'deactivate' ) );
|
89 |
|
90 |
+
// Register a uninstall hook to remove all tables & option automatic
|
91 |
+
//register_uninstall_hook( $this->plugin_name, array(__CLASS__, 'uninstall' ) );
|
92 |
|
93 |
+
add_action( 'wp_enqueue_scripts', array( &$this, 'register_scripts_frontend' ), 20 );
|
94 |
|
95 |
+
add_action( 'admin_enqueue_scripts', array( &$this, 'register_scripts_backend' ), 8 );
|
96 |
|
97 |
+
add_action( 'wpmu_new_blog', array( &$this, 'new_blog' ), 10, 6 );
|
98 |
|
99 |
+
// Start this plugin once all other plugins are fully loaded
|
100 |
+
add_action( 'plugins_loaded', array( &$this, 'start_plugin' ) );
|
101 |
|
102 |
+
add_action( 'deleted_user', array( &$this, 'reassign_media' ), 10, 2 );
|
103 |
|
104 |
+
add_action( 'init', array( &$this, 'gmedia_post_type' ), 0 );
|
105 |
+
add_action( 'init', array( &$this, 'compatibility' ), 11 );
|
106 |
+
//add_action('init', array(&$this, 'gm_schedule_update_checks'), 0);
|
107 |
|
108 |
+
// register widget
|
109 |
+
add_action( 'widgets_init', array( &$this, 'register_gmedia_widget' ) );
|
110 |
|
111 |
+
add_action( 'gmedia_app_cronjob', array( &$this, 'gmedia_app_cronjob' ) );
|
112 |
+
add_action( 'gmedia_modules_update', array( &$this, 'gmedia_modules_update' ) );
|
113 |
|
114 |
+
//Add some message on the plugins page
|
115 |
+
//add_action( 'after_plugin_row', array(&$this, 'check_message_version') );
|
116 |
+
//Add some links on the plugins page
|
117 |
+
add_filter( 'plugin_row_meta', array( &$this, 'add_plugin_links' ), 10, 2 );
|
118 |
+
add_action( 'admin_footer', array( &$this, 'add_plugin_feedback' ) );
|
119 |
|
120 |
+
}
|
121 |
|
122 |
+
function start_plugin() {
|
123 |
|
124 |
+
$this->load_dependencies();
|
125 |
|
126 |
+
// Load the language file
|
127 |
+
$this->load_textdomain();
|
128 |
|
129 |
+
require_once( dirname( __FILE__ ) . '/inc/functions.php' );
|
130 |
|
131 |
+
// Check for upgrade
|
132 |
+
$this->upgrade();
|
133 |
|
134 |
+
require_once( dirname( __FILE__ ) . '/inc/hashids.php' );
|
135 |
+
require_once( dirname( __FILE__ ) . '/inc/shortcodes.php' );
|
136 |
|
137 |
+
// Load the admin panel or the frontend functions
|
138 |
+
if ( is_admin() ) {
|
139 |
|
140 |
+
// Pass the init check or show a message
|
141 |
+
if ( get_option( 'gmediaActivated' ) ) {
|
142 |
+
add_action( 'init', array( &$this, 'gmedia_after_activation' ) );
|
143 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
+
// Pass the init check or show a message
|
146 |
+
if ( get_option( 'gmediaInitCheck' ) ) {
|
147 |
+
add_action( 'admin_notices', array( &$this, 'admin_notices' ) );
|
148 |
+
}
|
149 |
|
150 |
+
require_once( dirname( __FILE__ ) . '/admin/functions.php' );
|
151 |
|
152 |
+
require_once( dirname( __FILE__ ) . '/admin/class.processor.php' );
|
|
|
|
|
|
|
|
|
153 |
|
154 |
+
} else {
|
|
|
|
|
|
|
155 |
|
156 |
+
// Add the script and style files
|
157 |
+
//add_action('wp_enqueue_scripts', array(&$this, 'load_scripts'), 4);
|
|
|
|
|
|
|
158 |
|
159 |
+
require_once( dirname( __FILE__ ) . '/inc/frontend.filters.php' );
|
|
|
|
|
|
|
|
|
160 |
|
161 |
+
// Add a version number to the header
|
162 |
+
add_action( 'wp_head', array( &$this, 'gmedia_head_meta' ) );
|
163 |
+
add_action( 'wp_footer', array( &$this, 'load_module_scripts' ) );
|
|
|
|
|
|
|
164 |
|
165 |
+
}
|
|
|
166 |
|
167 |
+
add_action( 'gmedia_head', array( &$this, 'gmedia_head_meta' ) );
|
168 |
+
add_action( 'gmedia_head', array( &$this, 'load_scripts' ), 2 );
|
169 |
+
add_action( 'gmedia_head', 'wp_print_head_scripts', 9 );
|
170 |
+
add_action( 'gmedia_enqueue_scripts', array( &$this, 'load_module_scripts' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
|
172 |
+
add_action( 'gmedia_head', array( &$this, 'print_import_styles' ) );
|
173 |
+
add_action( 'gmedia_footer', array( &$this, 'print_import_styles' ) );
|
174 |
|
175 |
+
}
|
|
|
|
|
|
|
176 |
|
177 |
+
function gmedia_head_meta() {
|
178 |
+
$lk = strtolower( $this->options['license_key'] );
|
179 |
+
$db_version = get_option( 'gmediaDbVersion' );
|
180 |
+
echo "\n<!-- <meta name='GmediaGallery' version='{$this->version}/{$db_version}' license='{$lk}' /> -->\n";
|
181 |
+
}
|
182 |
|
183 |
+
function admin_notices() {
|
184 |
+
echo '<div id="message" class="error"><p><strong>' . get_option( 'gmediaInitCheck' ) . '</strong></p></div>';
|
185 |
+
delete_option( 'gmediaInitCheck' );
|
186 |
+
}
|
|
|
|
|
|
|
|
|
187 |
|
188 |
+
/**
|
189 |
+
* @return bool
|
190 |
+
*/
|
191 |
+
function required_version() {
|
192 |
+
global $wp_version;
|
193 |
|
194 |
+
// Check for WP version installation
|
195 |
+
if ( version_compare( $wp_version, $this->minium_WP, '<' ) ) {
|
196 |
+
$note = sprintf( __( 'Sorry, Gmedia Gallery works only under WordPress %s or higher', 'grand-media' ), $this->minium_WP );
|
197 |
+
update_option( 'gmediaInitCheck', $note );
|
198 |
+
add_action( 'admin_notices', array( &$this, 'admin_notices' ) );
|
199 |
|
200 |
+
return false;
|
201 |
+
}
|
202 |
+
if ( version_compare( '5.3', phpversion(), '>' ) ) {
|
203 |
+
$note = sprintf( __( 'Attention! Your server php version is: %s. Gmedia Gallery requires php version 5.3+ in order to run properly. Please upgrade your server!', 'grand-media' ), phpversion() );
|
204 |
+
update_option( 'gmediaInitCheck', $note );
|
205 |
+
add_action( 'admin_notices', array( &$this, 'admin_notices' ) );
|
206 |
|
207 |
+
return false;
|
208 |
+
}
|
209 |
|
210 |
+
return true;
|
211 |
+
}
|
212 |
|
213 |
+
/**
|
214 |
+
* Called via Setup and register_activate hook after gmedia_install() function
|
215 |
+
*/
|
216 |
+
function gmedia_after_activation() {
|
217 |
+
global $gmCore;
|
218 |
|
219 |
+
delete_option( 'gmediaActivated' );
|
220 |
|
221 |
+
flush_rewrite_rules( false );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
|
223 |
+
if ( (int) $this->options['mobile_app'] ) {
|
224 |
+
wp_clear_scheduled_hook( 'gmedia_app_cronjob' );
|
225 |
+
wp_schedule_event( time(), 'gmedia_app', 'gmedia_app_cronjob' );
|
226 |
|
227 |
+
$gmCore->app_service( 'app_activateplugin' );
|
228 |
+
}
|
|
|
|
|
229 |
|
230 |
+
$wp_installing = (bool) ( defined( 'WP_INSTALLING' ) && WP_INSTALLING );
|
231 |
+
if ( ! wp_next_scheduled( 'gmedia_modules_update' ) && ! $wp_installing ) {
|
232 |
+
wp_schedule_event( time(), 'daily', 'gmedia_modules_update' );
|
233 |
+
}
|
234 |
+
}
|
235 |
|
236 |
+
function upgrade() {
|
237 |
+
// Queue upgrades
|
238 |
+
$current_version = get_option( 'gmediaVersion', null );
|
239 |
+
$current_db_version = get_option( 'gmediaDbVersion', null );
|
240 |
|
241 |
+
if ( null === $current_db_version ) {
|
242 |
+
add_option( "gmediaDbVersion", GMEDIA_DBVERSION );
|
243 |
+
} elseif ( version_compare( $current_db_version, GMEDIA_DBVERSION, '<' ) ) {
|
244 |
+
require_once( dirname( __FILE__ ) . '/config/update.php' );
|
245 |
|
246 |
+
if ( get_transient( 'gmediaUpgrade' ) || ( isset( $_GET['do_update'] ) && ( 'gmedia' == $_GET['do_update'] ) ) ) {
|
247 |
+
add_action( 'admin_notices', 'gmedia_upgrade_process_admin_notice' );
|
248 |
+
} else {
|
249 |
+
add_action( 'admin_notices', 'gmedia_upgrade_required_admin_notice' );
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
if ( null === $current_version ) {
|
254 |
+
require_once( dirname( __FILE__ ) . '/config/update.php' );
|
255 |
+
|
256 |
+
add_option( "gmediaVersion", GMEDIA_VERSION );
|
257 |
+
add_action( 'init', 'gmedia_flush_rewrite_rules', 1000 );
|
258 |
+
} elseif ( version_compare( $current_version, GMEDIA_VERSION, '<' ) ) {
|
259 |
+
require_once( dirname( __FILE__ ) . '/config/update.php' );
|
260 |
+
|
261 |
+
gmedia_quite_update();
|
262 |
+
gmedia_delete_transients( 'gm_cache' );
|
263 |
+
add_action( 'init', 'gmedia_flush_rewrite_rules', 1000 );
|
264 |
+
|
265 |
+
if ( (int) $this->options['mobile_app'] ) {
|
266 |
+
if ( ! wp_get_schedule( 'gmedia_app_cronjob' ) ) {
|
267 |
+
wp_schedule_event( time(), 'gmedia_app', 'gmedia_app_cronjob' );
|
268 |
+
}
|
269 |
+
global $gmCore;
|
270 |
+
$gmCore->app_service( 'app_updatecron' );
|
271 |
+
}
|
272 |
+
}
|
273 |
+
|
274 |
+
}
|
275 |
+
|
276 |
+
function define_tables() {
|
277 |
+
global $wpdb;
|
278 |
+
|
279 |
+
// add database pointer
|
280 |
+
$wpdb->gmedia = $wpdb->prefix . 'gmedia';
|
281 |
+
$wpdb->gmedia_meta = $wpdb->prefix . 'gmedia_meta';
|
282 |
+
$wpdb->gmedia_term = $wpdb->prefix . 'gmedia_term';
|
283 |
+
$wpdb->gmedia_term_meta = $wpdb->prefix . 'gmedia_term_meta';
|
284 |
+
$wpdb->gmedia_term_relationships = $wpdb->prefix . 'gmedia_term_relationships';
|
285 |
+
|
286 |
+
}
|
287 |
+
|
288 |
+
function define_constant() {
|
289 |
+
|
290 |
+
define( 'GMEDIA_VERSION', $this->version );
|
291 |
+
// Minimum required database version
|
292 |
+
define( 'GMEDIA_DBVERSION', $this->dbversion );
|
293 |
+
|
294 |
+
}
|
295 |
+
|
296 |
+
function load_options() {
|
297 |
+
include_once( dirname( __FILE__ ) . '/config/setup.php' );
|
298 |
+
// Load the options
|
299 |
+
$default_options = gmedia_default_options();
|
300 |
+
$db_options = get_option( 'gmediaOptions' );
|
301 |
+
if ( ! is_array( $db_options ) ) {
|
302 |
+
$db_options = array();
|
303 |
+
}
|
304 |
+
$this->options = array_merge( $default_options, $db_options );
|
305 |
+
}
|
306 |
+
|
307 |
+
function load_dependencies() {
|
308 |
+
|
309 |
+
// We didn't need all stuff during a AJAX operation
|
310 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
311 |
+
require_once( dirname( __FILE__ ) . '/admin/ajax.php' );
|
312 |
+
} else {
|
313 |
+
|
314 |
+
// Load backend libraries
|
315 |
+
if ( is_admin() ) {
|
316 |
+
require_once( dirname( __FILE__ ) . '/inc/media-upload.php' );
|
317 |
+
require_once( dirname( __FILE__ ) . '/inc/post-metabox.php' );
|
318 |
+
|
319 |
+
require_once( dirname( __FILE__ ) . '/admin/admin.php' );
|
320 |
+
|
321 |
+
// Load frontend libraries
|
322 |
+
}
|
323 |
+
|
324 |
+
$current_plugins = get_option( 'active_plugins' );
|
325 |
+
if ( in_array( 'wordpress-seo/wp-seo.php', $current_plugins ) ) {
|
326 |
+
require_once( dirname( __FILE__ ) . '/inc/sitemap.php' );
|
327 |
+
}
|
328 |
+
}
|
329 |
+
|
330 |
+
}
|
331 |
+
|
332 |
+
function compatibility() {
|
333 |
+
require_once( dirname( __FILE__ ) . '/inc/compatibility.php' );
|
334 |
+
}
|
335 |
+
|
336 |
+
function load_textdomain() {
|
337 |
+
|
338 |
+
load_plugin_textdomain( 'grand-media', false, GMEDIA_FOLDER . '/lang/' );
|
339 |
+
|
340 |
+
}
|
341 |
+
|
342 |
+
function register_scripts_backend() {
|
343 |
+
global $gmCore;
|
344 |
+
|
345 |
+
wp_register_script( 'gmedia-global-backend', $gmCore->gmedia_url . '/admin/assets/js/gmedia.global.js', array( 'jquery' ), '1.13.0' );
|
346 |
+
wp_localize_script( 'gmedia-global-backend', 'GmediaGallery', array(
|
347 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
348 |
+
'_wpnonce' => wp_create_nonce( 'GmediaGallery' ),
|
349 |
+
'upload_dirurl' => $gmCore->upload['url'],
|
350 |
+
'plugin_dirurl' => $gmCore->gmedia_url,
|
351 |
+
'google_api_key' => $this->options['google_api_key'],
|
352 |
+
) );
|
353 |
+
|
354 |
+
wp_register_style( 'grand-media', $gmCore->gmedia_url . '/admin/assets/css/gmedia.admin.css', array(), '1.15.4', 'all' );
|
355 |
+
wp_register_script( 'grand-media', $gmCore->gmedia_url . '/admin/assets/js/gmedia.admin.js', array( 'jquery', 'gmedia-global-backend' ), '1.15.4' );
|
356 |
+
wp_localize_script( 'grand-media', 'grandMedia', array(
|
357 |
+
'error3' => __( 'Disable your Popup Blocker and try again.', 'grand-media' ),
|
358 |
+
'download' => __( 'downloading...', 'grand-media' ),
|
359 |
+
'wait' => __( 'Working. Wait please.', 'grand-media' ),
|
360 |
+
'_wpnonce' => wp_create_nonce( 'GmediaGallery' ),
|
361 |
+
) );
|
362 |
+
|
363 |
+
wp_register_style( 'gmedia-bootstrap', $gmCore->gmedia_url . '/assets/bootstrap/css/bootstrap.min.css', array(), '3.3.4', 'all' );
|
364 |
+
wp_register_script( 'gmedia-bootstrap', $gmCore->gmedia_url . '/assets/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '3.3.4' );
|
365 |
+
|
366 |
+
wp_register_script( 'outside-events', $gmCore->gmedia_url . '/assets/jq-plugins/outside-events.js', array( 'jquery' ), '1.1' );
|
367 |
+
|
368 |
+
}
|
369 |
+
|
370 |
+
function register_scripts_frontend() {
|
371 |
+
global $gmCore, $wp_scripts;
|
372 |
+
|
373 |
+
wp_register_style( 'gmedia-global-frontend', $gmCore->gmedia_url . '/assets/gmedia.global.front.css', array(), '1.15.0' );
|
374 |
+
wp_register_script( 'gmedia-global-frontend', $gmCore->gmedia_url . '/assets/gmedia.global.front.js', array( 'jquery' ), '1.13.0' );
|
375 |
+
wp_localize_script( 'gmedia-global-frontend', 'GmediaGallery', array(
|
376 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
377 |
+
'nonce' => wp_create_nonce( 'GmediaGallery' ),
|
378 |
+
'upload_dirurl' => $gmCore->upload['url'],
|
379 |
+
'plugin_dirurl' => $gmCore->upload['url'],
|
380 |
+
'license' => strtolower( $this->options['license_key'] ),
|
381 |
+
'license2' => $this->options['license_key2'],
|
382 |
+
'google_api_key' => $this->options['google_api_key'],
|
383 |
+
) );
|
384 |
+
|
385 |
+
|
386 |
+
if ( ! wp_script_is( 'velocity', 'registered' ) || version_compare( $wp_scripts->registered['velocity']->ver, '1.4.1', '<' ) ) {
|
387 |
+
wp_deregister_script( 'velocity' );
|
388 |
+
wp_register_script( 'velocity', $gmCore->gmedia_url . '/assets/velocity/velocity.min.js', array( 'jquery' ), '1.4.1', true );
|
389 |
+
}
|
390 |
+
|
391 |
+
if ( ! wp_script_is( 'mediaelement', 'registered' ) ) {
|
392 |
+
wp_register_style( 'mediaelement', $gmCore->gmedia_url . '/assets/mediaelement/mediaelementplayer.min.css', array(), '4.2.8', 'screen' );
|
393 |
+
wp_register_script( 'mediaelement', $gmCore->gmedia_url . '/assets/mediaelement/mediaelement-and-player.min.js', array( 'jquery' ), '4.2.8', true );
|
394 |
+
}
|
395 |
+
|
396 |
+
if ( ! wp_script_is( 'wavesurfer', 'registered' ) ) {
|
397 |
+
wp_register_script( 'wavesurfer', $gmCore->gmedia_url . '/assets/wavesurfer/wavesurfer.min.js', array( 'jquery' ), '1.2.8', true );
|
398 |
+
}
|
399 |
+
|
400 |
+
if ( ! wp_script_is( 'swiper', 'registered' ) ) {
|
401 |
+
wp_register_style( 'swiper', $gmCore->gmedia_url . '/assets/swiper/swiper.min.css', array(), '3.4.0', 'screen' );
|
402 |
+
wp_register_script( 'swiper', $gmCore->gmedia_url . '/assets/swiper/swiper.jquery.min.js', array( 'jquery' ), '3.4.0', true );
|
403 |
+
}
|
404 |
+
|
405 |
+
wp_register_style( 'gmedia-swiper', $gmCore->gmedia_url . '/assets/swiper/swiper.min.css', array(), '3.4.0', 'screen' );
|
406 |
+
wp_register_script( 'gmedia-swiper', $gmCore->gmedia_url . '/assets/swiper/swiper.jquery.min.js', array( 'jquery' ), '3.4.0', true );
|
407 |
+
|
408 |
+
if ( ! wp_script_is( 'magnific-popup', 'registered' ) || version_compare( $wp_scripts->registered['magnific-popup']->ver, '1.1.0', '<' ) ) {
|
409 |
+
wp_deregister_style( 'magnific-popup' );
|
410 |
+
wp_deregister_script( 'magnific-popup' );
|
411 |
+
wp_register_style( 'magnific-popup', $gmCore->gmedia_url . '/assets/mag-popup/magnific-popup.css', array(), '1.1.0', 'screen' );
|
412 |
+
wp_register_script( 'magnific-popup', $gmCore->gmedia_url . '/assets/mag-popup/jquery.magnific-popup.min.js', array( 'jquery' ), '1.1.0', true );
|
413 |
+
}
|
414 |
+
|
415 |
+
if ( ! wp_script_is( 'photoswipe', 'registered' ) || version_compare( $wp_scripts->registered['photoswipe']->ver, '3.0.5', '<=' ) ) {
|
416 |
+
wp_deregister_style( 'photoswipe' );
|
417 |
+
wp_deregister_script( 'photoswipe' );
|
418 |
+
wp_register_style( 'photoswipe', $gmCore->gmedia_url . '/assets/photoswipe/photoswipe.css', array(), '3.0.5', 'screen' );
|
419 |
+
wp_register_script( 'photoswipe', $gmCore->gmedia_url . '/assets/photoswipe/photoswipe.jquery.min.js', array( 'jquery' ), '3.0.5', true );
|
420 |
+
}
|
421 |
+
|
422 |
+
if ( ! wp_script_is( 'easing', 'registered' ) || ( $wp_scripts->registered['easing']->ver !== false && version_compare( $wp_scripts->registered['easing']->ver, '1.3.0', '<' ) ) ) {
|
423 |
+
wp_deregister_script( 'easing' );
|
424 |
+
wp_register_script( 'easing', $gmCore->gmedia_url . '/assets/jq-plugins/jquery.easing.js', array( 'jquery' ), '1.3.0', true );
|
425 |
+
}
|
426 |
+
if ( ! wp_script_is( 'fancybox', 'registered' ) || ( $wp_scripts->registered['fancybox']->ver !== false && version_compare( $wp_scripts->registered['fancybox']->ver, '1.3.4', '<' ) ) ) {
|
427 |
+
if ( ! defined( 'FANCYBOX_VERSION' ) ) {
|
428 |
+
wp_deregister_style( 'fancybox' );
|
429 |
+
wp_register_style( 'fancybox', $gmCore->gmedia_url . '/assets/fancybox/jquery.fancybox-1.3.4.css', array(), '1.3.4' );
|
430 |
+
}
|
431 |
+
wp_deregister_script( 'fancybox' );
|
432 |
+
wp_register_script( 'fancybox', $gmCore->gmedia_url . '/assets/fancybox/jquery.fancybox-1.3.4.pack.js', array( 'jquery', 'easing' ), '1.3.4', true );
|
433 |
+
}
|
434 |
+
|
435 |
+
|
436 |
+
if ( ! wp_script_is( 'jplayer', 'registered' ) || version_compare( $wp_scripts->registered['jplayer']->ver, '2.6.4', '<' ) ) {
|
437 |
+
wp_deregister_script( 'jplayer' );
|
438 |
+
wp_register_script( 'jplayer', $gmCore->gmedia_url . '/assets/jplayer/jquery.jplayer.min.js', array( 'jquery' ), '2.6.4', true );
|
439 |
+
}
|
440 |
+
if ( ! wp_script_is( 'swfobject', 'registered' ) || version_compare( $wp_scripts->registered['swfobject']->ver, '2.2', '<' ) ) {
|
441 |
+
wp_deregister_script( 'swfobject' );
|
442 |
+
wp_register_script( 'swfobject', $gmCore->gmedia_url . '/assets/swf/swfobject.js', array(), '2.2', true );
|
443 |
+
wp_register_script( 'swfaddress', $gmCore->gmedia_url . '/assets/swf/swfaddress.js', array(), '2.4', true );
|
444 |
+
}
|
445 |
+
|
446 |
+
wp_register_script( 'mousetrap', $gmCore->gmedia_url . '/assets/mousetrap/mousetrap.min.js', array(), '1.5.2', true );
|
447 |
+
|
448 |
+
$this->load_scripts();
|
449 |
+
}
|
450 |
+
|
451 |
+
function load_scripts() {
|
452 |
+
wp_enqueue_script( 'jquery' );
|
453 |
+
wp_enqueue_style( 'gmedia-global-frontend' );
|
454 |
+
wp_enqueue_script( 'gmedia-global-frontend' );
|
455 |
+
}
|
456 |
+
|
457 |
+
function load_module_scripts() {
|
458 |
+
global $wp_styles;
|
459 |
+
$deps = array();
|
460 |
+
$xmlhttprequest = ( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && strtolower( $_SERVER['HTTP_X_REQUESTED_WITH'] ) == 'xmlhttprequest' );
|
461 |
+
foreach ( $this->do_module as $m => $module ) {
|
462 |
+
$deps = array_merge( $deps, explode( ',', $module['info']['dependencies'] ) );
|
463 |
+
$deps = apply_filters( 'gmedia_module_js_dependencies', $deps, $m );
|
464 |
+
$deps = array_filter( array_unique( $deps ) );
|
465 |
+
foreach ( $deps as $handle ) {
|
466 |
+
if ( wp_script_is( $handle, 'registered' ) ) {
|
467 |
+
wp_enqueue_script( $handle, $_src = false, $_deps = array( 'jquery' ), $this->version, $_in_footer = true );
|
468 |
+
if ( $xmlhttprequest ) {
|
469 |
+
wp_print_scripts( $handle );
|
470 |
+
}
|
471 |
+
}
|
472 |
+
if ( wp_style_is( $handle, 'registered' ) ) {
|
473 |
+
//wp_print_styles($handle);
|
474 |
+
$this->import_styles[ $handle ] = $wp_styles->registered[ $handle ]->src;
|
475 |
+
}
|
476 |
+
}
|
477 |
// $files = glob($module['path'] . '/css/*.css', GLOB_NOSORT);
|
478 |
// if(!empty($files)){
|
479 |
// $files = array_map('basename', $files);
|
481 |
// $this->import_styles[] = "{$module['url']}/css/{$file}";
|
482 |
// }
|
483 |
// }
|
484 |
+
$files = glob( $module['path'] . '/js/*.js', GLOB_NOSORT );
|
485 |
+
if ( ! empty( $files ) ) {
|
486 |
+
$files = array_map( 'basename', $files );
|
487 |
+
$files_deps = array_merge( array( 'jquery' ), $deps );
|
488 |
+
foreach ( $files as $file ) {
|
489 |
+
$_ver = isset( $module['info']['version'] ) ? $module['info']['version'] : false;
|
490 |
+
$handle = "{$module['name']}_{$file}";
|
491 |
+
wp_enqueue_script( $handle, "{$module['url']}/js/{$file}", $files_deps, $_ver, true );
|
492 |
+
if ( $xmlhttprequest ) {
|
493 |
+
wp_print_scripts( $handle );
|
494 |
+
}
|
495 |
+
}
|
496 |
+
}
|
497 |
+
}
|
498 |
+
$this->do_module = array();
|
499 |
+
if ( ! empty( $this->import_styles ) ) {
|
500 |
+
add_action( 'wp_print_head_scripts', array( &$this, 'print_import_styles' ), 1 );
|
501 |
+
add_action( 'wp_print_footer_scripts', array( &$this, 'print_import_styles' ), 1 );
|
502 |
+
}
|
503 |
+
if ( $xmlhttprequest ) {
|
504 |
+
$this->print_import_styles();
|
505 |
+
}
|
506 |
+
}
|
507 |
+
|
508 |
+
/** Return module styles like <style>@import(...)</style>
|
509 |
+
*
|
510 |
+
* @param $module
|
511 |
+
*
|
512 |
+
* @return string
|
513 |
+
*/
|
514 |
+
function load_module_styles( $module ) {
|
515 |
+
$module_styles = '';
|
516 |
+
$files = glob( $module['path'] . '/css/*.css', GLOB_NOSORT );
|
517 |
+
if ( ! empty( $files ) ) {
|
518 |
+
$_ver = isset( $module['info']['version'] ) ? $module['info']['version'] : false;
|
519 |
+
$files = array_map( 'basename', $files );
|
520 |
+
foreach ( $files as $file ) {
|
521 |
+
$src = "{$module['url']}/css/{$file}";
|
522 |
+
if ( 'http' !== substr( $src, 0, 4 ) ) {
|
523 |
+
$src = site_url( $src );
|
524 |
+
}
|
525 |
+
$src = add_query_arg( array( 'v' => $_ver ), $src );
|
526 |
+
$module_styles .= "@import url('{$src}') all;";
|
527 |
+
}
|
528 |
+
}
|
529 |
+
|
530 |
+
return $module_styles;
|
531 |
+
}
|
532 |
+
|
533 |
+
function print_import_styles() {
|
534 |
+
if ( ! empty( $this->import_styles ) ) {
|
535 |
+
echo "\n<style type='text/css' class='gmedia_assets_style_import'>";
|
536 |
+
foreach ( $this->import_styles as $src ) {
|
537 |
+
if ( 'http' !== substr( $src, 0, 4 ) ) {
|
538 |
+
$src = site_url( $src );
|
539 |
+
}
|
540 |
+
echo "\n@import url('{$src}') all;";
|
541 |
+
}
|
542 |
+
echo "\n</style>\n";
|
543 |
+
$this->import_styles = array();
|
544 |
+
}
|
545 |
+
}
|
546 |
+
|
547 |
+
/**
|
548 |
+
* Call user function to all blogs in network
|
549 |
+
* called during register_activation hook
|
550 |
+
*
|
551 |
+
* @param $pfunction string UserFunction name
|
552 |
+
* @param $networkwide bool Check if plugin has been activated for the entire blog network.
|
553 |
+
*
|
554 |
+
* @return void
|
555 |
+
*/
|
556 |
+
static function network_propagate( $pfunction, $networkwide ) {
|
557 |
+
|
558 |
+
include_once( dirname( __FILE__ ) . '/config/setup.php' );
|
559 |
+
|
560 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
561 |
+
// check if it is a network activation - if so, run the activation function
|
562 |
+
// for each blog id
|
563 |
+
if ( $networkwide ) {
|
564 |
+
global $wpdb;
|
565 |
+
//$old_blog = $wpdb->blogid;
|
566 |
+
// Get all blog ids
|
567 |
+
$blogids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" );
|
568 |
+
foreach ( $blogids as $blog_id ) {
|
569 |
+
switch_to_blog( $blog_id );
|
570 |
+
call_user_func( $pfunction );
|
571 |
+
}
|
572 |
+
//switch_to_blog($old_blog);
|
573 |
+
restore_current_blog();
|
574 |
+
|
575 |
+
return;
|
576 |
+
}
|
577 |
+
}
|
578 |
+
call_user_func( $pfunction );
|
579 |
+
}
|
580 |
+
|
581 |
+
/**
|
582 |
+
* @param $networkwide
|
583 |
+
*/
|
584 |
+
function activate( $networkwide ) {
|
585 |
+
$this->network_propagate( 'gmedia_install', $networkwide );
|
586 |
+
}
|
587 |
+
|
588 |
+
/**
|
589 |
+
* @param $networkwide
|
590 |
+
*/
|
591 |
+
function deactivate( $networkwide ) {
|
592 |
+
$this->network_propagate( 'gmedia_deactivate', $networkwide );
|
593 |
+
}
|
594 |
+
|
595 |
+
/*
|
596 |
+
static function uninstall($networkwide) {
|
597 |
+
//wp_die( '<h1>This is run on <code>init</code> during uninstallation</h1>', 'Uninstallation hook example' );
|
598 |
+
Gmedia::network_propagate('gmedia_uninstall', $networkwide);
|
599 |
+
}
|
600 |
+
*/
|
601 |
+
|
602 |
+
/**
|
603 |
+
* @param $blog_id
|
604 |
+
* @param $user_id
|
605 |
+
* @param $domain
|
606 |
+
* @param $path
|
607 |
+
* @param $site_id
|
608 |
+
* @param $meta
|
609 |
+
*/
|
610 |
+
function new_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
|
611 |
+
if ( is_plugin_active_for_network( GMEDIA_FOLDER . '/grand-media.php' ) ) {
|
612 |
+
include_once( dirname( __FILE__ ) . '/config/setup.php' );
|
613 |
+
switch_to_blog( $blog_id );
|
614 |
+
gmedia_install();
|
615 |
+
restore_current_blog();
|
616 |
+
}
|
617 |
+
}
|
618 |
+
|
619 |
+
/**
|
620 |
+
* @param $user_id
|
621 |
+
* @param $reassign
|
622 |
+
*/
|
623 |
+
function reassign_media( $user_id, $reassign ) {
|
624 |
+
global $gmDB;
|
625 |
+
$gmDB->reassign_media( $user_id, $reassign );
|
626 |
+
}
|
627 |
+
|
628 |
+
/**
|
629 |
+
* Register Gmedia Post Types
|
630 |
+
*/
|
631 |
+
function gmedia_post_type() {
|
632 |
+
$args = array(
|
633 |
+
'label' => __( 'Gmedia Posts', 'grand-media' ),
|
634 |
+
'supports' => array( 'comments' ),
|
635 |
+
'hierarchical' => false,
|
636 |
+
'public' => true,
|
637 |
+
'show_ui' => false,
|
638 |
+
'show_in_menu' => false,
|
639 |
+
'show_in_admin_bar' => true,
|
640 |
+
'show_in_nav_menus' => false,
|
641 |
+
'can_export' => false,
|
642 |
+
'has_archive' => (bool) ( (int) $this->options['gmedia_has_archive'] ), //'gmedia-library',
|
643 |
+
'publicly_queryable' => true,
|
644 |
+
'exclude_from_search' => (bool) ( (int) $this->options['gmedia_exclude_from_search'] ),
|
645 |
+
'rewrite' => array( 'slug' => $this->options['gmedia_post_slug'] ),
|
646 |
+
'map_meta_cap' => true,
|
647 |
+
'capabilities' => array(
|
648 |
+
'read_private_posts' => 'read_private_gmedia_posts',
|
649 |
+
// 'edit_comment' => 'edit_gmedia_comment',
|
650 |
+
// 'moderate_comments' => 'moderate_gmedia_comments',
|
651 |
+
// 'edit_post' => 'edit_gmedia_post',
|
652 |
+
// 'edit_posts' => 'edit_gmedia_posts',
|
653 |
+
'create_posts' => false,
|
654 |
+
),
|
655 |
+
);
|
656 |
+
register_post_type( 'gmedia', $args );
|
657 |
+
|
658 |
+
$args['label'] = __( 'Gmedia Albums', 'grand-media' );
|
659 |
+
$args['show_in_nav_menus'] = true;
|
660 |
+
$args['hierarchical'] = true;
|
661 |
+
$args['has_archive'] = (bool) ( (int) $this->options['gmedia_album_has_archive'] );
|
662 |
+
$args['exclude_from_search'] = (bool) ( (int) $this->options['gmedia_album_exclude_from_search'] );
|
663 |
+
$args['rewrite'] = array( 'slug' => $this->options['gmedia_album_post_slug'] );
|
664 |
+
register_post_type( 'gmedia_album', $args );
|
665 |
+
|
666 |
+
$args['label'] = __( 'Gmedia Galleries', 'grand-media' );
|
667 |
+
$args['has_archive'] = (bool) ( (int) $this->options['gmedia_gallery_has_archive'] );
|
668 |
+
$args['exclude_from_search'] = (bool) ( (int) $this->options['gmedia_gallery_exclude_from_search'] );
|
669 |
+
$args['rewrite'] = array( 'slug' => $this->options['gmedia_gallery_post_slug'] );
|
670 |
+
register_post_type( 'gmedia_gallery', $args );
|
671 |
+
|
672 |
+
add_filter( 'get_gmedia_metadata', array( $this, 'get_gmedia_metadata' ), 10, 4 );
|
673 |
+
add_filter( 'get_gmedia_term_metadata', array( $this, 'get_gmedia_term_metadata' ), 10, 4 );
|
674 |
+
add_filter( 'get_edit_post_link', array( $this, 'gmedia_post_type_edit_link' ), 10, 3 );
|
675 |
+
|
676 |
+
|
677 |
+
$args = array(
|
678 |
+
'hierarchical' => false,
|
679 |
+
'public' => true,
|
680 |
+
'show_ui' => false,
|
681 |
+
'show_admin_column' => false,
|
682 |
+
'show_in_nav_menus' => false,
|
683 |
+
'show_tagcloud' => false,
|
684 |
+
'rewrite' => array( 'slug' => 'gmedia-category' ),
|
685 |
+
);
|
686 |
+
$args['labels'] = array(
|
687 |
+
'name' => _x( 'Gmedia Categories', 'Taxonomy General Name', 'grand-media' ),
|
688 |
+
'singular_name' => _x( 'Gmedia Category', 'Taxonomy Singular Name', 'grand-media' ),
|
689 |
+
'menu_name' => __( 'Gmedia Categories', 'grand-media' ),
|
690 |
+
);
|
691 |
+
register_taxonomy( 'gmedia_category', null, $args );
|
692 |
+
|
693 |
+
$args['rewrite'] = array( 'slug' => 'gmedia-tag' );
|
694 |
+
$args['labels'] = array(
|
695 |
+
'name' => _x( 'Gmedia Tags', 'Taxonomy General Name', 'grand-media' ),
|
696 |
+
'singular_name' => _x( 'Gmedia Tag', 'Taxonomy Singular Name', 'grand-media' ),
|
697 |
+
'menu_name' => __( 'Gmedia Tags', 'grand-media' ),
|
698 |
+
);
|
699 |
+
register_taxonomy( 'gmedia_tag', null, $args );
|
700 |
+
|
701 |
+
add_filter( 'wp_link_query_args', array( $this, 'exclude_gmedia_from_link_query' ) );
|
702 |
+
|
703 |
+
if ( ! empty( $this->options['flush_rewrite_rules'] ) ) {
|
704 |
+
unset( $this->options['flush_rewrite_rules'] );
|
705 |
+
update_option( 'gmediaOptions', $this->options );
|
706 |
+
flush_rewrite_rules( false );
|
707 |
+
}
|
708 |
+
}
|
709 |
+
|
710 |
+
/**
|
711 |
+
* Get gmedia metadata
|
712 |
+
*
|
713 |
+
* @param $meta
|
714 |
+
* @param $post_ID
|
715 |
+
* @param $meta_key
|
716 |
+
* @param $single
|
717 |
+
*
|
718 |
+
* @return array|string
|
719 |
+
*/
|
720 |
+
function get_gmedia_metadata( $meta, $post_ID, $meta_key, $single ) {
|
721 |
+
global $gmDB;
|
722 |
+
$gmedia_id = get_post_meta( $post_ID, '_gmedia_ID', true );
|
723 |
+
$meta = $gmDB->get_metadata( 'gmedia', $gmedia_id, $meta_key, $single );
|
724 |
+
|
725 |
+
return $meta;
|
726 |
+
}
|
727 |
+
|
728 |
+
/**
|
729 |
+
* Get gmedia term metadata
|
730 |
+
*
|
731 |
+
* @param $meta
|
732 |
+
* @param $post_ID
|
733 |
+
* @param $meta_key
|
734 |
+
* @param $single
|
735 |
+
*
|
736 |
+
* @return array|string
|
737 |
+
*/
|
738 |
+
function get_gmedia_term_metadata( $meta, $post_ID, $meta_key, $single ) {
|
739 |
+
global $gmDB;
|
740 |
+
$gmedia_term_id = get_post_meta( $post_ID, '_gmedia_term_ID', true );
|
741 |
+
$meta = $gmDB->get_metadata( 'gmedia_term', $gmedia_term_id, $meta_key, $single );
|
742 |
+
|
743 |
+
return $meta;
|
744 |
+
}
|
745 |
+
|
746 |
+
/**
|
747 |
+
* Edit link for gmedia
|
748 |
+
*
|
749 |
+
* @param $link
|
750 |
+
* @param $post_ID
|
751 |
+
* @param $context
|
752 |
+
*
|
753 |
+
* @return string|void
|
754 |
+
*/
|
755 |
+
function gmedia_post_type_edit_link( $link, $post_ID, $context ) {
|
756 |
+
$post = get_post( $post_ID );
|
757 |
+
if ( isset( $post->ID ) && 'gmedia' == substr( $post->post_type, 0, 6 ) ) {
|
758 |
+
global $gmDB;
|
759 |
+
if ( $post->post_type == 'gmedia' ) {
|
760 |
+
$gmedia_id = get_post_meta( $post->ID, '_gmedia_ID', true );
|
761 |
+
$gmedia = $gmDB->get_gmedia( $gmedia_id );
|
762 |
+
if ( $gmedia ) {
|
763 |
+
$link = admin_url( "admin.php?page=GrandMedia&mode=edit&gmedia__in={$gmedia->ID}" );
|
764 |
+
} else {
|
765 |
+
wp_delete_post( $post->ID, true );
|
766 |
+
$link = '#';
|
767 |
+
}
|
768 |
+
} else {
|
769 |
+
$term_id = get_post_meta( $post->ID, '_gmedia_term_ID', true );
|
770 |
+
$term = $gmDB->get_term( $term_id );
|
771 |
+
if ( $term ) {
|
772 |
+
if ( $term->taxonomy == 'gmedia_album' ) {
|
773 |
+
$link = admin_url( "admin.php?page=GrandMedia_Albums&edit_term={$term->term_id}" );
|
774 |
+
} elseif ( $term->taxonomy == 'gmedia_gallery' ) {
|
775 |
+
$link = admin_url( "admin.php?page=GrandMedia_Galleries&edit_term={$term->term_id}" );
|
776 |
+
}
|
777 |
+
} else {
|
778 |
+
wp_delete_post( $post->ID, true );
|
779 |
+
$link = '#';
|
780 |
+
}
|
781 |
+
}
|
782 |
+
}
|
783 |
+
|
784 |
+
return $link;
|
785 |
+
}
|
786 |
+
|
787 |
+
function register_gmedia_widget() {
|
788 |
+
require_once( dirname( __FILE__ ) . '/inc/widget.php' );
|
789 |
+
register_widget( 'GrandMedia_Gallery_Widget' );
|
790 |
+
register_widget( 'GrandMedia_Album_Widget' );
|
791 |
+
}
|
792 |
+
|
793 |
+
/**
|
794 |
+
* @param $query
|
795 |
+
*
|
796 |
+
* @return mixed
|
797 |
+
*/
|
798 |
+
function exclude_gmedia_from_link_query( $query ) {
|
799 |
+
if ( ( $key = array_search( 'gmedia', $query['post_type'] ) ) !== false ) {
|
800 |
+
unset( $query['post_type'][ $key ] );
|
801 |
+
}
|
802 |
+
|
803 |
+
return $query;
|
804 |
+
}
|
805 |
+
|
806 |
+
/**
|
807 |
+
* @param $shedules
|
808 |
+
*
|
809 |
+
* @return array
|
810 |
+
*/
|
811 |
+
function gmedia_cron_schedules( $shedules ) {
|
812 |
+
$gmedia_shedules = array( 'gmedia_app' => array( 'interval' => 5 * DAY_IN_SECONDS, 'display' => __( 'Gmedia App Defined' ) ) );
|
813 |
+
$shedules = array_merge( $shedules, $gmedia_shedules );
|
814 |
+
|
815 |
+
return $shedules;
|
816 |
+
}
|
817 |
+
|
818 |
+
function gmedia_app_cronjob() {
|
819 |
+
global $gmCore;
|
820 |
+
$gmCore->app_service( 'app_updatecron' );
|
821 |
+
}
|
822 |
+
|
823 |
+
function gmedia_modules_update() {
|
824 |
+
global $gmCore;
|
825 |
+
$gmCore->modules_update();
|
826 |
+
}
|
827 |
+
|
828 |
+
|
829 |
+
/*
|
830 |
+
// PLUGIN MESSAGE ON PLUGINS PAGE
|
831 |
+
function check_message_version($file)
|
832 |
+
{
|
833 |
+
static $this_plugin;
|
834 |
+
global $wp_version;
|
835 |
+
if (!$this_plugin) $this_plugin = GMEDIA_FOLDER;
|
836 |
+
|
837 |
+
if ($file == $this_plugin ){
|
838 |
+
$checkfile = "http://codeasily.com/grand-flam.chk";
|
839 |
+
|
840 |
+
$message = wp_remote_fopen($checkfile);
|
841 |
+
|
842 |
+
if($message)
|
843 |
+
{
|
844 |
+
preg_match( '|grand'.str_replace('.','',GMEDIA_VERSION).':(.*)$|mi', $message, $theMessage );
|
845 |
+
$columns = 5;
|
846 |
+
if ( !empty( $theMessage ) )
|
847 |
+
{
|
848 |
+
$theMessage = trim($theMessage[1]);
|
849 |
+
echo '<td colspan="'.$columns.'" class="plugin-update" style="line-height:1.2em; font-size:11px; padding:1px;"><div id="flag-update-msg" style="padding-bottom:1px;" >'.$theMessage.'</div></td>';
|
850 |
+
} else {
|
851 |
+
return;
|
852 |
+
}
|
853 |
+
}
|
854 |
+
}
|
855 |
+
}
|
856 |
+
*/
|
857 |
+
|
858 |
+
function add_plugin_links( $links, $file ) {
|
859 |
+
if ( $file == plugin_basename( __FILE__ ) ) {
|
860 |
+
$links[] = '<a href="admin.php?page=GrandMedia_Settings">' . __( 'Settings', 'grand-media' ) . '</a>';
|
861 |
+
$links[] = '<a href="admin.php?page=GrandMedia_Modules">' . __( 'Modules', 'grand-media' ) . '</a>';
|
862 |
+
$links[] = '<a href="https://codeasily.com/product/one-site-license/">' . __( 'Get Premium', 'grand-media' ) . '</a>';
|
863 |
+
$links[] = '<a href="https://codeasily.com/donate/">' . __( 'Donate', 'grand-media' ) . '</a>';
|
864 |
+
}
|
865 |
+
|
866 |
+
return $links;
|
867 |
+
}
|
868 |
+
|
869 |
+
function add_plugin_feedback() {
|
870 |
+
global $pagenow;
|
871 |
+
if ( 'plugins.php' !== $pagenow ) {
|
872 |
+
return;
|
873 |
+
}
|
874 |
+
?>
|
875 |
+
<script type="text/javascript">
|
876 |
+
jQuery(function($) {
|
877 |
+
function gm_parse_query(s) {
|
878 |
+
var j = {}, res = s.split(/&/gm).map(function(e) {
|
879 |
+
var o = e.split(/=/), pt = j;
|
880 |
+
if(typeof o[1] == 'undefined') {
|
881 |
+
o[1] = '';
|
882 |
}
|
883 |
+
o[0].replace(/^(\w+)\[([^&]*)\]/, '$1][$2').split(/\]\[/).map(function(e, i, a) {
|
884 |
+
if(e === '') {
|
885 |
+
e = Object.keys(pt).length;
|
886 |
+
}
|
887 |
+
pt = (pt[e] = pt[e] || (i == a.length - 1 ? decodeURIComponent(o[1].replace(/\+/, ' ')) : {}));
|
888 |
+
});
|
889 |
+
});
|
890 |
+
return j;
|
891 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
|
893 |
+
$('tr[data-slug="grand-media"] .deactivate a').on('click', function(e) {
|
894 |
+
e.preventDefault();
|
895 |
+
e.stopPropagation();
|
896 |
+
|
897 |
+
$('body').append($('#tmpl-gmedia-feedback').html());
|
898 |
+
var deactivate_link = $(this).attr('href');
|
899 |
+
$('.gm-button-submit-deactivate, .gm-button-skip-deactivate').attr('href', deactivate_link);
|
900 |
+
$('#gmedia-feedback [name="reason"]').on('change', function() {
|
901 |
+
var parent = $(this).closest('.reason');
|
902 |
+
parent.siblings('.has-input').find('.reason-input').hide().find('input').prop('disabled', true);
|
903 |
+
if(parent.hasClass('has-input')) {
|
904 |
+
if($(this).is(':checked')) {
|
905 |
+
$('.reason-input', parent).show().find('input').prop('disabled', false);
|
906 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
907 |
}
|
908 |
+
});
|
909 |
+
$('#gmedia-feedback .gm-button-submit-deactivate').on('click', function(e) {
|
910 |
+
e.preventDefault();
|
911 |
|
912 |
+
var feedback = $('#gmedia-feedback input').serialize();
|
913 |
+
feedback = gm_parse_query(feedback);
|
914 |
+
|
915 |
+
if(feedback.reason === '') {
|
916 |
+
window.location = deactivate_link;
|
917 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
918 |
}
|
919 |
|
920 |
+
$('#gmedia-feedback .spinner').addClass('is-active');
|
921 |
+
var post_data = {
|
922 |
+
action: 'gmedia_feedback',
|
923 |
+
data: feedback,
|
924 |
+
_wpnonce_gmedia_feedback: '<?php echo wp_create_nonce( 'gmedia_feedback' ); ?>'
|
925 |
+
};
|
926 |
+
$.post(ajaxurl, post_data).always(function(data) {
|
927 |
+
$('#gmedia-feedback .spinner').removeClass('is-active');
|
928 |
+
window.location = deactivate_link;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
929 |
});
|
930 |
+
return false;
|
931 |
+
});
|
932 |
+
$('#gmedia-feedback .gm-button-close').on('click', function() {
|
933 |
+
$('#gmedia-feedback').remove();
|
934 |
+
return false;
|
935 |
+
});
|
936 |
+
|
937 |
+
return false;
|
938 |
});
|
939 |
+
});
|
940 |
+
</script>
|
941 |
+
<script id="tmpl-gmedia-feedback" type="text/template">
|
942 |
+
<div class="gm-modal gm-modal-deactivation-feedback" id="gmedia-feedback">
|
943 |
+
<style>
|
944 |
+
.gm-modal { position: fixed; overflow: auto; height: 100%; width: 100%; top: 0; z-index: 100000; background: rgba(0, 0, 0, 0.6); }
|
945 |
+
|
946 |
+
.gm-modal-dialog { position: absolute; left: 50%; padding-bottom: 30px; top: 10%; z-index: 100001; max-width: 600px; min-width: 220px; transform: translateX(-50%); }
|
947 |
+
|
948 |
+
.gm-modal-header { border-bottom: #eeeeee solid 1px; background: #fbfbfb; padding: 15px 20px; position: relative; margin-bottom: -10px; }
|
949 |
+
|
950 |
+
.gm-modal-header h4 { margin: 0; padding: 0; text-transform: uppercase; font-size: 1.2em; font-weight: bold; color: #cacaca; text-shadow: 1px 1px 1px #fff; letter-spacing: 0.6px; -webkit-font-smoothing: antialiased; }
|
951 |
+
|
952 |
+
.gm-modal-body,
|
953 |
+
.gm-modal-footer { border: 0; background: #fefefe; padding: 20px; }
|
954 |
+
|
955 |
+
.gm-modal-footer { border-top: #eeeeee solid 1px; text-align: right; }
|
956 |
+
|
957 |
+
.gm-modal-body h3 { margin-top: 0; line-height: 1.5em; }
|
958 |
+
|
959 |
+
.gm-modal-body .reason { margin: 7px 0; }
|
960 |
+
|
961 |
+
.gm-modal-body .reason-input { margin: 3px 0 3px 22px; display: none; }
|
962 |
+
|
963 |
+
.gm-modal-body .reason-input input { width: 100%; }
|
964 |
+
|
965 |
+
.gm-modal-footer a.button { margin-right: 7px; }
|
966 |
+
</style>
|
967 |
+
<div class="gm-modal-dialog">
|
968 |
+
<div class="gm-modal-header"><h4><?php _e( 'Quick feedback', 'grand-media' ); ?></h4></div>
|
969 |
+
<div class="gm-modal-body">
|
970 |
+
<h3><strong><?php _e( 'If you have a moment, please let us know why you are deactivating:', 'grand-media' ); ?></strong></h3>
|
971 |
+
<div id="reasons-list">
|
972 |
+
<div class="reason">
|
973 |
+
<label><input type="radio" name="reason" value="" checked/> <span><?php _e( 'It\'s a temporary deactivation. I\'m just debugging an issue.', 'grand-media' ); ?></span></label>
|
974 |
+
</div>
|
975 |
+
<div class="reason">
|
976 |
+
<label><input type="radio" name="reason" value="I no longer need the gallery plugin"/> <span><?php _e( 'I no longer need the gallery plugin', 'grand-media' ); ?></span></label>
|
977 |
+
</div>
|
978 |
+
<div class="reason has-input">
|
979 |
+
<label><input type="radio" name="reason" value="I found a better gallery plugin"/> <span><?php _e( 'I found a better gallery plugin', 'grand-media' ); ?></span></label>
|
980 |
+
<div class="reason-input"><input type="text" name="better_plugin" disabled placeholder="<?php _e( 'What\'s the plugin\'s name?', 'grand-media' ); ?>"/></div>
|
981 |
+
</div>
|
982 |
+
<div class="reason">
|
983 |
+
<label><input type="radio" name="reason" value="The plugin is too coomplicated for me"/> <span><?php _e( 'The plugin is too coomplicated for me', 'grand-media' ); ?></span></label>
|
984 |
+
</div>
|
985 |
+
<div class="reason">
|
986 |
+
<label><input type="radio" name="reason" value="The plugin broke my life"/> <span><?php _e( 'The plugin broke my life', 'grand-media' ); ?></span></label>
|
987 |
+
</div>
|
988 |
+
<div class="reason has-input">
|
989 |
+
<label><input type="radio" name="reason" value="Other"/> <span><?php _e( 'Other', 'grand-media' ); ?></span></label>
|
990 |
+
<div class="reason-input"><input type="text" name="other_reason" value="" disabled/></div>
|
991 |
+
</div>
|
992 |
+
</div>
|
993 |
+
</div>
|
994 |
+
<div class="gm-modal-footer">
|
995 |
+
<span class="spinner" style="float: none;"></span>
|
996 |
+
<a href="#" class="button button-secondary gm-button-submit-deactivate"><?php _e( 'Submit & Deactivate', 'grand-media' ); ?></a>
|
997 |
+
<a href="#" class="button button-secondary gm-button-skip-deactivate"><?php _e( 'Skip', 'grand-media' ); ?></a>
|
998 |
+
<a href="#" class="button button-primary gm-button-close"><?php _e( 'Cancel', 'grand-media' ); ?></a>
|
999 |
+
</div>
|
1000 |
+
</div>
|
1001 |
+
</div>
|
1002 |
+
</script>
|
1003 |
+
<?php
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
// Let's start the holy plugin
|
1009 |
+
global $gmGallery;
|
1010 |
+
$gmGallery = new Gmedia();
|
1011 |
|
1012 |
}
|
inc/core.php
CHANGED
@@ -2636,7 +2636,9 @@ class GmediaCore {
|
|
2636 |
'terms' => $terms
|
2637 |
);
|
2638 |
|
2639 |
-
if(
|
|
|
|
|
2640 |
$media_data['author'] = get_current_user_id();
|
2641 |
}
|
2642 |
|
@@ -3684,6 +3686,7 @@ class GmediaCore {
|
|
3684 |
'realslider' => '',
|
3685 |
'mosaic' => '',
|
3686 |
'photobox' => '',
|
|
|
3687 |
'wavesurfer' => '',
|
3688 |
'flipgrid' => '',
|
3689 |
'phantom' => '',
|
@@ -3715,7 +3718,7 @@ class GmediaCore {
|
|
3715 |
global $gmDB, $gmGallery;
|
3716 |
|
3717 |
if( !$set_module_callback){
|
3718 |
-
$set_module_callback = '
|
3719 |
}
|
3720 |
if( !$module){
|
3721 |
return $this->getModulePreset($gmGallery->options['default_gmedia_module'], $set_module_callback);
|
2636 |
'terms' => $terms
|
2637 |
);
|
2638 |
|
2639 |
+
if(!empty($file['auhtor'])){
|
2640 |
+
$media_data['author'] = (int) $file['auhtor'];
|
2641 |
+
} else if( !current_user_can('gmedia_delete_others_media')){
|
2642 |
$media_data['author'] = get_current_user_id();
|
2643 |
}
|
2644 |
|
3686 |
'realslider' => '',
|
3687 |
'mosaic' => '',
|
3688 |
'photobox' => '',
|
3689 |
+
'amron' => '',
|
3690 |
'wavesurfer' => '',
|
3691 |
'flipgrid' => '',
|
3692 |
'phantom' => '',
|
3718 |
global $gmDB, $gmGallery;
|
3719 |
|
3720 |
if( !$set_module_callback){
|
3721 |
+
$set_module_callback = 'amron';
|
3722 |
}
|
3723 |
if( !$module){
|
3724 |
return $this->getModulePreset($gmGallery->options['default_gmedia_module'], $set_module_callback);
|
inc/db.connect.php
CHANGED
@@ -1210,10 +1210,10 @@ class GmediaDB{
|
|
1210 |
}
|
1211 |
|
1212 |
if(!empty($tax_query)){
|
1213 |
-
if(isset($q['terms_relation']) && strtoupper($q['terms_relation']) == '
|
1214 |
-
$terms_relation = 'OR';
|
1215 |
-
} else{
|
1216 |
$terms_relation = 'AND';
|
|
|
|
|
1217 |
}
|
1218 |
$clauses['join'] = '';
|
1219 |
$clauses['where'] = array();
|
1210 |
}
|
1211 |
|
1212 |
if(!empty($tax_query)){
|
1213 |
+
if(isset($q['terms_relation']) && strtoupper($q['terms_relation']) == 'AND'){
|
|
|
|
|
1214 |
$terms_relation = 'AND';
|
1215 |
+
} else{
|
1216 |
+
$terms_relation = 'OR';
|
1217 |
}
|
1218 |
$clauses['join'] = '';
|
1219 |
$clauses['where'] = array();
|
inc/functions.php
CHANGED
@@ -289,7 +289,7 @@ function gmedia_gallery_more_data(&$item){
|
|
289 |
$item->custom = array();
|
290 |
$item->meta = array('_edited' => '—',
|
291 |
'_query' => array(),
|
292 |
-
'_module' => $gmCore->_get('gallery_module', '
|
293 |
);
|
294 |
$item->meta['_settings'] = array($item->meta['_module'] => array());
|
295 |
|
289 |
$item->custom = array();
|
290 |
$item->meta = array('_edited' => '—',
|
291 |
'_query' => array(),
|
292 |
+
'_module' => $gmCore->_get('gallery_module', 'amron')
|
293 |
);
|
294 |
$item->meta['_settings'] = array($item->meta['_module'] => array());
|
295 |
|
load-template.php
CHANGED
@@ -66,7 +66,7 @@ if ( $set_module && $user_ID && current_user_can( 'gmedia_gallery_manage' ) ) {
|
|
66 |
}
|
67 |
|
68 |
if ( ! $gmedia_module ) {
|
69 |
-
$gmedia_module = '
|
70 |
}
|
71 |
|
72 |
$module = $gmCore->get_module_path( $gmedia_module );
|
66 |
}
|
67 |
|
68 |
if ( ! $gmedia_module ) {
|
69 |
+
$gmedia_module = 'amron';
|
70 |
}
|
71 |
|
72 |
$module = $gmCore->get_module_path( $gmedia_module );
|
module/amron/css/gm_vit_itemMenu.css
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/****************** Item Menu ************/
|
2 |
+
.gmedia_v2_CollectionItemInfoMenu
|
3 |
+
{
|
4 |
+
position: relative;
|
5 |
+
overflow: hidden ;
|
6 |
+
float: left ;
|
7 |
+
}
|
8 |
+
.gmedia_v2_CollectionItemInfoMenu .itemsButtons
|
9 |
+
{
|
10 |
+
position: relative;
|
11 |
+
padding: 9px;
|
12 |
+
width: 38px;
|
13 |
+
height: 38px;
|
14 |
+
cursor: pointer;
|
15 |
+
float: left;
|
16 |
+
transition: background-color .2s, transform .4s ease-out;
|
17 |
+
border-radius: 2px;
|
18 |
+
}
|
19 |
+
.gmedia_v2_CollectionItemInfoMenu .lightbox
|
20 |
+
{
|
21 |
+
margin-right: 2px;
|
22 |
+
}
|
23 |
+
.gmedia_v2_CollectionItemInfoMenu .itemsButtons svg
|
24 |
+
{
|
25 |
+
width: 100%;
|
26 |
+
height: 100%;
|
27 |
+
transition: fill .2s, transform .4s ease-out;
|
28 |
+
vertical-align: baseline !important;
|
29 |
+
}
|
module/amron/css/gm_vit_modalWin.css
ADDED
@@ -0,0 +1,289 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******************************** Modal Window *************************/
|
2 |
+
.gmedia_v2_Modal * {
|
3 |
+
box-sizing: border-box;
|
4 |
+
}
|
5 |
+
.gmedia_v2_Modal
|
6 |
+
{
|
7 |
+
position: fixed;
|
8 |
+
-webkit-backface-visibility: hidden;
|
9 |
+
backface-visibility: hidden;
|
10 |
+
top: 0;
|
11 |
+
left: 0;
|
12 |
+
right: 0;
|
13 |
+
bottom: 0;
|
14 |
+
overflow: hidden;
|
15 |
+
opacity: 0;
|
16 |
+
will-change: opacity;
|
17 |
+
transition: opacity .4s;
|
18 |
+
text-align: center;
|
19 |
+
}
|
20 |
+
.gmedia_v2_Modal .gmflexe
|
21 |
+
{
|
22 |
+
display: inline-block;
|
23 |
+
width: 0;
|
24 |
+
height: 100%;
|
25 |
+
vertical-align: middle;
|
26 |
+
}
|
27 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare
|
28 |
+
{
|
29 |
+
font-size: 14px;
|
30 |
+
line-height: 1.3;
|
31 |
+
margin: 0 10px;
|
32 |
+
padding-bottom: 10px;
|
33 |
+
max-width: 480px;
|
34 |
+
min-width: 260px;
|
35 |
+
background-color: white;
|
36 |
+
border-radius: 2px;
|
37 |
+
box-shadow: 0 8px 16px rgba(0, 0, 0, .15);
|
38 |
+
vertical-align: middle;
|
39 |
+
display: inline-block ;
|
40 |
+
will-change: transform;
|
41 |
+
}
|
42 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemDescription
|
43 |
+
{
|
44 |
+
display: block;
|
45 |
+
margin: 0.5em 0 1em 0;
|
46 |
+
font-weight: 400;
|
47 |
+
font-size: 80%;
|
48 |
+
line-height: 1;
|
49 |
+
}
|
50 |
+
.gmedia_v2_ItemShare .gmDescriptionWrap .gmItemTitle
|
51 |
+
{
|
52 |
+
display: block;
|
53 |
+
font-size: 130%;
|
54 |
+
font-weight: 600;
|
55 |
+
line-height: 1.3;
|
56 |
+
}
|
57 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemShareButtonWrap
|
58 |
+
{
|
59 |
+
position: relative;
|
60 |
+
display: inline-block;
|
61 |
+
padding: 0 4px;
|
62 |
+
min-width: 130px;
|
63 |
+
width: 50%;
|
64 |
+
height: 42px;
|
65 |
+
}
|
66 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemShareButtonWrap .gmItemCopyLink
|
67 |
+
{
|
68 |
+
background-color: rgb(250, 250, 250);
|
69 |
+
border: solid 1px rgba(0, 0, 0, 0.17);
|
70 |
+
width: 100%;
|
71 |
+
height: 100%;
|
72 |
+
border-radius: 2px;
|
73 |
+
overflow: hidden;
|
74 |
+
position: relative;
|
75 |
+
cursor: pointer;
|
76 |
+
transition: .4s;
|
77 |
+
}
|
78 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemShareButtonWrap .gmItemCopyLink svg
|
79 |
+
{
|
80 |
+
width: 40px;
|
81 |
+
height: 40px;
|
82 |
+
padding: 4px;
|
83 |
+
float: left;
|
84 |
+
transition: fill .4s;
|
85 |
+
vertical-align: baseline !important;
|
86 |
+
}
|
87 |
+
.gmItemShareButtonWrap .gmItemCopyLink .gmSH_title
|
88 |
+
{
|
89 |
+
position: absolute;
|
90 |
+
white-space: nowrap;
|
91 |
+
line-height: 41px;
|
92 |
+
left: 41px;
|
93 |
+
right: 10px;
|
94 |
+
overflow: hidden;
|
95 |
+
opacity: .7;
|
96 |
+
transition: .4s;
|
97 |
+
}
|
98 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemCopyLink:hover
|
99 |
+
{
|
100 |
+
box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
|
101 |
+
}
|
102 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemCopyLink:hover .gmSH_title
|
103 |
+
{
|
104 |
+
opacity: 1;
|
105 |
+
}
|
106 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemShareButton
|
107 |
+
{
|
108 |
+
border: 1px solid;
|
109 |
+
border-color: rgba(0, 0, 0, 0.18);
|
110 |
+
cursor: pointer;
|
111 |
+
width: 100%;
|
112 |
+
height: 100%;
|
113 |
+
border-radius: 2px;
|
114 |
+
background-color: rgb(250, 250, 250);
|
115 |
+
transition: .4s;
|
116 |
+
}
|
117 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemShareButton:hover
|
118 |
+
{
|
119 |
+
box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
|
120 |
+
}
|
121 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemShareButton:hover .gmSH_title
|
122 |
+
{
|
123 |
+
opacity: 1;
|
124 |
+
}
|
125 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemShareButton svg
|
126 |
+
{
|
127 |
+
width: 40px;
|
128 |
+
height: 40px;
|
129 |
+
float: left;
|
130 |
+
vertical-align: baseline !important;
|
131 |
+
}
|
132 |
+
.gmedia_v2_Modal .gmedia_v2_ItemShare .gmItemShareButton .gmSH_title
|
133 |
+
{
|
134 |
+
white-space: nowrap;
|
135 |
+
position: absolute;
|
136 |
+
left: 30px;
|
137 |
+
right: 0;
|
138 |
+
font-size: 15px;
|
139 |
+
font-weight: 400;
|
140 |
+
line-height: 41px;
|
141 |
+
text-align: center;
|
142 |
+
opacity: 0.7;
|
143 |
+
transition: opacity .4s;
|
144 |
+
}
|
145 |
+
.gmedia_v2_Modal .gmedia_v2_ItemInfoBar
|
146 |
+
{
|
147 |
+
font-size: 14px;
|
148 |
+
line-height: 1.3;
|
149 |
+
margin: 0 10px;
|
150 |
+
padding-bottom: 10px;
|
151 |
+
max-width: 820px;
|
152 |
+
min-width: 260px;
|
153 |
+
background-color: white;
|
154 |
+
border-radius: 2px;
|
155 |
+
box-shadow: 0 8px 16px rgba(0, 0, 0, .15);
|
156 |
+
vertical-align: middle;
|
157 |
+
display: inline-block ;
|
158 |
+
will-change: transform;
|
159 |
+
}
|
160 |
+
.gmedia_v2_Modal .gmedia_v2_ItemInfoBar .gmInfoBarCloseButton, .gmedia_v2_Modal .gmedia_v2_ItemShare .gmInfoBarCloseButton
|
161 |
+
{
|
162 |
+
position: relative;
|
163 |
+
z-index: 11;
|
164 |
+
margin: 10px;
|
165 |
+
width: 24px;
|
166 |
+
height: 24px;
|
167 |
+
display: inline-block;
|
168 |
+
float: right ;
|
169 |
+
cursor: pointer;
|
170 |
+
}
|
171 |
+
.gmedia_v2_Modal .gmedia_v2_ItemInfoBar .gmInfoBarCloseButton svg, .gmedia_v2_Modal .gmedia_v2_ItemShare .gmInfoBarCloseButton svg
|
172 |
+
{
|
173 |
+
width: 100%;
|
174 |
+
height: 100%;
|
175 |
+
vertical-align: baseline !important;
|
176 |
+
}
|
177 |
+
.gmedia_v2_Modal .gmedia_v2_ItemInfoBar .gmDescriptionWrap, .gmedia_v2_Modal .gmedia_v2_ItemShare .gmDescriptionWrap
|
178 |
+
{
|
179 |
+
min-width: 270px;
|
180 |
+
min-height: 44px;
|
181 |
+
padding: 10px 20px 0 20px;
|
182 |
+
float: left;
|
183 |
+
text-align: left;
|
184 |
+
}
|
185 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gmItemTitle
|
186 |
+
{
|
187 |
+
font-size: 130%;
|
188 |
+
font-weight: 600;
|
189 |
+
}
|
190 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gmItemDescription
|
191 |
+
{
|
192 |
+
font-size: 80%;
|
193 |
+
font-weight: 400;
|
194 |
+
}
|
195 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .termsTitle
|
196 |
+
{
|
197 |
+
display: inline-block;
|
198 |
+
line-height: 26px;
|
199 |
+
padding: 0 20px 0 3px;
|
200 |
+
position: relative;
|
201 |
+
text-decoration: none;
|
202 |
+
/*float: left;*/
|
203 |
+
}
|
204 |
+
/*--------------- TAGS ---------------------*/
|
205 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .terms_list
|
206 |
+
{
|
207 |
+
list-style: none;
|
208 |
+
margin: 0;
|
209 |
+
overflow: hidden;
|
210 |
+
padding: 0;
|
211 |
+
}
|
212 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gm_tags_ul {
|
213 |
+
font-size: 1rem !important;
|
214 |
+
line-height: 1.4 !important;
|
215 |
+
margin-bottom: 0 !important;
|
216 |
+
margin-left: 0 !important;
|
217 |
+
}
|
218 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .terms_list li {
|
219 |
+
float: left;
|
220 |
+
}
|
221 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gm_tag, .gmedia_v2_ItemInfoBar .gmDescriptionWrap .gm_album,
|
222 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gm_category
|
223 |
+
{
|
224 |
+
border-radius: 3px;
|
225 |
+
display: inline-block;
|
226 |
+
height: 26px;
|
227 |
+
line-height: 26px;
|
228 |
+
padding: 0 20px 0 23px;
|
229 |
+
position: relative;
|
230 |
+
margin: 0 7px 10px 0;
|
231 |
+
text-decoration: none;
|
232 |
+
cursor: pointer;
|
233 |
+
transition: .3s;
|
234 |
+
}
|
235 |
+
/*------------------------------------*/
|
236 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gmItemMetaExifValue
|
237 |
+
{
|
238 |
+
line-height: 1.9;
|
239 |
+
display: inline-block;
|
240 |
+
}
|
241 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gmItemsDate
|
242 |
+
{
|
243 |
+
font-size: 100%;
|
244 |
+
line-height: 1.9;
|
245 |
+
}
|
246 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gmItemMetaKey
|
247 |
+
{
|
248 |
+
float: left;
|
249 |
+
width: 40%;
|
250 |
+
min-width: 80px;
|
251 |
+
}
|
252 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gmItemMetaValue
|
253 |
+
{
|
254 |
+
float: left;
|
255 |
+
white-space: nowrap;
|
256 |
+
text-transform: capitalize;
|
257 |
+
}
|
258 |
+
.gmedia_v2_ItemInfoBar .gmDescriptionWrap .gmItemMetaExifSeparator {
|
259 |
+
display: inline-block;
|
260 |
+
font-size: 100%;
|
261 |
+
margin: 0 2px;
|
262 |
+
opacity: .4;
|
263 |
+
}
|
264 |
+
.gmedia_v2_Modal .gmedia_v2_ItemInfoBar .gmDescriptionWrap .likesViewCom
|
265 |
+
{
|
266 |
+
position: relative;
|
267 |
+
float: left;
|
268 |
+
width: 31%;
|
269 |
+
min-height: 40px;
|
270 |
+
border: 1px solid;
|
271 |
+
border-color: rgba(0, 0, 0, 0.18);
|
272 |
+
border-radius: 2px;
|
273 |
+
background-color: rgb(250, 250, 250);
|
274 |
+
padding: 4px;
|
275 |
+
margin: 0 1%;
|
276 |
+
text-align: center;
|
277 |
+
}
|
278 |
+
.gmedia_v2_Modal .gmedia_v2_ItemInfoBar .gmDescriptionWrap .likesViewCom svg
|
279 |
+
{
|
280 |
+
display: inline-block;
|
281 |
+
width: 24px;
|
282 |
+
height: 24px;
|
283 |
+
vertical-align: baseline !important;
|
284 |
+
}
|
285 |
+
.gmedia_v2_Modal .gmedia_v2_ItemInfoBar .gmDescriptionWrap .likesViewCom .counterTxt
|
286 |
+
{
|
287 |
+
font-size: 15px;
|
288 |
+
line-height: 1;
|
289 |
+
}
|
module/amron/css/gm_vit_slider.css
ADDED
@@ -0,0 +1,399 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.gm_grabbable {
|
2 |
+
cursor: move; /* fallback if grab cursor is unsupported */
|
3 |
+
cursor: grab;
|
4 |
+
cursor: -moz-grab;
|
5 |
+
cursor: -webkit-grab;
|
6 |
+
}
|
7 |
+
/* (Optional) Apply a "closed-hand" cursor during drag operation. */
|
8 |
+
.gm_grabbable:active {
|
9 |
+
cursor: grabbing;
|
10 |
+
cursor: -moz-grabbing;
|
11 |
+
cursor: -webkit-grabbing;
|
12 |
+
}
|
13 |
+
/******************************** CollectionSlider View ********************/
|
14 |
+
.gmedia_v2_ColectionSlider *{
|
15 |
+
box-sizing: border-box !important;
|
16 |
+
line-height: 1.4;
|
17 |
+
}
|
18 |
+
.gmedia_v2_hints
|
19 |
+
{
|
20 |
+
position: absolute;
|
21 |
+
display: inline-block;
|
22 |
+
padding: 5px 10px;
|
23 |
+
font-size: 12px;
|
24 |
+
line-height: normal;
|
25 |
+
background-color: rgba(0,0,0,.8);
|
26 |
+
color: white;
|
27 |
+
transform: translateY(-100%);
|
28 |
+
border-radius: 2px;
|
29 |
+
transition: .4s;
|
30 |
+
}
|
31 |
+
.gmedia_v2_ColectionSlider
|
32 |
+
{
|
33 |
+
position: fixed;
|
34 |
+
z-index: 99999;
|
35 |
+
/*width: 100%;*/
|
36 |
+
/*height: 100vh;*/
|
37 |
+
left: 0;
|
38 |
+
right: 0;
|
39 |
+
top: 0;
|
40 |
+
bottom: 0;
|
41 |
+
visibility: hidden;
|
42 |
+
opacity: 0;
|
43 |
+
-ms-touch-action: none;
|
44 |
+
touch-action: none;
|
45 |
+
-webkit-text-size-adjust: 100%;
|
46 |
+
font-family: Arial, Helvetica, sans-serif;
|
47 |
+
-webkit-transition: opacity .4s ease;
|
48 |
+
transition: opacity .4s ease, visibility .4s ease
|
49 |
+
}
|
50 |
+
.gmedia_v2_ColectionSliderActivate
|
51 |
+
{
|
52 |
+
pointer-events: auto;
|
53 |
+
visibility: visible;
|
54 |
+
opacity: 1;
|
55 |
+
}
|
56 |
+
.gmedia_v2_ColectionSlider .gmSliderBg
|
57 |
+
{
|
58 |
+
width: 100%;
|
59 |
+
height: 100%;
|
60 |
+
transform: translateZ(0);
|
61 |
+
}
|
62 |
+
.gmedia_v2_ColectionSlider .gmedia_v2_SlidesWrap
|
63 |
+
{
|
64 |
+
position: absolute;
|
65 |
+
/*will-change: transform;*/
|
66 |
+
width: 100%;
|
67 |
+
top:0;
|
68 |
+
bottom: 0;
|
69 |
+
}
|
70 |
+
.gmedia_v2_ColectionSlider .miniScreen
|
71 |
+
{
|
72 |
+
margin-top: 0;
|
73 |
+
margin-bottom: 0;
|
74 |
+
}
|
75 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage
|
76 |
+
{
|
77 |
+
position: absolute;
|
78 |
+
display: block;
|
79 |
+
transform: translate3d(0px,0px,0px);
|
80 |
+
width: 100%;
|
81 |
+
top:0;
|
82 |
+
bottom: 0;
|
83 |
+
left: 0;
|
84 |
+
-webkit-backface-visibility: hidden;
|
85 |
+
overflow: hidden;
|
86 |
+
}
|
87 |
+
.gmedia_v2_ColectionSlider .gmedia_v2_SliderPage .sliderItemsButtons
|
88 |
+
{
|
89 |
+
position: absolute;
|
90 |
+
top: 10px;
|
91 |
+
right: 10px;
|
92 |
+
transition: transform.5s;
|
93 |
+
}
|
94 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage .gmedia_iconHolder
|
95 |
+
{
|
96 |
+
position: absolute;
|
97 |
+
width: 140px;
|
98 |
+
height: 140px;
|
99 |
+
border-radius: 50%;
|
100 |
+
background-color: rgba(255, 255, 255, 0.6);
|
101 |
+
transform: translateY(-50%) translateX(-50%);
|
102 |
+
left: 50%;
|
103 |
+
top:50%;
|
104 |
+
padding: 30px;
|
105 |
+
visibility: hidden;
|
106 |
+
will-change: transform;
|
107 |
+
cursor: pointer;
|
108 |
+
}
|
109 |
+
.gmedia_v2_SliderPage .gmedia_iconHolder svg
|
110 |
+
{
|
111 |
+
width: 100%;
|
112 |
+
height: 100%;
|
113 |
+
fill: rgba(0, 0, 0, 0.4);
|
114 |
+
}
|
115 |
+
.gmedia_v2_SliderPage.info_icon .gmedia_iconHolder
|
116 |
+
{
|
117 |
+
visibility: visible;
|
118 |
+
}
|
119 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage .gmedia_sliderPage_inner
|
120 |
+
{
|
121 |
+
position: absolute;
|
122 |
+
display: block;
|
123 |
+
left: 0;
|
124 |
+
top: 0;
|
125 |
+
bottom: 0;
|
126 |
+
width: 100%;
|
127 |
+
overflow: hidden;
|
128 |
+
transform: translate3d(0,0,0);
|
129 |
+
backface-visibility: hidden;
|
130 |
+
-webkit-backface-visibility: hidden;
|
131 |
+
-webkit-transform-origin: left top;
|
132 |
+
transform-origin: left top;
|
133 |
+
}
|
134 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage .gmedia_sliderPage_inner img
|
135 |
+
{
|
136 |
+
/*will-change: opacity;*/
|
137 |
+
-webkit-backface-visibility: hidden;
|
138 |
+
backface-visibility: hidden;
|
139 |
+
position: absolute !important;
|
140 |
+
display: block !important;
|
141 |
+
border: none !important;
|
142 |
+
max-width: none !important;
|
143 |
+
/*transform-origin: 0 0 !important;*/
|
144 |
+
opacity: 0;
|
145 |
+
padding: 0 !important;
|
146 |
+
margin: 0 !important;
|
147 |
+
transform: translate3d(0,0,0);
|
148 |
+
transition: opacity .35s ease;
|
149 |
+
}
|
150 |
+
.gmedia_v2_SliderPage.video_play .gmedia_sliderPage_inner img{
|
151 |
+
visibility: hidden;
|
152 |
+
}
|
153 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage .gmedia_sliderPage_inner img.onLoad
|
154 |
+
{
|
155 |
+
opacity: 1;
|
156 |
+
}
|
157 |
+
.gmedia_v2_SliderPage .gmedia_sliderPage_inner .gmedia_video_wrap
|
158 |
+
{
|
159 |
+
position: absolute;
|
160 |
+
display: block;
|
161 |
+
border: none;
|
162 |
+
}
|
163 |
+
.gmedia_v2_SliderPage .gmedia_sliderPage_inner .gmedia_video_wrap iframe
|
164 |
+
{
|
165 |
+
width: 100% !important;
|
166 |
+
height: 100% !important;
|
167 |
+
top:0;
|
168 |
+
left: 0;
|
169 |
+
}
|
170 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage .gmedia_v2_ItemPage
|
171 |
+
{
|
172 |
+
position: absolute;
|
173 |
+
width: 100%;
|
174 |
+
height: 100%;
|
175 |
+
top:0;
|
176 |
+
left: 0;
|
177 |
+
overflow: hidden;
|
178 |
+
}
|
179 |
+
.gmedia_SliderImage {
|
180 |
+
position: absolute !important;
|
181 |
+
display: block !important;
|
182 |
+
border: none !important;
|
183 |
+
max-width: none !important;
|
184 |
+
transform-origin: 0 0 !important;
|
185 |
+
}
|
186 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage .gmedia_v2_ItemPage .gmflexe
|
187 |
+
{
|
188 |
+
display: inline-block;
|
189 |
+
width: 0;
|
190 |
+
height: 100%;
|
191 |
+
vertical-align: middle;
|
192 |
+
}
|
193 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage .gmedia_v2_ItemPage img
|
194 |
+
{
|
195 |
+
position: absolute;
|
196 |
+
display: block;
|
197 |
+
border: none;
|
198 |
+
}
|
199 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage .gmedia_v2_ItemPage .gmedia_video_wrap
|
200 |
+
{
|
201 |
+
position: absolute;
|
202 |
+
display: block;
|
203 |
+
border: none;
|
204 |
+
}
|
205 |
+
.gmedia_v2_SlidesWrap .gmedia_v2_SliderPage .gmedia_v2_ItemPage .gmedia_video_wrap iframe
|
206 |
+
{
|
207 |
+
width: 100% !important;
|
208 |
+
height: 100% !important;
|
209 |
+
top:0;
|
210 |
+
left: 0;
|
211 |
+
}
|
212 |
+
.gmedia_v2_ColectionSlider .sliderNextPrevButtons
|
213 |
+
{
|
214 |
+
position: absolute;
|
215 |
+
width: 50px;
|
216 |
+
height: 34px;
|
217 |
+
top: 50%;
|
218 |
+
margin: 0 10px;
|
219 |
+
cursor: pointer;
|
220 |
+
transition: background-color .2s, transform .4s ease-out;
|
221 |
+
border-radius: 2px;
|
222 |
+
}
|
223 |
+
.gmedia_v2_ColectionSlider .sliderNextPrevButtonsMiniScreen
|
224 |
+
{
|
225 |
+
display: none;
|
226 |
+
}
|
227 |
+
.gmedia_v2_ColectionSlider .sliderNextPrevButtons svg
|
228 |
+
{
|
229 |
+
width: 100%;
|
230 |
+
height: 100%;
|
231 |
+
vertical-align: baseline !important;
|
232 |
+
}
|
233 |
+
.gmedia_v2_ColectionSlider .sliderItemsButtons
|
234 |
+
{
|
235 |
+
position: relative;
|
236 |
+
padding: 9px;
|
237 |
+
width: 38px;
|
238 |
+
height: 38px;
|
239 |
+
margin: 0 2px 2px 0;
|
240 |
+
cursor: pointer;
|
241 |
+
float: left;
|
242 |
+
background-color: rgba(0, 0, 0, 0.4);
|
243 |
+
transition: background-color .2s, transform .4s ease-out;
|
244 |
+
border-radius: 2px;
|
245 |
+
}
|
246 |
+
.gmedia_v2_ColectionSlider .sliderItemsButtons svg
|
247 |
+
{
|
248 |
+
width: 100%;
|
249 |
+
height: 100%;
|
250 |
+
transition: fill .2s, transform .4s ease-out;
|
251 |
+
vertical-align: baseline !important;
|
252 |
+
}
|
253 |
+
.gmedia_v2_ColectionSlider .gmNoneTransition
|
254 |
+
{
|
255 |
+
transition: none;
|
256 |
+
}
|
257 |
+
.gmedia_v2_ColectionSlider .gmedia_v2_SlidesHeader
|
258 |
+
{
|
259 |
+
position: absolute;
|
260 |
+
height:auto;
|
261 |
+
background-image: linear-gradient(0deg, rgba(0, 0, 0, 0),rgba(0, 0, 0, 1));
|
262 |
+
width: 100%;
|
263 |
+
top: 0;
|
264 |
+
transform: translateY(-100%);
|
265 |
+
/*will-change: transform;*/
|
266 |
+
transition: transform .4s ease-out;
|
267 |
+
}
|
268 |
+
.gmedia_v2_ColectionSlider .gmedia_v2_SlidesHeaderMiniScreen
|
269 |
+
{
|
270 |
+
/*background-color: rgba(0, 0, 0, 0);
|
271 |
+
background-image: linear-gradient(0deg, rgba(0, 0, 0, 0),rgba(0, 0, 0, 1));*/
|
272 |
+
}
|
273 |
+
.gmedia_v2_ColectionSlider .gmedia_v2_SlidesHeaderActivate
|
274 |
+
{
|
275 |
+
transform: translateY(0);
|
276 |
+
}
|
277 |
+
.gmedia_v2_ColectionSlider .gmedia_v2_SlidesFooter
|
278 |
+
{
|
279 |
+
position: absolute;
|
280 |
+
width: 100%;
|
281 |
+
bottom: 0;
|
282 |
+
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0),rgba(0, 0, 0, 1));
|
283 |
+
transform: translateY(100%);
|
284 |
+
/*will-change: transform;*/
|
285 |
+
transition: transform .4s ease-out;
|
286 |
+
}
|
287 |
+
.gmedia_v2_ColectionSlider .gmedia_v2_SlidesFooterActivate
|
288 |
+
{
|
289 |
+
transform: translateY(0);
|
290 |
+
}
|
291 |
+
.gmedia_v2_ColectionSlider .gmInfoBox1
|
292 |
+
{
|
293 |
+
position: relative;
|
294 |
+
float: left;
|
295 |
+
margin: 10px 20px;
|
296 |
+
overflow: hidden;
|
297 |
+
}
|
298 |
+
.gmedia_v2_ColectionSliderItemTitle
|
299 |
+
{
|
300 |
+
text-rendering: auto;
|
301 |
+
color: #fff;
|
302 |
+
font-size: 36px;
|
303 |
+
width: 100%;
|
304 |
+
overflow: hidden;
|
305 |
+
white-space: nowrap;
|
306 |
+
text-overflow: ellipsis;
|
307 |
+
line-height: 1;
|
308 |
+
box-sizing: content-box;
|
309 |
+
letter-spacing: 0;
|
310 |
+
text-transform: capitalize;
|
311 |
+
margin-bottom: 5px;
|
312 |
+
}
|
313 |
+
.gmedia_v2_ColectionSliderItemTitleMiniScreen
|
314 |
+
{
|
315 |
+
padding-bottom: 10px;
|
316 |
+
}
|
317 |
+
.gmedia_v2_ColectionSliderTermTitle
|
318 |
+
{
|
319 |
+
|
320 |
+
}
|
321 |
+
.gmedia_v2_ColectionSliderTermTitleMiniScreen
|
322 |
+
{
|
323 |
+
|
324 |
+
}
|
325 |
+
/******************************** Slider ScrollBar *************************/
|
326 |
+
.gmedia_v2_TermScrollBarWrap
|
327 |
+
{
|
328 |
+
position: relative;
|
329 |
+
width: 100%;
|
330 |
+
margin: 10px 0;
|
331 |
+
overflow: hidden;
|
332 |
+
}
|
333 |
+
.gmedia_v2_TermScrollBarWrap .gmedia_v2_ScrollView
|
334 |
+
{
|
335 |
+
position: absolute;
|
336 |
+
overflow: hidden;
|
337 |
+
}
|
338 |
+
.gmedia_v2_ScrollBarItem
|
339 |
+
{
|
340 |
+
position: absolute;
|
341 |
+
height: 80px;
|
342 |
+
width: 100px;
|
343 |
+
overflow: hidden;
|
344 |
+
}
|
345 |
+
.gmedia_v2_TermScrollBarWrap .miniScreen
|
346 |
+
{
|
347 |
+
height: 50px;
|
348 |
+
width: 70px;
|
349 |
+
margin: 0 0;
|
350 |
+
}
|
351 |
+
.gmedia_v2_ScrollBarItem .gmedia_v2_ScrollBarItemBg
|
352 |
+
{
|
353 |
+
position: absolute;
|
354 |
+
left: 3px;
|
355 |
+
right: 3px;
|
356 |
+
top: 3px;
|
357 |
+
bottom: 3px;
|
358 |
+
background-position: center;
|
359 |
+
-webkit-background-size: cover;
|
360 |
+
background-size: cover;
|
361 |
+
background-repeat: no-repeat;
|
362 |
+
-webkit-backface-visibility: hidden;
|
363 |
+
backface-visibility: hidden;
|
364 |
+
}
|
365 |
+
.gmedia_v2_ScrollBarItem .gmedia_v2_ScrollBarItemHover
|
366 |
+
{
|
367 |
+
position: absolute;
|
368 |
+
opacity: 0;
|
369 |
+
transition: opacity .2s;
|
370 |
+
pointer-events: none;
|
371 |
+
top: 0;
|
372 |
+
left: 0;
|
373 |
+
right: 0;
|
374 |
+
bottom: 0;
|
375 |
+
border-style: solid;
|
376 |
+
border-width: 3px;
|
377 |
+
border-color: #fff;
|
378 |
+
}
|
379 |
+
.gmedia_v2_ScrollBarItem .gmedia_v2_ScrollBarItemLink
|
380 |
+
{
|
381 |
+
position: absolute;
|
382 |
+
width: 34px;
|
383 |
+
height: 34px;
|
384 |
+
padding: 6px;
|
385 |
+
border-radius: 50%;
|
386 |
+
left: 50%;
|
387 |
+
top: 50%;
|
388 |
+
transform: translateY(-50%) translateX(-50%);
|
389 |
+
}
|
390 |
+
.gmedia_v2_ScrollBarItemLink.rotate svg{
|
391 |
+
animation: 1s spinner linear infinite;
|
392 |
+
}
|
393 |
+
.gmedia_v2_ScrollBarItemLink svg
|
394 |
+
{
|
395 |
+
width: 100%;
|
396 |
+
height: 100%;
|
397 |
+
fill: rgba(0, 0, 0, 0.58);
|
398 |
+
vertical-align: baseline !important;
|
399 |
+
}
|
module/amron/css/style.css
ADDED
@@ -0,0 +1,512 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/********* GM Preloader *************/
|
2 |
+
.gmedia_v2_Preloader {
|
3 |
+
min-height: inherit;
|
4 |
+
position: absolute;
|
5 |
+
top: 0;
|
6 |
+
left: 0;
|
7 |
+
bottom: 0;
|
8 |
+
right: 0;
|
9 |
+
overflow: hidden;
|
10 |
+
z-index: 100;
|
11 |
+
}
|
12 |
+
@keyframes spinner {
|
13 |
+
0% { transform: rotate(-360deg); }
|
14 |
+
100% { transform: rotate(0deg); }
|
15 |
+
}
|
16 |
+
@keyframes _spinner {
|
17 |
+
to {
|
18 |
+
transform: rotate(-1440deg);
|
19 |
+
}
|
20 |
+
}
|
21 |
+
.gmedia_v2_Preloader .c-spinner {
|
22 |
+
/*animation: 2s _spinner ease-in-out infinite alternate;*/
|
23 |
+
animation: 1s spinner linear infinite;
|
24 |
+
}
|
25 |
+
@keyframes gmFadeIn {
|
26 |
+
from {
|
27 |
+
opacity: 0;
|
28 |
+
}
|
29 |
+
to {
|
30 |
+
opacity: 1;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
.amron_module *{
|
34 |
+
box-sizing: border-box;
|
35 |
+
line-height: 1.4;
|
36 |
+
}
|
37 |
+
/***************** Tags Cloud *********************/
|
38 |
+
.gmedia_amron_CollectionTagsCloud{
|
39 |
+
position: relative;
|
40 |
+
display: block;
|
41 |
+
margin-top: 10px;
|
42 |
+
margin-bottom: 2px;
|
43 |
+
text-align: center;
|
44 |
+
/*background-color: #eeeeee;*/
|
45 |
+
}
|
46 |
+
.gmedia_amron_CollectionTagsCloud ul {
|
47 |
+
margin: 0 !important;
|
48 |
+
padding: 0 !important;
|
49 |
+
list-style: none;
|
50 |
+
}
|
51 |
+
.gmedia_amron_CollectionTagsCloud ul li::before
|
52 |
+
{
|
53 |
+
display: none;
|
54 |
+
}
|
55 |
+
.gmedia_amron_CollectionTagsCloud ul li {
|
56 |
+
display: inline-block;
|
57 |
+
max-width: 200px;
|
58 |
+
padding: 5px 8px !important;
|
59 |
+
margin: 3px !important;
|
60 |
+
white-space: nowrap;
|
61 |
+
text-overflow: ellipsis;
|
62 |
+
overflow: hidden;
|
63 |
+
font-size: 15px !important;
|
64 |
+
border-radius: 2px;
|
65 |
+
text-decoration: none;
|
66 |
+
-webkit-touch-callout: none; /* iOS Safari */
|
67 |
+
-webkit-user-select: none; /* Safari */
|
68 |
+
-moz-user-select: none; /* Firefox */
|
69 |
+
-ms-user-select: none; /* Internet Explorer/Edge */
|
70 |
+
user-select: none;
|
71 |
+
cursor: pointer;
|
72 |
+
transition: 0.3s;
|
73 |
+
}
|
74 |
+
/******************************** Saved Button ****************************/
|
75 |
+
.gmedia_amron_BookmarkBox{
|
76 |
+
position: relative;
|
77 |
+
z-index: 1;
|
78 |
+
}
|
79 |
+
.gmedia_amron_BookmarkBox .gmedia_buttonHolder{
|
80 |
+
position: relative;
|
81 |
+
display: flex;
|
82 |
+
overflow: hidden;
|
83 |
+
height: 40px;
|
84 |
+
}
|
85 |
+
.gmedia_amron_BookmarkBox .gmedia_buttonHolder .gmedia_lineStyle
|
86 |
+
{
|
87 |
+
flex: auto;
|
88 |
+
height: 1px;
|
89 |
+
margin: auto 15px;
|
90 |
+
background-color: rgba(0, 0, 0, 0.11);
|
91 |
+
}
|
92 |
+
.gmedia_amron_BookmarkBox .gmedia_buttonHolder .gmedia_savedButton
|
93 |
+
{
|
94 |
+
flex: initial;
|
95 |
+
width: 40px;
|
96 |
+
height: 40px;
|
97 |
+
border-radius: 50%;
|
98 |
+
padding: 10px;
|
99 |
+
border: solid 1px rgba(0, 0, 0, 0.11);
|
100 |
+
cursor: pointer;
|
101 |
+
}
|
102 |
+
.gmedia_amron_BookmarkBox .gmedia_buttonHolder .gmedia_savedButton svg
|
103 |
+
{
|
104 |
+
width: 100%;
|
105 |
+
height: 100%;
|
106 |
+
vertical-align: baseline !important;
|
107 |
+
}
|
108 |
+
.gmedia_amron_BookmarkBox .gmedia_infoBox
|
109 |
+
{
|
110 |
+
position: relative;
|
111 |
+
text-align: center;
|
112 |
+
overflow: hidden;
|
113 |
+
transition: opacity 0.8s;
|
114 |
+
padding: 5px 15px 25px;
|
115 |
+
opacity: 0;
|
116 |
+
}
|
117 |
+
.gmedia_amron_BookmarkBox .gmedia_infoBox .gmedia_titleWrap
|
118 |
+
{
|
119 |
+
font-size: 20px;
|
120 |
+
height: 28px;
|
121 |
+
line-height: 28px;
|
122 |
+
display: inline-block;
|
123 |
+
text-align: center;
|
124 |
+
}
|
125 |
+
.gmedia_amron_BookmarkBox .gmedia_infoBox .gmedia_titleWrap .gmedia_title
|
126 |
+
{
|
127 |
+
display: inline-block;
|
128 |
+
float: left;
|
129 |
+
}
|
130 |
+
.gmedia_amron_BookmarkBox .gmedia_infoBox .gmedia_titleWrap .gmedia_title a
|
131 |
+
{
|
132 |
+
cursor: pointer;
|
133 |
+
}
|
134 |
+
.gmedia_amron_BookmarkBox .gmedia_infoBox .gmedia_description
|
135 |
+
{
|
136 |
+
font-size: 14px;
|
137 |
+
line-height: 1.5;
|
138 |
+
}
|
139 |
+
.gmedia_amron_SavedButton{
|
140 |
+
margin: 0 0 0 10px;
|
141 |
+
padding: 0 10px 0 0;
|
142 |
+
overflow: hidden;
|
143 |
+
height: 40px;
|
144 |
+
background-color: aliceblue;
|
145 |
+
}
|
146 |
+
.gmedia_amron_BookmarkBox .gmedia_infoBox .gmedia_titleWrap .gmedia_IconButton
|
147 |
+
{
|
148 |
+
height: 28px;
|
149 |
+
width: 28px;
|
150 |
+
padding: 3px;
|
151 |
+
display: inline-block;
|
152 |
+
margin: 0 5px;
|
153 |
+
cursor: pointer;
|
154 |
+
overflow: hidden;
|
155 |
+
transition: transform 0.3s;
|
156 |
+
}
|
157 |
+
.gmedia_amron_BookmarkBox .gmedia_infoBox .gmedia_titleWrap .gmedia_IconButton:hover{
|
158 |
+
transform: scale(1.1);
|
159 |
+
}
|
160 |
+
.gmedia_amron_BookmarkBox .gmedia_infoBox .gmedia_titleWrap .gmedia_IconButton svg
|
161 |
+
{
|
162 |
+
width: 100%;
|
163 |
+
height: 100%;
|
164 |
+
vertical-align: baseline !important;
|
165 |
+
}
|
166 |
+
/******************************** Search Form *****************************/
|
167 |
+
.gmedia_amron_Grid_SearchForm
|
168 |
+
{
|
169 |
+
position: relative;
|
170 |
+
display: flex;
|
171 |
+
flex-direction: row;
|
172 |
+
height: 40px;
|
173 |
+
margin-bottom: 10px;
|
174 |
+
}
|
175 |
+
.gmedia_amron_Grid_SearchForm .inputSearch
|
176 |
+
{
|
177 |
+
flex: 1 auto;
|
178 |
+
box-sizing: border-box;
|
179 |
+
height: 40px !important;
|
180 |
+
border-radius: 2px;
|
181 |
+
border: none !important;
|
182 |
+
font-size: 18px !important;
|
183 |
+
line-height: normal !important;
|
184 |
+
padding: 0 10px !important;
|
185 |
+
transition: background-color 0.3s;
|
186 |
+
}
|
187 |
+
.gmedia_amron_Grid_SearchForm .inputSearch:focus
|
188 |
+
{
|
189 |
+
outline: none !important;
|
190 |
+
}
|
191 |
+
.gmedia_amron_Grid_SearchForm .buttonSearch
|
192 |
+
{
|
193 |
+
display: flex;
|
194 |
+
padding: 8px !important;
|
195 |
+
height: 40px !important;
|
196 |
+
width: 60px !important;
|
197 |
+
border: none !important;
|
198 |
+
border-radius: 0 2px 2px 0 !important;
|
199 |
+
transition: background-color 0.3s;
|
200 |
+
cursor: pointer;
|
201 |
+
}
|
202 |
+
.gmedia_amron_Grid_SearchForm .buttonSearch svg
|
203 |
+
{
|
204 |
+
width: 100%;
|
205 |
+
height: 100%;
|
206 |
+
vertical-align: baseline !important;
|
207 |
+
}
|
208 |
+
/******************************** Masonry Collection *************************/
|
209 |
+
.gmedia_amron_MasonryCollection{
|
210 |
+
position: relative;
|
211 |
+
width: 100%;
|
212 |
+
overflow: hidden;
|
213 |
+
transition: transform 0.5s;
|
214 |
+
z-index: 2;
|
215 |
+
}
|
216 |
+
.gmedia_amron_MasonryCollection *{
|
217 |
+
box-sizing: border-box !important;
|
218 |
+
}
|
219 |
+
.gmedia_amron_MasonryCollection .gm_content .collectionColumn
|
220 |
+
{
|
221 |
+
position: relative;
|
222 |
+
float: left;
|
223 |
+
}
|
224 |
+
.gmedia_amron_MasonryCollection .gm_header, .gmedia_amron_MasonryCollection .gm_content, .gmedia_amron_MasonryCollection .gm_footer
|
225 |
+
{
|
226 |
+
position: relative;
|
227 |
+
width: 100%;
|
228 |
+
}
|
229 |
+
.gmedia_amron_MasonryCollection .gm_header .gm_navi
|
230 |
+
{
|
231 |
+
position: relative;
|
232 |
+
width: 100%;
|
233 |
+
overflow: hidden;
|
234 |
+
}
|
235 |
+
.gmedia_amron_MasonryCollection .gm_header .termTitle
|
236 |
+
{
|
237 |
+
position: relative;
|
238 |
+
display: inline-block;
|
239 |
+
font-size: 28px;
|
240 |
+
line-height: 34px;
|
241 |
+
}
|
242 |
+
.gmedia_amron_MasonryCollection .gm_header .backButton
|
243 |
+
{
|
244 |
+
position: relative;
|
245 |
+
float: left;
|
246 |
+
margin: 0 10px 0 0;
|
247 |
+
width: 54px;
|
248 |
+
height: 34px;
|
249 |
+
border-radius: 2px;
|
250 |
+
cursor: pointer;
|
251 |
+
}
|
252 |
+
.gmedia_amron_MasonryCollection .gm_header .backButton svg
|
253 |
+
{
|
254 |
+
width: 100%;
|
255 |
+
height: 100%;
|
256 |
+
vertical-align: baseline !important;
|
257 |
+
}
|
258 |
+
.gmedia_amron_MasonryCollection .gm_content{
|
259 |
+
min-height: 200px;
|
260 |
+
overflow: hidden;
|
261 |
+
}
|
262 |
+
/******************* Masonry Thumbnail PintStyle ***********************/
|
263 |
+
.gmedia_amron_MasonryThumbPint{
|
264 |
+
position: relative;
|
265 |
+
width: 100%;
|
266 |
+
opacity: 0;
|
267 |
+
transition: opacity 0.45s;
|
268 |
+
float: left;
|
269 |
+
box-sizing: border-box !important;
|
270 |
+
}
|
271 |
+
.gmedia_amron_MasonryThumbPint .gmedia_imageHolder
|
272 |
+
{
|
273 |
+
position: relative;
|
274 |
+
width: 100%;
|
275 |
+
overflow: hidden;
|
276 |
+
}
|
277 |
+
.gmedia_amron_MasonryThumbPint .gmedia_imageOver
|
278 |
+
{
|
279 |
+
position: absolute;
|
280 |
+
top:0;
|
281 |
+
width: 100%;
|
282 |
+
height: 100%;
|
283 |
+
transition: opacity 0.5s;
|
284 |
+
opacity: 0;
|
285 |
+
}
|
286 |
+
.gmedia_amron_MasonryThumbPint .gmedia_imageOver.hover
|
287 |
+
{
|
288 |
+
opacity: 1;
|
289 |
+
}
|
290 |
+
.gmedia_amron_MasonryThumbPint .gmedia_zoom
|
291 |
+
{
|
292 |
+
position: absolute;
|
293 |
+
width: 50px;
|
294 |
+
height: 50px;
|
295 |
+
padding: 15px !important;
|
296 |
+
right: 0;
|
297 |
+
bottom: 4px;
|
298 |
+
transform: translateX(100%);
|
299 |
+
margin: auto;
|
300 |
+
/*background-color: black;*/
|
301 |
+
cursor: pointer;
|
302 |
+
transition: transform 0.2s ;
|
303 |
+
}
|
304 |
+
.gmedia_amron_MasonryThumbPint .gmedia_zoom.media
|
305 |
+
{
|
306 |
+
width: 40px;
|
307 |
+
height: 40px;
|
308 |
+
background-color: rgba(255, 255, 255, 0.5);
|
309 |
+
border-radius: 50%;
|
310 |
+
padding: 5px !important;
|
311 |
+
transform: translateX(-10%);
|
312 |
+
}
|
313 |
+
.gmedia_amron_MasonryThumbPint .gmedia_zoom svg
|
314 |
+
{
|
315 |
+
width: 100%;
|
316 |
+
height: 100%;
|
317 |
+
stroke: white;
|
318 |
+
vertical-align: baseline !important;
|
319 |
+
}
|
320 |
+
.gmedia_amron_MasonryThumbPint .gmedia_zoom.media svg{
|
321 |
+
stroke: none;
|
322 |
+
}
|
323 |
+
.gmedia_amron_MasonryThumbPint .gmedia_hover .gmedia_zoom{
|
324 |
+
transform: translateX(-10%);
|
325 |
+
}
|
326 |
+
.gmedia_amron_MasonryThumbPint .gmedia_hover img{
|
327 |
+
transform: scale(1.1);
|
328 |
+
}
|
329 |
+
.gmedia_amron_MasonryThumbPint img
|
330 |
+
{
|
331 |
+
display: block;
|
332 |
+
border: 0 !important;
|
333 |
+
margin: 0 !important;
|
334 |
+
padding: 0 !important;
|
335 |
+
max-height: none !important;
|
336 |
+
max-width: none !important;
|
337 |
+
min-height: 0 !important;
|
338 |
+
min-width: 0 !important;
|
339 |
+
width: 100% !important;
|
340 |
+
height: auto !important;
|
341 |
+
-webkit-backface-visibility: hidden;
|
342 |
+
backface-visibility: hidden;
|
343 |
+
transition: 0.5s ease-out 0s;
|
344 |
+
opacity: 0;
|
345 |
+
}
|
346 |
+
.gmedia_amron_MasonryThumbPint .gmedia_itemContent
|
347 |
+
{
|
348 |
+
position: relative;
|
349 |
+
display: block;
|
350 |
+
padding: 7px 20px !important;
|
351 |
+
text-align: left;
|
352 |
+
background-color: white;
|
353 |
+
overflow: hidden;
|
354 |
+
width: 100%;
|
355 |
+
z-index: 1;
|
356 |
+
box-sizing: border-box;
|
357 |
+
}
|
358 |
+
.gmedia_amron_MasonryThumbPint .gmedia_itemTitle
|
359 |
+
{
|
360 |
+
position: relative;
|
361 |
+
margin: 10px 0 5px;
|
362 |
+
display: block;
|
363 |
+
font-size: 18px;
|
364 |
+
line-height: 1.1;
|
365 |
+
letter-spacing: 1px;
|
366 |
+
font-weight: 600;
|
367 |
+
}
|
368 |
+
.gmedia_amron_MasonryThumbPint .gmedia_itemDescription
|
369 |
+
{
|
370 |
+
position: relative;
|
371 |
+
display: block;
|
372 |
+
margin: 10px 0;
|
373 |
+
padding: 0;
|
374 |
+
font-size: 13px;
|
375 |
+
}
|
376 |
+
.gmedia_amron_MasonryThumbPint .gmedia_itemReadMore
|
377 |
+
{
|
378 |
+
text-decoration: none;
|
379 |
+
box-shadow: none;
|
380 |
+
position: relative;
|
381 |
+
cursor: pointer;
|
382 |
+
font-size: 10px;
|
383 |
+
border-radius: 2px;
|
384 |
+
text-transform: uppercase;
|
385 |
+
line-height: 38px;
|
386 |
+
padding: 0 15px;
|
387 |
+
font-weight: 700;
|
388 |
+
letter-spacing: 1px;
|
389 |
+
color: white;
|
390 |
+
display: inline-block;
|
391 |
+
background-color: rgba(0, 0, 0, 0.59);
|
392 |
+
transition: 0.5s;
|
393 |
+
}
|
394 |
+
.gmedia_amron_MasonryThumbPint a:hover, .gmedia_amron_MasonryThumbPint a:visited,
|
395 |
+
.gmedia_amron_MasonryThumbPint a:link, .gmedia_amron_MasonryThumbPint a:active
|
396 |
+
{
|
397 |
+
text-decoration: none;
|
398 |
+
box-shadow: none;
|
399 |
+
}
|
400 |
+
/*.gmedia_amron_MasonryThumbPint .itemReadMore:hover, .gmedia_amron_MasonryThumbPint .itemReadMore:visited,
|
401 |
+
.gmedia_amron_MasonryThumbPint .itemReadMore:link, .gmedia_amron_MasonryThumbPint .itemReadMore:active
|
402 |
+
{
|
403 |
+
text-decoration: none;
|
404 |
+
}*/
|
405 |
+
.gmedia_amron_MasonryThumbPint .tagsWrap, .gmedia_amron_MasonryThumbPint .catWrap
|
406 |
+
{
|
407 |
+
position: relative;
|
408 |
+
display: block;
|
409 |
+
margin: 5px 0;
|
410 |
+
overflow: hidden;
|
411 |
+
}
|
412 |
+
.gmedia_amron_MasonryThumbPint .tagsWrap .thumbTag, .gmedia_amron_MasonryThumbPint .catWrap .thumbCat
|
413 |
+
{
|
414 |
+
text-decoration: none;
|
415 |
+
box-shadow: none;
|
416 |
+
position: relative;
|
417 |
+
display: inline-block;
|
418 |
+
float: left;
|
419 |
+
font-size: 13px;
|
420 |
+
font-weight: 400;
|
421 |
+
line-height: 1.2;
|
422 |
+
cursor: pointer;
|
423 |
+
margin: 0 5px 0 0 !important;
|
424 |
+
}
|
425 |
+
/*.gmedia_amron_MasonryThumbPint .tagsWrap .thumbTag:hover, .gmedia_amron_MasonryThumbPint .tagsWrap .thumbTag:visited,
|
426 |
+
.gmedia_amron_MasonryThumbPint .tagsWrap .thumbTag:link, .gmedia_amron_MasonryThumbPint .tagsWrap .thumbTag:active
|
427 |
+
{
|
428 |
+
text-decoration: none;
|
429 |
+
box-shadow: none;
|
430 |
+
}
|
431 |
+
.gmedia_amron_MasonryThumbPint .catWrap .thumbCat:hover, .gmedia_amron_MasonryThumbPint .catWrap .thumbCat:visited,
|
432 |
+
.gmedia_amron_MasonryThumbPint .catWrap .thumbCat:link, .gmedia_amron_MasonryThumbPint .catWrap .thumbCat:active
|
433 |
+
{
|
434 |
+
text-decoration: none;
|
435 |
+
box-shadow: none;
|
436 |
+
}*/
|
437 |
+
.gmedia_amron_MasonryThumbPint .gmedia_itemMenuHolder{
|
438 |
+
position: relative;
|
439 |
+
display: block;
|
440 |
+
width: 100%;
|
441 |
+
margin: 15px 0;
|
442 |
+
overflow: hidden;
|
443 |
+
text-align: right;
|
444 |
+
}
|
445 |
+
.gmedia_amron_MasonryThumbPint .gmedia_itemMenuHolder .gmedia_itemsButtons
|
446 |
+
{
|
447 |
+
position: relative;
|
448 |
+
padding: 9px;
|
449 |
+
width: 36px;
|
450 |
+
height: 36px;
|
451 |
+
cursor: pointer;
|
452 |
+
float: right;
|
453 |
+
transition: .5s;
|
454 |
+
box-sizing: border-box;
|
455 |
+
margin: 0 1px;
|
456 |
+
border-radius: 2px;
|
457 |
+
}
|
458 |
+
.gmedia_amron_MasonryThumbPint .gmedia_itemMenuHolder .gmedia_itemsButtons svg
|
459 |
+
{
|
460 |
+
width: 100%;
|
461 |
+
height: 100%;
|
462 |
+
transition: fill .2s;
|
463 |
+
vertical-align: baseline !important;
|
464 |
+
}
|
465 |
+
/***************** Audio Content ******************/
|
466 |
+
@keyframes rotate {
|
467 |
+
from {
|
468 |
+
transform: rotate(0deg);
|
469 |
+
}
|
470 |
+
to {
|
471 |
+
transform: rotate(360deg);
|
472 |
+
}
|
473 |
+
}
|
474 |
+
|
475 |
+
.gmpAudioCoverContainerMultiGrid {
|
476 |
+
border-radius: 50%;
|
477 |
+
height: 300px;
|
478 |
+
width: 300px;
|
479 |
+
overflow: hidden;
|
480 |
+
}
|
481 |
+
|
482 |
+
.gmAlbusListRotate {
|
483 |
+
animation-name: rotate;
|
484 |
+
animation-duration: 2s;
|
485 |
+
animation-iteration-count: infinite;
|
486 |
+
animation-timing-function: linear;
|
487 |
+
}
|
488 |
+
.gmCircleAudioControllerMultiGridContainer {
|
489 |
+
position: absolute;
|
490 |
+
top: 50%;
|
491 |
+
left: 50%;
|
492 |
+
border-radius: 50%;
|
493 |
+
width: 109px;
|
494 |
+
height: 109px;
|
495 |
+
transform: translate3d(-50%, -50%, 0px);
|
496 |
+
overflow: hidden;
|
497 |
+
cursor: pointer;
|
498 |
+
}
|
499 |
+
.gmCirclebButtonAudioPlayerMultiGrid {
|
500 |
+
position: absolute;
|
501 |
+
display: block;
|
502 |
+
width: 106px;
|
503 |
+
height: 106px;
|
504 |
+
padding: 12px;
|
505 |
+
transition: background 0.3s;
|
506 |
+
}
|
507 |
+
.gmCirclebButtonAudioPlayerMultiGrid svg {
|
508 |
+
width: 100%;
|
509 |
+
height: 100%;
|
510 |
+
pointer-events: none;
|
511 |
+
vertical-align: baseline !important;
|
512 |
+
}
|
module/amron/index.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$module_info = array(
|
3 |
+
'base' => 'amron',
|
4 |
+
'name' => 'amron',
|
5 |
+
'title' => 'Amron',
|
6 |
+
'version' => '2.1',
|
7 |
+
'author' => 'GalleryCreator',
|
8 |
+
'description' => 'Responsive AJAX Gallery with Masonry layout. The gallery is completely customisable, resizable and is compatible with all browsers and devices (iPhone, iPad and Android smartphones). Required Gmedia Gallery plugin v1.14+',
|
9 |
+
'type' => 'gallery',
|
10 |
+
'widget' => true,
|
11 |
+
'branch' => '1',
|
12 |
+
'status' => 'free',
|
13 |
+
'price' => '',
|
14 |
+
'demo' => 'https://codeasily.com/portfolio/gmedia-gallery-modules/amron/',
|
15 |
+
'download' => '',
|
16 |
+
'dependencies' => ''
|
17 |
+
);
|
18 |
+
if (preg_match('#' . basename(dirname(__FILE__)) . '/' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) {
|
19 |
+
if (isset($_GET['info'])) {
|
20 |
+
echo '<pre>' . print_r($module_info, true) . '</pre>';
|
21 |
+
} else {
|
22 |
+
header("Location: {$module_info['demo']}");
|
23 |
+
die();
|
24 |
+
}
|
25 |
+
}
|
module/amron/init.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
global $wp;
|
3 |
+
|
4 |
+
$allsettings = array_merge($module['options'], $settings);
|
5 |
+
$allsettings['module_url'] = $module['url'];
|
6 |
+
$allsettings['license'] = strtolower($gmGallery->options['license_key']);
|
7 |
+
$allsettings['post_url'] = remove_query_arg('gm' . $id, add_query_arg($_SERVER['QUERY_STRING'], '', home_url($wp->request)));
|
8 |
+
$slug = 'amron';
|
9 |
+
|
10 |
+
if(isset($_GET['gm' . $id])){
|
11 |
+
$app_info = false;
|
12 |
+
} else{
|
13 |
+
$app_info = array(
|
14 |
+
'name' => $term->name,
|
15 |
+
'description' => $term->description
|
16 |
+
);
|
17 |
+
}
|
18 |
+
?>
|
19 |
+
<script type="text/javascript">
|
20 |
+
(function () {
|
21 |
+
this['<?php echo esc_attr( $sc_id ); ?>'] = {'settings':<?php echo json_encode($allsettings);?>, "appQuery":<?php echo json_encode($query);?>, "appApi":<?php echo json_encode(add_query_arg(array('gmedia-app' => 1, 'gmappversion' => 4, 'gmmodule' => 1), home_url('/'))); ?>, "appInfo":<?php echo json_encode($app_info); ?>};
|
22 |
+
})()
|
23 |
+
</script>
|
module/amron/js/components/gm_vit_itemMenu.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function codeasily_v2_itemMenu(m,n,p,q){function l(a,h,d){function g(a){"like"==a.getAttribute("type")&&a.getAttribute("like")||("bookmark"==a.getAttribute("type")&&a.getAttribute("bookmark")?a.style.backgroundColor=c.backgroundColor:(a.style.backgroundColor=c.backgroundColor,a.childNodes[0].style.fill=c.iconColor))}function b(a){if("click"==a.type){if(a=c.item){switch(this.getAttribute("type")){case "info":e(c.appName).appEventManager.dispatchGMEvent(f.GMEvent(k.NEED_MODAL,c,{type:"info",item:a}));
|
2 |
+
break;case "link":a.link&&window.open(a.link,e(c.appName).linkTargetWindow);break;case "like":g(this);c.delegate.likeItem=c.item;this.setAttribute("like",c.item.ID);this.style.cursor="default";this.style.pointerEvents="none";this.getElementsByTagName("svg")[0].style.fill="red";break;case "bookmark":g(this);c.delegate.bookmarkItem=c.item;c.updateForItem(c.item);break;case "share":e(c.appName).appEventManager.dispatchGMEvent(f.GMEvent(k.NEED_MODAL,c,{type:"share",item:a}));break;case "download":a=a.url;
|
3 |
+
var b=document.createElement("A");b.href=a;b.download=a.substr(a.lastIndexOf("/")+1);document.body.appendChild(b);b.click();document.body.removeChild(b);break;case "coments":a=a.sharelink+"/#comments";window.open(a,"_self");break;case "fullscreen":e(c.appName).appEventManager.dispatchGMEvent(f.GMEvent(k.FULLSCREEN_SWITCH,c,null)),g(this)}f.Device.desktop||g(this)}}else"mouseenter"==a.type?"bookmark"==this.getAttribute("type")&&this.getAttribute("bookmark")?this.style.backgroundColor=c.backgroundColorOver:
|
4 |
+
(this.style.backgroundColor=c.backgroundColorOver,this.childNodes[0].style.fill=c.iconColorOver):"mouseleave"==a.type&&g(this)}var c=this;this.delegate=a;this.appName=a.appName;this.item=void 0;this.view=document.createElement("div");this.view.className="gmedia_v2_CollectionItemInfoMenu";this.backgroundColor=h.backgroundColor;this.backgroundColorOver=h.backgroundColorOver;this.iconColor=h.iconColor;this.iconColorOver=h.iconColorOver;a=void 0;a=document.createElement("div");a.className="itemsButtons";
|
5 |
+
d&&a.classList.add("lightbox");a.setAttribute("type","link");a.innerHTML='<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"/></svg>';
|
6 |
+
a.style.backgroundColor=this.backgroundColor;a.childNodes[0].style.fill=this.iconColor;this.linkButton=a;a.addEventListener("click",b,!1);a.addEventListener("mouseenter",b,!1);a.addEventListener("mouseleave",b,!1);this.view.appendChild(a);if(!d&&e(this.appName).collectionInfoEnable||d&&e(this.appName).sliderInfoEnable)a=document.createElement("div"),a.className="itemsButtons",d&&a.classList.add("lightbox"),a.setAttribute("type","info"),a.innerHTML='<svg height="100px" id="Capa_1" style="enable-background:new 0 0 46 100;" version="1.1" viewBox="0 0 46 100" width="46px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M35.162,0c6.696,0,10.043,4.567,10.043,9.789c0,6.522-5.814,12.555-13.391,12.555c-6.344,0-10.045-3.752-9.869-9.947 C21.945,7.176,26.35,0,35.162,0z M14.543,100c-5.287,0-9.164-3.262-5.463-17.615l6.07-25.457c1.057-4.077,1.23-5.707,0-5.707 c-1.588,0-8.451,2.816-12.51,5.59L0,52.406C12.863,41.48,27.662,35.072,34.004,35.072c5.285,0,6.168,6.361,3.525,16.148 L30.58,77.98c-1.234,4.729-0.703,6.359,0.527,6.359c1.586,0,6.787-1.963,11.896-6.041L46,82.377C33.488,95.1,19.83,100,14.543,100z "/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',
|
7 |
+
a.style.backgroundColor=this.backgroundColor,a.childNodes[0].style.fill=this.iconColor,this.infoButton=a,a.addEventListener("click",b,!1),a.addEventListener("mouseenter",b,!1),a.addEventListener("mouseleave",b,!1),this.view.appendChild(a);if(!d&&e(this.appName).collectionItemDiscuss||d&&e(this.appName).sliderItemDiscuss)a=document.createElement("div"),a.className="itemsButtons",d&&a.classList.add("lightbox"),a.setAttribute("type","coments"),a.innerHTML='<svg style="enable-background:new 0 0 24 24;" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="info"/><g id="icons"><path d="M20,1H4C1.8,1,0,2.8,0,5v10c0,2.2,1.8,4,4,4v3c0,0.9,1.1,1.3,1.7,0.7L9.4,19H20c2.2,0,4-1.8,4-4V5 C24,2.8,22.2,1,20,1z M14,13H8c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1h6c0.6,0,1,0.4,1,1C15,12.6,14.6,13,14,13z M16,9H8 C7.4,9,7,8.6,7,8c0-0.6,0.4-1,1-1h8c0.6,0,1,0.4,1,1C17,8.6,16.6,9,16,9z" id="message"/></g></svg>',
|
8 |
+
a.style.backgroundColor=this.backgroundColor,a.childNodes[0].style.fill=this.iconColor,this.commentsButton=a,a.addEventListener("click",b,!1),a.addEventListener("mouseenter",b,!1),a.addEventListener("mouseleave",b,!1),this.view.appendChild(a);if(!d&&e(this.appName).collectionItemDownload||d&&e(this.appName).sliderItemDownload)a=document.createElement("div"),a.className="itemsButtons",d&&a.classList.add("lightbox"),a.setAttribute("type","download"),a.innerHTML='<svg version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="info"/><g id="icons"><g id="save"><path d="M11.2,16.6c0.4,0.5,1.2,0.5,1.6,0l6-6.3C19.3,9.8,18.8,9,18,9h-4c0,0,0.2-4.6,0-7c-0.1-1.1-0.9-2-2-2c-1.1,0-1.9,0.9-2,2 c-0.2,2.3,0,7,0,7H6c-0.8,0-1.3,0.8-0.8,1.4L11.2,16.6z"/><path d="M19,19H5c-1.1,0-2,0.9-2,2v0c0,0.6,0.4,1,1,1h16c0.6,0,1-0.4,1-1v0C21,19.9,20.1,19,19,19z"/></g></g></svg>',
|
9 |
+
a.style.backgroundColor=this.backgroundColor,a.childNodes[0].style.fill=this.iconColor,this.downloadButton=a,a.addEventListener("click",b,!1),a.addEventListener("mouseenter",b,!1),a.addEventListener("mouseleave",b,!1),this.view.appendChild(a);if(!d&&e(this.appName).collectionSocialShareEnabled||d&&e(this.appName).sliderSocialShareEnabled)a=document.createElement("div"),a.className="itemsButtons",d&&a.classList.add("lightbox"),a.setAttribute("type","share"),a.innerHTML='<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1344 1024q133 0 226.5 93.5t93.5 226.5-93.5 226.5-226.5 93.5-226.5-93.5-93.5-226.5q0-12 2-34l-360-180q-92 86-218 86-133 0-226.5-93.5t-93.5-226.5 93.5-226.5 226.5-93.5q126 0 218 86l360-180q-2-22-2-34 0-133 93.5-226.5t226.5-93.5 226.5 93.5 93.5 226.5-93.5 226.5-226.5 93.5q-126 0-218-86l-360 180q2 22 2 34t-2 34l360 180q92-86 218-86z"/></svg>',
|
10 |
+
a.style.backgroundColor=this.backgroundColor,a.childNodes[0].style.fill=this.iconColor,this.shareButton=a,a.addEventListener("click",b,!1),a.addEventListener("mouseenter",b,!1),a.addEventListener("mouseleave",b,!1),this.view.appendChild(a);e(this.appName).bookmarkEnable&&(a=document.createElement("div"),a.className="itemsButtons",d&&a.classList.add("lightbox"),a.setAttribute("type","bookmark"),a.innerHTML='<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1420 128q23 0 44 9 33 13 52.5 41t19.5 62v1289q0 34-19.5 62t-52.5 41q-19 8-44 8-48 0-83-32l-441-424-441 424q-36 33-83 33-23 0-44-9-33-13-52.5-41t-19.5-62v-1289q0-34 19.5-62t52.5-41q21-9 44-9h1048z"/></svg>',
|
11 |
+
a.style.backgroundColor=this.backgroundColor,a.childNodes[0].style.fill=this.iconColor,this.bookMarkButton=a,a.addEventListener("click",b,!1),a.addEventListener("mouseenter",b,!1),a.addEventListener("mouseleave",b,!1),this.view.appendChild(a));if(!d&&e(this.appName).collectionLikesEnabled||d&&e(this.appName).sliderLikesEnabled)a=document.createElement("div"),a.className="itemsButtons",d&&a.classList.add("lightbox"),a.setAttribute("type","like"),a.innerHTML='<svg enable-background="new 0 0 51 46" height="46px" id="Layer_1" version="1.1" viewBox="0 0 51 46" width="51px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M46.188,4.101c-5.529-5.53-14.495-5.53-20.023,0L25.39,4.875l-0.996-0.774c-5.529-5.53-14.715-5.53-20.245,0 C-1.38,9.63-1.27,18.595,4.26,24.125l18.753,18.643c0.671,0.671,1.4,1.258,2.376,1.766c0.76-0.508,1.483-1.095,2.155-1.766 l18.643-18.643C51.717,18.595,51.717,9.63,46.188,4.101z""/></svg>',
|
12 |
+
a.style.backgroundColor=this.backgroundColor,a.childNodes[0].style.fill=this.iconColor,this.likeButton=a,a.addEventListener("click",b,!1),a.addEventListener("mouseenter",b,!1),a.addEventListener("mouseleave",b,!1),this.view.appendChild(a);d&&!f.Device.ios&&(a=document.createElement("div"),a.className="itemsButtons",d&&a.classList.add("lightbox"),a.setAttribute("type","fullscreen"),a.innerHTML='<svg height="14px" version="1.1" viewBox="0 0 14 14" width="14px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g transform="translate(-215.000000, -257.000000)"><g id="fullscreen" transform="translate(215.000000, 257.000000)"><path d="M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z" id="Shape"/></g></g></g></svg>',
|
13 |
+
a.style.backgroundColor=this.backgroundColor,a.childNodes[0].style.fill=this.iconColor,this.fullscreenButton=a,a.addEventListener("click",b,!1),a.addEventListener("mouseenter",b,!1),a.addEventListener("mouseleave",b,!1),this.view.appendChild(a))}var f=n,e=f.moduleSettings,k={NEED_MODAL:"NEED_MODAL",FULLSCREEN_SWITCH:"FULLSCREEN_SWITCH"};l.prototype={updateForItem:function(a){this.item=a;this.delegate.likesSet&&this.likeButton&&(this.delegate.likesSet[a.ID]?(this.likeButton.getElementsByTagName("svg")[0].style.fill=
|
14 |
+
"red",this.likeButton.style.cursor="default",this.likeButton.style.pointerEvents="none",this.likeButton.setAttribute("like",a.ID)):(this.likeButton.childNodes[0].style.fill=this.iconColor,this.likeButton.style.cursor="pointer",this.likeButton.style.pointerEvents="all",this.likeButton.removeAttribute("like")));this.bookMarkButton&&(this.delegate.is_containIdInBookmarkSet(this.item.ID)||0===this.delegate.is_containIdInBookmarkSet(this.item.ID)?(this.bookMarkButton.setAttribute("bookmark",a.ID),this.bookMarkButton.getElementsByTagName("svg")[0].style.fill=
|
15 |
+
"red"):(this.bookMarkButton.removeAttribute("bookmark"),this.bookMarkButton.getElementsByTagName("svg")[0].style.fill=this.iconColor));a.link?(this.linkButton.style.display="block",this.linkButton.style.opacity="1",this.linkButton.style.cursor="pointer",this.linkButton.style.pointerEvents="all"):(this.linkButton.style.opacity="0",this.linkButton.style.display="none",this.linkButton.style.cursor="default",this.linkButton.style.pointerEvents="none")},resizeHandler:function(){var a=document.webkitIsFullScreen||
|
16 |
+
document.mozFullScreen||!1;this.fullscreenButton&&(this.fullscreenButton.innerHTML=a?'<svg height="14px" version="1.1" viewBox="0 0 14 14" width="14px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd" stroke="none" stroke-width="1"><g id="Core" transform="translate(-257.000000, -257.000000)"><g id="fullscreen-exit" transform="translate(257.000000, 257.000000)"><path d="M0,11 L3,11 L3,14 L5,14 L5,9 L0,9 L0,11 L0,11 Z M3,3 L0,3 L0,5 L5,5 L5,0 L3,0 L3,3 L3,3 Z M9,14 L11,14 L11,11 L14,11 L14,9 L9,9 L9,14 L9,14 Z M11,3 L11,0 L9,0 L9,5 L14,5 L14,3 L11,3 L11,3 Z" id="Shape"/></g></g></g></svg>':
|
17 |
+
'<svg height="14px" version="1.1" viewBox="0 0 14 14" width="14px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g transform="translate(-215.000000, -257.000000)"><g id="fullscreen" transform="translate(215.000000, 257.000000)"><path d="M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z" id="Shape"/></g></g></g></svg>',
|
18 |
+
this.fullscreenButton.childNodes[0].style.fill=this.iconColor)}};return new l(m,p,q)};
|
module/amron/js/components/gm_vit_modalWin.js
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function codeasily_v2_modalWin(n,v){function r(a,c){this.appName=a;this.modal=c;a=document.createElement("div");a.className="gmedia_v2_ItemInfoBar";a.style.backgroundColor=e(this.appName).modalInfoBoxBgColor;if(!f.is_touch_device||f.is_touch_device&&f.mouseDetected){var m=document.createElement("div");m.className="gmInfoBarCloseButton";m.innerHTML='<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M437.5,386.6L306.9,256l130.6-130.6c14.1-14.1,14.1-36.8,0-50.9c-14.1-14.1-36.8-14.1-50.9,0L256,205.1L125.4,74.5 c-14.1-14.1-36.8-14.1-50.9,0c-14.1,14.1-14.1,36.8,0,50.9L205.1,256L74.5,386.6c-14.1,14.1-14.1,36.8,0,50.9 c14.1,14.1,36.8,14.1,50.9,0L256,306.9l130.6,130.6c14.1,14.1,36.8,14.1,50.9,0C451.5,423.4,451.5,400.6,437.5,386.6z"/></svg>';
|
2 |
+
m.childNodes[0].style.fill=f.hexToRgbaStrin(e(this.appName).modalInfoBoxTitleTextColor,1);m.addEventListener("click",function(){c.prepareToRemove()},!1);a.appendChild(m)}this.view=a}function t(a,c){this.appName=a;this.modal=c;a=document.createElement("div");a.className="gmedia_v2_ItemShare";a.style.backgroundColor=e(this.appName).modalInfoBoxBgColor;if(!f.is_touch_device||f.is_touch_device&&f.mouseDetected){var m=document.createElement("div");m.className="gmInfoBarCloseButton";m.innerHTML='<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M437.5,386.6L306.9,256l130.6-130.6c14.1-14.1,14.1-36.8,0-50.9c-14.1-14.1-36.8-14.1-50.9,0L256,205.1L125.4,74.5 c-14.1-14.1-36.8-14.1-50.9,0c-14.1,14.1-14.1,36.8,0,50.9L205.1,256L74.5,386.6c-14.1,14.1-14.1,36.8,0,50.9 c14.1,14.1,36.8,14.1,50.9,0L256,306.9l130.6,130.6c14.1,14.1,36.8,14.1,50.9,0C451.5,423.4,451.5,400.6,437.5,386.6z"/></svg>';
|
3 |
+
m.childNodes[0].style.fill=f.hexToRgbaStrin(e(this.appName).modalInfoBoxTitleTextColor,1);m.addEventListener("click",function(){c.prepareToRemove()},!1);a.appendChild(m)}this.view=a}function u(a){var c=this;this.type=void 0;this.delegate=a;this.appName=a.appName;this.view=document.createElement("div");this.view.className="gmedia_v2_Modal";this.closeButton=document.createElement("div");this.closeButton.style.position="absolute";this.closeButton.style.zIndex=-100;this.closeButton.className="gmModalCloseButton";
|
4 |
+
this.closeButton.style.width="100%";this.closeButton.style.height="100%";this.closeButton.style.backgroundColor=e(this.appName).modaBgColor;this.closeButton.style.willChange="opacity";this.closeButton.style.opacity=e(this.appName).modalBgAlpha;this.closeButton.addEventListener("click",function(a){c.prepareToRemove(a)},!1);this.view.appendChild(this.closeButton);a=document.createElement("div");a.className="gmflexe";this.view.appendChild(a);this.scrollView=void 0;this.dragging=!1;this._scrollViewTranslateY=
|
5 |
+
0;this.startDragHandler=void 0;this.viewCompleted=!1;this.addToStage()}var f=v,e=f.moduleSettings;r.prototype={set item(a){var c=0,m=this.view,k=this.modal,l=this;var b='<div class="gmItemTitle" style="color: '+e(this.appName).modalInfoBoxTitleTextColor+'">'+a.title+"<br>";b=a.description&&""!=a.description?b+('<div class="gmItemDescription" style="color: '+e(this.appName).modalInfoBoxTextColor+'">'+a.description+"</div></div>"):b+"</div>";if(""!=b){var d=document.createElement("div");d.className=
|
6 |
+
"gmDescriptionWrap";d.style.float="none";d.innerHTML=b;m.appendChild(d)}if(e(this.appName).infoBarTermsEnable){d=function(a){if(!k.dragging){a=this.getAttribute("termId");var b=this.getAttribute("taxonomy");e(l.appName).appEventManager.dispatchGMEvent(f.GMEvent("NEED_NEW_COLLECTION",l,{term_id:[a],taxonomy:b}))}};b=document.createElement("div");b.className="gmDescriptionWrap";b.style.float="none";b.style.minHeight="0";b.style.color=f.hexToRgbaStrin(e(this.appName).modalInfoBoxTextColor,1);b.style.fontSize=
|
7 |
+
"100%";m.appendChild(b);if(a.albums&&0<a.albums.length){var h=document.createElement("ul");c=document.createElement("li");c.className="termsTitle";c.innerHTML="Albums:";h.appendChild(c);h.className="gm_tags_ul";for(c=0;c<a.albums.length;c++){var g=document.createElement("li");g.className="gm_album";g.innerHTML=a.albums[c].name;g.style.color=e(this.appName).infoBarTermsTitleColor;g.style.backgroundColor=e(this.appName).infoBarTermsBackgroundColorAlbums;g.onmouseover=function(){this.style.color=e(l.appName).infoBarTermsBackgroundColorAlbums;
|
8 |
+
this.style.backgroundColor=e(l.appName).infoBarTermsTitleColor};g.onmouseout=function(){this.style.color=e(l.appName).infoBarTermsTitleColor;this.style.backgroundColor=e(l.appName).infoBarTermsBackgroundColorAlbums};g.setAttribute("termId",a.albums[c].term_id);g.setAttribute("taxonomy","album__in");g.addEventListener("mouseup",d,!1);f.is_touch_device&&g.addEventListener("touchend",d,!1);h.appendChild(g)}b.appendChild(h)}if(a.categories&&0<a.categories.length){h=document.createElement("ul");c=document.createElement("li");
|
9 |
+
c.className="termsTitle";c.innerHTML="Categories:";h.appendChild(c);h.className="gm_tags_ul";for(c=0;c<a.categories.length;c++)g=document.createElement("li"),g.className="gm_category",g.innerHTML=a.categories[c].title,g.style.color=e(this.appName).infoBarTermsTitleColor,g.style.backgroundColor=e(this.appName).infoBarTermsBackgroundColorCategories,g.onmouseover=function(){this.style.color=e(l.appName).infoBarTermsBackgroundColorCategories;this.style.backgroundColor=e(l.appName).infoBarTermsTitleColor},
|
10 |
+
g.onmouseout=function(){this.style.color=e(l.appName).infoBarTermsTitleColor;this.style.backgroundColor=e(l.appName).infoBarTermsBackgroundColorCategories},g.addEventListener("mouseup",d,!1),f.is_touch_device&&g.addEventListener("touchend",d,!1),g.setAttribute("termId",a.categories[c].term_id),g.setAttribute("taxonomy","category__in"),h.appendChild(g);b.appendChild(h)}if(a.tags&&0<a.tags.length){h=document.createElement("ul");c=document.createElement("li");c.className="termsTitle";c.innerHTML="Tags:";
|
11 |
+
h.appendChild(c);h.className="gm_tags_ul";for(c=0;c<a.tags.length;c++)g=document.createElement("li"),g.className="gm_tag",g.innerHTML=a.tags[c].name,g.style.color=e(this.appName).infoBarTermsTitleColor,g.style.backgroundColor=e(this.appName).infoBarTermsBackgroundColorTags,g.onmouseover=function(){this.style.color=e(l.appName).infoBarTermsBackgroundColorTags;this.style.backgroundColor=e(l.appName).infoBarTermsTitleColor},g.onmouseout=function(){this.style.color=e(l.appName).infoBarTermsTitleColor;
|
12 |
+
this.style.backgroundColor=e(l.appName).infoBarTermsBackgroundColorTags},g.addEventListener("mouseup",d,!1),f.is_touch_device&&g.addEventListener("touchend",d,!1),g.setAttribute("termId",a.tags[c].term_id),g.setAttribute("taxonomy","tag__in"),h.appendChild(g);b.appendChild(h)}}if(e(this.appName).infoBarExifEnable){b="";a.meta.data&&a.meta.data.model&&(b+="<div class=gmItemMetaExifValue>"+a.meta.data.model+"</div></br>");d=[];a.meta.data&&a.meta.data.focallength&&d.push("<div class=gmItemMetaExifValue>"+
|
13 |
+
a.meta.data.focallength+"</div>");a.meta.data&&a.meta.data.aperture&&d.push("<div class=gmItemMetaExifValue>"+a.meta.data.aperture+"</div>");a.meta.data&&a.meta.data.exposure&&d.push("<div class=gmItemMetaExifValue>"+a.meta.data.exposure+"</div>");a.meta.data&&a.meta.data.iso&&d.push("<div class=gmItemMetaExifValue>ISO "+a.meta.data.iso+"</div>");for(c=0;c<d.length;c++)b+=d[c],c<d.length-1&&(b+='<div class="gmItemMetaExifSeparator"> / </div>');""!=b&&(d=document.createElement("div"),d.className="gmDescriptionWrap",
|
14 |
+
d.style.color=f.hexToRgbaStrin(e(this.appName).modalInfoBoxTextColor,1),d.style.fontSize="100%",d.innerHTML=b,m.appendChild(d))}e(this.appName).infoBarCountersEnable&&(d=document.createElement("div"),d.className="gmDescriptionWrap",d.style.color=f.hexToRgbaStrin(e(this.appName).modalInfoBoxTextColor,1),d.style.fontSize="100%",b=document.createElement("div"),b.className="likesViewCom",b.innerHTML='<svg enable-background="new 0 0 167 93" height="93px" id="Layer_1" version="1.1" viewBox="0 0 167 93" width="167px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M83.25,29.25c-9.649,0-17.5,7.851-17.5,17.5s7.851,17.5,17.5,17.5s17.5-7.851,17.5-17.5 S92.899,29.25,83.25,29.25z"/><path d="M83.25,0.75c-45.84,0-83,46-83,46s37.16,46,83,46s83-46,83-46S129.09,0.75,83.25,0.75z M83.25,81.25 c-19.054,0-34.5-15.445-34.5-34.5c0-19.054,15.446-34.5,34.5-34.5s34.5,15.446,34.5,34.5C117.75,65.805,102.304,81.25,83.25,81.25z "/></g></svg><div class="counterTxt">'+
|
15 |
+
(a.meta.views?a.meta.views:0)+"</div>",b.getElementsByTagName("svg")[0].style.fill=f.hexToRgbaStrin(e(this.appName).modalInfoBoxTitleTextColor,1),d.appendChild(b),b=document.createElement("div"),b.className="likesViewCom",b.innerHTML='<svg enable-background="new 0 0 51 46" height="46px" id="Layer_1" version="1.1" viewBox="0 0 51 46" width="51px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M46.188,4.101c-5.529-5.53-14.495-5.53-20.023,0L25.39,4.875l-0.996-0.774c-5.529-5.53-14.715-5.53-20.245,0 C-1.38,9.63-1.27,18.595,4.26,24.125l18.753,18.643c0.671,0.671,1.4,1.258,2.376,1.766c0.76-0.508,1.483-1.095,2.155-1.766 l18.643-18.643C51.717,18.595,51.717,9.63,46.188,4.101z""/></svg><div class="counterTxt">'+
|
16 |
+
(a.meta.likes?a.meta.likes:0)+"</div>",b.getElementsByTagName("svg")[0].style.fill=f.hexToRgbaStrin(e(this.appName).modalInfoBoxTitleTextColor,1),d.appendChild(b),b=document.createElement("div"),b.className="likesViewCom",b.innerHTML='<svg style="enable-background:new 0 0 24 24;" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="info"/><g id="icons"><path d="M20,1H4C1.8,1,0,2.8,0,5v10c0,2.2,1.8,4,4,4v3c0,0.9,1.1,1.3,1.7,0.7L9.4,19H20c2.2,0,4-1.8,4-4V5 C24,2.8,22.2,1,20,1z M14,13H8c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1h6c0.6,0,1,0.4,1,1C15,12.6,14.6,13,14,13z M16,9H8 C7.4,9,7,8.6,7,8c0-0.6,0.4-1,1-1h8c0.6,0,1,0.4,1,1C17,8.6,16.6,9,16,9z" id="message"/></g></svg><div class="counterTxt">'+
|
17 |
+
(a.comment_count?a.comment_count:0)+"</div>",b.getElementsByTagName("svg")[0].style.fill=f.hexToRgbaStrin(e(this.appName).modalInfoBoxTitleTextColor,1),d.appendChild(b),m.appendChild(d));e(this.appName).infoBarDateInfoEnable&&(d=document.createElement("div"),d.className="gmDescriptionWrap",d.style.color=f.hexToRgbaStrin(e(this.appName).modalInfoBoxTextColor,1),d.style.fontSize="100%",b="",c='<div class="gmItemMetaKey">Upload: </div><div class="gmItemMetaValue">'+f.timeConverter(a.date)+"</div></br>",
|
18 |
+
b+=c,a.meta.data&&a.meta.data.created_timestamp&&(a='<div class="gmItemMetaKey">Taken: </div><div class="gmItemMetaValue">'+f.timeConverter(a.meta.data.created_timestamp)+"</div>",b+=a),d.innerHTML='<div class="gmItemsDate">'+b+"</div>",""!=b&&m.appendChild(d))}};t.prototype={set item(a){function c(a){if(!m.dragging){a=this.getAttribute("type");var b="menubar=no,toolbar=no,resizable=yes,scrollbars=yes, top=200, left="+(screen.width-600)/2+", height=450,width=600";switch(a){case "copy":d&&window.open(l,
|
19 |
+
"_blank");a=document.getElementById("gmSH_title_copy");b=this.getElementsByClassName("gmItemCopyLink")[0].getElementsByTagName("svg")[0];window.getSelection().selectAllChildren(a);try{document.execCommand("copy"),window.getSelection().removeAllRanges(),b.style.fill="green",a.style.color="green",d=!0}catch(w){window.open(l,"_blank")}break;case "facebook":window.open("https://www.facebook.com/share.php?u="+l,"",b);break;case "twitter":window.open("https://twitter.com/intent/tweet?text="+encodeURI(descriptionData.title)+
|
20 |
+
"&url="+l,"",b);break;case "pinterest":window.open("http://www.pinterest.com/pin/create/button/?url="+l+"&media="+descriptionData.url+"&description="+encodeURI(descriptionData.title),"",b)}}}var m=this.modal,k=this.view,l=a.sharelink;var b='<div class="gmItemTitle" style="color: '+e(this.appName).modalInfoBoxTitleTextColor+'">'+e(this.appName).shareTitlePlaceHolder+"<br>";b=a.title&&""!=a.title?b+('<div class="gmItemDescription" style="color: '+e(this.appName).modalInfoBoxTextColor+'">'+a.title+"</div></div>"):
|
21 |
+
b+"</div>";""!=b&&(a=document.createElement("div"),a.className="gmDescriptionWrap",a.style.float="none",a.innerHTML=b,k.appendChild(a));a=document.createElement("div");a.className="gmDescriptionWrap";a.style.float="none";a.style.padding="0px 20px";k.appendChild(a);var d=!1;b=document.createElement("div");b.setAttribute("type","facebook");b.className="gmItemShareButtonWrap";b.id="gmedia_share_fb";var h=document.createElement("div");h.className="gmItemShareButton";h.innerHTML='<svg version="1.1" viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M27.6 3h-23.2c-.8 0-1.4.6-1.4 1.4v23.1c0 .9.6 1.5 1.4 1.5h12.5v-10.1h-3.4v-3.9h3.4v-2.9c0-3.4 2.1-5.2 5-5.2 1.4 0 2.7.1 3 .2v3.5h-2.1c-1.6 0-1.9.8-1.9 1.9v2.5h3.9l-.5 3.9h-3.4v10.1h6.6c.8 0 1.4-.6 1.4-1.4v-23.2c.1-.8-.5-1.4-1.3-1.4z"></path></svg><div class="gmSH_title" style="color: #3b5998">Facebook</div>';
|
22 |
+
h.getElementsByTagName("svg")[0].style.fill="#3b5998";b.appendChild(h);b.addEventListener("mouseup",c,!1);f.is_touch_device&&b.addEventListener("touchend",c,!1);a.appendChild(b);b=document.createElement("div");b.setAttribute("type","twitter");b.className="gmItemShareButtonWrap";b.id="gmedia_share_tw";h=document.createElement("div");h.className="gmItemShareButton";h.innerHTML='<svg version="1.1" viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M30 7.3c-1 .5-2.1.8-3.3.9 1.2-.7 2.1-1.8 2.5-3.2-1.1.7-2.3 1.1-3.6 1.4-1-1.1-2.5-1.8-4.2-1.8-3.2 0-5.7 2.6-5.7 5.7 0 .5.1.9.1 1.3-4.8-.2-9-2.5-11.8-6-.5.9-.8 1.9-.8 3 0 2 1 3.8 2.6 4.8-.9 0-1.8-.3-2.6-.7v.1c0 2.8 2 5.1 4.6 5.6-.5.1-1 .2-1.5.2-.4 0-.7 0-1.1-.1.7 2.3 2.9 3.9 5.4 4-2 1.5-4.4 2.5-7.1 2.5-.5 0-.9 0-1.4-.1 2.5 1.6 5.6 2.6 8.8 2.6 10.6 0 16.3-8.8 16.3-16.3v-.7c1.1-1 2-2 2.8-3.2z"></path></svg><div class="gmSH_title" style="color: #00aced">Twitter</div>';
|
23 |
+
h.getElementsByTagName("svg")[0].style.fill="#00aced";b.appendChild(h);b.addEventListener("mouseup",c,!1);f.is_touch_device&&b.addEventListener("touchend",c,!1);a.appendChild(b);b=document.createElement("div");b.setAttribute("type","pinterest");b.className="gmItemShareButtonWrap";b.id="gmedia_share_pin";h=document.createElement("div");h.className="gmItemShareButton";h.innerHTML='<svg version="1.1" viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M16 3c-7.2 0-13 5.8-13 13 0 5.5 3.4 10.2 8.3 12.1-.1-1-.2-2.6 0-3.7.2-1 1.5-6.5 1.5-6.5s-.4-.8-.4-1.9c0-1.8 1-3.2 2.4-3.2 1.1 0 1.6.8 1.6 1.8 0 1.1-.7 2.8-1.1 4.3-.3 1.3.6 2.3 1.9 2.3 2.3 0 4.1-2.4 4.1-6 0-3.1-2.2-5.3-5.4-5.3-3.7 0-5.9 2.8-5.9 5.6 0 1.1.4 2.3 1 3 .1.1.1.2.1.4-.1.4-.3 1.3-.4 1.5-.1.2-.2.3-.4.2-1.6-.8-2.6-3.1-2.6-5 0-4.1 3-7.9 8.6-7.9 4.5 0 8 3.2 8 7.5 0 4.5-2.8 8.1-6.7 8.1-1.3 0-2.6-.7-3-1.5 0 0-.7 2.5-.8 3.1-.3 1.1-1.1 2.5-1.6 3.4 1.2.4 2.5.6 3.8.6 7.2 0 13-5.8 13-13 0-7.1-5.8-12.9-13-12.9z"></path></svg><div class="gmSH_title" style="color: #cc2127">Pinterest</div>';
|
24 |
+
h.getElementsByTagName("svg")[0].style.fill="#cc2127";b.appendChild(h);b.addEventListener("mouseup",c,!1);f.is_touch_device&&b.addEventListener("touchend",c,!1);a.appendChild(b);b=document.createElement("div");b.setAttribute("type","copy");b.className="gmItemShareButtonWrap";b.id="gmedia_share_link";h=document.createElement("div");h.className="gmItemCopyLink";h.innerHTML='<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"/></svg><div id="gmSH_title_copy" class="gmSH_title" style="color: #7d7d7d">'+
|
25 |
+
l+"</div>";h.getElementsByTagName("svg")[0].style.fill="#7d7d7d";b.appendChild(h);b.addEventListener("mouseup",c,!1);f.is_touch_device&&b.addEventListener("touchend",c,!1);a.appendChild(b);k.appendChild(a)}};u.prototype={get infoBar(){return new r(this.appName,this)},get shareBar(){return new t(this.appName,this)},addToStage:function(){var a=this,c=document.getElementsByTagName("body")[0];document.getElementsByTagName("html");this.view.style.zIndex=f.findHighestZIndex(c)+1;f.disableBodyScrollSlider();
|
26 |
+
n.slider?n.slider.view.appendChild(this.view):c.appendChild(this.view);setTimeout(function(){a.view.style.opacity="1"},30);document.addEventListener("keydown",a.keydownHandler(),!1)},prepareToRemove:function(a){var c=this;document.removeEventListener("keydown",this.handlerKB,!1);this.scrollView.removeEventListener("touchstart",this.startDragHandler,f.passiveListener);this.scrollView.removeEventListener("mousedown",this.startDragHandler,!1);c.view.style.opacity="0";this.delegate.slider||f.enableBodyScrollSlider();
|
27 |
+
setTimeout(function(){c.view&&c.view.parentNode&&c.view.parentNode.removeChild(c.view);delete c.view;c.delegate.deleteModal()},400)},keydownHandler:function(a){var c=this;c.handlerKB=function(a){switch(a.keyCode){case 27:c.prepareToRemove()}};return c.handlerKB},pushPage:function(a){this.viewCompleted=!1;this.scrollView&&this.scrollView.parentNode&&this.scrollView.parentNode.removeChild(this.scrollView);this.view.appendChild(a);this.scrollView=a;this.updateControlls()},updateControlls:function(){this.scrollView&&
|
28 |
+
!this.viewCompleted&&(this.startDragHandler=this.startDrag(),this.scrollView.addEventListener("touchstart",this.startDragHandler,f.passiveListener),this.scrollView.addEventListener("mousedown",this.startDragHandler,!1),this.viewCompleted=!0)},get bottom(){return this.view.clientHeight-this.scrollView.clientHeight-20},set scrollViewTranslateY(a){this._scrollViewTranslateY=a;this.scrollView.style.transform="translateY("+a+"px)";a=Math.max(e(this.appName).modalBgAlpha-Math.abs(a/200),0);this.closeButton.style.opacity=
|
29 |
+
a},get scrollViewTranslateY(){return this._scrollViewTranslateY},startDrag:function(){function a(){d=0<k.scrollViewTranslateY?.2*d+.1*(0-k.scrollViewTranslateY):k.scrollViewTranslateY<k.bottom?.2*d+.1*(k.bottom-k.scrollViewTranslateY):.95*d;k.scrollViewTranslateY+=d;.04>Math.abs(d)?(k.dragging=!1,q(p)):p=n(a)}function c(a){a.originalEvent&&(a=a.originalEvent);a.preventDefault();if(a=l-(a.touches&&a.touches[0]?a.touches[0].pageY:a.pageY))k.dragging=!0;k.scrollViewTranslateY=b-a;h=g;g=k.scrollViewTranslateY;
|
30 |
+
d=g-h}function e(b){b.preventDefault();k.scrollView.style.transition="none";f.is_touch_device&&(document.removeEventListener("touchmove",c,f.passiveListener),document.removeEventListener("touchend",e,f.passiveListener));document.removeEventListener("mousemove",c,!1);document.removeEventListener("mouseup",e,!1);document.removeEventListener("oncontextmenu",e,!1);if(0>=k.bottom){if(k.scrollViewTranslateY<k.bottom-50||50<k.scrollViewTranslateY){k.prepareToRemove();return}}else if(-50>k.scrollViewTranslateY||
|
31 |
+
50<k.scrollViewTranslateY){k.prepareToRemove();return}(0!=d||0<k.scrollViewTranslateY||k.scrollViewTranslateY<k.bottom)&&k.dragging&&(p=n(a))}var k=this,l=void 0,b=0,d=0,h=0,g=0,p=void 0,n=f.requestAnimationFrame,q=f.cancelAnimationFrame;return function(a){a?(f.is_touch_device||a.preventDefault(),a.originalEvent&&(a=a.originalEvent),a.button&&0!==a.button||(d=0,g=k.scrollViewTranslateY,l=a.touches&&a.touches[0]?a.touches[0].pageY:a.pageY,b=k.scrollViewTranslateY,q(p),f.is_touch_device&&(document.addEventListener("touchmove",
|
32 |
+
c,f.passiveListener),document.addEventListener("touchend",e,f.passiveListener)),document.addEventListener("mousemove",c,!1),document.addEventListener("mouseup",e,!1),document.addEventListener("oncontextmenu",e,!1))):(d=0,b=k.scrollViewTranslateY,q(p))}}};return new u(n)};
|
module/amron/js/components/gm_vit_slider.js
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(g,r,m){g!=Array.prototype&&g!=Object.prototype&&(g[r]=m.value)};$jscomp.getGlobal=function(g){return"undefined"!=typeof window&&window===g?g:"undefined"!=typeof global&&null!=global?global:g};$jscomp.global=$jscomp.getGlobal(this);
|
2 |
+
$jscomp.polyfill=function(g,r,m,p){if(r){m=$jscomp.global;g=g.split(".");for(p=0;p<g.length-1;p++){var n=g[p];n in m||(m[n]={});m=m[n]}g=g[g.length-1];p=m[g];r=r(p);r!=p&&null!=r&&$jscomp.defineProperty(m,g,{configurable:!0,writable:!0,value:r})}};
|
3 |
+
$jscomp.polyfill("Math.hypot",function(g){return g?g:function(g,m,p){g=Number(g);m=Number(m);var n,l=Math.max(Math.abs(g),Math.abs(m));for(n=2;n<arguments.length;n++)l=Math.max(l,Math.abs(arguments[n]));if(1E100<l||1E-100>l){if(!l)return l;g/=l;m/=l;var f=g*g+m*m;for(n=2;n<arguments.length;n++){var e=Number(arguments[n])/l;f+=e*e}return Math.sqrt(f)*l}f=g*g+m*m;for(n=2;n<arguments.length;n++)e=Number(arguments[n]),f+=e*e;return Math.sqrt(f)}},"es6","es3");
|
4 |
+
function codeasily_v2_slider(g,r){function m(a){function b(a){switch(a.type){case "mouseenter":d.selector.style.opacity="1";break;case "mouseleave":d._selected||(d.selector.style.opacity="0")}}var d=this;this.delegate=a;this.appName=a.appName;this.item=void 0;this.view=document.createElement("div");this.view.className="gmedia_v2_ScrollBarItem";f.miniScreen&&this.view.classList.add("miniScreen");this.bgImg=document.createElement("div");this.bgImg.className="gmedia_v2_ScrollBarItemBg";this.view.appendChild(this.bgImg);
|
5 |
+
this.imgSRC=void 0;this.selector=document.createElement("div");this.selector.className="gmedia_v2_ScrollBarItemHover";this.selector.style.borderColor=e(this.appName).sliderThumbBarHoverColor;this.view.appendChild(this.selector);this._selected=!1;this.view.addEventListener("mouseenter",b,!1);this.view.addEventListener("mouseleave",b,!1)}function p(a){this.delegate=a;this.appName=a.appName;this.itemsList=[];this.thumbSize=f.Size(100,80);this.view=document.createElement("div");this.view.className="gmedia_v2_TermScrollBarWrap";
|
6 |
+
f.miniScreen&&this.view.classList.add("miniScreen");this.scrollView=document.createElement("div");this.scrollView.className="gmedia_v2_ScrollView";this.scrollView.style.width="0px";this.view.appendChild(this.scrollView);this.thumbsList=[];this._scrollWidth=this.itemsInStageCount=0;this.dragging=this.viewCompleted=!1;this.scrollViewTranslateX=0;this.activAudioIndex=this.activIndex=this.startDragHandler=void 0}function n(a){this.delegate=a;this.id=this.item=void 0;this.appName=a.appName;this.itemIndex=
|
7 |
+
void 0;this.positionIndex=0;this.view=document.createElement("div");this.view.className="gmedia_v2_SliderPage";this.itemInner=document.createElement("div");this.itemInner.className="gmedia_sliderPage_inner";this.view.appendChild(this.itemInner);this.iconHolder=document.createElement("div");this.iconHolder.className="gmedia_iconHolder";this.preloader=f.createPreloaderView(f.hexToRgbaStrin(e(this.appName).sliderPreloaderColor,1));this.preloader.style.display="none";this.view.appendChild(this.preloader);
|
8 |
+
this.view.appendChild(this.iconHolder);e(this.appName).key||(a=e(this.appName).tv.cloneNode(!0),a.style.left="50%",a.style.top="50%",a.style.transform="translateX(-50%) translateY(-50%)",a.style.transform="translateX(-50%) translateY(-50%)",a.style.zIndex="999999",this.view.appendChild(a));this.size=f.Size(0,0);this.imgSize=f.Size(0,0);this._imageFrame=f.Rect(0,0,0,0);this.maxYoffset=this.maxXoffset=this.height=this.width=0;this.MaxScale=4;this.newScaleMW=this.newScale=this.scale=this.imgScale=1;
|
9 |
+
this._viewTranslate=f.Point(0,0);this.origin=f.Point(0,0);this.animaSliderRender=this.boundingBoxScale=this.boundingBox=void 0;this.newY=this.oldY=this.newX=this.oldX=this.speedY=this.speedX=0;this.isBlockDragingMem=this.isBlockDraging=this.draging=!1;this.startDistForZoom=this.startGlobalPoint=this.startScale=void 0}function l(a){this.delegate=a;this.appName=this.delegate.appName;this.id=this.appName+"sliderAView_";this.itemsList=void 0;this.visibleBounds=f.Rect(0,0,0,0);this.needHideControlls=this.isControllsShow=
|
10 |
+
!1;this.firsrTap=void 0;this.removing=!1;this.intitByTermDelay=this.createlayoutDelay=void 0;this.view=document.createElement("div");this.view.className="gmedia_v2_ColectionSlider";f.Device.desktop||(this.view.style.height="100%");this.view.id=this.id+"main";this.resizeDelay=void 0;this.size=f.Size(0,0);a=document.createElement("div");a.className="gmSliderBg";a.style.backgroundColor=e(this.appName).sliderBgColor;this.background=a;this.view.appendChild(a);this.sliderPages=[];this.zoomingDrag=this.dragging=
|
11 |
+
!1;this._scrollViewTranslateY=this._scrollViewTranslateX=this.speedY=this.speedX=0;this.currentItemIndex=this.startDragHandler=void 0;this.startItemIndex=0;this.items=[];this.itemsAmount=0;this.animaSliderRender=this.zoomingPage=this.pageInFocusPrev=this.pageInFocus=this._itemNum=void 0;this.slider=document.createElement("div");this.slider.className="gmedia_v2_SlidesWrap";this.view.appendChild(this.slider);this.footer=document.createElement("div");this.footer.className="gmedia_v2_SlidesFooter";this.footer.style.backgroundImage=
|
12 |
+
"linear-gradient(180deg,"+f.hexToRgbaStrin(e(this.appName).sliderHeaderFooterBgColor,0)+","+f.hexToRgbaStrin(e(this.appName).sliderHeaderFooterBgColor,1)+")";this.view.appendChild(this.footer);this.header=document.createElement("div");this.header.className="gmedia_v2_SlidesHeader";this.header.style.backgroundImage="linear-gradient(0deg,"+f.hexToRgbaStrin(e(this.appName).sliderHeaderFooterBgColor,0)+","+f.hexToRgbaStrin(e(this.appName).sliderHeaderFooterBgColor,1)+")";f.miniScreen&&this.header.classList.add("gmedia_v2_SlidesHeaderMiniScreen");
|
13 |
+
this.view.appendChild(this.header);this.copyR=this.copyRight();this.createControlls();this.addToStage()}var f=r,e=f.moduleSettings,A=f.trace,q=f.cancelAnimationFrame,t=f.requestAnimationFrame,v=f.passiveListener;m.prototype={initByItem:function(a){this.item=a;this.imgSRC=a.itemViewThumbSrc;this.bgImg.style.backgroundImage="url("+this.imgSRC+")";this.type=a.type;if("audio"==this.type||"video"==this.type){this.hover=document.createElement("div");this.hover.className="gmedia_v2_ScrollBarItemLink";this.hover.style.backgroundColor=
|
14 |
+
f.hexToRgbaStrin("#ffffff",.6);switch(this.type){case "audio":this.hover.innerHTML='<svg version="1.1" viewBox="0 0 58 94" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M37.992,0h-8.021v65.358c-4.435-1.706-10.174-1.73-15.835,0.328C3.994,69.377-2.049,78.355,0.638,85.736 c2.688,7.383,13.088,10.374,23.229,6.683c8.614-3.134,14.249-10.082,14.111-16.626l0.014-53.451 c13.986,2.204,14.943,19.884,13.268,24.842c-0.636,1.879,0.484,3.286,2.598,0C68.938,23.726,37.992,13.376,37.992,0z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>';
|
15 |
+
break;case "video":"vimeo"==this.item.mime_type.split("/")[1]?this.hover.innerHTML='<svg enable-background="new 0 0 56.693 56.693" height="56.693px" id="Layer_1" version="1.1" viewBox="-5 -5 66.693 66.693" width="56.693px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M3.602,22.974l2.01,2.636c0,0,4.146-3.267,5.528-1.634c1.382,1.634,6.656,21.357,8.417,24.997 c1.537,3.192,5.777,7.413,10.426,4.397c4.646-3.014,20.098-16.205,22.863-31.781c2.764-15.574-18.594-12.313-20.854,1.256 c5.652-3.395,8.671,1.38,5.778,6.784c-2.889,5.399-5.527,8.921-6.908,8.921c-1.379,0-2.441-3.612-4.021-9.928 c-1.635-6.53-1.624-18.291-8.416-16.958C12.019,12.921,3.602,22.974,3.602,22.974z"/></svg>':
|
16 |
+
this.hover.innerHTML='<svg data-name="Layer 21" height="24" id="Layer_21" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><title/><path d="M21.80731,7.805a2.79915,2.79915,0,0,0-2.54907-2.53906C17.69061,5.13586,15.36707,5,12.50012,5c-3.45251,0-6.05865.14105-7.74353.27332A2.79932,2.79932,0,0,0,2.1925,7.815C2.08936,8.90021,2,10.33344,2,12.0423c0,1.66632.08862,3.07422.19128,4.14594a2.79852,2.79852,0,0,0,2.56384,2.53833C6.43994,18.85883,9.04657,19,12.50012,19c2.86694,0,5.19049-.13586,6.75812-.266a2.799,2.799,0,0,0,2.54907-2.539C21.91052,15.11548,22,13.69189,22,12S21.91052,8.88452,21.80731,7.805ZM9.77594,14.93878V9.06122L15.574,12Z"/></svg>'}this.view.appendChild(this.hover)}},
|
17 |
+
set musicIdentifireStatus(a){},select:function(a){this.selector.style.opacity=a?"1":"0";this._selected=a}};p.prototype={initItemsList:function(a){this.itemsList=a;a=new m(this);this.scrollView.appendChild(a.view);this.thumbSize.width=a.view.clientWidth;this.thumbSize.height=a.view.clientHeight;this.scrollView.removeChild(a.view);this.prepare();this.view.style.height=this.scrollView.style.height=this.thumbSize.height+"px";this._scrollWidth=this.thumbSize.width*this.itemsList.length;this.scrollView.style.width=
|
18 |
+
this._scrollWidth+5+"px";this.scrollViewTranslateX=0;this.updateView()},addThumbByIndex:function(a){function b(a){"touchend"!=a.type&&"mouseup"!=a.type||d.dragging||(d.delegate.gotoPageByNum(parseInt(this.getAttribute("gmIndex"))),d.startDragHandler&&d.startDragHandler())}if(!this.thumbsList[a]){var d=this,c=new m(this);this.thumbsList[a]=c;this.itemsInStageCount+=1;f.is_touch_device&&c.view.addEventListener("touchend",b,!1);c.view.addEventListener("mouseup",b,!1);c.view.style.left=this.thumbSize.width*
|
19 |
+
a+"px";this.scrollView.appendChild(c.view);c.initByItem(this.itemsList[a]);c.view.setAttribute("gmIndex",a)}},changeAudioStatusForIndex:function(a,b){!this.activAudioIndex&&0!==this.activAudioIndex||a==this.activAudioIndex||(this.thumbsList[this.activAudioIndex].musicIdentifireStatus="ended");this.thumbsList[a].musicIdentifireStatus=b.type;this.activAudioIndex=a},prepare:function(){this._scrollWidth=0;this.scrollView.style.transform="translateX(0px)";this.scrollView.style.width="0px";this._scrollViewTranslateX=
|
20 |
+
0},resize:function(){this.updateView()},selectThumbByIndex:function(a){if(void 0!==a&&0!=this.itemsList.length){var b;(this.activIndex||0===this.activIndex)&&(b=this.thumbsList[this.activIndex])&&b.select(!1);this.thumbsList[a]||this.addThumbByIndex(a);if(b=this.thumbsList[a]){b.select(!0);b=this.thumbSize.width*a;var d=b+this.scrollViewTranslateX,c=d+this.thumbSize.width;this.scrollView.style.transition="none";if(0>d||0>c)this.scrollView.style.transition="transform .4s",this.scrollViewTranslateX=
|
21 |
+
-b;if(d>this.view.clientWidth||c>this.view.clientWidth)this.scrollView.style.transition="transform .4s",this.scrollViewTranslateX=this.view.clientWidth-this.thumbSize.width-b;this._scrollWidth>this.view.clientWidth&&(this.scrollViewTranslateX=Math.max(this.scrollViewTranslateX,-(this._scrollWidth-this.view.clientWidth)))}this.activIndex=a}},updateView:function(){this.selectThumbByIndex(this.activIndex);1>this.view.clientWidth/this._scrollWidth?(this.scrollViewTranslateX=this._scrollViewTranslateX,
|
22 |
+
this.viewCompleted||(this.scrollView.classList.add("gm_grabbable"),this.startDragHandler=this.startDrag(),f.is_touch_device&&this.scrollView.addEventListener("touchstart",this.startDragHandler,v),this.scrollView.addEventListener("mousedown",this.startDragHandler,!1),this.viewCompleted=!0)):(this.scrollView.classList.remove("gm_grabbable"),this.scrollViewTranslateX=(this.view.clientWidth-this._scrollWidth)/2,this.viewCompleted&&(f.is_touch_device&&this.scrollView.removeEventListener("touchstart",this.startDragHandler,
|
23 |
+
v),this.scrollView.removeEventListener("mousedown",this.startDragHandler,!1),this.viewCompleted=!1))},set scrollViewTranslateX(a){this._scrollViewTranslateX=a;this.scrollView.style.transform="translateX("+a+"px)";if(this.itemsList.length!=this.itemsInStageCount){var b=Math.max(Math.floor(-a/this.thumbSize.width),0);for(a=Math.min(b+Math.ceil(this.view.clientWidth/this.thumbSize.width),this.itemsList.length-1);b<=a;b++)this.addThumbByIndex(b)}},get scrollViewTranslateX(){return this._scrollViewTranslateX},
|
24 |
+
startDrag:function(a){function b(){return-(h._scrollWidth-h.view.clientWidth+h.view.getBoundingClientRect().left)}function d(){u=0<h.scrollViewTranslateX?.2*u+.1*(0-h.scrollViewTranslateX):h.scrollViewTranslateX<b()?.2*u+.1*(b()-h.scrollViewTranslateX):.95*u;h.scrollViewTranslateX+=u;.04>Math.abs(u)?q(l):l=t(d)}function c(a){a.preventDefault();if(a=e-(a.touches&&a.touches[0]?a.touches[0].pageX:a.pageX))h.dragging=!0;h.scrollViewTranslateX=g-a;m=n;n=h.scrollViewTranslateX;u=n-m}function k(a){a.preventDefault();
|
25 |
+
h.scrollView.style.transition=null;f.is_touch_device&&(document.removeEventListener("touchmove",c,v),document.removeEventListener("touchend",k,v),document.removeEventListener("touchcancel",k,!1));document.removeEventListener("mousemove",c,!1);document.removeEventListener("mouseup",k,!1);document.removeEventListener("oncontextmenu",k,!1);if(0!=u||0<h.scrollViewTranslateX||h.scrollViewTranslateX<b())l=t(d);h.dragging=!1}var h=this,e=void 0,g=void 0,u=0,m=0,n=0,l=void 0;return function(a){a?(f.is_touch_device||
|
26 |
+
a.preventDefault(),a.button&&0!==a.button||(u=0,n=h.scrollViewTranslateX,e=a.touches&&a.touches[0]?a.touches[0].pageX:a.pageX,g=h.scrollViewTranslateX,q(l),f.is_touch_device&&(document.addEventListener("touchmove",c,v),document.addEventListener("touchend",k,v),document.addEventListener("touchcancel",k,!1)),document.addEventListener("mousemove",c,!1),document.addEventListener("mouseup",k,!1),document.addEventListener("oncontextmenu",k,!1))):(u=0,g=h.scrollViewTranslateX,q(l))}}};n.prototype={initByItem:function(a){if(this.id!=
|
27 |
+
a.ID){var b=this;this.item=a;this.id=a.ID;1!=this.scale&&(this.scale=1,this.viewTranslate=f.Point(0,0));this.itemInner.firstChild&&this.itemInner.removeChild(this.itemInner.firstChild);this.itemInner.appendChild(a.webView);this.itemImg=a.webView;a.webView.complete?(this.imgSize.width=this.itemImg.naturalWidth,this.imgSize.height=this.itemImg.naturalHeight,this.isInScale&&this.normalize(),this.fit(!1)):(this.preloader.style.display="block",a.webView.addEventListener("load",function(){b.preloader.style.display=
|
28 |
+
"none";b.imgSize.width=this.naturalWidth;b.imgSize.height=this.naturalHeight;b.isInScale&&b.normalize();b.fit(!1)},!1));switch(a.type){case "audio":this.iconHolder.innerHTML='<svg version="1.1" viewBox="0 0 58 94" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M37.992,0h-8.021v65.358c-4.435-1.706-10.174-1.73-15.835,0.328C3.994,69.377-2.049,78.355,0.638,85.736 c2.688,7.383,13.088,10.374,23.229,6.683c8.614-3.134,14.249-10.082,14.111-16.626l0.014-53.451 c13.986,2.204,14.943,19.884,13.268,24.842c-0.636,1.879,0.484,3.286,2.598,0C68.938,23.726,37.992,13.376,37.992,0z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>';
|
29 |
+
this.view.classList.add("info_icon");break;case "video":this.view.classList.add("info_icon");this.iconHolder.innerHTML='<svg version="1.1" viewBox="0 0 50 60" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M48.479,27.435L5.672,0.915C2.553-1.132,0,0.374,0,4.261v51.48c0,3.885,2.553,5.391,5.672,3.346l42.807-26.52 c0,0,1.521-1.07,1.521-2.566S48.479,27.435,48.479,27.435z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>';
|
30 |
+
this.iconHolder.firstChild.style.marginLeft="7px";break;default:this.view.classList.remove("info_icon")}}},set posX(a){this.view.style.left=this.size.width*a+"px";this.positionIndex=a},resize:function(){this.size.width=this.view.clientWidth;this.size.height=this.view.clientHeight;this.posX=this.positionIndex;this.isInScale&&this.normalize();this.fit(!1)},fit:function(a){if(this.itemImg){a=0;e(this.appName).sliderThumbBarEnable&&700<this.size.height&&(a=100);!e(this.appName).sliderThumbBarEnable&&
|
31 |
+
700<this.size.height&&(a=48);"video"==this.item.type&&(a=40);var b=f.getFrameForBoxWithMode(this.imgSize,f.Size(this.size.width-4,this.size.height-2*a),!1,!1);b.x+=2;b.y+=a;this.imgScale=Math.min(this.imgSize.width/b.width,this.MaxScale);this.item.webImgFrame.x!=b.x||this.item.webImgFrame.y!=b.y||this.item.webImgFrame.width!=b.width||this.item.webImgFrame.height!=b.height?(this.imageFrame=b,this.item.webImgFrame=b):this._imageFrame=b;this.videoWrap&&(this.videoWrapFrame=b)}},set imageFrame(a){this.itemImg.style.left=
|
32 |
+
a.x+"px";this.itemImg.style.top=a.y+"px";this.itemImg.style.width=a.width+"px";this.itemImg.style.height=a.height+"px";this._imageFrame=a},get imageFrame(){return this._imageFrame},set videoWrapFrame(a){this.videoWrap.style.width=a.width+"px";this.videoWrap.style.height=a.height+"px";this.videoWrap.style.left=a.x+"px";this.videoWrap.style.top=a.y+"px"},checkOffset:function(a,b){if(b!==this.boundingBoxScale){var d=this.imageFrame.width*(b?b:1),c=this.imageFrame.height*(b?b:1),k=this.imageFrame.x*(b?
|
33 |
+
b:1),h=this.imageFrame.y*(b?b:1);this.boundingBox={left:d>this.size.width?-k:(this.size.width-this.size.width*b)/2,top:c>this.size.height?-h:(this.size.height-this.size.height*b)/2,right:d>this.size.width?this.size.width-(k+d):(this.size.width-this.size.width*b)/2,bottom:c>this.size.height?this.size.height-(h+c):(this.size.height-this.size.height*b)/2};this.boundingBoxScale=b}b=a.x>this.boundingBox.left?this.boundingBox.left:a.x;b=b<this.boundingBox.right?this.boundingBox.right:b;a=a.y>this.boundingBox.top?
|
34 |
+
this.boundingBox.top:a.y;a=a<this.boundingBox.bottom?this.boundingBox.bottom:a;return f.Point(b,a)},is_pointInItem:function(a){var b=this.viewTranslate.x+this.size.width/2*this.newScale-this.imageFrame.width/2*this.newScale,d=b+this.imageFrame.width*this.newScale,c=this.size.height/2*this.newScale+this.viewTranslate.y-this.imageFrame.height/2*this.newScale,f=c+this.imageFrame.height*this.scale;return a.x>b&&a.x<d&&a.y>c&&a.y<f?!0:!1},normalize:function(a){q(this.animaSliderRender);a?this.renderTransformTo(f.Point(0,
|
35 |
+
0),1):(this.scale=this.newScale=this.newScaleMW=1,this.viewTranslate=f.Point(0,0),this.origin=f.Point(0,0))},get isInScale(){return 1==this.newScale&&0==this.origin.x&&0==this.origin.y?!1:!0},zoomIn:function(a,b){"audio"!=this.item.type&&"video"!=this.item.type&&(q(this.animaSliderRender),b=f.Point(b.x-(b.x-this.viewTranslate.x)/this.scale*a,b.y-(b.y-this.viewTranslate.y)/this.scale*a),this.renderTransformTo(this.checkOffset(b,a),a))},zoomByScaleIter:function(a,b){"audio"!=this.item.type&&"video"!=
|
36 |
+
this.item.type&&(a=0>a?1.065:.935,q(this.animaSliderRender),this.newScale*a>this.MaxScale&&(a=this.MaxScale/this.newScale),1>this.newScale*a&&(a=1/this.newScale),this.newScale*=a,this.origin=f.Point(b.x-a*(b.x-this.origin.x),b.y-a*(b.y-this.origin.y)),this.renderTransformTo(this.checkOffset(this.origin,this.newScale),this.newScale))},zoomByScaleDeltaToPoint:function(a,b,d){if("audio"!=this.item.type&&"video"!=this.item.type){q(this.animaSliderRender);a=this.startDistForZoom/this.startScale*(a/this.startDistForZoom)/
|
37 |
+
(this.startDistForZoom/this.startScale)*this.startScale;d=0;a>this.MaxScale&&(d=.8*-(a-this.MaxScale));a+=d;d=this.startGlobalPoint.x-(this.startGlobalPoint.x-this.startTranslate.x)/this.newScale*a;var c=this.startGlobalPoint.y-(this.startGlobalPoint.y-this.startTranslate.y)/this.newScale*a;b=f.Point(d-b.x,c-b.y);this.scale=this.newScale=a;this.viewTranslate=b;this.startTranslate=f.Point(d,c)}},set viewTranslate(a){this._viewTranslate=a;this.itemInner.style.transform="matrix("+this.scale+", 0, 0, "+
|
38 |
+
this.scale+", "+a.x+", "+a.y+")"},get viewTranslate(){return this._viewTranslate},renderTransformTo:function(a,b){function d(){k=.05*k+.1*(a.x-c.viewTranslate.x);h=.05*h+.1*(a.y-c.viewTranslate.y);b&&(e=.05*e+.1*(b-c.scale));var g=c.viewTranslate.x;g+=k;var m=c.viewTranslate.y;m+=h;b&&(c.scale+=e);c.viewTranslate=f.Point(g,m);.02>Math.abs(k)&&.02>Math.abs(h)&&.02>Math.abs(e)?(q(c.animaSliderRender),b&&(c.scale=b),c.viewTranslate=f.Point(a.x,a.y)):c.animaSliderRender=t(d)}var c=this;q(c.animaSliderRender);
|
39 |
+
this.origin=a;this.newScale=b;var k=0,h=0,e=0;c.animaSliderRender=t(d)},renderGlidingTransform:function(){function a(){b.speedX*=d;b.speedY*=c;var k=b.viewTranslate.x;k+=b.speedX;var h=b.viewTranslate.y;h+=b.speedY;if(k>b.boundingBox.left||k<b.boundingBox.right)b.speedX*=-1,k=(k>b.boundingBox.left?b.boundingBox.left:k<b.boundingBox.right?b.boundingBox.right:k)+b.speedX,d=.75;if(h>b.boundingBox.top||h<b.boundingBox.bottom)b.speedY*=-1,h=(h>b.boundingBox.top?b.boundingBox.top:h<b.boundingBox.bottom?
|
40 |
+
b.boundingBox.bottom:h)+b.speedY,c=.75;b.origin=f.Point(k,h);b.viewTranslate=f.Point(k,h);.02>Math.abs(b.speedX)&&.02>Math.abs(b.speedY)?(q(b.animaSliderRender),b.speedX=0,b.speedY=0):b.animaSliderRender=t(a)}var b=this;q(b.animaSliderRender);var d=.95,c=.95;b.animaSliderRender=t(a)},renderStretchstretchTransform:function(){function a(){c=.2*c+.15*(d.x-b.viewTranslate.x);k=.2*k+.15*(d.y-b.viewTranslate.y);b.viewTranslate=f.Point(b.viewTranslate.x+c,b.viewTranslate.y+k);.02>Math.abs(c)&&.02>Math.abs(k)?
|
41 |
+
(q(b.animaSliderRender),b.viewTranslate=d):b.animaSliderRender=t(a)}var b=this;q(b.animaSliderRender);var d=this.checkOffset(f.Point(b.viewTranslate.x+b.speedX,b.viewTranslate.y+b.speedY),b.scale),c=0,k=0;b.animaSliderRender=t(a)},startDrag:function(a,b){q(this.animaSliderRender);"audio"!=this.item.type&&"video"!=this.item.type&&(this.startDistForZoom=b,this.startGlobalPoint=a,this.startTranslate=this.viewTranslate,this.speedY=this.speedX=0,this.newX=this.viewTranslate.x,this.newY=this.viewTranslate.y,
|
42 |
+
this.startScale=this.scale)},stopDrag:function(){if("audio"!=this.item.type&&"video"!=this.item.type){if(this.isInScale)if(1>this.scale)this.normalize(!0);else if(this.scale>this.MaxScale)this.zoomIn(this.MaxScale,this.startGlobalPoint);else{var a=this.checkOffset(this.origin,this.newScale);(this.isBlockDraging=a.x!=this.origin.x||a.y!=this.origin.y)&&this.renderStretchstretchTransform()}this.draging&&(this.isBlockDraging?this.renderStretchstretchTransform():this.renderGlidingTransform(),this.draging=
|
43 |
+
!1)}},dragin:function(a){if("audio"==this.item.type||"video"==this.item.type)return!1;var b=this.startTranslate.x-a.x;a=this.startTranslate.y-a.y;var d=this.checkOffset(f.Point(b,a),this.newScale);this.isBlockDraging=d.x!=b||d.y!=a;var c=a-d.y;b-=.7*(b-d.x);a-=.7*c;this.oldX=this.newX;this.newX=b;this.speedX=.7*(this.newX-this.oldX);this.oldY=this.newY;this.newY=a;this.speedY=.7*(this.newY-this.oldY);this.origin=f.Point(b,a);this.viewTranslate=f.Point(b,a);return this.draging=!0},get isSubContentActiv(){return this.videoWrap?
|
44 |
+
!0:!1},action:function(a){if(this.item)switch(a){case "click":if("video"==this.item.type){if(this.videoWrap)return this.removeVideoContent(),"videoStop";this.view.classList.add("video_play");this.view.classList.remove("info_icon");this.addVideoContent();return"videoPlay"}if("audio"==this.item.type)return this.tryPlayOrPauseMp3(),"audioPlay";break;case "removeSubContent":if("video"==this.item.type)return this.removeVideoContent(),"videoStop";"audio"==this.item.type&&this.audioPlayer&&!this.audioPlayer.paused&&
|
45 |
+
(this.audioPlayer.pause(),this.iconHolder.firstChild.classList.remove("gmAlbusListRotate"))}},addVideoContent:function(){var a=this.item.mime_type.split("/")[1];if(a)switch(this.videoWrap||(this.videoWrap=document.createElement("div"),this.videoWrap.className="gmedia_video_wrap",this.videoWrapFrame=this.imageFrame,this.itemInner.appendChild(this.videoWrap),this.view.appendChild(this.delegate.closeButton)),a){case "youtube":this.videoWrap.innerHTML=f.youTubeCode.replace("%id%",this.item.videoId);break;
|
46 |
+
case "vimeo":this.videoWrap.innerHTML=f.vimeoCode.replace("%id%",this.item.videoId)}},removeVideoContent:function(){this.videoWrap&&(this.delegate.buttonsBox.appendChild(this.delegate.closeButton),this.view.classList.remove("video_play"),this.videoWrap.parentNode&&this.videoWrap.parentNode.removeChild(this.videoWrap),this.videoWrap=void 0,this.view.classList.remove("video_play"),"image"!=this.item.type&&this.view.classList.add("info_icon"))},tryPlayOrPauseMp3:function(){if("audio"==this.item.type){if(!this.audioPlayer){if(!document.getElementById("gmAudioPlayer"))return;
|
47 |
+
this.audioPlayer=document.getElementById("gmAudioPlayer")}this.audioPlayer.src==this.item.url?this.audioPlayer.paused?(this.audioPlayer.play(),this.iconHolder.firstChild.classList.add("gmAlbusListRotate")):(this.audioPlayer.pause(),this.iconHolder.firstChild.classList.remove("gmAlbusListRotate")):(this.audioPlayer.src=this.item.url,this.audioPlayer.play(),this.iconHolder.firstChild.classList.add("gmAlbusListRotate"))}}};l.prototype={get viewOfsetY(){return this.view.getBoundingClientRect().top-document.body.getBoundingClientRect().top},
|
48 |
+
get viewOfsetX(){return this.view.getBoundingClientRect().left-document.body.getBoundingClientRect().left},copyRight:function(a){var b=this,d=void 0;return function(a){if(!f.Device.ios||"mouseup"!=a.type){var c=void 0,h=void 0;a.changedTouches&&a.changedTouches[0]?(c=a.changedTouches[0].pageX,h=a.changedTouches[0].pageY):(c=a.pageX,h=a.pageY);c-=b.viewOfsetX;h-=b.viewOfsetY;var e=b.itemsList[b.itemIndex];if(e.webView&&e.webView==a.target){a.preventDefault();var g=document.getElementById("gm_copyr");
|
49 |
+
g&&(clearTimeout(d),g.parentNode.removeChild(g),g=null);g=document.createElement("div");g.id="gm_copyr";g.className="gmedia_v2_hints";g.innerHTML=e.user&&e.user.displayname?"Hey, this photo is © "+e.user.displayname:"This I can not give you.";g.style.top=h+"px";g.style.left=c+"px";b.view.appendChild(g);d=setTimeout(function(){g.parentNode.removeChild(g)},1E3)}}}},addToStage:function(){var a=this,b=document.getElementsByTagName("body")[0];document.getElementsByTagName("html");this.view.style.zIndex=
|
50 |
+
f.findHighestZIndex(b)+1;f.disableBodyScrollSlider();document.addEventListener("keydown",a.deHandler(),!0);document.addEventListener("contextmenu",a.copyR,!1);e(this.appName).appEventManager.addGMEventListener("FULLSCREEN_SWITCH",this,"fullscreenSwitch");b.appendChild(this.view);setTimeout(function(){a.view.classList.add("gmedia_v2_ColectionSliderActivate")},30)},intitByTerm:function(a,b){b&&(this.startItemId=b);this.term=a;var d=this;e(d.appName).appEventManager.addGMEventListener("COLLECTION_DATA_REDY",
|
51 |
+
d,"dataLoaded");this.intitByTermDelay=setTimeout(function(){d.showPreloader(!0);f.request(JSON.stringify({library:a.query}),d,"COLLECTION_DATA_REDY")},300)},dataLoaded:function(a){if(a=a.params.data){try{var b=JSON.parse(a);b.key&&""!=b.key?e(this.appName).key=b.key:(e(this.appName).tv=document.createElement("div"),e(this.appName).tv.style.position="absolute",e(this.appName).tv.style.height="24px",e(this.appName).tv.innerHTML='<a href="http://bit.ly/2snVAca" style="background-color: rgba(0, 0, 0, 0.8) !important;position: relative !important;left: auto!important;right: auto!important;top: auto!important;bottom: auto!important;width:auto!important;height:auto!important;text-indent:0!important;overflow:visible!important;display:block!important;padding: 4px 10px!important;margin:0 0 -3em 0!important;font-size:14px!important;line-height:120%!important;color:#FFFFFF!important;font-weight:bold!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;transform:none!important;">Trial version - Gmedia WP Plugin</a>');
|
52 |
+
b.data&&this.addItemsToCollection(b.data)}catch(d){A(d)}this.showPreloader(!1)}},addItemsToCollection:function(a){for(var b=[],d=0,c=0;c<a.length;c++){var k=f.Item(a[c],this.appName);this.startItemId&&k.ID==this.startItemId&&(d=c);b.push(k)}this.term.itemsList=b;this.initByList(this.term.itemsList,d)},initByList:function(a,b){if(a&&0<a.length){var d=this;this.currentItemIndex=b&&0!==b?0:void 0;this.startItemIndex=b?b:0;this.itemsList=a;this.createlayoutDelay=setTimeout(function(){d.createLayout()},
|
53 |
+
400)}},prepareToRemove:function(){if(!this.removing){clearTimeout(this.createlayoutDelay);clearTimeout(this.intitByTermDelay);var a=this.scrollViewTranslateY/(this.size.height/2);this.pageInFocus&&this.pageInFocus.isSubContentActiv&&.2>a?"videoStop"==this.pageInFocus.action("click")&&(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow):(this.removing=!0,f.cacherItemsList.init(),e(this.appName).appEventManager.removeGMEventListener("COLLECTION_DATA_REDY",this,"dataLoaded"),window.removeEventListener("wheel",
|
54 |
+
this.handlerMWheel,!1),document.removeEventListener("keydown",this.handlerKB,!0),document.removeEventListener("contextmenu",this.copyR,!1),e(this.appName).appEventManager.removeGMEventListener("FULLSCREEN_SWITCH",this,"fullscreenSwitch"),this.delegate.itemsCountersUpdate(),this.subMenu&&this.showSubmenu&&(this.subMenu.style.transition="0s",this.needShowSubmenu(!1)),f.enableBodyScrollSlider(),this.view.classList.remove("gmedia_v2_ColectionSliderActivate"),document.getElementById("gmAudioPlayer")&&
|
55 |
+
document.getElementById("gmAudioPlayer").pause(),e(this.appName).appEventManager.dispatchGMEvent(f.GMEvent("REMOVE_LIGHTBOX",this)))}},deHandler:function(a){var b=this;b.handlerKB=function(a){if(b.startDragHandler||27==a.keyCode)switch(a.keyCode){case 37:b.gotoPrev();break;case 39:b.gotoNext();break;case 27:if(b.delegate.modal){b.delegate.modal.prepareToRemove();break}b.prepareToRemove();break;case 32:if(b.delegate.modal)b.delegate.modal.prepareToRemove();else return b.switchShowControlls(),b.needHideControlls=
|
56 |
+
!b.isControllsShow,f.preventDefault(a),!1}};return b.handlerKB},showPreloader:function(a){var b=void 0;a?document.getElementById(this.appName+"slider_preloader")||(b=f.createPreloaderView(f.hexToRgbaStrin(e(this.appName).sliderPreloaderColor,.7)),b.id=this.appName+"slider_preloader",this.view.appendChild(b)):(b=document.getElementById(this.appName+"slider_preloader"))&&f.fadeOut(b,function(){b&&b.parentNode&&b.parentNode.removeChild(b)},500)},createLayout:function(){var a=this;this.itemsAmount=this.itemsList.length;
|
57 |
+
this.size=f.Size(a.view.clientWidth,a.view.clientHeight);f.miniScreen&&this.slider.classList.add("miniScreen");500>a.size.width&&(this.prevButton.classList.add("sliderNextPrevButtonsMiniScreen"),this.nextButton.classList.add("sliderNextPrevButtonsMiniScreen"));this.initSlider();this.thumbsBar&&(this.thumbsBar.initItemsList(this.itemsList),this.thumbsBar.selectThumbByIndex(this.itemIndex));700>a.size.height&&this.slider.classList.add("miniScreen");window.addEventListener("wheel",a.mouseWheelHandler(),
|
58 |
+
!1);setTimeout(function(){a.showControlls(!0)},500)},set itemIndex(a){this._itemNum=a;this.updateControlls()},get itemIndex(){return this._itemNum},initSlider:function(){var a;if(0==this.sliderPages.length)for(a=0;3>a;a++){var b=new n(this);this.slider.appendChild(b.view);this.sliderPages.push(b);b.resize()}var d=2<this.itemsAmount?-1:0;for(a=0;3>a;a++)b=this.sliderPages[a],b.posX=d,b.itemIndex=void 0,d+=1;this.startDragHandler?this.gotoPageByNum(0):(this.startDragHandler=this.startDrag(),this.slider.addEventListener("touchstart",
|
59 |
+
this.startDragHandler,v),this.slider.addEventListener("mousedown",this.startDragHandler,!1),this.gotoPageByNum(this.startItemIndex))},set scrollViewTranslateY(a){this._scrollViewTranslateY=a;this.slider.style.transform="translate3d("+this.scrollViewTranslateX+"px,"+a+"px, 0px";0!=a&&this.sliderVerticalRender()},get scrollViewTranslateY(){return this._scrollViewTranslateY},set scrollViewTranslateX(a){this._scrollViewTranslateX=a;this.slider.style.transform="translate3d("+a+"px,"+this.scrollViewTranslateY+
|
60 |
+
"px, 0px";this.pageRenderByIndex(-Math.round(a/this.size.width))},get scrollViewTranslateX(){return this._scrollViewTranslateX},sliderVerticalRender:function(){var a=1-Math.abs(this.scrollViewTranslateY)/(this.size.height/2);this.background.style.opacity=a;this.needHideControlls||(.8>a?this.showControlls(!1):this.showControlls(!0))},tryOpenItemID:function(a){for(var b=0;b<this.term.itemsList.length;b++)if(this.term.itemsList[b].ID==a)return this.gotoPageByNum(b),!0;return!1},gotoPageByNum:function(a){!this.itemIndex&&
|
61 |
+
0!==this.itemIndex||!this.currentItemIndex?this.gotoPageByIndex(a,!0):this.gotoPageByIndex(this.currentItemIndex-(this.itemIndex-a))},gotoNext:function(){this.gotoPageByIndex(this.currentItemIndex+1)},gotoPrev:function(){this.gotoPageByIndex(this.currentItemIndex-1)},renderTransformTo:function(a){function b(){c=.2*c+.15*(a.x-d.scrollViewTranslateX);f=.2*f+.15*(a.y-d.scrollViewTranslateY);d.scrollViewTranslateX+=c;d.scrollViewTranslateY+=f;1>Math.abs(c)&&1>Math.abs(f)&&(d.dragging=!1);.1>Math.abs(c)&&
|
62 |
+
.1>Math.abs(f)?(q(d.animaSliderRender),d.scrollViewTranslateX=a.x,d.scrollViewTranslateY=a.y,d.sliderTransitionComplete({target:d.slider})):d.animaSliderRender=t(b)}var d=this;q(d.animaSliderRender);var c=5*d.speedX,f=5*d.speedY;d.animaSliderRender=t(b)},gotoPageByIndex:function(a,b){3>this.itemsAmount&&(a=Math.max(0,a),a=Math.min(this.itemsAmount-1,a));2<Math.abs(this.currentItemIndex-a)&&(b=!0);a=-a*this.size.width;b?(this.scrollViewTranslateX=a,this.sliderTransitionComplete({target:this.slider})):
|
63 |
+
this.renderTransformTo(f.Point(a,this.scrollViewTranslateY))},pageRenderByIndex:function(a){if(this.currentItemIndex!==a){void 0!==this.pageInFocus&&(this.pageInFocusPrev=this.pageInFocus,this.pageInFocus.isInScale&&(this.zoomingPage=this.pageInFocus));var b;if(3>this.itemsAmount){for(b=0;b<this.itemsAmount;b++)this.sliderPages[b].initByItem(this.itemsList[b]);this.pageInFocus=this.sliderPages[a];this.itemIndex=this.currentItemIndex=a}else{var d=(a+1)%3;0>d&&(d+=3);var c=0<=d-1?d-1:2,f=3>d+1?d+1:
|
64 |
+
0,h=[c,d,f],e=[a-1,a,a+1];for(b=0;b<h.length;b++)this.sliderPages[h[b]].posX=e[b];this.currentItemIndex=a;this.pageInFocus=this.sliderPages[d];this.itemIndex=0>a?this.itemsAmount+(0==a%this.itemsAmount?-this.itemsAmount:a%this.itemsAmount):a%this.itemsAmount;this.sliderPages[d].initByItem(this.itemsList[this.itemIndex]);this.sliderPages[f].initByItem(this.itemIndex+1<this.itemsAmount?this.itemsList[this.itemIndex+1]:this.itemsList[0]);this.sliderPages[c].initByItem(0>this.itemIndex-1?this.itemsList[this.itemsAmount-
|
65 |
+
1]:this.itemsList[this.itemIndex-1])}}},sliderTransitionComplete:function(a){a.target==this.slider&&(a=f.cacherItemsList.status(),(a.list!==this.itemsList||a.list===this.itemsList&&this.itemIndex>=a.index)&&f.cacherItemsList.init(this.itemsList,this.itemIndex,5),void 0!==this.pageInFocusPrev&&this.pageInFocusPrev.action("removeSubContent"),void 0!==this.zoomingPage&&this.zoomingPage!==this.pageInFocus&&this.zoomingPage.normalize())},mouseWheelHandler:function(a){var b=this,d=0,c=0,k=void 0;b.handlerMWheel=
|
66 |
+
function(a){a.stopPropagation();var e=f.Point(0,0);if("deltaX"in a)1===a.deltaMode?(e.x=18*a.deltaX,e.y=18*a.deltaY):(e.x=a.deltaX,e.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(e.x=-.16*a.wheelDeltaX),e.y=a.wheelDeltaY?-.16*a.wheelDeltaY:-.16*a.wheelDelta;else if("detail"in a)e.y=a.detail;else return;var h=b.size.width/2,g=b.size.height/2;a.pageX&&(h=a.pageX,g=a.pageY);h-=b.viewOfsetX;g-=b.viewOfsetY;if(!b.dragging){k!==b.pageInFocus&&(k=void 0);b.zoomingPage&&b.zoomingPage!==b.pageInFocus&&
|
67 |
+
(b.zoomingPage.normalize(),b.zoomingPage=void 0);k||(b.needHideControlls=b.isControllsShow,k=b.zoomingPage=b.pageInFocus);if(h!=d||g!=c)k.startDrag(f.Point(h,g)),d=h,c=g;k.zoomByScaleIter(e.y,f.Point(h,g));k.isInScale?b.showControlls(!1):(b.showControlls(b.needHideControlls),k=void 0)}};return b.handlerMWheel},doubleClickController:function(a){if(!f.Device.ios||"mouseup"!=a.type){var b=void 0,d=void 0;a.changedTouches&&a.changedTouches[0]?(b=a.changedTouches[0].pageX,d=a.changedTouches[0].pageY):
|
68 |
+
(b=a.pageX,d=a.pageY);b-=this.viewOfsetX;d-=this.viewOfsetY;var c=this.pageInFocus.is_pointInItem(f.Point(b,d)),e=this;this.firsrTap?(clearTimeout(this.firsrTap),this.firsrTap=void 0,c&&(this.pageInFocus.isInScale?(e.showControlls(e.needHideControlls),this.pageInFocus.normalize(!0),this.zoomingPage=void 0):(this.zoomingPage&&this.zoomingPage.normalize(),this.zoomingPage=this.pageInFocus,this.zoomingPage.zoomIn(.3>Math.abs(this.zoomingPage.imgScale-1)?1.5:this.zoomingPage.imgScale,f.Point(b,d)),this.zoomingPage.isInScale&&
|
69 |
+
(e.needHideControlls=e.isControllsShow,e.showControlls(!1))))):this.firsrTap=setTimeout(function(){e.firsrTap=void 0;if(c||f.miniScreen)if(e.pageInFocus.isInScale)e.pageInFocus.normalize(!0),e.showControlls(e.needHideControlls),e.zoomingPage=void 0;else switch(e.pageInFocus.action("click")){case "videoPlay":e.showControlls(!1);e.needHideControlls=!e.isControllsShow;break;case "videoStop":e.switchShowControlls();e.needHideControlls=!e.isControllsShow;break;default:e.switchShowControlls(),e.needHideControlls=
|
70 |
+
!e.isControllsShow}else e.prepareToRemove()},300)}},startDrag:function(a){function b(a){a.originalEvent&&(a=a.originalEvent);a.preventDefault();if(a.touches)if(!c.dragging&&1<a.touches.length){p=!0;var b=a.touches[0].pageX;var d=a.touches[0].pageY;var e=a.touches[1].pageX;a=a.touches[1].pageY;var k=Math.hypot(b-e,d-a);b+=(e-b)/2;d+=(a-d)/2}else p=!1,b=a.touches[0].pageX,d=a.touches[0].pageY;else b=a.pageX,d=a.pageY;b-=z;d-=t;if(!(f.Device.ios&&20>=h))if(void 0===l&&(d===g?l=!1:(e=180*Math.atan2(Math.abs(d-
|
71 |
+
g),Math.abs(b-h))/Math.PI,l=45<e)),!c.dragging&&c.zoomingPage){e=4<Math.abs(h-b)?h-b:0;a=4<Math.abs(g-d)?g-d:0;if(e||a)c.zoomingDrag=!0;p?c.pageInFocus.zoomByScaleDeltaToPoint(k,f.Point(e,a),f.Point(b,d)):c.zoomingPage&&c.zoomingPage.dragin(f.Point(e,a))}else if(l){w=0;if(b=4<Math.abs(g-d)?g-d:0)c.dragging=!0;c.scrollViewTranslateY=n-b}else{c.transition=!0;if(b=4<Math.abs(h-b)?h-b:0)c.dragging=!0;c.scrollViewTranslateX=m-b;y=x;x=c.scrollViewTranslateX;w=x-y}}function d(a){a.preventDefault();l=void 0;
|
72 |
+
f.is_touch_device&&(document.removeEventListener("touchmove",b,v),document.removeEventListener("touchend",d,v));document.removeEventListener("mousemove",b,!1);document.removeEventListener("mouseup",d,!1);document.removeEventListener("oncontextmenu",d,!1);c.dragging||p||c.zoomingDrag?(c.zoomingPage?(c.zoomingPage.stopDrag(),p=!1):4>Math.abs(c.scrollViewTranslateY)?(a=c.currentItemIndex,Math.abs(w)>(f.is_touch_device?7:3)&&e==c.currentItemIndex&&(a=0<w?a-1:a+1),c.speedX=w,c.scrollViewTranslateY=0,c.gotoPageByIndex(a)):
|
73 |
+
.2<Math.abs(c.scrollViewTranslateY/(c.size.height/2))?c.prepareToRemove():c.renderTransformTo(f.Point(c.scrollViewTranslateX,0)),this.dragging=!1):c.doubleClickController(a);c.zoomingDrag=!1}var c=this,e=void 0,h=void 0,g=void 0,m=void 0,n=void 0,l=void 0,p=void 0,r=void 0,t=c.viewOfsetY,z=c.viewOfsetX,w=0,y=0,x=0;return function(a){c.zoomingPage=c.pageInFocus.isInScale?c.pageInFocus:void 0;q(c.animaSliderRender);e=c.currentItemIndex;a.preventDefault();a.originalEvent&&(a=a.originalEvent);if(!a.button||
|
74 |
+
0===a.button){if(a.touches)if(!c.dragging&&1<a.touches.length){p=!0;var k=a.touches[0].pageX;var l=a.touches[0].pageY;var u=a.touches[1].pageX;a=a.touches[1].pageY;r=Math.hypot(k-u,l-a);k+=(u-k)/2;l+=(a-l)/2;c.zoomingPage=c.pageInFocus;c.needHideControlls=c.isControllsShow;c.showControlls(!1)}else k=a.touches[0].pageX,l=a.touches[0].pageY;else k=a.pageX,l=a.pageY;k-=z;l-=t;y=w=c.speedX=c.speedY=0;x=c.scrollViewTranslateX;h=k;g=l;m=c.scrollViewTranslateX;n=c.scrollViewTranslateY;c.zoomingPage&&c.zoomingPage.startDrag(f.Point(h,
|
75 |
+
g),r);f.is_touch_device&&(document.addEventListener("touchmove",b,v),document.addEventListener("touchend",d,v));document.addEventListener("mousemove",b,!1);document.addEventListener("mouseup",d,!1);document.addEventListener("oncontextmenu",d,!1)}}},audioPlayerHandler:function(a){this.thumbsBar&&this.thumbsBar.changeAudioStatusForIndex(this.itemIndex,a)},createControlls:function(){function a(a){a.style.backgroundColor=e(d.appName).sliderNavigationIconColor;a.childNodes[0].style.stroke=e(d.appName).sliderNavigationColor}
|
76 |
+
function b(a){a.style.backgroundColor=e(d.appName).sliderNavigationColor;a.childNodes[0].style.stroke=e(d.appName).sliderNavigationIconColor}var d=this;this.prevButton=document.createElement("div");this.prevButton.className="sliderNextPrevButtons";this.prevButton.style.left="0px";this.prevButton.style.transform="translateX(-120%)";this.prevButton.style.backgroundColor=e(this.appName).sliderNavigationColor;this.prevButton.style.visibility="hidden";this.prevButton.innerHTML='<svg height="128px" id="Layer_1" style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" width="128px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><g><line style="stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="57.12" x2="17.787" y1="103.334" y2="64"/><line style="stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="17.787" x2="57.12" y1="64" y2="24.666"/></g><line style="stroke-width:12;stroke-miterlimit:10;" x1="17.787" x2="118.213" y1="64" y2="64"/></g></svg>';
|
77 |
+
this.prevButton.childNodes[0].style.stroke=e(this.appName).sliderNavigationIconColor;this.prevButton.onmouseover=function(){a(this)};this.prevButton.onmouseout=function(){b(this)};this.prevButton.onclick=function(){d.gotoPrev();f.Device.desktop||b(this)};this.view.appendChild(this.prevButton);this.nextButton=document.createElement("div");this.nextButton.className="sliderNextPrevButtons";this.nextButton.style.backgroundColor=e(this.appName).sliderNavigationColor;this.nextButton.style.right="0px";this.nextButton.style.transform=
|
78 |
+
"translateX(120%)";this.nextButton.style.visibility="hidden";this.nextButton.innerHTML='<svg height="128px" id="Layer_1" style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" width="128px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><g><line style="stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="70.88" x2="110.213" y1="24.666" y2="64"/><line style="stroke-width:12;stroke-linecap:square;stroke-miterlimit:10;" x1="110.213" x2="70.88" y1="64" y2="103.334"/></g><line style="stroke-width:12;stroke-miterlimit:10;" x1="110.213" x2="9.787" y1="64" y2="64"/></g></svg>';
|
79 |
+
this.nextButton.childNodes[0].style.stroke=e(this.appName).sliderNavigationIconColor;this.nextButton.onmouseover=function(){a(this)};this.nextButton.onmouseout=function(){b(this)};this.nextButton.onclick=function(){d.gotoNext();f.Device.desktop||b(this)};this.view.appendChild(this.nextButton);e(this.appName).sliderThumbBarEnable&&(this.thumbsBar=new p(this),this.footer.appendChild(this.thumbsBar.view));this.view.appendChild(this.footer);this.view.appendChild(this.header);this.infoBox1=document.createElement("div");
|
80 |
+
this.infoBox1.className="gmInfoBox1";this.header.appendChild(this.infoBox1);if(this.delegate.itemMenuConstructor){var c={};c.backgroundColor=e(this.appName).sliderThumbSubMenuBackgroundColor;c.backgroundColorOver=e(this.appName).sliderThumbSubMenuBackgroundColorOver;c.iconColor=e(this.appName).sliderThumbSubMenuIconColor;c.iconColorOver=e(this.appName).sliderThumbSubMenuIconHoverColor;this.itemMenu=this.delegate.itemMenuConstructor(this.delegate,f,c,!0)}this.buttonsBox=document.createElement("div");
|
81 |
+
this.buttonsBox.className="gmInfoBox1";this.buttonsBox.style.float="right";this.buttonsBox.appendChild(this.itemMenu.view);this.header.appendChild(this.buttonsBox);this.closeButton=document.createElement("div");this.closeButton.setAttribute("type","close");this.closeButton.className="sliderItemsButtons";this.closeButton.innerHTML='<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M437.5,386.6L306.9,256l130.6-130.6c14.1-14.1,14.1-36.8,0-50.9c-14.1-14.1-36.8-14.1-50.9,0L256,205.1L125.4,74.5 c-14.1-14.1-36.8-14.1-50.9,0c-14.1,14.1-14.1,36.8,0,50.9L205.1,256L74.5,386.6c-14.1,14.1-14.1,36.8,0,50.9 c14.1,14.1,36.8,14.1,50.9,0L256,306.9l130.6,130.6c14.1,14.1,36.8,14.1,50.9,0C451.5,423.4,451.5,400.6,437.5,386.6z"/></svg>';
|
82 |
+
this.closeButton.style.backgroundColor=e(this.appName).sliderNavigationColor;this.closeButton.childNodes[0].style.fill=e(this.appName).sliderNavigationIconColor;this.buttonsBox.appendChild(this.closeButton);this.closeButton.onmouseover=function(){this.style.backgroundColor=e(d.appName).sliderNavigationIconColor;this.childNodes[0].style.fill=e(d.appName).sliderNavigationColor};this.closeButton.onmouseout=function(){this.style.backgroundColor=e(d.appName).sliderNavigationColor;this.childNodes[0].style.fill=
|
83 |
+
e(d.appName).sliderNavigationIconColor};this.closeButton.addEventListener("click",function(){this.parentNode==d.buttonsBox&&d.prepareToRemove()},!1);f.miniScreen&&(this.infoBox2=document.createElement("div"),this.infoBox2.className="gmInfoBox1",this.infoBox2.style.width="100%",this.footer.appendChild(this.infoBox2),this.header.appendChild(this.buttonsBox),this.buttonsBox.style.float="none",this.infoBox1.style.float="none");this.titleItem=document.createElement("div");this.titleItem.className="gmedia_v2_ColectionSliderItemTitle";
|
84 |
+
this.titleItem.style.fontSize=e(this.appName).sliderItemTitleFontSize+"px";this.titleItem.style.color=e(this.appName).sliderItemTitleTextColor;f.miniScreen&&(this.titleItem.classList.add("gmedia_v2_ColectionSliderItemTitleMiniScreen"),this.titleItem.style.fontSize="20px",this.titleItem.style.borderBottom="solid 1px "+f.hexToRgbaStrin(e(this.appName).sliderNavigationIconColor,.3));this.infoBox1.appendChild(this.titleItem);this.titleTerm=document.createElement("div");this.titleTerm.className="gmedia_v2_ColectionSliderItemTitle";
|
85 |
+
this.titleTerm.style.fontSize=e(this.appName).sliderItemTitleFontSize/2+"px";this.titleTerm.style.color=f.hexToRgbaStrin(e(this.appName).sliderItemTitleTextColor,.7);this.titleTerm.classList.add("gmedia_v2_ColectionSliderTermTitle");f.miniScreen?(this.titleTerm.classList.add("gmedia_v2_ColectionSliderTermTitleMiniScreen"),this.titleTerm.style.fontSize="15px",this.infoBox2.appendChild(this.titleTerm)):(this.titleTerm.style.fontSize=e(this.appName).sliderItemTitleFontSize/2+"px",this.infoBox1.appendChild(this.titleTerm))},
|
86 |
+
fullscreenSwitch:function(a){f.toggleFullScreen(this.view)},switchShowControlls:function(){this.showControlls(!this.isControllsShow)},showControlls:function(a,b){this.isControllsShow!=a&&(b?(this.header.classList.add("gmNoneTransition"),this.footer.classList.add("gmNoneTransition"),this.prevButton.classList.add("gmNoneTransition"),this.nextButton.classList.add("gmNoneTransition")):(this.header.classList.remove("gmNoneTransition"),this.footer.classList.remove("gmNoneTransition"),this.prevButton.classList.remove("gmNoneTransition"),
|
87 |
+
this.nextButton.classList.remove("gmNoneTransition")),a?(this.header.classList.add("gmedia_v2_SlidesHeaderActivate"),this.footer.classList.add("gmedia_v2_SlidesFooterActivate"),this.prevButton.style.transform="translateX(0%)",this.nextButton.style.transform="translateX(0%)"):(this.header.classList.remove("gmedia_v2_SlidesHeaderActivate"),this.footer.classList.remove("gmedia_v2_SlidesFooterActivate"),this.prevButton.style.transform="translateX(-120%)",this.nextButton.style.transform="translateX(120%)"),
|
88 |
+
this.isControllsShow=a)},updateControlls:function(){3>this.itemsAmount?(this.prevButton.style.visibility=0==this.itemIndex?"hidden":"visible",this.nextButton.style.visibility=this.itemIndex==this.itemsAmount-1?"hidden":"visible",1==this.itemsAmount&&(this.prevButton.style.visibility="hidden",this.nextButton.style.visibility="hidden")):(this.prevButton.style.visibility="visible",this.nextButton.style.visibility="visible");var a=this.itemsList[this.itemIndex];a&&(this.titleItem.innerHTML=a.title?a.title:
|
89 |
+
"",this.titleTerm.textContent=this.itemIndex+1+" / "+this.itemsAmount,this.itemMenu&&this.itemMenu.updateForItem(a),this.thumbsBar&&this.thumbsBar.selectThumbByIndex(this.itemIndex),this.delegate.modal&&("info"==this.delegate.modal.type?e(this.appName).appEventManager.dispatchGMEvent(f.GMEvent("NEED_MODAL",this,{type:"info",item:a})):this.delegate.modal.prepareToRemove()),this.delegate.viewItem=a)},resizeHandler:function(){var a=this;this.resizeDelay&&clearTimeout(this.resizeDelay);this.resizeDelay=
|
90 |
+
setTimeout(function(){a.size=f.Size(a.view.clientWidth,a.view.clientHeight);410>a.size.height&&(a.showControlls(!1,!0),a.needHideControlls=!0);500>a.size.width?(a.prevButton.classList.add("sliderNextPrevButtonsMiniScreen"),a.nextButton.classList.add("sliderNextPrevButtonsMiniScreen")):(a.prevButton.classList.remove("sliderNextPrevButtonsMiniScreen"),a.nextButton.classList.remove("sliderNextPrevButtonsMiniScreen"));a.itemMenu&&a.itemMenu.resizeHandler();for(var b=0;b<a.sliderPages.length;b++)a.sliderPages[b].resize();
|
91 |
+
a.gotoPageByIndex(a.currentItemIndex,!0);a.thumbsBar&&a.thumbsBar.updateView()},200)}};return new l(g)};
|
module/amron/js/script.js
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function amron_module(){function r(){this._device=function(){var a=window,b=a.navigator.userAgent,d={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:a.cordova||a.phonegap,phonegap:a.cordova||a.phonegap},e=b.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),f=b.match(/(Android);?[\s\/]+([\d.]+)?/),m=b.match(/(iPad).*OS\s([\d_]+)/),g=b.match(/(iPod)(.*OS\s([\d_]+))?/),k=!m&&b.match(/(iPhone\sOS|iOS)\s([\d_]+)/);e&&(d.os="windows",d.osVersion=e[2],d.windows=!0);f&&
|
2 |
+
!e&&(d.os="android",d.osVersion=f[2],d.android=!0,d.androidChrome=0<=b.toLowerCase().indexOf("chrome"));if(m||k||g)d.os="ios",d.ios=!0;k&&!g&&(d.osVersion=k[2].replace(/_/g,"."),d.iphone=!0);m&&(d.osVersion=m[2].replace(/_/g,"."),d.ipad=!0);g&&(d.osVersion=g[3]?g[3].replace(/_/g,"."):null,d.iphone=!0);d.ios&&d.osVersion&&0<=b.indexOf("Version/")&&"10"===d.osVersion.split(".")[0]&&(d.osVersion=b.toLowerCase().split("version/")[1].split(" ")[0]);d.desktop=!(d.os||d.android||d.webView);d.webView=(k||
|
3 |
+
m||g)&&b.match(/.*AppleWebKit(?!.*Safari)/i);d.os&&"ios"===d.os&&(b=d.osVersion.split("."),e=document.querySelector('meta[name="viewport"]'),d.minimalUi=!d.webView&&(g||k)&&(7===1*b[0]?1<=1*b[1]:7<1*b[0])&&e&&0<=e.getAttribute("content").indexOf("minimal-ui"));d.pixelRatio=a.devicePixelRatio||1;return d}();this._mouseDetected=!1;var a=function(c){window.removeEventListener("mousedown",a,!1);window.removeEventListener("touchstart",a,!1);"touchstart"==c.type?(c.stopPropagation(),this._mouseDetected=
|
4 |
+
!1):this._mouseDetected=!0};window.addEventListener("mousedown",a,!1);window.addEventListener("touchstart",a,!1);this.cacherItemsList=this.CacheItemsList()}function t(a){this.delegate=a;this.appName=a.appName;this.id=this.appName+"_tag_";this.view=document.createElement("div");this.view.className="gmedia_amron_CollectionTagsCloud";this.list=document.createElement("ul");this.view.appendChild(this.list)}function u(a,c){this.delegate=a;this.appName=a.appName;this.index=c;this.view=document.createElement("div");
|
5 |
+
this.view.className="gmedia_amron_MasonryThumbPint";this.view.style.padding=e(this.appName).thumbSpacing/2+"px";this.imageHolder=document.createElement("div");this.imageHolder.className="gmedia_imageHolder";this.view.appendChild(this.imageHolder);this._size=k.Size(1,1);this.item=void 0;this.imageRetio=1;this.opacityDelay=void 0;this._display="none"}function q(a,c){this.delegate=a;this.appName=c;this.properties=void 0;this.itemsList=[];this.filteredList=[];this.presentedList=[];this.page_Amount=0;
|
6 |
+
this.scrollHandler=this.cureantPage=void 0;this.terms=[];this.term=void 0;this.tagsCloud=e(this.appName).tagsFilter?{0:e(this.appName).tagCloudAll}:void 0;this._filter=0;this.view=document.createElement("div");this.header=document.createElement("div");this.headerNavi=document.createElement("div");this.content=document.createElement("div");this.footer=document.createElement("div");this.tagsCloudView=void 0;this.header.className="gm_header";this.content.className="gm_content";this.footer.className=
|
7 |
+
"gm_footer";this.headerNavi.classList="gm_navi";this.header.appendChild(this.headerNavi);this.view.appendChild(this.header);this.view.appendChild(this.content);this.view.appendChild(this.footer);this.resizeTimeOut=void 0;this.viewWidth=0}function p(a,c){q.apply(this,arguments);this.view.className="gmedia_amron_MasonryCollection";this.header.style.padding="0 "+e(c).thumbSpacing/2+"px";this.content.style.paddingBottom=e(c).thumbSpacing+"px";this.columnsArr=[]}function v(a,c,b){k.copyProperties(a,this);
|
8 |
+
if(this.appApi){this.appName=c;this.appDiv=b;this.modal=void 0;this.collectionTranslateY=0;if(a=this.settings)e(this.appName).appApi=this.appApi,e(this.appName).post_url=a.post_url,e(this.appName).galleryID="gm"+b.getAttribute("data-gmid"),e(this.appName).appEventManager=k.GMEventsManager(),e(this.appName).key=!0,e(this.appName).lightBoxEnable="1"==a.lightBoxEnable?!0:!1,e(this.appName).thumbSpacing=parseInt(a.thumbSpacing),e(this.appName).collectionPreloaderColor="#"+a.collectionPreloaderColor,e(this.appName).linkTargetWindow=
|
9 |
+
a.linkTargetWindow,e(this.appName).infoBarTermsClickNewPageEnable="1"==a.infoBarTermsClickNewPageEnable?!0:!1,e(this.appName).tagsFilter="1"==a.tagsFilter?!0:!1,e(this.appName).tagCloudAll=a.tagCloudAll,e(this.appName).tagCloudTextColor="#"+a.tagCloudTextColor,e(this.appName).tagCloudBgColor="#"+a.tagCloudBgColor,e(this.appName).collectionThumbRecomendedWidth=parseInt(a.collectionThumbRecomendedWidth),e(this.appName).collectionThumbHoverColor=a.collectionThumbHoverColor,e(this.appName).collectionThumbContentBGColor=
|
10 |
+
"rgba(245,245,245,1)",e(this.appName).collectionThumbTitleShow="1"==a.collectionThumbTitleShow?!0:!1,e(this.appName).collectionThumbTitleColor=a.collectionThumbTitleColor,e(this.appName).collectionThumbFontSize=parseInt(a.collectionThumbFontSize),e(this.appName).collectionThumbDescriptionShow="1"==a.collectionThumbDescriptionShow?!0:!1,e(this.appName).collectionThumbDescriptionColor=a.collectionThumbDescriptionColor,e(this.appName).collectionThumbDescriptionFontSize=parseInt(a.collectionThumbDescriptionFontSize),
|
11 |
+
e(this.appName).collectionThumbSubMenuBackgroundColor=a.collectionThumbSubMenuBackgroundColor,e(this.appName).collectionThumbSubMenuBackgroundColorOver=a.collectionThumbSubMenuBackgroundColorOver,e(this.appName).collectionThumbSubMenuIconColor=a.collectionThumbSubMenuIconColor,e(this.appName).collectionThumbSubMenuIconHoverColor=a.collectionThumbSubMenuIconHoverColor,e(this.appName).collectionReadMoreButtonBGColor=a.collectionReadMoreButtonBGColor,e(this.appName).collectionReadMoreButtonLabelColor=
|
12 |
+
a.collectionReadMoreButtonLabelColor,e(this.appName).collectionReadMoreButtonBGColorHover=a.collectionReadMoreButtonBGColorHover,e(this.appName).collectionReadMoreButtonLabelColorHover=a.collectionReadMoreButtonLabelColorHover,e(this.appName).collectionReadMoreButtonLabel=a.collectionReadMoreButtonLabel,e(this.appName).modaBgColor=a.modaBgColor,e(this.appName).modalInfoBoxBgColor=a.modalInfoBoxBgColor,e(this.appName).modalInfoBoxTitleTextColor="#"+a.modalInfoBoxTitleTextColor,e(this.appName).modalInfoBoxTextColor=
|
13 |
+
"#"+a.modalInfoBoxTextColor,e(this.appName).infoBarCountersEnable="1"==a.infoBarCountersEnable?!0:!1,e(this.appName).infoBarDateInfoEnable="1"==a.infoBarDateInfoEnable?!0:!1,e(this.appName).shareTitlePlaceHolder=a.shareTitlePlaceHolder,e(this.appName).sliderThumbBarEnable="1"==a.sliderThumbBarEnable?!0:!1,e(this.appName).sliderThumbBarHoverColor=a.sliderThumbBarHoverColor,e(this.appName).sliderPreloaderColor="#"+a.sliderPreloaderColor,e(this.appName).sliderBgColor=a.sliderBgColor,e(this.appName).sliderHeaderFooterBgColor=
|
14 |
+
"#"+a.sliderHeaderFooterBgColor,e(this.appName).sliderNavigationColor=a.sliderNavigationColor,e(this.appName).sliderNavigationIconColor=a.sliderNavigationIconColor,e(this.appName).sliderItemTitleFontSize=parseInt(a.sliderItemTitleFontSize),e(this.appName).sliderItemTitleTextColor="#"+a.sliderItemTitleTextColor,e(this.appName).sliderThumbSubMenuBackgroundColor=a.sliderThumbSubMenuBackgroundColor,e(this.appName).sliderThumbSubMenuBackgroundColorOver=a.sliderThumbSubMenuBackgroundColorOver,e(this.appName).sliderThumbSubMenuIconColor=
|
15 |
+
a.sliderThumbSubMenuIconColor,e(this.appName).sliderThumbSubMenuIconHoverColor=a.sliderThumbSubMenuIconHoverColor,e(this.appName).sliderInfoEnable="1"==a.sliderInfoEnable?!0:!1,e(this.appName).sliderItemDownload="1"==a.sliderItemDownload?!0:!1,e(this.appName).sliderItemDiscuss="1"==a.sliderItemDiscuss?!0:!1,e(this.appName).sliderSocialShareEnabled="1"==a.sliderSocialShareEnabled?!0:!1,e(this.appName).sliderLikesEnabled="1"==a.sliderLikesEnabled?!0:!1;this.audioPlayer=void 0;this.bookmarkStatusShow=
|
16 |
+
e(this.appName).bookmarkShowState;if(e){this.currentLocation=void 0;this.collections=[];this.terms={};this.appDiv.style.position="relative";this.appDiv.style.height="auto";this.appDivWidth=this.appDiv.clientWidth;b=new p(this,this.appName);this.collections.push(b);this.appDiv.appendChild(b.view);b.init();e(this.appName).appEventManager.addGMEventListener(l.EXT_SCRIPTS_READY,this,"externalScriptsReady");b=e(this.appName).module_url+"/js/components/";a=x.slice(0);for(var d in a)a[d]=b+a[d];k.loadExtScripts(a,
|
17 |
+
this,l.EXT_SCRIPTS_READY)}}}r.prototype={moduleSettings:function(a){return window[a]&&window[a].settings?window[a].settings:null},get passiveListener(){return this.isPassiveListener()?{passive:!1,capture:!1}:!1},isPassiveListener:function(){var a=!1;try{var c=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("testPassiveListener",null,c)}catch(b){}return a},get requestAnimationFrame(){return window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
|
18 |
+
window.msRequestAnimationFrame},get cancelAnimationFrame(){return window.cancelAnimationFrame||window.mozCancelAnimationFrame},get whichTransitionEventEnd(){var a,c=document.createElement("fakeelement"),b={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in b)if(void 0!==c.style[a])return b[a]},get Device(){return this._device},get is_touch_device(){return navigator.maxTouchPoints||"ontouchstart"in window},get getScrollbarWidth(){var a=
|
19 |
+
document.createElement("div");a.style.visibility="hidden";a.style.width="100px";a.style.msOverflowStyle="scrollbar";document.body.appendChild(a);var c=a.offsetWidth;a.style.overflow="scroll";var b=document.createElement("div");b.style.width="100%";a.appendChild(b);b=b.offsetWidth;a.parentNode.removeChild(a);return c-b},get hasScrollbar(){if("number"===typeof window.innerWidth)return window.innerWidth>document.documentElement.clientWidth;var a=document.documentElement||document.body;if("undefined"!==
|
20 |
+
typeof a.currentStyle)var c=a.currentStyle.overflow;c=c||window.getComputedStyle(a,"").overflow;if("undefined"!==typeof a.currentStyle)var b=a.currentStyle.overflowY;b=b||window.getComputedStyle(a,"").overflowY;a=a.scrollHeight>a.clientHeight;var d=/^(visible|auto)$/.test(c)||/^(visible|auto)$/.test(b);return a&&d||"scroll"===c||"scroll"===b},get miniScreen(){return 500>window.screen.height||500>window.screen.width},get mouseDetected(){return this._mouseDetected},get youTubeCode(){return'<iframe src="https://www.youtube.com/embed/%id%?rel=0&showinfo=0&autoplay=1&wmode=transparent" frameborder="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'},
|
21 |
+
get vimeoCode(){return'<iframe src="https://player.vimeo.com/video/%id%?byline=0&portrait=0&autoplay=1" frameborder="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'},copyProperties:function(a,c){for(var b in a)c[b]=a[b]},Rect:function(a,c,b,d){return{x:a,y:c,width:b,height:d}},Size:function(a,c){return{width:a,height:c}},Point:function(a,c){return{x:a,y:c}},findHighestZIndex:function(a){for(var c=99999,b=0;b<a.childNodes.length;b++){var d=a.childNodes[b];if(1==d.nodeType&&
|
22 |
+
"SCRIPT"!=d.nodeName)var e=document.defaultView.getComputedStyle(d,null).getPropertyValue("z-index");e>c&&"auto"!=e&&(c=parseInt(e))}return c},timeConverter:function(a){a=new Date(1E3*a);var c=new Date,b=new Date(Date.now()-864E5),d=a.getFullYear(),e="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")[a.getMonth()],f=a.getDate(),m=a.getHours(),g=a.getMinutes();return a.setHours(0,0,0,0)==c.setHours(0,0,0,0)?"Today, "+m+":"+g:a.setHours(0,0,0,0)==b.setHours(0,0,0,0)?"Yesterday, "+m+":"+g:
|
23 |
+
d==c.getFullYear()?f+" "+e+", "+d:f+" "+e+" "+d},createPreloaderView:function(a){var c=0,b=document.createElement("div");b.className="gmedia_v2_Preloader";var d=document.createElement("div");d.style.position="absolute";d.style.width="8px";d.style.height="8px";d.style.margin="-4px";d.style.left="50%";d.style.top="50%";d.style.borderRadius="50%";d.style.backgroundColor=a;b.appendChild(d);d=document.createElement("div");d.className="c-spinner";d.style.position="absolute";d.style.width="36px";d.style.height=
|
24 |
+
"36px";d.style.margin="-18px";d.style.left="50%";d.style.top="50%";for(var e=0;8>e;e++){var f=document.createElement("div");f.style.position="absolute";f.style.top="50%";f.style.left="50%";f.style.marginTop="-4px";f.style.marginLeft="-4px";f.style.width="8px";f.style.height="8px";f.style.backgroundColor=a;f.style.borderRadius="100%";f.style.transform="rotate("+c+"deg) translate(18px)";c+=45;d.appendChild(f)}b.appendChild(d);return b},trace:function(a){if(1==arguments.length)console.log(a);else{for(var c=
|
25 |
+
"",b=0;b<arguments.length;b++)c+=arguments[b]+", ";c=c.slice(0,-2);console.log(c)}},preventDefaultForScrollKeys:function(a){if({37:1,38:1,39:1,40:1}[a.keyCode])return a.preventDefault(),!1},preventDefault:function(a){a=a||window.event;a.preventDefault&&a.preventDefault();a.returnValue=!1},disableBodyScroll:function(){document.getElementsByTagName("html")[0].classList.add("gmedia_PopUpActive")},enableBodyScroll:function(){document.getElementsByTagName("html")[0].classList.remove("gmedia_PopUpActive")},
|
26 |
+
disableBodyScrollSlider:function(){window.addEventListener&&(window.addEventListener("wheel",this.preventDefault,this.passiveListener),window.addEventListener("mousewheel",this.preventDefault,this.passiveListener),window.addEventListener("touchmove",this.preventDefault,this.passiveListener));document.onkeydown=this.preventDefaultForScrollKeys},enableBodyScrollSlider:function(){window.removeEventListener&&(window.removeEventListener("wheel",this.preventDefault,this.passiveListener),window.removeEventListener("mousewheel",
|
27 |
+
this.preventDefault,this.passiveListener),window.removeEventListener("touchmove",this.preventDefault,this.passiveListener));document.onkeydown=null},collapseElementsInElemt:function(a,c){for(var b=[],d=0;d<a.childNodes.length;d++){var e={},f=a.childNodes[d];1==f.nodeType&&"SCRIPT"!=f.nodeName&&f!==c&&(e.element=f,e.height=null,e.overflow=null,""!=f.style.height&&(e.height=f.style.height),""!=f.style.overflow&&(e.overflow=f.style.overflow),b.push(e),f.style.overflow="hidden",f.style.height="0")}return b},
|
28 |
+
recoverElements:function(a){if(0!=a.length)for(var c=0;c<a.length;c++){var b=a[c].element;b&&(a[c].overflow?b.style.overflow=a[c].overflow:b.style.removeProperty("overflow"),a[c].height?b.style.height=a[c].height:b.style.removeProperty("height"))}},hexToRgbaStrin:function(a,c){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,e,f){return c+c+e+e+f+f});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?"rgba("+parseInt(a[1],16)+","+parseInt(a[2],16)+","+parseInt(a[3],16)+","+c+
|
29 |
+
")":null},getFrameForBoxWithMode:function(a,c,b){var d=a.width,e=a.height;a=c.width;c=c.height;b?b=Math.max(a/d,c/e):(b=Math.min(a/d,c/e),b=1<b?1:b);d=Math.round(d*b);e=Math.round(e*b);return this.Rect(Math.round((a-d)/2),Math.round((c-e)/2),d,e)},getItemFrameByIndexForBox:function(a,c,b,d,e,f){var h=1;f&&(h=f);e=Math.min(c,e);e=Math.floor(c/e);c=1<e?(c-(e-1)*b)/e:c;h*=c;f=Math.ceil((a+1)/e)-1;return this.Rect((a-f*e)*(c+b),f*(h+d),c,h)},fadeOut:function(a,c,b){function d(){var h=(new Date).getTime()-
|
30 |
+
f,g=h/b;1>g?(g=1-e(g),a.style.opacity=String(g),setTimeout(d,Math.min(25,b-h))):(a.style.opacity="0",c&&c())}b||(b=500);var e=Math.sqrt,f=(new Date).getTime();d()},ellipsizeTextBoxToLine:function(a,c){a.innerHTML=a.textContent||a.innerText||"";var b=a.innerHTML,d=a.innerHTML.split(" ");a.innerHTML=d[0].substring(0,3);c*=a.clientHeight;for(a.innerHTML=b;a.clientHeight>c;)d.pop(),a.innerHTML=d.join(" ")+" ..."},ellipsizeTextBox:function(a){a.innerHTML=a.textContent||a.innerText||"";for(var c=a.innerHTML.split(" ");a.scrollHeight>
|
31 |
+
a.offsetHeight;)c.pop(),a.innerHTML=c.join(" ")+" ..."},scrollToY:function(a,c){var b=window.pageYOffset,d=Math.PI/(c/15),e=b/2,f=0,m,g=setInterval(function(){window.pageYOffset>a?(f+=1,m=e-e*Math.cos(f*d),window.scrollTo(0,b-m)):clearInterval(g)},15)},toggleFullScreen:function(a){var c=document.webkitIsFullScreen||document.mozFullScreen||!1;a.requestFullScreen=a.requestFullScreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||function(){return!1};document.cancelFullScreen=document.cancelFullScreen||
|
32 |
+
document.webkitCancelFullScreen||document.mozCancelFullScreen||function(){return!1};c?document.cancelFullScreen():a.requestFullScreen()},loadExtScripts:function(a,c,b){for(var d=0,h=0;h<a.length;h++){var f=document.createElement("script");f.src=a[h];f.async=!0;f.onload=f.onreadystatechange=function(){d+=1;d==a.length&&e(c.appName).appEventManager.dispatchGMEvent(k.GMEvent(b,self))};document.body.appendChild(f)}},CacheItemsList:function(){function a(){b.cached+=1;c(b.lastIndex+1>=b.itemsList.length?
|
33 |
+
0:b.lastIndex+1)}function c(d){!b.itemsList||b.cached==b.itemsList.length&&!b.amount||b.amount&&b.cached>=b.amount||(b.amount&&(b.amount=Math.min(b.amount,b.itemsList.length)),b.currentItem=b.itemsList[d].webView,b.lastIndex=d,b.currentItem.complete?(b.cached+=1,c(b.lastIndex+1>=b.itemsList.length?0:b.lastIndex+1)):b.currentItem.addEventListener("load",a,!1))}var b={cached:0,itemsList:void 0,currentItem:void 0,amount:void 0,lastIndex:void 0,init:function(d,e,f){b.currentItem&&b.currentItem.removeEventListener("load",
|
34 |
+
a,!1);b.amount=f;b.cached=0;b.currentItem=void 0;b.lastIndex=e;b.itemsList=d;void 0===e&&(e=0);c(e)},status:function(){return{list:b.itemsList,index:b.lastIndex}}};return b},GMEventsManager:function(){return{_listenerSet:{},addGMEventListener:function(a,c,b){this._listenerSet[a]||(this._listenerSet[a]=[]);this._listenerSet[a].push({listener:c,handler:b})},removeGMEventListener:function(a,c,b){if(this._listenerSet[a])for(var d=0;d<this._listenerSet[a].length;d++)this._listenerSet[a][d].listener==c&&
|
35 |
+
this._listenerSet[a][d].handler==b&&(this._listenerSet[a].splice(d,1),d=this._listenerSet[a].length)},dispatchGMEvent:function(a){if(this._listenerSet[a.type])for(var c=this._listenerSet[a.type],b=0;b<c.length;b++){var d=c[b];if(d&&d.listener&&"function"==typeof d.listener[d.handler])d.listener[d.handler](a)}}}},GMEvent:function(a,c,b){var d={};d.type=a;d.params=b;d.target=c;return d},request:function(a,c,b,d){var e=this,f=new XMLHttpRequest;f.open("POST",this.moduleSettings(c.appName).appApi,!0);
|
36 |
+
f.onreadystatechange=function(){4==this.readyState&&(200!=this.status?b&&e.moduleSettings(c.appName).appEventManager.dispatchGMEvent(e.GMEvent(b,c,{error:this.statusText,params:d})):b&&e.moduleSettings(c.appName).appEventManager.dispatchGMEvent(e.GMEvent(b,c,{data:this.responseText,params:d})))};f.onerror=function(e){1==confirm("Failed to load resource: The network connection was lost. Let's try again?")&&request(a,c,b,d)};try{f.send(a),e.moduleSettings(c.appName).appEventManager.dispatchGMEvent(e.GMEvent(l.REQUEST_START,
|
37 |
+
c,null))}catch(m){e.trace(m)}},Item:function(a,c){var b={get webView(){if(this.webImg.src)return b.webImg;this.webImg.src=this.itemViewSrc;return this.webImg}};this.copyProperties(a,b);b.appName=c;b.idPrefix=void 0;b.webImg=new Image;b.webImgFrame=this.Rect(0,0,0,0);b.webImg.addEventListener("load",function(){this.classList.add("onLoad")},!1);if(b.link&&""!=b.link){a=b.link;var d;a.match(/youtu\.be/i)||a.match(/youtube\.com/i)?(c=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&\?]*).*/,
|
38 |
+
(a=a.match(c))&&11==a[7].length&&(d=a[7]),void 0!==d&&(b.mime_type="video/youtube",b.videoId=d,b.link=void 0)):a.match(/vimeo\.com/i)&&(c=/(www\.)?vimeo.com\/(\d+)($|\/)/,(a=a.match(c))&&(d=a[2]),void 0!==d&&(b.mime_type="video/vimeo",b.videoId=d,b.link=void 0))}"audio/mpeg"==b.mime_type&&(b.type="audio");"image"==b.mime_type.split("/")[0]&&(b.type="image");"video"==b.mime_type.split("/")[0]&&(b.type="video");b.hasTag=function(a){if("all"==a)return!0;if(!b.tags||0==b.tags.length)return!1;for(var c=
|
39 |
+
0;c<b.tags.length;c++)if(b.tags[c].term_id==a)return!0};b.itemViewSrc=b.meta?b.meta.web?b.meta.web.link:b.meta.original?b.meta.original.link:b.meta.thumb?b.meta.thumb.link:null:null;b.itemViewThumbSrc=b.meta?b.meta.thumb?b.meta.thumb.link:b.meta.web?b.meta.web.link:null:null;b.itemViewSize=b.meta?b.meta.web?this.Size(b.meta.web.width,b.meta.web.height):b.meta.original?this.Size(b.meta.original.width,b.meta.original.height):this.Size(300,300):this.Size(300,300);b.itemViewThumbSize=b.meta?b.meta.thumb?
|
40 |
+
this.Size(b.meta.thumb.width,b.meta.thumb.height):b.meta.web?this.Size(b.meta.web.width,b.meta.web.height):this.Size(300,300):this.Size(300,300);return b},Term:function(a,c){var b=this,d={set gmedia__in(a){this._query&&(this._query.gmedia__in=a.toString(),this._gmedia_in=a,this.count=a.length,"myCollection"==this.taxonomy&&this._query&&(this.sharelink=b.moduleSettings(c).post_url+"/?"+b.moduleSettings(c).galleryID+"[gmedia__in]="+this._query.gmedia__in))},get gmedia__in(){return this._gmedia_in},
|
41 |
+
get taxony_type(){switch(this.taxonomy){case "gmedia_album":return"albums";case "gmedia_category":return"categories";case "gmedia_tag":return"tags";case "myCollection":return"gmedia__in";default:return null}},get term_id(){return"myCollection"==this.taxonomy?this.taxony_type+"-"+this.gmedia__in.toString():this._term_id},set term_id(a){this._term_id=a},get query(){var a=void 0,b;if("myCollection"==this.taxonomy)return b={orderby:"gmedia__in",order:"ASC",gmedia__in:this._gmedia_in.toString()};switch(this.taxonomy){case "gmedia_album":a=
|
42 |
+
"album__in";break;case "gmedia_category":a="category__in";break;case "gmedia_tag":a="tag__in"}b={per_page:0,admin:!1,page:1};b[a]=[this.term_id];return b}};this.copyProperties(a,d);a.term_id&&(d._term_id=a.term_id);d.appName=c;d.key=void 0;d._gmedia_in=[];d.meta&&(a=this.Meta(d.meta,d.appName),d.meta=a);"gmedia_tag"==d.taxonomy&&(d.name="#"+d.name);"myCollection"==d.taxonomy&&d._query&&(d.gmedia__in=d._query.gmedia__in.split(","));return d},termDataByQueryNameId:function(a,c,b){if(!a.gmedia__in)return null;
|
43 |
+
var d=a.gmedia__in.split(",").length,e=a.orderby,f=a.order;return{count:d,name:c,meta:{_order:f,_orderby:e,order:f,orderby:e},taxonomy:"myCollection",term_id:b,_query:a}},termsListFromAppQuery:function(a){var c=[],b=void 0;if(a.album__in){var d=a.album__in.split(",");for(b in d)c.push({taxonomy_type:"albums",term_id:d[b]})}if(a.category__in)for(b in d=a.category__in.split(","),d)c.push({taxonomy_type:"categories",term_id:d[b]});if(a.tag__in)for(b in a=a.tag__in.split(","),a)c.push({taxonomy_type:"tags",
|
44 |
+
term_id:a[b]});return 0<c.length?c:void 0},Meta:function(a,c){var b={};this.copyProperties(a,b);b.appName=c;b._cover&&(b._cover=this.Item(a._cover,b.appName));a=b._cover?b._cover:null;b.cover=a;return b}};var x=["gm_vit_slider.js","gm_vit_itemMenu.js","gm_vit_modalWin.js?ver=2.1.0"],k=new r,y=k.trace,e=k.moduleSettings,l={REQUEST_START:"REQUEST_START",COLLECTION_DATA_REDY:"COLLECTION_DATA_REDY",COUNTERS_UPDATED:"COUNTERS_UPDATED",NEED_MODAL:"NEED_MODAL",NEED_LIGHTBOX:"NEED_LIGHTBOX",REMOVE_LIGHTBOX:"REMOVE_LIGHTBOX",
|
45 |
+
NEED_NEW_COLLECTION:"NEED_NEW_COLLECTION",NEED_PREV_COLLECTION:"NEED_PREV_COLLECTION",NEED_NEW_COLLECTION_BY_TERM:"NEED_NEW_COLLECTION_BY_TERM",FULLSCREEN_SWITCH:"FULLSCREEN_SWITCH"};t.prototype={updateView:function(){var a=this.delegate.tagsCloud,c=[],b=[],d;for(d in a)"0"!=d&&c.push(a[d].toLowerCase());c.sort();c.splice(0,0,a["0"].toLowerCase());for(d=0;d<c.length;d++)for(var h in a)if(a[h].toLowerCase()==c[d]){var f=this.createTag(h,a[h]);b.push(f);this.list.appendChild(f);delete a[h]}this.selectedTag=
|
46 |
+
document.getElementById(this.id+this.delegate.filtredById);this.selectedTag.style.backgroundColor=e(this.appName).tagCloudTextColor;this.selectedTag.style.color=e(this.appName).tagCloudBgColor;this.selectedTag.style.cursor="default"},createTag:function(a,c){function b(a){var b=this.id.split("_")[this.id.split("_").length-1];if(d.selectedTag!=this)switch(a.type){case "click":d.selectedTag=document.getElementById(d.id+d.delegate.filtredById);d.selectedTag.style.color=e(d.appName).tagCloudTextColor;
|
47 |
+
d.selectedTag.style.backgroundColor=e(d.appName).tagCloudBgColor;d.selectedTag.style.cursor="pointer";d.delegate.filtred(b);d.selectedTag=document.getElementById(d.id+d.delegate.filtredById);d.selectedTag.style.cursor="default";break;case "mouseenter":this.style.backgroundColor=e(d.appName).tagCloudTextColor;this.style.color=e(d.appName).tagCloudBgColor;break;case "mouseleave":this!=d.selectedTag&&(this.style.color=e(d.appName).tagCloudTextColor,this.style.backgroundColor=e(d.appName).tagCloudBgColor)}}
|
48 |
+
var d=this,h=document.createElement("li");h.appendChild(document.createTextNode(c));h.id=this.id+a;h.style.color=e(this.appName).tagCloudTextColor;h.style.backgroundColor=e(this.appName).tagCloudBgColor;h.addEventListener("click",b,!1);h.addEventListener("mouseenter",b,!1);h.addEventListener("mouseleave",b,!1);return h}};u.prototype={init:function(){function a(a){if(e(f.appName).lightBoxEnable)switch(a.type){case "mouseenter":this.classList.add("gmedia_hover");k&&k.classList.add("gmedia_hover");break;
|
49 |
+
case "mouseleave":this.classList.remove("gmedia_hover");k&&k.classList.remove("gmedia_hover");break;case "click":this.classList.remove("gmedia_hover"),k&&k.classList.remove("gmedia_hover"),f.delegate.itemAction(f.index,"lightBox")}}function c(a){a.classList.remove("gmedia_hover");"like"==a.getAttribute("type")&&a.getAttribute("like")||"bookmark"==a.getAttribute("type")&&a.getAttribute("mark")?a.style.backgroundColor=w:(a.style.backgroundColor=w,a.childNodes[0].style.fill=l)}function b(a){"click"==
|
50 |
+
a.type?d&&(f.delegate.itemAction(f.index,this.getAttribute("type")),miniScreen&&c(this)):"mouseenter"==a.type?(this.classList.add("gmedia_hover"),this.style.backgroundColor=z,"bookmark"==this.getAttribute("type")&&this.getAttribute("mark")||(this.childNodes[0].style.fill=p)):"mouseleave"==a.type&&c(this)}var d=this.delegate.itemsList[this.index];this.item=d;var h=this.delegate.itemWidth;this.type=d.type;this.itemViewSrc=!1;this.img=new Image;var f=this;this.img.onload=function(){this.setAttribute("alt",
|
51 |
+
d.title);1.1<f.view.clientWidth/this.naturalWidth&&d.itemViewSrc&&!f.itemViewSrc&&(this.src=d.itemViewSrc,f.itemViewSrc=!0);f.imageHolder.style.minHeight=null;this.style.opacity="1"};this.imageHolder.appendChild(this.img);if(e(this.appName).lightBoxEnable){var k=document.createElement("div");k.className="gmedia_imageOver";k.style.backgroundColor=e(this.appName).collectionThumbHoverColor;this.imageHolder.appendChild(k);var g=document.createElement("div");g.className="gmedia_zoom";switch(this.item.type){case "video":"vimeo"==
|
52 |
+
this.item.mime_type.split("/")[1]?(g.classList.add("media"),g.innerHTML='<svg enable-background="new 0 0 56.693 56.693" height="56.693px" id="Layer_1" version="1.1" viewBox="0 0 56.693 56.693" width="56.693px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M3.602,22.974l2.01,2.636c0,0,4.146-3.267,5.528-1.634c1.382,1.634,6.656,21.357,8.417,24.997 c1.537,3.192,5.777,7.413,10.426,4.397c4.646-3.014,20.098-16.205,22.863-31.781c2.764-15.574-18.594-12.313-20.854,1.256 c5.652-3.395,8.671,1.38,5.778,6.784c-2.889,5.399-5.527,8.921-6.908,8.921c-1.379,0-2.441-3.612-4.021-9.928 c-1.635-6.53-1.624-18.291-8.416-16.958C12.019,12.921,3.602,22.974,3.602,22.974z"/></svg>',
|
53 |
+
g.firstChild.style.fill="#00adef"):(g.classList.add("media"),g.innerHTML='<svg data-name="Layer 21" height="24" id="Layer_21" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><title/><path d="M21.80731,7.805a2.79915,2.79915,0,0,0-2.54907-2.53906C17.69061,5.13586,15.36707,5,12.50012,5c-3.45251,0-6.05865.14105-7.74353.27332A2.79932,2.79932,0,0,0,2.1925,7.815C2.08936,8.90021,2,10.33344,2,12.0423c0,1.66632.08862,3.07422.19128,4.14594a2.79852,2.79852,0,0,0,2.56384,2.53833C6.43994,18.85883,9.04657,19,12.50012,19c2.86694,0,5.19049-.13586,6.75812-.266a2.799,2.799,0,0,0,2.54907-2.539C21.91052,15.11548,22,13.69189,22,12S21.91052,8.88452,21.80731,7.805ZM9.77594,14.93878V9.06122L15.574,12Z"/></svg>',
|
54 |
+
g.firstChild.style.fill="#e02f2f");break;case "audio":g.classList.add("media");g.innerHTML='<svg version="1.1" viewBox="0 0 58 94" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M37.992,0h-8.021v65.358c-4.435-1.706-10.174-1.73-15.835,0.328C3.994,69.377-2.049,78.355,0.638,85.736 c2.688,7.383,13.088,10.374,23.229,6.683c8.614-3.134,14.249-10.082,14.111-16.626l0.014-53.451 c13.986,2.204,14.943,19.884,13.268,24.842c-0.636,1.879,0.484,3.286,2.598,0C68.938,23.726,37.992,13.376,37.992,0z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>';
|
55 |
+
g.firstChild.style.fill="#7a7a7a";break;default:g.innerHTML='<svg fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>'}this.imageHolder.appendChild(g)}this.imageHolder.addEventListener("mouseenter",a,!1);this.imageHolder.addEventListener("mouseleave",
|
56 |
+
a,!1);this.imageHolder.addEventListener("click",a,!1);this.img.src=1.1<h/d.itemViewThumbSize.width?d.itemViewSrc:d.itemViewThumbSrc;this.imageRetio=d.itemViewSize.height/d.itemViewSize.width;this.imageHolder.style.minHeight=this.imageRetio*h+"px";h=document.createElement("div");h.className="gmedia_itemContent";h.style.backgroundColor=e(this.appName).collectionThumbContentBGColor;this.view.appendChild(h);g=void 0;e(this.appName).collectionThumbTitleShow&&d.title&&""!=d.title&&(g=document.createElement("div"),
|
57 |
+
g.className="gmedia_gmedia_itemTitle",g.style.fontSize=e(this.appName).collectionThumbFontSize+"px",g.style.color=e(this.appName).collectionThumbTitleColor,g.innerHTML=d.title,h.appendChild(g));e(this.appName).collectionThumbDescriptionShow&&d.description&&""!=d.description&&(g=document.createElement("div"),g.className="gmedia_itemDescription",g.style.fontSize=e(this.appName).collectionThumbDescriptionFontSize+"px",g.style.color=e(this.appName).collectionThumbDescriptionColor,g.innerHTML=d.description,
|
58 |
+
h.appendChild(g));g=document.createElement("div");g.className="gmedia_itemMenuHolder";var l=e(this.appName).collectionThumbSubMenuIconColor,w=e(this.appName).collectionThumbSubMenuBackgroundColor,z=e(this.appName).collectionThumbSubMenuBackgroundColorOver,p=e(this.appName).collectionThumbSubMenuIconHoverColor;if(d.link){var n=document.createElement("a");n.className="gmedia_itemReadMore";n.innerHTML=e(this.appName).collectionReadMoreButtonLabel;n.style.backgroundColor=e(this.appName).collectionReadMoreButtonBGColor;
|
59 |
+
n.style.color=e(this.appName).collectionReadMoreButtonLabelColor;n.setAttribute("target",e(this.appName).linkTargetWindow);n.setAttribute("href",d.link);n.onmouseenter=function(){this.style.backgroundColor=e(f.appName).collectionReadMoreButtonBGColorHover;this.style.color=e(f.appName).collectionReadMoreButtonLabelColorHover};n.onmouseleave=function(){this.style.backgroundColor=e(f.appName).collectionReadMoreButtonBGColor;this.style.color=e(f.appName).collectionReadMoreButtonLabelColor};n.addEventListener("click",
|
60 |
+
b,!1);g.appendChild(n)}0<g.childNodes.length&&h.appendChild(g)},resize:function(a){return this.view.clientHeight},updateSomeData:function(){},set mark(a){this.bookmarkButton&&(a?(this.bookmarkButton.getElementsByTagName("svg")[0].style.fill="red",this.bookmarkButton.setAttribute("mark","true")):(this.bookmarkButton.getElementsByTagName("svg")[0].style.fill=this.bookmarkButton.classList.contains("gmedia_hover")?e(this.appName).collectionThumbSubMenuIconHoverColor:e(this.appName).collectionThumbSubMenuIconColor,
|
61 |
+
this.bookmarkButton.removeAttribute("mark")))},get mark(){return this.bookmarkButton?!0:!1},set like(a){this.likeButton&&(a?(this.likeButton.getElementsByTagName("svg")[0].style.fill="red",this.likeButton.style.cursor="default",this.likeButton.style.pointerEvents="none",this.likeButton.setAttribute("like","true")):(this.likeButton.childNodes[0].style.fill=this.iconColor,this.likeButton.style.cursor="pointer",this.likeButton.style.pointerEvents="all",this.likeButton.removeAttribute("like")))},get like(){return this.likeButton?
|
62 |
+
!0:!1},set visibility(a){this.view.style.visibility=a},set display(a){"none"==a&&clearTimeout(this.opacityDelay);this._display=this.view.style.display=a;this.updateSomeData()},get display(){return this._display},set opacity(a){var c=this;a.delay?this.opacityDelay=setTimeout(function(){c.view.style.opacity=a.opacity},a.delay):(clearTimeout(this.opacityDelay),c.view.style.opacity=a.opacity)}};q.prototype={init:function(){this.showPreloader(!0)},startRequest:function(a){var c={};c.backgroundColor=e(this.appName).collectionThumbSubMenuBackgroundColor;
|
63 |
+
c.backgroundColorOver=e(this.appName).collectionThumbSubMenuBackgroundColorOver;c.iconColor=e(this.appName).collectionThumbSubMenuIconColor;c.iconColorOver=e(this.appName).collectionThumbSubMenuIconHoverColor;this.itemMenu=this.delegate.itemMenuConstructor(this.delegate,k,c,!1);this.query=a;this.query.per_page=0;this.query.page=1;e(this.appName).appEventManager.addGMEventListener(l.COLLECTION_DATA_REDY,this,"dataLoaded");k.request(JSON.stringify({library:this.query}),this,l.COLLECTION_DATA_REDY)},
|
64 |
+
showPreloader:function(a){var c=void 0;if(a)document.getElementById(this.appName+"_preloader")||(c=k.createPreloaderView(k.hexToRgbaStrin(e(this.appName).collectionPreloaderColor,.7)),c.id=this.appName+"_preloader",this.view.appendChild(c));else if(document.getElementById(this.appName+"_preloader")){var b=this;c=document.getElementById(this.appName+"_preloader");k.fadeOut(c,function(){b.view&&b.view.removeChild(c)},500)}},dataLoaded:function(a){if(a=a.params.data){try{var c=JSON.parse(a);c.data&&
|
65 |
+
(this.addItemsToCollection(c.data),this.trySortItemsByTerms());e(this.appName).lightBoxEnable&&this.delegate.startItem&&this.tryOpenLightboxForID(this.delegate.startItem)}catch(b){y(b)}this.showPreloader(!1);this.itemsList&&this.updateViewByData()}},tryOpenLightboxForID:function(a){for(var c=0;c<this.filteredCollection.length;c++)a==this.filteredCollection[c].ID&&(e(this.appName).appEventManager.dispatchGMEvent(k.GMEvent(l.NEED_LIGHTBOX,this,{collection:this,index:c})),c=this.filteredCollection.length)},
|
66 |
+
createTermsCollectionAndUpdateProperties:function(a){function c(a){var c={},e;for(e in a){var f=k.Term(a[e],b.appName);c[f.term_id]=f;f.itemsList=[];if(b.itemsList)for(var h=0;h<b.itemsList.length;h++){var l=b.itemsList[h];if(l[f.taxonomy_type]){var p=l[f.taxonomy_type],n;for(n in p)p[n].term_id==f.term_id&&(f.itemsList.push(l),d.push(l),b.itemsList.splice(h,1),--h)}}}return c}this.properties||(this.properties={});var b=this,d=[];this.terms=[];for(var e in a)"album__in"==e||"category__in"==e||"tag__in"==
|
67 |
+
e?this.terms.push(c(a[e])):this.properties[e]=a[e];this.itemsList=d.concat(this.itemsList)},addItemsToCollection:function(a){for(var c=0;c<a.length;c++){var b=k.Item(a[c],this.appName);b.index=this.itemsList.length+c;if(b.tags&&0<b.tags.length)for(var d=0;d<b.tags.length;d++){var e=b.tags[d];this.tagsCloud&&(this.tagsCloud[e.term_id]=e.name)}this.itemsList.push(b)}},trySortItemsByTerms:function(){this.queryTermsList=k.termsListFromAppQuery(this.query);if(this.itemsList&&this.queryTermsList){for(var a=
|
68 |
+
[],c=0;c<this.queryTermsList.length;c++)for(var b=this.queryTermsList[c],d=0;d<this.itemsList.length;d++){var e=this.itemsList[d];if(e[b.taxonomy_type]){var f=e[b.taxonomy_type],l;for(l in f)f[l].term_id==b.term_id&&(a.push(e),this.itemsList.splice(d,1),--d)}}this.itemsList=a.concat(this.itemsList)}},itemAction:function(a,c){if(!this.dragging){var b=this.filteredCollection[a];switch(c){case "lightBox":e(this.appName).appEventManager.dispatchGMEvent(k.GMEvent(l.NEED_LIGHTBOX,this,{collection:this,
|
69 |
+
index:a}));break;case "share":e(this.appName).appEventManager.dispatchGMEvent(k.GMEvent(l.NEED_MODAL,self,{type:"share",item:b}));break;case "link":b.link&&window.open(b.link,e(this.appName).linkTargetWindow);break;case "coments":window.open(b.sharelink+"/#comments",e(this.appName).linkTargetWindow);break;case "like":this.delegate.likeItem=b;break;case "bookmark":this.delegate.bookmarkItem=b}}},refteshDataInItem:function(){for(var a=0;a<this.filteredCollection.length;a++)this.filteredCollection[a].view.updateSomeData()},
|
70 |
+
activate:function(){this.updateLayout();(this.scrollHandler=this.scrollHandlerFunction())&&window.addEventListener("scroll",this.scrollHandler,!1)},deactivate:function(){e(this.appName).appEventManager.removeGMEventListener(l.COLLECTION_DATA_REDY,this,"dataLoaded");window.removeEventListener("scroll",this.scrollHandler,!1);this.scrollHandler=void 0;this.removePresentedItems()},removeItemViewFormStage:function(){this.removePresentedItems();this.presentedList=[];this.cureantPage=void 0},removePresentedItems:function(){for(var a=
|
71 |
+
0;a<this.presentedList.length;a++)this.presentedList[a].display="none"},showPresentedItems:function(){for(var a=0;a<this.presentedList.length;a++)this.presentedList[a].display="block"},createLayout:function(){this.scrollHandler||(this.scrollHandler=this.scrollHandlerFunction())&&window.addEventListener("scroll",this.scrollHandler,!1);this.page_Amount=Math.min(20,this.filteredCollection.length)},updateLayout:function(){},scrollHandlerFunction:function(){return!1},resize:function(){var a=this;clearTimeout(this.resizeTimeOut);
|
72 |
+
k.is_touch_device?this.resizeTimeOut=setTimeout(function(){a.resizeDelay()},150):this.resizeDelay()},resizeDelay:function(){this.viewWidth!=this.view.clientWidth&&(this.updateLayout(),this.viewWidth=this.view.clientWidth)},filtred:function(a){window.removeEventListener("scroll",this.scrollHandler,!1);this.scrollHandler=void 0;this.removeItemViewFormStage();this.filtredById=a;this.createLayout()},updateTagsCloud:function(){0!=this.filteredCollection.length&&(this.tagsCloudView||(this.tagsCloudView=
|
73 |
+
new t(this),this.header.appendChild(this.tagsCloudView.view)),this.tagsCloud&&this.tagsCloudView.updateView())},set filtredById(a){if(this.itemsList&&(this.filteredList=[],this._filter=a,0!==a))for(var c=0;c<this.itemsList.length;c++){var b=this.itemsList[c];b.hasTag(a)&&this.filteredList.push(b)}},get filtredById(){return this._filter},get filteredCollection(){return 0<this.filteredList.length?this.filteredList:this.itemsList}};p.prototype=Object.create(q.prototype,{updateViewByData:{value:function(){if(this.itemsList)for(var a=
|
74 |
+
0;a<this.itemsList.length;a++){var c=new u(this,a);this.itemsList[a].view=c;c.init()}e(this.appName).tagsFilter&&this.updateTagsCloud();this.createLayout()}},createLayout:{value:function(){q.prototype.createLayout.apply(this,arguments);this.createColumns();this.addPageToStage()}},updateLayout:{value:function(){if(0==this.createColumns())this.presentedList&&this.presentedList[0]&&"none"==this.presentedList[0].display&&this.showPresentedItems();else{this.removePresentedItems();for(var a=0;a<this.presentedList.length;a++)this.arangeItemToColum(this.presentedList[a])}}},
|
75 |
+
createColumns:{value:function(){var a=Math.floor(this.content.clientWidth/Math.min(this.content.clientWidth,e(this.appName).collectionThumbRecomendedWidth));if(this.columnsArr.length!=a){for(var c=0;c<this.columnsArr.length;c++)this.content.removeChild(this.columnsArr[c]);this.columnsArr=[];for(c=0;c<a;c++){var b=document.createElement("div");b.className="collectionColumn";b.style.width=100/a+"%";this.columnsArr.push(b);this.content.appendChild(b)}return!0}return!1}},bottomSpace:{get:function(){return this.content.getBoundingClientRect().bottom-
|
76 |
+
window.innerHeight}},scrollHandlerFunction:{value:function(a){var c=this;return function(){200>c.bottomSpace&&c.addPageToStage()}}},addPageToStage:{value:function(){void 0===this.cureantPage&&(this.cureantPage=0);clearTimeout(this.layoutSizerDelay);if(!(this.cureantPage>=Math.ceil(this.filteredCollection.length/this.page_Amount))){for(var a=this.cureantPage*this.page_Amount,c=Math.min(a+this.page_Amount,this.filteredCollection.length),b=1;a<c;a++){var d=this.filteredCollection[a].view;d.index=a;d.opacity=
|
77 |
+
{opacity:0,delay:0};this.addItemToStage(d);d.opacity={opacity:1,delay:100*b};b+=1}this.cureantPage+=1;var e=this;this.layoutSizerDelay=setTimeout(function(){200>e.bottomSpace&&e.addPageToStage()},1E3)}}},getColumWithMinHeight:{value:function(){for(var a=this.columnsArr[0].clientHeight,c=0,b=1;b<this.columnsArr.length;b++)a!=Math.min(a,this.columnsArr[b].clientHeight)&&(a=Math.min(a,this.columnsArr[b].clientHeight),c=b);return c}},arangeItemToColum:{value:function(a){var c=a.view;this.columnsArr[this.getColumWithMinHeight()].appendChild(c);
|
78 |
+
a.display="block"}},addItemToStage:{value:function(a){this.arangeItemToColum(a);this.presentedList.push(a)}},itemWidth:{get:function(){var a=Math.floor(this.content.clientWidth/e(this.appName).collectionThumbRecomendedWidth);return this.content.clientWidth/a}}});p.prototype.constructor=p;v.prototype={externalScriptsReady:function(a){"function"===typeof window.codeasily_v2_itemMenu&&(this.itemMenuConstructor=window.codeasily_v2_itemMenu);"function"===typeof window.codeasily_v2_slider&&(this.sliderConstructor=
|
79 |
+
window.codeasily_v2_slider);"function"===typeof window.codeasily_v2_modalWin&&(this.modalWinConstructor=window.codeasily_v2_modalWin);e(this.appName).appEventManager.removeGMEventListener(l.EXT_SCRIPTS_READY,this,"externalScriptsReady");this.startApp()},startApp:function(){var a=this;e(this.appName).appEventManager.addGMEventListener(l.NEED_NEW_COLLECTION,this,"pushNewCollectionByTermID");e(this.appName).appEventManager.addGMEventListener(l.NEED_NEW_COLLECTION_BY_TERM,this,"pushNewCollectionByTerm");
|
80 |
+
e(this.appName).appEventManager.addGMEventListener(l.NEED_MODAL,this,"createModal");e(this.appName).lightBoxEnable&&(e(this.appName).appEventManager.addGMEventListener(l.NEED_LIGHTBOX,this,"createLightbox"),e(this.appName).appEventManager.addGMEventListener(l.REMOVE_LIGHTBOX,this,"removeLightbox"));this.viewsSet={};e(this.appName).appEventManager.addGMEventListener(l.COUNTERS_UPDATED,this,"itemsCountersUpdateHandler");this.likesSet={};window.localStorage.getItem("gm_likesSet")&&(this.likesSet=JSON.parse(window.localStorage.getItem("gm_likesSet")));
|
81 |
+
window.addEventListener("resize",function(){a.windowResizeHandler(a)});this.popstateHandler=function(c){a.slider?a.slider.prepareToRemove():0<a.collections.length&&a.collections[a.collections.length-1]&&a.itemFromHash&&a.collections[a.collections.length-1].tryOpenLightboxForID(a.itemFromHash)};window.addEventListener("popstate",this.popstateHandler,!1);this.itemFromHash&&(this.startItem=this.itemFromHash,window.history.replaceState(null,null,window.location.pathname+window.location.search));this.appQuery&&
|
82 |
+
(this.createAudioPlayer(),this.collections[0].startRequest(this.appQuery))},get itemFromHash(){var a=window.location.hash.indexOf(this.appName),c=void 0;a+1&&(c=2<=window.location.hash.substr(a).split("-").length?parseInt(window.location.hash.substr(a).split("-")[1]):void 0);return c},itemHash:function(a){return"#"+this.appName+"-"+a.ID},addCollectioByQuery:function(a){var c=0;this.modal&&(this.modal.prepareToRemove(),c=500);this.slider&&(this.slider.prepareToRemove(),c=500);if(0<this.collections.length&&
|
83 |
+
this.collections[this.collections.length-1]){var b=this.collections[this.collections.length-1];b.deactivate();b.view.parentNode&&this.appDiv.removeChild(b.view)}document.body.scrollTop>this.appDiv.getBoundingClientRect().top&&(b=document.body.getBoundingClientRect(),b=this.appDiv.getBoundingClientRect().top-b.top-(k.is_touch_device?0:50),scrollToY(b,500));var d=this;!a.s&&this.searchForm&&this.searchForm.clear();setTimeout(function(){var b=new p(d,d.appName,a);d.collections.push(b);d.appDiv.appendChild(b.view);
|
84 |
+
b.init()},c)},pushNewCollectionByTerm:function(a){if(a.params||a.params.term)a=a.params.term,a.sharelink&&window.open(a.sharelink,"_self")},termLinkForTerm:function(a,c){return e(this.appName).post_url+"/?"+e(this.appName).galleryID+"["+c+"]="+a},pushNewCollectionByTermID:function(a){if(a.params||a.params.term_id||!a.params.taxonomy)a=this.termLinkForTerm(a.params.term_id,a.params.taxonomy),window.open(a,"_self")},set likeItem(a){a&&(a.meta.likes||(a.meta.likes=0),a.meta.likes=parseInt(a.meta.likes)+
|
85 |
+
1,a.view&&a.view.like&&(a.view.like=!0),a=a.ID,this.likesSet[a]||(this.likesSet[a]="like",this.viewsSet[a]&&delete this.viewsSet[a],a=JSON.stringify({counter:{likes:[a],views:[a]}}),k.request(a,this,l.COUNTERS_UPDATED),window.localStorage.setItem("gm_likesSet",JSON.stringify(this.likesSet))))},set viewItem(a){var c=a.ID;this.updateItemLink(a);this.viewsSet[c]="view"},itemsCountersUpdate:function(){if(this.viewsSet){var a=[];for(key in this.viewsSet)a.push(key);0<a.length&&(a=JSON.stringify({counter:{likes:[],
|
86 |
+
views:a}}),k.request(a,this,l.COUNTERS_UPDATED),this.viewsSet={})}},itemsCountersUpdateHandler:function(a){window.localStorage.setItem("gm_likesSet",JSON.stringify(this.likesSet))},createLightbox:function(a){if(a.params||a.params.collection){var c=a.params.collection;a=a.params.index;var b=c.filteredCollection[a];this.slider&&this.slider.prepareToRemove();window.localStorage.getItem("gm_likesSet")&&(this.likesSet=JSON.parse(window.localStorage.getItem("gm_likesSet")));this.sliderConstructor&&(this.slider=
|
87 |
+
this.sliderConstructor(this,k),this.slider.initByList(c.filteredCollection,a));c=this.itemHash(b);window.location.hash!=c&&window.history.pushState(null,null,c)}},updateItemLink:function(a){window.history.replaceState(null,null,this.itemHash(a))},removeLightbox:function(a){var c=this,b=a.target;setTimeout(function(){b.view&&b.view.parentNode&&b.view.parentNode.removeChild(b.view);c.slider&&(c.slider=void 0)},400);this.itemFromHash&&window.history.back()},createModal:function(a){if(a.params.type&&
|
88 |
+
a.params.item){var c=a.params.item,b=void 0;this.modal||(this.modal=this.modalWinConstructor(this,k));this.modal.type=a.params.type;switch(a.params.type){case "share":b=this.modal.shareBar;break;case "info":b=this.modal.infoBar}b.item=c;this.modal.pushPage(b.view)}},deleteModal:function(){this.modal&&delete this.modal},windowResizeHandler:function(a){this.bookmarkBox&&this.collectionTranslateY!=this.bookmarkBox.height&&(this.collectionTranslateY=this.bookmarkBox.height,this.showBookmarkInfo(this.bookmarkStatusShow));
|
89 |
+
0<this.collections.length&&this.collections[this.collections.length-1].resize();this.slider&&this.slider.resizeHandler()},createAudioPlayer:function(){var a=this;var c=document.getElementById("gmAudioPlayer")?document.getElementById("gmAudioPlayer"):new Audio;if(null!=c&&c.canPlayType&&c.canPlayType("audio/mpeg")){var b=function(b){a.slider&&a.slider.audioPlayerHandler(b)};c.id="gmAudioPlayer";c.setAttribute("type","audio/mpeg");c.setAttribute("codecs","mp3");this.audioPlayer=c;this.appDiv.appendChild(this.audioPlayer);
|
90 |
+
c.addEventListener("ended",b,!1);c.addEventListener("pause",b,!1);c.addEventListener("play",b,!1);c.addEventListener("durationchange",b,!1)}}};(function(){for(var a=document.body.getElementsByClassName("amron_module"),c=0;c<a.length;c++){var b=a[c].id;this[b]=new v(this[b],b,a[c])}})()}amron_module();
|
module/amron/screenshot.png
ADDED
Binary file
|
module/amron/settings.php
ADDED
@@ -0,0 +1,337 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$default_options = array(
|
3 |
+
//Main layout
|
4 |
+
'collectionThumbRecomendedWidth' => '260',
|
5 |
+
'collectionPreloaderColor' => '333333',
|
6 |
+
'linkTargetWindow' => '_blank',
|
7 |
+
'thumbSpacing' => '10',
|
8 |
+
//Tags Cloud
|
9 |
+
'tagsFilter' => '1',
|
10 |
+
'tagCloudAll' => 'All',
|
11 |
+
'tagCloudTextColor' => '000000',
|
12 |
+
'tagCloudBgColor' => 'eeeeee',
|
13 |
+
//Thumbnails
|
14 |
+
'collectionThumbHoverColor' => 'rgba(0, 0, 0, .7)',
|
15 |
+
'collectionThumbContentBGColor' => 'rgba(245,245,245,1)',
|
16 |
+
'collectionThumbTitleShow' => '1',
|
17 |
+
'collectionThumbTitleColor' => 'rgba(0,0,0,1)',
|
18 |
+
'collectionThumbFontSize' => '18',
|
19 |
+
'collectionThumbDescriptionShow' => '1',
|
20 |
+
'collectionThumbDescriptionColor' => 'rgba(0,0,0,1)',
|
21 |
+
'collectionThumbDescriptionFontSize' => '15',
|
22 |
+
'collectionReadMoreButtonLabel'=>'Read More',
|
23 |
+
'collectionReadMoreButtonLabelColor'=>'rgba(255, 255, 255, 1)',
|
24 |
+
'collectionReadMoreButtonBGColor'=>'rgba(0, 0, 0, 1)',
|
25 |
+
'collectionReadMoreButtonLabelColorHover'=>'rgba(0, 0, 0, 1)',
|
26 |
+
'collectionReadMoreButtonBGColorHover'=>'rgba(235,235,235,1)',
|
27 |
+
//Modal Window
|
28 |
+
'modaBgColor'=> 'rgba(0,0,0,0.9)',
|
29 |
+
'modalInfoBoxBgColor' => 'rgba(255,255,255,1)',
|
30 |
+
'modalInfoBoxTitleTextColor' => '000000',
|
31 |
+
'shareTitlePlaceHolder' => 'Share',
|
32 |
+
'modalInfoBoxTextColor' => '333333',
|
33 |
+
'infoBarCountersEnable'=> '1',
|
34 |
+
'infoBarDateInfoEnable'=> '1',
|
35 |
+
// Slider Page
|
36 |
+
'lightBoxEnable' => '1',
|
37 |
+
'sliderPreloaderColor' =>'ffffff',
|
38 |
+
'sliderBgColor' => 'rgba(0,0,0,1)',
|
39 |
+
'sliderHeaderFooterBgColor' => '000000',
|
40 |
+
'sliderNavigationColor' => 'rgba(0,0,0,1)',
|
41 |
+
'sliderNavigationIconColor' => 'rgba(255,255,255,1)',
|
42 |
+
'sliderItemTitleFontSize' => '24',
|
43 |
+
'sliderItemTitleTextColor' => 'ffffff',
|
44 |
+
'sliderThumbBarEnable' => '0',
|
45 |
+
'sliderThumbBarHoverColor' => 'ffffff',
|
46 |
+
'sliderThumbSubMenuBackgroundColor' => 'rgba(0,0,0,1)',
|
47 |
+
'sliderThumbSubMenuBackgroundColorOver' => 'rgba(255,255,255,1)',
|
48 |
+
'sliderThumbSubMenuIconColor' => 'rgba(255,255,255,1)',
|
49 |
+
'sliderThumbSubMenuIconHoverColor' => 'rgba(0,0,0,1)',
|
50 |
+
'sliderInfoEnable' => '1',
|
51 |
+
'sliderItemDownload' => '1',
|
52 |
+
'sliderItemDiscuss' => '1',
|
53 |
+
'sliderSocialShareEnabled' => '1',
|
54 |
+
'sliderLikesEnabled' => '1',
|
55 |
+
// Custom CSS
|
56 |
+
'customCSS' => ''
|
57 |
+
);
|
58 |
+
$options_tree = array(
|
59 |
+
array('label' => 'Common Settings',
|
60 |
+
'fields' => array(
|
61 |
+
'collectionThumbRecomendedWidth' => array('label' => 'Thumbnail - desired Width',
|
62 |
+
'tag' => 'input',
|
63 |
+
'attr' => 'type="number" min="100" max="500" data-gridType="is:masonry"',
|
64 |
+
'text' => ''
|
65 |
+
),
|
66 |
+
'thumbSpacing' => array('label' => 'Space between thumbnails',
|
67 |
+
'tag' => 'input',
|
68 |
+
'attr' => 'type="number" min="0" max="100"',
|
69 |
+
'text' => ''
|
70 |
+
),
|
71 |
+
'collectionPreloaderColor' => array('label' => 'Preloader Color',
|
72 |
+
'tag' => 'input',
|
73 |
+
'attr' => 'type="text" data-type="color"',
|
74 |
+
'text' => 'Set custom color for gallery'
|
75 |
+
),
|
76 |
+
'linkTargetWindow' => array(
|
77 |
+
'label' => 'Link target',
|
78 |
+
'tag' => 'select',
|
79 |
+
'attr' => '',
|
80 |
+
'text' => '',
|
81 |
+
'choices' => array(
|
82 |
+
array(
|
83 |
+
'label' => '_blank',
|
84 |
+
'value' => '_blank'
|
85 |
+
),
|
86 |
+
array(
|
87 |
+
'label' => '_self',
|
88 |
+
'value' => '_self'
|
89 |
+
)
|
90 |
+
)
|
91 |
+
),
|
92 |
+
)
|
93 |
+
),
|
94 |
+
array('label' => 'Tags Filter',
|
95 |
+
'fields' => array(
|
96 |
+
'tagsFilter' => array('label' => 'Tags Cloud enable',
|
97 |
+
'tag' => 'checkbox',
|
98 |
+
'attr' => 'data-watch="change"',
|
99 |
+
'text' => 'Add tags filter for selected collection'
|
100 |
+
),
|
101 |
+
'tagCloudAll' => array('label' => 'Tag ALL - name',
|
102 |
+
'tag' => 'input',
|
103 |
+
'attr' => '',
|
104 |
+
'text' => ''
|
105 |
+
),
|
106 |
+
'tagCloudTextColor' => array('label' => 'Text color',
|
107 |
+
'tag' => 'input',
|
108 |
+
'attr' => 'type="text" data-type="color" data-tagsFilter="is:1"',
|
109 |
+
'text' => 'Tag button'
|
110 |
+
),
|
111 |
+
'tagCloudBgColor' => array('label' => 'Background color',
|
112 |
+
'tag' => 'input',
|
113 |
+
'attr' => 'type="text" data-type="color" data-tagsFilter="is:1"',
|
114 |
+
'text' => 'Tag button'
|
115 |
+
)
|
116 |
+
)
|
117 |
+
),
|
118 |
+
array('label' => 'Thumbnails Settings',
|
119 |
+
'fields' => array(
|
120 |
+
'collectionThumbHoverColor' => array('label' => 'Hover color',
|
121 |
+
'tag' => 'input',
|
122 |
+
'attr' => 'type="text" data-type="rgba"',
|
123 |
+
'text' => ''
|
124 |
+
),
|
125 |
+
'collectionThumbTitleShow' => array('label' => 'Title',
|
126 |
+
'tag' => 'checkbox',
|
127 |
+
'attr' => 'data-watch="change"',
|
128 |
+
'text' => ''
|
129 |
+
),
|
130 |
+
'collectionThumbTitleColor' => array('label' => 'Title Text color',
|
131 |
+
'tag' => 'input',
|
132 |
+
'attr' => 'type="text" data-type="rgba" data-collectionThumbTitleShow="is:1"',
|
133 |
+
'text' => ''
|
134 |
+
),
|
135 |
+
'collectionThumbFontSize' => array('label' => 'Title Font size',
|
136 |
+
'tag' => 'input',
|
137 |
+
'attr' => 'type="number" min="11" max="24" step="1" data-collectionThumbTitleShow="is:1"',
|
138 |
+
'text' => ''
|
139 |
+
),
|
140 |
+
'collectionThumbDescriptionShow' => array('label' => 'Item Description',
|
141 |
+
'tag' => 'checkbox',
|
142 |
+
'attr' => 'data-watch="change"',
|
143 |
+
'text' => ''
|
144 |
+
),
|
145 |
+
'collectionThumbDescriptionColor' => array('label' => 'Description Text color',
|
146 |
+
'tag' => 'input',
|
147 |
+
'attr' => 'type="text" data-type="rgba" data-collectionThumbDescriptionShow="is:1"',
|
148 |
+
'text' => ''
|
149 |
+
),
|
150 |
+
'collectionThumbDescriptionFontSize' => array('label' => 'Description Font size',
|
151 |
+
'tag' => 'input',
|
152 |
+
'attr' => 'type="number" min="11" max="24" step="1" data-collectionThumbDescriptionShow="is:1"',
|
153 |
+
'text' => ''
|
154 |
+
),
|
155 |
+
'collectionReadMoreButtonLabel' => array('label' => 'Read More button Label Text',
|
156 |
+
'tag' => 'input',
|
157 |
+
'attr' => '',
|
158 |
+
'text' => 'Read More'
|
159 |
+
),
|
160 |
+
'collectionReadMoreButtonBGColor' => array('label' => 'Read More button color',
|
161 |
+
'tag' => 'input',
|
162 |
+
'attr' => 'type="text" data-type="rgba"',
|
163 |
+
'text' => ''
|
164 |
+
),
|
165 |
+
'collectionReadMoreButtonBGColorHover' => array('label' => 'Read More button Hover color',
|
166 |
+
'tag' => 'input',
|
167 |
+
'attr' => 'type="text" data-type="rgba"',
|
168 |
+
'text' => ''
|
169 |
+
),
|
170 |
+
'collectionReadMoreButtonLabelColor' => array('label' => 'Read More button Label color',
|
171 |
+
'tag' => 'input',
|
172 |
+
'attr' => 'type="text" data-type="rgba"',
|
173 |
+
'text' => ''
|
174 |
+
),
|
175 |
+
'collectionReadMoreButtonLabelColorHover' => array('label' => 'Read More button Label Hover color',
|
176 |
+
'tag' => 'input',
|
177 |
+
'attr' => 'type="text" data-type="rgba"',
|
178 |
+
'text' => ''
|
179 |
+
),
|
180 |
+
)
|
181 |
+
),
|
182 |
+
array('label' => 'Modal Window Settings (Item Info & Share)',
|
183 |
+
'fields' => array(
|
184 |
+
'modaBgColor' => array('label' => 'Overlap Color',
|
185 |
+
'tag' => 'input',
|
186 |
+
'attr' => 'type="text" data-type="rgba"',
|
187 |
+
'text' => ''
|
188 |
+
),
|
189 |
+
'modalInfoBoxBgColor' => array('label' => 'Info Bar Color',
|
190 |
+
'tag' => 'input',
|
191 |
+
'attr' => 'type="text" data-type="rgba"',
|
192 |
+
'text' => ''
|
193 |
+
),
|
194 |
+
'modalInfoBoxTitleTextColor' => array('label' => 'Info Bar Title text Color',
|
195 |
+
'tag' => 'input',
|
196 |
+
'attr' => 'type="text" data-type="color"',
|
197 |
+
'text' => ''
|
198 |
+
),
|
199 |
+
'shareTitlePlaceHolder' => array('label' => 'Share bar name',
|
200 |
+
'tag' => 'input',
|
201 |
+
'attr' => '',
|
202 |
+
'text' => ''
|
203 |
+
),
|
204 |
+
'modalInfoBoxTextColor' => array('label' => 'Info Bar Text Color',
|
205 |
+
'tag' => 'input',
|
206 |
+
'attr' => 'type="text" data-type="color"',
|
207 |
+
'text' => ''
|
208 |
+
),
|
209 |
+
'infoBarCountersEnable' => array('label' => 'Show View/Likes/Comments',
|
210 |
+
'tag' => 'checkbox',
|
211 |
+
'attr' => 'data-watch="change"',
|
212 |
+
'text' => ''
|
213 |
+
),
|
214 |
+
'infoBarDateInfoEnable' => array('label' => 'Show item date',
|
215 |
+
'tag' => 'checkbox',
|
216 |
+
'attr' => 'data-watch="change"',
|
217 |
+
'text' => ''
|
218 |
+
)
|
219 |
+
)
|
220 |
+
),
|
221 |
+
array('label' => 'Lightbox Settings',
|
222 |
+
'fields' => array(
|
223 |
+
'lightBoxEnable' => array('label' => 'Lightbox',
|
224 |
+
'tag' => 'checkbox',
|
225 |
+
'attr' => '',
|
226 |
+
'text' => 'Show the item in the Lightbox by clicking on the thumbnail'
|
227 |
+
),
|
228 |
+
'sliderPreloaderColor' => array('label' => 'Preloader Color',
|
229 |
+
'tag' => 'input',
|
230 |
+
'attr' => 'type="text" data-type="color"',
|
231 |
+
'text' => ''
|
232 |
+
),
|
233 |
+
'sliderBgColor' => array('label' => 'Background color',
|
234 |
+
'tag' => 'input',
|
235 |
+
'attr' => 'type="text" data-type="rgba"',
|
236 |
+
'text' => ''
|
237 |
+
),
|
238 |
+
'sliderHeaderFooterBgColor' => array('label' => 'Header & Footer background color',
|
239 |
+
'tag' => 'input',
|
240 |
+
'attr' => 'type="text" data-type="color"',
|
241 |
+
'text' => 'Gradient color'
|
242 |
+
),
|
243 |
+
'sliderNavigationColor' => array('label' => 'Navigation button color',
|
244 |
+
'tag' => 'input',
|
245 |
+
'attr' => 'type="text" data-type="rgba"',
|
246 |
+
'text' => ''
|
247 |
+
),
|
248 |
+
'sliderNavigationIconColor' => array('label' => 'Navigation button Icons color',
|
249 |
+
'tag' => 'input',
|
250 |
+
'attr' => 'type="text" data-type="rgba"',
|
251 |
+
'text' => ''
|
252 |
+
),
|
253 |
+
'sliderItemTitleFontSize' => array('label' => 'Item Title - font Size',
|
254 |
+
'tag' => 'input',
|
255 |
+
'attr' => 'type="number" min="11" max="34" step="1"',
|
256 |
+
'text' => ''
|
257 |
+
),
|
258 |
+
'sliderItemTitleTextColor' => array('label' => 'Item Title text color',
|
259 |
+
'tag' => 'input',
|
260 |
+
'attr' => 'type="text" data-type="color"',
|
261 |
+
'text' => ''
|
262 |
+
),
|
263 |
+
/*'sliderThumbBarEnable' => array('label' => 'Show Items Thumbnails',
|
264 |
+
'tag' => 'checkbox',
|
265 |
+
'attr' => 'data-watch="change"',
|
266 |
+
'text' => ''
|
267 |
+
),
|
268 |
+
'sliderThumbBarHoverColor' => array('label' => 'Thumbnails Border Color (select mode)',
|
269 |
+
'tag' => 'input',
|
270 |
+
'attr' => 'type="text" data-type="color" data-sliderThumbBarEnable="is:1"',
|
271 |
+
'text' => ''
|
272 |
+
),*/
|
273 |
+
'sliderThumbSubMenuBackgroundColor' => array('label' => 'Item Submenu Button color',
|
274 |
+
'tag' => 'input',
|
275 |
+
'attr' => 'type="text" data-type="rgba"',
|
276 |
+
'text' => ''
|
277 |
+
),
|
278 |
+
'sliderThumbSubMenuIconColor' => array('label' => 'Item Submenu Button Icon color',
|
279 |
+
'tag' => 'input',
|
280 |
+
'attr' => 'type="text" data-type="rgba"',
|
281 |
+
'text' => ''
|
282 |
+
),
|
283 |
+
'sliderThumbSubMenuBackgroundColorOver' => array('label' => 'Item Submenu Button color (over)',
|
284 |
+
'tag' => 'input',
|
285 |
+
'attr' => 'type="text" data-type="rgba"',
|
286 |
+
'text' => ''
|
287 |
+
),
|
288 |
+
'sliderThumbSubMenuIconHoverColor' => array('label' => 'Item Submenu Button Icon color (over)',
|
289 |
+
'tag' => 'input',
|
290 |
+
'attr' => 'type="text" data-type="rgba"',
|
291 |
+
'text' => ''
|
292 |
+
),
|
293 |
+
'sliderInfoEnable' => array('label' => 'Item Info button',
|
294 |
+
'tag' => 'checkbox',
|
295 |
+
'attr' => 'data-watch="change"',
|
296 |
+
'text' => ''
|
297 |
+
),
|
298 |
+
'sliderItemDownload' => array('label' => 'Item Download button',
|
299 |
+
'tag' => 'checkbox',
|
300 |
+
'attr' => 'data-watch="change"',
|
301 |
+
'text' => ''
|
302 |
+
),
|
303 |
+
'sliderItemDiscuss' => array('label' => 'Item Discuss button',
|
304 |
+
'tag' => 'checkbox',
|
305 |
+
'attr' => 'data-watch="change"',
|
306 |
+
'text' => ''
|
307 |
+
),
|
308 |
+
'sliderSocialShareEnabled' => array('label' => 'Item Share button',
|
309 |
+
'tag' => 'checkbox',
|
310 |
+
'attr' => 'data-watch="change"',
|
311 |
+
'text' => ''
|
312 |
+
),
|
313 |
+
'sliderLikesEnabled' => array('label' => 'Item Like button',
|
314 |
+
'tag' => 'checkbox',
|
315 |
+
'attr' => 'data-watch="change"',
|
316 |
+
'text' => ''
|
317 |
+
)
|
318 |
+
)
|
319 |
+
),
|
320 |
+
array('label' => 'Advanced Settings',
|
321 |
+
'fields' => array('customCSS' => array('label' => 'Custom CSS',
|
322 |
+
'tag' => 'textarea',
|
323 |
+
'attr' => 'cols="20" rows="10"',
|
324 |
+
'text' => 'You can enter custom style rules into this box if you\'d like. IE: <i>a{color: red !important;}</i>
|
325 |
+
<br />This is an advanced option! This is not recommended for users not fluent in CSS... but if you do know CSS,
|
326 |
+
anything you add here will override the default styles'
|
327 |
+
)
|
328 |
+
/*,
|
329 |
+
'loveLink' => array(
|
330 |
+
'label' => 'Display LoveLink?',
|
331 |
+
'tag' => 'checkbox',
|
332 |
+
'attr' => '',
|
333 |
+
'text' => 'Selecting "Yes" will show the lovelink icon (codeasily.com) somewhere on the gallery'
|
334 |
+
)*/
|
335 |
+
)
|
336 |
+
)
|
337 |
+
);
|
module/cubik-lite/css/style.css
CHANGED
@@ -103,8 +103,6 @@
|
|
103 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_twitter:hover { background-color:#00aced; }
|
104 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_pinterest { background-image:url('../img/pinterest@2x.png'); background-size:1em 1em; }
|
105 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_pinterest:hover { background-color:#cc2127; }
|
106 |
-
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_google { background-image:url('../img/google@2x.png'); background-size:1em 1em; }
|
107 |
-
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_google:hover { background-color:#d64a2d; }
|
108 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_stumbleupon { background-image:url('../img/stumbleupon@2x.png'); background-size:1em 1em; }
|
109 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_stumbleupon:hover { background-color:#ea4b24; }
|
110 |
.gmedia-cubik-lite .mfp-comments,
|
103 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_twitter:hover { background-color:#00aced; }
|
104 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_pinterest { background-image:url('../img/pinterest@2x.png'); background-size:1em 1em; }
|
105 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_pinterest:hover { background-color:#cc2127; }
|
|
|
|
|
106 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_stumbleupon { background-image:url('../img/stumbleupon@2x.png'); background-size:1em 1em; }
|
107 |
.gmedia-cubik-lite .mfp-buttons-bar .mfp-share_stumbleupon:hover { background-color:#ea4b24; }
|
108 |
.gmedia-cubik-lite .mfp-comments,
|
module/cubik-lite/img/google@2x.png
DELETED
Binary file
|
module/cubik-lite/index.php
CHANGED
@@ -3,7 +3,7 @@ $module_info = array(
|
|
3 |
'base' => 'cubik-lite',
|
4 |
'name' => 'cubik-lite',
|
5 |
'title' => 'Cubik Lite',
|
6 |
-
'version' => '1.
|
7 |
'author' => 'GalleryCreator',
|
8 |
'description' => __('Perfect gallery module for widget. This is a light version of Cubik module.
|
9 |
|
3 |
'base' => 'cubik-lite',
|
4 |
'name' => 'cubik-lite',
|
5 |
'title' => 'Cubik Lite',
|
6 |
+
'version' => '1.5',
|
7 |
'author' => 'GalleryCreator',
|
8 |
'description' => __('Perfect gallery module for widget. This is a light version of Cubik module.
|
9 |
|
module/cubik-lite/js/script.js
CHANGED
@@ -554,10 +554,6 @@ if(typeof jQuery.fn.gmCubikLite == 'undefined') {
|
|
554 |
sharelink = 'https://pinterest.com/pin/create/button/?url=' + encodeURIComponent(url) + '&media=' + encodeURIComponent(imgsrc) + '&description=' + encodeURIComponent(title);
|
555 |
window.open(sharelink, '_blank');
|
556 |
}
|
557 |
-
if($(this).hasClass('mfp-share_google')) {
|
558 |
-
sharelink = 'https://plus.google.com/share?url=' + encodeURIComponent(url);
|
559 |
-
window.open(sharelink, '_blank');
|
560 |
-
}
|
561 |
if($(this).hasClass('mfp-share_stumbleupon')) {
|
562 |
sharelink = 'http://www.stumbleupon.com/submit?url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title);
|
563 |
window.open(sharelink, '_blank');
|
@@ -738,7 +734,6 @@ if(typeof jQuery.fn.gmCubikLite == 'undefined') {
|
|
738 |
' <li><a class="mfp-share_facebook mfp-share_sharelizer">Facebook</a></li>' +
|
739 |
' <li><a class="mfp-share_twitter mfp-share_sharelizer">Twitter</a></li>' +
|
740 |
' <li><a class="mfp-share_pinterest mfp-share_sharelizer">Pinterest</a></li>' +
|
741 |
-
' <li><a class="mfp-share_google mfp-share_sharelizer">Google+</a></li>' +
|
742 |
' <li><a class="mfp-share_stumbleupon mfp-share_sharelizer">StumbleUpon</a></li>' +
|
743 |
' </ul>' +
|
744 |
'</div>';
|
554 |
sharelink = 'https://pinterest.com/pin/create/button/?url=' + encodeURIComponent(url) + '&media=' + encodeURIComponent(imgsrc) + '&description=' + encodeURIComponent(title);
|
555 |
window.open(sharelink, '_blank');
|
556 |
}
|
|
|
|
|
|
|
|
|
557 |
if($(this).hasClass('mfp-share_stumbleupon')) {
|
558 |
sharelink = 'http://www.stumbleupon.com/submit?url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title);
|
559 |
window.open(sharelink, '_blank');
|
734 |
' <li><a class="mfp-share_facebook mfp-share_sharelizer">Facebook</a></li>' +
|
735 |
' <li><a class="mfp-share_twitter mfp-share_sharelizer">Twitter</a></li>' +
|
736 |
' <li><a class="mfp-share_pinterest mfp-share_sharelizer">Pinterest</a></li>' +
|
|
|
737 |
' <li><a class="mfp-share_stumbleupon mfp-share_sharelizer">StumbleUpon</a></li>' +
|
738 |
' </ul>' +
|
739 |
'</div>';
|
module/phantom/css/style.css
CHANGED
@@ -347,8 +347,6 @@ body .gmShowBuster { display:block !important; }
|
|
347 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_twitter:hover { background-color:#00aced; }
|
348 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_pinterest { background-image:url('../img/pinterest@2x.png'); background-size:1em 1em; }
|
349 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_pinterest:hover { background-color:#cc2127; }
|
350 |
-
.gmedia-phantom .mfp-buttons-bar .mfp-share_google { background-image:url('../img/google@2x.png'); background-size:1em 1em; }
|
351 |
-
.gmedia-phantom .mfp-buttons-bar .mfp-share_google:hover { background-color:#d64a2d; }
|
352 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_stumbleupon { background-image:url('../img/stumbleupon@2x.png'); background-size:1em 1em; }
|
353 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_stumbleupon:hover { background-color:#ea4b24; }
|
354 |
.gmedia-phantom .mfp-comments,
|
347 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_twitter:hover { background-color:#00aced; }
|
348 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_pinterest { background-image:url('../img/pinterest@2x.png'); background-size:1em 1em; }
|
349 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_pinterest:hover { background-color:#cc2127; }
|
|
|
|
|
350 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_stumbleupon { background-image:url('../img/stumbleupon@2x.png'); background-size:1em 1em; }
|
351 |
.gmedia-phantom .mfp-buttons-bar .mfp-share_stumbleupon:hover { background-color:#ea4b24; }
|
352 |
.gmedia-phantom .mfp-comments,
|
module/phantom/img/google@2x.png
DELETED
Binary file
|
module/phantom/index.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
$module_info = array('base' => 'phantom',
|
3 |
'name' => 'phantom',
|
4 |
'title' => 'Phantom',
|
5 |
-
'version' => '3.
|
6 |
'author' => 'CodEasily.com',
|
7 |
'description' => __('This module will help you to easily add a grid gallery to your WordPress website or blog. The gallery is completely customizable, resizable and is compatible with all browsers and devices (iPhone, iPad and Android smartphones).
|
8 |
|
2 |
$module_info = array('base' => 'phantom',
|
3 |
'name' => 'phantom',
|
4 |
'title' => 'Phantom',
|
5 |
+
'version' => '3.20',
|
6 |
'author' => 'CodEasily.com',
|
7 |
'description' => __('This module will help you to easily add a grid gallery to your WordPress website or blog. The gallery is completely customizable, resizable and is compatible with all browsers and devices (iPhone, iPad and Android smartphones).
|
8 |
|
module/phantom/init.php
CHANGED
@@ -53,17 +53,17 @@ if(!isset($shortcode_raw)){
|
|
53 |
<div class="gmPhantom_Container noLightbox" <?php echo $is_bot? '' : 'style="opacity:0"'; ?>>
|
54 |
<?php
|
55 |
$thumbsWrapper_class = (int)$allsettings['thumbScale']? ' gmPhantom_ThumbScale' : '';
|
56 |
-
if('label' == $allsettings['
|
57 |
if((int)$allsettings['labelOnHover']){
|
58 |
$thumbsWrapper_class .= ' gmPhantom_LabelHover';
|
59 |
} else{
|
60 |
$thumbsWrapper_class .= ' gmPhantom_LabelInside';
|
61 |
}
|
62 |
-
} elseif('label_bottom' == $allsettings['
|
63 |
$thumbsWrapper_class .= ' gmPhantom_LabelBottom';
|
64 |
-
} elseif('tooltip' == $allsettings['
|
65 |
$thumbsWrapper_class .= ' gmPhantom_LabelTooltip';
|
66 |
-
} elseif('none' == $allsettings['
|
67 |
$thumbsWrapper_class .= ' gmPhantom_LabelNone';
|
68 |
}
|
69 |
?>
|
@@ -144,7 +144,7 @@ if(!isset($shortcode_raw)){
|
|
144 |
<div class="gmPhantom_ThumbContainer gmPhantom_ThumbLoader<?php echo(!in_array($type, array('image'))? " mfp-iframe" : ''); ?>"<?php echo $item_data_html; ?>>
|
145 |
<a href="<?php echo (!empty($allsettings['thumb2link']) && $item->link)? $item->link : $item->url; ?>" class="gmPhantom_Thumb"><img src="<?php echo $thumb; ?>" data-src="<?php echo $image; ?>" alt="<?php esc_attr_e($alttext); ?>"/></a>
|
146 |
<?php
|
147 |
-
if(in_array($allsettings['
|
148 |
<div class="gmPhantom_ThumbLabel"><span class="gmPhantom_ThumbLabel_title"><?php echo $title; ?></span></div>
|
149 |
<?php
|
150 |
} ?>
|
53 |
<div class="gmPhantom_Container noLightbox" <?php echo $is_bot? '' : 'style="opacity:0"'; ?>>
|
54 |
<?php
|
55 |
$thumbsWrapper_class = (int)$allsettings['thumbScale']? ' gmPhantom_ThumbScale' : '';
|
56 |
+
if('label' == $allsettings['thumbsinfo']){
|
57 |
if((int)$allsettings['labelOnHover']){
|
58 |
$thumbsWrapper_class .= ' gmPhantom_LabelHover';
|
59 |
} else{
|
60 |
$thumbsWrapper_class .= ' gmPhantom_LabelInside';
|
61 |
}
|
62 |
+
} elseif('label_bottom' == $allsettings['thumbsinfo']){
|
63 |
$thumbsWrapper_class .= ' gmPhantom_LabelBottom';
|
64 |
+
} elseif('tooltip' == $allsettings['thumbsinfo']){
|
65 |
$thumbsWrapper_class .= ' gmPhantom_LabelTooltip';
|
66 |
+
} elseif('none' == $allsettings['thumbsinfo']){
|
67 |
$thumbsWrapper_class .= ' gmPhantom_LabelNone';
|
68 |
}
|
69 |
?>
|
144 |
<div class="gmPhantom_ThumbContainer gmPhantom_ThumbLoader<?php echo(!in_array($type, array('image'))? " mfp-iframe" : ''); ?>"<?php echo $item_data_html; ?>>
|
145 |
<a href="<?php echo (!empty($allsettings['thumb2link']) && $item->link)? $item->link : $item->url; ?>" class="gmPhantom_Thumb"><img src="<?php echo $thumb; ?>" data-src="<?php echo $image; ?>" alt="<?php esc_attr_e($alttext); ?>"/></a>
|
146 |
<?php
|
147 |
+
if(in_array($allsettings['thumbsinfo'], array('label', 'label_bottom'))){ ?>
|
148 |
<div class="gmPhantom_ThumbLabel"><span class="gmPhantom_ThumbLabel_title"><?php echo $title; ?></span></div>
|
149 |
<?php
|
150 |
} ?>
|
module/phantom/js/jquery.gmPhantom.js
CHANGED
@@ -16,7 +16,7 @@ if(typeof jQuery.fn.gmPhantom == 'undefined') {
|
|
16 |
opt_str = {
|
17 |
'thumbsNavigation': 'scroll', // Thumbnails Navigation (mouse, scroll). Default value: mouse. Set how you navigate through the thumbnails.
|
18 |
'thumbsAlign': 'center', // Thumbnails align. Default value: left.
|
19 |
-
'
|
20 |
'mfp_css': '',
|
21 |
'module_dirurl': '',
|
22 |
},
|
@@ -168,7 +168,7 @@ if(typeof jQuery.fn.gmPhantom == 'undefined') {
|
|
168 |
}
|
169 |
|
170 |
$('.gmPhantom_thumbsWrapper', Container).addClass(browser_class);
|
171 |
-
if(opt.
|
172 |
$('.gmPhantom_Container', Container).append('<div class="gmPhantom_Tooltip"></div>');
|
173 |
}
|
174 |
|
@@ -291,10 +291,6 @@ if(typeof jQuery.fn.gmPhantom == 'undefined') {
|
|
291 |
sharelink = 'https://pinterest.com/pin/create/button/?url=' + encodeURIComponent(url) + '&media=' + encodeURIComponent(imgsrc) + '&description=' + encodeURIComponent(title);
|
292 |
window.open(sharelink, '_blank');
|
293 |
}
|
294 |
-
if($(this).hasClass('mfp-share_google')) {
|
295 |
-
sharelink = 'https://plus.google.com/share?url=' + encodeURIComponent(url);
|
296 |
-
window.open(sharelink, '_blank');
|
297 |
-
}
|
298 |
if($(this).hasClass('mfp-share_stumbleupon')) {
|
299 |
sharelink = 'http://www.stumbleupon.com/submit?url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title);
|
300 |
window.open(sharelink, '_blank');
|
@@ -441,7 +437,7 @@ if(typeof jQuery.fn.gmPhantom == 'undefined') {
|
|
441 |
},
|
442 |
gallery: {
|
443 |
enabled: true,
|
444 |
-
arrowMarkup: '<div title="%title%"
|
445 |
tCounter: '%curr% / %total%'
|
446 |
},
|
447 |
|
@@ -497,7 +493,6 @@ if(typeof jQuery.fn.gmPhantom == 'undefined') {
|
|
497 |
' <li><a class="mfp-share_facebook mfp-share_sharelizer">Facebook</a></li>' +
|
498 |
' <li><a class="mfp-share_twitter mfp-share_sharelizer">Twitter</a></li>' +
|
499 |
' <li><a class="mfp-share_pinterest mfp-share_sharelizer">Pinterest</a></li>' +
|
500 |
-
' <li><a class="mfp-share_google mfp-share_sharelizer">Google+</a></li>' +
|
501 |
' <li><a class="mfp-share_stumbleupon mfp-share_sharelizer">StumbleUpon</a></li>' +
|
502 |
' </ul>' +
|
503 |
'</div>';
|
@@ -693,7 +688,7 @@ if(typeof jQuery.fn.gmPhantom == 'undefined') {
|
|
693 |
}
|
694 |
methods.initContainer();
|
695 |
methods.initThumbs();
|
696 |
-
if(opt.
|
697 |
methods.initTooltip();
|
698 |
}
|
699 |
|
@@ -770,7 +765,7 @@ if(typeof jQuery.fn.gmPhantom == 'undefined') {
|
|
770 |
|
771 |
initThumbs: function() {//Init Thumbnails
|
772 |
var thumb_container = $('.gmPhantom_ThumbContainer', Container);
|
773 |
-
if(opt.
|
774 |
if(!prototypes.isTouchDevice()) {
|
775 |
thumb_container.hover(function() {
|
776 |
methods.showTooltip($(this));
|
@@ -887,9 +882,9 @@ if(typeof jQuery.fn.gmPhantom == 'undefined') {
|
|
887 |
var img = $('.gmPhantom_Thumb > img', this);
|
888 |
var thumb_ratio = $(this).data('ratio');
|
889 |
if(opt.ratio <= thumb_ratio) {
|
890 |
-
|
891 |
} else {
|
892 |
-
|
893 |
if(1 != thumb_ratio) {
|
894 |
img.css('margin', Math.floor((opt.thumbWidth / thumb_ratio - opt.thumbHeight) / opt.thumbHeight * 10) + '% 0 0 0');
|
895 |
}
|
16 |
opt_str = {
|
17 |
'thumbsNavigation': 'scroll', // Thumbnails Navigation (mouse, scroll). Default value: mouse. Set how you navigate through the thumbnails.
|
18 |
'thumbsAlign': 'center', // Thumbnails align. Default value: left.
|
19 |
+
'thumbsinfo': 'label', // Info Thumbnails Display (none, tooltip, label). Default value: tooltip. Display a small info text on the thumbnails, a tooltip or a label on bottom.
|
20 |
'mfp_css': '',
|
21 |
'module_dirurl': '',
|
22 |
},
|
168 |
}
|
169 |
|
170 |
$('.gmPhantom_thumbsWrapper', Container).addClass(browser_class);
|
171 |
+
if(opt.thumbsinfo == 'tooltip' && !prototypes.isTouchDevice()) {
|
172 |
$('.gmPhantom_Container', Container).append('<div class="gmPhantom_Tooltip"></div>');
|
173 |
}
|
174 |
|
291 |
sharelink = 'https://pinterest.com/pin/create/button/?url=' + encodeURIComponent(url) + '&media=' + encodeURIComponent(imgsrc) + '&description=' + encodeURIComponent(title);
|
292 |
window.open(sharelink, '_blank');
|
293 |
}
|
|
|
|
|
|
|
|
|
294 |
if($(this).hasClass('mfp-share_stumbleupon')) {
|
295 |
sharelink = 'http://www.stumbleupon.com/submit?url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title);
|
296 |
window.open(sharelink, '_blank');
|
437 |
},
|
438 |
gallery: {
|
439 |
enabled: true,
|
440 |
+
arrowMarkup: '<div title="%title%" class="mfp-button mfp-arrow mfp-arrow-%dir%"></div>',
|
441 |
tCounter: '%curr% / %total%'
|
442 |
},
|
443 |
|
493 |
' <li><a class="mfp-share_facebook mfp-share_sharelizer">Facebook</a></li>' +
|
494 |
' <li><a class="mfp-share_twitter mfp-share_sharelizer">Twitter</a></li>' +
|
495 |
' <li><a class="mfp-share_pinterest mfp-share_sharelizer">Pinterest</a></li>' +
|
|
|
496 |
' <li><a class="mfp-share_stumbleupon mfp-share_sharelizer">StumbleUpon</a></li>' +
|
497 |
' </ul>' +
|
498 |
'</div>';
|
688 |
}
|
689 |
methods.initContainer();
|
690 |
methods.initThumbs();
|
691 |
+
if(opt.thumbsinfo == 'tooltip' && !prototypes.isTouchDevice()) {
|
692 |
methods.initTooltip();
|
693 |
}
|
694 |
|
765 |
|
766 |
initThumbs: function() {//Init Thumbnails
|
767 |
var thumb_container = $('.gmPhantom_ThumbContainer', Container);
|
768 |
+
if(opt.thumbsinfo == 'tooltip') {
|
769 |
if(!prototypes.isTouchDevice()) {
|
770 |
thumb_container.hover(function() {
|
771 |
methods.showTooltip($(this));
|
882 |
var img = $('.gmPhantom_Thumb > img', this);
|
883 |
var thumb_ratio = $(this).data('ratio');
|
884 |
if(opt.ratio <= thumb_ratio) {
|
885 |
+
img.removeClass('portrait').addClass('landscape');
|
886 |
} else {
|
887 |
+
img.removeClass('landscape').addClass('portrait');
|
888 |
if(1 != thumb_ratio) {
|
889 |
img.css('margin', Math.floor((opt.thumbWidth / thumb_ratio - opt.thumbHeight) / opt.thumbHeight * 10) + '% 0 0 0');
|
890 |
}
|
module/phantom/settings.php
CHANGED
@@ -22,7 +22,7 @@ $default_options = array(
|
|
22 |
'thumbBorderSize' => '1',
|
23 |
'thumbBorderColor' => 'cccccc',
|
24 |
'thumbPadding' => '2',
|
25 |
-
'
|
26 |
'labelOnHover' => '1',
|
27 |
'labelTextColor' => 'ffffff',
|
28 |
'labelLinkColor' => 'e7e179',
|
@@ -317,7 +317,7 @@ $options_tree = array(
|
|
317 |
array(
|
318 |
'label' => __('Thumbnails Title', 'grand-media'),
|
319 |
'fields' => array(
|
320 |
-
'
|
321 |
'label' => __('Display Thumbnails Title', 'grand-media'),
|
322 |
'tag' => 'select',
|
323 |
'attr' => 'data-watch="change"',
|
22 |
'thumbBorderSize' => '1',
|
23 |
'thumbBorderColor' => 'cccccc',
|
24 |
'thumbPadding' => '2',
|
25 |
+
'thumbsinfo' => 'label',
|
26 |
'labelOnHover' => '1',
|
27 |
'labelTextColor' => 'ffffff',
|
28 |
'labelLinkColor' => 'e7e179',
|
317 |
array(
|
318 |
'label' => __('Thumbnails Title', 'grand-media'),
|
319 |
'fields' => array(
|
320 |
+
'thumbsinfo' => array(
|
321 |
'label' => __('Display Thumbnails Title', 'grand-media'),
|
322 |
'tag' => 'select',
|
323 |
'attr' => 'data-watch="change"',
|
module/photomania/css/styles.photomania.css
CHANGED
@@ -143,8 +143,6 @@
|
|
143 |
.gmpm_big_button_wrap ul .gmpm_twitter:hover { background-color:#00aced!important; }
|
144 |
.gmpm_big_button_wrap ul .gmpm_pinterest { background:#262626 url('../img/pinterest@2x.png')!important; background-size:22px 22px!important; }
|
145 |
.gmpm_big_button_wrap ul .gmpm_pinterest:hover { background-color:#cc2127!important; }
|
146 |
-
.gmpm_big_button_wrap ul .gmpm_google { background:#262626 url('../img/google@2x.png')!important; background-size:22px 22px!important; }
|
147 |
-
.gmpm_big_button_wrap ul .gmpm_google:hover { background-color:#d64a2d!important; }
|
148 |
.gmpm_big_button_wrap ul .gmpm_stumbleupon { background:#262626 url('../img/stumbleupon@2x.png')!important; background-size:22px 22px!important; }
|
149 |
.gmpm_big_button_wrap ul .gmpm_stumbleupon:hover { background-color:#ea4b24!important; }
|
150 |
.gmpm_big_button_wrap .gmpm_sharelizers:before { position:absolute; z-index:1; top:100%; right:9px; border-top:10px solid #aaa; border-left:10px solid transparent; border-right:10px solid transparent; content:""; display:block; }
|
@@ -181,8 +179,6 @@
|
|
181 |
.gmpm_focus_actions ul .gmpm_twitter:hover { background-color:#00aced; }
|
182 |
.gmpm_focus_actions ul .gmpm_pinterest { background:#262626 url('../img/pinterest@2x.png'); background-size:22px 22px; }
|
183 |
.gmpm_focus_actions ul .gmpm_pinterest:hover { background-color:#cc2127; }
|
184 |
-
.gmpm_focus_actions ul .gmpm_google { background:#262626 url('../img/google@2x.png'); background-size:22px 22px; }
|
185 |
-
.gmpm_focus_actions ul .gmpm_google:hover { background-color:#d64a2d; }
|
186 |
.gmpm_focus_actions ul .gmpm_stumbleupon { background:#262626 url('../img/stumbleupon@2x.png'); background-size:22px 22px; }
|
187 |
.gmpm_focus_actions ul .gmpm_stumbleupon:hover { background-color:#ea4b24; }
|
188 |
.gmpm_focus_actions .gmpm_focus_share .gmpm_sharelizers .gmpm_button { background-repeat:no-repeat; background-position:center center; }
|
143 |
.gmpm_big_button_wrap ul .gmpm_twitter:hover { background-color:#00aced!important; }
|
144 |
.gmpm_big_button_wrap ul .gmpm_pinterest { background:#262626 url('../img/pinterest@2x.png')!important; background-size:22px 22px!important; }
|
145 |
.gmpm_big_button_wrap ul .gmpm_pinterest:hover { background-color:#cc2127!important; }
|
|
|
|
|
146 |
.gmpm_big_button_wrap ul .gmpm_stumbleupon { background:#262626 url('../img/stumbleupon@2x.png')!important; background-size:22px 22px!important; }
|
147 |
.gmpm_big_button_wrap ul .gmpm_stumbleupon:hover { background-color:#ea4b24!important; }
|
148 |
.gmpm_big_button_wrap .gmpm_sharelizers:before { position:absolute; z-index:1; top:100%; right:9px; border-top:10px solid #aaa; border-left:10px solid transparent; border-right:10px solid transparent; content:""; display:block; }
|
179 |
.gmpm_focus_actions ul .gmpm_twitter:hover { background-color:#00aced; }
|
180 |
.gmpm_focus_actions ul .gmpm_pinterest { background:#262626 url('../img/pinterest@2x.png'); background-size:22px 22px; }
|
181 |
.gmpm_focus_actions ul .gmpm_pinterest:hover { background-color:#cc2127; }
|
|
|
|
|
182 |
.gmpm_focus_actions ul .gmpm_stumbleupon { background:#262626 url('../img/stumbleupon@2x.png'); background-size:22px 22px; }
|
183 |
.gmpm_focus_actions ul .gmpm_stumbleupon:hover { background-color:#ea4b24; }
|
184 |
.gmpm_focus_actions .gmpm_focus_share .gmpm_sharelizers .gmpm_button { background-repeat:no-repeat; background-position:center center; }
|
module/photomania/img/google@2x.png
DELETED
Binary file
|
module/photomania/index.php
CHANGED
@@ -12,7 +12,7 @@ $module_info = array(
|
|
12 |
'price' => '0',
|
13 |
'demo' => 'http://codeasily.com/portfolio/gmedia-gallery-modules/photomania/',
|
14 |
'download' => 'http://codeasily.com/download/photomania-module-zip/',
|
15 |
-
'dependencies' => 'swiper,mousetrap'
|
16 |
);
|
17 |
if (preg_match('#' . basename(dirname(__FILE__)) . '/' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) {
|
18 |
if (isset($_GET['info'])) {
|
12 |
'price' => '0',
|
13 |
'demo' => 'http://codeasily.com/portfolio/gmedia-gallery-modules/photomania/',
|
14 |
'download' => 'http://codeasily.com/download/photomania-module-zip/',
|
15 |
+
'dependencies' => 'gmedia-swiper,mousetrap'
|
16 |
);
|
17 |
if (preg_match('#' . basename(dirname(__FILE__)) . '/' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) {
|
18 |
if (isset($_GET['info'])) {
|
module/photomania/init.php
CHANGED
@@ -206,7 +206,6 @@ if ( ! $is_bot ) {
|
|
206 |
<li style="list-style:none;"><a class="gmpm_button gmpm_facebook gmpm_sharelizer"><?php _e( 'Facebook', 'grand-media' ); ?></a></li>
|
207 |
<li style="list-style:none;"><a class="gmpm_button gmpm_twitter gmpm_sharelizer"><?php _e( 'Twitter', 'grand-media' ); ?></a></li>
|
208 |
<li style="list-style:none;"><a class="gmpm_button gmpm_pinterest gmpm_sharelizer"><?php _e( 'Pinterest', 'grand-media' ); ?></a></li>
|
209 |
-
<li style="list-style:none;"><a class="gmpm_button gmpm_google gmpm_sharelizer"><?php _e( 'Google+', 'grand-media' ); ?></a></li>
|
210 |
<li style="list-style:none;"><a class="gmpm_button gmpm_stumbleupon gmpm_sharelizer"><?php _e( 'StumbleUpon', 'grand-media' ); ?></a></li>
|
211 |
</ul>
|
212 |
</li>
|
@@ -265,7 +264,6 @@ if ( ! $is_bot ) {
|
|
265 |
<li style="list-style:none;"><a class="gmpm_button gmpm_facebook gmpm_sharelizer"><?php _e( 'Facebook', 'grand-media' ); ?></a></li>
|
266 |
<li style="list-style:none;"><a class="gmpm_button gmpm_twitter gmpm_sharelizer"><?php _e( 'Twitter', 'grand-media' ); ?></a></li>
|
267 |
<li style="list-style:none;"><a class="gmpm_button gmpm_pinterest gmpm_sharelizer"><?php _e( 'Pinterest', 'grand-media' ); ?></a></li>
|
268 |
-
<li style="list-style:none;"><a class="gmpm_button gmpm_google gmpm_sharelizer"><?php _e( 'Google+', 'grand-media' ); ?></a></li>
|
269 |
<li style="list-style:none;"><a class="gmpm_button gmpm_stumbleupon gmpm_sharelizer"><?php _e( 'StumbleUpon', 'grand-media' ); ?></a></li>
|
270 |
</ul>
|
271 |
</div>
|
206 |
<li style="list-style:none;"><a class="gmpm_button gmpm_facebook gmpm_sharelizer"><?php _e( 'Facebook', 'grand-media' ); ?></a></li>
|
207 |
<li style="list-style:none;"><a class="gmpm_button gmpm_twitter gmpm_sharelizer"><?php _e( 'Twitter', 'grand-media' ); ?></a></li>
|
208 |
<li style="list-style:none;"><a class="gmpm_button gmpm_pinterest gmpm_sharelizer"><?php _e( 'Pinterest', 'grand-media' ); ?></a></li>
|
|
|
209 |
<li style="list-style:none;"><a class="gmpm_button gmpm_stumbleupon gmpm_sharelizer"><?php _e( 'StumbleUpon', 'grand-media' ); ?></a></li>
|
210 |
</ul>
|
211 |
</li>
|
264 |
<li style="list-style:none;"><a class="gmpm_button gmpm_facebook gmpm_sharelizer"><?php _e( 'Facebook', 'grand-media' ); ?></a></li>
|
265 |
<li style="list-style:none;"><a class="gmpm_button gmpm_twitter gmpm_sharelizer"><?php _e( 'Twitter', 'grand-media' ); ?></a></li>
|
266 |
<li style="list-style:none;"><a class="gmpm_button gmpm_pinterest gmpm_sharelizer"><?php _e( 'Pinterest', 'grand-media' ); ?></a></li>
|
|
|
267 |
<li style="list-style:none;"><a class="gmpm_button gmpm_stumbleupon gmpm_sharelizer"><?php _e( 'StumbleUpon', 'grand-media' ); ?></a></li>
|
268 |
</ul>
|
269 |
</div>
|
module/photomania/js/photomania.js
CHANGED
@@ -516,10 +516,6 @@
|
|
516 |
sharelink = 'https://pinterest.com/pin/create/button/?url=' + encodeURIComponent(url) + '&media=' + encodeURIComponent(imgsrc) + '&description=' + encodeURIComponent(title);
|
517 |
window.open(sharelink, '_blank');
|
518 |
}
|
519 |
-
if ($(this).hasClass('gmpm_google')) {
|
520 |
-
sharelink = 'https://plus.google.com/share?url=' + encodeURIComponent(url);
|
521 |
-
window.open(sharelink, '_blank');
|
522 |
-
}
|
523 |
if ($(this).hasClass('gmpm_stumbleupon')) {
|
524 |
sharelink = 'http://www.stumbleupon.com/submit?url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title);
|
525 |
window.open(sharelink, '_blank');
|
516 |
sharelink = 'https://pinterest.com/pin/create/button/?url=' + encodeURIComponent(url) + '&media=' + encodeURIComponent(imgsrc) + '&description=' + encodeURIComponent(title);
|
517 |
window.open(sharelink, '_blank');
|
518 |
}
|
|
|
|
|
|
|
|
|
519 |
if ($(this).hasClass('gmpm_stumbleupon')) {
|
520 |
sharelink = 'http://www.stumbleupon.com/submit?url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title);
|
521 |
window.open(sharelink, '_blank');
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: pasyuk
|
|
3 |
Donate link: https://codeasily.com/donate/
|
4 |
Tags: gallery, image gallery, photo gallery, albums gallery, wordpress gallery plugin
|
5 |
Requires at least: 3.7
|
6 |
-
Tested up to: 5.
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -16,16 +16,14 @@ Gmedia Gallery - photo gallery with comments, show EXIF & Metadata, gallery with
|
|
16 |
|
17 |
Manage files, show image galleries and photo slideshows, play music on your site with Gmedia Gallery plugin. Gmedia Gallery plugin provides a comprehensive interface for handling galleries, images, video & audio files.
|
18 |
|
19 |
-
> #### Gallery iOS application client
|
20 |
-
>
|
21 |
-
> Now You can upload and manage your Gmedia Library (images, tags, albums) anywhere!!!
|
22 |
-
> Get new **[Gmedia Gallery application for iPhone](https://codeasily.com/gmedia-ios-app/)**
|
23 |
-
|
24 |
With Gmedia Gallery plugin you can upload an unlimited number of photo and audio files, create dozens of galleries and playlists, group pictures and other files in albums, add tags for each file.
|
25 |
Handle any file format and link any files with images in few clicks. You can import images with captions from Worpress Media Library, Flagallery plugin and from NextGen Gallery plugin right to Gmedia Library.
|
26 |
|
27 |
#### Demos:
|
28 |
|
|
|
|
|
|
|
29 |
* [PhotoBlog Style Gallery](https://codeasily.com/portfolio/gmedia-gallery-modules/photoblog/) - Pinterest style gallery with global search and photo proofing.
|
30 |
* [AlbumsList Masonry](https://codeasily.com/portfolio/gmedia-gallery-modules/albumslist-masonry/) - Splash Slider with custom lightbox and masonry collection view.
|
31 |
* [AlbumsList](https://codeasily.com/portfolio/gmedia-gallery-modules/albumslist/) - Splash Slider with custom lightbox.
|
@@ -119,19 +117,11 @@ Use [Gmedia Support Forum](https://codeasily.com/community/forum/gmedia-gallery-
|
|
119 |
|
120 |
== Screenshots ==
|
121 |
|
122 |
-
1. Module -
|
123 |
-
2.
|
124 |
-
3.
|
125 |
-
4.
|
126 |
-
5.
|
127 |
-
6. Admin Area - Gmedia Library Edit Mode
|
128 |
-
7. Admin Area - Create Gallery with Afflux Module
|
129 |
-
8. Admin Area - Add shortcode to Post - Gmedia MetaBox
|
130 |
-
9. Admin Area - Upload images to Gmedia Library
|
131 |
-
10. Admin Area - Import galleries from Flagallery plugin
|
132 |
-
11. Admin Area - Process of import galleries from Flagallery plugin
|
133 |
-
12. Admin Area - Gmedia Library
|
134 |
-
13. Admin Area - Gmedia Library Filters
|
135 |
|
136 |
= Minimum requirements for Gmedia Gallery =
|
137 |
|
@@ -143,6 +133,37 @@ Use [Gmedia Support Forum](https://codeasily.com/community/forum/gmedia-gallery-
|
|
143 |
= Modules Updated =
|
144 |
* Go to Gmedia Modules page and update installed premium modules to latest versions
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
= v1.14.7 =
|
147 |
* Fixed conflict with Lazy load plugins
|
148 |
* Added badge count for new modules
|
3 |
Donate link: https://codeasily.com/donate/
|
4 |
Tags: gallery, image gallery, photo gallery, albums gallery, wordpress gallery plugin
|
5 |
Requires at least: 3.7
|
6 |
+
Tested up to: 5.2
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
16 |
|
17 |
Manage files, show image galleries and photo slideshows, play music on your site with Gmedia Gallery plugin. Gmedia Gallery plugin provides a comprehensive interface for handling galleries, images, video & audio files.
|
18 |
|
|
|
|
|
|
|
|
|
|
|
19 |
With Gmedia Gallery plugin you can upload an unlimited number of photo and audio files, create dozens of galleries and playlists, group pictures and other files in albums, add tags for each file.
|
20 |
Handle any file format and link any files with images in few clicks. You can import images with captions from Worpress Media Library, Flagallery plugin and from NextGen Gallery plugin right to Gmedia Library.
|
21 |
|
22 |
#### Demos:
|
23 |
|
24 |
+
* [UltraBox](https://codeasily.com/portfolio/gmedia-gallery-modules/ultrabox/) - Grid/Justify/Massonry gallery with Related Images support in lightbox + EXIF/GPS info, global search, tag filter.
|
25 |
+
* [GmediaSlider](https://codeasily.com/portfolio/gmedia-gallery-modules/gmediaslider/) - Responsive Image Slider with slideshow.
|
26 |
+
* [MultiSlider (3 in 1)](https://codeasily.com/portfolio/gmedia-gallery-modules/multislider/) - Image Slider with a lot of options and 3 different layouts.
|
27 |
* [PhotoBlog Style Gallery](https://codeasily.com/portfolio/gmedia-gallery-modules/photoblog/) - Pinterest style gallery with global search and photo proofing.
|
28 |
* [AlbumsList Masonry](https://codeasily.com/portfolio/gmedia-gallery-modules/albumslist-masonry/) - Splash Slider with custom lightbox and masonry collection view.
|
29 |
* [AlbumsList](https://codeasily.com/portfolio/gmedia-gallery-modules/albumslist/) - Splash Slider with custom lightbox.
|
117 |
|
118 |
== Screenshots ==
|
119 |
|
120 |
+
1. Module - Amron Module
|
121 |
+
2. Module - Amron Module Lightbox
|
122 |
+
3. Module - WaveSurfer Music Gallery
|
123 |
+
4. Admin Area - Gmedia Library Filters
|
124 |
+
5. Admin Area - Gmedia Library Edit Mode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
|
126 |
= Minimum requirements for Gmedia Gallery =
|
127 |
|
133 |
= Modules Updated =
|
134 |
* Go to Gmedia Modules page and update installed premium modules to latest versions
|
135 |
|
136 |
+
= v1.16.4 =
|
137 |
+
* Added option to disable menu label with quantity of new modules.
|
138 |
+
* Fixed import from WP Library not save image author.
|
139 |
+
* iOS app page removed. (No money to pay for Apple developers license)
|
140 |
+
|
141 |
+
|
142 |
+
= v1.16.3 =
|
143 |
+
* Added code for support future module's features
|
144 |
+
|
145 |
+
= v1.16.2 =
|
146 |
+
* Updated free Amron gallery module. Added filter images by tags
|
147 |
+
|
148 |
+
= v1.16.0 =
|
149 |
+
* Fixed conflict with Swiper JS library on some themes
|
150 |
+
|
151 |
+
= v1.15.4 =
|
152 |
+
* Fixed datetime picker on album edit page
|
153 |
+
|
154 |
+
= v1.15.3 =
|
155 |
+
* Removed Google Plus share from bundled modules
|
156 |
+
|
157 |
+
= v1.15.2 =
|
158 |
+
* Few minor fixes
|
159 |
+
|
160 |
+
= v1.15.1 =
|
161 |
+
* Make Terms Relation "OR" by default
|
162 |
+
|
163 |
+
= v1.15.0 =
|
164 |
+
* Added new default free module - Amron
|
165 |
+
* Small fixes and improvements
|
166 |
+
|
167 |
= v1.14.7 =
|
168 |
* Fixed conflict with Lazy load plugins
|
169 |
* Added badge count for new modules
|