From 739cd8fb02cff09466e51372aa527cbff022589f Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sat, 28 May 2016 22:36:33 +0800 Subject: [PATCH] adjust style --- app/index.html | 1 - app/scripts/controllers/list.js | 22 ---------------------- app/scripts/filters/substring.js | 32 -------------------------------- app/styles/aria-ng.css | 4 ++++ app/views/list.html | 2 +- 5 files changed, 5 insertions(+), 56 deletions(-) delete mode 100644 app/scripts/filters/substring.js diff --git a/app/index.html b/app/index.html index bf8ffed..6502b30 100644 --- a/app/index.html +++ b/app/index.html @@ -257,7 +257,6 @@ - diff --git a/app/scripts/controllers/list.js b/app/scripts/controllers/list.js index a22c22a..87bef05 100644 --- a/app/scripts/controllers/list.js +++ b/app/scripts/controllers/list.js @@ -6,22 +6,6 @@ var downloadTaskRefreshPromise = null; 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 invokeMethod = null; var params = []; @@ -79,12 +63,6 @@ $scope.loadPromise = refreshDownloadTask(); - angular.element($window).bind('resize', function () { - $scope.titleWidth = getTitleWidth(); - }); - - $scope.titleWidth = getTitleWidth(); - $scope.filterByTaskName = function (task) { if (!task || !angular.isString(task.taskName)) { return false; diff --git a/app/scripts/filters/substring.js b/app/scripts/filters/substring.js deleted file mode 100644 index 5fce478..0000000 --- a/app/scripts/filters/substring.js +++ /dev/null @@ -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; - } - }); -})(); diff --git a/app/styles/aria-ng.css b/app/styles/aria-ng.css index bccd11d..08ea432 100644 --- a/app/styles/aria-ng.css +++ b/app/styles/aria-ng.css @@ -346,6 +346,10 @@ td { .task-table .task-name { font-size: 14px; display: block; + word-break: keep-all; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .task-table .task-files, .task-table .task-size { diff --git a/app/views/list.html b/app/views/list.html index 1b4e840..fa4debb 100644 --- a/app/views/list.html +++ b/app/views/list.html @@ -37,7 +37,7 @@
- +