ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: # IGNITE-843 Fixed dropdown overflow.
Date Tue, 22 Sep 2015 04:33:40 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 c7b26ad96 -> 25bc1d488


# IGNITE-843 Fixed dropdown overflow.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/25bc1d48
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/25bc1d48
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/25bc1d48

Branch: refs/heads/ignite-843
Commit: 25bc1d488d3d8c6519bc414c709b916c7486d119
Parents: c7b26ad
Author: Andrey <anovikov@gridgain.com>
Authored: Tue Sep 22 11:33:44 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Tue Sep 22 11:33:44 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/common-module.js    |  4 +-
 .../src/main/js/public/stylesheets/style.scss   | 47 +++++++++++++++++++-
 .../src/main/js/views/includes/controls.jade    | 10 ++---
 .../src/main/js/views/sql/sql.jade              |  2 +-
 .../src/main/js/views/templates/select.jade     |  4 +-
 5 files changed, 56 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/25bc1d48/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index 7d66b56..eaf4c63 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -49,12 +49,12 @@ controlCenterModule.config(function ($tooltipProvider) {
 controlCenterModule.config(function ($selectProvider) {
     angular.extend($selectProvider.defaults, {
         container: 'body',
-        maxLength: '1',
+        maxLength: '5',
         allText: 'Select All',
         noneText: 'Clear All',
         templateUrl: '/select',
         iconCheckmark: 'fa fa-check',
-        caretHtml: '<span class="caret" style="float: right; margin-left: 5px; margin-top:
7px;"></span>'
+        caretHtml: ''
     });
 });
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/25bc1d48/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 59e91f6..62a1985 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -145,11 +145,31 @@ ul.navbar-nav, .sidebar-nav {
     color: $input-color-placeholder;
 }
 
-.theme-line .dropdown-menu {
+.theme-line ul.dropdown-menu {
     min-width: 75px;
+    max-width: 500px;
     max-height: 20em;
     overflow: auto;
     overflow-x: hidden;
+
+     li > a {
+         display: block;
+
+         cursor: default;
+         padding: 3px 0 3px 5px;
+
+         overflow: hidden;
+         white-space: nowrap;
+         text-overflow: ellipsis;
+
+         i {
+             float: right;
+             color: $brand-primary;
+             background-color: transparent;
+             line-height: $line-height-base;
+             margin-right: 5px;
+         }
+     }
 }
 
 .theme-line .border-left .sidebar-nav {
@@ -415,6 +435,7 @@ h3 {
 button.form-control {
     display: block;
     overflow: hidden;
+    white-space: nowrap;
     text-overflow: ellipsis;
 }
 
@@ -1469,6 +1490,30 @@ button.dropdown-toggle {
     margin-right: 5px;
 }
 
+button.select-toggle {
+    padding-right: 12px;
+}
+
+button.select-toggle::after {
+    display: inline-block;
+    width: 0;
+    height: 0;
+    margin-left: 0.25rem;
+    vertical-align: middle;
+    content: "";
+    border-top: 0.3em solid;
+    border-right: 0.3em solid transparent;
+    border-left: 0.3em solid transparent;
+    position: absolute;
+    right: 22px;
+    top: 50%;
+    transform: translateY(-50%);
+}
+
+button.select-toggle.btn::after {
+    right: 20px;
+}
+
 // Prevent scroll bars from being hidden for OS X.
 ::-webkit-scrollbar {
     -webkit-appearance: none;

http://git-wip-us.apache.org/repos/asf/ignite/blob/25bc1d48/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index c9c8532..d9a44a7 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -145,13 +145,13 @@ mixin details-row
             .col-sm-8
                 +tipField('detail.tip')
                 .input-tip
-                    button.form-control(id='{{::detail.id}}' bs-select data-placeholder='{{::detail.placeholder}}'
bs-options='item.value as item.label for item in {{detail.items}}' tabindex='0')&attributes(detailCommon)&attributes(dropdownPlaceholder)
+                    button.select-toggle.form-control(id='{{::detail.id}}' bs-select data-placeholder='{{::detail.placeholder}}'
bs-options='item.value as item.label for item in {{detail.items}}' tabindex='0')&attributes(detailCommon)&attributes(dropdownPlaceholder)
         div(ng-switch-when='dropdown-multiple')
             label(class=lblDetailClasses ng-class='{required: detail.required}') {{::detail.label}}:
             .col-sm-8
                 +tipField('detail.tip')
                 .input-tip
-                    button.form-control(bs-select ng-model-options='{debounce: 500}' data-multiple='1'
data-placeholder='{{::detail.placeholder}}' bs-options='item.value as item.label for item
in {{detail.items}}' tabindex='-1')&attributes(detailCommon)&attributes(dropdownPlaceholder)
+                    button.select-toggle.form-control(bs-select ng-model-options='{debounce:
500}' data-multiple='1' data-placeholder='{{::detail.placeholder}}' bs-options='item.value
as item.label for item in {{detail.items}}' tabindex='-1')&attributes(detailCommon)&attributes(dropdownPlaceholder)
         .group-section(ng-switch-when='table-simple')&attributes(detailCommon)
             .col-sm-12.group(id='{{::detail.model}}')
                 .group-legend
@@ -305,7 +305,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
             div(class=fieldClasses)
                 +tipField('field.tip')
                 .input-tip
-                    button.form-control(id='{{::field.id}}' bs-select ng-disabled=fieldDisabled
data-placeholder='{{::field.placeholder}}' bs-options='item.value as item.label for item in
{{field.items}}' ng-attr-data-container='{{::field.container}}' tabindex='0')&attributes(fieldCommon)&attributes(dropdownPlaceholder)
+                    button.select-toggle.form-control(id='{{::field.id}}' bs-select ng-disabled=fieldDisabled
data-placeholder='{{::field.placeholder}}' bs-options='item.value as item.label for item in
{{field.items}}' ng-attr-data-container='{{::field.container}}' tabindex='0')&attributes(fieldCommon)&attributes(dropdownPlaceholder)
         div(ng-switch-when='dropdown-multiple' ng-hide=fieldHide)
             dic(class=lblClasses)
                 label(ng-class=fieldRequiredClass) {{::field.label}}:
@@ -313,7 +313,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
             div(class=fieldClasses)
                 +tipField('field.tip')
                 .input-tip
-                    button.form-control(id='{{::field.id}}' bs-select ng-disabled='{{field.items}}.length
== 0' data-multiple='1' data-placeholder='{{::$eval(field.items).length == 0 ? field.placeholderEmpty
|| field.placeholder : field.placeholder}}' bs-options='item.value as item.label for item
in {{field.items}}' tabindex='-1')&attributes(fieldCommon)&attributes(dropdownPlaceholder)
+                    button.select-toggle.form-control(id='{{::field.id}}' bs-select ng-disabled='{{field.items}}.length
== 0' data-multiple='1' data-placeholder='{{::$eval(field.items).length == 0 ? field.placeholderEmpty
|| field.placeholder : field.placeholder}}' bs-options='item.value as item.label for item
in {{field.items}}' tabindex='-1')&attributes(fieldCommon)&attributes(dropdownPlaceholder)
         div(ng-switch-when='dropdown-details' ng-hide=fieldHide)
             - var expanded = 'field.details[' + fieldMdl + '].expanded'
 
@@ -321,7 +321,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
             div(class=fieldClasses)
                 +tipField('field.tip')
                 .input-tip
-                    button.form-control(id='{{::field.id}}' bs-select ng-disabled=fieldDisabled
data-placeholder='{{::field.placeholder}}' bs-options='item.value as item.label for item in
{{field.items}}' tabindex='0')&attributes(fieldCommon)&attributes(dropdownPlaceholder)
+                    button.select-toggle.form-control(id='{{::field.id}}' bs-select ng-disabled=fieldDisabled
data-placeholder='{{::field.placeholder}}' bs-options='item.value as item.label for item in
{{field.items}}' tabindex='0')&attributes(fieldCommon)&attributes(dropdownPlaceholder)
             a.customize(ng-if='#{fieldMdl} && field.settings && field.details[#{fieldMdl}].fields.length
> 0' ng-click='#{expanded} = !#{expanded}') {{#{expanded} ? 'Hide settings' : 'Show settings'}}
             .col-sm-12.panel-details(ng-show='(#{expanded} || !field.settings) &&
#{fieldMdl}')
                 .details-row(ng-repeat='detail in field.details[#{fieldMdl}].fields')

http://git-wip-us.apache.org/repos/asf/ignite/blob/25bc1d48/modules/control-center-web/src/main/js/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/sql.jade b/modules/control-center-web/src/main/js/views/sql/sql.jade
index a21fbf0..23b088f 100644
--- a/modules/control-center-web/src/main/js/views/sql/sql.jade
+++ b/modules/control-center-web/src/main/js/views/sql/sql.jade
@@ -107,7 +107,7 @@ block container
                                             label.tipLabel Refresh rate:
                                             button.btn.btn-default.fa.fa-clock-o.tipLabel(ng-class='{"btn-info":
paragraph.rate && paragraph.rate.installed}' bs-popover data-template-url='rate' data-placement='left'
data-auto-close='1' data-trigger='click') {{rateAsString(paragraph)}}
                                             label.tipLabel Page size:
-                                            button.btn.btn-default.base-control.tipLabel(ng-model='paragraph.pageSize'
bs-options='item for item in pageSizes' bs-select style='margin-right: 0')
+                                            button.tipLabel.select-toggle.btn.btn-default(ng-model='paragraph.pageSize'
bs-options='item for item in pageSizes' bs-select)
                                 .col-sm-12(ng-show='paragraph.errMsg')
                                     hr(style='margin-top: 0; margin-bottom: 10px')
                                     .sql-error-result(ng-show='paragraph.errMsg') Error:
{{paragraph.errMsg}}

http://git-wip-us.apache.org/repos/asf/ignite/blob/25bc1d48/modules/control-center-web/src/main/js/views/templates/select.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/select.jade b/modules/control-center-web/src/main/js/views/templates/select.jade
index 420775d..7f08a88 100644
--- a/modules/control-center-web/src/main/js/views/templates/select.jade
+++ b/modules/control-center-web/src/main/js/views/templates/select.jade
@@ -21,6 +21,6 @@ ul.select.dropdown-menu(tabindex='-1' ng-show='$isVisible()' role='select')
         hr(style='margin: 5px 0')
     li(role='presentation' ng-repeat='match in $matches')
         hr(ng-if='match.value == undefined' style='margin: 5px 0')
-        a(id='li-dropdown-item-{{$index}}' style='cursor: default; padding: 3px 16px 3px
10px;' role='menuitem' tabindex='-1' ng-class='{active: $isActive($index)}' ng-click='$select($index,
$event)')
-            i(class='{{$iconCheckmark}}' ng-if='$isActive($index)' ng-class='{active: $isActive($index)}'
style='color: #ec1c24; margin-left: 15px; margin-right: -10px; line-height: 20px; float: right;background-color:
transparent;')
+        a(id='li-dropdown-item-{{$index}}'  role='menuitem' tabindex='-1' ng-class='{active:
$isActive($index)}' ng-click='$select($index, $event)')
+            i(class='{{$iconCheckmark}}' ng-if='$isActive($index)' ng-class='{active: $isActive($index)}')
             span(ng-bind='match.label')


Mime
View raw message