From 9859769196a2158cba350cb6cc474ae4b1c3dab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=BC=A0=E4=BD=B3?= Date: Thu, 6 Aug 2015 12:09:45 +0800 Subject: [PATCH 1/7] Update select.js 1030: var _scrollTop = $document[0].documentElement.scrollTop; if(_scrollTop === 0){ _scrollTop = angular.element("body")[0].scrollTop; } --- dist/select.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/select.js b/dist/select.js index 8ba040885..48a0de046 100644 --- a/dist/select.js +++ b/dist/select.js @@ -1029,7 +1029,11 @@ uis.directive('uiSelect', var offsetDropdown = uisOffset(dropdown); // Determine if the direction of the dropdown needs to be changed. - if (offset.top + offset.height + offsetDropdown.height > $document[0].documentElement.scrollTop + $document[0].documentElement.clientHeight) { + var _scrollTop = $document[0].documentElement.scrollTop; + if(_scrollTop === 0){ + _scrollTop = angular.element("body")[0].scrollTop; + } + if (offset.top + offset.height + offsetDropdown.height > _scrollTop + $document[0].documentElement.clientHeight) { dropdown[0].style.position = 'absolute'; dropdown[0].style.top = (offsetDropdown.height * -1) + 'px'; element.addClass(directionUpClassName); @@ -1813,4 +1817,4 @@ $templateCache.put("select2/select-multiple.tpl.html","
"); $templateCache.put("selectize/choices.tpl.html","
"); $templateCache.put("selectize/match.tpl.html","
"); -$templateCache.put("selectize/select.tpl.html","
");}]); \ No newline at end of file +$templateCache.put("selectize/select.tpl.html","
");}]); From 433a2060e5b092ff090c073aa3cf7d8ad5661b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=BC=A0=E4=BD=B3?= Date: Thu, 6 Aug 2015 12:14:39 +0800 Subject: [PATCH 2/7] Update uiSelectDirective.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 滚动天scrolltop计算修改 --- src/uiSelectDirective.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uiSelectDirective.js b/src/uiSelectDirective.js index 3d391825c..1c38bcc6c 100644 --- a/src/uiSelectDirective.js +++ b/src/uiSelectDirective.js @@ -273,7 +273,11 @@ uis.directive('uiSelect', var offsetDropdown = uisOffset(dropdown); // Determine if the direction of the dropdown needs to be changed. - if (offset.top + offset.height + offsetDropdown.height > $document[0].documentElement.scrollTop + $document[0].documentElement.clientHeight) { + var _scrollTop = $document[0].documentElement.scrollTop; + if(_scrollTop === 0){ + _scrollTop = angular.element("body")[0].scrollTop; + } + if (offset.top + offset.height + offsetDropdown.height > _scrollTop + $document[0].documentElement.clientHeight) { dropdown[0].style.position = 'absolute'; dropdown[0].style.top = (offsetDropdown.height * -1) + 'px'; element.addClass(directionUpClassName); From 84cc2132a769deaf1ea4627b755696a3779e38ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=BC=A0=E4=BD=B3?= Date: Mon, 10 Aug 2015 11:33:10 +0800 Subject: [PATCH 3/7] no result item no result item --- src/select2/choices.tpl.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/select2/choices.tpl.html b/src/select2/choices.tpl.html index f462dab92..a68c48d11 100644 --- a/src/select2/choices.tpl.html +++ b/src/select2/choices.tpl.html @@ -8,4 +8,5 @@ - \ No newline at end of file +
  • 没有搜索结果.
  • + From a230581bc6f5845e999d9771d21d6f12c685cb69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=BC=A0=E4=BD=B3?= Date: Mon, 10 Aug 2015 11:34:19 +0800 Subject: [PATCH 4/7] no result item no resulte item --- dist/select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/select.js b/dist/select.js index 48a0de046..52642b3f5 100644 --- a/dist/select.js +++ b/dist/select.js @@ -1810,7 +1810,7 @@ $templateCache.put("bootstrap/match-multiple.tpl.html","{{$select.placeholder}} "); $templateCache.put("bootstrap/select-multiple.tpl.html","
    "); $templateCache.put("bootstrap/select.tpl.html","
    "); -$templateCache.put("select2/choices.tpl.html","
    "); +$templateCache.put("select2/choices.tpl.html","
    • 没有搜索结果.
    "); $templateCache.put("select2/match-multiple.tpl.html","
  • "); $templateCache.put("select2/match.tpl.html","{{$select.placeholder}} "); $templateCache.put("select2/select-multiple.tpl.html","
    "); From 518ea36ff68930b995634c345b2e25ce14bc9392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=BC=A0=E4=BD=B3?= Date: Mon, 10 Aug 2015 11:36:24 +0800 Subject: [PATCH 5/7] no result item no result item --- dist/select.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/select.css b/dist/select.css index fe2b1da3b..21d789ca0 100644 --- a/dist/select.css +++ b/dist/select.css @@ -260,3 +260,7 @@ body > .ui-select-bootstrap.open { .ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown { box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); } +.ui-select-choices .no-result{ + color: #aaa; +} + From a7a34b67baf36b3a0adb835437e142cdd2b86a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=BC=A0=E4=BD=B3?= Date: Mon, 10 Aug 2015 11:37:54 +0800 Subject: [PATCH 6/7] no result item no result item --- src/common.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common.css b/src/common.css index e1026d4a1..7942996ea 100644 --- a/src/common.css +++ b/src/common.css @@ -252,3 +252,6 @@ body > .ui-select-bootstrap.open { .ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown { box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); } +.ui-select-choices .no-result{ + color: #aaa; +} From ea5f339a118ab7493e330a7df193ce801acbec86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=BC=A0=E4=BD=B3?= Date: Mon, 10 Aug 2015 14:25:42 +0800 Subject: [PATCH 7/7] no result item 0.12.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 41e7ee781..8ffd92e14 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "repository": { "url": "git://github.com/angular-ui/ui-select.git" }, - "version": "0.12.1", + "version": "0.12.3", "devDependencies": { "bower": "~1.3", "del": "~0.1.1",