PHP8
[Pman.BAdmin] / Pman.Tab.bjs
index 13be286..9d97907 100644 (file)
@@ -6,14 +6,17 @@
  "permname" : "",
  "modOrder" : "001",
  "strings" : {
+  "7b7bc2512ee1fedcd76bdc68926d4f7b" : "Administrator",
   "0323de4f66a1700e2173e9bcdce02715" : "Logout",
   "8f1e77e0d2be21da93cd4d9a939148f7" : "Change Password",
-  "54d2e870aca5e99bf69f0ee1d494c3b3" : "Update profile",
   "617114bd6ef10884239510062dffa933" : "Your password has been changed",
   "24efa7ee4511563b16144f39706d594f" : "Notice"
  },
  "items" : [
   {
+   "listeners" : {
+    "render" : "function (_self)\n{\n\n}"
+   },
    "xtype" : "Border",
    "$ el" : "document.body",
    "$ xns" : "Roo.bootstrap.layout",
@@ -22,6 +25,7 @@
     {
      "String tabPosition" : "top",
      "xtype" : "Region",
+     "string cls" : "pman-admin-center",
      "$ xns" : "Roo.bootstrap.layout",
      "Boolean alwaysShowTabs" : true,
      "* prop" : "center"
@@ -31,7 +35,8 @@
      "Boolean hideTabs" : true,
      "Number height" : 50,
      "$ xns" : "Roo.bootstrap.layout",
-     "* prop" : "north"
+     "* prop" : "north",
+     "String overflow" : "visible"
     },
     {
      "Boolean fitContainer" : true,
      "String region" : "north",
      "items" : [
       {
-       "$ String brand_href" : "baseURL",
-       "String position" : "static-top",
-       "String cls" : "headroom animated slideDown container no-srButton",
+       "String position" : "fixed-top",
+       "String cls" : "headroom animated slideDown  no-srButton pman-admin-header",
        "Boolean srButton" : true,
        "bool autohide" : true,
        "xtype" : "NavHeaderbar",
        "Boolean inverse" : false,
-       "Boolean desktopCenter" : true,
-       "$ String brand" : "'<img src=\"' + appLogo ?  appLogo : Roo.BLANK_IMAGE_URL + '\">'",
+       "Boolean desktopCenter" : false,
+       "$ String brand" : "'<img   cls=\"header-logo\" src=\"' +    Roo.BLANK_IMAGE_URL + '\">'",
        "$ xns" : "Roo.bootstrap",
-       "String style" : "padding-bottom:0px;",
        "items" : [
         {
          "String type" : "nav",
          "xtype" : "NavGroup",
          "String align" : "right",
          "$ xns" : "Roo.bootstrap",
-         "String style" : "margin-top:0px;margin-bottom:0px;",
          "items" : [
           {
            "listeners" : {
-            "render" : "function (_self)\n{\n    this.el.setVisibilityMode(Roo.Element.DISPLAY);\n    \n    \n    \n    this.el.show();\n}"
+            "render" : "function (_self)\n{\n    _this.user_box = this;\n    \n    this.el.setVisibilityMode(Roo.Element.DISPLAY);\n    \n    this.el.show();\n}"
            },
            "Boolean preventDefault" : true,
+           "| function updateBadge" : "function() { }",
            "xtype" : "NavItem",
-           "$ html" : "Pman.Login.authUser.name",
+           "$ html" : "Pman.Login.authUser.name + '<span style=\"margin-left: 5px;\" class=\"badge badge-primary\"></span>'",
            "$ xns" : "Roo.bootstrap",
            "String icon" : "fa fa-user",
            "items" : [
             {
              "listeners" : {
-              "show" : "function (_self)\n{\n    var width = Roo.lib.Dom.getViewWidth();\n    \n    var xy = this.el.getXY();\n    \n    if(width < 480){\n        xy[0] = 0;\n        this.el.setXY(xy);\n        this.el.setStyle('width', width + 'px');\n    }\n}"
+              "show" : "function (_self)\n{\n    var width = Roo.lib.Dom.getViewWidth();\n    \n    var xy = this.el.getXY();\n    this.el.setStyle('position', 'absolute');\n    \n    if(width < 480){\n        xy[0] = 0;\n        this.el.setXY(xy);\n        this.el.setStyle('width', width + 'px');\n    }\n}"
              },
+             "Boolean allowDomMove" : false,
              "String cls" : "user-menu",
              "xtype" : "Menu",
              "$ xns" : "Roo.bootstrap",
+             "bool hideTrigger" : true,
              "* prop" : "menu",
              "items" : [
               {
@@ -90,7 +95,7 @@
                  "$ xns" : "Roo.bootstrap",
                  "items" : [
                   {
-                   "Number md" : 9,
+                   "Number md" : 12,
                    "xtype" : "Column",
                    "$ xns" : "Roo.bootstrap",
                    "items" : [
                      "items" : [
                       {
                        "listeners" : {
-                        "render" : "function (_self)\n{\n    if(typeof(Hydra.authUser) == 'undefined' || !Hydra.authUser || Hydra.authUser.id * 1 < 1){\n        return;\n    }\n    \n    this.el.dom.innerHTML = '<b>' + Hydra.authUser.firstname + ' ' + Hydra.authUser.lastname + '</b>';\n    \n}"
+                        "render" : "function (_self)\n{\n    this.el.dom.innerHTML = '<b>' + Pman.Login.authUser.name + '</b>';\n    \n}"
                        },
                        "Number md" : 12,
+                       "String cls" : "text-primary",
                        "xtype" : "Column",
-                       "$ xns" : "Roo.bootstrap",
-                       "String style" : "color:#333;"
+                       "$ xns" : "Roo.bootstrap"
                       },
                       {
                        "listeners" : {
-                        "render" : "function (_self)\n{\n    if(typeof(Hydra.authUser) == 'undefined' || !Hydra.authUser || Hydra.authUser.id * 1 < 1){\n        return;\n    }\n    \n    this.el.dom.innerHTML = Hydra.authUser.email;\n    \n}"
+                        "render" : "function (_self)\n{\n   \n    this.el.dom.innerHTML = Pman.Login.authUser.email;\n    \n}"
                        },
                        "Number md" : 12,
                        "xtype" : "Column",
                        "$ xns" : "Roo.bootstrap",
-                       "String style" : "color:#333;"
+                       "String style" : "color:#777;"
                       },
                       {
                        "Number md" : 12,
                        "xtype" : "Column",
                        "$ xns" : "Roo.bootstrap",
-                       "String style" : "color:#333;",
                        "items" : [
                         {
                          "listeners" : {
-                          "render" : "function (_self)\n{\n     this.el.setVisibilityMode(Roo.Element.DISPLAY);\n   \n    this.el.show();\n    \n    if(\n        typeof(Hydra.authUser) == 'undefined' ||\n        typeof(Hydra.authUser.person_type) == 'undefined' ||\n        Hydra.authUser.person_type != 'TALENT'\n    ){\n        this.el.hide();\n        return;\n    }\n    \n}",
-                          "click" : "function (e)\n{\n    \n    \n    if(typeof(Hydra.authUser) == 'undefined' || !Hydra.authUser || Hydra.authUser.id * 1 < 1){\n        return;\n    }\n    \n   \n    window.location = baseURL + '/Talent';\n}"
+                          "render" : "function (_self)\n{\n    _this.super_admin_btn = this;\n    \n}",
+                          "click" : "function (_self, e)\n{\n    if(window.location.href.indexOf('_super_admin=1') * 1 != -1) {\n        window.open(baseURL,'_self');\n        return;\n    }\n    \n    window.open(baseURL + '?_super_admin=1','_self');\n}"
                          },
-                         "String href" : "#",
-                         "Boolean preventDefault" : true,
-                         "xtype" : "Link",
+                         "String weight" : "link",
+                         "xtype" : "Button",
                          "$ xns" : "Roo.bootstrap",
-                         "String html" : "Update profile"
+                         "String html" : "Administrator",
+                         "String style" : "padding: 0px;text-decoration: none; color:#777;"
                         }
                        ]
                       }
                ]
               },
               {
+               "listeners" : {
+                "childrenrendered" : "function (_self)\n{\n    _this.super_admin_btn.hide();\n\n    if(Pman.Login.authUser.groups.indexOf('Administrators') * 1 != -1) {\n        _this.super_admin_btn.show();\n    }\n}"
+               },
                "String cls" : "user-footer",
                "Boolean preventDefault" : true,
                "xtype" : "MenuItem",
                    "items" : [
                     {
                      "listeners" : {
-                      "click" : "function (e)\n{\n    if(typeof(Hydra.authUser) == 'undefined' || !Hydra.authUser || Hydra.authUser.id * 1 < 1){\n        return;\n    }\n    \n    var _self = this;\n    \n    Hydra.Dialog.ChangePassword.show({}, function(res) {\n        Roo.bootstrap.MessageBox.alert(_self._change_passwd_success_title, _self._change_passwd_success_body);\n    });\n}"
+                      "click" : "function (e)\n{\n    var _self = this;\n    \n    Pman.Dialog.BAdminPassword.show(\n        {},\n        function(res) {\n            Roo.bootstrap.MessageBox.alert(_self._change_passwd_success_title, _self._change_passwd_success_body);\n        }\n    );\n    \n}"
                      },
                      "xtype" : "Button",
                      "string _change_passwd_success_body" : "Your password has been changed",
                    "items" : [
                     {
                      "listeners" : {
-                      "click" : "function (e)\n{\n    window.onbeforeunload = false;\n    \n    if(typeof(Hydra.authUser) == 'undefined' || !Hydra.authUser || Hydra.authUser.id * 1 < 1){\n        return;\n    }\n    \n    Roo.Ajax.request({\n            url : baseURL + '/Login',\n            method: 'POST',\n            params : { \n                logout : 1\n            },\n            success : function()\n            {\n                location.href = baseURL;\n            }\n        });\n\n}"
+                      "click" : "function (e)\n{\n    window.onbeforeunload = false;\n    \n    \n    Roo.Ajax.request({\n            url : baseURL + '/Login',\n            method: 'POST',\n            params : { \n                logout : 1\n            },\n            success : function()\n            {\n                location.href = baseURL;\n            }\n        });\n\n}"
                      },
                      "xtype" : "Button",
                      "$ xns" : "Roo.bootstrap",
          ]
         }
        ]
-      },
-      {
-       "xtype" : "Form",
-       "$ xns" : "Roo.bootstrap",
-       "items" : [
-        {
-         "listeners" : {
-          "render" : "function (_self)\n{\n    if(appLogo) {\n        _self.el.dom.src = appLogo;\n    }\n}"
-         },
-         "Boolean imgResponsive" : true,
-         "String cls" : "header-logo",
-         "$ src" : "",
-         "xtype" : "Img",
-         "$ xns" : "Roo.bootstrap",
-         "String style" : "height: 50px;"
-        }
-       ]
       }
      ]
     }