Version Description
Download this release
Release Info
Developer | webdorado |
Plugin | Photo Gallery by WD – Responsive Photo Gallery |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.9 to 1.1.0
- admin/controllers/BWGControllerGalleries_bwg.php +13 -27
- admin/models/BWGModelUninstall_bwg.php +1 -0
- admin/views/BWGViewAlbums_bwg.php +9 -9
- admin/views/BWGViewBWGShortcode.php +5 -5
- admin/views/BWGViewGalleries_bwg.php +68 -74
- admin/views/BWGViewLicensing_bwg.php +17 -17
- admin/views/BWGViewOptions_bwg.php +1 -1
- admin/views/BWGViewTags_bwg.php +2 -2
- admin/views/BWGViewThemes_bwg.php +30 -4
- admin/views/BWGViewUninstall_bwg.php +46 -10
- admin/views/BWGViewWidget.php +1 -1
- admin/views/BWGViewWidgetSlideshow.php +1 -1
- filemanager/css/default.css +49 -0
- filemanager/view.php +10 -2
- frontend/views/BWGViewImage_browser.php +1 -1
- images/theme_blog_style.png +0 -0
- images/theme_compact_album.png +0 -0
- images/theme_extended_album.png +0 -0
- images/theme_image_browser.png +0 -0
- images/theme_lightbox.png +0 -0
- images/theme_masonry.png +0 -0
- images/theme_page_navigation.png +0 -0
- images/theme_slideshow.png +0 -0
- images/theme_thumbnails.png +0 -0
- js/bwg.js +86 -35
- photo-gallery.php +8 -7
- readme.txt +2 -2
admin/controllers/BWGControllerGalleries_bwg.php
CHANGED
@@ -58,16 +58,6 @@ class BWGControllerGalleries_bwg {
|
|
58 |
$view->edit($id);
|
59 |
}
|
60 |
|
61 |
-
public function save_images() {
|
62 |
-
$this->save_db();
|
63 |
-
global $wpdb;
|
64 |
-
if (!isset($_POST['current_id']) || (esc_html(stripslashes($_POST['current_id'])) == 0) || (esc_html(stripslashes($_POST['current_id'])) == '')) {
|
65 |
-
$_POST['current_id'] = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_gallery');
|
66 |
-
}
|
67 |
-
$this->save_image_db();
|
68 |
-
$this->edit();
|
69 |
-
}
|
70 |
-
|
71 |
public function save_order_images() {
|
72 |
global $wpdb;
|
73 |
$imageids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_image');
|
@@ -90,11 +80,22 @@ class BWGControllerGalleries_bwg {
|
|
90 |
}
|
91 |
|
92 |
public function ajax_search() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
$this->save_image_db();
|
94 |
$this->save_order_images();
|
95 |
if (isset($_POST['ajax_task']) && esc_html($_POST['ajax_task']) != '') {
|
96 |
$ajax_task = esc_html($_POST['ajax_task']);
|
97 |
-
$this
|
|
|
|
|
98 |
}
|
99 |
$this->edit();
|
100 |
}
|
@@ -552,25 +553,10 @@ class BWGControllerGalleries_bwg {
|
|
552 |
}
|
553 |
|
554 |
public function save() {
|
555 |
-
|
556 |
-
global $wpdb;
|
557 |
-
if (!isset($_POST['current_id']) || (esc_html(stripslashes($_POST['current_id'])) == 0) || (esc_html(stripslashes($_POST['current_id'])) == '')) {
|
558 |
-
$_POST['current_id'] = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_gallery');
|
559 |
-
}
|
560 |
-
$this->save_image_db();
|
561 |
$this->display();
|
562 |
}
|
563 |
|
564 |
-
public function apply() {
|
565 |
-
$this->save_db();
|
566 |
-
global $wpdb;
|
567 |
-
if (!isset($_POST['current_id']) || (esc_html(stripslashes($_POST['current_id'])) == 0) || (esc_html(stripslashes($_POST['current_id'])) == '')) {
|
568 |
-
$_POST['current_id'] = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_gallery');
|
569 |
-
}
|
570 |
-
$this->save_image_db();
|
571 |
-
$this->edit();
|
572 |
-
}
|
573 |
-
|
574 |
public function delete_unknown_images() {
|
575 |
global $wpdb;
|
576 |
$wpdb->query('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id=0');
|
58 |
$view->edit($id);
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
public function save_order_images() {
|
62 |
global $wpdb;
|
63 |
$imageids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_image');
|
80 |
}
|
81 |
|
82 |
public function ajax_search() {
|
83 |
+
if (isset($_POST['ajax_task']) && ((esc_html($_POST['ajax_task']) == 'ajax_apply') || (esc_html($_POST['ajax_task']) == 'ajax_save'))) {
|
84 |
+
// Save gallery on "apply" and "save".
|
85 |
+
$this->save_db();
|
86 |
+
global $wpdb;
|
87 |
+
if (!isset($_POST['current_id']) || (esc_html(stripslashes($_POST['current_id'])) == 0) || (esc_html(stripslashes($_POST['current_id'])) == '')) {
|
88 |
+
// If gallery saved first time(insert in db).
|
89 |
+
$_POST['current_id'] = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'bwg_gallery');
|
90 |
+
}
|
91 |
+
}
|
92 |
$this->save_image_db();
|
93 |
$this->save_order_images();
|
94 |
if (isset($_POST['ajax_task']) && esc_html($_POST['ajax_task']) != '') {
|
95 |
$ajax_task = esc_html($_POST['ajax_task']);
|
96 |
+
if (method_exists($this, $ajax_task)) {
|
97 |
+
$this->$ajax_task();
|
98 |
+
}
|
99 |
}
|
100 |
$this->edit();
|
101 |
}
|
553 |
}
|
554 |
|
555 |
public function save() {
|
556 |
+
echo WDWLibrary::message('Item Succesfully Saved.', 'updated');
|
|
|
|
|
|
|
|
|
|
|
557 |
$this->display();
|
558 |
}
|
559 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
public function delete_unknown_images() {
|
561 |
global $wpdb;
|
562 |
$wpdb->query('DELETE FROM ' . $wpdb->prefix . 'bwg_image WHERE gallery_id=0');
|
admin/models/BWGModelUninstall_bwg.php
CHANGED
@@ -29,6 +29,7 @@ class BWGModelUninstall_bwg {
|
|
29 |
$wpdb->query("DROP TABLE ".$wpdb->prefix."bwg_option");
|
30 |
$wpdb->query("DROP TABLE ".$wpdb->prefix."bwg_theme");
|
31 |
delete_option("wd_bwg_version");
|
|
|
32 |
// Delete terms.
|
33 |
$terms = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
|
34 |
foreach ($terms as $term) {
|
29 |
$wpdb->query("DROP TABLE ".$wpdb->prefix."bwg_option");
|
30 |
$wpdb->query("DROP TABLE ".$wpdb->prefix."bwg_theme");
|
31 |
delete_option("wd_bwg_version");
|
32 |
+
delete_option("wd_bwg_theme_version");
|
33 |
// Delete terms.
|
34 |
$terms = get_terms('bwg_tag', array('orderby' => 'count', 'hide_empty' => 0));
|
35 |
foreach ($terms as $term) {
|
admin/views/BWGViewAlbums_bwg.php
CHANGED
@@ -54,15 +54,15 @@ class BWGViewAlbums_bwg {
|
|
54 |
</h2>
|
55 |
<div id="draganddrop" class="updated" style="display:none;"><strong><p>Changes made in this table shoud be saved.</p></strong></div>
|
56 |
<div class="buttons_div">
|
57 |
-
<span class="button non_selectable" onclick="spider_check_all_items()">
|
58 |
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
|
59 |
<span style="vertical-align: middle;">Select All</span>
|
60 |
</span>
|
61 |
-
<input id="show_hide_weights" class="button" type="button" onclick="spider_show_hide_weights();return false;" value="Hide order column" />
|
62 |
-
<input class="button" type="submit" onclick="spider_set_input_value('task', 'save_order')" value="Save Order" />
|
63 |
-
<input class="button" type="submit" onclick="spider_set_input_value('task', 'publish_all')" value="Publish" />
|
64 |
-
<input class="button" type="submit" onclick="spider_set_input_value('task', 'unpublish_all')" value="Unpublish" />
|
65 |
-
<input class="button" type="submit" onclick="if (confirm('Do you want to delete selected items?')) {
|
66 |
spider_set_input_value('task', 'delete_all');
|
67 |
} else {
|
68 |
return false;
|
@@ -260,9 +260,9 @@ class BWGViewAlbums_bwg {
|
|
260 |
<span class="album-icon"></span>
|
261 |
<h2><?php echo $page_title; ?></h2>
|
262 |
<div style="float:right;">
|
263 |
-
<input class="button" type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'save')" value="Save" />
|
264 |
-
<input class="button" type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'apply')" value="Apply" />
|
265 |
-
<input class="button" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="Cancel" />
|
266 |
</div>
|
267 |
<table style="clear:both;">
|
268 |
<tbody>
|
54 |
</h2>
|
55 |
<div id="draganddrop" class="updated" style="display:none;"><strong><p>Changes made in this table shoud be saved.</p></strong></div>
|
56 |
<div class="buttons_div">
|
57 |
+
<span class="button-secondary non_selectable" onclick="spider_check_all_items()">
|
58 |
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
|
59 |
<span style="vertical-align: middle;">Select All</span>
|
60 |
</span>
|
61 |
+
<input id="show_hide_weights" class="button-secondary" type="button" onclick="spider_show_hide_weights();return false;" value="Hide order column" />
|
62 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'save_order')" value="Save Order" />
|
63 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'publish_all')" value="Publish" />
|
64 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'unpublish_all')" value="Unpublish" />
|
65 |
+
<input class="button-secondary" type="submit" onclick="if (confirm('Do you want to delete selected items?')) {
|
66 |
spider_set_input_value('task', 'delete_all');
|
67 |
} else {
|
68 |
return false;
|
260 |
<span class="album-icon"></span>
|
261 |
<h2><?php echo $page_title; ?></h2>
|
262 |
<div style="float:right;">
|
263 |
+
<input class="button-secondary" type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'save')" value="Save" />
|
264 |
+
<input class="button-secondary" type="submit" onclick="if(spider_check_required('name', 'Name')){return false;};spider_set_input_value('task', 'apply')" value="Apply" />
|
265 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="Cancel" />
|
266 |
</div>
|
267 |
<table style="clear:both;">
|
268 |
<tbody>
|
admin/views/BWGViewBWGShortcode.php
CHANGED
@@ -142,9 +142,9 @@ class BWGViewBWGShortcode {
|
|
142 |
<table>
|
143 |
<tbody>
|
144 |
<tr id="tr_theme">
|
145 |
-
<td class="spider_label"
|
146 |
<td>
|
147 |
-
<select name="theme" id="theme" style="width:150px;"
|
148 |
<option value="0" selected="selected">Select Theme</option>
|
149 |
<?php
|
150 |
foreach ($theme_rows as $theme_row) {
|
@@ -472,7 +472,7 @@ class BWGViewBWGShortcode {
|
|
472 |
<tr id="tr_slideshow_enable_title">
|
473 |
<td class="spider_label"><label>Enable Image Title: </label></td>
|
474 |
<td>
|
475 |
-
<input type="radio" name="slideshow_enable_title" id="slideshow_title_yes" value="1" <?php echo ($option_row->slideshow_enable_title) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', '
|
476 |
<input type="radio" name="slideshow_enable_title" id="slideshow_title_no" value="0" <?php echo ($option_row->slideshow_enable_title) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_title_position', 'slideshow_title_no')" /><label for="slideshow_title_no">No</label>
|
477 |
</td>
|
478 |
</tr>
|
@@ -503,7 +503,7 @@ class BWGViewBWGShortcode {
|
|
503 |
<tr id="tr_slideshow_enable_description">
|
504 |
<td class="spider_label"><label>Enable Image Description: </label></td>
|
505 |
<td>
|
506 |
-
<input type="radio" name="slideshow_enable_description" id="slideshow_description_yes" value="1" <?php echo ($option_row->slideshow_enable_description) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_description_position', '
|
507 |
<input type="radio" name="slideshow_enable_description" id="slideshow_description_no" value="0" <?php echo ($option_row->slideshow_enable_description) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_description_position', 'slideshow_description_no')" /><label for="slideshow_description_no">No</label>
|
508 |
</td>
|
509 |
</tr>
|
@@ -756,7 +756,7 @@ class BWGViewBWGShortcode {
|
|
756 |
<span style="float: left; width: 100%;">
|
757 |
<a id="bwg_pro_version_link" class="button button-primary" target="_blank" style="display: table; margin-bottom: 5px;" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">Please see Pro <span id="bwg_pro_version">Thumbnail</span> View</a>
|
758 |
<input type="button" class="button-primary" id="insert" name="insert" value="Generate" onclick="bwg_insert_shortcode('');" />
|
759 |
-
<input type="button" class="button" id="import" name="import" value="Import" onclick="bwg_update_shortcode()" />
|
760 |
<textarea style="width: 100%; resize: vertical; margin-top: 5px;" id="bwg_shortcode" rows="4" onkeydown="bwg_onKeyDown(event)"></textarea>
|
761 |
</span>
|
762 |
</div>
|
142 |
<table>
|
143 |
<tbody>
|
144 |
<tr id="tr_theme">
|
145 |
+
<td <?php echo (get_option("wd_bwg_theme_version") ? 'title="This option is disabled in free version." class="spider_label spider_free_version_label"' : 'class="spider_label"'); ?>><label for="theme">Theme: </label></td>
|
146 |
<td>
|
147 |
+
<select name="theme" id="theme" style="width:150px;" <?php echo (get_option("wd_bwg_theme_version") ? 'disabled="disabled"' : ''); ?>>
|
148 |
<option value="0" selected="selected">Select Theme</option>
|
149 |
<?php
|
150 |
foreach ($theme_rows as $theme_row) {
|
472 |
<tr id="tr_slideshow_enable_title">
|
473 |
<td class="spider_label"><label>Enable Image Title: </label></td>
|
474 |
<td>
|
475 |
+
<input type="radio" name="slideshow_enable_title" id="slideshow_title_yes" value="1" <?php echo ($option_row->slideshow_enable_title) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_title_position', 'slideshow_title_yes')" /><label for="slideshow_title_yes">Yes</label>
|
476 |
<input type="radio" name="slideshow_enable_title" id="slideshow_title_no" value="0" <?php echo ($option_row->slideshow_enable_title) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_title_position', 'slideshow_title_no')" /><label for="slideshow_title_no">No</label>
|
477 |
</td>
|
478 |
</tr>
|
503 |
<tr id="tr_slideshow_enable_description">
|
504 |
<td class="spider_label"><label>Enable Image Description: </label></td>
|
505 |
<td>
|
506 |
+
<input type="radio" name="slideshow_enable_description" id="slideshow_description_yes" value="1" <?php echo ($option_row->slideshow_enable_description) ? 'checked' : ''; ?> onClick="bwg_enable_disable('', 'tr_slideshow_description_position', 'slideshow_description_yes')" /><label for="slideshow_description_yes">Yes</label>
|
507 |
<input type="radio" name="slideshow_enable_description" id="slideshow_description_no" value="0" <?php echo ($option_row->slideshow_enable_description) ? '' : 'checked'; ?> onClick="bwg_enable_disable('none', 'tr_slideshow_description_position', 'slideshow_description_no')" /><label for="slideshow_description_no">No</label>
|
508 |
</td>
|
509 |
</tr>
|
756 |
<span style="float: left; width: 100%;">
|
757 |
<a id="bwg_pro_version_link" class="button button-primary" target="_blank" style="display: table; margin-bottom: 5px;" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">Please see Pro <span id="bwg_pro_version">Thumbnail</span> View</a>
|
758 |
<input type="button" class="button-primary" id="insert" name="insert" value="Generate" onclick="bwg_insert_shortcode('');" />
|
759 |
+
<input type="button" class="button-secondary" id="import" name="import" value="Import" onclick="bwg_update_shortcode()" />
|
760 |
<textarea style="width: 100%; resize: vertical; margin-top: 5px;" id="bwg_shortcode" rows="4" onkeydown="bwg_onKeyDown(event)"></textarea>
|
761 |
</span>
|
762 |
</div>
|
admin/views/BWGViewGalleries_bwg.php
CHANGED
@@ -54,15 +54,15 @@ class BWGViewGalleries_bwg {
|
|
54 |
</h2>
|
55 |
<div id="draganddrop" class="updated" style="display:none;"><strong><p>Changes made in this table shoud be saved.</p></strong></div>
|
56 |
<div class="buttons_div">
|
57 |
-
<span class="button non_selectable" onclick="spider_check_all_items()">
|
58 |
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
|
59 |
<span style="vertical-align: middle;">Select All</span>
|
60 |
</span>
|
61 |
-
<input id="show_hide_weights" class="button" type="button" onclick="spider_show_hide_weights();return false;" value="Hide order column" />
|
62 |
-
<input class="button" type="submit" onclick="spider_set_input_value('task', 'save_order')" value="Save Order" />
|
63 |
-
<input class="button" type="submit" onclick="spider_set_input_value('task', 'publish_all')" value="Publish" />
|
64 |
-
<input class="button" type="submit" onclick="spider_set_input_value('task', 'unpublish_all')" value="Unpublish" />
|
65 |
-
<input class="button" type="submit" onclick="if (confirm('Do you want to delete selected items?')) {
|
66 |
spider_set_input_value('task', 'delete_all');
|
67 |
} else {
|
68 |
return false;
|
@@ -191,6 +191,7 @@ class BWGViewGalleries_bwg {
|
|
191 |
$page_title = (($id != 0) ? 'Edit gallery ' . $row->name : 'Create new gallery');
|
192 |
?>
|
193 |
<div style="clear: both; float: left; width: 95%;">
|
|
|
194 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
195 |
This section allows you to add/edit gallery.
|
196 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-2.html">Read More in User Manual</a>
|
@@ -218,12 +219,12 @@ class BWGViewGalleries_bwg {
|
|
218 |
}
|
219 |
}
|
220 |
var j_int = 0;
|
221 |
-
var
|
222 |
function bwg_add_image(files) {
|
223 |
var tbody = document.getElementById('tbody_arr');
|
224 |
for (var i in files) {
|
225 |
var tr = document.createElement('tr');
|
226 |
-
tr.setAttribute('id', "tr_" +
|
227 |
if (tbody.firstChild) {
|
228 |
tbody.insertBefore(tr, tbody.firstChild);
|
229 |
}
|
@@ -245,8 +246,8 @@ class BWGViewGalleries_bwg {
|
|
245 |
td_checkbox.setAttribute('onclick', "spider_check_all(this)");
|
246 |
tr.appendChild(td_checkbox);
|
247 |
var input_checkbox = document.createElement('input');
|
248 |
-
input_checkbox.setAttribute('id', "check_" +
|
249 |
-
input_checkbox.setAttribute('name', "check_" +
|
250 |
input_checkbox.setAttribute('type', "checkbox");
|
251 |
td_checkbox.appendChild(input_checkbox);
|
252 |
// Numbering TD.
|
@@ -260,11 +261,11 @@ class BWGViewGalleries_bwg {
|
|
260 |
tr.appendChild(td_thumb);
|
261 |
var a_thumb = document.createElement('a');
|
262 |
a_thumb.setAttribute('class', "thickbox thickbox-preview");
|
263 |
-
a_thumb.setAttribute('href', "<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display'/*thumb_display*/, 'width' => '650', 'height' => '500'), admin_url('admin-ajax.php')); ?>&image_id=" +
|
264 |
a_thumb.setAttribute('title', files[i]['name']);
|
265 |
td_thumb.appendChild(a_thumb);
|
266 |
var img_thumb = document.createElement('img');
|
267 |
-
img_thumb.setAttribute('id', "image_thumb_" +
|
268 |
img_thumb.setAttribute('class', "thumb");
|
269 |
img_thumb.setAttribute('src', files[i]['thumb']);
|
270 |
a_thumb.appendChild(img_thumb);
|
@@ -274,12 +275,12 @@ class BWGViewGalleries_bwg {
|
|
274 |
tr.appendChild(td_filename);
|
275 |
var div_filename = document.createElement('div');
|
276 |
div_filename.setAttribute('class', "filename");
|
277 |
-
div_filename.setAttribute('id', "filename_" +
|
278 |
td_filename.appendChild(div_filename);
|
279 |
var strong_filename = document.createElement('strong');
|
280 |
div_filename.appendChild(strong_filename);
|
281 |
var a_filename = document.createElement('a');
|
282 |
-
a_filename.setAttribute('href', "<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display', 'width' => '800', 'height' => '500'), admin_url('admin-ajax.php')); ?>&image_id=" +
|
283 |
a_filename.setAttribute('class', "spider_word_wrap thickbox thickbox-preview");
|
284 |
a_filename.setAttribute('title', files[i]['filename']);
|
285 |
a_filename.innerHTML = files[i]['filename'];
|
@@ -287,25 +288,25 @@ class BWGViewGalleries_bwg {
|
|
287 |
var div_date_modified = document.createElement('div');
|
288 |
div_date_modified.setAttribute('class', "fileDescription");
|
289 |
div_date_modified.setAttribute('title', "Date modified");
|
290 |
-
div_date_modified.setAttribute('id', "date_modified_" +
|
291 |
div_date_modified.innerHTML = files[i]['date_modified'];
|
292 |
td_filename.appendChild(div_date_modified);
|
293 |
var div_fileresolution = document.createElement('div');
|
294 |
div_fileresolution.setAttribute('class', "fileDescription");
|
295 |
div_fileresolution.setAttribute('title', "Image Resolution");
|
296 |
-
div_fileresolution.setAttribute('id', "fileresolution" +
|
297 |
div_fileresolution.innerHTML = files[i]['resolution'];
|
298 |
td_filename.appendChild(div_fileresolution);
|
299 |
var div_filesize = document.createElement('div');
|
300 |
div_filesize.setAttribute('class', "fileDescription");
|
301 |
div_filesize.setAttribute('title', "Image size");
|
302 |
-
div_filesize.setAttribute('id', "filesize" +
|
303 |
div_filesize.innerHTML = files[i]['size'];
|
304 |
td_filename.appendChild(div_filesize);
|
305 |
var div_filetype = document.createElement('div');
|
306 |
div_filetype.setAttribute('class', "fileDescription");
|
307 |
div_filetype.setAttribute('title', "Image type");
|
308 |
-
div_filetype.setAttribute('id', "filetype" +
|
309 |
div_filetype.innerHTML = files[i]['filetype'];
|
310 |
td_filename.appendChild(div_filetype);
|
311 |
var div_edit = document.createElement('div');
|
@@ -315,7 +316,7 @@ class BWGViewGalleries_bwg {
|
|
315 |
div_edit.appendChild(span_edit_crop);
|
316 |
var a_crop = document.createElement('a');
|
317 |
a_crop.setAttribute('class', "thickbox thickbox-preview");
|
318 |
-
a_crop.setAttribute('onclick', "spider_set_href(this, '" +
|
319 |
a_crop.innerHTML = "Crop";
|
320 |
span_edit_crop.appendChild(a_crop);
|
321 |
div_edit.innerHTML += " | ";
|
@@ -324,7 +325,7 @@ class BWGViewGalleries_bwg {
|
|
324 |
div_edit.appendChild(span_edit_rotate);
|
325 |
var a_rotate = document.createElement('a');
|
326 |
a_rotate.setAttribute('class', "thickbox thickbox-preview");
|
327 |
-
a_rotate.setAttribute('onclick', "spider_set_href(this, '" +
|
328 |
a_rotate.innerHTML = "Rotate";
|
329 |
span_edit_rotate.appendChild(a_rotate);
|
330 |
div_edit.innerHTML += " | "
|
@@ -332,48 +333,48 @@ class BWGViewGalleries_bwg {
|
|
332 |
span_edit_recover.setAttribute('class', "edit_thumb");
|
333 |
div_edit.appendChild(span_edit_recover);
|
334 |
var a_recover = document.createElement('a');
|
335 |
-
a_recover.setAttribute('onclick', 'if (confirm("Do you want to reset the image?")) { spider_set_input_value("ajax_task", "recover"); spider_set_input_value("image_current_id", "' +
|
336 |
a_recover.innerHTML = "Reset";
|
337 |
span_edit_recover.appendChild(a_recover);
|
338 |
var input_image_url = document.createElement('input');
|
339 |
-
input_image_url.setAttribute('id', "image_url_" +
|
340 |
-
input_image_url.setAttribute('name', "image_url_" +
|
341 |
input_image_url.setAttribute('type', "hidden");
|
342 |
input_image_url.setAttribute('value', files[i]['url']);
|
343 |
td_filename.appendChild(input_image_url);
|
344 |
var input_thumb_url = document.createElement('input');
|
345 |
-
input_thumb_url.setAttribute('id', "thumb_url_" +
|
346 |
-
input_thumb_url.setAttribute('name', "thumb_url_" +
|
347 |
input_thumb_url.setAttribute('type', "hidden");
|
348 |
input_thumb_url.setAttribute('value', files[i]['thumb_url']);
|
349 |
td_filename.appendChild(input_thumb_url);
|
350 |
var input_filename = document.createElement('input');
|
351 |
-
input_filename.setAttribute('id', "input_filename_" +
|
352 |
-
input_filename.setAttribute('name', "input_filename_" +
|
353 |
input_filename.setAttribute('type', "hidden");
|
354 |
input_filename.setAttribute('value', files[i]['filename']);
|
355 |
td_filename.appendChild(input_filename);
|
356 |
var input_date_modified = document.createElement('input');
|
357 |
-
input_date_modified.setAttribute('id', "input_date_modified_" +
|
358 |
-
input_date_modified.setAttribute('name', "input_date_modified_" +
|
359 |
input_date_modified.setAttribute('type', "hidden");
|
360 |
input_date_modified.setAttribute('value', files[i]['date_modified']);
|
361 |
td_filename.appendChild(input_date_modified);
|
362 |
var input_resolution = document.createElement('input');
|
363 |
-
input_resolution.setAttribute('id', "input_resolution_" +
|
364 |
-
input_resolution.setAttribute('name', "input_resolution_" +
|
365 |
input_resolution.setAttribute('type', "hidden");
|
366 |
input_resolution.setAttribute('value', files[i]['resolution']);
|
367 |
td_filename.appendChild(input_resolution);
|
368 |
var input_size = document.createElement('input');
|
369 |
-
input_size.setAttribute('id', "input_size_" +
|
370 |
-
input_size.setAttribute('name', "input_size_" +
|
371 |
input_size.setAttribute('type', "hidden");
|
372 |
input_size.setAttribute('value', files[i]['size']);
|
373 |
td_filename.appendChild(input_size);
|
374 |
var input_filetype = document.createElement('input');
|
375 |
-
input_filetype.setAttribute('id', "input_filetype_" +
|
376 |
-
input_filetype.setAttribute('name', "input_filetype_" +
|
377 |
input_filetype.setAttribute('type', "hidden");
|
378 |
input_filetype.setAttribute('value', files[i]['filetype']);
|
379 |
td_filename.appendChild(input_filetype);
|
@@ -382,8 +383,8 @@ class BWGViewGalleries_bwg {
|
|
382 |
td_alt.setAttribute('class', "table_extra_large_col");
|
383 |
tr.appendChild(td_alt);
|
384 |
var input_alt = document.createElement('input');
|
385 |
-
input_alt.setAttribute('id', "image_alt_text_" +
|
386 |
-
input_alt.setAttribute('name', "image_alt_text_" +
|
387 |
input_alt.setAttribute('type', "text");
|
388 |
input_alt.setAttribute('size', "24");
|
389 |
input_alt.setAttribute('value', files[i]['filename']);
|
@@ -393,8 +394,8 @@ class BWGViewGalleries_bwg {
|
|
393 |
td_desc.setAttribute('class', "table_extra_large_col");
|
394 |
tr.appendChild(td_desc);
|
395 |
var textarea_desc = document.createElement('textarea');
|
396 |
-
textarea_desc.setAttribute('id', "image_description_" +
|
397 |
-
textarea_desc.setAttribute('name', "image_description_" +
|
398 |
textarea_desc.setAttribute('rows', "2");
|
399 |
textarea_desc.setAttribute('cols', "20");
|
400 |
textarea_desc.setAttribute('style', "resize:vertical;");
|
@@ -405,17 +406,17 @@ class BWGViewGalleries_bwg {
|
|
405 |
tr.appendChild(td_tag);
|
406 |
var a_tag = document.createElement('a');
|
407 |
a_tag.setAttribute('class', "button button-small button-primary thickbox thickbox-preview");
|
408 |
-
a_tag.setAttribute('href', "<?php echo add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500'), admin_url('admin-ajax.php')); ?>&image_id=" +
|
409 |
a_tag.innerHTML = 'Add tag';
|
410 |
td_tag.appendChild(a_tag);
|
411 |
var div_tag = document.createElement('div');
|
412 |
div_tag.setAttribute('class', "tags_div");
|
413 |
-
div_tag.setAttribute('id', "tags_div_" +
|
414 |
td_tag.appendChild(div_tag);
|
415 |
var hidden_tag = document.createElement('input');
|
416 |
hidden_tag.setAttribute('type', "hidden");
|
417 |
-
hidden_tag.setAttribute('id', "tags_" +
|
418 |
-
hidden_tag.setAttribute('name', "tags_" +
|
419 |
hidden_tag.setAttribute('value', "");
|
420 |
td_tag.appendChild(hidden_tag);
|
421 |
// Order TD.
|
@@ -424,8 +425,8 @@ class BWGViewGalleries_bwg {
|
|
424 |
td_order.setAttribute('style', "display: none;");
|
425 |
tr.appendChild(td_order);
|
426 |
var input_order = document.createElement('input');
|
427 |
-
input_order.setAttribute('id', "order_input_" +
|
428 |
-
input_order.setAttribute('name', "order_input_" +
|
429 |
input_order.setAttribute('type', "text");
|
430 |
input_order.setAttribute('value', 0 - j_int);
|
431 |
input_order.setAttribute('size', "1");
|
@@ -435,7 +436,7 @@ class BWGViewGalleries_bwg {
|
|
435 |
td_publish.setAttribute('class', "table_big_col");
|
436 |
tr.appendChild(td_publish);
|
437 |
var a_publish = document.createElement('a');
|
438 |
-
a_publish.setAttribute('onclick', "spider_set_input_value('ajax_task', 'image_unpublish');spider_set_input_value('image_current_id', '" +
|
439 |
td_publish.appendChild(a_publish);
|
440 |
var img_publish = document.createElement('img');
|
441 |
img_publish.setAttribute('src', "<?php echo WD_BWG_URL . '/images/publish.png'; ?>");
|
@@ -445,12 +446,12 @@ class BWGViewGalleries_bwg {
|
|
445 |
td_delete.setAttribute('class', "table_big_col");
|
446 |
tr.appendChild(td_delete);
|
447 |
var a_delete = document.createElement('a');
|
448 |
-
a_delete.setAttribute('onclick', "spider_set_input_value('ajax_task', 'image_delete');spider_set_input_value('image_current_id', '" +
|
449 |
a_delete.innerHTML = 'Delete';
|
450 |
td_delete.appendChild(a_delete);
|
451 |
-
document.getElementById("ids_string").value +=
|
452 |
j_int++;
|
453 |
-
|
454 |
}
|
455 |
jQuery("#show_hide_weights").val("Hide order column");
|
456 |
spider_show_hide_weights();
|
@@ -460,12 +461,15 @@ class BWGViewGalleries_bwg {
|
|
460 |
<span class="gallery-icon"></span>
|
461 |
<h2><?php echo $page_title; ?></h2>
|
462 |
<div style="float:right;">
|
463 |
-
<input class="button" type="
|
464 |
spider_set_input_value('page_number', '1');
|
|
|
|
|
465 |
spider_set_input_value('task', 'save')" value="Save" />
|
466 |
-
<input class="button" type="
|
467 |
-
spider_set_input_value('
|
468 |
-
|
|
|
469 |
spider_set_input_value('task', 'cancel')" value="Cancel" />
|
470 |
</div>
|
471 |
<table style="clear:both;">
|
@@ -529,14 +533,6 @@ class BWGViewGalleries_bwg {
|
|
529 |
onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')"></span>
|
530 |
</td>
|
531 |
</tr>
|
532 |
-
<!--<tr>
|
533 |
-
<td class="spider_label"><label for="content-add_media">Images: </label></td>
|
534 |
-
<td>
|
535 |
-
<a href="<?php echo add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_image', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" class="button-primary thickbox thickbox-preview" id="content-add_media" title="Add Images" onclick="return false;" style="margin-bottom:5px;">
|
536 |
-
Add Images
|
537 |
-
</a>
|
538 |
-
</td>
|
539 |
-
</tr>-->
|
540 |
<tr>
|
541 |
<td colspan=2>
|
542 |
<?php
|
@@ -557,6 +553,10 @@ class BWGViewGalleries_bwg {
|
|
557 |
}
|
558 |
?>
|
559 |
</script>
|
|
|
|
|
|
|
|
|
560 |
</form>
|
561 |
<?php
|
562 |
}
|
@@ -577,27 +577,24 @@ class BWGViewGalleries_bwg {
|
|
577 |
Add Images
|
578 |
</a>
|
579 |
<div class="buttons_div">
|
580 |
-
<span class="button non_selectable" onclick="spider_check_all_items()">
|
581 |
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
|
582 |
<span style="vertical-align: middle;">Select All</span>
|
583 |
</span>
|
584 |
-
<input id="show_hide_weights" class="button" type="button" onclick="spider_show_hide_weights();return false;" value="Hide order column" />
|
585 |
<input class="button-primary" type="submit" onclick="spider_set_input_value('ajax_task', 'image_set_watermark');
|
586 |
spider_ajax_save('galleries_form');
|
587 |
return false;" value="Set Watermark" />
|
588 |
-
<input class="button" type="submit" onclick="spider_set_input_value('ajax_task', 'image_recover_all');
|
589 |
spider_ajax_save('galleries_form');
|
590 |
return false;" value="Reset" />
|
591 |
-
|
592 |
-
spider_ajax_save('galleries_form');
|
593 |
-
return false;" value="Save Images" />-->
|
594 |
-
<input class="button" type="submit" onclick="spider_set_input_value('ajax_task', 'image_publish_all');
|
595 |
spider_ajax_save('galleries_form');
|
596 |
return false;" value="Publish" />
|
597 |
-
<input class="button" type="submit" onclick="spider_set_input_value('ajax_task', 'image_unpublish_all');
|
598 |
spider_ajax_save('galleries_form');
|
599 |
return false;" value="Unpublish" />
|
600 |
-
<input class="button" type="submit" onclick="if (confirm('Do you want to delete selected items?')) {
|
601 |
spider_set_input_value('ajax_task', 'image_delete_all');
|
602 |
spider_ajax_save('galleries_form');
|
603 |
return false;
|
@@ -611,10 +608,7 @@ class BWGViewGalleries_bwg {
|
|
611 |
WDWLibrary::ajax_html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form');
|
612 |
?>
|
613 |
</div>
|
614 |
-
|
615 |
-
<div id="loading_div" style="display:none; text-align:center; position:absolute;">
|
616 |
-
<img src="<?php echo WD_BWG_URL . '/images/ajax_loader.png'; ?>" class="spider_ajax_loading" style="margin-top:60px; width:50px;">
|
617 |
-
</div>
|
618 |
<table id="images_table" class="wp-list-table widefat fixed pages">
|
619 |
<thead>
|
620 |
<th class="check-column table_small_col"></th>
|
54 |
</h2>
|
55 |
<div id="draganddrop" class="updated" style="display:none;"><strong><p>Changes made in this table shoud be saved.</p></strong></div>
|
56 |
<div class="buttons_div">
|
57 |
+
<span class="button-secondary non_selectable" onclick="spider_check_all_items()">
|
58 |
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
|
59 |
<span style="vertical-align: middle;">Select All</span>
|
60 |
</span>
|
61 |
+
<input id="show_hide_weights" class="button-secondary" type="button" onclick="spider_show_hide_weights();return false;" value="Hide order column" />
|
62 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'save_order')" value="Save Order" />
|
63 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'publish_all')" value="Publish" />
|
64 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'unpublish_all')" value="Unpublish" />
|
65 |
+
<input class="button-secondary" type="submit" onclick="if (confirm('Do you want to delete selected items?')) {
|
66 |
spider_set_input_value('task', 'delete_all');
|
67 |
} else {
|
68 |
return false;
|
191 |
$page_title = (($id != 0) ? 'Edit gallery ' . $row->name : 'Create new gallery');
|
192 |
?>
|
193 |
<div style="clear: both; float: left; width: 95%;">
|
194 |
+
<div id="message_div" class="updated" style="display: none;"></div>
|
195 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
196 |
This section allows you to add/edit gallery.
|
197 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-2.html">Read More in User Manual</a>
|
219 |
}
|
220 |
}
|
221 |
var j_int = 0;
|
222 |
+
var bwg_j = 'pr_' + j_int;
|
223 |
function bwg_add_image(files) {
|
224 |
var tbody = document.getElementById('tbody_arr');
|
225 |
for (var i in files) {
|
226 |
var tr = document.createElement('tr');
|
227 |
+
tr.setAttribute('id', "tr_" + bwg_j);
|
228 |
if (tbody.firstChild) {
|
229 |
tbody.insertBefore(tr, tbody.firstChild);
|
230 |
}
|
246 |
td_checkbox.setAttribute('onclick', "spider_check_all(this)");
|
247 |
tr.appendChild(td_checkbox);
|
248 |
var input_checkbox = document.createElement('input');
|
249 |
+
input_checkbox.setAttribute('id', "check_" + bwg_j);
|
250 |
+
input_checkbox.setAttribute('name', "check_" + bwg_j);
|
251 |
input_checkbox.setAttribute('type', "checkbox");
|
252 |
td_checkbox.appendChild(input_checkbox);
|
253 |
// Numbering TD.
|
261 |
tr.appendChild(td_thumb);
|
262 |
var a_thumb = document.createElement('a');
|
263 |
a_thumb.setAttribute('class', "thickbox thickbox-preview");
|
264 |
+
a_thumb.setAttribute('href', "<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display'/*thumb_display*/, 'width' => '650', 'height' => '500'), admin_url('admin-ajax.php')); ?>&image_id=" + bwg_j + "&TB_iframe=1");
|
265 |
a_thumb.setAttribute('title', files[i]['name']);
|
266 |
td_thumb.appendChild(a_thumb);
|
267 |
var img_thumb = document.createElement('img');
|
268 |
+
img_thumb.setAttribute('id', "image_thumb_" + bwg_j);
|
269 |
img_thumb.setAttribute('class', "thumb");
|
270 |
img_thumb.setAttribute('src', files[i]['thumb']);
|
271 |
a_thumb.appendChild(img_thumb);
|
275 |
tr.appendChild(td_filename);
|
276 |
var div_filename = document.createElement('div');
|
277 |
div_filename.setAttribute('class', "filename");
|
278 |
+
div_filename.setAttribute('id', "filename_" + bwg_j);
|
279 |
td_filename.appendChild(div_filename);
|
280 |
var strong_filename = document.createElement('strong');
|
281 |
div_filename.appendChild(strong_filename);
|
282 |
var a_filename = document.createElement('a');
|
283 |
+
a_filename.setAttribute('href', "<?php echo add_query_arg(array('action' => 'editThumb', 'type' => 'display', 'width' => '800', 'height' => '500'), admin_url('admin-ajax.php')); ?>&image_id=" + bwg_j + "&TB_iframe=1");
|
284 |
a_filename.setAttribute('class', "spider_word_wrap thickbox thickbox-preview");
|
285 |
a_filename.setAttribute('title', files[i]['filename']);
|
286 |
a_filename.innerHTML = files[i]['filename'];
|
288 |
var div_date_modified = document.createElement('div');
|
289 |
div_date_modified.setAttribute('class', "fileDescription");
|
290 |
div_date_modified.setAttribute('title', "Date modified");
|
291 |
+
div_date_modified.setAttribute('id', "date_modified_" + bwg_j);
|
292 |
div_date_modified.innerHTML = files[i]['date_modified'];
|
293 |
td_filename.appendChild(div_date_modified);
|
294 |
var div_fileresolution = document.createElement('div');
|
295 |
div_fileresolution.setAttribute('class', "fileDescription");
|
296 |
div_fileresolution.setAttribute('title', "Image Resolution");
|
297 |
+
div_fileresolution.setAttribute('id', "fileresolution" + bwg_j);
|
298 |
div_fileresolution.innerHTML = files[i]['resolution'];
|
299 |
td_filename.appendChild(div_fileresolution);
|
300 |
var div_filesize = document.createElement('div');
|
301 |
div_filesize.setAttribute('class', "fileDescription");
|
302 |
div_filesize.setAttribute('title', "Image size");
|
303 |
+
div_filesize.setAttribute('id', "filesize" + bwg_j);
|
304 |
div_filesize.innerHTML = files[i]['size'];
|
305 |
td_filename.appendChild(div_filesize);
|
306 |
var div_filetype = document.createElement('div');
|
307 |
div_filetype.setAttribute('class', "fileDescription");
|
308 |
div_filetype.setAttribute('title', "Image type");
|
309 |
+
div_filetype.setAttribute('id', "filetype" + bwg_j);
|
310 |
div_filetype.innerHTML = files[i]['filetype'];
|
311 |
td_filename.appendChild(div_filetype);
|
312 |
var div_edit = document.createElement('div');
|
316 |
div_edit.appendChild(span_edit_crop);
|
317 |
var a_crop = document.createElement('a');
|
318 |
a_crop.setAttribute('class', "thickbox thickbox-preview");
|
319 |
+
a_crop.setAttribute('onclick', "spider_set_href(this, '" + bwg_j + "', 'crop');");
|
320 |
a_crop.innerHTML = "Crop";
|
321 |
span_edit_crop.appendChild(a_crop);
|
322 |
div_edit.innerHTML += " | ";
|
325 |
div_edit.appendChild(span_edit_rotate);
|
326 |
var a_rotate = document.createElement('a');
|
327 |
a_rotate.setAttribute('class', "thickbox thickbox-preview");
|
328 |
+
a_rotate.setAttribute('onclick', "spider_set_href(this, '" + bwg_j + "', 'rotate');");
|
329 |
a_rotate.innerHTML = "Rotate";
|
330 |
span_edit_rotate.appendChild(a_rotate);
|
331 |
div_edit.innerHTML += " | "
|
333 |
span_edit_recover.setAttribute('class', "edit_thumb");
|
334 |
div_edit.appendChild(span_edit_recover);
|
335 |
var a_recover = document.createElement('a');
|
336 |
+
a_recover.setAttribute('onclick', 'if (confirm("Do you want to reset the image?")) { spider_set_input_value("ajax_task", "recover"); spider_set_input_value("image_current_id", "' + bwg_j + '"); spider_ajax_save("galleries_form");} return false;');
|
337 |
a_recover.innerHTML = "Reset";
|
338 |
span_edit_recover.appendChild(a_recover);
|
339 |
var input_image_url = document.createElement('input');
|
340 |
+
input_image_url.setAttribute('id', "image_url_" + bwg_j);
|
341 |
+
input_image_url.setAttribute('name', "image_url_" + bwg_j);
|
342 |
input_image_url.setAttribute('type', "hidden");
|
343 |
input_image_url.setAttribute('value', files[i]['url']);
|
344 |
td_filename.appendChild(input_image_url);
|
345 |
var input_thumb_url = document.createElement('input');
|
346 |
+
input_thumb_url.setAttribute('id', "thumb_url_" + bwg_j);
|
347 |
+
input_thumb_url.setAttribute('name', "thumb_url_" + bwg_j);
|
348 |
input_thumb_url.setAttribute('type', "hidden");
|
349 |
input_thumb_url.setAttribute('value', files[i]['thumb_url']);
|
350 |
td_filename.appendChild(input_thumb_url);
|
351 |
var input_filename = document.createElement('input');
|
352 |
+
input_filename.setAttribute('id', "input_filename_" + bwg_j);
|
353 |
+
input_filename.setAttribute('name', "input_filename_" + bwg_j);
|
354 |
input_filename.setAttribute('type', "hidden");
|
355 |
input_filename.setAttribute('value', files[i]['filename']);
|
356 |
td_filename.appendChild(input_filename);
|
357 |
var input_date_modified = document.createElement('input');
|
358 |
+
input_date_modified.setAttribute('id', "input_date_modified_" + bwg_j);
|
359 |
+
input_date_modified.setAttribute('name', "input_date_modified_" + bwg_j);
|
360 |
input_date_modified.setAttribute('type', "hidden");
|
361 |
input_date_modified.setAttribute('value', files[i]['date_modified']);
|
362 |
td_filename.appendChild(input_date_modified);
|
363 |
var input_resolution = document.createElement('input');
|
364 |
+
input_resolution.setAttribute('id', "input_resolution_" + bwg_j);
|
365 |
+
input_resolution.setAttribute('name', "input_resolution_" + bwg_j);
|
366 |
input_resolution.setAttribute('type', "hidden");
|
367 |
input_resolution.setAttribute('value', files[i]['resolution']);
|
368 |
td_filename.appendChild(input_resolution);
|
369 |
var input_size = document.createElement('input');
|
370 |
+
input_size.setAttribute('id', "input_size_" + bwg_j);
|
371 |
+
input_size.setAttribute('name', "input_size_" + bwg_j);
|
372 |
input_size.setAttribute('type', "hidden");
|
373 |
input_size.setAttribute('value', files[i]['size']);
|
374 |
td_filename.appendChild(input_size);
|
375 |
var input_filetype = document.createElement('input');
|
376 |
+
input_filetype.setAttribute('id', "input_filetype_" + bwg_j);
|
377 |
+
input_filetype.setAttribute('name', "input_filetype_" + bwg_j);
|
378 |
input_filetype.setAttribute('type', "hidden");
|
379 |
input_filetype.setAttribute('value', files[i]['filetype']);
|
380 |
td_filename.appendChild(input_filetype);
|
383 |
td_alt.setAttribute('class', "table_extra_large_col");
|
384 |
tr.appendChild(td_alt);
|
385 |
var input_alt = document.createElement('input');
|
386 |
+
input_alt.setAttribute('id', "image_alt_text_" + bwg_j);
|
387 |
+
input_alt.setAttribute('name', "image_alt_text_" + bwg_j);
|
388 |
input_alt.setAttribute('type', "text");
|
389 |
input_alt.setAttribute('size', "24");
|
390 |
input_alt.setAttribute('value', files[i]['filename']);
|
394 |
td_desc.setAttribute('class', "table_extra_large_col");
|
395 |
tr.appendChild(td_desc);
|
396 |
var textarea_desc = document.createElement('textarea');
|
397 |
+
textarea_desc.setAttribute('id', "image_description_" + bwg_j);
|
398 |
+
textarea_desc.setAttribute('name', "image_description_" + bwg_j);
|
399 |
textarea_desc.setAttribute('rows', "2");
|
400 |
textarea_desc.setAttribute('cols', "20");
|
401 |
textarea_desc.setAttribute('style', "resize:vertical;");
|
406 |
tr.appendChild(td_tag);
|
407 |
var a_tag = document.createElement('a');
|
408 |
a_tag.setAttribute('class', "button button-small button-primary thickbox thickbox-preview");
|
409 |
+
a_tag.setAttribute('href', "<?php echo add_query_arg(array('action' => 'addTags', 'width' => '650', 'height' => '500'), admin_url('admin-ajax.php')); ?>&image_id=" + bwg_j + "&TB_iframe=1");
|
410 |
a_tag.innerHTML = 'Add tag';
|
411 |
td_tag.appendChild(a_tag);
|
412 |
var div_tag = document.createElement('div');
|
413 |
div_tag.setAttribute('class', "tags_div");
|
414 |
+
div_tag.setAttribute('id', "tags_div_" + bwg_j);
|
415 |
td_tag.appendChild(div_tag);
|
416 |
var hidden_tag = document.createElement('input');
|
417 |
hidden_tag.setAttribute('type', "hidden");
|
418 |
+
hidden_tag.setAttribute('id', "tags_" + bwg_j);
|
419 |
+
hidden_tag.setAttribute('name', "tags_" + bwg_j);
|
420 |
hidden_tag.setAttribute('value', "");
|
421 |
td_tag.appendChild(hidden_tag);
|
422 |
// Order TD.
|
425 |
td_order.setAttribute('style', "display: none;");
|
426 |
tr.appendChild(td_order);
|
427 |
var input_order = document.createElement('input');
|
428 |
+
input_order.setAttribute('id', "order_input_" + bwg_j);
|
429 |
+
input_order.setAttribute('name', "order_input_" + bwg_j);
|
430 |
input_order.setAttribute('type', "text");
|
431 |
input_order.setAttribute('value', 0 - j_int);
|
432 |
input_order.setAttribute('size', "1");
|
436 |
td_publish.setAttribute('class', "table_big_col");
|
437 |
tr.appendChild(td_publish);
|
438 |
var a_publish = document.createElement('a');
|
439 |
+
a_publish.setAttribute('onclick', "spider_set_input_value('ajax_task', 'image_unpublish');spider_set_input_value('image_current_id', '" + bwg_j + "');spider_ajax_save('galleries_form');");
|
440 |
td_publish.appendChild(a_publish);
|
441 |
var img_publish = document.createElement('img');
|
442 |
img_publish.setAttribute('src', "<?php echo WD_BWG_URL . '/images/publish.png'; ?>");
|
446 |
td_delete.setAttribute('class', "table_big_col");
|
447 |
tr.appendChild(td_delete);
|
448 |
var a_delete = document.createElement('a');
|
449 |
+
a_delete.setAttribute('onclick', "spider_set_input_value('ajax_task', 'image_delete');spider_set_input_value('image_current_id', '" + bwg_j + "');spider_ajax_save('galleries_form');");
|
450 |
a_delete.innerHTML = 'Delete';
|
451 |
td_delete.appendChild(a_delete);
|
452 |
+
document.getElementById("ids_string").value += bwg_j + ',';
|
453 |
j_int++;
|
454 |
+
bwg_j = 'pr_' + j_int;
|
455 |
}
|
456 |
jQuery("#show_hide_weights").val("Hide order column");
|
457 |
spider_show_hide_weights();
|
461 |
<span class="gallery-icon"></span>
|
462 |
<h2><?php echo $page_title; ?></h2>
|
463 |
<div style="float:right;">
|
464 |
+
<input class="button-secondary" type="button" onclick="if (spider_check_required('name', 'Name')) {return false;};
|
465 |
spider_set_input_value('page_number', '1');
|
466 |
+
spider_set_input_value('ajax_task', 'ajax_save');
|
467 |
+
spider_ajax_save('galleries_form');
|
468 |
spider_set_input_value('task', 'save')" value="Save" />
|
469 |
+
<input class="button-secondary" type="button" onclick="if (spider_check_required('name', 'Name')) {return false;};
|
470 |
+
spider_set_input_value('ajax_task', 'ajax_apply');
|
471 |
+
spider_ajax_save('galleries_form')" value="Apply" />
|
472 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('page_number', '1');
|
473 |
spider_set_input_value('task', 'cancel')" value="Cancel" />
|
474 |
</div>
|
475 |
<table style="clear:both;">
|
533 |
onclick="spider_remove_url('button_preview_image', 'preview_image', 'delete_preview_image', 'img_preview_image')"></span>
|
534 |
</td>
|
535 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
536 |
<tr>
|
537 |
<td colspan=2>
|
538 |
<?php
|
553 |
}
|
554 |
?>
|
555 |
</script>
|
556 |
+
<div id="opacity_div" style="display: none; background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
|
557 |
+
<div id="loading_div" style="display:none; text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
|
558 |
+
<img src="<?php echo WD_BWG_URL . '/images/ajax_loader.png'; ?>" class="spider_ajax_loading" style="margin-top: 200px; width:50px;">
|
559 |
+
</div>
|
560 |
</form>
|
561 |
<?php
|
562 |
}
|
577 |
Add Images
|
578 |
</a>
|
579 |
<div class="buttons_div">
|
580 |
+
<span class="button-secondary non_selectable" onclick="spider_check_all_items()">
|
581 |
<input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
|
582 |
<span style="vertical-align: middle;">Select All</span>
|
583 |
</span>
|
584 |
+
<input id="show_hide_weights" class="button-secondary" type="button" onclick="spider_show_hide_weights();return false;" value="Hide order column" />
|
585 |
<input class="button-primary" type="submit" onclick="spider_set_input_value('ajax_task', 'image_set_watermark');
|
586 |
spider_ajax_save('galleries_form');
|
587 |
return false;" value="Set Watermark" />
|
588 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('ajax_task', 'image_recover_all');
|
589 |
spider_ajax_save('galleries_form');
|
590 |
return false;" value="Reset" />
|
591 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('ajax_task', 'image_publish_all');
|
|
|
|
|
|
|
592 |
spider_ajax_save('galleries_form');
|
593 |
return false;" value="Publish" />
|
594 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('ajax_task', 'image_unpublish_all');
|
595 |
spider_ajax_save('galleries_form');
|
596 |
return false;" value="Unpublish" />
|
597 |
+
<input class="button-secondary" type="submit" onclick="if (confirm('Do you want to delete selected items?')) {
|
598 |
spider_set_input_value('ajax_task', 'image_delete_all');
|
599 |
spider_ajax_save('galleries_form');
|
600 |
return false;
|
608 |
WDWLibrary::ajax_html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form');
|
609 |
?>
|
610 |
</div>
|
611 |
+
|
|
|
|
|
|
|
612 |
<table id="images_table" class="wp-list-table widefat fixed pages">
|
613 |
<thead>
|
614 |
<th class="check-column table_small_col"></th>
|
admin/views/BWGViewLicensing_bwg.php
CHANGED
@@ -55,70 +55,70 @@ class BWGViewLicensing_bwg {
|
|
55 |
<td class="icon-replace yes">yes</td>
|
56 |
</tr>
|
57 |
<tr class="alt">
|
58 |
-
<td>Default Theme + Possibility of Creating New Themes</td>
|
59 |
-
<td class="icon-replace yes">yes</td>
|
60 |
-
<td class="icon-replace yes">yes</td>
|
61 |
-
</tr>
|
62 |
-
<tr>
|
63 |
<td>Watermarking Possibility</td>
|
64 |
<td class="icon-replace yes">yes</td>
|
65 |
<td class="icon-replace yes">yes</td>
|
66 |
</tr>
|
67 |
-
<tr
|
68 |
<td>Advertising Possibility</td>
|
69 |
<td class="icon-replace yes">yes</td>
|
70 |
<td class="icon-replace yes">yes</td>
|
71 |
</tr>
|
72 |
-
<tr>
|
73 |
<td>Image Download</td>
|
74 |
<td class="icon-replace yes">yes</td>
|
75 |
<td class="icon-replace yes">yes</td>
|
76 |
</tr>
|
77 |
-
<tr
|
78 |
<td>Standard Thumbnails View</td>
|
79 |
<td class="icon-replace yes">yes</td>
|
80 |
<td class="icon-replace yes">yes</td>
|
81 |
</tr>
|
82 |
-
<tr>
|
83 |
<td>Standard Slideshow View</td>
|
84 |
<td class="icon-replace yes">yes</td>
|
85 |
<td class="icon-replace yes">yes</td>
|
86 |
</tr>
|
87 |
-
<tr
|
88 |
<td>Standard Image Browser View</td>
|
89 |
<td class="icon-replace yes">yes</td>
|
90 |
<td class="icon-replace yes">yes</td>
|
91 |
</tr>
|
92 |
-
<tr>
|
93 |
<td>Standard Compact Album</td>
|
94 |
<td class="icon-replace yes">yes</td>
|
95 |
<td class="icon-replace yes">yes</td>
|
96 |
</tr>
|
97 |
-
<tr
|
98 |
<td>Standard Extended Album</td>
|
99 |
<td class="icon-replace yes">yes</td>
|
100 |
<td class="icon-replace yes">yes</td>
|
101 |
</tr>
|
102 |
-
<tr>
|
103 |
<td>Basic Tag Cloud Widget</td>
|
104 |
<td class="icon-replace yes">yes</td>
|
105 |
<td class="icon-replace yes">yes</td>
|
106 |
</tr>
|
107 |
-
<tr
|
108 |
<td>Photo Gallery Slideshow Widget</td>
|
109 |
<td class="icon-replace yes">yes</td>
|
110 |
<td class="icon-replace yes">yes</td>
|
111 |
</tr>
|
112 |
-
<tr>
|
113 |
<td>Photo Gallery Widget</td>
|
114 |
<td class="icon-replace yes">yes</td>
|
115 |
<td class="icon-replace yes">yes</td>
|
116 |
</tr>
|
117 |
-
<tr
|
118 |
<td>Slideshow/Lightbox Effects</td>
|
119 |
-
<td style="text-align:center;">
|
120 |
<td style="text-align:center;">15</td>
|
121 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
122 |
<tr>
|
123 |
<td>Standard Masonry View </td>
|
124 |
<td class="icon-replace no">no</td>
|
55 |
<td class="icon-replace yes">yes</td>
|
56 |
</tr>
|
57 |
<tr class="alt">
|
|
|
|
|
|
|
|
|
|
|
58 |
<td>Watermarking Possibility</td>
|
59 |
<td class="icon-replace yes">yes</td>
|
60 |
<td class="icon-replace yes">yes</td>
|
61 |
</tr>
|
62 |
+
<tr>
|
63 |
<td>Advertising Possibility</td>
|
64 |
<td class="icon-replace yes">yes</td>
|
65 |
<td class="icon-replace yes">yes</td>
|
66 |
</tr>
|
67 |
+
<tr class="alt">
|
68 |
<td>Image Download</td>
|
69 |
<td class="icon-replace yes">yes</td>
|
70 |
<td class="icon-replace yes">yes</td>
|
71 |
</tr>
|
72 |
+
<tr>
|
73 |
<td>Standard Thumbnails View</td>
|
74 |
<td class="icon-replace yes">yes</td>
|
75 |
<td class="icon-replace yes">yes</td>
|
76 |
</tr>
|
77 |
+
<tr class="alt">
|
78 |
<td>Standard Slideshow View</td>
|
79 |
<td class="icon-replace yes">yes</td>
|
80 |
<td class="icon-replace yes">yes</td>
|
81 |
</tr>
|
82 |
+
<tr>
|
83 |
<td>Standard Image Browser View</td>
|
84 |
<td class="icon-replace yes">yes</td>
|
85 |
<td class="icon-replace yes">yes</td>
|
86 |
</tr>
|
87 |
+
<tr class="alt">
|
88 |
<td>Standard Compact Album</td>
|
89 |
<td class="icon-replace yes">yes</td>
|
90 |
<td class="icon-replace yes">yes</td>
|
91 |
</tr>
|
92 |
+
<tr>
|
93 |
<td>Standard Extended Album</td>
|
94 |
<td class="icon-replace yes">yes</td>
|
95 |
<td class="icon-replace yes">yes</td>
|
96 |
</tr>
|
97 |
+
<tr class="alt">
|
98 |
<td>Basic Tag Cloud Widget</td>
|
99 |
<td class="icon-replace yes">yes</td>
|
100 |
<td class="icon-replace yes">yes</td>
|
101 |
</tr>
|
102 |
+
<tr>
|
103 |
<td>Photo Gallery Slideshow Widget</td>
|
104 |
<td class="icon-replace yes">yes</td>
|
105 |
<td class="icon-replace yes">yes</td>
|
106 |
</tr>
|
107 |
+
<tr class="alt">
|
108 |
<td>Photo Gallery Widget</td>
|
109 |
<td class="icon-replace yes">yes</td>
|
110 |
<td class="icon-replace yes">yes</td>
|
111 |
</tr>
|
112 |
+
<tr>
|
113 |
<td>Slideshow/Lightbox Effects</td>
|
114 |
+
<td style="text-align:center;">1</td>
|
115 |
<td style="text-align:center;">15</td>
|
116 |
</tr>
|
117 |
+
<tr class="alt">
|
118 |
+
<td>Possibility of Editing/Creating Themes</td>
|
119 |
+
<td class="icon-replace no">no</td>
|
120 |
+
<td class="icon-replace yes">yes</td>
|
121 |
+
</tr>
|
122 |
<tr>
|
123 |
<td>Standard Masonry View </td>
|
124 |
<td class="icon-replace no">no</td>
|
admin/views/BWGViewOptions_bwg.php
CHANGED
@@ -92,7 +92,7 @@ class BWGViewOptions_bwg {
|
|
92 |
<div style="display: inline-block; width: 100%;">
|
93 |
<div style="float: right;">
|
94 |
<input class="button-primary" type="submit" onclick="if (spider_check_required('title', 'Title')) {return false;}; spider_set_input_value('task', 'save')" value="Save" />
|
95 |
-
<input class="button" type="submit" onclick="if (confirm('Do you want to reset to default?')) {
|
96 |
spider_set_input_value('task', 'reset');
|
97 |
} else {
|
98 |
return false;
|
92 |
<div style="display: inline-block; width: 100%;">
|
93 |
<div style="float: right;">
|
94 |
<input class="button-primary" type="submit" onclick="if (spider_check_required('title', 'Title')) {return false;}; spider_set_input_value('task', 'save')" value="Save" />
|
95 |
+
<input class="button-secondary" type="submit" onclick="if (confirm('Do you want to reset to default?')) {
|
96 |
spider_set_input_value('task', 'reset');
|
97 |
} else {
|
98 |
return false;
|
admin/views/BWGViewTags_bwg.php
CHANGED
@@ -51,12 +51,12 @@ class BWGViewTags_bwg {
|
|
51 |
<span class="tag_icon"></span>
|
52 |
<h2>Tags</h2>
|
53 |
<div class="buttons_div">
|
54 |
-
<input class="button" type="submit" value="Save" onclick="if (confirm('Do you want to edit items?')){
|
55 |
spider_set_input_value('task', 'edit_tags');
|
56 |
} else {
|
57 |
return false;
|
58 |
}" />
|
59 |
-
<input class="button" type="submit" value="Delete" onclick="if (confirm('Do you want to delete selected items?')) {
|
60 |
spider_set_input_value('task', 'delete_all');
|
61 |
} else {
|
62 |
return false;
|
51 |
<span class="tag_icon"></span>
|
52 |
<h2>Tags</h2>
|
53 |
<div class="buttons_div">
|
54 |
+
<input class="button-secondary" type="submit" value="Save" onclick="if (confirm('Do you want to edit items?')){
|
55 |
spider_set_input_value('task', 'edit_tags');
|
56 |
} else {
|
57 |
return false;
|
58 |
}" />
|
59 |
+
<input class="button-secondary" type="submit" value="Delete" onclick="if (confirm('Do you want to delete selected items?')) {
|
60 |
spider_set_input_value('task', 'delete_all');
|
61 |
} else {
|
62 |
return false;
|
admin/views/BWGViewThemes_bwg.php
CHANGED
@@ -36,6 +36,14 @@ class BWGViewThemes_bwg {
|
|
36 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
37 |
This section allows you to create, edit and delete themes.
|
38 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-6/6-1.html">Read More in User Manual</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
</div>
|
40 |
<div style="float: right; text-align: right;">
|
41 |
<a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
|
@@ -44,6 +52,24 @@ class BWGViewThemes_bwg {
|
|
44 |
</a>
|
45 |
</div>
|
46 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
<form class="wrap" id="themes_form" method="post" action="admin.php?page=themes_bwg" style="float: left; width: 95%;">
|
48 |
<span class="theme_icon"></span>
|
49 |
<h2>
|
@@ -52,7 +78,7 @@ class BWGViewThemes_bwg {
|
|
52 |
spider_form_submit(event, 'themes_form')">Add new</a>
|
53 |
</h2>
|
54 |
<div class="buttons_div">
|
55 |
-
<input class="button" type="submit" onclick="if (confirm('Do you want to delete selected items?')) {
|
56 |
spider_set_input_value('task', 'delete_all');
|
57 |
} else {
|
58 |
return false;
|
@@ -220,9 +246,9 @@ class BWGViewThemes_bwg {
|
|
220 |
<span class="theme_icon"></span>
|
221 |
<h2><?php echo $page_title; ?></h2>
|
222 |
<div style="float: right; margin: 0 5px 0 0;">
|
223 |
-
<input class="button" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'save')" value="Save"/>
|
224 |
-
<input class="button" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'apply')" value="Apply"/>
|
225 |
-
<input class="button" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="Cancel"/>
|
226 |
<input title="Reset to default theme" class="button-primary" type="submit" onclick="if (confirm('Do you want to reset to default?')) {
|
227 |
spider_set_input_value('task', 'reset');
|
228 |
} else {
|
36 |
<div style="float:left; font-size: 14px; font-weight: bold;">
|
37 |
This section allows you to create, edit and delete themes.
|
38 |
<a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-6/6-1.html">Read More in User Manual</a>
|
39 |
+
<?php
|
40 |
+
if (get_option("wd_bwg_theme_version")) {
|
41 |
+
?>
|
42 |
+
<br />
|
43 |
+
This feature is disabled for the non-commercial version.
|
44 |
+
<?php
|
45 |
+
}
|
46 |
+
?>
|
47 |
</div>
|
48 |
<div style="float: right; text-align: right;">
|
49 |
<a style="color: red; text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
|
52 |
</a>
|
53 |
</div>
|
54 |
</div>
|
55 |
+
<?php
|
56 |
+
if (get_option("wd_bwg_theme_version")) {
|
57 |
+
?>
|
58 |
+
<div style="clear: both; float: left; width: 97%;">
|
59 |
+
<img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_thumbnails.png'; ?>" />
|
60 |
+
<img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_masonry.png'; ?>" />
|
61 |
+
<img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_slideshow.png'; ?>" />
|
62 |
+
<img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_image_browser.png'; ?>" />
|
63 |
+
<img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_compact_album.png'; ?>" />
|
64 |
+
<img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_extended_album.png'; ?>" />
|
65 |
+
<img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_blog_style.png'; ?>" />
|
66 |
+
<img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_lightbox.png'; ?>" />
|
67 |
+
<img style="max-width: 100%;" src="<?php echo WD_BWG_URL . '/images/theme_page_navigation.png'; ?>" />
|
68 |
+
</div>
|
69 |
+
<?php
|
70 |
+
die();
|
71 |
+
}
|
72 |
+
?>
|
73 |
<form class="wrap" id="themes_form" method="post" action="admin.php?page=themes_bwg" style="float: left; width: 95%;">
|
74 |
<span class="theme_icon"></span>
|
75 |
<h2>
|
78 |
spider_form_submit(event, 'themes_form')">Add new</a>
|
79 |
</h2>
|
80 |
<div class="buttons_div">
|
81 |
+
<input class="button-secondary" type="submit" onclick="if (confirm('Do you want to delete selected items?')) {
|
82 |
spider_set_input_value('task', 'delete_all');
|
83 |
} else {
|
84 |
return false;
|
246 |
<span class="theme_icon"></span>
|
247 |
<h2><?php echo $page_title; ?></h2>
|
248 |
<div style="float: right; margin: 0 5px 0 0;">
|
249 |
+
<input class="button-secondary" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'save')" value="Save"/>
|
250 |
+
<input class="button-secondary" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'apply')" value="Apply"/>
|
251 |
+
<input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="Cancel"/>
|
252 |
<input title="Reset to default theme" class="button-primary" type="submit" onclick="if (confirm('Do you want to reset to default?')) {
|
253 |
spider_set_input_value('task', 'reset');
|
254 |
} else {
|
admin/views/BWGViewUninstall_bwg.php
CHANGED
@@ -61,6 +61,14 @@ class BWGViewUninstall_bwg {
|
|
61 |
</ol>
|
62 |
</td>
|
63 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
</table>
|
65 |
<p style="text-align: center;">
|
66 |
Do you really want to uninstall Photo Gallery?
|
@@ -70,15 +78,15 @@ class BWGViewUninstall_bwg {
|
|
70 |
</p>
|
71 |
<p style="text-align: center;">
|
72 |
<input type="submit" value="UNINSTALL" class="button-primary" onclick="if (check_yes.checked) {
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
</p>
|
83 |
</div>
|
84 |
<input id="task" name="task" type="hidden" value="" />
|
@@ -88,12 +96,37 @@ class BWGViewUninstall_bwg {
|
|
88 |
|
89 |
public function uninstall() {
|
90 |
$this->model->delete_db_tables();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
global $wpdb;
|
92 |
$prefix = $wpdb->prefix;
|
93 |
$deactivate_url = wp_nonce_url('plugins.php?action=deactivate&plugin=photo-gallery/photo-gallery.php', 'deactivate-plugin_photo-gallery/photo-gallery.php');
|
94 |
?>
|
95 |
<div id="message" class="updated fade">
|
96 |
-
<p>The following Database Tables
|
97 |
<p><?php echo $prefix; ?>bwg_album,</p>
|
98 |
<p><?php echo $prefix; ?>bwg_album_gallery,</p>
|
99 |
<p><?php echo $prefix; ?>bwg_gallery,</p>
|
@@ -103,6 +136,9 @@ class BWGViewUninstall_bwg {
|
|
103 |
<p><?php echo $prefix; ?>bwg_option,</p>
|
104 |
<p><?php echo $prefix; ?>bwg_theme.</p>
|
105 |
</div>
|
|
|
|
|
|
|
106 |
<div class="wrap">
|
107 |
<h2>Uninstall Photo Gallery</h2>
|
108 |
<p><strong><a href="<?php echo $deactivate_url; ?>">Click Here</a> To Finish the Uninstallation and Photo Gallery will be Deactivated Automatically.</strong></p>
|
61 |
</ol>
|
62 |
</td>
|
63 |
</tr>
|
64 |
+
<tfoot>
|
65 |
+
<tr>
|
66 |
+
<th>
|
67 |
+
<input type="checkbox" name="bwg_delete_files" id="bwg_delete_files" style="vertical-align: middle;" />
|
68 |
+
<label for="bwg_delete_files"> Delete the folder containing uploaded images.</label>
|
69 |
+
</th>
|
70 |
+
</tr>
|
71 |
+
</tfoot>
|
72 |
</table>
|
73 |
<p style="text-align: center;">
|
74 |
Do you really want to uninstall Photo Gallery?
|
78 |
</p>
|
79 |
<p style="text-align: center;">
|
80 |
<input type="submit" value="UNINSTALL" class="button-primary" onclick="if (check_yes.checked) {
|
81 |
+
if (confirm('You are About to Uninstall Photo Gallery from WordPress.\nThis Action Is Not Reversible.')) {
|
82 |
+
spider_set_input_value('task', 'uninstall');
|
83 |
+
} else {
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
else {
|
88 |
+
return false;
|
89 |
+
}" />
|
90 |
</p>
|
91 |
</div>
|
92 |
<input id="task" name="task" type="hidden" value="" />
|
96 |
|
97 |
public function uninstall() {
|
98 |
$this->model->delete_db_tables();
|
99 |
+
$flag = TRUE;
|
100 |
+
if (isset($_POST['bwg_delete_files'])) {
|
101 |
+
function delfiles($del_file) {
|
102 |
+
if (is_dir($del_file)) {
|
103 |
+
$del_folder = scandir($del_file);
|
104 |
+
foreach ($del_folder as $file) {
|
105 |
+
if ($file != '.' and $file != '..') {
|
106 |
+
delfiles($del_file . '/' . $file);
|
107 |
+
}
|
108 |
+
}
|
109 |
+
if (!rmdir($del_file)) {
|
110 |
+
$flag = FALSE;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
else {
|
114 |
+
if (!unlink($del_file)) {
|
115 |
+
$flag = FALSE;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
global $WD_BWG_UPLOAD_DIR;
|
120 |
+
if (is_dir(ABSPATH . $WD_BWG_UPLOAD_DIR)) {
|
121 |
+
delfiles(ABSPATH . $WD_BWG_UPLOAD_DIR);
|
122 |
+
}
|
123 |
+
}
|
124 |
global $wpdb;
|
125 |
$prefix = $wpdb->prefix;
|
126 |
$deactivate_url = wp_nonce_url('plugins.php?action=deactivate&plugin=photo-gallery/photo-gallery.php', 'deactivate-plugin_photo-gallery/photo-gallery.php');
|
127 |
?>
|
128 |
<div id="message" class="updated fade">
|
129 |
+
<p>The following Database Tables successfully deleted:</p>
|
130 |
<p><?php echo $prefix; ?>bwg_album,</p>
|
131 |
<p><?php echo $prefix; ?>bwg_album_gallery,</p>
|
132 |
<p><?php echo $prefix; ?>bwg_gallery,</p>
|
136 |
<p><?php echo $prefix; ?>bwg_option,</p>
|
137 |
<p><?php echo $prefix; ?>bwg_theme.</p>
|
138 |
</div>
|
139 |
+
<div class="<?php echo ($flag) ? 'updated' : 'error'?>">
|
140 |
+
<p><?php echo ($flag) ? 'The folder was successfully deleted.' : 'An error occurred when deleting the folder.'?></p>
|
141 |
+
</div>
|
142 |
<div class="wrap">
|
143 |
<h2>Uninstall Photo Gallery</h2>
|
144 |
<p><strong><a href="<?php echo $deactivate_url; ?>">Click Here</a> To Finish the Uninstallation and Photo Gallery will be Deactivated Automatically.</strong></p>
|
admin/views/BWGViewWidget.php
CHANGED
@@ -147,7 +147,7 @@ class BWGViewWidget extends BWGControllerWidget {
|
|
147 |
<input class="widefat" style="width:25%;" id="<?php echo $id_height; ?>" name="<?php echo $name_height; ?>'" type="text" value="<?php echo $instance['height']; ?>"/> px
|
148 |
</p>
|
149 |
<p>
|
150 |
-
<select name="<?php echo $name_theme_id; ?>" id="<?php echo $id_theme_id; ?>" class="widefat"
|
151 |
<?php
|
152 |
foreach ($theme_rows as $theme_row) {
|
153 |
?>
|
147 |
<input class="widefat" style="width:25%;" id="<?php echo $id_height; ?>" name="<?php echo $name_height; ?>'" type="text" value="<?php echo $instance['height']; ?>"/> px
|
148 |
</p>
|
149 |
<p>
|
150 |
+
<select name="<?php echo $name_theme_id; ?>" id="<?php echo $id_theme_id; ?>" class="widefat" <?php echo (get_option("wd_bwg_theme_version") ? 'title="This option is disabled in free version." disabled="disabled"' : ''); ?>>
|
151 |
<?php
|
152 |
foreach ($theme_rows as $theme_row) {
|
153 |
?>
|
admin/views/BWGViewWidgetSlideshow.php
CHANGED
@@ -131,7 +131,7 @@ class BWGViewWidgetSlideshow extends BWGControllerWidgetSlideshow {
|
|
131 |
<input type="radio" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle . "_0"; ?>" value="0" <?php if (!$instance['shuffle']) echo 'checked="checked"'; ?> /><label for="<?php echo $id_shuffle . "_0"; ?>">No</label>
|
132 |
</p>
|
133 |
<p>
|
134 |
-
<select name="<?php echo $name_theme_id; ?>" id="<?php echo $id_theme_id; ?>" class="widefat"
|
135 |
<?php
|
136 |
foreach ($theme_rows as $theme_row) {
|
137 |
?>
|
131 |
<input type="radio" name="<?php echo $name_shuffle; ?>" id="<?php echo $id_shuffle . "_0"; ?>" value="0" <?php if (!$instance['shuffle']) echo 'checked="checked"'; ?> /><label for="<?php echo $id_shuffle . "_0"; ?>">No</label>
|
132 |
</p>
|
133 |
<p>
|
134 |
+
<select name="<?php echo $name_theme_id; ?>" id="<?php echo $id_theme_id; ?>" class="widefat" <?php echo (get_option("wd_bwg_theme_version") ? 'title="This option is disabled in free version." disabled="disabled"' : ''); ?>>
|
135 |
<?php
|
136 |
foreach ($theme_rows as $theme_row) {
|
137 |
?>
|
filemanager/css/default.css
CHANGED
@@ -1,3 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
html {
|
2 |
overflow: hidden !important;
|
3 |
|
1 |
+
.spider_ajax_loading {
|
2 |
+
border: none !important;
|
3 |
+
-webkit-animation: spin 2.5s infinite linear;
|
4 |
+
-moz-animation: spin 2.5s infinite linear;
|
5 |
+
-o-animation: spin 2.5s infinite linear;
|
6 |
+
animation: spin 2.5s infinite linear;
|
7 |
+
}
|
8 |
+
|
9 |
+
@-moz-keyframes spin {
|
10 |
+
0% {
|
11 |
+
-moz-transform: rotate(0deg);
|
12 |
+
}
|
13 |
+
100% {
|
14 |
+
-moz-transform: rotate(359deg);
|
15 |
+
}
|
16 |
+
}
|
17 |
+
@-webkit-keyframes spin {
|
18 |
+
0% {
|
19 |
+
-webkit-transform: rotate(0deg);
|
20 |
+
}
|
21 |
+
100% {
|
22 |
+
-webkit-transform: rotate(359deg);
|
23 |
+
}
|
24 |
+
}
|
25 |
+
@-o-keyframes spin {
|
26 |
+
0% {
|
27 |
+
-o-transform: rotate(0deg);
|
28 |
+
}
|
29 |
+
100% {
|
30 |
+
-o-transform: rotate(359deg);
|
31 |
+
}
|
32 |
+
}
|
33 |
+
@-ms-keyframes spin {
|
34 |
+
0% {
|
35 |
+
-ms-transform: rotate(0deg);
|
36 |
+
}
|
37 |
+
100% {
|
38 |
+
-ms-transform: rotate(359deg);
|
39 |
+
}
|
40 |
+
}
|
41 |
+
@keyframes spin {
|
42 |
+
0% {
|
43 |
+
transform: rotate(0deg);
|
44 |
+
}
|
45 |
+
100% {
|
46 |
+
transform: rotate(359deg);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
html {
|
51 |
overflow: hidden !important;
|
52 |
|
filemanager/view.php
CHANGED
@@ -96,6 +96,10 @@ class FilemanagerView {
|
|
96 |
|
97 |
<form id="adminForm" name="adminForm" action="" method="post">
|
98 |
<div id="wrapper">
|
|
|
|
|
|
|
|
|
99 |
<div id="file_manager">
|
100 |
<div class="ctrls_bar ctrls_bar_header">
|
101 |
<div class="ctrls_left">
|
@@ -294,14 +298,18 @@ class FilemanagerView {
|
|
294 |
alert(errorLoadingFile + ' :: ' + file.error);
|
295 |
}
|
296 |
if (file.error) {
|
297 |
-
jQuery("#uploaded_files ul").
|
298 |
}
|
299 |
else {
|
300 |
-
jQuery("#uploaded_files ul").
|
301 |
}
|
302 |
});
|
303 |
}
|
304 |
});
|
|
|
|
|
|
|
|
|
305 |
</script>
|
306 |
</div>
|
307 |
</label>
|
96 |
|
97 |
<form id="adminForm" name="adminForm" action="" method="post">
|
98 |
<div id="wrapper">
|
99 |
+
<div id="opacity_div" style="background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
|
100 |
+
<div id="loading_div" style="text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
|
101 |
+
<img src="<?php echo WD_BWG_URL . '/images/ajax_loader.png'; ?>" class="spider_ajax_loading" style="margin-top: 200px; width:50px;">
|
102 |
+
</div>
|
103 |
<div id="file_manager">
|
104 |
<div class="ctrls_bar ctrls_bar_header">
|
105 |
<div class="ctrls_left">
|
298 |
alert(errorLoadingFile + ' :: ' + file.error);
|
299 |
}
|
300 |
if (file.error) {
|
301 |
+
jQuery("#uploaded_files ul").prepend(jQuery("<li class=uploaded_item_failed>" + "<?php echo 'Upload failed' ?> :: " + file.error + "</li>"));
|
302 |
}
|
303 |
else {
|
304 |
+
jQuery("#uploaded_files ul").prepend(jQuery("<li class=uploaded_item>" + file.name + " (<?php echo 'Uploaded' ?>)" + "</li>"));
|
305 |
}
|
306 |
});
|
307 |
}
|
308 |
});
|
309 |
+
jQuery(window).load(function () {
|
310 |
+
jQuery("#opacity_div").hide();
|
311 |
+
jQuery("#loading_div").hide();
|
312 |
+
})
|
313 |
</script>
|
314 |
</div>
|
315 |
</label>
|
frontend/views/BWGViewImage_browser.php
CHANGED
@@ -372,7 +372,7 @@ class BWGViewImage_browser {
|
|
372 |
<div class="image_browser_images_conteiner_<?php echo $bwg; ?>">
|
373 |
<div class="image_browser_images_<?php echo $bwg; ?>" id="bwg_standart_thumbnails_<?php echo $bwg; ?>" >
|
374 |
<div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;">
|
375 |
-
<div id="opacity_div_<?php echo $bwg; ?>" style="display:none; background-color:(255, 255, 255, 0.7); position:absolute; z-index:105;"></div>
|
376 |
<span id="loading_div_<?php echo $bwg; ?>" style="display:none; text-align:center; position:relative; vertical-align:middle; z-index:107">
|
377 |
<img src="<?php echo WD_BWG_URL . '/images/ajax_loader.png'; ?>" class="spider_ajax_loading" style="float: none; width:50px;">
|
378 |
</span>
|
372 |
<div class="image_browser_images_conteiner_<?php echo $bwg; ?>">
|
373 |
<div class="image_browser_images_<?php echo $bwg; ?>" id="bwg_standart_thumbnails_<?php echo $bwg; ?>" >
|
374 |
<div id="ajax_loading_<?php echo $bwg; ?>" style="position:absolute;">
|
375 |
+
<div id="opacity_div_<?php echo $bwg; ?>" style="display:none; background-color: rgba(255, 255, 255, 0.7); position:absolute; z-index:105;"></div>
|
376 |
<span id="loading_div_<?php echo $bwg; ?>" style="display:none; text-align:center; position:relative; vertical-align:middle; z-index:107">
|
377 |
<img src="<?php echo WD_BWG_URL . '/images/ajax_loader.png'; ?>" class="spider_ajax_loading" style="float: none; width:50px;">
|
378 |
</span>
|
images/theme_blog_style.png
ADDED
Binary file
|
images/theme_compact_album.png
ADDED
Binary file
|
images/theme_extended_album.png
ADDED
Binary file
|
images/theme_image_browser.png
ADDED
Binary file
|
images/theme_lightbox.png
ADDED
Binary file
|
images/theme_masonry.png
ADDED
Binary file
|
images/theme_page_navigation.png
ADDED
Binary file
|
images/theme_slideshow.png
ADDED
Binary file
|
images/theme_thumbnails.png
ADDED
Binary file
|
js/bwg.js
CHANGED
@@ -63,8 +63,25 @@ function save_tag(tag_id) {
|
|
63 |
}
|
64 |
});
|
65 |
}
|
66 |
-
|
67 |
-
function spider_ajax_save(form_id) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
var search_value = jQuery("#search_value").val();
|
69 |
var current_id = jQuery("#current_id").val();
|
70 |
var page_number = jQuery("#page_number").val();
|
@@ -72,11 +89,23 @@ function spider_ajax_save(form_id) {
|
|
72 |
var ids_string = jQuery("#ids_string").val();
|
73 |
var image_order_by = jQuery("#image_order_by").val();
|
74 |
var asc_or_desc = jQuery("#asc_or_desc").val();
|
75 |
-
|
76 |
var image_current_id = jQuery("#image_current_id").val();
|
77 |
ids_array = ids_string.split(",");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
var post_data = {};
|
|
|
|
|
|
|
|
|
|
|
80 |
post_data["search_value"] = search_value;
|
81 |
post_data["current_id"] = current_id;
|
82 |
post_data["page_number"] = page_number;
|
@@ -93,84 +122,106 @@ function spider_ajax_save(form_id) {
|
|
93 |
jQuery('#check_all_items').attr('checked', false);
|
94 |
}
|
95 |
for (var i in ids_array) {
|
96 |
-
if (
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
-
post_data["input_filename_" + ids_array[i]] = jQuery("#input_filename_" + ids_array[i]).val();
|
101 |
-
post_data["image_url_" + ids_array[i]] = jQuery("#image_url_" + ids_array[i]).val();
|
102 |
-
post_data["thumb_url_" + ids_array[i]] = jQuery("#thumb_url_" + ids_array[i]).val();
|
103 |
-
post_data["image_description_" + ids_array[i]] = jQuery("#image_description_" + ids_array[i]).val();
|
104 |
-
post_data["image_alt_text_" + ids_array[i]] = jQuery("#image_alt_text_" + ids_array[i]).val();
|
105 |
-
post_data["input_date_modified_" + ids_array[i]] = jQuery("#input_date_modified_" + ids_array[i]).val();
|
106 |
-
post_data["input_size_" + ids_array[i]] = jQuery("#input_size_" + ids_array[i]).val();
|
107 |
-
post_data["input_filetype_" + ids_array[i]] = jQuery("#input_filetype_" + ids_array[i]).val();
|
108 |
-
post_data["input_resolution_" + ids_array[i]] = jQuery("#input_resolution_" + ids_array[i]).val();
|
109 |
-
// post_data["input_rotate_" + ids_array[i]] = jQuery("#input_rotate_" + ids_array[i]).val();
|
110 |
-
// post_data["input_flip_" + ids_array[i]] = jQuery("#input_flip_" + ids_array[i]).val();
|
111 |
-
post_data["input_crop_" + ids_array[i]] = jQuery("#input_crop_" + ids_array[i]).val();
|
112 |
-
post_data["order_input_" + ids_array[i]] = jQuery("#order_input_" + ids_array[i]).val();
|
113 |
-
post_data["tags_" + ids_array[i]] = jQuery("#tags_" + ids_array[i]).val();
|
114 |
}
|
115 |
// Loading.
|
116 |
-
jQuery(
|
117 |
-
jQuery(
|
118 |
-
jQuery("#loading_div").css('width', jQuery("#images_table").width());
|
119 |
-
jQuery("#loading_div").css('height', jQuery("#images_table").height());
|
120 |
-
document.getElementById("opacity_div").style.display = 'block';
|
121 |
-
document.getElementById("loading_div").style.display = 'block';
|
122 |
|
123 |
jQuery.post(
|
124 |
jQuery('#' + form_id).action,
|
125 |
post_data,
|
126 |
|
127 |
function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
var str = jQuery(data).find('#images_table').html();
|
129 |
jQuery('#images_table').html(str);
|
130 |
-
var str = jQuery(data).find('
|
131 |
-
jQuery('
|
132 |
jQuery("#show_hide_weights").val("Hide order column");
|
133 |
spider_show_hide_weights();
|
134 |
spider_run_checkbox();
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
|
|
138 |
jQuery('#draganddrop').html("<strong><p>Item Succesfully Recovered.</p></strong>");
|
|
|
139 |
}
|
140 |
else if (ajax_task == 'image_publish') {
|
141 |
jQuery('#draganddrop').html("<strong><p>Item Succesfully Published.</p></strong>");
|
|
|
142 |
}
|
143 |
else if (ajax_task == 'image_unpublish') {
|
144 |
jQuery('#draganddrop').html("<strong><p>Item Succesfully Unpublished.</p></strong>");
|
|
|
145 |
}
|
146 |
else if (ajax_task == 'image_delete') {
|
147 |
jQuery('#draganddrop').html("<strong><p>Item Succesfully Deleted.</p></strong>");
|
|
|
148 |
}
|
149 |
else if (!flag && ((ajax_task == 'image_publish_all') || (ajax_task == 'image_unpublish_all') || (ajax_task == 'image_delete_all') || (ajax_task == 'image_set_watermark') || (ajax_task == 'image_recover_all'))) {
|
150 |
jQuery('#draganddrop').html("<strong><p>You must select at least one item.</p></strong>");
|
|
|
151 |
}
|
152 |
else if (ajax_task == 'image_publish_all') {
|
153 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Published.</p></strong>");
|
|
|
154 |
}
|
155 |
else if (ajax_task == 'image_unpublish_all') {
|
156 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Unpublished.</p></strong>");
|
|
|
157 |
}
|
158 |
else if (ajax_task == 'image_delete_all') {
|
159 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Deleted.</p></strong>");
|
|
|
160 |
}
|
161 |
else if (ajax_task == 'image_set_watermark') {
|
162 |
jQuery('#draganddrop').html("<strong><p>Watermarks Succesfully Set.</p></strong>");
|
|
|
163 |
}
|
164 |
else if (ajax_task == 'image_recover_all') {
|
165 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Reset.</p></strong>");
|
|
|
166 |
}
|
167 |
else {
|
168 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Saved.</p></strong>");
|
|
|
169 |
}
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
|
|
|
|
|
|
174 |
// if (event.preventDefault) {
|
175 |
// event.preventDefault();
|
176 |
// }
|
63 |
}
|
64 |
});
|
65 |
}
|
66 |
+
var bwg_save_count = 50;
|
67 |
+
function spider_ajax_save(form_id, tr_group) {
|
68 |
+
var ajax_task = jQuery("#ajax_task").val();
|
69 |
+
if (!tr_group) {
|
70 |
+
var tr_group = 1;
|
71 |
+
}
|
72 |
+
else if (ajax_task == 'ajax_apply' || ajax_task == 'ajax_save') {
|
73 |
+
ajax_task = '';
|
74 |
+
}
|
75 |
+
var name = jQuery("#name").val();
|
76 |
+
var slug = jQuery("#slug").val();
|
77 |
+
if ((typeof tinyMCE != "undefined") && tinyMCE.activeEditor && !tinyMCE.activeEditor.isHidden()) {
|
78 |
+
var description = tinyMCE.activeEditor.getContent();
|
79 |
+
}
|
80 |
+
else {
|
81 |
+
var description = jQuery("#description").val();
|
82 |
+
}
|
83 |
+
var preview_image = jQuery("#preview_image").val();
|
84 |
+
var published = jQuery("input[name=published]:checked").val();
|
85 |
var search_value = jQuery("#search_value").val();
|
86 |
var current_id = jQuery("#current_id").val();
|
87 |
var page_number = jQuery("#page_number").val();
|
89 |
var ids_string = jQuery("#ids_string").val();
|
90 |
var image_order_by = jQuery("#image_order_by").val();
|
91 |
var asc_or_desc = jQuery("#asc_or_desc").val();
|
92 |
+
|
93 |
var image_current_id = jQuery("#image_current_id").val();
|
94 |
ids_array = ids_string.split(",");
|
95 |
+
var tr_count = ids_array.length;
|
96 |
+
if (tr_count > bwg_save_count) {
|
97 |
+
// Remove items form begin and end of array.
|
98 |
+
ids_array.splice(tr_group * bwg_save_count, ids_array.length);
|
99 |
+
ids_array.splice(0, (tr_group - 1) * bwg_save_count);
|
100 |
+
ids_string = ids_array.join(",");
|
101 |
+
}
|
102 |
|
103 |
var post_data = {};
|
104 |
+
post_data["name"] = name;
|
105 |
+
post_data["slug"] = slug;
|
106 |
+
post_data["description"] = description;
|
107 |
+
post_data["preview_image"] = preview_image;
|
108 |
+
post_data["published"] = published;
|
109 |
post_data["search_value"] = search_value;
|
110 |
post_data["current_id"] = current_id;
|
111 |
post_data["page_number"] = page_number;
|
122 |
jQuery('#check_all_items').attr('checked', false);
|
123 |
}
|
124 |
for (var i in ids_array) {
|
125 |
+
if (ids_array[i]) {
|
126 |
+
if (jQuery("#check_" + ids_array[i]).attr('checked') == 'checked') {
|
127 |
+
post_data["check_" + ids_array[i]] = jQuery("#check_" + ids_array[i]).val();
|
128 |
+
flag = true;
|
129 |
+
}
|
130 |
+
post_data["input_filename_" + ids_array[i]] = jQuery("#input_filename_" + ids_array[i]).val();
|
131 |
+
post_data["image_url_" + ids_array[i]] = jQuery("#image_url_" + ids_array[i]).val();
|
132 |
+
post_data["thumb_url_" + ids_array[i]] = jQuery("#thumb_url_" + ids_array[i]).val();
|
133 |
+
post_data["image_description_" + ids_array[i]] = jQuery("#image_description_" + ids_array[i]).val();
|
134 |
+
post_data["image_alt_text_" + ids_array[i]] = jQuery("#image_alt_text_" + ids_array[i]).val();
|
135 |
+
post_data["input_date_modified_" + ids_array[i]] = jQuery("#input_date_modified_" + ids_array[i]).val();
|
136 |
+
post_data["input_size_" + ids_array[i]] = jQuery("#input_size_" + ids_array[i]).val();
|
137 |
+
post_data["input_filetype_" + ids_array[i]] = jQuery("#input_filetype_" + ids_array[i]).val();
|
138 |
+
post_data["input_resolution_" + ids_array[i]] = jQuery("#input_resolution_" + ids_array[i]).val();
|
139 |
+
post_data["input_crop_" + ids_array[i]] = jQuery("#input_crop_" + ids_array[i]).val();
|
140 |
+
post_data["order_input_" + ids_array[i]] = jQuery("#order_input_" + ids_array[i]).val();
|
141 |
+
post_data["tags_" + ids_array[i]] = jQuery("#tags_" + ids_array[i]).val();
|
142 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
144 |
// Loading.
|
145 |
+
jQuery('#opacity_div').show();
|
146 |
+
jQuery('#loading_div').show();
|
|
|
|
|
|
|
|
|
147 |
|
148 |
jQuery.post(
|
149 |
jQuery('#' + form_id).action,
|
150 |
post_data,
|
151 |
|
152 |
function (data) {
|
153 |
+
var str = jQuery(data).find("#current_id").val();
|
154 |
+
jQuery("#current_id").val(str);
|
155 |
+
}
|
156 |
+
).success(function (data, textStatus, errorThrown) {
|
157 |
+
if (tr_count > bwg_save_count * tr_group) {
|
158 |
+
spider_ajax_save(form_id, ++tr_group);
|
159 |
+
return;
|
160 |
+
}
|
161 |
+
else {
|
162 |
var str = jQuery(data).find('#images_table').html();
|
163 |
jQuery('#images_table').html(str);
|
164 |
+
var str = jQuery(data).find('.tablenav').html();
|
165 |
+
jQuery('.tablenav').html(str);
|
166 |
jQuery("#show_hide_weights").val("Hide order column");
|
167 |
spider_show_hide_weights();
|
168 |
spider_run_checkbox();
|
169 |
+
|
170 |
+
if (ajax_task == 'ajax_apply') {
|
171 |
+
jQuery('#message_div').html("<strong><p>Items Succesfully Saved.</p></strong>");
|
172 |
+
jQuery('#message_div').show();
|
173 |
+
}
|
174 |
+
else if (ajax_task == 'recover') {
|
175 |
jQuery('#draganddrop').html("<strong><p>Item Succesfully Recovered.</p></strong>");
|
176 |
+
jQuery('#draganddrop').show();
|
177 |
}
|
178 |
else if (ajax_task == 'image_publish') {
|
179 |
jQuery('#draganddrop').html("<strong><p>Item Succesfully Published.</p></strong>");
|
180 |
+
jQuery('#draganddrop').show();
|
181 |
}
|
182 |
else if (ajax_task == 'image_unpublish') {
|
183 |
jQuery('#draganddrop').html("<strong><p>Item Succesfully Unpublished.</p></strong>");
|
184 |
+
jQuery('#draganddrop').show();
|
185 |
}
|
186 |
else if (ajax_task == 'image_delete') {
|
187 |
jQuery('#draganddrop').html("<strong><p>Item Succesfully Deleted.</p></strong>");
|
188 |
+
jQuery('#draganddrop').show();
|
189 |
}
|
190 |
else if (!flag && ((ajax_task == 'image_publish_all') || (ajax_task == 'image_unpublish_all') || (ajax_task == 'image_delete_all') || (ajax_task == 'image_set_watermark') || (ajax_task == 'image_recover_all'))) {
|
191 |
jQuery('#draganddrop').html("<strong><p>You must select at least one item.</p></strong>");
|
192 |
+
jQuery('#draganddrop').show();
|
193 |
}
|
194 |
else if (ajax_task == 'image_publish_all') {
|
195 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Published.</p></strong>");
|
196 |
+
jQuery('#draganddrop').show();
|
197 |
}
|
198 |
else if (ajax_task == 'image_unpublish_all') {
|
199 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Unpublished.</p></strong>");
|
200 |
+
jQuery('#draganddrop').show();
|
201 |
}
|
202 |
else if (ajax_task == 'image_delete_all') {
|
203 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Deleted.</p></strong>");
|
204 |
+
jQuery('#draganddrop').show();
|
205 |
}
|
206 |
else if (ajax_task == 'image_set_watermark') {
|
207 |
jQuery('#draganddrop').html("<strong><p>Watermarks Succesfully Set.</p></strong>");
|
208 |
+
jQuery('#draganddrop').show();
|
209 |
}
|
210 |
else if (ajax_task == 'image_recover_all') {
|
211 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Reset.</p></strong>");
|
212 |
+
jQuery('#draganddrop').show();
|
213 |
}
|
214 |
else {
|
215 |
jQuery('#draganddrop').html("<strong><p>Items Succesfully Saved.</p></strong>");
|
216 |
+
jQuery('#draganddrop').show();
|
217 |
}
|
218 |
+
if (ajax_task == "ajax_save") {
|
219 |
+
jQuery('#' + form_id).submit();
|
220 |
+
}
|
221 |
+
jQuery('#opacity_div').hide();
|
222 |
+
jQuery('#loading_div').hide();
|
223 |
+
}
|
224 |
+
});
|
225 |
// if (event.preventDefault) {
|
226 |
// event.preventDefault();
|
227 |
// }
|
photo-gallery.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Photo Gallery
|
5 |
* Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
6 |
* Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
|
7 |
-
* Version: 1.0
|
8 |
* Author: http://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
*/
|
@@ -2387,7 +2387,7 @@ function bwg_activate() {
|
|
2387 |
));
|
2388 |
}
|
2389 |
$version = str_replace('.', '', get_option("wd_bwg_version"));
|
2390 |
-
$new_version =
|
2391 |
if ($version && $version < $new_version) {
|
2392 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
2393 |
for ($i = $version; $i < $new_version; $i++) {
|
@@ -2396,10 +2396,11 @@ function bwg_activate() {
|
|
2396 |
$func_name();
|
2397 |
}
|
2398 |
}
|
2399 |
-
update_option("wd_bwg_version", '1.0
|
2400 |
}
|
2401 |
else {
|
2402 |
-
add_option("wd_bwg_version", '1.0
|
|
|
2403 |
}
|
2404 |
}
|
2405 |
register_activation_hook(__FILE__, 'bwg_activate');
|
@@ -2417,7 +2418,7 @@ function bwg_scripts() {
|
|
2417 |
global $wp_scripts;
|
2418 |
if (isset($wp_scripts->registered['jquery'])) {
|
2419 |
$jquery = $wp_scripts->registered['jquery'];
|
2420 |
-
if (!isset($jquery->ver) OR version_compare($jquery->ver, '1.
|
2421 |
wp_deregister_script('jquery');
|
2422 |
wp_register_script('jquery', FALSE, array('jquery-core', 'jquery-migrate'), '1.10.2' );
|
2423 |
}
|
@@ -2440,7 +2441,7 @@ function bwg_options_scripts() {
|
|
2440 |
global $wp_scripts;
|
2441 |
if (isset($wp_scripts->registered['jquery'])) {
|
2442 |
$jquery = $wp_scripts->registered['jquery'];
|
2443 |
-
if (!isset($jquery->ver) OR version_compare($jquery->ver, '1.
|
2444 |
wp_deregister_script('jquery');
|
2445 |
wp_register_script('jquery', FALSE, array('jquery-core', 'jquery-migrate'), '1.10.2' );
|
2446 |
}
|
@@ -2453,7 +2454,7 @@ function bwg_front_end_scripts() {
|
|
2453 |
global $wp_scripts;
|
2454 |
if (isset($wp_scripts->registered['jquery'])) {
|
2455 |
$jquery = $wp_scripts->registered['jquery'];
|
2456 |
-
if (!isset($jquery->ver) OR version_compare($jquery->ver, '1.
|
2457 |
wp_deregister_script('jquery');
|
2458 |
wp_register_script('jquery', FALSE, array('jquery-core', 'jquery-migrate'), '1.10.2' );
|
2459 |
}
|
4 |
* Plugin Name: Photo Gallery
|
5 |
* Plugin URI: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
6 |
* Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
|
7 |
+
* Version: 1.1.0
|
8 |
* Author: http://web-dorado.com/
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
*/
|
2387 |
));
|
2388 |
}
|
2389 |
$version = str_replace('.', '', get_option("wd_bwg_version"));
|
2390 |
+
$new_version = 110;
|
2391 |
if ($version && $version < $new_version) {
|
2392 |
require_once WD_BWG_DIR . "/update/bwg_update.php";
|
2393 |
for ($i = $version; $i < $new_version; $i++) {
|
2396 |
$func_name();
|
2397 |
}
|
2398 |
}
|
2399 |
+
update_option("wd_bwg_version", '1.1.0');
|
2400 |
}
|
2401 |
else {
|
2402 |
+
add_option("wd_bwg_version", '1.1.0', '', 'no');
|
2403 |
+
add_option("wd_bwg_theme_version", '1.0.0', '', 'no');
|
2404 |
}
|
2405 |
}
|
2406 |
register_activation_hook(__FILE__, 'bwg_activate');
|
2418 |
global $wp_scripts;
|
2419 |
if (isset($wp_scripts->registered['jquery'])) {
|
2420 |
$jquery = $wp_scripts->registered['jquery'];
|
2421 |
+
if (!isset($jquery->ver) OR version_compare($jquery->ver, '1.8.2', '<')) {
|
2422 |
wp_deregister_script('jquery');
|
2423 |
wp_register_script('jquery', FALSE, array('jquery-core', 'jquery-migrate'), '1.10.2' );
|
2424 |
}
|
2441 |
global $wp_scripts;
|
2442 |
if (isset($wp_scripts->registered['jquery'])) {
|
2443 |
$jquery = $wp_scripts->registered['jquery'];
|
2444 |
+
if (!isset($jquery->ver) OR version_compare($jquery->ver, '1.8.2', '<')) {
|
2445 |
wp_deregister_script('jquery');
|
2446 |
wp_register_script('jquery', FALSE, array('jquery-core', 'jquery-migrate'), '1.10.2' );
|
2447 |
}
|
2454 |
global $wp_scripts;
|
2455 |
if (isset($wp_scripts->registered['jquery'])) {
|
2456 |
$jquery = $wp_scripts->registered['jquery'];
|
2457 |
+
if (!isset($jquery->ver) OR version_compare($jquery->ver, '1.8.2', '<')) {
|
2458 |
wp_deregister_script('jquery');
|
2459 |
wp_register_script('jquery', FALSE, array('jquery-core', 'jquery-migrate'), '1.10.2' );
|
2460 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://web-dorado.com/products/wordpress-photo-gallery-plugin.html
|
|
4 |
Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.8
|
7 |
-
Stable tag: 1.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -44,7 +44,7 @@ Photo Gallery product in addition to the main plugin includes 4 specific widgets
|
|
44 |
* 100% Responsive
|
45 |
* Multiple views to choose from: Masonry, Thumbnails, Image Browser, Slideshow and Blog Style for galleries and Compact Album, Extended Album views for albums
|
46 |
* Supports the following types of image files: JPG, JPEG, PNG and GIF
|
47 |
-
* Editable themes
|
48 |
* Unlimited quantity of photos
|
49 |
* Possibility of adding unlimited quantity of galleries/albums
|
50 |
* Detailed three-column visual shortcode for adding created gallery/galleries and album/albums into the posts and pages.
|
4 |
Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, Simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, Fotogalerie, Galleria, galerie, galeri
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.8
|
7 |
+
Stable tag: 1.1.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
44 |
* 100% Responsive
|
45 |
* Multiple views to choose from: Masonry, Thumbnails, Image Browser, Slideshow and Blog Style for galleries and Compact Album, Extended Album views for albums
|
46 |
* Supports the following types of image files: JPG, JPEG, PNG and GIF
|
47 |
+
* Editable themes (commercial version)
|
48 |
* Unlimited quantity of photos
|
49 |
* Possibility of adding unlimited quantity of galleries/albums
|
50 |
* Detailed three-column visual shortcode for adding created gallery/galleries and album/albums into the posts and pages.
|