|
@@ -177,12 +177,12 @@ var calc_navbar_height = function() {
|
177
|
177
|
|
178
|
178
|
// ask verification
|
179
|
179
|
$.SmartMessageBox({
|
180
|
|
- title : "<i class='fa fa-sign-out txt-color-orangeDark'></i> Logout <span class='txt-color-orangeDark'><strong>" + $('#show-shortcut').text() + "</strong></span> ?",
|
|
180
|
+ title : "<i class='fa fa-sign-out txt-color-orangeDark'></i> Abmelden <span class='txt-color-orangeDark'><strong>" + $('#show-shortcut').text() + "</strong></span> ?",
|
181
|
181
|
content : $this.data('logout-msg') || "You can improve your security further after logging out by closing this opened browser",
|
182
|
|
- buttons : '[No][Yes]'
|
|
182
|
+ buttons : '[Nein][Ja]'
|
183
|
183
|
|
184
|
184
|
}, function(ButtonPressed) {
|
185
|
|
- if (ButtonPressed == "Yes") {
|
|
185
|
+ if (ButtonPressed == "Ja") {
|
186
|
186
|
$.root_.addClass('animated fadeOutUp');
|
187
|
187
|
setTimeout(logout, 1000);
|
188
|
188
|
}
|
|
@@ -192,66 +192,6 @@ var calc_navbar_height = function() {
|
192
|
192
|
}
|
193
|
193
|
|
194
|
194
|
},
|
195
|
|
-
|
196
|
|
- // RESET WIDGETS
|
197
|
|
- resetWidgets: function($this){
|
198
|
|
-
|
199
|
|
- $.SmartMessageBox({
|
200
|
|
- title : "<i class='fa fa-refresh' style='color:green'></i> Clear Local Storage",
|
201
|
|
- content : $this.data('reset-msg') || "Would you like to RESET all your saved widgets and clear LocalStorage?1",
|
202
|
|
- buttons : '[No][Yes]'
|
203
|
|
- }, function(ButtonPressed) {
|
204
|
|
- if (ButtonPressed == "Yes" && localStorage) {
|
205
|
|
- localStorage.clear();
|
206
|
|
- location.reload();
|
207
|
|
- }
|
208
|
|
-
|
209
|
|
- });
|
210
|
|
- },
|
211
|
|
-
|
212
|
|
- // LAUNCH FULLSCREEN
|
213
|
|
- launchFullscreen: function(element){
|
214
|
|
-
|
215
|
|
- if (!$.root_.hasClass("full-screen")) {
|
216
|
|
-
|
217
|
|
- $.root_.addClass("full-screen");
|
218
|
|
-
|
219
|
|
- if (element.requestFullscreen) {
|
220
|
|
- element.requestFullscreen();
|
221
|
|
- } else if (element.mozRequestFullScreen) {
|
222
|
|
- element.mozRequestFullScreen();
|
223
|
|
- } else if (element.webkitRequestFullscreen) {
|
224
|
|
- element.webkitRequestFullscreen();
|
225
|
|
- } else if (element.msRequestFullscreen) {
|
226
|
|
- element.msRequestFullscreen();
|
227
|
|
- }
|
228
|
|
-
|
229
|
|
- } else {
|
230
|
|
-
|
231
|
|
- $.root_.removeClass("full-screen");
|
232
|
|
-
|
233
|
|
- if (document.exitFullscreen) {
|
234
|
|
- document.exitFullscreen();
|
235
|
|
- } else if (document.mozCancelFullScreen) {
|
236
|
|
- document.mozCancelFullScreen();
|
237
|
|
- } else if (document.webkitExitFullscreen) {
|
238
|
|
- document.webkitExitFullscreen();
|
239
|
|
- }
|
240
|
|
-
|
241
|
|
- }
|
242
|
|
-
|
243
|
|
- },
|
244
|
|
-
|
245
|
|
- // MINIFY MENU
|
246
|
|
- minifyMenu: function($this){
|
247
|
|
- if (!$.root_.hasClass("menu-on-top")){
|
248
|
|
- $.root_.toggleClass("minified");
|
249
|
|
- $.root_.removeClass("hidden-menu");
|
250
|
|
- $('html').removeClass("hidden-menu-mobile-lock");
|
251
|
|
- $this.effect("highlight", {}, 500);
|
252
|
|
- }
|
253
|
|
- },
|
254
|
|
-
|
255
|
195
|
// TOGGLE MENU
|
256
|
196
|
toggleMenu: function(){
|
257
|
197
|
if (!$.root_.hasClass("menu-on-top")){
|
|
@@ -265,50 +205,7 @@ var calc_navbar_height = function() {
|
265
|
205
|
$.root_.toggleClass("hidden-menu");
|
266
|
206
|
$.root_.removeClass("minified");
|
267
|
207
|
}
|
268
|
|
- },
|
269
|
|
-
|
270
|
|
- // TOGGLE SHORTCUT
|
271
|
|
- toggleShortcut: function(){
|
272
|
|
-
|
273
|
|
- if (shortcut_dropdown.is(":visible")) {
|
274
|
|
- shortcut_buttons_hide();
|
275
|
|
- } else {
|
276
|
|
- shortcut_buttons_show();
|
277
|
|
- }
|
278
|
|
-
|
279
|
|
- // SHORT CUT (buttons that appear when clicked on user name)
|
280
|
|
- shortcut_dropdown.find('a').click(function(e) {
|
281
|
|
- e.preventDefault();
|
282
|
|
- window.location = $(this).attr('href');
|
283
|
|
- setTimeout(shortcut_buttons_hide, 300);
|
284
|
|
-
|
285
|
|
- });
|
286
|
|
-
|
287
|
|
- // SHORTCUT buttons goes away if mouse is clicked outside of the area
|
288
|
|
- $(document).mouseup(function(e) {
|
289
|
|
- if (!shortcut_dropdown.is(e.target) && shortcut_dropdown.has(e.target).length === 0) {
|
290
|
|
- shortcut_buttons_hide();
|
291
|
|
- }
|
292
|
|
- });
|
293
|
|
-
|
294
|
|
- // SHORTCUT ANIMATE HIDE
|
295
|
|
- function shortcut_buttons_hide() {
|
296
|
|
- shortcut_dropdown.animate({
|
297
|
|
- height : "hide"
|
298
|
|
- }, 300, "easeOutCirc");
|
299
|
|
- $.root_.removeClass('shortcut-on');
|
300
|
|
-
|
301
|
|
- }
|
302
|
|
-
|
303
|
|
- // SHORTCUT ANIMATE SHOW
|
304
|
|
- function shortcut_buttons_show() {
|
305
|
|
- shortcut_dropdown.animate({
|
306
|
|
- height : "show"
|
307
|
|
- }, 200, "easeOutCirc");
|
308
|
|
- $.root_.addClass('shortcut-on');
|
309
|
|
- }
|
310
|
|
-
|
311
|
|
- }
|
|
208
|
+ }
|
312
|
209
|
|
313
|
210
|
};
|
314
|
211
|
|
|
@@ -320,44 +217,13 @@ var calc_navbar_height = function() {
|
320
|
217
|
//clear memory reference
|
321
|
218
|
$this = null;
|
322
|
219
|
|
323
|
|
- });
|
324
|
|
-
|
325
|
|
- /*
|
326
|
|
- * BUTTON ACTIONS
|
327
|
|
- */
|
328
|
|
- $.root_.on('click', '[data-action="resetWidgets"]', function(e) {
|
329
|
|
- var $this = $(this);
|
330
|
|
- smartActions.resetWidgets($this);
|
331
|
|
- e.preventDefault();
|
332
|
|
-
|
333
|
|
- //clear memory reference
|
334
|
|
- $this = null;
|
335
|
220
|
});
|
336
|
221
|
|
337
|
|
- $.root_.on('click', '[data-action="launchFullscreen"]', function(e) {
|
338
|
|
- smartActions.launchFullscreen(document.documentElement);
|
339
|
|
- e.preventDefault();
|
340
|
|
- });
|
341
|
|
-
|
342
|
|
- $.root_.on('click', '[data-action="minifyMenu"]', function(e) {
|
343
|
|
- var $this = $(this);
|
344
|
|
- smartActions.minifyMenu($this);
|
345
|
|
- e.preventDefault();
|
346
|
|
-
|
347
|
|
- //clear memory reference
|
348
|
|
- $this = null;
|
349
|
|
- });
|
350
|
|
-
|
351
|
222
|
$.root_.on('click', '[data-action="toggleMenu"]', function(e) {
|
352
|
223
|
smartActions.toggleMenu();
|
353
|
224
|
e.preventDefault();
|
354
|
225
|
});
|
355
|
|
-
|
356
|
|
- $.root_.on('click', '[data-action="toggleShortcut"]', function(e) {
|
357
|
|
- smartActions.toggleShortcut();
|
358
|
|
- e.preventDefault();
|
359
|
|
- });
|
360
|
|
-
|
|
226
|
+
|
361
|
227
|
};
|
362
|
228
|
/* ~ END: SMART ACTIONS */
|
363
|
229
|
|
|
@@ -396,16 +262,7 @@ var calc_navbar_height = function() {
|
396
|
262
|
if ($("[rel=tooltip]").length) {
|
397
|
263
|
$("[rel=tooltip]").tooltip();
|
398
|
264
|
}*/
|
399
|
|
-
|
400
|
|
- // SHOW & HIDE MOBILE SEARCH FIELD
|
401
|
|
- $('#search-mobile').click(function() {
|
402
|
|
- $.root_.addClass('search-mobile');
|
403
|
|
- });
|
404
|
|
-
|
405
|
|
- $('#cancel-search-js').click(function() {
|
406
|
|
- $.root_.removeClass('search-mobile');
|
407
|
|
- });
|
408
|
|
-
|
|
265
|
+
|
409
|
266
|
// ACTIVITY
|
410
|
267
|
// ajax drop
|
411
|
268
|
$('#activity').click(function(e) {
|
|
@@ -1466,28 +1323,6 @@ var calc_navbar_height = function() {
|
1466
|
1323
|
}
|
1467
|
1324
|
/* ~ END: INITIALIZE JARVIS WIDGETS */
|
1468
|
1325
|
|
1469
|
|
-/*
|
1470
|
|
- * GOOGLE MAPS
|
1471
|
|
- * description: Append google maps to head dynamically (only execute for ajax version)
|
1472
|
|
- * Loads at the begining for ajax pages
|
1473
|
|
- */
|
1474
|
|
- if ($.navAsAjax || $(".google_maps")){
|
1475
|
|
- var gMapsLoaded = false;
|
1476
|
|
- window.gMapsCallback = function() {
|
1477
|
|
- gMapsLoaded = true;
|
1478
|
|
- $(window).trigger('gMapsLoaded');
|
1479
|
|
- };
|
1480
|
|
- window.loadGoogleMaps = function() {
|
1481
|
|
- if (gMapsLoaded)
|
1482
|
|
- return window.gMapsCallback();
|
1483
|
|
- var script_tag = document.createElement('script');
|
1484
|
|
- script_tag.setAttribute("type", "text/javascript");
|
1485
|
|
- script_tag.setAttribute("src", "https://maps.google.com/maps/api/js?sensor=false&callback=gMapsCallback");
|
1486
|
|
- (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag);
|
1487
|
|
- };
|
1488
|
|
- }
|
1489
|
|
-/* ~ END: GOOGLE MAPS */
|
1490
|
|
-
|
1491
|
1326
|
/*
|
1492
|
1327
|
* LOAD SCRIPTS
|
1493
|
1328
|
* Usage:
|
|
@@ -1683,40 +1518,7 @@ var calc_navbar_height = function() {
|
1683
|
1518
|
dataType : 'html',
|
1684
|
1519
|
cache : true, // (warning: setting it to false will cause a timestamp and will call the request twice)
|
1685
|
1520
|
beforeSend : function() {
|
1686
|
|
-
|
1687
|
|
- //IE11 bug fix for googlemaps (delete all google map instances)
|
1688
|
|
- //check if the page is ajax = true, has google map class and the container is #content
|
1689
|
|
- if ($.navAsAjax && $(".google_maps")[0] && (container[0] == $("#content")[0]) ) {
|
1690
|
|
-
|
1691
|
|
- // target gmaps if any on page
|
1692
|
|
- var collection = $(".google_maps"),
|
1693
|
|
- i = 0;
|
1694
|
|
- // run for each map
|
1695
|
|
- collection.each(function() {
|
1696
|
|
- i ++;
|
1697
|
|
- // get map id from class elements
|
1698
|
|
- var divDealerMap = document.getElementById(this.id);
|
1699
|
|
-
|
1700
|
|
- if(i == collection.length + 1) {
|
1701
|
|
- // "callback"
|
1702
|
|
- } else {
|
1703
|
|
- // destroy every map found
|
1704
|
|
- if (divDealerMap) divDealerMap.parentNode.removeChild(divDealerMap);
|
1705
|
|
-
|
1706
|
|
- // debugState
|
1707
|
|
- if (debugState){
|
1708
|
|
- root.console.log("Destroying maps.........%c" + this.id, debugStyle_warning);
|
1709
|
|
- }
|
1710
|
|
- }
|
1711
|
|
- });
|
1712
|
1521
|
|
1713
|
|
- // debugState
|
1714
|
|
- if (debugState){
|
1715
|
|
- root.console.log("✔ Google map instances nuked!!!");
|
1716
|
|
- }
|
1717
|
|
-
|
1718
|
|
- } //end fix
|
1719
|
|
-
|
1720
|
1522
|
// destroy all datatable instances
|
1721
|
1523
|
if ( $.navAsAjax && $('.dataTables_wrapper')[0] && (container[0] == $("#content")[0]) ) {
|
1722
|
1524
|
|