/**
  * parametric_enqueue_scripts function.
  *
  * @access public
  * @return void
  */
 private function parametric_enqueue_scripts()
 {
     wp_register_script('knockout', WPV_URL . '/res/js/redesign/lib/knockout-2.2.1.debug.js', array(), '2.2.1');
     /**
      * Knockout binding handler for interop with jQuery.Sortable.
      *
      * See link below for more information.
      *
      * @since 1.7
      *
      * @link https://github.com/rniemeyer/knockout-sortable
      */
     wp_register_script('knockout-sortable', WPV_URL . '/res/js/lib/knockout-sortable.min.js', array('jquery', 'knockout'), '0.9.2');
     if (!wp_script_is('toolset-utils', 'registered')) {
         wp_register_script('toolset-utils', WPV_URL_EMBEDDED . "/common/utility/js/utils.js", array('jquery', 'underscore', 'backbone'), '1.0', true);
     }
     wp_register_script('wpv-parametric-admin-script', WPV_URL . '/res/js/redesign/views_parametric.js', array('jquery', 'toolset-utils', 'icl_editor-script', 'views-codemirror-script', 'knockout-sortable'), WPV_VERSION);
     wp_enqueue_script('knockout');
     wp_enqueue_script('wpv-parametric-admin-script');
     if (self::$is_localized) {
         wp_localize_script('wpv-parametric-admin-script', 'WPV_Parametric', array('WPV_URL' => WPV_URL, 'wpv_parametric_create_nonce' => wp_create_nonce('wpv_parametric_create_nonce'), 'wpv_parametric_submit_create_nonce' => wp_create_nonce('wpv_parametric_submit_create_nonce'), 'wpv_parametric_create_dialog_nonce' => wp_create_nonce('wpv_parametric_create_dialog_nonce'), 'wpv_view_filter_search_nonce' => wp_create_nonce('wpv_view_filter_post_search_nonce'), 'wpv_view_filter_search_delete_nonce' => wp_create_nonce("wpv_view_filter_post_search_delete_nonce"), 'wpv_view_filters_add_filter_nonce' => wp_create_nonce('wpv_view_filters_add_filter_nonce'), 'wpv_parametric_validate_post_relationship_tree' => wp_create_nonce('wpv_parametric_validate_post_relationship_tree'), 'view_id' => $this->view_id, 'is_wpml_active' => self::is_wpml_active(), 'view_purpose' => $this->get_view_type(), 'debug' => true, 'make_valid_selection' => __('Please make a valid selection.', 'wpv-views'), 'something_bad' => __("Something bad happened with shortcode building, check the console", 'wpv-views'), 'field_mandatory' => __('The value for "Refer to this field as" is mandatory, please provide one.', 'wpv-views'), 'relationship_tree_mandatory' => __('Please make a valid tree selection.'), 'basic_field_mandatory' => __('This field can not be left empty', 'wpv-views'), 'reserved_word' => __('" is a reserved word for ', 'wpv-views'), 'avoid_conflicts' => __('Change this value to avoid conflicts', 'wpv-views'), 'ajax_error' => __("Error: AJAX returned ", 'wpv-views'), 'error_generic' => __("Error: ", 'wpv-views'), 'db_insert_problem' => __("There are problems inserting your data. Check the console. ", 'wpv-views'), 'select_post_types' => __('Please select at least one post type to fiter by.', 'wpv-views'), 'data_loading_problem' => __('Something went wrong loading data ', 'wpv-views'), 'model_build_problem' => __('Something went wrong while building model.', 'wpv-views'), 'select_taxonomy_alert' => __('Select posts with taxonomy:', 'wpv-views'), 'select_taxonomy_alert_2' => __('the same as set by the URL parameter', 'wpv-views'), 'error_building_filter' => __("Something went wrong in building the filter ", 'wpv-views'), 'editing_manual_filter' => __('This filter appears to have been entered manually, so you cannot modify it with this editor. You can continue editing the shortcode manually or re-insert it using the Filters button.', 'wpv-views'), 'taxonomy' => __('Taxonomy', 'wpv-views'), 'basic_filters' => __('Basic filters', 'wpv-views'), 'relationship_select_tree' => __('Select one tree', 'wpv-views'), 'add_submit_shortcode_button' => __('Submit button', 'wpv-views'), 'add_submit_shortcode_button_label' => __('Submit', 'wpv-views'), 'add_toolbar_submit_button_title' => __('Use the submit button to get results based on the form values', 'wpv-views'), 'add_toolbar_submit_button_title_complete' => __('This form has a submit button already', 'wpv-views'), 'add_toolbar_submit_button_title_incomplete' => __('You need to add a submit button', 'wpv-views'), 'add_toolbar_submit_button_title_irrelevant' => __('You do not need a submit button in this form', 'wpv-views'), 'add_toolbar_submit_button_title_irrelevant_added' => __('You do not need a submit button in this form, although you already have one', 'wpv-views'), 'add_reset_shortcode_button' => __('Clear form', 'wpv-views'), 'add_reset_shortcode_button_label' => __('Clear', 'wpv-views'), 'add_toolbar_reset_button_title' => __('You can use a reset button that will take the search form to its original state', 'wpv-views'), 'add_toolbar_reset_button_title_complete' => __('This form has a reset button already', 'wpv-views'), 'add_toolbar_reset_button_title_incomplete' => __('You can add a reset button to this form', 'wpv-views'), 'add_spinner_shortcode_button' => __('Spinner graphics', 'wpv-views'), 'add_toolbar_spinner_button_title' => __('You can use a spinner container that will be shown when performing any automatic update', 'wpv-views'), 'add_toolbar_spinner_button_title_complete' => __('This form has a spinner container already', 'wpv-views'), 'add_toolbar_spinner_button_title_useless' => __('No spinner container will be shown as this parametric search is not performing any automatic update', 'wpv-views'), 'add_search_shortcode_button' => __('Content search', 'wpv-views'), 'add_toolbar_search_button_title' => __('You can add a search box to this form', 'wpv-views'), 'add_toolbar_search_button_title_complete' => __('This form contains a search box already', 'wpv-views'), 'add_toolbar_search_button_title_missing' => __('You have a search box in this form, click here to create the search filter that is missing', 'wpv-views'), 'add_toolbar_search_button_title_wrong' => __('You have a search box in this form, but it is linked to a broken search filter', 'wpv-views'), 'add_submit_button_to_shortcode_input_default' => __('Search', 'wpv-views'), 'pointer_button_close' => __('Close', 'wpv-views'), 'pointer_button_dismiss' => __('Don\'t show again', 'wpv-views'), 'consider_adding_label_to_button_shortcode' => __('Consider adding a label before inserting the button.', 'wpv-views'), 'place_cursor_inside_wpv_controls' => __('Place cursor within the [wpv-filter-controls][/wpv-filter-controls] tags.', 'wpv-views'), 'place_cursor_inside_wpv_filter' => __('Place cursor within the [wpv-filter-start][wpv-filter-end] tags.', 'wpv-views'), 'place_cursor_inside_wpv_control' => __('Place your cursor inside [wpv-control] tags.', 'wpv-views'), 'place_in_wpv_control_not_wrong' => __("You should select a [wpv-control] short tag instead of ", 'wpv-views'), 'place_cursor_inside_valid_control_shortcodes' => __('Place your cursor over a [wpv-control] or a [wpv-control-set] tag to edit it.', 'wpv-views'), 'place_cursor_inside_wpv_control_set' => __('To edit this filter, place your cursor over the [wpv-control-set] tag.', 'wpv-views'), 'cursorInside' => __('Warning: the cursor is inside another short code, this may cause problems.', 'wpv-views'), 'cancel' => __('Cancel', 'wpv-views'), 'edit_filter_field' => __('Edit filter field', 'wpv-views'), 'update_input' => __('Update input', 'wpv-views'), 'problems_inserting_new_shortcode' => __('There are problems inserting the shortcode.', 'wpv-views'), 'add_submit_input_label' => __('Button label:', 'wpv-views'), 'add_submit_classname_input_label' => __('Button classname:', 'wpv-views'), 'expand_button_expand' => __('Expand', 'wpv-views'), 'expand_button_hide' => __('Hide', 'wpv-views'), 'check_values_and_values_labels' => __('Please ensure that values don\'t repeat themselves, they don\'t contain only whitespaces (however blank value is allowed) and display values aren\'t empty.', 'wpv-views'), 'ajax_callback_undefined' => __('You should define a callback for your ajax call to async load data', 'wpv-views')));
     }
     self::$is_localized = true;
     if (!wp_style_is('toolset-notifications-css')) {
         wp_register_style('toolset-notifications-css', WPV_URL_EMBEDDED . '/common/utility/css/notifications.css', array(), WPV_VERSION);
         wp_enqueue_style('toolset-notifications-css');
     }
 }
 /**
  * parametric_enqueue_scripts function.
  *
  * @access public
  * @return void
  */
 private function parametric_enqueue_scripts()
 {
     wp_register_script('knockout', WPV_URL . '/res/js/redesign/lib/knockout-2.2.1.debug.js', array(), '2.2.1');
     wp_register_script('wpv-parametric-admin-script', WPV_URL . '/res/js/redesign/views_parametric.js', array('jquery', 'icl_editor-script', 'views-codemirror-script'), WPV_VERSION);
     wp_enqueue_script('knockout');
     wp_enqueue_script('wpv-parametric-admin-script');
     if (self::$is_localized) {
         wp_localize_script('wpv-parametric-admin-script', 'WPV_Parametric', array('WPV_URL' => WPV_URL, 'wpv_parametric_create_nonce' => wp_create_nonce('wpv_parametric_create_nonce'), 'wpv_parametric_submit_create_nonce' => wp_create_nonce('wpv_parametric_submit_create_nonce'), 'wpv_parametric_create_dialog_nonce' => wp_create_nonce('wpv_parametric_create_dialog_nonce'), 'wpv_view_filter_search_nonce' => wp_create_nonce('wpv_view_filter_search_nonce'), 'wpv_view_filter_search_delete_nonce' => wp_create_nonce("wpv_view_filter_search_delete_nonce"), 'wpv_view_filters_add_filter_nonce' => wp_create_nonce('wpv_view_filters_add_filter_nonce'), 'view_id' => $this->view_id, 'is_wpml_active' => self::is_wpml_active(), 'view_purpose' => $this->get_view_type(), 'debug' => true, 'make_valid_selection' => __('Please make a valid selection.', 'wpv-views'), 'something_bad' => __("Something bad happend with shortcode building, check the console", 'wpv-views'), 'field_mandatory' => __('The value for "Refer to this field as" is mandatory, please provide one.', 'wpv-vies'), 'reserved_word' => __('" is a reserved word for ', 'wpv-views'), 'avoid_conflicts' => __('Change this value to avoid conflicts', 'wpv-views'), 'ajax_error' => __("Error: AJAX returned ", 'wpv-views'), 'error_generic' => __("Error: ", 'wpv-views'), 'db_insert_problem' => __("There are problems inserting your data. Check the console. ", 'wpv-views'), 'select_post_types' => __('Please select at least one post type to fiter by.', 'wpv-views'), 'data_loading_problem' => __('Something went wrong loading data ', 'wpv-views'), 'model_build_problem' => __('Something went wrong while bulding model.', 'wpv-views'), 'select_taxonomy_alert' => __('Select posts with taxonomy:', 'wpv-views'), 'select_taxonomy_alert_2' => __('the same as set by the URL parameter', 'wpv-views'), 'error_building_filter' => __("Something went wrong in building the filter ", 'wpv-views'), 'add_submit_shortcode_button' => __('Submit button', 'wpv-views'), 'add_submit_button_to_shortcode_label' => __('Insert input', 'wpv-views'), 'add_submit_button_to_shortcode_input_default' => __('Search', 'wpv-views'), 'consider_adding_label_to_submit_shortcode' => __('Consider adding a label before inserting submit button.', 'wpv-views'), 'add_submit_button_to_shortcode_header' => __('Create submit button for form.', 'wpv-views'), 'place_cursor_inside_wpv_controls' => __('Place cursor within [wpv-filter-controls][/wpv-filter-controls] tags.', 'wpv-views'), 'place_cursor_inside_wpv_control' => __('Place cursor inside [wpv-control] tags.', 'wpv-views'), 'place_in_wpv_control_not_wrong' => __("You should select a [wpv-control] short tag instead of ", 'wpv-views'), 'add_search_shortcode_button' => __('Search', 'wpv-views'), 'no_submit_button' => __('There is no submit button in the form just created. Use "Submit button" button to create one.', 'wpv-views'), 'cursorInside' => __('Warning: the cursor is inside another short code, this may cause problems.', 'wpv-views'), 'cancel' => __('Cancel', 'wpv-views'), 'edit_filter_field' => __('Edit filter field', 'wpv-views'), 'update_input' => __('Update input', 'wpv-views'), 'problems_inserting_new_shortcode' => __('There are problems inserting the shortcode.', 'wpv-views'), 'add_submit_input_label' => __('Button label:', 'wpv-views'), 'add_submit_classname_input_label' => __('Button classname:', 'wpv-views'), 'expand_button_expand' => __('Expand', 'wpv-views'), 'expand_button_hide' => __('Hide', 'wpv-views'), 'check_values_and_values_labels' => __("Please provide at least one non-empty value, you are free to live some of them empty.", 'wpv-views'), 'ajax_callback_undefined' => __('You should define a callback for your ajax call to async load data', 'wpv-views'), 'view_has_already_a_search' => __("This View already has a content search filter. If you insert a search control to the HTML, the existing search filter will be removed.", 'wpv-views')));
     }
     self::$is_localized = true;
 }