-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.config.js
275 lines (244 loc) · 11.1 KB
/
app.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
'use strict';
var appConfig = window.appConfig || {};
appConfig.menu_speed = 200;
appConfig.smartSkin = "smart-style-0";
appConfig.skins = [
{name: "smart-style-0",
logo: "styles/img/logo.png",
class: "btn btn-block btn-xs txt-color-white margin-right-5",
style: "background-color:#4E463F;",
label: "Smart Default"},
{name: "smart-style-1",
logo: "styles/img/logo-white.png",
class: "btn btn-block btn-xs txt-color-white",
style: "background:#3A4558;",
label: "Dark Elegance"},
{name: "smart-style-2",
logo: "styles/img/logo-blue.png",
class: "btn btn-xs btn-block txt-color-darken margin-top-5",
style: "background:#fff;",
label: "Ultra Light"},
{name: "smart-style-3",
logo: "styles/img/logo-pale.png",
class: "btn btn-xs btn-block txt-color-white margin-top-5",
style: "background:#f78c40",
label: "Google Skin"},
{name: "smart-style-4",
logo: "styles/img/logo-pale.png",
class: "btn btn-xs btn-block txt-color-white margin-top-5",
style: "background: #bbc0cf; border: 1px solid #59779E; color: #17273D !important;",
label: "PixelSmash"},
{name: "smart-style-5",
logo: "styles/img/logo-pale.png",
class: "btn btn-xs btn-block txt-color-white margin-top-5",
style: "background: rgba(153, 179, 204, 0.2); border: 1px solid rgba(121, 161, 221, 0.8); color: #17273D !important;",
label: "Glass"},
{name: "smart-style-6",
logo: "styles/img/logo-pale.png",
class: "btn btn-xs btn-block txt-color-white margin-top-5",
style: "background: #2196F3; border: 1px solid rgba(121, 161, 221, 0.8); color: #FFF !important;",
beta: true,
label: "MaterialDesign"
}
];
appConfig.sound_path = "sound/";
appConfig.sound_on = true;
/*
* DEBUGGING MODE
* debugState = true; will spit all debuging message inside browser console.
* The colors are best displayed in chrome browser.
*/
appConfig.debugState = false;
appConfig.debugStyle = 'font-weight: bold; color: #00f;';
appConfig.debugStyle_green = 'font-weight: bold; font-style:italic; color: #46C246;';
appConfig.debugStyle_red = 'font-weight: bold; color: #ed1c24;';
appConfig.debugStyle_warning = 'background-color:yellow';
appConfig.debugStyle_success = 'background-color:green; font-weight:bold; color:#fff;';
appConfig.debugStyle_error = 'background-color:#ed1c24; font-weight:bold; color:#fff;';
appConfig.voice_command = true;
appConfig.voice_command_auto = false;
/*
* Sets the language to the default 'en-US'. (supports over 50 languages
* by google)
*
* Afrikaans ['af-ZA']
* Bahasa Indonesia ['id-ID']
* Bahasa Melayu ['ms-MY']
* CatalГ ['ca-ES']
* ДЊeЕЎtina ['cs-CZ']
* Deutsch ['de-DE']
* English ['en-AU', 'Australia']
* ['en-CA', 'Canada']
* ['en-IN', 'India']
* ['en-NZ', 'New Zealand']
* ['en-ZA', 'South Africa']
* ['en-GB', 'United Kingdom']
* ['en-US', 'United States']
* EspaГ±ol ['es-AR', 'Argentina']
* ['es-BO', 'Bolivia']
* ['es-CL', 'Chile']
* ['es-CO', 'Colombia']
* ['es-CR', 'Costa Rica']
* ['es-EC', 'Ecuador']
* ['es-SV', 'El Salvador']
* ['es-ES', 'EspaГ±a']
* ['es-US', 'Estados Unidos']
* ['es-GT', 'Guatemala']
* ['es-HN', 'Honduras']
* ['es-MX', 'MГ©xico']
* ['es-NI', 'Nicaragua']
* ['es-PA', 'PanamГЎ']
* ['es-PY', 'Paraguay']
* ['es-PE', 'PerГє']
* ['es-PR', 'Puerto Rico']
* ['es-DO', 'RepГєblica Dominicana']
* ['es-UY', 'Uruguay']
* ['es-VE', 'Venezuela']
* Euskara ['eu-ES']
* Français ['fr-FR']
* Galego ['gl-ES']
* Hrvatski ['hr_HR']
* IsiZulu ['zu-ZA']
* ГЌslenska ['is-IS']
* Italiano ['it-IT', 'Italia']
* ['it-CH', 'Svizzera']
* Magyar ['hu-HU']
* Nederlands ['nl-NL']
* Norsk bokmГҐl ['nb-NO']
* Polski ['pl-PL']
* PortuguГЄs ['pt-BR', 'Brasil']
* ['pt-PT', 'Portugal']
* RomГўnДѓ ['ro-RO']
* SlovenДЌina ['sk-SK']
* Suomi ['fi-FI']
* Svenska ['sv-SE']
* Türkçe ['tr-TR']
* български['bg-BG']
* PСѓСЃСЃРєРёР№ ['ru-RU']
* РЎСЂРїСЃРєРё ['sr-RS']
* н•њкµм–ґ ['ko-KR']
* дёж–‡ ['cmn-Hans-CN', 'ж™®йЂљиЇќ (дёе›Ѕе¤§й™†)']
* ['cmn-Hans-HK', '普通话 (香港)']
* ['cmn-Hant-TW', 'дёж–‡ (еЏ°зЃЈ)']
* ['yue-Hant-HK', '粵語 (香港)']
* ж—Ґжњ¬иЄћ ['ja-JP']
* Lingua latД«na ['la']
*/
appConfig.voice_command_lang = 'cmn-Hans-CN';
/*
* Use localstorage to remember on/off (best used with HTML Version)
*/
appConfig.voice_localStorage = false;
/*
* Voice Commands
* Defines all voice command variables and functions
*/
if (appConfig.voice_command) {
appConfig.commands = {
'show dashboard' : function() { window.location.hash = "dashboard" },
'show inbox' : function() { window.location.hash = "inbox/" },
'show graphs' : function() { window.location.hash = "graphs/flot" },
'show flotchart' : function() { window.location.hash = "graphs/flot" },
'show morris chart' : function() { window.location.hash = "graphs/morris" },
'show inline chart' : function() { window.location.hash = "graphs/inline-charts" },
'show dygraphs' : function() { window.location.hash = "graphs/dygraphs" },
'show tables' : function() { window.location.hash = "tables/table" },
'show data table' : function() { window.location.hash = "tables/datatable" },
'show jquery grid' : function() { window.location.hash = "tables/jqgrid" },
'show form' : function() { window.location.hash = "forms/form-elements" },
'show form layouts' : function() { window.location.hash = "forms/form-templates" },
'show form validation' : function() { window.location.hash = "forms/validation" },
'show form elements' : function() { window.location.hash = "forms/bootstrap-forms" },
'show form plugins' : function() { window.location.hash = "forms/plugins" },
'show form wizards' : function() { window.location.hash = "forms/wizards" },
'show bootstrap editor' : function() { window.location.hash = "forms/other-editors" },
'show dropzone' : function() { window.location.hash = "forms/dropzone" },
'show image cropping' : function() { window.location.hash = "forms/image-editor" },
'show general elements' : function() { window.location.hash = "ui/general-elements" },
'show buttons' : function() { window.location.hash = "ui/buttons" },
'show fontawesome' : function() { window.location.hash = "ui/icons/fa" },
'show glyph icons' : function() { window.location.hash = "ui/icons/glyph" },
'show flags' : function() { window.location.hash = "ui/icons/flags" },
'show grid' : function() { window.location.hash = "ui/grid" },
'show tree view' : function() { window.location.hash = "ui/treeview" },
'show nestable lists' : function() { window.location.hash = "ui/nestable-list" },
'show jquery U I' : function() { window.location.hash = "ui/jqui" },
'show typography' : function() { window.location.hash = "ui/typography" },
'show calendar' : function() { window.location.hash = "calendar" },
'show widgets' : function() { window.location.hash = "widgets" },
'show gallery' : function() { window.location.hash = "gallery" },
'show maps' : function() { window.location.hash = "gmap-xml" },
'go back' : function() { history.back(1); },
'scroll up' : function () { $('html, body').animate({ scrollTop: 0 }, 100); },
'scroll down' : function () { $('html, body').animate({ scrollTop: $(document).height() }, 100);},
'hide navigation' : function() {
if ($( ":root" ).hasClass("container") && !$( ":root" ).hasClass("menu-on-top")){
$('span.minifyme').trigger("click");
} else {
$('#hide-menu > span > a').trigger("click");
}
},
'show navigation' : function() {
if ($( ":root" ).hasClass("container") && !$( ":root" ).hasClass("menu-on-top")){
$('span.minifyme').trigger("click");
} else {
$('#hide-menu > span > a').trigger("click");
}
},
'mute' : function() {
appConfig.sound_on = false;
$.smallBox({
title : "MUTE",
content : "All sounds have been muted!",
color : "#a90329",
timeout: 4000,
icon : "fa fa-volume-off"
});
},
'sound on' : function() {
appConfig.sound_on = true;
$.speechApp.playConfirmation();
$.smallBox({
title : "UNMUTE",
content : "All sounds have been turned on!",
color : "#40ac2b",
sound_file: 'voice_alert',
timeout: 5000,
icon : "fa fa-volume-up"
});
},
'stop' : function() {
smartSpeechRecognition.abort();
$( ":root" ).removeClass("voice-command-active");
$.smallBox({
title : "VOICE COMMAND OFF",
content : "Your voice commands has been successfully turned off. Click on the <i class='fa fa-microphone fa-lg fa-fw'></i> icon to turn it back on.",
color : "#40ac2b",
sound_file: 'voice_off',
timeout: 8000,
icon : "fa fa-microphone-slash"
});
if ($('#speech-btn .popover').is(':visible')) {
$('#speech-btn .popover').fadeOut(250);
}
},
'help' : function() {
$('#voiceModal').removeData('modal').modal( { remote: "app/layout/partials/voice-commands.tpl.html", show: true } );
if ($('#speech-btn .popover').is(':visible')) {
$('#speech-btn .popover').fadeOut(250);
}
},
'got it' : function() {
$('#voiceModal').modal('hide');
},
'logout' : function() {
$.speechApp.stop();
window.location = $('#logout > span > a').attr("href");
}
};
}
appConfig.apiRootUrl = 'api';
window.appConfig = appConfig;
/*
* END APP.appConfig
*/