display: inline-block;
width: 100%;
text-align: center;
- overflow: auto;
}
#tic-job-section .panel-heading .pull-right {
margin-top: -20px;
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;
<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>
// config
var AppConfig;
+ // User
+ var UserInfo;
+
// the list for the image
var ModelImageList = [];
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
}
});
}
/**
- * @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',
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
doCreateAnImage: doCreateAnImage,
/**
- * Set the user info.
+ * Update
*/
- updateUserInfo: updateUserInfo
+ updateJobInfo: updateJobInfo
}
});
\ No newline at end of file
'jquery',
'bootstrap-validator',
'js/util',
- 'js/logger'
+ 'js/logger',
+ './job',
+ './image'
], function (
$,
BootstrapValidator,
Util,
- Logger
+ Logger,
+ Job,
+ Image
) {
'use strict';
}
/**
+ * 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() {
.then(function (user) {
_updateLogin(user);
_updatePackagePage(user.group);
+ _updateJobPage(user);
+ _updateImagePage(user);
});
}