[TIC-Web] Update The Login Module 24/121624/2
authorHeekyoung, Oh <heekyoung.oh@samsung.com>
Tue, 28 Mar 2017 10:22:22 +0000 (19:22 +0900)
committerHeekyoung, Oh <heekyoung.oh@samsung.com>
Tue, 28 Mar 2017 11:06:52 +0000 (20:06 +0900)
- Add the function for the job page
- Add the function for the image page
- And, Fixed header of table on the job page

Change-Id: I00f6c277bc722b4d2cecd4b656e8e1ef3efc08d1
Signed-off-by: Heekyoung, Oh <heekyoung.oh@samsung.com>
public/src/css/style.css
public/src/index.html
public/src/js/page/image.js
public/src/js/page/job.js
public/src/js/page/login.js

index 09189af..348c77a 100644 (file)
@@ -173,7 +173,6 @@ body {
     display: inline-block;
     width: 100%;
     text-align: center;
-    overflow: auto;
 }
 #tic-job-section .panel-heading .pull-right {
     margin-top: -20px;
@@ -237,13 +236,73 @@ tr.extended_job_table_row:hover {
 tr.extended_job_table_row:hover td {
     background-color: transparent;
 }
-#tic-job-table th {
+
+.tic-job-table {
+    height: calc(100vh - 285px);
+    width: 100%;
     text-align: center;
+    table-layout: fixed;
+    border-collpase: collapse;
+}
+.tic-job-table thead {
+    width: 100%;
+    min-width: 480px;
+    display: block;
+}
+.tic-job-table tbody {
+    min-width: 480px;
+    display: block;
+    overflow-y: auto;
+    overflow-x: hidden;
+    height: calc(100vh - 323px);
+}
+.tic-job-table th {
     height: 38px;
+    white-space: nowrap;
     vertical-align: middle;
     background-color: rgba(51, 122, 183, 0.12);
     color: steelblue;
 }
+.tic-job-table th, .tic-job-table td {
+    width: 100%;
+    text-overflow: ellipsis;
+}
+.tic-job-table th:nth-child(1),
+.tic-job-table td:nth-child(1) {
+    width: 41px;
+    min-width: 41px;
+    display:table-cell;
+}
+.tic-job-table th:nth-child(2),
+.tic-job-table td:nth-child(2) {
+    width: 60px;
+    min-width: 60px;
+}
+.tic-job-table th:nth-child(3),
+.tic-job-table td:nth-child(3) {
+    width: 90px;
+    min-width: 90px;
+}
+.tic-job-table th:nth-child(4),
+.tic-job-table td:nth-child(4) {
+    width: 90px;
+    min-width: 90px;
+}
+.tic-job-table th:nth-child(5),
+.tic-job-table td:nth-child(5) {
+    width: 160px;
+    min-width: 160px;
+}
+.tic-job-table th:nth-child(6),
+.tic-job-table td:nth-child(6) {
+    width: 90px;
+    min-width: 90px;
+}
+.tic-job-table th:nth-child(7),
+.tic-job-table td:nth-child(7) {
+    width: 90px;
+    min-width: 90px;
+}
 
 #tic-job-list-pagination {
     float: right;
index c41a300..3f0a32e 100644 (file)
                                 <div id="tic-job-list">
                                     <div id="tic-job-list-content">
                                         <div>
-                                            <table class="table table-hover table-bordered ui-responsive" id="tic-job-table">
+                                            <table class="table table-hover table-bordered ui-responsive tic-job-table" id="tic-job-table">
                                                 <thead>
                                                     <tr class="filters text-center">
                                                         <th>#</th>
index 4ff916f..1b5bf38 100644 (file)
@@ -26,6 +26,9 @@ define([
     // config
     var AppConfig;
 
+    // User
+    var UserInfo;
+
     // the list for the image
     var ModelImageList = [];
 
@@ -157,23 +160,24 @@ define([
         gotoPageNum(pageNum);
     }
 
-    function init() {
-        logger.info('init');
+    function updateImageInfo (user) {
+        logger.info('updateImageInfo');
 
         Util.getAppConfig().then(function (data) {
             AppConfig = data;
+            UserInfo = user;
             updateList();
         });
     }
 
-    init();
-
     return {
         /**
          * Update list in image page
          * @method updateList
          */
-        updateList: updateList
+        updateList: updateList,
+
+        updateImageInfo: updateImageInfo
     }
 
 });
index 918981f..cfd31a0 100644 (file)
@@ -357,22 +357,6 @@ define([
     }
 
     /**
-     * @name updateUserInfo
-     * @desc Set the user info.
-     */
-    function updateUserInfo () {
-        /**
-         * TODO
-         *
-         * To be improved.
-         */
-        Util.GET('api/session')
-        .then(function (user) {
-            UserInfo = user;
-        });
-    }
-
-    /**
      * @name doCreateAnImage
      * @param paramObj {
      *      jobId: '1',
@@ -411,20 +395,17 @@ define([
         gotoPageNum(pageNum);
     }
 
-    function init() {
-        logger.info('init');
+    function updateJobInfo (user) {
+        logger.info('updateJobInfo');
 
-        // set the config information for the app
         Util.getAppConfig().then(function (data) {
             AppConfig = data;
             _initSocket(Util.getWebSocket());
+            UserInfo = user;
             updateList();
-            updateUserInfo();
         });
     }
 
-    init();
-
     return {
         /**
          * Update list in job page
@@ -439,9 +420,9 @@ define([
         doCreateAnImage: doCreateAnImage,
 
         /**
-         * Set the user info.
+         * Update
          */
-        updateUserInfo: updateUserInfo
+        updateJobInfo: updateJobInfo
     }
 
 });
\ No newline at end of file
index d174ee2..f85709c 100644 (file)
@@ -2,12 +2,16 @@ define([
     'jquery',
     'bootstrap-validator',
     'js/util',
-    'js/logger'
+    'js/logger',
+    './job',
+    './image'
 ], function (
     $,
     BootstrapValidator,
     Util,
-    Logger
+    Logger,
+    Job,
+    Image
 ) {
     'use strict';
 
@@ -113,6 +117,20 @@ define([
     }
 
     /**
+     * Permission control in job page
+     */
+    function _updateJobPage (user) {
+        Job.updateJobInfo(user);
+    }
+
+    /**
+     * Permission control in image page
+     */
+    function _updateImagePage (user) {
+        Image.updateImageInfo(user);
+    }
+
+    /**
      * Permission control of group
      */
     function updatePermission() {
@@ -120,6 +138,8 @@ define([
         .then(function (user) {
             _updateLogin(user);
             _updatePackagePage(user.group);
+            _updateJobPage(user);
+            _updateImagePage(user);
         });
     }