From 23c042775c0b6d918e7f05229a834622382e66fb Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Fri, 18 Oct 2013 12:14:25 +0200 Subject: RCUE dialog implementation https://fedorahosted.org/freeipa/ticket/3904 --- install/ui/less/dialog.less | 96 ++++++++++++++ install/ui/less/rcue.less | 1 + install/ui/src/freeipa/add.js | 6 +- install/ui/src/freeipa/automount.js | 4 +- install/ui/src/freeipa/certificate.js | 8 +- install/ui/src/freeipa/dialog.js | 236 +++++++++++++++++++++++----------- install/ui/src/freeipa/dns.js | 8 +- install/ui/src/freeipa/hbactest.js | 4 +- install/ui/src/freeipa/host.js | 10 +- install/ui/src/freeipa/ipa.js | 6 +- install/ui/src/freeipa/service.js | 2 +- install/ui/src/freeipa/widget.js | 2 +- 12 files changed, 284 insertions(+), 99 deletions(-) create mode 100644 install/ui/less/dialog.less (limited to 'install') diff --git a/install/ui/less/dialog.less b/install/ui/less/dialog.less new file mode 100644 index 000000000..00bbde5a8 --- /dev/null +++ b/install/ui/less/dialog.less @@ -0,0 +1,96 @@ +/** + * Authors: + * UXD team + * Petr Vobornik + * + * Copyright (C) 2013 Red Hat + * see file 'COPYING' for use and warranty information + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +.rcue-dialog-background { + z-index: 1049; + background-color: rgba(0,0,0, 0.39); + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + overflow: auto; + + .rcue-dialog-container { + padding: 30px; + } + + .rcue-dialog { + position: relative; + padding: 16px 22px; + max-width: 600px; + border: 1px solid #6e6d6d; + box-shadow: rgba(0,0,0, 0.39) 0 0 2px; + background-color: #fff; + margin: auto; + + header { + margin-bottom: 48px; + + h1 { + float: left; + margin: 0; + } + + a { + float: right; + } + + .rcue-button-close { + background-image: url("../img/dialog-button-close.png"); + width: 25px; + height: 25px; + background-repeat: no-repeat; + background-position: center; + display: inline-block; + margin-top: -4px; + margin-right: -6px; + position: absolute; + top: 15px; + right: 19px; + } + } + + .rcue-dialog-body { + position: relative; + top: 0; + bottom: 60px; + clear: both; + padding: 0 15px 10px; + } + + footer { + clear: both; + padding-left: 22px; + min-height: 25px; + + button { + float: right; + margin: 0px 5px 5px; + } + + .clear { + clear: both; + } + } + } +} diff --git a/install/ui/less/rcue.less b/install/ui/less/rcue.less index fc8f51484..6b27259d6 100644 --- a/install/ui/less/rcue.less +++ b/install/ui/less/rcue.less @@ -4,5 +4,6 @@ @import "rcue/navbar"; @import "rcue/buttons"; @import "rcue/forms"; +@import "dialog"; @import "brand"; @import "forms-override.less"; diff --git a/install/ui/src/freeipa/add.js b/install/ui/src/freeipa/add.js index 00d499da5..23eac54d6 100644 --- a/install/ui/src/freeipa/add.js +++ b/install/ui/src/freeipa/add.js @@ -232,8 +232,8 @@ IPA.entity_adder_dialog = function(spec) { }; /** @inheritDoc */ - that.create = function() { - that.dialog_create(); + that.create_content = function() { + that.dialog_create_content(); var div = $('
', { }).appendTo(that.container); @@ -251,7 +251,7 @@ IPA.entity_adder_dialog = function(spec) { }; // methods that should be invoked by subclasses - that.entity_adder_dialog_create = that.create; + that.entity_adder_dialog_create_content = that.create_content; that.entity_adder_dialog_create_add_command = that.create_add_command; that.entity_adder_dialog_get_success_message = that.get_success_message; diff --git a/install/ui/src/freeipa/automount.js b/install/ui/src/freeipa/automount.js index eae6a4653..fca476fd0 100644 --- a/install/ui/src/freeipa/automount.js +++ b/install/ui/src/freeipa/automount.js @@ -283,8 +283,8 @@ IPA.automountmap_adder_dialog = function(spec) { var that = IPA.entity_adder_dialog(spec); - that.create = function() { - that.entity_adder_dialog_create(); + that.create_content = function() { + that.entity_adder_dialog_create_content(); var method_widget = that.widgets.get_widget('general.method'); var indirect_section = that.widgets.get_widget('indirect'); diff --git a/install/ui/src/freeipa/certificate.js b/install/ui/src/freeipa/certificate.js index 2fab64b7f..5da1de813 100755 --- a/install/ui/src/freeipa/certificate.js +++ b/install/ui/src/freeipa/certificate.js @@ -197,7 +197,7 @@ IPA.cert.download_dialog = function(spec) { } }); - that.create = function() { + that.create_content = function() { var textarea = $('