Version Description
Download this release
Release Info
Developer | justinbusa |
Plugin | WordPress Page Builder – Beaver Builder |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.8 to 1.5.0
- changelog.txt +32 -0
- classes/class-fl-builder-admin-settings.php +76 -0
- classes/class-fl-builder-model.php +113 -9
- classes/class-fl-builder-module.php +13 -4
- classes/class-fl-builder.php +7 -0
- css/bootstrap-tour-standalone.min.css +26 -0
- css/fl-builder-admin-settings.css +13 -0
- css/fl-builder-layout.css +1 -0
- css/fl-builder.css +111 -0
- fl-builder.php +2 -2
- includes/js-config.php +34 -2
- includes/row-video.php +5 -1
- includes/ui.php +6 -3
- includes/updater-config.php +1 -1
- includes/updater/classes/class-fl-updater.php +1 -1
- js/bootstrap-tour-standalone.min.js +22 -0
- js/fl-builder-admin-settings.js +27 -0
- js/fl-builder-layout.js +61 -0
- js/fl-builder-preview.js +4 -2
- js/fl-builder-tour.js +259 -0
- js/fl-builder.js +199 -42
- languages/ar.mo +0 -0
- languages/ar.po +3474 -0
- languages/es_ES.mo +0 -0
- languages/es_ES.po +3987 -0
- languages/it_IT.mo +0 -0
- languages/it_IT.po +231 -274
- languages/sk_SK.mo +0 -0
- languages/sk_SK.po +691 -396
- languages/xx_XX.mo +0 -0
- languages/xx_XX.pot +664 -396
changelog.txt
CHANGED
@@ -1,3 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<h4>1.4.8 - 02/22/2015</h4>
|
2 |
<p><strong>Enhancements</strong></p>
|
3 |
<ul>
|
1 |
+
<h4>1.5.0 - 03/02/2015</h4>
|
2 |
+
<p><strong>Enhancements</strong></p>
|
3 |
+
<ul>
|
4 |
+
<li>Updated Slovak translation.</li>
|
5 |
+
</ul>
|
6 |
+
<p><strong>Bug Fixes</strong></p>
|
7 |
+
<ul>
|
8 |
+
<li>Fixed a bug with the JavaScript for smooth scrolling links.</li>
|
9 |
+
<li>Fixed a spelling error in the help tour. Thanks Gerard!</li>
|
10 |
+
</ul>
|
11 |
+
|
12 |
+
<h4>1.4.9 - 03/01/2015</h4>
|
13 |
+
<p><strong>Enhancements</strong></p>
|
14 |
+
<ul>
|
15 |
+
<li>Added a help button to the builder interface that gives users access to a tour, video (coming soon), forums and documentation.</li>
|
16 |
+
<li>Added network settings for white labeling the help button. Agency members can customize or disable all help button features such as adding their own video or knowledge base links. Unfortunately, the tour is too complex to make customizable, but it can be disabled and is disabled by default while in simple editing mode.</li>
|
17 |
+
<li>Added a welcome message for the first time a user launchs the builder on a site asking if they would like to view the tour.</li>
|
18 |
+
<li>Added a new style setting to the button module for creating flat, gradient or transparent buttons.</li>
|
19 |
+
<li>Added Arabic and Spanish translations.</li>
|
20 |
+
<li>Added display:inline to builder images to prevent themes that set images to display:block from breaking alignment.</li>
|
21 |
+
<li>Added JavaScript logic for smooth scrolling of all anchor links in a builder layout.</li>
|
22 |
+
</ul>
|
23 |
+
<p><strong>Bug Fixes</strong></p>
|
24 |
+
<ul>
|
25 |
+
<li>Row overlay actions are now fixed to the bottom of the overlay if the actions are hidden by the builder header or are off the page.</li>
|
26 |
+
<li>Fixed a bug with background video fallbacks not showing on mobile.</li>
|
27 |
+
<li>Fixed a bug with custom modules on Windows servers.</li>
|
28 |
+
<li>Fixed a CSS bug with the callout module when the photo sits to the left of the text.</li>
|
29 |
+
<li>Fixed a bug that prevented the builder from working with domain masking.</li>
|
30 |
+
<li>Fixed a bug caused by W3 Total Cache's HTML minification by disabling minify while the builder is active.</li>
|
31 |
+
</ul>
|
32 |
+
|
33 |
<h4>1.4.8 - 02/22/2015</h4>
|
34 |
<p><strong>Enhancements</strong></p>
|
35 |
<ul>
|
classes/class-fl-builder-admin-settings.php
CHANGED
@@ -146,6 +146,10 @@ final class FLBuilderAdminSettings {
|
|
146 |
'title' => __( 'Branding', 'fl-builder' ),
|
147 |
'show' => self::has_support( 'branding' ) && ( is_network_admin() || ! self::multisite_support() )
|
148 |
),
|
|
|
|
|
|
|
|
|
149 |
'uninstall' => array(
|
150 |
'title' => __( 'Uninstall', 'fl-builder' ),
|
151 |
'show' => is_network_admin() || ! self::multisite_support()
|
@@ -192,6 +196,9 @@ final class FLBuilderAdminSettings {
|
|
192 |
// Branding
|
193 |
self::render_form( 'branding' );
|
194 |
|
|
|
|
|
|
|
195 |
// Uninstall
|
196 |
self::render_form( 'uninstall' );
|
197 |
}
|
@@ -272,6 +279,7 @@ final class FLBuilderAdminSettings {
|
|
272 |
self::save_enabled_icons();
|
273 |
self::save_editing_capability();
|
274 |
self::save_branding();
|
|
|
275 |
self::uninstall();
|
276 |
}
|
277 |
|
@@ -519,6 +527,74 @@ final class FLBuilderAdminSettings {
|
|
519 |
}
|
520 |
}
|
521 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
522 |
/**
|
523 |
* @method uninstall
|
524 |
* @private
|
146 |
'title' => __( 'Branding', 'fl-builder' ),
|
147 |
'show' => self::has_support( 'branding' ) && ( is_network_admin() || ! self::multisite_support() )
|
148 |
),
|
149 |
+
'help-button' => array(
|
150 |
+
'title' => __( 'Help Button', 'fl-builder' ),
|
151 |
+
'show' => self::has_support( 'help-button' ) && ( is_network_admin() || ! self::multisite_support() )
|
152 |
+
),
|
153 |
'uninstall' => array(
|
154 |
'title' => __( 'Uninstall', 'fl-builder' ),
|
155 |
'show' => is_network_admin() || ! self::multisite_support()
|
196 |
// Branding
|
197 |
self::render_form( 'branding' );
|
198 |
|
199 |
+
// Help Button
|
200 |
+
self::render_form( 'help-button' );
|
201 |
+
|
202 |
// Uninstall
|
203 |
self::render_form( 'uninstall' );
|
204 |
}
|
279 |
self::save_enabled_icons();
|
280 |
self::save_editing_capability();
|
281 |
self::save_branding();
|
282 |
+
self::save_help_button();
|
283 |
self::uninstall();
|
284 |
}
|
285 |
|
527 |
}
|
528 |
}
|
529 |
|
530 |
+
/**
|
531 |
+
* @method save_help_button
|
532 |
+
* @private
|
533 |
+
*/
|
534 |
+
static private function save_help_button()
|
535 |
+
{
|
536 |
+
if ( isset( $_POST['fl-help-button-nonce'] ) && wp_verify_nonce( $_POST['fl-help-button-nonce'], 'help-button' ) ) {
|
537 |
+
|
538 |
+
$settings = FLBuilderModel::get_help_button_defaults();
|
539 |
+
$settings['enabled'] = isset( $_POST['fl-help-button-enabled'] ) ? true : false;
|
540 |
+
$settings['tour'] = isset( $_POST['fl-help-tour-enabled'] ) ? true : false;
|
541 |
+
$settings['video'] = isset( $_POST['fl-help-video-enabled'] ) ? true : false;
|
542 |
+
$settings['knowledge_base'] = isset( $_POST['fl-knowledge-base-enabled'] ) ? true : false;
|
543 |
+
$settings['forums'] = isset( $_POST['fl-forums-enabled'] ) ? true : false;
|
544 |
+
|
545 |
+
// Disable everything if the main button is disabled.
|
546 |
+
if ( ! $settings['enabled'] ) {
|
547 |
+
$settings['tour'] = false;
|
548 |
+
$settings['video'] = false;
|
549 |
+
$settings['knowledge_base'] = false;
|
550 |
+
$settings['forums'] = false;
|
551 |
+
}
|
552 |
+
|
553 |
+
// Clean the video embed.
|
554 |
+
$video_embed = wp_kses( $_POST['fl-help-video-embed'], array(
|
555 |
+
'iframe' => array(
|
556 |
+
'src' => array(),
|
557 |
+
'frameborder' => array(),
|
558 |
+
'webkitallowfullscreen' => array(),
|
559 |
+
'mozallowfullscreen' => array(),
|
560 |
+
'allowfullscreen' => array()
|
561 |
+
)
|
562 |
+
));
|
563 |
+
|
564 |
+
// Save the video embed.
|
565 |
+
if ( ! empty( $video_embed ) && ! stristr( $video_embed, 'iframe' ) ) {
|
566 |
+
self::add_error( __( "Error! Please enter an iframe for the video embed code.", 'fl-builder' ) );
|
567 |
+
}
|
568 |
+
else if ( ! empty( $video_embed ) ) {
|
569 |
+
$settings['video_embed'] = $video_embed;
|
570 |
+
}
|
571 |
+
|
572 |
+
// Save the knowledge base URL.
|
573 |
+
if ( ! empty( $_POST['fl-knowledge-base-url'] ) ) {
|
574 |
+
$settings['knowledge_base_url'] = sanitize_text_field( $_POST['fl-knowledge-base-url'] );
|
575 |
+
}
|
576 |
+
|
577 |
+
// Save the forums URL.
|
578 |
+
if ( ! empty( $_POST['fl-forums-url'] ) ) {
|
579 |
+
$settings['forums_url'] = sanitize_text_field( $_POST['fl-forums-url'] );
|
580 |
+
}
|
581 |
+
|
582 |
+
// Make sure we have at least one help feature enabled.
|
583 |
+
if ( $settings['enabled'] && ! $settings['tour'] && ! $settings['video'] && ! $settings['knowledge_base'] && ! $settings['forums'] ) {
|
584 |
+
self::add_error( __( "Error! You must have at least one feature of the help button enabled.", 'fl-builder' ) );
|
585 |
+
return;
|
586 |
+
}
|
587 |
+
|
588 |
+
// Save the settings.
|
589 |
+
if ( is_network_admin() ) {
|
590 |
+
update_site_option( '_fl_builder_help_button', $settings );
|
591 |
+
}
|
592 |
+
else {
|
593 |
+
update_option( '_fl_builder_help_button', $settings );
|
594 |
+
}
|
595 |
+
}
|
596 |
+
}
|
597 |
+
|
598 |
/**
|
599 |
* @method uninstall
|
600 |
* @private
|
classes/class-fl-builder-model.php
CHANGED
@@ -361,6 +361,28 @@ final class FLBuilderModel {
|
|
361 |
return false;
|
362 |
}
|
363 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
/**
|
365 |
* Gets the status to use for working with nodes in
|
366 |
* the database. Returns draft if the builder is active,
|
@@ -1416,12 +1438,19 @@ final class FLBuilderModel {
|
|
1416 |
static public function get_categorized_modules()
|
1417 |
{
|
1418 |
$enabled_modules = self::get_enabled_modules();
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1425 |
|
1426 |
// Build the categories array.
|
1427 |
foreach(self::$modules as $module) {
|
@@ -1430,7 +1459,7 @@ final class FLBuilderModel {
|
|
1430 |
continue;
|
1431 |
}
|
1432 |
else if($module->slug == 'widget') {
|
1433 |
-
$categories[$
|
1434 |
}
|
1435 |
else if(isset($module->category)) {
|
1436 |
|
@@ -1441,7 +1470,7 @@ final class FLBuilderModel {
|
|
1441 |
$categories[$module->category][$module->name] = $module;
|
1442 |
}
|
1443 |
else {
|
1444 |
-
$categories[
|
1445 |
}
|
1446 |
}
|
1447 |
|
@@ -1459,6 +1488,33 @@ final class FLBuilderModel {
|
|
1459 |
return $categories;
|
1460 |
}
|
1461 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1462 |
/**
|
1463 |
* @method get_module
|
1464 |
*/
|
@@ -2637,6 +2693,50 @@ final class FLBuilderModel {
|
|
2637 |
}
|
2638 |
}
|
2639 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2640 |
/**
|
2641 |
* @method plugin_basename
|
2642 |
*/
|
@@ -2655,7 +2755,7 @@ final class FLBuilderModel {
|
|
2655 |
{
|
2656 |
if(current_user_can('delete_plugins')) {
|
2657 |
|
2658 |
-
// Delete builder
|
2659 |
delete_option('_fl_builder_settings');
|
2660 |
delete_option('_fl_builder_enabled_modules');
|
2661 |
delete_option('_fl_builder_enabled_templates');
|
@@ -2663,6 +2763,10 @@ final class FLBuilderModel {
|
|
2663 |
delete_option('_fl_builder_enabled_icons');
|
2664 |
delete_option('_fl_builder_branding');
|
2665 |
delete_option('_fl_builder_editing_capability');
|
|
|
|
|
|
|
|
|
2666 |
|
2667 |
// Delete uploaded files and folders.
|
2668 |
$upload_dir = self::get_upload_dir();
|
361 |
return false;
|
362 |
}
|
363 |
|
364 |
+
/**
|
365 |
+
* Checks to see if this is the first time
|
366 |
+
* a user has launched the builder.
|
367 |
+
*
|
368 |
+
* @method is_new_user
|
369 |
+
*/
|
370 |
+
static public function is_new_user()
|
371 |
+
{
|
372 |
+
if ( self::is_builder_active() ) {
|
373 |
+
|
374 |
+
$current_user = wp_get_current_user();
|
375 |
+
$launched = get_user_meta( $current_user->ID, '_fl_builder_launched', true );
|
376 |
+
|
377 |
+
if ( empty( $launched ) ) {
|
378 |
+
update_user_meta( $current_user->ID, '_fl_builder_launched', 1 );
|
379 |
+
return true;
|
380 |
+
}
|
381 |
+
}
|
382 |
+
|
383 |
+
return false;
|
384 |
+
}
|
385 |
+
|
386 |
/**
|
387 |
* Gets the status to use for working with nodes in
|
388 |
* the database. Returns draft if the builder is active,
|
1438 |
static public function get_categorized_modules()
|
1439 |
{
|
1440 |
$enabled_modules = self::get_enabled_modules();
|
1441 |
+
|
1442 |
+
// Get the core category keys.
|
1443 |
+
$basic_key = __('Basic Modules', 'fl-builder');
|
1444 |
+
$advanced_key = __('Advanced Modules', 'fl-builder');
|
1445 |
+
$other_key = __('Other Modules', 'fl-builder');
|
1446 |
+
$widgets_key = __('WordPress Widgets', 'fl-builder');
|
1447 |
+
|
1448 |
+
// Build the default category arrays.
|
1449 |
+
$categories = array();
|
1450 |
+
$categories[ $basic_key ] = array();
|
1451 |
+
$categories[ $advanced_key ] = array();
|
1452 |
+
$categories[ $other_key ] = array();
|
1453 |
+
$categories[ $widgets_key ] = array();
|
1454 |
|
1455 |
// Build the categories array.
|
1456 |
foreach(self::$modules as $module) {
|
1459 |
continue;
|
1460 |
}
|
1461 |
else if($module->slug == 'widget') {
|
1462 |
+
$categories[$widgets_key] = self::get_wp_widgets();
|
1463 |
}
|
1464 |
else if(isset($module->category)) {
|
1465 |
|
1470 |
$categories[$module->category][$module->name] = $module;
|
1471 |
}
|
1472 |
else {
|
1473 |
+
$categories[$other_key][$module->name] = $module;
|
1474 |
}
|
1475 |
}
|
1476 |
|
1488 |
return $categories;
|
1489 |
}
|
1490 |
|
1491 |
+
/**
|
1492 |
+
* @method get_module_category_slug
|
1493 |
+
*/
|
1494 |
+
static public function get_module_category_slug( $name )
|
1495 |
+
{
|
1496 |
+
// Get the core category keys.
|
1497 |
+
$basic_key = __('Basic Modules', 'fl-builder');
|
1498 |
+
$advanced_key = __('Advanced Modules', 'fl-builder');
|
1499 |
+
$other_key = __('Other Modules', 'fl-builder');
|
1500 |
+
$widgets_key = __('WordPress Widgets', 'fl-builder');
|
1501 |
+
|
1502 |
+
if ( $name == $basic_key ) {
|
1503 |
+
return 'basic';
|
1504 |
+
}
|
1505 |
+
if ( $name == $advanced_key ) {
|
1506 |
+
return 'advanced';
|
1507 |
+
}
|
1508 |
+
if ( $name == $other_key ) {
|
1509 |
+
return 'other';
|
1510 |
+
}
|
1511 |
+
if ( $name == $widgets_key ) {
|
1512 |
+
return 'widgets';
|
1513 |
+
}
|
1514 |
+
|
1515 |
+
return sanitize_html_class( $name );
|
1516 |
+
}
|
1517 |
+
|
1518 |
/**
|
1519 |
* @method get_module
|
1520 |
*/
|
2693 |
}
|
2694 |
}
|
2695 |
|
2696 |
+
/**
|
2697 |
+
* @method get_help_button_defaults
|
2698 |
+
*/
|
2699 |
+
static public function get_help_button_defaults()
|
2700 |
+
{
|
2701 |
+
$defaults = array(
|
2702 |
+
'enabled' => true,
|
2703 |
+
'tour' => true,
|
2704 |
+
'video' => false,
|
2705 |
+
'video_embed' => '<iframe width="420" height="315" src="https://www.youtube.com/embed/CNJbH2gaACo" frameborder="0" allowfullscreen></iframe>',
|
2706 |
+
'knowledge_base' => true,
|
2707 |
+
'knowledge_base_url' => 'https://www.wpbeaverbuilder.com/documentation/?utm_source=external&utm_medium=builder&utm_campaign=docs-button',
|
2708 |
+
'forums' => true,
|
2709 |
+
'forums_url' => 'https://www.wpbeaverbuilder.com/support/?utm_source=external&utm_medium=builder&utm_campaign=forums-button',
|
2710 |
+
);
|
2711 |
+
|
2712 |
+
return $defaults;
|
2713 |
+
}
|
2714 |
+
|
2715 |
+
/**
|
2716 |
+
* @method get_help_button_settings
|
2717 |
+
*/
|
2718 |
+
static public function get_help_button_settings()
|
2719 |
+
{
|
2720 |
+
$key = '_fl_builder_help_button';
|
2721 |
+
$defaults = self::get_help_button_defaults();
|
2722 |
+
|
2723 |
+
// Get the value.
|
2724 |
+
if ( is_network_admin() || class_exists( 'FLBuilderMultisiteSettings' ) ) {
|
2725 |
+
$value = get_site_option( $key );
|
2726 |
+
}
|
2727 |
+
else {
|
2728 |
+
$value = get_option( $key );
|
2729 |
+
}
|
2730 |
+
|
2731 |
+
// Return the value.
|
2732 |
+
if ( false === $value ) {
|
2733 |
+
return $defaults;
|
2734 |
+
}
|
2735 |
+
else {
|
2736 |
+
return $value;
|
2737 |
+
}
|
2738 |
+
}
|
2739 |
+
|
2740 |
/**
|
2741 |
* @method plugin_basename
|
2742 |
*/
|
2755 |
{
|
2756 |
if(current_user_can('delete_plugins')) {
|
2757 |
|
2758 |
+
// Delete builder options.
|
2759 |
delete_option('_fl_builder_settings');
|
2760 |
delete_option('_fl_builder_enabled_modules');
|
2761 |
delete_option('_fl_builder_enabled_templates');
|
2763 |
delete_option('_fl_builder_enabled_icons');
|
2764 |
delete_option('_fl_builder_branding');
|
2765 |
delete_option('_fl_builder_editing_capability');
|
2766 |
+
delete_option('_fl_builder_help_button');
|
2767 |
+
|
2768 |
+
// Delete builder user meta.
|
2769 |
+
delete_metadata('user', 0, '_fl_builder_launched', 1, true);
|
2770 |
|
2771 |
// Delete uploaded files and folders.
|
2772 |
$upload_dir = self::get_upload_dir();
|
classes/class-fl-builder-module.php
CHANGED
@@ -144,12 +144,21 @@ class FLBuilderModule {
|
|
144 |
$this->enabled = isset($params['enabled']) ? $params['enabled'] : true;
|
145 |
$this->editor_export = isset($params['editor_export']) ? $params['editor_export'] : true;
|
146 |
|
147 |
-
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
$this->dir = $dir_path . '/';
|
150 |
}
|
151 |
-
else if(stristr($dir_path,
|
152 |
-
$this->url = str_replace(
|
153 |
$this->dir = $dir_path . '/';
|
154 |
}
|
155 |
else {
|
144 |
$this->enabled = isset($params['enabled']) ? $params['enabled'] : true;
|
145 |
$this->editor_export = isset($params['editor_export']) ? $params['editor_export'] : true;
|
146 |
|
147 |
+
// We need to normalize the paths here since path comparisons
|
148 |
+
// break on Windows because they use backslashes.
|
149 |
+
$dir_path = str_replace( '\\', '/', $dir_path );
|
150 |
+
$stylesheet_directory = str_replace( '\\', '/', get_stylesheet_directory() );
|
151 |
+
$stylesheet_directory_uri = str_replace( '\\', '/', get_stylesheet_directory_uri() );
|
152 |
+
$template_directory = str_replace( '\\', '/', get_template_directory() );
|
153 |
+
$template_directory_uri = str_replace( '\\', '/', get_template_directory_uri() );
|
154 |
+
|
155 |
+
// Find the right paths.
|
156 |
+
if(is_child_theme() && stristr($dir_path, $stylesheet_directory)) {
|
157 |
+
$this->url = str_replace($stylesheet_directory, $stylesheet_directory_uri, $dir_path) . '/';
|
158 |
$this->dir = $dir_path . '/';
|
159 |
}
|
160 |
+
else if(stristr($dir_path, $template_directory)) {
|
161 |
+
$this->url = str_replace($template_directory, $template_directory_uri, $dir_path) . '/';
|
162 |
$this->dir = $dir_path . '/';
|
163 |
}
|
164 |
else {
|
classes/class-fl-builder.php
CHANGED
@@ -76,6 +76,9 @@ final class FLBuilder {
|
|
76 |
{
|
77 |
// Enable editing if the builder is active.
|
78 |
if(FLBuilderModel::is_builder_active()) {
|
|
|
|
|
|
|
79 |
|
80 |
// Remove 3rd party editor buttons.
|
81 |
remove_all_actions('media_buttons', 999999);
|
@@ -348,6 +351,7 @@ final class FLBuilder {
|
|
348 |
wp_enqueue_style('jquery-nanoscroller', $css_url . 'jquery.nanoscroller.css', array(), $ver);
|
349 |
wp_enqueue_style('jquery-autosuggest', $css_url . 'jquery.autoSuggest.min.css', array(), $ver);
|
350 |
wp_enqueue_style('jquery-tiptip', $css_url . 'jquery.tiptip.css', array(), $ver);
|
|
|
351 |
wp_enqueue_style('fl-color-picker', $css_url . 'colorpicker.css', array(), $ver);
|
352 |
wp_enqueue_style('fl-lightbox', $css_url . 'fl-lightbox.css', array(), $ver);
|
353 |
wp_enqueue_style('fl-icon-selector', $css_url . 'fl-icon-selector.css', array(), $ver);
|
@@ -378,6 +382,7 @@ final class FLBuilder {
|
|
378 |
wp_enqueue_script('jquery-tiptip', $js_url . 'jquery.tiptip.min.js', array(), $ver, true);
|
379 |
wp_enqueue_script('jquery-simulate', $js_url . 'jquery.simulate.js', array(), $ver, true);
|
380 |
wp_enqueue_script('jquery-validate', $js_url . 'jquery.validate.min.js', array(), $ver, true);
|
|
|
381 |
wp_enqueue_script('ace', $js_url . 'ace/ace.js', array(), $ver, true);
|
382 |
wp_enqueue_script('fl-color-picker', $js_url . 'colorpicker.js', array(), $ver, true);
|
383 |
wp_enqueue_script('fl-lightbox', $js_url . 'fl-lightbox.js', array(), $ver, true);
|
@@ -385,6 +390,7 @@ final class FLBuilder {
|
|
385 |
wp_enqueue_script('fl-stylesheet', $js_url . 'fl-stylesheet.js', array(), $ver, true);
|
386 |
wp_enqueue_script('fl-builder', $js_url . 'fl-builder.js', array(), $ver, true);
|
387 |
wp_enqueue_script('fl-builder-preview', $js_url . 'fl-builder-preview.js', array(), $ver, true);
|
|
|
388 |
|
389 |
/* Core template settings */
|
390 |
if(file_exists(FL_BUILDER_DIR . 'js/fl-template-settings.js')) {
|
@@ -450,6 +456,7 @@ final class FLBuilder {
|
|
450 |
$post_id = $wp_the_query->post->ID;
|
451 |
$categories = FLBuilderModel::get_categorized_modules();
|
452 |
$enabled_templates = FLBuilderModel::get_enabled_templates();
|
|
|
453 |
|
454 |
include FL_BUILDER_DIR . 'includes/ui.php';
|
455 |
include FL_BUILDER_DIR . 'includes/js-config.php';
|
76 |
{
|
77 |
// Enable editing if the builder is active.
|
78 |
if(FLBuilderModel::is_builder_active()) {
|
79 |
+
|
80 |
+
// Tell W3TC not to minify while the builder is active.
|
81 |
+
define( 'DONOTMINIFY', true );
|
82 |
|
83 |
// Remove 3rd party editor buttons.
|
84 |
remove_all_actions('media_buttons', 999999);
|
351 |
wp_enqueue_style('jquery-nanoscroller', $css_url . 'jquery.nanoscroller.css', array(), $ver);
|
352 |
wp_enqueue_style('jquery-autosuggest', $css_url . 'jquery.autoSuggest.min.css', array(), $ver);
|
353 |
wp_enqueue_style('jquery-tiptip', $css_url . 'jquery.tiptip.css', array(), $ver);
|
354 |
+
wp_enqueue_style('bootstrap-tour', $css_url . 'bootstrap-tour-standalone.min.css', array(), $ver);
|
355 |
wp_enqueue_style('fl-color-picker', $css_url . 'colorpicker.css', array(), $ver);
|
356 |
wp_enqueue_style('fl-lightbox', $css_url . 'fl-lightbox.css', array(), $ver);
|
357 |
wp_enqueue_style('fl-icon-selector', $css_url . 'fl-icon-selector.css', array(), $ver);
|
382 |
wp_enqueue_script('jquery-tiptip', $js_url . 'jquery.tiptip.min.js', array(), $ver, true);
|
383 |
wp_enqueue_script('jquery-simulate', $js_url . 'jquery.simulate.js', array(), $ver, true);
|
384 |
wp_enqueue_script('jquery-validate', $js_url . 'jquery.validate.min.js', array(), $ver, true);
|
385 |
+
wp_enqueue_script('bootstrap-tour', $js_url . 'bootstrap-tour-standalone.min.js', array(), $ver, true);
|
386 |
wp_enqueue_script('ace', $js_url . 'ace/ace.js', array(), $ver, true);
|
387 |
wp_enqueue_script('fl-color-picker', $js_url . 'colorpicker.js', array(), $ver, true);
|
388 |
wp_enqueue_script('fl-lightbox', $js_url . 'fl-lightbox.js', array(), $ver, true);
|
390 |
wp_enqueue_script('fl-stylesheet', $js_url . 'fl-stylesheet.js', array(), $ver, true);
|
391 |
wp_enqueue_script('fl-builder', $js_url . 'fl-builder.js', array(), $ver, true);
|
392 |
wp_enqueue_script('fl-builder-preview', $js_url . 'fl-builder-preview.js', array(), $ver, true);
|
393 |
+
wp_enqueue_script('fl-builder-tour', $js_url . 'fl-builder-tour.js', array(), $ver, true);
|
394 |
|
395 |
/* Core template settings */
|
396 |
if(file_exists(FL_BUILDER_DIR . 'js/fl-template-settings.js')) {
|
456 |
$post_id = $wp_the_query->post->ID;
|
457 |
$categories = FLBuilderModel::get_categorized_modules();
|
458 |
$enabled_templates = FLBuilderModel::get_enabled_templates();
|
459 |
+
$help_button = FLBuilderModel::get_help_button_settings();
|
460 |
|
461 |
include FL_BUILDER_DIR . 'includes/ui.php';
|
462 |
include FL_BUILDER_DIR . 'includes/js-config.php';
|
css/bootstrap-tour-standalone.min.css
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* ========================================================================
|
2 |
+
* bootstrap-tour - v0.10.1
|
3 |
+
* http://bootstraptour.com
|
4 |
+
* ========================================================================
|
5 |
+
* Copyright 2012-2013 Ulrich Sossou
|
6 |
+
*
|
7 |
+
* ========================================================================
|
8 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9 |
+
* you may not use this file except in compliance with the License.
|
10 |
+
* You may obtain a copy of the License at
|
11 |
+
*
|
12 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13 |
+
*
|
14 |
+
* Unless required by applicable law or agreed to in writing, software
|
15 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17 |
+
* See the License for the specific language governing permissions and
|
18 |
+
* limitations under the License.
|
19 |
+
* ========================================================================
|
20 |
+
*/
|
21 |
+
|
22 |
+
/*!
|
23 |
+
* Bootstrap v3.1.0 (http://getbootstrap.com)
|
24 |
+
* Copyright 2011-2014 Twitter, Inc.
|
25 |
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
26 |
+
*/.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:400;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{position:absolute;z-index:-1;opacity:0;filter:alpha(opacity=0)}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.tour-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1100;background-color:#000;opacity:.8;filter:alpha(opacity=80)}.tour-step-backdrop{position:relative;z-index:1101;background:inherit}.tour-step-backdrop>td{position:relative;z-index:1101}.tour-step-background{position:absolute!important;z-index:1100;background:inherit;border-radius:6px}.popover[class*=tour-]{z-index:1100}.popover[class*=tour-] .popover-navigation{padding:9px 14px}.popover[class*=tour-] .popover-navigation [data-role=end]{float:right}.popover[class*=tour-] .popover-navigation [data-role=prev],.popover[class*=tour-] .popover-navigation [data-role=next],.popover[class*=tour-] .popover-navigation [data-role=end]{cursor:pointer}.popover[class*=tour-] .popover-navigation [data-role=prev].disabled,.popover[class*=tour-] .popover-navigation [data-role=next].disabled,.popover[class*=tour-] .popover-navigation [data-role=end].disabled{cursor:default}.popover[class*=tour-].orphan{position:fixed;margin-top:0}.popover[class*=tour-].orphan .arrow{display:none}
|
css/fl-builder-admin-settings.css
CHANGED
@@ -58,6 +58,9 @@
|
|
58 |
margin-top: 15px;
|
59 |
width: 78%;
|
60 |
}
|
|
|
|
|
|
|
61 |
|
62 |
/* Settings Forms
|
63 |
----------------------------------------------------------- */
|
@@ -97,6 +100,16 @@
|
|
97 |
color: #d34e2a;
|
98 |
}
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
/* Media Query - Max Width 900px
|
101 |
----------------------------------------------------------- */
|
102 |
|
58 |
margin-top: 15px;
|
59 |
width: 78%;
|
60 |
}
|
61 |
+
.fl-settings-form-content h4 {
|
62 |
+
font-size: 14px;
|
63 |
+
}
|
64 |
|
65 |
/* Settings Forms
|
66 |
----------------------------------------------------------- */
|
100 |
color: #d34e2a;
|
101 |
}
|
102 |
|
103 |
+
/* Help Button
|
104 |
+
----------------------------------------------------------- */
|
105 |
+
|
106 |
+
.fl-help-button-settings,
|
107 |
+
.fl-help-video-embed,
|
108 |
+
.fl-knowledge-base-url,
|
109 |
+
.fl-forums-url {
|
110 |
+
display: none;
|
111 |
+
}
|
112 |
+
|
113 |
/* Media Query - Max Width 900px
|
114 |
----------------------------------------------------------- */
|
115 |
|
css/fl-builder-layout.css
CHANGED
@@ -251,6 +251,7 @@
|
|
251 |
line-height: 0;
|
252 |
}
|
253 |
.fl-photo-content img {
|
|
|
254 |
height: auto !important;
|
255 |
max-width: 100%;
|
256 |
width: auto !important;
|
251 |
line-height: 0;
|
252 |
}
|
253 |
.fl-photo-content img {
|
254 |
+
display: inline;
|
255 |
height: auto !important;
|
256 |
max-width: 100%;
|
257 |
width: auto !important;
|
css/fl-builder.css
CHANGED
@@ -39,8 +39,10 @@ html.fl-builder-edit {
|
|
39 |
/* Simple UI
|
40 |
------------------------------------------------------ */
|
41 |
|
|
|
42 |
.fl-builder-simple .fl-builder-tools-button,
|
43 |
.fl-builder-simple .fl-builder-add-content-button,
|
|
|
44 |
.fl-builder-simple .fl-builder-panel,
|
45 |
.fl-builder-simple .fl-block-overlay-actions .fl-block-move,
|
46 |
.fl-builder-simple .fl-block-overlay-actions .fl-block-copy,
|
@@ -118,6 +120,17 @@ html.fl-builder-edit {
|
|
118 |
line-height: 11px !important;
|
119 |
height: 24px;
|
120 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
/* Builder Bar
|
123 |
------------------------------------------------------ */
|
@@ -435,11 +448,23 @@ html.fl-builder-edit {
|
|
435 |
-moz-box-sizing: border-box !important;
|
436 |
-webkit-box-sizing: border-box !important;
|
437 |
color: #fff;
|
|
|
438 |
position: absolute;
|
439 |
top: -30px;
|
440 |
width: 100%;
|
441 |
z-index: 100006;
|
442 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
.fl-block-overlay-active .fl-row-content {
|
444 |
position: relative;
|
445 |
z-index: 100007;
|
@@ -1279,4 +1304,90 @@ li.as-result-item em {
|
|
1279 |
/* Loop Builder */
|
1280 |
.fl-loop-builder-filter {
|
1281 |
display: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1282 |
}
|
39 |
/* Simple UI
|
40 |
------------------------------------------------------ */
|
41 |
|
42 |
+
.fl-builder-simple .fl-builder-templates-button,
|
43 |
.fl-builder-simple .fl-builder-tools-button,
|
44 |
.fl-builder-simple .fl-builder-add-content-button,
|
45 |
+
.fl-builder-simple .fl-builder-help-button,
|
46 |
.fl-builder-simple .fl-builder-panel,
|
47 |
.fl-builder-simple .fl-block-overlay-actions .fl-block-move,
|
48 |
.fl-builder-simple .fl-block-overlay-actions .fl-block-copy,
|
120 |
line-height: 11px !important;
|
121 |
height: 24px;
|
122 |
}
|
123 |
+
.fl-builder-help-button {
|
124 |
+
color: #b3b3b3;
|
125 |
+
font-size: 16px !important;
|
126 |
+
}
|
127 |
+
.fl-builder-help-button i {
|
128 |
+
position: relative;
|
129 |
+
top: -1px;
|
130 |
+
}
|
131 |
+
.fl-builder-help-button:hover {
|
132 |
+
color: #666;
|
133 |
+
}
|
134 |
|
135 |
/* Builder Bar
|
136 |
------------------------------------------------------ */
|
448 |
-moz-box-sizing: border-box !important;
|
449 |
-webkit-box-sizing: border-box !important;
|
450 |
color: #fff;
|
451 |
+
left: 0;
|
452 |
position: absolute;
|
453 |
top: -30px;
|
454 |
width: 100%;
|
455 |
z-index: 100006;
|
456 |
}
|
457 |
+
.fl-row-overlay-header-bottom {
|
458 |
+
bottom: -30px;
|
459 |
+
top: 0;
|
460 |
+
}
|
461 |
+
.fl-row-overlay-header-bottom .fl-block-overlay-header {
|
462 |
+
position: absolute;
|
463 |
+
bottom: 0;
|
464 |
+
}
|
465 |
+
.fl-block-overlay-active .fl-row-content-wrap {
|
466 |
+
position: relative;
|
467 |
+
}
|
468 |
.fl-block-overlay-active .fl-row-content {
|
469 |
position: relative;
|
470 |
z-index: 100007;
|
1304 |
/* Loop Builder */
|
1305 |
.fl-loop-builder-filter {
|
1306 |
display: none;
|
1307 |
+
}
|
1308 |
+
|
1309 |
+
/* Getting Started Video
|
1310 |
+
------------------------------------------------------ */
|
1311 |
+
|
1312 |
+
.fl-builder-getting-started-video {
|
1313 |
+
line-height: 0 !important;
|
1314 |
+
padding: 10px;
|
1315 |
+
}
|
1316 |
+
.fl-builder-getting-started-video iframe {
|
1317 |
+
border: none;
|
1318 |
+
height: 326px;
|
1319 |
+
width: 100%;
|
1320 |
+
}
|
1321 |
+
|
1322 |
+
/* Help Tour
|
1323 |
+
------------------------------------------------------ */
|
1324 |
+
|
1325 |
+
.fl-builder-tour-actions .fl-builder-actions-title {
|
1326 |
+
font-size: 14px !important;
|
1327 |
+
line-height: 19px;
|
1328 |
+
}
|
1329 |
+
.fl-builder-tour-mask {
|
1330 |
+
bottom: 0;
|
1331 |
+
left: 0;
|
1332 |
+
position: fixed;
|
1333 |
+
right: 0;
|
1334 |
+
top: 0;
|
1335 |
+
z-index: 100000000;
|
1336 |
+
}
|
1337 |
+
.fl-builder-tour-dimmed {
|
1338 |
+
background: rgba( 0, 0, 0, 0.7 );
|
1339 |
+
bottom: 0;
|
1340 |
+
left: 0;
|
1341 |
+
position: absolute;
|
1342 |
+
right: 0;
|
1343 |
+
top: 0;
|
1344 |
+
}
|
1345 |
+
body > .fl-builder-tour-dimmed {
|
1346 |
+
position: fixed;
|
1347 |
+
}
|
1348 |
+
.tour-backdrop {
|
1349 |
+
z-index: 110000;
|
1350 |
+
}
|
1351 |
+
.popover[class*=tour-] {
|
1352 |
+
border: 1px solid #ccc;
|
1353 |
+
border-radius: 0;
|
1354 |
+
-webkit-box-shadow: 0 0 30px rgba(0,0,0,.3);
|
1355 |
+
box-shadow: 0 0 40px rgba(0,0,0,.3);
|
1356 |
+
color: #666;
|
1357 |
+
font-size: 13px;
|
1358 |
+
max-width: none;
|
1359 |
+
padding: 0;
|
1360 |
+
width: 300px;
|
1361 |
+
z-index: 100000001;
|
1362 |
+
}
|
1363 |
+
.popover[class*=tour-].bottom > .arrow {
|
1364 |
+
border-bottom-color: #ccc;
|
1365 |
+
}
|
1366 |
+
.popover[class*=tour-].bottom > .arrow:after {
|
1367 |
+
border-bottom-color: #f7f7f7;
|
1368 |
+
}
|
1369 |
+
.popover[class*=tour-] .popover-title {
|
1370 |
+
border-radius: 0;
|
1371 |
+
color: #333;
|
1372 |
+
}
|
1373 |
+
.popover[class*=tour-] .fa-times {
|
1374 |
+
color: #b3b3b3;
|
1375 |
+
cursor: pointer;
|
1376 |
+
font-size: 16px;
|
1377 |
+
padding: 5px;
|
1378 |
+
position: absolute;
|
1379 |
+
right: 3px;
|
1380 |
+
top: 2px;
|
1381 |
+
}
|
1382 |
+
.popover[class*=tour-] .fa-times:hover {
|
1383 |
+
color: #666;
|
1384 |
+
}
|
1385 |
+
.popover[class*=tour-] .popover-content {
|
1386 |
+
border-bottom: 1px solid #d9d9d9;
|
1387 |
+
padding: 13px 15px;
|
1388 |
+
}
|
1389 |
+
.popover[class*=tour-] .fl-builder-tour-next {
|
1390 |
+
display: block;
|
1391 |
+
float: none;
|
1392 |
+
width: 100%;
|
1393 |
}
|
fl-builder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Beaver Builder Plugin (Lite Version)
|
4 |
* Plugin URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
|
5 |
* Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
|
6 |
-
* Version: 1.
|
7 |
* Author: The Beaver Builder Team
|
8 |
* Author URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
|
9 |
* Copyright: (c) 2014 Beaver Builder
|
@@ -11,7 +11,7 @@
|
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
* Text Domain: fl-builder
|
13 |
*/
|
14 |
-
define('FL_BUILDER_VERSION', '1.
|
15 |
define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
|
16 |
define('FL_BUILDER_URL', plugins_url('/', __FILE__));
|
17 |
define('FL_BUILDER_LITE', true);
|
3 |
* Plugin Name: Beaver Builder Plugin (Lite Version)
|
4 |
* Plugin URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
|
5 |
* Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
|
6 |
+
* Version: 1.5.0
|
7 |
* Author: The Beaver Builder Team
|
8 |
* Author URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
|
9 |
* Copyright: (c) 2014 Beaver Builder
|
11 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
* Text Domain: fl-builder
|
13 |
*/
|
14 |
+
define('FL_BUILDER_VERSION', '1.5.0');
|
15 |
define('FL_BUILDER_DIR', plugin_dir_path(__FILE__));
|
16 |
define('FL_BUILDER_URL', plugins_url('/', __FILE__));
|
17 |
define('FL_BUILDER_LITE', true);
|
includes/js-config.php
CHANGED
@@ -1,12 +1,13 @@
|
|
1 |
<script>
|
2 |
|
3 |
var FLBuilderConfig = {
|
4 |
-
ajaxUrl: '<?php echo get_permalink( $post_id ); ?>',
|
5 |
debug: <?php if( defined( 'WP_DEBUG' ) && WP_DEBUG ) echo 'true'; else echo 'false'; ?>,
|
6 |
enabledTemplates: '<?php echo $enabled_templates; ?>',
|
|
|
7 |
homeUrl: '<?php echo home_url(); ?>',
|
8 |
isRtl: <?php if(is_rtl()) echo 'true'; else echo 'false'; ?>,
|
9 |
lite: <?php if(FL_BUILDER_LITE === true) echo 'true'; else echo 'false'; ?>,
|
|
|
10 |
postId: <?php echo $post_id; ?>,
|
11 |
postType: '<?php echo get_post_type(); ?>',
|
12 |
simpleUi: <?php if(!current_user_can(FLBuilderModel::get_editing_capability())) echo 'true'; else echo 'false'; ?>,
|
@@ -27,6 +28,7 @@ var FLBuilderStrings = {
|
|
27 |
deleteTemplate: '<?php esc_attr_e('Do you really want to delete this template?', 'fl-builder'); ?>',
|
28 |
discard: '<?php esc_attr_e('Discard Draft', 'fl-builder'); ?>',
|
29 |
discardMessage: '<?php esc_attr_e('Do you really want to discard this draft? All of your changes that are not published will be lost.', 'fl-builder'); ?>',
|
|
|
30 |
draft: '<?php esc_attr_e('Save Draft', 'fl-builder'); ?>',
|
31 |
duplicate: '<?php _ex( 'Duplicate', 'Duplicate page/post action label.', 'fl-builder' ); ?>',
|
32 |
duplicatePage: '<?php esc_attr_e('Duplicate This Page', 'fl-builder'); ?>',
|
@@ -35,6 +37,8 @@ var FLBuilderStrings = {
|
|
35 |
emptyMessage: '<?php esc_attr_e('Drop a row layout or module to get started!', 'fl-builder') ?>',
|
36 |
errorMessage: '<?php _e('Beaver Builder caught the following JavaScript error. If Beaver Builder is not functioning as expected the cause is most likely this error. Please help us by disabling all plugins and testing Beaver Builder while reactivating each to determine if the issue is related to a third party plugin.', 'fl-builder') ?>',
|
37 |
fullSize: '<?php esc_attr_e('Full Size', 'fl-builder'); ?>',
|
|
|
|
|
38 |
globalErrorMessage: '<?php _e('"{message}" on line {line} of {file}.', 'fl-builder') ?>',
|
39 |
insert: '<?php esc_attr_e('Insert', 'fl-builder'); ?>',
|
40 |
large: '<?php esc_attr_e('Large', 'fl-builder'); ?>',
|
@@ -45,6 +49,7 @@ var FLBuilderStrings = {
|
|
45 |
newColumn: '<?php esc_attr_e('New Column', 'fl-builder') ?>',
|
46 |
newRow: '<?php esc_attr_e('New Row', 'fl-builder') ?>',
|
47 |
noResultsFound: '<?php esc_attr_e('No results found.', 'fl-builder') ?>',
|
|
|
48 |
ok: '<?php esc_attr_e( 'OK', 'fl-builder' ); ?>',
|
49 |
photoPage: '<?php esc_attr_e('Photo Page', 'fl-builder'); ?>',
|
50 |
photoSelected: '<?php esc_attr_e('Photo Selected', 'fl-builder'); ?>',
|
@@ -59,11 +64,38 @@ var FLBuilderStrings = {
|
|
59 |
selectPhotos: '<?php esc_attr_e('Select Photos', 'fl-builder'); ?>',
|
60 |
selectVideo: '<?php esc_attr_e('Select Video', 'fl-builder'); ?>',
|
61 |
settings: '<?php _ex( '%s Settings', '%s stands for module name.', 'fl-builder' ); ?>',
|
|
|
62 |
templateAppend: '<?php esc_attr_e('Append New Layout', 'fl-builder'); ?>',
|
63 |
templateReplace: '<?php esc_attr_e('Replace Existing Layout', 'fl-builder'); ?>',
|
64 |
templateSaved: '<?php esc_attr_e('Template Saved!', 'fl-builder'); ?>',
|
65 |
thumbnail: '<?php esc_attr_e('Thumbnail', 'fl-builder'); ?>',
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
};
|
68 |
|
69 |
</script>
|
1 |
<script>
|
2 |
|
3 |
var FLBuilderConfig = {
|
|
|
4 |
debug: <?php if( defined( 'WP_DEBUG' ) && WP_DEBUG ) echo 'true'; else echo 'false'; ?>,
|
5 |
enabledTemplates: '<?php echo $enabled_templates; ?>',
|
6 |
+
help: <?php echo json_encode( $help_button ); ?>,
|
7 |
homeUrl: '<?php echo home_url(); ?>',
|
8 |
isRtl: <?php if(is_rtl()) echo 'true'; else echo 'false'; ?>,
|
9 |
lite: <?php if(FL_BUILDER_LITE === true) echo 'true'; else echo 'false'; ?>,
|
10 |
+
newUser: <?php if ( FLBuilderModel::is_new_user() ) echo 'true'; else echo 'false'; ?>,
|
11 |
postId: <?php echo $post_id; ?>,
|
12 |
postType: '<?php echo get_post_type(); ?>',
|
13 |
simpleUi: <?php if(!current_user_can(FLBuilderModel::get_editing_capability())) echo 'true'; else echo 'false'; ?>,
|
28 |
deleteTemplate: '<?php esc_attr_e('Do you really want to delete this template?', 'fl-builder'); ?>',
|
29 |
discard: '<?php esc_attr_e('Discard Draft', 'fl-builder'); ?>',
|
30 |
discardMessage: '<?php esc_attr_e('Do you really want to discard this draft? All of your changes that are not published will be lost.', 'fl-builder'); ?>',
|
31 |
+
done: '<?php esc_attr_e('Done', 'fl-builder'); ?>',
|
32 |
draft: '<?php esc_attr_e('Save Draft', 'fl-builder'); ?>',
|
33 |
duplicate: '<?php _ex( 'Duplicate', 'Duplicate page/post action label.', 'fl-builder' ); ?>',
|
34 |
duplicatePage: '<?php esc_attr_e('Duplicate This Page', 'fl-builder'); ?>',
|
37 |
emptyMessage: '<?php esc_attr_e('Drop a row layout or module to get started!', 'fl-builder') ?>',
|
38 |
errorMessage: '<?php _e('Beaver Builder caught the following JavaScript error. If Beaver Builder is not functioning as expected the cause is most likely this error. Please help us by disabling all plugins and testing Beaver Builder while reactivating each to determine if the issue is related to a third party plugin.', 'fl-builder') ?>',
|
39 |
fullSize: '<?php esc_attr_e('Full Size', 'fl-builder'); ?>',
|
40 |
+
getHelp: '<?php esc_attr_e('Get Help', 'fl-builder'); ?>',
|
41 |
+
gettingStartedVideo: '<?php esc_attr_e('Getting Started Video', 'fl-builder'); ?>',
|
42 |
globalErrorMessage: '<?php _e('"{message}" on line {line} of {file}.', 'fl-builder') ?>',
|
43 |
insert: '<?php esc_attr_e('Insert', 'fl-builder'); ?>',
|
44 |
large: '<?php esc_attr_e('Large', 'fl-builder'); ?>',
|
49 |
newColumn: '<?php esc_attr_e('New Column', 'fl-builder') ?>',
|
50 |
newRow: '<?php esc_attr_e('New Row', 'fl-builder') ?>',
|
51 |
noResultsFound: '<?php esc_attr_e('No results found.', 'fl-builder') ?>',
|
52 |
+
noThanks: '<?php esc_attr_e('No Thanks', 'fl-builder'); ?>',
|
53 |
ok: '<?php esc_attr_e( 'OK', 'fl-builder' ); ?>',
|
54 |
photoPage: '<?php esc_attr_e('Photo Page', 'fl-builder'); ?>',
|
55 |
photoSelected: '<?php esc_attr_e('Photo Selected', 'fl-builder'); ?>',
|
64 |
selectPhotos: '<?php esc_attr_e('Select Photos', 'fl-builder'); ?>',
|
65 |
selectVideo: '<?php esc_attr_e('Select Video', 'fl-builder'); ?>',
|
66 |
settings: '<?php _ex( '%s Settings', '%s stands for module name.', 'fl-builder' ); ?>',
|
67 |
+
takeHelpTour: '<?php esc_attr_e('Take a Tour', 'fl-builder'); ?>',
|
68 |
templateAppend: '<?php esc_attr_e('Append New Layout', 'fl-builder'); ?>',
|
69 |
templateReplace: '<?php esc_attr_e('Replace Existing Layout', 'fl-builder'); ?>',
|
70 |
templateSaved: '<?php esc_attr_e('Template Saved!', 'fl-builder'); ?>',
|
71 |
thumbnail: '<?php esc_attr_e('Thumbnail', 'fl-builder'); ?>',
|
72 |
+
tourNext: '<?php esc_attr_e('Next', 'fl-builder'); ?>',
|
73 |
+
tourEnd: '<?php esc_attr_e('Get Started', 'fl-builder'); ?>',
|
74 |
+
tourTemplatesTitle: '<?php esc_attr_e('Choose a Template', 'fl-builder'); ?>',
|
75 |
+
tourTemplates: '<?php esc_attr_e('Get started by choosing a layout template to customize, or build a page from scratch by selecting the blank layout template.', 'fl-builder'); ?>',
|
76 |
+
tourAddRowsTitle: '<?php esc_attr_e('Add Rows', 'fl-builder'); ?>',
|
77 |
+
tourAddRows: '<?php esc_attr_e('Add multi-column rows, adjust spacing, add backgrounds and more by dragging and dropping row layouts onto the page.', 'fl-builder'); ?>',
|
78 |
+
tourAddContentTitle: '<?php esc_attr_e('Add Content', 'fl-builder'); ?>',
|
79 |
+
tourAddContent: '<?php esc_attr_e('Add new content by dragging and dropping modules or widgets into your row layouts or to create a new row layout.', 'fl-builder'); ?>',
|
80 |
+
tourEditContentTitle: '<?php esc_attr_e('Edit Content', 'fl-builder'); ?>',
|
81 |
+
tourEditContent: '<?php esc_attr_e('Move your mouse over rows, columns or modules to edit and interact with them.', 'fl-builder'); ?>',
|
82 |
+
tourEditContent2: '<?php esc_attr_e('Use the action buttons to perform actions such as moving, editing, duplicating or deleting rows, columns and modules.', 'fl-builder'); ?>',
|
83 |
+
tourAddContentButtonTitle: '<?php esc_attr_e('Add More Content', 'fl-builder'); ?>',
|
84 |
+
tourAddContentButton: '<?php esc_attr_e('Use the Add Content button to open the content panel and add new row layouts, modules or widgets.', 'fl-builder'); ?>',
|
85 |
+
tourTemplatesButtonTitle: '<?php esc_attr_e('Change Templates', 'fl-builder'); ?>',
|
86 |
+
tourTemplatesButton: '<?php esc_attr_e('Use the Templates button to pick a new template or append one to your layout. Appending will insert a new template at the end of your existing page content.', 'fl-builder'); ?>',
|
87 |
+
tourToolsButtonTitle: '<?php esc_attr_e('Helpful Tools', 'fl-builder'); ?>',
|
88 |
+
tourToolsButton: '<?php esc_attr_e('The Tools button lets you duplicate a page, save a template or edit the global settings.', 'fl-builder'); ?>',
|
89 |
+
tourDoneButtonTitle: '<?php esc_attr_e('Publish Your Changes', 'fl-builder'); ?>',
|
90 |
+
tourDoneButton: '<?php esc_attr_e("Once you're finished, click the Done button to publish your changes, save a draft or revert back to the last published state.", 'fl-builder'); ?>',
|
91 |
+
tourFinishedTitle: '<?php esc_attr_e("Let's Get Building!", 'fl-builder'); ?>',
|
92 |
+
tourFinished: '<?php esc_attr_e("Now that you know the basics, you're ready to start building! If at any time you need help, click the help icon in the upper right corner to access the help menu. Happy building!", 'fl-builder'); ?>',
|
93 |
+
unloadWarning: '<?php esc_attr_e('The settings you are currently editing will not be saved if you navigate away from this page.', 'fl-builder'); ?>',
|
94 |
+
viewKnowledgeBase: '<?php esc_attr_e('View the Knowledge Base', 'fl-builder'); ?>',
|
95 |
+
visitForums: '<?php esc_attr_e('Visit the Forums', 'fl-builder'); ?>',
|
96 |
+
watchHelpVideo: '<?php esc_attr_e('Watch the Video', 'fl-builder'); ?>',
|
97 |
+
welcomeMessage: '<?php esc_attr_e('Welcome! It looks like this might be your first time using the builder. Would you like to take a tour?', 'fl-builder'); ?>',
|
98 |
+
yesPlease: '<?php esc_attr_e('Yes Please!', 'fl-builder'); ?>'
|
99 |
};
|
100 |
|
101 |
</script>
|
includes/row-video.php
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
-
<div class="fl-bg-video">
|
|
|
|
|
|
|
2 |
<video autoplay loop muted preload data-width="<?php echo @$vid_data->width; ?>" data-height="<?php echo @$vid_data->height; ?>">
|
3 |
<source src="<?php echo $vid_data->url; ?>" type="video/<?php echo $vid_data->extension; ?>" onerror="var wrap = this.parentNode.parentNode, vid = this.parentNode; wrap.appendChild(document.getElementById('fl-bg-video-fallback-<?php echo $row->node; ?>')); wrap.removeChild(vid);">
|
4 |
<div id="fl-bg-video-fallback-<?php echo $row->node; ?>" class="fl-bg-video-fallback"<?php if(!empty($vid_data->fallback)) echo ' style="background-image: url(' . $vid_data->fallback . ');"'; ?>></div>
|
5 |
</video>
|
|
|
6 |
</div>
|
1 |
+
<div class="fl-bg-video">
|
2 |
+
<?php if ( wp_is_mobile() ) : ?>
|
3 |
+
<div id="fl-bg-video-fallback-<?php echo $row->node; ?>" class="fl-bg-video-fallback"<?php if(!empty($vid_data->fallback)) echo ' style="background-image: url(' . $vid_data->fallback . ');"'; ?>></div>
|
4 |
+
<?php else : ?>
|
5 |
<video autoplay loop muted preload data-width="<?php echo @$vid_data->width; ?>" data-height="<?php echo @$vid_data->height; ?>">
|
6 |
<source src="<?php echo $vid_data->url; ?>" type="video/<?php echo $vid_data->extension; ?>" onerror="var wrap = this.parentNode.parentNode, vid = this.parentNode; wrap.appendChild(document.getElementById('fl-bg-video-fallback-<?php echo $row->node; ?>')); wrap.removeChild(vid);">
|
7 |
<div id="fl-bg-video-fallback-<?php echo $row->node; ?>" class="fl-bg-video-fallback"<?php if(!empty($vid_data->fallback)) echo ' style="background-image: url(' . $vid_data->fallback . ');"'; ?>></div>
|
8 |
</video>
|
9 |
+
<?php endif; ?>
|
10 |
</div>
|
includes/ui.php
CHANGED
@@ -33,6 +33,9 @@
|
|
33 |
</span>
|
34 |
<?php endif; ?>
|
35 |
<div class="fl-builder-bar-actions">
|
|
|
|
|
|
|
36 |
<?php if(stristr(home_url(), 'demo.wpbeaverbuilder.com')) : ?>
|
37 |
<span class="fl-builder-upgrade-button fl-builder-button"><?php _e('Buy Now!', 'fl-builder'); ?></span>
|
38 |
<?php elseif(FL_BUILDER_LITE === true) : ?>
|
@@ -59,7 +62,7 @@
|
|
59 |
<div class="fl-builder-panel-content-wrap fl-nanoscroller">
|
60 |
<div class="fl-builder-panel-content fl-nanoscroller-content">
|
61 |
<div class="fl-builder-blocks">
|
62 |
-
<div class="fl-builder-blocks-section">
|
63 |
<span class="fl-builder-blocks-section-title">
|
64 |
<?php _e('Row Layouts', 'fl-builder'); ?>
|
65 |
<i class="fa fa-chevron-down"></i>
|
@@ -71,13 +74,13 @@
|
|
71 |
<span class="fl-builder-block fl-builder-block-row" data-cols="4-cols"><?php _e('4 Columns', 'fl-builder'); ?></span>
|
72 |
<span class="fl-builder-block fl-builder-block-row" data-cols="5-cols"><?php _e('5 Columns', 'fl-builder'); ?></span>
|
73 |
<span class="fl-builder-block fl-builder-block-row" data-cols="6-cols"><?php _e('6 Columns', 'fl-builder'); ?></span>
|
74 |
-
<span class="fl-builder-block fl-builder-block-row" data-cols="left-sidebar"><?php _e('Left Sidebar', 'fl-builder'); ?></span>
|
75 |
<span class="fl-builder-block fl-builder-block-row" data-cols="right-sidebar"><?php _e('Right Sidebar', 'fl-builder'); ?></span>
|
76 |
<span class="fl-builder-block fl-builder-block-row" data-cols="left-right-sidebar"><?php _e('Left & Right Sidebar', 'fl-builder'); ?></span>
|
77 |
</div>
|
78 |
</div>
|
79 |
<?php foreach($categories as $title => $modules) : ?>
|
80 |
-
<div
|
81 |
<span class="fl-builder-blocks-section-title">
|
82 |
<?php echo $title; ?>
|
83 |
<i class="fa fa-chevron-down"></i>
|
33 |
</span>
|
34 |
<?php endif; ?>
|
35 |
<div class="fl-builder-bar-actions">
|
36 |
+
<?php if ( $help_button['enabled'] ) : ?>
|
37 |
+
<span class="fl-builder-help-button fl-builder-button"><i class="fa fa-question-circle"></i></span>
|
38 |
+
<?php endif ?>
|
39 |
<?php if(stristr(home_url(), 'demo.wpbeaverbuilder.com')) : ?>
|
40 |
<span class="fl-builder-upgrade-button fl-builder-button"><?php _e('Buy Now!', 'fl-builder'); ?></span>
|
41 |
<?php elseif(FL_BUILDER_LITE === true) : ?>
|
62 |
<div class="fl-builder-panel-content-wrap fl-nanoscroller">
|
63 |
<div class="fl-builder-panel-content fl-nanoscroller-content">
|
64 |
<div class="fl-builder-blocks">
|
65 |
+
<div id="fl-builder-blocks-rows" class="fl-builder-blocks-section">
|
66 |
<span class="fl-builder-blocks-section-title">
|
67 |
<?php _e('Row Layouts', 'fl-builder'); ?>
|
68 |
<i class="fa fa-chevron-down"></i>
|
74 |
<span class="fl-builder-block fl-builder-block-row" data-cols="4-cols"><?php _e('4 Columns', 'fl-builder'); ?></span>
|
75 |
<span class="fl-builder-block fl-builder-block-row" data-cols="5-cols"><?php _e('5 Columns', 'fl-builder'); ?></span>
|
76 |
<span class="fl-builder-block fl-builder-block-row" data-cols="6-cols"><?php _e('6 Columns', 'fl-builder'); ?></span>
|
77 |
+
<span class="fl-builder-block fl-builder-block-row" data-cols="left-sidebar"><?php _e('Left Sidebar', 'fl-builder'); ?></span>
|
78 |
<span class="fl-builder-block fl-builder-block-row" data-cols="right-sidebar"><?php _e('Right Sidebar', 'fl-builder'); ?></span>
|
79 |
<span class="fl-builder-block fl-builder-block-row" data-cols="left-right-sidebar"><?php _e('Left & Right Sidebar', 'fl-builder'); ?></span>
|
80 |
</div>
|
81 |
</div>
|
82 |
<?php foreach($categories as $title => $modules) : ?>
|
83 |
+
<div id="fl-builder-blocks-<?php echo FLBuilderModel::get_module_category_slug( $title ); ?>" class="fl-builder-blocks-section">
|
84 |
<span class="fl-builder-blocks-section-title">
|
85 |
<?php echo $title; ?>
|
86 |
<i class="fa fa-chevron-down"></i>
|
includes/updater-config.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
if(class_exists('FLUpdater')) {
|
4 |
FLUpdater::add_product(array(
|
5 |
'name' => 'Beaver Builder Plugin (Lite Version)',
|
6 |
-
'version' => '1.
|
7 |
'slug' => 'bb-plugin',
|
8 |
'type' => 'plugin'
|
9 |
));
|
3 |
if(class_exists('FLUpdater')) {
|
4 |
FLUpdater::add_product(array(
|
5 |
'name' => 'Beaver Builder Plugin (Lite Version)',
|
6 |
+
'version' => '1.5.0',
|
7 |
'slug' => 'bb-plugin',
|
8 |
'type' => 'plugin'
|
9 |
));
|
includes/updater/classes/class-fl-updater.php
CHANGED
@@ -10,7 +10,7 @@ final class FLUpdater {
|
|
10 |
* @static
|
11 |
* @private
|
12 |
*/
|
13 |
-
static private $_store_api_url = '
|
14 |
|
15 |
/**
|
16 |
* @property $_updates_api_url
|
10 |
* @static
|
11 |
* @private
|
12 |
*/
|
13 |
+
static private $_store_api_url = 'https://www.wpbeaverbuilder.com/';
|
14 |
|
15 |
/**
|
16 |
* @property $_updates_api_url
|
js/bootstrap-tour-standalone.min.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* ========================================================================
|
2 |
+
* bootstrap-tour - v0.10.1
|
3 |
+
* http://bootstraptour.com
|
4 |
+
* ========================================================================
|
5 |
+
* Copyright 2012-2013 Ulrich Sossou
|
6 |
+
*
|
7 |
+
* ========================================================================
|
8 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9 |
+
* you may not use this file except in compliance with the License.
|
10 |
+
* You may obtain a copy of the License at
|
11 |
+
*
|
12 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13 |
+
*
|
14 |
+
* Unless required by applicable law or agreed to in writing, software
|
15 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17 |
+
* See the License for the specific language governing permissions and
|
18 |
+
* limitations under the License.
|
19 |
+
* ========================================================================
|
20 |
+
*/
|
21 |
+
|
22 |
+
+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),i=n.data("bs.tooltip"),r="object"==typeof e&&e;(i||"destroy"!=e)&&(i||n.data("bs.tooltip",i=new o(this,r)),"string"==typeof e&&i[e]())})}var o=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};o.VERSION="3.2.0",o.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},o.prototype.init=function(e,o,n){this.enabled=!0,this.type=e,this.$element=t(o),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var i=this.options.trigger.split(" "),r=i.length;r--;){var s=i[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",p="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(p+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},o.prototype.getDefaults=function(){return o.DEFAULTS},o.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},o.prototype.getDelegateOptions=function(){var e={},o=this.getDefaults();return this._options&&t.each(this._options,function(t,n){o[t]!=n&&(e[t]=n)}),e},o.prototype.enter=function(e){var o=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return o||(o=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,o)),clearTimeout(o.timeout),o.hoverState="in",o.options.delay&&o.options.delay.show?(o.timeout=setTimeout(function(){"in"==o.hoverState&&o.show()},o.options.delay.show),void 0):o.show()},o.prototype.leave=function(e){var o=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return o||(o=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,o)),clearTimeout(o.timeout),o.hoverState="out",o.options.delay&&o.options.delay.hide?(o.timeout=setTimeout(function(){"out"==o.hoverState&&o.hide()},o.options.delay.hide),void 0):o.hide()},o.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(document.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,i=this.tip(),r=this.getUID(this.type);this.setContent(),i.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,p=a.test(s);p&&(s=s.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var h=this.getPosition(),l=i[0].offsetWidth,u=i[0].offsetHeight;if(p){var c=s,d=this.$element.parent(),f=this.getPosition(d);s="bottom"==s&&h.top+h.height+u-f.scroll>f.height?"top":"top"==s&&h.top-f.scroll-u<0?"bottom":"right"==s&&h.right+l>f.width?"left":"left"==s&&h.left-l<f.left?"right":s,i.removeClass(c).addClass(s)}var m=this.getCalculatedOffset(s,h,l,u);this.applyPlacement(m,s);var v=function(){n.$element.trigger("shown.bs."+n.type),n.hoverState=null};t.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",v).emulateTransitionEnd(150):v()}},o.prototype.applyPlacement=function(e,o){var n=this.tip(),i=n[0].offsetWidth,r=n[0].offsetHeight,s=parseInt(n.css("margin-top"),10),a=parseInt(n.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top=e.top+s,e.left=e.left+a,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var p=n[0].offsetWidth,h=n[0].offsetHeight;"top"==o&&h!=r&&(e.top=e.top+r-h);var l=this.getViewportAdjustedDelta(o,e,p,h);l.left?e.left+=l.left:e.top+=l.top;var u=l.left?2*l.left-i+p:2*l.top-r+h,c=l.left?"left":"top",d=l.left?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(u,n[0][d],c)},o.prototype.replaceArrow=function(t,e,o){this.arrow().css(o,t?50*(1-t/e)+"%":"")},o.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},o.prototype.hide=function(){function e(){"in"!=o.hoverState&&n.detach(),o.$element.trigger("hidden.bs."+o.type)}var o=this,n=this.tip(),i=t.Event("hide.bs."+this.type);return this.$element.removeAttr("aria-describedby"),this.$element.trigger(i),i.isDefaultPrevented()?void 0:(n.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?n.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),this.hoverState=null,this)},o.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},o.prototype.hasContent=function(){return this.getTitle()},o.prototype.getPosition=function(e){e=e||this.$element;var o=e[0],n="BODY"==o.tagName;return t.extend({},"function"==typeof o.getBoundingClientRect?o.getBoundingClientRect():null,{scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop(),width:n?t(window).width():e.outerWidth(),height:n?t(window).height():e.outerHeight()},n?{top:0,left:0}:e.offset())},o.prototype.getCalculatedOffset=function(t,e,o,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-o/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-o/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-o}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},o.prototype.getViewportAdjustedDelta=function(t,e,o,n){var i={top:0,left:0};if(!this.$viewport)return i;var r=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-r-s.scroll,p=e.top+r-s.scroll+n;a<s.top?i.top=s.top-a:p>s.top+s.height&&(i.top=s.top+s.height-p)}else{var h=e.left-r,l=e.left+r+o;h<s.left?i.left=s.left-h:l>s.width&&(i.left=s.left+s.width-l)}return i},o.prototype.getTitle=function(){var t,e=this.$element,o=this.options;return t=e.attr("data-original-title")||("function"==typeof o.title?o.title.call(e[0]):o.title)},o.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},o.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},o.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},o.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},o.prototype.enable=function(){this.enabled=!0},o.prototype.disable=function(){this.enabled=!1},o.prototype.toggleEnabled=function(){this.enabled=!this.enabled},o.prototype.toggle=function(e){var o=this;e&&(o=t(e.currentTarget).data("bs."+this.type),o||(o=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,o))),o.tip().hasClass("in")?o.leave(o):o.enter(o)},o.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=o,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),i=n.data("bs.popover"),r="object"==typeof e&&e;(i||"destroy"!=e)&&(i||n.data("bs.popover",i=new o(this,r)),"string"==typeof e&&i[e]())})}var o=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");o.VERSION="3.2.0",o.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),o.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),o.prototype.constructor=o,o.prototype.getDefaults=function(){return o.DEFAULTS},o.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),o=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").empty()[this.options.html?"string"==typeof o?"html":"append":"text"](o),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},o.prototype.hasContent=function(){return this.getTitle()||this.getContent()},o.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},o.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},o.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=o,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),function(t,e){var o,n;return n=e.document,o=function(){function o(o){var n;try{n=e.localStorage}catch(i){n=!1}this._options=t.extend({name:"tour",steps:[],container:"body",autoscroll:!0,keyboard:!0,storage:n,debug:!1,backdrop:!1,backdropPadding:0,redirect:!0,orphan:!1,duration:!1,delay:!1,basePath:"",template:'<div class="popover" role="tooltip"> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation"> <div class="btn-group"> <button class="btn btn-sm btn-default" data-role="prev">« Prev</button> <button class="btn btn-sm btn-default" data-role="next">Next »</button> <button class="btn btn-sm btn-default" data-role="pause-resume" data-pause-text="Pause" data-resume-text="Resume">Pause</button> </div> <button class="btn btn-sm btn-default" data-role="end">End tour</button> </div> </div>',afterSetState:function(){},afterGetState:function(){},afterRemoveState:function(){},onStart:function(){},onEnd:function(){},onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNext:function(){},onPrev:function(){},onPause:function(){},onResume:function(){}},o),this._force=!1,this._inited=!1,this.backdrop={overlay:null,$element:null,$background:null,backgroundShown:!1,overlayElementShown:!1}}return o.prototype.addSteps=function(t){var e,o,n;for(o=0,n=t.length;n>o;o++)e=t[o],this.addStep(e);return this},o.prototype.addStep=function(t){return this._options.steps.push(t),this},o.prototype.getStep=function(e){return null!=this._options.steps[e]?t.extend({id:"step-"+e,path:"",placement:"right",title:"",content:"<p></p>",next:e===this._options.steps.length-1?-1:e+1,prev:e-1,animation:!0,container:this._options.container,autoscroll:this._options.autoscroll,backdrop:this._options.backdrop,backdropPadding:this._options.backdropPadding,redirect:this._options.redirect,orphan:this._options.orphan,duration:this._options.duration,delay:this._options.delay,template:this._options.template,onShow:this._options.onShow,onShown:this._options.onShown,onHide:this._options.onHide,onHidden:this._options.onHidden,onNext:this._options.onNext,onPrev:this._options.onPrev,onPause:this._options.onPause,onResume:this._options.onResume},this._options.steps[e]):void 0},o.prototype.init=function(t){return this._force=t,this.ended()?(this._debug("Tour ended, init prevented."),this):(this.setCurrentStep(),this._initMouseNavigation(),this._initKeyboardNavigation(),this._onResize(function(t){return function(){return t.showStep(t._current)}}(this)),null!==this._current&&this.showStep(this._current),this._inited=!0,this)},o.prototype.start=function(t){var e;return null==t&&(t=!1),this._inited||this.init(t),null===this._current&&(e=this._makePromise(null!=this._options.onStart?this._options.onStart(this):void 0),this._callOnPromiseDone(e,this.showStep,0)),this},o.prototype.next=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showNextStep)},o.prototype.prev=function(){var t;return t=this.hideStep(this._current),this._callOnPromiseDone(t,this._showPrevStep)},o.prototype.goTo=function(t){var e;return e=this.hideStep(this._current),this._callOnPromiseDone(e,this.showStep,t)},o.prototype.end=function(){var o,i;return o=function(o){return function(){return t(n).off("click.tour-"+o._options.name),t(n).off("keyup.tour-"+o._options.name),t(e).off("resize.tour-"+o._options.name),o._setState("end","yes"),o._inited=!1,o._force=!1,o._clearTimer(),null!=o._options.onEnd?o._options.onEnd(o):void 0}}(this),i=this.hideStep(this._current),this._callOnPromiseDone(i,o)},o.prototype.ended=function(){return!this._force&&!!this._getState("end")},o.prototype.restart=function(){return this._removeState("current_step"),this._removeState("end"),this.start()},o.prototype.pause=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!0,this._duration-=(new Date).getTime()-this._start,e.clearTimeout(this._timer),this._debug("Paused/Stopped step "+(this._current+1)+" timer ("+this._duration+" remaining)."),null!=t.onPause?t.onPause(this,this._duration):void 0):this},o.prototype.resume=function(){var t;return t=this.getStep(this._current),t&&t.duration?(this._paused=!1,this._start=(new Date).getTime(),this._duration=this._duration||t.duration,this._timer=e.setTimeout(function(t){return function(){return t._isLast()?t.next():t.end()}}(this),this._duration),this._debug("Started step "+(this._current+1)+" timer with duration "+this._duration),null!=t.onResume&&this._duration!==t.duration?t.onResume(this,this._duration):void 0):this},o.prototype.hideStep=function(e){var o,n,i;return(i=this.getStep(e))?(this._clearTimer(),n=this._makePromise(null!=i.onHide?i.onHide(this,e):void 0),o=function(o){return function(){var n;return n=t(i.element),n.data("bs.popover")||n.data("popover")||(n=t("body")),n.popover("destroy").removeClass("tour-"+o._options.name+"-element tour-"+o._options.name+"-"+e+"-element"),i.reflex&&n.removeClass("tour-step-element-reflex").off(""+o._reflexEvent(i.reflex)+".tour-"+o._options.name),i.backdrop&&o._hideBackdrop(),null!=i.onHidden?i.onHidden(o):void 0}}(this),this._callOnPromiseDone(n,o),n):void 0},o.prototype.showStep=function(t){var o,i,r,s;return this.ended()?(this._debug("Tour ended, showStep prevented."),this):(s=this.getStep(t))?(r=t<this._current,o=this._makePromise(null!=s.onShow?s.onShow(this,t):void 0),i=function(e){return function(){var o,i,a;if(e.setCurrentStep(t),i=function(){switch({}.toString.call(s.path)){case"[object Function]":return s.path();case"[object String]":return this._options.basePath+s.path;default:return s.path}}.call(e),o=[n.location.pathname,n.location.hash].join(""),e._isRedirect(i,o))return e._redirect(s,i),void 0;if(e._isOrphan(s)){if(!s.orphan)return e._debug("Skip the orphan step "+(e._current+1)+".\nOrphan option is false and the element does not exist or is hidden."),r?e._showPrevStep():e._showNextStep(),void 0;e._debug("Show the orphan step "+(e._current+1)+". Orphans option is true.")}return s.backdrop&&e._showBackdrop(e._isOrphan(s)?void 0:s.element),a=function(){return e.getCurrentStep()===t?(null!=s.element&&s.backdrop&&e._showOverlayElement(s),e._showPopover(s,t),null!=s.onShown&&s.onShown(e),e._debug("Step "+(e._current+1)+" of "+e._options.steps.length)):void 0},s.autoscroll?e._scrollIntoView(s.element,a):a(),s.duration?e.resume():void 0}}(this),s.delay?(this._debug("Wait "+s.delay+" milliseconds to show the step "+(this._current+1)),e.setTimeout(function(t){return function(){return t._callOnPromiseDone(o,i)}}(this),s.delay)):this._callOnPromiseDone(o,i),o):void 0},o.prototype.getCurrentStep=function(){return this._current},o.prototype.setCurrentStep=function(t){return null!=t?(this._current=t,this._setState("current_step",t)):(this._current=this._getState("current_step"),this._current=null===this._current?null:parseInt(this._current,10)),this},o.prototype._setState=function(t,e){var o,n;if(this._options.storage){n=""+this._options.name+"_"+t;try{this._options.storage.setItem(n,e)}catch(i){o=i,o.code===DOMException.QUOTA_EXCEEDED_ERR&&this.debug("LocalStorage quota exceeded. State storage failed.")}return this._options.afterSetState(n,e)}return null==this._state&&(this._state={}),this._state[t]=e},o.prototype._removeState=function(t){var e;return this._options.storage?(e=""+this._options.name+"_"+t,this._options.storage.removeItem(e),this._options.afterRemoveState(e)):null!=this._state?delete this._state[t]:void 0},o.prototype._getState=function(t){var e,o;return this._options.storage?(e=""+this._options.name+"_"+t,o=this._options.storage.getItem(e)):null!=this._state&&(o=this._state[t]),(void 0===o||"null"===o)&&(o=null),this._options.afterGetState(t,o),o},o.prototype._showNextStep=function(){var t,e,o;return o=this.getStep(this._current),e=function(t){return function(){return t.showStep(o.next)}}(this),t=this._makePromise(null!=o.onNext?o.onNext(this):void 0),this._callOnPromiseDone(t,e)},o.prototype._showPrevStep=function(){var t,e,o;return o=this.getStep(this._current),e=function(t){return function(){return t.showStep(o.prev)}}(this),t=this._makePromise(null!=o.onPrev?o.onPrev(this):void 0),this._callOnPromiseDone(t,e)},o.prototype._debug=function(t){return this._options.debug?e.console.log("Bootstrap Tour '"+this._options.name+"' | "+t):void 0},o.prototype._isRedirect=function(t,e){return null!=t&&""!==t&&("[object RegExp]"==={}.toString.call(t)&&!t.test(e)||"[object String]"==={}.toString.call(t)&&t.replace(/\?.*$/,"").replace(/\/?$/,"")!==e.replace(/\/?$/,""))},o.prototype._redirect=function(e,o){return t.isFunction(e.redirect)?e.redirect.call(this,o):e.redirect===!0?(this._debug("Redirect to "+o),n.location.href=o):void 0},o.prototype._isOrphan=function(e){return null==e.element||!t(e.element).length||t(e.element).is(":hidden")&&"http://www.w3.org/2000/svg"!==t(e.element)[0].namespaceURI},o.prototype._isLast=function(){return this._current<this._options.steps.length-1},o.prototype._showPopover=function(e,o){var n,i,r,s;return t(".tour-"+this._options.name).remove(),s=t.extend({},this._options),r=this._isOrphan(e),e.template=this._template(e,o),r&&(e.element="body",e.placement="top"),n=t(e.element),n.addClass("tour-"+this._options.name+"-element tour-"+this._options.name+"-"+o+"-element"),e.options&&t.extend(s,e.options),e.reflex&&!r&&(n.addClass("tour-step-element-reflex"),n.off(""+this._reflexEvent(e.reflex)+".tour-"+this._options.name),n.on(""+this._reflexEvent(e.reflex)+".tour-"+this._options.name,function(t){return function(){return t._isLast()?t.next():t.end()}}(this))),n.popover({placement:e.placement,trigger:"manual",title:e.title,content:e.content,html:!0,animation:e.animation,container:e.container,template:e.template,selector:e.element}).popover("show"),i=n.data("bs.popover")?n.data("bs.popover").tip():n.data("popover").tip(),i.attr("id",e.id),this._reposition(i,e),r?this._center(i):void 0},o.prototype._template=function(e,o){var n,i,r,s;return s=t.isFunction(e.template)?t(e.template(o,e)):t(e.template),n=s.find(".popover-navigation"),r=n.find('[data-role="prev"]'),i=n.find('[data-role="next"]'),this._isOrphan(e)&&s.addClass("orphan"),s.addClass("tour-"+this._options.name+" tour-"+this._options.name+"-"+o),e.prev<0&&n.find('[data-role="prev"]').addClass("disabled"),e.next<0&&n.find('[data-role="next"]').addClass("disabled"),e.duration||n.find('[data-role="pause-resume"]').remove(),s.clone().wrap("<div>").parent().html()},o.prototype._reflexEvent=function(t){return"[object Boolean]"==={}.toString.call(t)?"click":t},o.prototype._reposition=function(e,o){var i,r,s,a,p,h,l;if(a=e[0].offsetWidth,r=e[0].offsetHeight,l=e.offset(),p=l.left,h=l.top,i=t(n).outerHeight()-l.top-e.outerHeight(),0>i&&(l.top=l.top+i),s=t("html").outerWidth()-l.left-e.outerWidth(),0>s&&(l.left=l.left+s),l.top<0&&(l.top=0),l.left<0&&(l.left=0),e.offset(l),"bottom"===o.placement||"top"===o.placement){if(p!==l.left)return this._replaceArrow(e,2*(l.left-p),a,"left")}else if(h!==l.top)return this._replaceArrow(e,2*(l.top-h),r,"top")},o.prototype._center=function(o){return o.css("top",t(e).outerHeight()/2-o.outerHeight()/2)},o.prototype._replaceArrow=function(t,e,o,n){return t.find(".arrow").css(n,e?50*(1-e/o)+"%":"")},o.prototype._scrollIntoView=function(o,n){var i,r,s,a,p,h;return i=t(o),i.length?(r=t(e),a=i.offset().top,h=r.height(),p=Math.max(0,a-h/2),this._debug("Scroll into view. ScrollTop: "+p+". Element offset: "+a+". Window height: "+h+"."),s=0,t("body, html").stop(!0,!0).animate({scrollTop:Math.ceil(p)},function(t){return function(){return 2===++s?(n(),t._debug("Scroll into view.\nAnimation end element offset: "+i.offset().top+".\nWindow height: "+r.height()+".")):void 0}}(this))):n()},o.prototype._onResize=function(o,n){return t(e).on("resize.tour-"+this._options.name,function(){return clearTimeout(n),n=setTimeout(o,100)})},o.prototype._initMouseNavigation=function(){var e;return e=this,t(n).off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']").off("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']").on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='next']",function(t){return function(e){return e.preventDefault(),t.next()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='prev']",function(t){return function(e){return e.preventDefault(),t.prev()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='end']",function(t){return function(e){return e.preventDefault(),t.end()}}(this)).on("click.tour-"+this._options.name,".popover.tour-"+this._options.name+" *[data-role='pause-resume']",function(o){var n;return o.preventDefault(),n=t(this),n.text(e._paused?n.data("pause-text"):n.data("resume-text")),e._paused?e.resume():e.pause()})},o.prototype._initKeyboardNavigation=function(){return this._options.keyboard?t(n).on("keyup.tour-"+this._options.name,function(t){return function(e){if(e.which)switch(e.which){case 39:return e.preventDefault(),t._isLast()?t.next():t.end();case 37:if(e.preventDefault(),t._current>0)return t.prev();break;case 27:return e.preventDefault(),t.end()}}}(this)):void 0},o.prototype._makePromise=function(e){return e&&t.isFunction(e.then)?e:null},o.prototype._callOnPromiseDone=function(t,e,o){return t?t.then(function(t){return function(){return e.call(t,o)}}(this)):e.call(this,o)},o.prototype._showBackdrop=function(){return this.backdrop.backgroundShown?void 0:(this.backdrop=t("<div>",{"class":"tour-backdrop"}),this.backdrop.backgroundShown=!0,t("body").append(this.backdrop))},o.prototype._hideBackdrop=function(){return this._hideOverlayElement(),this._hideBackground()},o.prototype._hideBackground=function(){return this.backdrop?(this.backdrop.remove(),this.backdrop.overlay=null,this.backdrop.backgroundShown=!1):void 0},o.prototype._showOverlayElement=function(e){var o,n;return o=t(e.element),o&&0!==o.length&&!this.backdrop.overlayElementShown?(this.backdrop.overlayElementShown=!0,this.backdrop.$element=o.addClass("tour-step-backdrop"),this.backdrop.$background=t("<div>",{"class":"tour-step-background"}),n={width:o.innerWidth(),height:o.innerHeight(),offset:o.offset()},this.backdrop.$background.appendTo("body"),e.backdropPadding&&(n=this._applyBackdropPadding(e.backdropPadding,n)),this.backdrop.$background.width(n.width).height(n.height).offset(n.offset)):void 0},o.prototype._hideOverlayElement=function(){return this.backdrop.overlayElementShown?(this.backdrop.$element.removeClass("tour-step-backdrop"),this.backdrop.$background.remove(),this.backdrop.$element=null,this.backdrop.$background=null,this.backdrop.overlayElementShown=!1):void 0},o.prototype._applyBackdropPadding=function(t,e){return"object"==typeof t?(null==t.top&&(t.top=0),null==t.right&&(t.right=0),null==t.bottom&&(t.bottom=0),null==t.left&&(t.left=0),e.offset.top=e.offset.top-t.top,e.offset.left=e.offset.left-t.left,e.width=e.width+t.left+t.right,e.height=e.height+t.top+t.bottom):(e.offset.top=e.offset.top-t,e.offset.left=e.offset.left-t,e.width=e.width+2*t,e.height=e.height+2*t),e},o.prototype._clearTimer=function(){return e.clearTimeout(this._timer),this._timer=null,this._duration=null},o}(),e.Tour=o}(jQuery,window);
|
js/fl-builder-admin-settings.js
CHANGED
@@ -19,6 +19,7 @@
|
|
19 |
this._bind();
|
20 |
this._initNav();
|
21 |
this._initOverrides();
|
|
|
22 |
},
|
23 |
|
24 |
/**
|
@@ -34,6 +35,10 @@
|
|
34 |
$('input[name=fl-upload-icon]').on('click', FLBuilderAdminSettings._showIconUploader);
|
35 |
$('.fl-delete-icon-set').on('click', FLBuilderAdminSettings._deleteCustomIconSet);
|
36 |
$('#uninstall-form').on('submit', FLBuilderAdminSettings._uninstallFormSubmit);
|
|
|
|
|
|
|
|
|
37 |
},
|
38 |
|
39 |
/**
|
@@ -148,6 +153,28 @@
|
|
148 |
}
|
149 |
},
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
/**
|
152 |
* @method _showIconUploader
|
153 |
* @private
|
19 |
this._bind();
|
20 |
this._initNav();
|
21 |
this._initOverrides();
|
22 |
+
this._initHelpButtonSettings();
|
23 |
},
|
24 |
|
25 |
/**
|
35 |
$('input[name=fl-upload-icon]').on('click', FLBuilderAdminSettings._showIconUploader);
|
36 |
$('.fl-delete-icon-set').on('click', FLBuilderAdminSettings._deleteCustomIconSet);
|
37 |
$('#uninstall-form').on('submit', FLBuilderAdminSettings._uninstallFormSubmit);
|
38 |
+
$('input[name=fl-help-button-enabled]').on('click', FLBuilderAdminSettings._initHelpButtonSettings);
|
39 |
+
$('input[name=fl-help-video-enabled]').on('click', FLBuilderAdminSettings._initHelpButtonSettings);
|
40 |
+
$('input[name=fl-knowledge-base-enabled]').on('click', FLBuilderAdminSettings._initHelpButtonSettings);
|
41 |
+
$('input[name=fl-forums-enabled]').on('click', FLBuilderAdminSettings._initHelpButtonSettings);
|
42 |
},
|
43 |
|
44 |
/**
|
153 |
}
|
154 |
},
|
155 |
|
156 |
+
/**
|
157 |
+
* @method _initHelpButtonSettings
|
158 |
+
* @private
|
159 |
+
*/
|
160 |
+
_initHelpButtonSettings: function()
|
161 |
+
{
|
162 |
+
if ( 0 === $( '#fl-help-button-form' ).length ) {
|
163 |
+
return;
|
164 |
+
}
|
165 |
+
|
166 |
+
var enabled = $( 'input[name=fl-help-button-enabled]' )[ 0 ].checked,
|
167 |
+
tour = $('input[name=fl-help-tour-enabled]')[ 0 ].checked,
|
168 |
+
video = $('input[name=fl-help-video-enabled]')[ 0 ].checked,
|
169 |
+
kb = $('input[name=fl-knowledge-base-enabled]')[ 0 ].checked,
|
170 |
+
forums = $('input[name=fl-forums-enabled]')[ 0 ].checked;
|
171 |
+
|
172 |
+
$( '.fl-help-button-settings' ).toggle( enabled );
|
173 |
+
$( '.fl-help-video-embed' ).toggle( video );
|
174 |
+
$( '.fl-knowledge-base-url' ).toggle( kb );
|
175 |
+
$( '.fl-forums-url' ).toggle( forums );
|
176 |
+
},
|
177 |
+
|
178 |
/**
|
179 |
* @method _showIconUploader
|
180 |
* @private
|
js/fl-builder-layout.js
CHANGED
@@ -38,6 +38,11 @@
|
|
38 |
if($('.fl-builder-edit').length === 0 && typeof jQuery.fn.waypoint !== 'undefined' && !FLBuilderLayout._isTouch()) {
|
39 |
FLBuilderLayout._initModuleAnimations();
|
40 |
}
|
|
|
|
|
|
|
|
|
|
|
41 |
},
|
42 |
|
43 |
_destroy: function()
|
@@ -103,6 +108,10 @@
|
|
103 |
|
104 |
_resizeBgVideo: function()
|
105 |
{
|
|
|
|
|
|
|
|
|
106 |
var wrap = $(this),
|
107 |
wrapHeight = wrap.outerHeight(),
|
108 |
wrapWidth = wrap.outerWidth(),
|
@@ -163,6 +172,58 @@
|
|
163 |
else {
|
164 |
module.addClass('fl-animated');
|
165 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
}
|
167 |
};
|
168 |
|
38 |
if($('.fl-builder-edit').length === 0 && typeof jQuery.fn.waypoint !== 'undefined' && !FLBuilderLayout._isTouch()) {
|
39 |
FLBuilderLayout._initModuleAnimations();
|
40 |
}
|
41 |
+
|
42 |
+
// Init anchor links.
|
43 |
+
if ( $( '.fl-builder-content a' ).length > 0 ) {
|
44 |
+
FLBuilderLayout._initAnchorLinks();
|
45 |
+
}
|
46 |
},
|
47 |
|
48 |
_destroy: function()
|
108 |
|
109 |
_resizeBgVideo: function()
|
110 |
{
|
111 |
+
if ( 0 === $( this ).find( 'video' ).length ) {
|
112 |
+
return;
|
113 |
+
}
|
114 |
+
|
115 |
var wrap = $(this),
|
116 |
wrapHeight = wrap.outerHeight(),
|
117 |
wrapWidth = wrap.outerWidth(),
|
172 |
else {
|
173 |
module.addClass('fl-animated');
|
174 |
}
|
175 |
+
},
|
176 |
+
|
177 |
+
_initAnchorLinks: function()
|
178 |
+
{
|
179 |
+
$( '.fl-builder-content a' ).each( FLBuilderLayout._initAnchorLink );
|
180 |
+
},
|
181 |
+
|
182 |
+
_initAnchorLink: function()
|
183 |
+
{
|
184 |
+
var link = $( this ),
|
185 |
+
href = link.attr( 'href' ),
|
186 |
+
id = null,
|
187 |
+
element = null;
|
188 |
+
|
189 |
+
if ( 'undefined' != typeof href && href.indexOf( '#' ) > -1 ) {
|
190 |
+
|
191 |
+
try {
|
192 |
+
|
193 |
+
id = href.split( '#' ).pop();
|
194 |
+
element = $( '#' + id );
|
195 |
+
|
196 |
+
if ( element.length > 0 ) {
|
197 |
+
$( link ).on( 'click', FLBuilderLayout._scrollToElementOnLinkClick );
|
198 |
+
}
|
199 |
+
}
|
200 |
+
catch( e ) {}
|
201 |
+
}
|
202 |
+
},
|
203 |
+
|
204 |
+
_scrollToElementOnLinkClick: function( e )
|
205 |
+
{
|
206 |
+
var link = $( this ),
|
207 |
+
href = link.attr( 'href' ),
|
208 |
+
id = href.split( '#' ).pop(),
|
209 |
+
element = $( '#' + id ),
|
210 |
+
dest = 0,
|
211 |
+
win = $( window ),
|
212 |
+
doc = $( document );
|
213 |
+
|
214 |
+
if ( element.length > 0 ) {
|
215 |
+
|
216 |
+
if ( element.offset().top > doc.height() - win.height() ) {
|
217 |
+
dest = doc.height() - win.height();
|
218 |
+
}
|
219 |
+
else {
|
220 |
+
dest = element.offset().top - 100;
|
221 |
+
}
|
222 |
+
|
223 |
+
$( 'html, body' ).animate( { scrollTop: dest }, 1000, 'swing' );
|
224 |
+
}
|
225 |
+
|
226 |
+
e.preventDefault();
|
227 |
}
|
228 |
};
|
229 |
|
js/fl-builder-preview.js
CHANGED
@@ -231,8 +231,7 @@ var FLBuilderPreview;
|
|
231 |
this._xhr = FLBuilder.ajax({
|
232 |
action : 'fl_builder_render_preview',
|
233 |
node_id : nodeId,
|
234 |
-
node_preview : settings
|
235 |
-
'wp-minify-off' : '1'
|
236 |
}, $.proxy(this._renderPreview, this));
|
237 |
},
|
238 |
|
@@ -296,6 +295,9 @@ var FLBuilderPreview;
|
|
296 |
|
297 |
// Remove the loading graphic.
|
298 |
$('.fl-builder-preview-loader').remove();
|
|
|
|
|
|
|
299 |
},
|
300 |
|
301 |
/**
|
231 |
this._xhr = FLBuilder.ajax({
|
232 |
action : 'fl_builder_render_preview',
|
233 |
node_id : nodeId,
|
234 |
+
node_preview : settings
|
|
|
235 |
}, $.proxy(this._renderPreview, this));
|
236 |
},
|
237 |
|
295 |
|
296 |
// Remove the loading graphic.
|
297 |
$('.fl-builder-preview-loader').remove();
|
298 |
+
|
299 |
+
// Fire the preview rendered event.
|
300 |
+
$( FLBuilder._contentClass ).trigger( 'fl-builder.preview-rendered' );
|
301 |
},
|
302 |
|
303 |
/**
|
js/fl-builder-tour.js
ADDED
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var FLBuilderTour;
|
2 |
+
|
3 |
+
(function( $ ) {
|
4 |
+
|
5 |
+
/**
|
6 |
+
* @class FLBuilderTour
|
7 |
+
* @static
|
8 |
+
*/
|
9 |
+
FLBuilderTour = {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* @property _tour
|
13 |
+
* @private
|
14 |
+
*/
|
15 |
+
_tour: null,
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @method start
|
19 |
+
*/
|
20 |
+
start: function()
|
21 |
+
{
|
22 |
+
if ( ! FLBuilderTour._tour ) {
|
23 |
+
FLBuilderTour._tour = new Tour( FLBuilderTour._config() );
|
24 |
+
FLBuilderTour._tour.init();
|
25 |
+
}
|
26 |
+
else {
|
27 |
+
FLBuilderTour._tour.restart();
|
28 |
+
}
|
29 |
+
|
30 |
+
FLBuilderTour._tour.start();
|
31 |
+
},
|
32 |
+
|
33 |
+
/**
|
34 |
+
* @method _config
|
35 |
+
* @private
|
36 |
+
*/
|
37 |
+
_config: function()
|
38 |
+
{
|
39 |
+
var config = {
|
40 |
+
storage : false,
|
41 |
+
onStart : FLBuilderTour._onStart,
|
42 |
+
onPrev : FLBuilderTour._onPrev,
|
43 |
+
onNext : FLBuilderTour._onNext,
|
44 |
+
onEnd : FLBuilderTour._onEnd,
|
45 |
+
template : '<div class="popover" role="tooltip"> <i class="fa fa-times" data-role="end"></i> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="next">' + FLBuilderStrings.tourNext + '</button> </div> </div>',
|
46 |
+
steps : [
|
47 |
+
{
|
48 |
+
animation : false,
|
49 |
+
element : '.fl-builder-bar',
|
50 |
+
placement : 'bottom',
|
51 |
+
title : FLBuilderStrings.tourTemplatesTitle,
|
52 |
+
content : FLBuilderStrings.tourTemplates,
|
53 |
+
onShown : function() {
|
54 |
+
if ( 0 === $( '.fl-template-selector' ).length ) {
|
55 |
+
$( '.popover[class*=tour-]' ).css( 'visibility', 'hidden' );
|
56 |
+
FLBuilder._showTemplateSelector();
|
57 |
+
}
|
58 |
+
else {
|
59 |
+
FLBuilderTour._templateSelectorLoaded();
|
60 |
+
}
|
61 |
+
}
|
62 |
+
},
|
63 |
+
{
|
64 |
+
animation : false,
|
65 |
+
element : '#fl-builder-blocks-rows .fl-builder-blocks-section-title',
|
66 |
+
placement : 'left',
|
67 |
+
title : FLBuilderStrings.tourAddRowsTitle,
|
68 |
+
content : FLBuilderStrings.tourAddRows,
|
69 |
+
onShow : function() {
|
70 |
+
FLBuilderTour._dimSection( 'body' );
|
71 |
+
FLBuilderTour._dimSection( '.fl-builder-bar' );
|
72 |
+
FLBuilder._showPanel();
|
73 |
+
$( '.fl-template-selector .fl-builder-settings-cancel' ).trigger( 'click' );
|
74 |
+
$( '#fl-builder-blocks-rows .fl-builder-blocks-section-title' ).trigger( 'click' );
|
75 |
+
}
|
76 |
+
},
|
77 |
+
{
|
78 |
+
animation : false,
|
79 |
+
element : '#fl-builder-blocks-basic .fl-builder-blocks-section-title',
|
80 |
+
placement : 'left',
|
81 |
+
title : FLBuilderStrings.tourAddContentTitle,
|
82 |
+
content : FLBuilderStrings.tourAddContent,
|
83 |
+
onShow : function() {
|
84 |
+
FLBuilderTour._dimSection( 'body' );
|
85 |
+
FLBuilderTour._dimSection( '.fl-builder-bar' );
|
86 |
+
FLBuilder._showPanel();
|
87 |
+
$( '#fl-builder-blocks-basic .fl-builder-blocks-section-title' ).trigger( 'click' );
|
88 |
+
$( '.fl-row' ).eq( 0 ).trigger( 'mouseleave' );
|
89 |
+
$( '.fl-module' ).eq( 0 ).trigger( 'mouseleave' );
|
90 |
+
}
|
91 |
+
},
|
92 |
+
{
|
93 |
+
animation : false,
|
94 |
+
element : '.fl-row:first-of-type',
|
95 |
+
placement : 'top',
|
96 |
+
title : FLBuilderStrings.tourEditContentTitle,
|
97 |
+
content : FLBuilderStrings.tourEditContent,
|
98 |
+
onShow : function() {
|
99 |
+
FLBuilderTour._dimSection( '.fl-builder-bar' );
|
100 |
+
FLBuilder._closePanel();
|
101 |
+
$( '.fl-row' ).eq( 0 ).trigger( 'mouseenter' );
|
102 |
+
$( '.fl-module' ).eq( 0 ).trigger( 'mouseenter' );
|
103 |
+
}
|
104 |
+
},
|
105 |
+
{
|
106 |
+
animation : false,
|
107 |
+
element : '.fl-row:first-of-type .fl-module-overlay .fl-block-overlay-actions',
|
108 |
+
placement : 'top',
|
109 |
+
title : FLBuilderStrings.tourEditContentTitle,
|
110 |
+
content : FLBuilderStrings.tourEditContent2,
|
111 |
+
onShow : function() {
|
112 |
+
FLBuilderTour._dimSection( '.fl-builder-bar' );
|
113 |
+
FLBuilder._closePanel();
|
114 |
+
$( '.fl-row' ).eq( 0 ).trigger( 'mouseenter' );
|
115 |
+
$( '.fl-module' ).eq( 0 ).trigger( 'mouseenter' );
|
116 |
+
}
|
117 |
+
},
|
118 |
+
{
|
119 |
+
animation : false,
|
120 |
+
element : '.fl-builder-add-content-button',
|
121 |
+
placement : 'bottom',
|
122 |
+
title : FLBuilderStrings.tourAddContentButtonTitle,
|
123 |
+
content : FLBuilderStrings.tourAddContentButton,
|
124 |
+
onShow : function() {
|
125 |
+
FLBuilderTour._dimSection( 'body' );
|
126 |
+
$( '.fl-row' ).eq( 0 ).trigger( 'mouseleave' );
|
127 |
+
$( '.fl-module' ).eq( 0 ).trigger( 'mouseleave' );
|
128 |
+
}
|
129 |
+
},
|
130 |
+
{
|
131 |
+
animation : false,
|
132 |
+
element : '.fl-builder-templates-button',
|
133 |
+
placement : 'bottom',
|
134 |
+
title : FLBuilderStrings.tourTemplatesButtonTitle,
|
135 |
+
content : FLBuilderStrings.tourTemplatesButton,
|
136 |
+
onShow : function() {
|
137 |
+
FLBuilderTour._dimSection( 'body' );
|
138 |
+
}
|
139 |
+
},
|
140 |
+
{
|
141 |
+
animation : false,
|
142 |
+
element : '.fl-builder-tools-button',
|
143 |
+
placement : 'bottom',
|
144 |
+
title : FLBuilderStrings.tourToolsButtonTitle,
|
145 |
+
content : FLBuilderStrings.tourToolsButton,
|
146 |
+
onShow : function() {
|
147 |
+
FLBuilderTour._dimSection( 'body' );
|
148 |
+
}
|
149 |
+
},
|
150 |
+
{
|
151 |
+
animation : false,
|
152 |
+
element : '.fl-builder-done-button',
|
153 |
+
placement : 'bottom',
|
154 |
+
title : FLBuilderStrings.tourDoneButtonTitle,
|
155 |
+
content : FLBuilderStrings.tourDoneButton,
|
156 |
+
onShow : function() {
|
157 |
+
FLBuilderTour._dimSection( 'body' );
|
158 |
+
}
|
159 |
+
},
|
160 |
+
{
|
161 |
+
animation : false,
|
162 |
+
orphan : true,
|
163 |
+
backdrop : true,
|
164 |
+
title : FLBuilderStrings.tourFinishedTitle,
|
165 |
+
content : FLBuilderStrings.tourFinished,
|
166 |
+
template : '<div class="popover" role="tooltip"> <div class="arrow"></div> <i class="fa fa-times" data-role="end"></i> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="end">' + FLBuilderStrings.tourEnd + '</button> </div> </div>',
|
167 |
+
}
|
168 |
+
]
|
169 |
+
};
|
170 |
+
|
171 |
+
// Remove the first step if no templates.
|
172 |
+
if( FLBuilderConfig.lite || 'disabled' == FLBuilderConfig.enabledTemplates ) {
|
173 |
+
config.steps.shift();
|
174 |
+
}
|
175 |
+
|
176 |
+
return config;
|
177 |
+
},
|
178 |
+
|
179 |
+
/**
|
180 |
+
* @method _onStart
|
181 |
+
* @private
|
182 |
+
*/
|
183 |
+
_onStart: function()
|
184 |
+
{
|
185 |
+
var body = $( 'body' );
|
186 |
+
|
187 |
+
body.append( '<div class="fl-builder-tour-mask"></div>' );
|
188 |
+
body.on( 'fl-builder.template-selector-loaded', FLBuilderTour._templateSelectorLoaded );
|
189 |
+
|
190 |
+
if ( 0 === $( '.fl-row' ).length ) {
|
191 |
+
$( '.fl-builder-content' ).append( '<div class="fl-builder-tour-demo-content fl-row fl-row-fixed-width fl-row-bg-none"> <div class="fl-row-content-wrap"> <div class="fl-row-content fl-row-fixed-width fl-node-content"> <div class="fl-col-group"> <div class="fl-col" style="width:100%"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-rich-text" data-type="rich-text" data-name="Text Editor"> <div class="fl-module-content fl-node-content"> <div class="fl-rich-text"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque ut lorem non cursus. Sed mauris nunc, porttitor iaculis lorem a, sollicitudin lacinia sapien. Proin euismod orci lacus, et sollicitudin leo posuere ac. In hac habitasse platea dictumst. Maecenas elit magna, consequat in turpis suscipit, ultrices rhoncus arcu. Phasellus finibus sapien nec elit tempus venenatis. Maecenas tincidunt sapien non libero maximus, in aliquam felis tincidunt. Mauris mollis ultricies facilisis. Duis condimentum dignissim tortor sit amet facilisis. Aenean gravida lacus eu risus molestie egestas. Donec ut dolor dictum, fringilla metus malesuada, viverra nunc. Maecenas ut purus ac justo aliquet lacinia. Cras vestibulum elementum tincidunt. Maecenas mattis tortor neque, consectetur dignissim neque tempor nec.</p></div> </div> </div> </div> </div> </div> </div> </div> </div>' );
|
192 |
+
FLBuilder._setupEmptyLayout();
|
193 |
+
FLBuilder._highlightEmptyCols();
|
194 |
+
}
|
195 |
+
},
|
196 |
+
|
197 |
+
/**
|
198 |
+
* @method _onPrev
|
199 |
+
* @private
|
200 |
+
*/
|
201 |
+
_onPrev: function()
|
202 |
+
{
|
203 |
+
$( '.fl-builder-tour-dimmed' ).remove();
|
204 |
+
},
|
205 |
+
|
206 |
+
/**
|
207 |
+
* @method _onNext
|
208 |
+
* @private
|
209 |
+
*/
|
210 |
+
_onNext: function()
|
211 |
+
{
|
212 |
+
$( '.fl-builder-tour-dimmed' ).remove();
|
213 |
+
},
|
214 |
+
|
215 |
+
/**
|
216 |
+
* @method _onEnd
|
217 |
+
* @private
|
218 |
+
*/
|
219 |
+
_onEnd: function()
|
220 |
+
{
|
221 |
+
$( 'body' ).off( 'fl-builder.template-selector-loaded' );
|
222 |
+
$( '.fl-builder-tour-mask' ).remove();
|
223 |
+
$( '.fl-builder-tour-dimmed' ).remove();
|
224 |
+
$( '.fl-builder-tour-demo-content' ).remove();
|
225 |
+
|
226 |
+
FLBuilder._setupEmptyLayout();
|
227 |
+
FLBuilder._highlightEmptyCols();
|
228 |
+
FLBuilder._showPanel();
|
229 |
+
FLBuilder._initTemplateSelector();
|
230 |
+
},
|
231 |
+
|
232 |
+
/**
|
233 |
+
* @method _dimSection
|
234 |
+
* @private
|
235 |
+
*/
|
236 |
+
_dimSection: function( selector )
|
237 |
+
{
|
238 |
+
$( selector ).find( '.fl-builder-tour-dimmed' ).remove();
|
239 |
+
$( selector ).append( '<div class="fl-builder-tour-dimmed"></div>' );
|
240 |
+
},
|
241 |
+
|
242 |
+
/**
|
243 |
+
* @method _templateSelectorLoaded
|
244 |
+
* @private
|
245 |
+
*/
|
246 |
+
_templateSelectorLoaded: function()
|
247 |
+
{
|
248 |
+
var header = $( '.fl-builder-settings-lightbox .fl-lightbox-header' ),
|
249 |
+
height = header.height(),
|
250 |
+
top = header.offset().top + 75;
|
251 |
+
|
252 |
+
$( '.popover[class*=tour-]' ).css({
|
253 |
+
top: ( top + height) + 'px',
|
254 |
+
visibility: 'visible'
|
255 |
+
});
|
256 |
+
}
|
257 |
+
};
|
258 |
+
|
259 |
+
})( jQuery );
|
js/fl-builder.js
CHANGED
@@ -156,12 +156,12 @@ var FLBuilder;
|
|
156 |
FLBuilder._initScrollbars();
|
157 |
FLBuilder._initLightboxes();
|
158 |
FLBuilder._initSortables();
|
159 |
-
FLBuilder.
|
160 |
-
FLBuilder._initTemplateSettings();
|
161 |
FLBuilder._bindEvents();
|
162 |
FLBuilder._bindOverlayEvents();
|
163 |
FLBuilder._setupEmptyLayout();
|
164 |
FLBuilder._highlightEmptyCols();
|
|
|
165 |
},
|
166 |
|
167 |
/**
|
@@ -384,6 +384,7 @@ var FLBuilder;
|
|
384 |
$('.fl-builder-add-content-button').on('click', FLBuilder._showPanel);
|
385 |
$('.fl-builder-templates-button').on('click', FLBuilder._changeTemplateClicked);
|
386 |
$('.fl-builder-upgrade-button').on('click', FLBuilder._upgradeClicked);
|
|
|
387 |
|
388 |
/* Panel */
|
389 |
$('.fl-builder-panel-actions .fl-builder-panel-close').on('click', FLBuilder._closePanel);
|
@@ -423,6 +424,16 @@ var FLBuilder;
|
|
423 |
$('body').delegate('.fl-builder-cancel-edit-template-button', 'click', FLBuilder._cancelEditUserTemplate);
|
424 |
$('body').delegate('.fl-builder-save-edit-template-button', 'click', FLBuilder._saveEditUserTemplate);
|
425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
/* Rows */
|
427 |
$('body').delegate('.fl-row-overlay .fl-block-remove', 'click', FLBuilder._deleteRowClicked);
|
428 |
$('body').delegate('.fl-row-overlay .fl-block-copy', 'click', FLBuilder._rowCopyClicked);
|
@@ -589,29 +600,9 @@ var FLBuilder;
|
|
589 |
$('#tiptip_holder').stop().remove();
|
590 |
},
|
591 |
|
592 |
-
/*
|
593 |
----------------------------------------------------------*/
|
594 |
|
595 |
-
/**
|
596 |
-
* @method _closePanel
|
597 |
-
* @private
|
598 |
-
*/
|
599 |
-
_closePanel: function()
|
600 |
-
{
|
601 |
-
$('.fl-builder-panel').stop(true, true).animate({ right: '-350px' }, 500, function(){ $(this).hide(); });
|
602 |
-
$('.fl-builder-bar .fl-builder-add-content-button').stop(true, true).fadeIn();
|
603 |
-
},
|
604 |
-
|
605 |
-
/**
|
606 |
-
* @method _showPanel
|
607 |
-
* @private
|
608 |
-
*/
|
609 |
-
_showPanel: function()
|
610 |
-
{
|
611 |
-
$('.fl-builder-bar .fl-builder-add-content-button').stop(true, true).fadeOut();
|
612 |
-
$('.fl-builder-panel').stop(true, true).show().animate({ right: '0' }, 500);
|
613 |
-
},
|
614 |
-
|
615 |
/**
|
616 |
* @method _toolsClicked
|
617 |
* @private
|
@@ -632,7 +623,7 @@ var FLBuilder;
|
|
632 |
}
|
633 |
|
634 |
// Template buttons
|
635 |
-
if(!lite && postType != 'fl-builder-template' &&
|
636 |
|
637 |
buttons['save-user-template'] = FLBuilderStrings.saveTemplate;
|
638 |
|
@@ -677,6 +668,57 @@ var FLBuilder;
|
|
677 |
window.open(FLBuilderConfig.upgradeUrl);
|
678 |
},
|
679 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
680 |
/**
|
681 |
* @method _blockSectionTitleClicked
|
682 |
* @private
|
@@ -922,14 +964,24 @@ var FLBuilder;
|
|
922 |
*/
|
923 |
_showTemplateSelector: function()
|
924 |
{
|
925 |
-
|
926 |
-
|
927 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
928 |
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
}
|
933 |
},
|
934 |
|
935 |
/**
|
@@ -942,7 +994,9 @@ var FLBuilder;
|
|
942 |
|
943 |
if($('.fl-user-template').length == 0) {
|
944 |
$('.fl-user-templates-message').show();
|
945 |
-
}
|
|
|
|
|
946 |
},
|
947 |
|
948 |
/**
|
@@ -1229,20 +1283,113 @@ var FLBuilder;
|
|
1229 |
window.close();
|
1230 |
},
|
1231 |
|
1232 |
-
/* Template Settings
|
1233 |
----------------------------------------------------------*/
|
1234 |
|
1235 |
/**
|
1236 |
-
* @method
|
1237 |
* @private
|
1238 |
*/
|
1239 |
-
|
1240 |
{
|
1241 |
if(FLBuilder._templateSettingsEnabled) {
|
1242 |
FLBuilder._bindTemplateSettings();
|
1243 |
}
|
1244 |
},
|
1245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|