Repository: ambari Updated Branches: refs/heads/trunk b1336f395 -> fe890e9a9
AMBARI-7342. Slider View: Action dialogs do not look the same as Ambari dialogs (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e24eb5bc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e24eb5bc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e24eb5bc Branch: refs/heads/trunk Commit: e24eb5bc1c08b156fad8e3c202520dd5ca11b390 Parents: b1336f3 Author: Alex Antonenko <hiv...@gmail.com> Authored: Tue Sep 16 21:49:20 2014 +0300 Committer: Alex Antonenko <hiv...@gmail.com> Committed: Tue Sep 16 22:15:58 2014 +0300 ---------------------------------------------------------------------- .../ui/app/controllers/slider_app_controller.js | 15 ++- .../resources/ui/app/styles/application.less | 99 ++++++++++++++++++++ 2 files changed, 109 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e24eb5bc/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js index e78a1b3..6558e87 100644 --- a/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js +++ b/contrib/views/slider/src/main/resources/ui/app/controllers/slider_app_controller.js @@ -319,12 +319,17 @@ App.SliderAppController = Ember.ObjectController.extend({ openModal: function(option) { this.set('currentAction', option.action); if (option.confirm) { - Bootstrap.ModalManager.confirm( - this, + Bootstrap.ModalManager.open( + "confirm-modal", Ember.I18n.t('common.confirmation'), - Ember.I18n.t('question.sure'), - Ember.I18n.t('yes'), - Ember.I18n.t('no') + Ember.View.extend({ + template: Ember.Handlebars.compile('{{t question.sure}}') + }), + [ + Ember.Object.create({title: Em.I18n.t('common.cancel'), clicked:"modalCanceled", dismiss: 'modal'}), + Ember.Object.create({title: Em.I18n.t('ok'), clicked:"modalConfirmed", type:'success'}) + ], + this ); } else { http://git-wip-us.apache.org/repos/asf/ambari/blob/e24eb5bc/contrib/views/slider/src/main/resources/ui/app/styles/application.less ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less index 241a52d..90f10d7 100644 --- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less +++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less @@ -753,4 +753,103 @@ a { .row { .table-row(); } +} + +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} +.modal-title { + line-height: 30px; + font-size: 24px; + font-family: inherit; + font-weight: bold; + color: inherit; + text-rendering: optimizelegibility; +} +.modal-body{ + padding: 15px; +} +.modal-footer { + margin-top: 0px; + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; + + .btn{ + display: inline-block; + padding: 4px 14px; + margin-bottom: 0; + font-size: 14px; + line-height: 20px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + cursor: pointer; + background-color: #f5f5f5; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-repeat: repeat-x; + border: 1px solid #bbbbbb; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:dximagetransform.microsoft.gradient(enabled=false); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + } + .btn:hover { + color: #333333; + text-decoration: none; + background-color: #e6e6e6; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; + } + .btn.active, .btn:active { + background-color: #e6e6e6; + background-color: #d9d9d9 \9; + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + } + .btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5bb75b; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); + background-image: -webkit-linear-gradient(top, #62c462, #51a351); + background-image: -o-linear-gradient(top, #62c462, #51a351); + background-image: linear-gradient(to bottom, #62c462, #51a351); + background-image: -moz-linear-gradient(top, #62c462, #51a351); + background-repeat: repeat-x; + border-color: #51a351 #51a351 #387038; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + filter: progid:dximagetransform.microsoft.gradient(enabled=false); + } + .btn.btn-success:hover, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] { + color: #ffffff; + background-color: #51a351; + } } \ No newline at end of file