Permalink
Browse files

Merge branch 'release/6.7.x' into develop

# Conflicts:
#	inc/widgets/widgets.ctrl.php
#	rsc/js/build/bootstrap-evo_backoffice.bmin.js
#	rsc/js/build/evo_backoffice.bmin.js
  • Loading branch information...
2 parents f5d8b9c + 8bdf933 commit 7aacbef2ba14e0d881396f3e8eed2d01b5188bfb @yurabakhtin yurabakhtin committed Oct 12, 2016
View
@@ -263,6 +263,7 @@ module.exports = function(grunt) {
'rsc/js/extracats.js',
'rsc/js/dynamic_select.js',
'rsc/js/backoffice.js',
+ 'rsc/js/blog_widgets.js',
'rsc/js/src/evo_modal_window.js',
'rsc/js/src/evo_images.js',
'rsc/js/src/evo_user_crop.js',
@@ -288,6 +289,7 @@ module.exports = function(grunt) {
'rsc/js/extracats.js',
'rsc/js/dynamic_select.js',
'rsc/js/backoffice.js',
+ 'rsc/js/blog_widgets.js',
'rsc/js/src/bootstrap-evo_modal_window.js',
'rsc/js/src/evo_images.js',
'rsc/js/src/evo_user_crop.js',
@@ -21,7 +21,7 @@
* Release date (ISO)
* @global string
*/
-$app_date = '2016-10-11';
+$app_date = '2016-10-12';
/**
* Long version string for checking differences
@@ -279,9 +279,15 @@
send_javascript_message( $methods, true );
break;
}
- $action = 'list';
- $Session->set( 'fadeout_id', $edited_ComponentWidget->ID );
- header_redirect( '?ctrl=widgets&blog='.$Blog->ID, 303 );
+ if( $action == 'update_edit' )
+ { // Stay on edit widget form:
+ header_redirect( $admin_url.'?ctrl=widgets&blog='.$Blog->ID.'&action=edit&wi_ID='.$edited_ComponentWidget->ID, 303 );
+ }
+ else
+ { // Redirect to widgets list:
+ $Session->set( 'fadeout_id', $edited_ComponentWidget->ID );
+ header_redirect( $admin_url.'?ctrl=widgets&blog='.$Blog->ID, 303 );
+ }
}
elseif( $display_mode == 'js' )
{ // send errors back as js
@@ -594,7 +600,6 @@
var b2evo_dispatcher_url = "'.$admin_url.'";' );
require_js( '#jqueryUI#' ); // auto requires jQuery
- require_js( 'blog_widgets.js' );
require_css( 'blog_widgets.css' );
@@ -1,5 +1,10 @@
/**
* Server communication functions - widgets javascript interface
+ * This file contains JS code to work with collection widgets in back-office:
+ * - Add new widget in list
+ * - Sort widgets in list by drag and drop
+ * - Edit widget in modal window
+ *
* This file is part of the evoCore framework - {@link http://evocore.net/}
* See also {@link https://github.com/b2evolution/b2evolution}.
* @author yabs - http://innervisions.org.uk/
@@ -62,7 +67,10 @@ jQuery(document).ready( function()
delete_icon_tag = jQuery( '.delete_icon_hook' ).find( 'a' ).html();// grab the delete icon
//get crumb url from delete url and then add it in toggleWidget
crumb_url = jQuery( '.delete_icon_hook' ).find( 'a' ).attr('href');
- crumb_url = crumb_url.match(/crumb_.*?$/);
+ if( typeof( crumb_url ) != 'undefined' )
+ {
+ crumb_url = crumb_url.match(/crumb_.*?$/);
+ }
// Modify the current widgets screen
// remove the "no widgets yet" placeholder:
jQuery( ".new_widget" ).parent().parent().remove();
@@ -358,7 +366,7 @@ function getWidgetOrder()
containers_list += container+',';
}
- var r = 'blog='+blog+'&'+query_string+'container_list='+containers_list;
+ var r = ( typeof( blog ) != 'undefined' ? 'blog='+blog : '' ) +'&'+query_string+'container_list='+containers_list;
// console.log( r );
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 7aacbef

Please sign in to comment.