PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 3.6.61
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v3.6.61
6.2.14 6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 All 196 releases
fluentform / resources / assets / admin / settings / settings.js

settings.js in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 3.6.61, at resources/assets/admin/settings/settings.js

107 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import Vue from 'vue';
2 import ajaxCaller from '../ajaxCaller';
3 import locale from 'element-ui/lib/locale';
4 import lang from 'element-ui/lib/locale/lang/en';
5
6 import Settings from './Settings.vue';
7 import reCaptcha from './reCaptcha.vue';
8 import pdf_settings from './pdf.vue';
9 import GeneralIntegrationSettings from './GeneralIntegrationSettings';
10 import DoubleOptinSettings from './DoubleOptinSettings';
11
12 import {
13 Button,
14 Radio,
15 RadioGroup,
16 Form,
17 FormItem,
18 Input,
19 Tooltip,
20 Row,
21 Col,
22 Select,
23 Option,
24 OptionGroup,
25 Switch,
26 Dialog,
27 Loading,
28 Notification,
29 Checkbox,
30 CheckboxGroup,
31 ColorPicker,
32 InputNumber
33 } from 'element-ui';
34
35 locale.use(lang);
36 Vue.use(Button);
37 Vue.use(Form);
38 Vue.use(Row);
39 Vue.use(Col);
40 Vue.use(Input);
41 Vue.use(Checkbox);
42 Vue.use(CheckboxGroup);
43 Vue.use(Select);
44 Vue.use(Option);
45 Vue.use(OptionGroup);
46 Vue.use(Switch);
47 Vue.use(Tooltip);
48 Vue.use(FormItem);
49 Vue.use(ajaxCaller);
50 Vue.use(Loading.directive);
51 Vue.use(InputNumber);
52 Vue.use(ColorPicker);
53 Vue.use(RadioGroup);
54 Vue.use(Radio);
55 Vue.use(Dialog);
56 Vue.prototype.$notify = Notification;
57 Vue.prototype.$loading = Loading.service;
58
59 new Vue({
60 el: '#ff_global_settings_option_app',
61 components: {
62 settings: Settings,
63 re_captcha: reCaptcha,
64 pdf_settings: pdf_settings,
65 'general-integration-settings': GeneralIntegrationSettings,
66 'double_optin_settings': DoubleOptinSettings
67 },
68 data: {
69 component: 'settings',
70 App: window.FluentFormApp,
71 settings_key: ''
72 },
73 methods: {
74 setRoute(hash) {
75 // get component by hash
76 let $el = jQuery('.ff_settings_list li').find('a[data-hash=' + hash + ']');
77 let component = hash;
78 if ($el.data('component')) {
79 component = $el.data('component');
80 } else {
81 $el = jQuery('.ff_settings_list li').find('a[data-component=' + hash + ']');
82 }
83 if (this.$options.components[component]) {
84 jQuery('.ff_settings_list li').removeClass('active');
85 $el.parent().addClass('active');
86 this.settings_key = jQuery($el).attr('data-settings_key');
87 this.component = component;
88 }
89 }
90 },
91 created() {
92 let hash = location.hash.substr(1);
93 if (hash) {
94 this.setRoute(hash);
95 }
96
97 const that = this;
98 jQuery('.ff_settings_list li a').on('click', function () {
99 let hash = jQuery(this).attr('data-hash');
100 if (hash) {
101 that.setRoute(hash);
102 }
103 jQuery(this).parent().addClass('active');
104 });
105 }
106 });
107