adjust style
This commit is contained in:
parent
741ffe245a
commit
739cd8fb02
|
@ -257,7 +257,6 @@
|
||||||
<script src="scripts/filters/filename.js"></script>
|
<script src="scripts/filters/filename.js"></script>
|
||||||
<script src="scripts/filters/fileOrderBy.js"></script>
|
<script src="scripts/filters/fileOrderBy.js"></script>
|
||||||
<script src="scripts/filters/percent.js"></script>
|
<script src="scripts/filters/percent.js"></script>
|
||||||
<script src="scripts/filters/substring.js"></script>
|
|
||||||
<script src="scripts/filters/taskOrderBy.js"></script>
|
<script src="scripts/filters/taskOrderBy.js"></script>
|
||||||
<script src="scripts/filters/taskStatus.js"></script>
|
<script src="scripts/filters/taskStatus.js"></script>
|
||||||
<script src="scripts/filters/volumn.js"></script>
|
<script src="scripts/filters/volumn.js"></script>
|
||||||
|
|
|
@ -6,22 +6,6 @@
|
||||||
var downloadTaskRefreshPromise = null;
|
var downloadTaskRefreshPromise = null;
|
||||||
var needRequestWholeInfo = true;
|
var needRequestWholeInfo = true;
|
||||||
|
|
||||||
var getTitleWidth = function () {
|
|
||||||
var titleColumn = angular.element('#task-table > .row > .col-md-8:first-child');
|
|
||||||
|
|
||||||
if (titleColumn.length > 0) {
|
|
||||||
return titleColumn.width();
|
|
||||||
} else {
|
|
||||||
var taskTable = angular.element('#task-table');
|
|
||||||
|
|
||||||
if ($window.innerWidth <= 767) {
|
|
||||||
return taskTable.width();
|
|
||||||
} else {
|
|
||||||
return taskTable.width() / 12 * 8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var refreshDownloadTask = function () {
|
var refreshDownloadTask = function () {
|
||||||
var invokeMethod = null;
|
var invokeMethod = null;
|
||||||
var params = [];
|
var params = [];
|
||||||
|
@ -79,12 +63,6 @@
|
||||||
|
|
||||||
$scope.loadPromise = refreshDownloadTask();
|
$scope.loadPromise = refreshDownloadTask();
|
||||||
|
|
||||||
angular.element($window).bind('resize', function () {
|
|
||||||
$scope.titleWidth = getTitleWidth();
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.titleWidth = getTitleWidth();
|
|
||||||
|
|
||||||
$scope.filterByTaskName = function (task) {
|
$scope.filterByTaskName = function (task) {
|
||||||
if (!task || !angular.isString(task.taskName)) {
|
if (!task || !angular.isString(task.taskName)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
angular.module("ariaNg").filter('substring', function () {
|
|
||||||
return function (value, count) {
|
|
||||||
if (!value) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
var actualCount = Math.round(count);
|
|
||||||
|
|
||||||
for (var i = 0; i < value.length; i++) {
|
|
||||||
var ch = value.charAt(i);
|
|
||||||
var code = value.charCodeAt(i);
|
|
||||||
|
|
||||||
if (code < 128) {
|
|
||||||
if (!('A' <= ch && ch <= 'Z')) {
|
|
||||||
actualCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
actualCount = Math.round(actualCount);
|
|
||||||
|
|
||||||
if (value.length > actualCount) {
|
|
||||||
value = value.substring(0, actualCount) + '...';
|
|
||||||
}
|
|
||||||
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
|
@ -346,6 +346,10 @@ td {
|
||||||
.task-table .task-name {
|
.task-table .task-name {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: block;
|
display: block;
|
||||||
|
word-break: keep-all;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-table .task-files, .task-table .task-size {
|
.task-table .task-files, .task-table .task-size {
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<div class="task-table-body">
|
<div class="task-table-body">
|
||||||
<div class="row" ng-repeat="task in downloadTasks | filter: filterByTaskName | taskOrderBy: getOrderType()" data-gid="{{task.gid}}">
|
<div class="row" ng-repeat="task in downloadTasks | filter: filterByTaskName | taskOrderBy: getOrderType()" data-gid="{{task.gid}}">
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<span class="task-name" ng-bind="task.taskName | substring: (titleWidth / 20)" title="{{task.taskName}}"></span>
|
<span class="task-name" ng-bind="task.taskName" title="{{task.taskName}}"></span>
|
||||||
<div class="task-files">
|
<div class="task-files">
|
||||||
<span ng-bind="task.totalLength | readableVolumn"></span>
|
<span ng-bind="task.totalLength | readableVolumn"></span>
|
||||||
<a ng-href="#/task/detail/{{task.gid}}">
|
<a ng-href="#/task/detail/{{task.gid}}">
|
||||||
|
|
Reference in a new issue