]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - js/systemConfig.js
more configuration panels...
[Rakka.git] / js / systemConfig.js
index 16002bb7e78947d5a9ebaa5d0b7ce9357210cb96..64f6a39e4d6522fb6121fbc7028a05f089db4c66 100644 (file)
 
             $(tbody).empty();
 
-            $.each(users, function () {
-                       var id = this;
-                       var tr = $.TR({},
-                                     $.TD({}, id),
-                                     $.TD({}, ""),
-                                     $.TD({}, "")
-                                    );
-                       tbody.appendChild(tr);
-                   });
+            for (var i = 0; i < users.length; i++) {
+                var pass1  = $.INPUT({type: "password"});
+                var pass2  = $.INPUT({type: "password"});
+                var change = $.INPUT({type: "button", value: "Change"});
+
+                var chpass = $.TABLE({className: "pageEditor"},
+                                     $.TR({},
+                                          $.TD({}, pass1),
+                                          $.TD({rowSpan: 2}, change)),
+                                     $.TR({},
+                                          $.TD({}, pass2)));
+
+                var delUser = $.INPUT({type: "button", value: "Delete"});
+
+                $.each(users, function () {
+                           var id = users[i];
+                           var tr = $.TR({},
+                                        $.TD({}, id),
+                                        $.TD({}, chpass),
+                                        $.TD({}, delUser)
+                                        );
+                           tbody.appendChild(tr);
+                       });
+            }
         };
         updateUserList();
 
         $area.append(usersPanel);
+
+        $area.append($.H3({}, "Add new user"));
+
+        var userID  = $.INPUT({type: "text"});
+        var pass1   = $.INPUT({type: "password"});
+        var pass2   = $.INPUT({type: "password"});
+        var addUser = $.INPUT({type: "button", value: "Add"});
+        var addUserPanel = $.TABLE({className: "pageEditor"},
+                                   $.TR({},
+                                        $.TH({}, "User ID"),
+                                        $.TD({}, userID)),
+                                   $.TR({},
+                                        $.TH({}, "Password"),
+                                        $.TD({}, pass1)),
+                                   $.TR({},
+                                        $.TH({}, "Password (retype)"),
+                                        $.TD({}, pass2)),
+                                   $.TR({},
+                                        $.TH({}),
+                                        $.TD({}, addUser)));
+
+        $area.append(addUserPanel);
      };
 
      Rakka.showConfigPanel = function () {