PHP8
[Pman.BAdmin] / Pman.Tab.bjs
index afa8d3f..9d97907 100644 (file)
@@ -2,7 +2,7 @@
  "name" : "Pman.Tab",
  "parent" : "",
  "title" : "",
- "path" : "/home/edward/gitlive/Pman.BAdmin/Pman.Tab.bjs",
+ "path" : "/home/alan/gitlive/Pman.BAdmin/Pman.Tab.bjs",
  "permname" : "",
  "modOrder" : "001",
  "strings" : {
@@ -25,6 +25,7 @@
     {
      "String tabPosition" : "top",
      "xtype" : "Region",
+     "string cls" : "pman-admin-center",
      "$ xns" : "Roo.bootstrap.layout",
      "Boolean alwaysShowTabs" : true,
      "* prop" : "center"
@@ -45,7 +46,7 @@
      "items" : [
       {
        "String position" : "fixed-top",
-       "String cls" : "headroom animated slideDown  no-srButton",
+       "String cls" : "headroom animated slideDown  no-srButton pman-admin-header",
        "Boolean srButton" : true,
        "bool autohide" : true,
        "xtype" : "NavHeaderbar",
        "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;margin-right:12px;",
          "items" : [
           {
            "listeners" : {
@@ -81,6 +80,7 @@
              "String cls" : "user-menu",
              "xtype" : "Menu",
              "$ xns" : "Roo.bootstrap",
+             "bool hideTrigger" : true,
              "* prop" : "menu",
              "items" : [
               {
                        "Number md" : 12,
                        "xtype" : "Column",
                        "$ xns" : "Roo.bootstrap",
-                       "String style" : "color:#333;"
+                       "String style" : "color:#777;"
+                      },
+                      {
+                       "Number md" : 12,
+                       "xtype" : "Column",
+                       "$ xns" : "Roo.bootstrap",
+                       "items" : [
+                        {
+                         "listeners" : {
+                          "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 weight" : "link",
+                         "xtype" : "Button",
+                         "$ xns" : "Roo.bootstrap",
+                         "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.role.length && Pman.Login.authUser.groups.indexOf('Administrators') * 1 != -1) {\n        _this.super_admin_btn.show();\n    }\n}"
+                "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,
                "$ xns" : "Roo.bootstrap",
                "Boolean isContainer" : true,
                "items" : [
-                {
-                 "xtype" : "Row",
-                 "$ xns" : "Roo.bootstrap",
-                 "items" : [
-                  {
-                   "Number md" : 12,
-                   "xtype" : "Column",
-                   "$ xns" : "Roo.bootstrap",
-                   "items" : [
-                    {
-                     "listeners" : {
-                      "render" : "function (_self)\n{\n    _this.super_admin_btn = this;\n    \n}",
-                      "click" : "function (_self, e)\n{\n    window.open(baseURL + '?_super_admin=1','_self');\n}"
-                     },
-                     "String weight" : "link",
-                     "xtype" : "Button",
-                     "$ xns" : "Roo.bootstrap",
-                     "String html" : "Administrator",
-                     "String style" : "padding: 0px; margin-bottom: 10px; text-decoration: none; color:#777;"
-                    }
-                   ]
-                  }
-                 ]
-                },
                 {
                  "xtype" : "Row",
                  "$ xns" : "Roo.bootstrap",
                    "items" : [
                     {
                      "listeners" : {
-                      "click" : "function (e)\n{\n\n    var _self = this;\n    \n    Pman.Dialog.BAdminPassword.show({ id : Pman.Login.authUser.id }, function(res) {\n        Roo.bootstrap.MessageBox.alert(_self._change_passwd_success_title, _self._change_passwd_success_body);\n    });\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",