Ernesto Menéndez avatar Ernesto Menéndez committed 7e83ab3

mostrar formulario de creacion de usuario como ventana

Comments (0)

Files changed (4)

nxweb/apps/admin/html/js/user-controller.js

     $scope.delete = function(uid_a) {
         User.delete({uid:uid_a}, refresh_users(), refresh_users());
     }
+
+    $scope.showCreateUserWindow = function() {
+        $("#window").data("kendoWindow").center().open().unbind('close').bind('close', refresh_users);
+    }
+
     refresh_users();
 }

nxweb/apps/admin/html/partials/user-list.html

 <div class="k-content">
     <div class="k-grid k-widget" tabindex="0" style="height: 540px;">
         <div class="k-toolbar k-grid-toolbar">
-            <a href="/#/user" class="k-button k-button-icontext k-grid-add">
+            <!-- <a href="/#/user" class="k-button k-button-icontext k-grid-add"> -->
+            <a ng-click="showCreateUserWindow()" class="k-button k-button-icontext k-grid-add">
                 <span class="k-icon k-add"></span>
                 Create new user
             </a>
         </div>
     </div>
 </div>
+
+<div id="window">
+</div>
+
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#window").kendoWindow({
+            content: "/window.html#/user",
+            iframe: true,
+            modal: true,
+            height: "450px",
+            width: "650px",
+            visible: false
+        });
+    });
+</script>

nxweb/apps/admin/html/partials/user.html

-
-<form name="form" class="css-form" novalidate>
+<form name="form" novalidate>
 
 <table>
 
 
 </form>
 <a href="#/users">Back</a>
-<p ng-show=message> {{message}} </p>
+<p ng-show=message> {{message}} </p>

nxweb/apps/admin/html/window.html

+<!doctype html>
+<html ng-app="admin">
+<head>
+    <link rel="stylesheet" type="text/css" href="content/css/main.css">
+
+    <link href="content/css/kendoui/kendo.common.min.css" rel="stylesheet" type="text/css" />
+    <link href="content/css/kendoui/kendo.black.min.css" rel="stylesheet" type="text/css" />
+
+    <script src="lib/kendoui/jquery.min.js"></script>
+    <script src="lib/kendoui/kendo.web.min.js"></script>
+
+    <script src="lib/angular/angular.js"></script>
+    <script src="lib/angular/angular-cookies.js"></script>
+    <script src="lib/angular/angular-resource.js"></script>
+
+    <script src="lib/fileuploader/ajaxfileupload.js"></script>
+    <script src="lib/file_upload_mod.js"></script>
+
+    <script src="js/services.js"></script>
+    <script src="js/app.js"></script>
+    <script src="js/attribute-controller.js"></script>
+    <script src="js/user-controller.js"></script>
+    <script src="js/session-controller.js"></script>
+    <script src="js/program-controller.js"></script>
+    <script src="js/pkey-controller.js"></script>
+    <script src="js/project-controller.js"></script>
+</head>
+<body>
+
+<div ng-controller="MainCtrl">
+    <div id="content">
+        <div ng-view></div>
+    </div>
+
+{{message}}
+</div>
+
+</body>
+</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.