- public function __construct($freepbx = null) {
- if ($freepbx == null) {
- throw new Exception("Not given a FreePBX Object");
- }
- $this->freepbx = $freepbx;
- $this->nt = $this->freepbx->Notifications;
- }
- public function getScripts() {
- $files = ["moment-with-locales-2.20.1.min.js", "script.legacy.js", "Sortable-1.15.0.min.js", "autosize-5.0.1.min.js", "bootstrap-4.6.1.bundle.min.js", "bootstrap-multiselect-1.1.1.js", "bootstrap-select-1.13.14.min.js", "bootstrap-table-dev.min.js", "bootstrap-table-extensions-dev/bootstrap-table-cookie.min.js", "bootstrap-table-extensions-dev/bootstrap-table-export.min.js", "bootstrap-table-extensions-dev/bootstrap-table-mobile.min.js", "bootstrap-table-extensions-dev/bootstrap-table-reorder-rows.min.js", "bootstrap-table-extensions-dev/bootstrap-table-toolbar.min.js", "browser-locale-1.0.0.min.js", "browser-support.js", "chosen.jquery-1.8.7.min.js", "jquery-migrate-3.0.0.js", "jquery-ui-1.13.2.min.js", "jquery.fileupload-10.32.0.js", "jquery.fileupload-process-10.32.0.js", "jquery.form-4.3.0.min.js", "jquery.hotkeys-0.2.0.js", "jquery.iframe-transport-10.32.0.js", "jquery.jplayer-2.9.2.min.js", "jquery.numeric-1.4.1.min.js", "jquery.smartWizard-3.3.1.js", "jquery.tablednd-0.9.1.min.js", "js.cookie-3.0.1.min.js", "modernizr-3.3.1.min.js", "moment-timezone-with-data-1970-2030-0.5.41.min.js", "moment-duration-format-2.2.1.js", "notie-3.9.4.min.js", "recorder.js", "recorderWorker.js", "search.js", "tableexport-1.26.0.js", "timeutils.js", "typeahead.bundle-0.10.5.min.js", "common.js", "text-editor-1.2.1.js"];
- $package = $this->freepbx->Config->get('USE_PACKAGED_JS');
- if($package) {
- $jspath = $this->freepbx->Config->get('AMPWEBROOT') .'/admin/assets/js';
- $sha1 = '';
- foreach($files as $file) {
- $filename = $jspath."/".$file;
- if(file_exists($filename)) {
- $sha1 .= sha1_file($filename);