mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 03:19:05 +02:00
Merge branch 'ent-7573-Problemas-integracion-Module-Library-vs-Wordpress' into 'develop'
Ent 7573 problemas integracion module library vs wordpress Closes pandora_enterprise#7573 See merge request artica/pandorafms!4634
This commit is contained in:
commit
6abd7212e6
@ -1120,7 +1120,7 @@ function resource_registration_extension_main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo '<div class=notify>';
|
echo '<div class=notify>';
|
||||||
echo __('This extension makes registering resource templates easier.').' '.__('Here you can upload a resource template in .ptr format.').' '.__('Please refer to our documentation for more information on how to obtain and use %s resources.', get_product_name()).' '.'<br> <br>'.__('You can get more resurces in our <a href="http://pandorafms.com/Library/Library/">Public Resource Library</a>');
|
echo __('This extension makes registering resource templates easier.').' '.__('Here you can upload a resource template in .ptr format.').' '.__('Please refer to our documentation for more information on how to obtain and use %s resources.', get_product_name()).' '.'<br> <br>'.__('You can get more resurces in our <a href="https://pandorafms.com/Library/Library/">Public Resource Library</a>');
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<br /><br />';
|
echo '<br /><br />';
|
||||||
|
@ -238,7 +238,7 @@ echo '</table>';
|
|||||||
if (!$config['disable_help']) {
|
if (!$config['disable_help']) {
|
||||||
echo '<div class="disable_help">';
|
echo '<div class="disable_help">';
|
||||||
echo '<strong>';
|
echo '<strong>';
|
||||||
echo "<a class='color-black-grey invert_filter' target='_blank' href='http://pandorafms.com/Library/Library/'>".__('Get more modules on Monitoring Library').'</a>';
|
echo "<a class='color-black-grey invert_filter' target='_blank' href='https://pandorafms.com/Library/Library/'>".__('Get more modules on Monitoring Library').'</a>';
|
||||||
echo '</strong>';
|
echo '</strong>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
@ -159,8 +159,8 @@ var more_details = '<?php echo __('More details'); ?>';
|
|||||||
var total_modules_text = '<?php echo __('Total modules'); ?>';
|
var total_modules_text = '<?php echo __('Total modules'); ?>';
|
||||||
var view_web = '<?php echo __('View in Module Library'); ?>';
|
var view_web = '<?php echo __('View in Module Library'); ?>';
|
||||||
var empty_result = '<?php echo __('No module found'); ?>';
|
var empty_result = '<?php echo __('No module found'); ?>';
|
||||||
var error_get_token = '<?php echo __('Problem with authentication. Check your internet connection'); ?>';
|
var error_get_token = '<?php echo __('Problem with authentication. Check your internet connection'); ?>';
|
||||||
var invalid_user = '<?php echo __('Invalid username or password'); ?>';
|
var invalid_user = '<?php echo __('Invalid username or password'); ?>';
|
||||||
var error_main = '<?php echo __('Error loading Module Library'); ?>';
|
var error_main = '<?php echo __('Error loading Module Library'); ?>';
|
||||||
var error_category = '<?php echo __('Error loading category'); ?>';
|
var error_category = '<?php echo __('Error loading category'); ?>';
|
||||||
var error_categories = '<?php echo __('Error loading categories'); ?>';
|
var error_categories = '<?php echo __('Error loading categories'); ?>';
|
||||||
|
@ -101,7 +101,7 @@ $output .= '<p id="description_task">';
|
|||||||
$output .= __($str);
|
$output .= __($str);
|
||||||
$output .= '<br><br>';
|
$output .= '<br><br>';
|
||||||
$output .= __('You can get more plugins in our');
|
$output .= __('You can get more plugins in our');
|
||||||
$output .= '<a href="http://pandorafms.com/Library/Library/">';
|
$output .= '<a href="https://pandorafms.com/Library/Library/">';
|
||||||
$output .= ' '.__('Public Resource Library');
|
$output .= ' '.__('Public Resource Library');
|
||||||
$output .= '</a>';
|
$output .= '</a>';
|
||||||
$output .= '</p>';
|
$output .= '</p>';
|
||||||
|
@ -14,6 +14,7 @@ Variables from PHP:
|
|||||||
- error_search
|
- error_search
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
const REMOTE_MODULE_LIBRARY_URI = "https://pandorafms.com/library/";
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// Save categories in sessionStorage to avoid making the request to the API many times.
|
// Save categories in sessionStorage to avoid making the request to the API many times.
|
||||||
function set_local_categories() {
|
function set_local_categories() {
|
||||||
@ -100,8 +101,7 @@ $(document).ready(function() {
|
|||||||
// Get all categories from Module library.
|
// Get all categories from Module library.
|
||||||
function get_all_categories() {
|
function get_all_categories() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:
|
url: REMOTE_MODULE_LIBRARY_URI + "wp-json/wp/v2/categories?per_page=100",
|
||||||
"https://pandorafms.com/library/wp-json/wp/v2/categories?per_page=100",
|
|
||||||
type: "GET",
|
type: "GET",
|
||||||
cache: false,
|
cache: false,
|
||||||
crossDomain: true,
|
crossDomain: true,
|
||||||
@ -127,10 +127,9 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
var api_url = "";
|
var api_url = "";
|
||||||
if (selector == "search") {
|
if (selector == "search") {
|
||||||
api_url = "https://pandorafms.com/library/wp-json/wp/v2/posts?search=";
|
api_url = REMOTE_MODULE_LIBRARY_URI + "wp-json/wp/v2/posts?search=";
|
||||||
} else if (selector == "category") {
|
} else if (selector == "category") {
|
||||||
api_url =
|
api_url = REMOTE_MODULE_LIBRARY_URI + "wp-json/wp/v2/posts/?categories=";
|
||||||
"https://pandorafms.com/library/wp-json/wp/v2/posts/?categories=";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -238,7 +237,7 @@ $(document).ready(function() {
|
|||||||
/* Print main page */
|
/* Print main page */
|
||||||
function library_main() {
|
function library_main() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "https://pandorafms.com/library/wp-json/wp/v2/pages/121",
|
url: REMOTE_MODULE_LIBRARY_URI + "wp-json/wp/v2/pages/121",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
cache: false,
|
cache: false,
|
||||||
crossDomain: true,
|
crossDomain: true,
|
||||||
@ -286,6 +285,8 @@ function library_main() {
|
|||||||
clean_page.splice(0, 1);
|
clean_page.splice(0, 1);
|
||||||
|
|
||||||
$.each(clean_page, function(i, v) {
|
$.each(clean_page, function(i, v) {
|
||||||
|
// Clean et_pb_blurb WP tags.
|
||||||
|
v = v.replace(/([\[et_pb_blurb].*[\]](?=[A-z]))/g, "");
|
||||||
var main_category = $(
|
var main_category = $(
|
||||||
"#library_main_content div.library_main_category:nth-child(" + i + ")"
|
"#library_main_content div.library_main_category:nth-child(" + i + ")"
|
||||||
);
|
);
|
||||||
@ -314,7 +315,7 @@ function library_main() {
|
|||||||
// Get all data from one category. This is necessary to get the category name.
|
// Get all data from one category. This is necessary to get the category name.
|
||||||
function get_category(id) {
|
function get_category(id) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "https://pandorafms.com/library/wp-json/wp/v2/categories/" + id,
|
url: REMOTE_MODULE_LIBRARY_URI + "wp-json/wp/v2/categories/" + id,
|
||||||
type: "GET",
|
type: "GET",
|
||||||
cache: false,
|
cache: false,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user