From e28879279a825585d1c64acd43ba7ab56e36c025 Mon Sep 17 00:00:00 2001 From: Matt Boynes Date: Wed, 14 Jan 2015 13:34:04 -0500 Subject: [PATCH] Re-init sortables on tab switch --- fieldmanager.php | 2 +- js/fieldmanager.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fieldmanager.php b/fieldmanager.php index 9de02248f5..2b5b9b1b79 100644 --- a/fieldmanager.php +++ b/fieldmanager.php @@ -100,7 +100,7 @@ function fieldmanager_load_file( $file ) { * Enqueue CSS and JS in the Dashboard. */ function fieldmanager_enqueue_scripts() { - wp_enqueue_script( 'fieldmanager_script', fieldmanager_get_baseurl() . 'js/fieldmanager.js', array( 'jquery' ), '1.0.5' ); + wp_enqueue_script( 'fieldmanager_script', fieldmanager_get_baseurl() . 'js/fieldmanager.js', array( 'jquery' ), '1.0.6' ); wp_enqueue_style( 'fieldmanager_style', fieldmanager_get_baseurl() . 'css/fieldmanager.css', array(), '1.0.1' ); wp_enqueue_script( 'jquery-ui-sortable' ); } diff --git a/js/fieldmanager.js b/js/fieldmanager.js index 04adfaeefe..3360288c14 100644 --- a/js/fieldmanager.js +++ b/js/fieldmanager.js @@ -194,6 +194,8 @@ $( document ).ready( function () { init_label_macros(); init_sortable(); + + $( document ).on( 'fm_activate_tab', init_sortable ); } ); } )( jQuery );