PHP Classes

File: themes/backend/assets/local/js/script.min.js

Recommend this page to a friend!
  Classes of Aby Dahana   Aksara   themes/backend/assets/local/js/script.min.js   Download  
File: themes/backend/assets/local/js/script.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Version update
Date: 5 months ago
Size: 2,594 bytes
 

Contents

Class file image Download
$(document).ready(function() { /** * Toggle fullscreen */ $('body').on('click touch', '[data-toggle=fullscreen]', function(e) { e.preventDefault(); if ((document.fullScreenElement && document.fullScreenElement !== null) || (! document.mozFullScreen && ! document.webkitIsFullScreen)) { var success = false; if (document.documentElement.requestFullScreen) { success = true; document.documentElement.requestFullScreen() } else if (document.documentElement.mozRequestFullScreen) { success = true; document.documentElement.mozRequestFullScreen() } else if (document.documentElement.webkitRequestFullScreen) { success = true; document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT) } if (success) { $(this).find('.mdi').removeClass('mdi-fullscreen').addClass('mdi-fullscreen-exit') } } else { var success = false; if (document.cancelFullScreen) { success = true; document.cancelFullScreen() } else if (document.mozCancelFullScreen) { success = true; document.mozCancelFullScreen() } else if (document.webkitCancelFullScreen) { success = true; document.webkitCancelFullScreen() } if (success) { $(this).find('.mdi').removeClass('mdi-fullscreen-exit').addClass('mdi-fullscreen') } } }); // The .off() method removes event handlers that were attached with .on() $('body').off('change.layer_type'), $('body').on('change.layer_type', 'input[name=layer_type]', function(e) { // Modify text label on input changes if(['polygon', 'linestring'].includes($(this).val())) { $(this).closest('form').find('label[for=icon_scale_input]').html(phrase('Opacity') + ' <span class="text-danger font-weight-bold">*</span>') } else { $(this).closest('form').find('label[for=icon_scale_input]').html(phrase('Icon Scale') + ' <span class="text-danger font-weight-bold">*</span>') } }) }); /** * Include your function into afterCall to run it after ajax call */ afterCall.push(function() { if ($('input[name=layer_type]').length) { $('input[name=layer_type]').trigger('change') } })