aboutsummaryrefslogtreecommitdiffstats
path: root/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:41:00 -0500
committerPamela Dragosh <pdragosh@research.att.com>2017-02-14 19:41:32 -0500
commit91d04c64771832a0b8815ffbe1f0f9920320d94d (patch)
treefb02d5e1c84a3d91def9a7ee95bc87f9c046cc96 /ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils
parentb9d4caa40ef8e3566ac475968bce17b9b64b6939 (diff)
Initial OpenECOMP policy/engine commit
Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils')
-rw-r--r--ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/dummy.txt0
-rw-r--r--ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/page-resource.js95
-rw-r--r--ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html9
3 files changed, 104 insertions, 0 deletions
diff --git a/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/dummy.txt b/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/dummy.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/dummy.txt
diff --git a/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/page-resource.js b/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/page-resource.js
new file mode 100644
index 000000000..8449ecfce
--- /dev/null
+++ b/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/page-resource.js
@@ -0,0 +1,95 @@
+function loadjscssfile(filename, filetype){
+ if (filetype=="js"){ //if filename is a external JavaScript file
+ var done = false;
+ var script = document.createElement('script');
+ script.src = filename;
+ script.async = false;
+ document.head.appendChild(script);
+ }else if (filetype=="css"){ //if filename is an external CSS file
+ var fileref=document.createElement("link")
+ fileref.setAttribute("rel", "stylesheet")
+ fileref.setAttribute("type", "text/css")
+ fileref.setAttribute("async", false)
+ fileref.setAttribute("href", filename)
+ document.head.appendChild(fileref);
+ }
+}
+
+function loadResource(){
+ //css
+ loadjscssfile("app/fusion/external/ebz/fn-ebz.css", "css");
+ loadjscssfile("app/fusion/external/ebz/sandbox/styles/demo.css", "css");
+ loadjscssfile("app/fusion/external/ebz/sandbox/styles/base.css", "css");
+ loadjscssfile("app/fusion/external/ebz/sandbox/styles/btn.css", "css");
+ loadjscssfile("app/fusion/external/ebz/sandbox/styles/dtpk.css", "css");
+ loadjscssfile("app/fusion/external/ebz/sandbox/styles/frms.css", "css");
+ loadjscssfile("app/fusion/external/ebz/sandbox/styles/sldr.css", "css");
+ loadjscssfile("app/fusion/external/ebz/sandbox/styles/style.css", "css");
+ loadjscssfile("app/fusion/external/ebz/sandbox/styles/tbs.css", "css");
+ loadjscssfile("app/fusion/external/ebz/ebz_header/portal_ebz_header.css", "css");
+ loadjscssfile("static/fusion/css/jquery-ui.css", "css");
+
+
+ loadjscssfile("app/fusion/external/ebz/ebz_header/header.css", "css");
+ loadjscssfile("app/fusion/external/ebz/ebz_header/footer.css", "css");
+ // Basic AngularJS -->
+ loadjscssfile("app/fusion/external/ebz/angular_js/angular.js", "js");
+ loadjscssfile("app/fusion/external/ebz/angular_js/angular-sanitize.js", "js");
+ loadjscssfile("app/fusion/external/ebz/angular_js/angular-route.min.js", "js");
+ loadjscssfile("app/fusion/external/ebz/angular_js/angular-cookies.js", "js");
+ loadjscssfile("app/fusion/external/ebz/angular_js/gestures.js", "js");
+ loadjscssfile("app/fusion/external/ebz/angular_js/app.js", "js");
+
+ loadjscssfile("app/fusion/external/ebz/sandbox/att-abs-tpls.js", "js");
+
+ // jQuery -->
+ loadjscssfile("static/js/jquery-1.10.2.js", "js");
+ loadjscssfile("static/js/jquery.mask.min.js", "js");
+ loadjscssfile("static/js/jquery-ui.js", "js");
+
+ // AngularJS Gridster -->
+ loadjscssfile("static/fusion/js/att_angular_gridster/ui-gridster-tpls.js", "js");
+ loadjscssfile("static/fusion/js/att_angular_gridster/angular-gridster.js", "js");
+
+ // AngularJS Config -->
+ loadjscssfile("app/fusion/external/ebz/angular_js/checklist-model.js", "js");
+
+ // Utility -->
+ loadjscssfile("app/fusion/scripts/modalService.js", "js");
+ loadjscssfile("app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js", "js");
+
+ // Controller js -->
+ loadjscssfile("app/fusion/scripts/controllers/profile-search-controller.js", "js");
+ loadjscssfile("app/fusion/scripts/controllers/profile-controller.js", "js");
+ loadjscssfile("app/fusion/scripts/controllers/post-search-controller.js", "js");
+ loadjscssfile("app/fusion/scripts/controllers/self-profile-controller.js", "js");
+ loadjscssfile("app/fusion/scripts/controllers/rolefunctionpopupController.js", "js");
+ loadjscssfile("app/fusion/scripts/controllers/modelpopupController.js", "js");
+
+ // Header and Footer -->
+ loadjscssfile("app/fusion/scripts/directives/footer.js", "js");
+ loadjscssfile("app/fusion/external/ebz/js/footer.js", "js");
+ loadjscssfile("app/fusion/scripts/directives/header.js", "js");
+ loadjscssfile("app/fusion/scripts/directives/leftMenu.js", "js");
+
+ // Services -->
+ loadjscssfile("app/fusion/scripts/services/profileService.js", "js");
+ loadjscssfile("app/fusion/scripts/services/userInfoService.js", "js");
+ loadjscssfile("app/fusion/scripts/services/leftMenuService.js", "js");
+ loadjscssfile("app/fusion/scripts/controllers/profileController.js", "js");
+}
+
+window.onload = loadResource();
+window.onload = function(){
+ var appLoadingInterval = setInterval(function(){ loadApp() }, 500);
+ var count=0;
+ function loadApp(){
+ count++
+ if(typeof angular !== 'undefined') {
+ angular.bootstrap(document, ['abs']);
+ clearInterval(appLoadingInterval);
+ }else if(count>10){
+ clearInterval(appLoadingInterval);
+ }
+ }
+}
diff --git a/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html b/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html
new file mode 100644
index 000000000..d04eba9ce
--- /dev/null
+++ b/ecomp-sdk-app/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html
@@ -0,0 +1,9 @@
+
+ <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/demo.css" >
+ <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/base.css" >
+ <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/btn.css" >
+ <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/dtpk.css" >
+ <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/frms.css" >
+ <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/sldr.css" >
+ <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
+ <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/tbs.css" >