diff options
Diffstat (limited to 'd2ice.att.io/app/main/modals/general-prompt-modal')
3 files changed, 277 insertions, 0 deletions
diff --git a/d2ice.att.io/app/main/modals/general-prompt-modal/general-prompt-modal.controller.js b/d2ice.att.io/app/main/modals/general-prompt-modal/general-prompt-modal.controller.js new file mode 100755 index 00000000..f887a5ee --- /dev/null +++ b/d2ice.att.io/app/main/modals/general-prompt-modal/general-prompt-modal.controller.js @@ -0,0 +1,74 @@ +// +// ============LICENSE_START========================================== +// org.onap.vvp/portal +// =================================================================== +// Copyright © 2017 AT&T Intellectual Property. All rights reserved. +// =================================================================== +// +// Unless otherwise specified, all software contained herein is licensed +// under the Apache License, Version 2.0 (the “License”); +// you may not use this software except in compliance with the License. +// You may obtain a copy of the License at +// +// http:www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// +// Unless otherwise specified, all documentation contained herein is licensed +// under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +// you may not use this documentation except in compliance with the License. +// You may obtain a copy of the License at +// +// https:creativecommons.org/licenses/by/4.0/ +// +// Unless required by applicable law or agreed to in writing, documentation +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ============LICENSE_END============================================ +// +// ECOMP is a trademark and service mark of AT&T Intellectual Property. + +(function () { + 'use strict'; + + angular + .module('ice.modals') + .controller('generalPromptModalController', ['$uibModalInstance','modalDetails',generalPromptModalController]); + + function generalPromptModalController($uibModalInstance, modalDetails) { + + var vm = this; + var init = function () { + if(modalDetails) { + vm.upper_headline = modalDetails.upper_headline; + vm.upper_headline_value = modalDetails.upper_headline_value; + vm.headline = modalDetails.headline || 'D2ICE'; + vm.message = modalDetails.message || 'Are you sure?'; + vm.closeCallback = modalDetails.closeCallback; + vm.approveText = modalDetails.approve || 'Approve'; + vm.cancelText = modalDetails.cancel || 'Cancel'; + vm.is_close_modal_button = modalDetails.is_close_modal_button; + vm.is_message = modalDetails.is_message; + } + }; + + vm.closeModal = function (bool) { + if(vm.closeCallback) { + vm.closeCallback(bool); + } + + $uibModalInstance.close(bool); + }; + + init(); + } +})(); diff --git a/d2ice.att.io/app/main/modals/general-prompt-modal/general-prompt-modal.html b/d2ice.att.io/app/main/modals/general-prompt-modal/general-prompt-modal.html new file mode 100755 index 00000000..3bd31887 --- /dev/null +++ b/d2ice.att.io/app/main/modals/general-prompt-modal/general-prompt-modal.html @@ -0,0 +1,52 @@ +<!-- +============LICENSE_START========================================== +org.onap.vvp/portal +=================================================================== +Copyright © 2017 AT&T Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the “License”); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http:www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + + +Unless otherwise specified, all documentation contained herein is licensed +under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +you may not use this documentation except in compliance with the License. +You may obtain a copy of the License at + + https:creativecommons.org/licenses/by/4.0/ + +Unless required by applicable law or agreed to in writing, documentation +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +============LICENSE_END============================================ + +ECOMP is a trademark and service mark of AT&T Intellectual Property.--> +<div class="modal-header"> + <button ng-if=vm.is_close_modal_button type="button" ng-click="vm.closeModal()" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <div ng-if=vm.upper_headline class="general-prompt-upper-dash"> + <div id="general-prompt-upper-headline" class="general-prompt-upper-headline">{{vm.upper_headline}}<span ng-if=vm.upper_headline class="upper-headline-value">{{vm.upper_headline_value}}</span></div> + </div> + <div class="general-prompt-title"><span class="bold" id="general-prompt-title">{{vm.headline}}</span></div> +</div> +<div class="modal-body row general-prompt-body"> + <div ng-if=vm.is_message class="general-prompt-text-details" ng-bind-html="vm.message"></div> + <div ng-if=!vm.is_message> </div> + <button id="general-prompt-approve-btn" type="submit" class="col-md-5 btn btn-gradient-success" ng-click="vm.closeModal(true)">{{vm.approveText}}</button> + <span class="col-md-2"></span> + <button id="general-prompt-cancel-btn" type="submit" class="col-md-5 btn btn-gradient-danger" ng-click="vm.closeModal(false)">{{vm.cancelText}}</button> +</div> diff --git a/d2ice.att.io/app/main/modals/general-prompt-modal/general-prompt-modal.less b/d2ice.att.io/app/main/modals/general-prompt-modal/general-prompt-modal.less new file mode 100755 index 00000000..d367cdaa --- /dev/null +++ b/d2ice.att.io/app/main/modals/general-prompt-modal/general-prompt-modal.less @@ -0,0 +1,151 @@ +// +// ============LICENSE_START========================================== +// org.onap.vvp/portal +// =================================================================== +// Copyright © 2017 AT&T Intellectual Property. All rights reserved. +// =================================================================== +// +// Unless otherwise specified, all software contained herein is licensed +// under the Apache License, Version 2.0 (the “License”); +// you may not use this software except in compliance with the License. +// You may obtain a copy of the License at +// +// http:www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// +// Unless otherwise specified, all documentation contained herein is licensed +// under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +// you may not use this documentation except in compliance with the License. +// You may obtain a copy of the License at +// +// https:creativecommons.org/licenses/by/4.0/ +// +// Unless required by applicable law or agreed to in writing, documentation +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ============LICENSE_END============================================ +// +// ECOMP is a trademark and service mark of AT&T Intellectual Property. +.general-prompt-text-details { + .l_14_r; + padding: 3% 0% 3% 0%; +} + +.general-prompt-upper-headline { + .l_14_m; +} +.general-prompt-upper-dash { + border-bottom: dashed 1px #5a5a5a; + margin-bottom: 15px; +} +.upper-headline-value{ + .l_14_i; +} + +.general-prompt-body{ + margin: 0px; +} + +.general-prompt-title { + .m_18_r; + + .bold { + .a_18_m; + } + +} + + +.btn-gradient-success { + font-weight: bold; + color: #FFFFFF; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #41A02C; + *background-color: #41A02C; + background-image: -moz-linear-gradient(top, #A2E652, #41A02C); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#A2E652), to(#41A02C)); + background-image: -webkit-linear-gradient(top, #A2E652, #41A02C); + background-image: -o-linear-gradient(top, #A2E652, #41A02C); + background-image: linear-gradient(to bottom, #A2E652, #41A02C); + background-repeat: repeat-x; + border-color: #41A02C; + border-color: #888; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#A2E652', endColorstr='#41A02C', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} +.btn-sample:hover, +.btn-sample:focus, +.btn-sample:active, +.btn-sample.active, +.btn-sample.disabled, +.btn-sample[disabled] { + color: #FFFFFF; + background-color: #41A02C; + *background-color: #003bb3; +} + +.btn-gradient-danger { + font-weight: bold; + color: #FFFFFF; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #AE0020; + *background-color: #AE0020; + background-image: -moz-linear-gradient(top, #F74658, #AE0020); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#F74658), to(#AE0020)); + background-image: -webkit-linear-gradient(top, #F74658, #AE0020); + background-image: -o-linear-gradient(top, #F74658, #AE0020); + background-image: linear-gradient(to bottom, #F74658, #AE0020); + background-repeat: repeat-x; + border-color: #AE0020; + border-color: #888; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#F74658', endColorstr='#AE0020', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} +.btn-sample:hover, +.btn-sample:focus, +.btn-sample:active, +.btn-sample.active, +.btn-sample.disabled, +.btn-sample[disabled] { + color: #FFFFFF; + background-color: #AE0020; + *background-color: #003bb3; +} + +.btn-gradient-default { + font-weight: bold; + color: #B3B3B3; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #D0D0D0; + *background-color: #D0D0D0; + background-image: -moz-linear-gradient(top, #FCFCFC, #D0D0D0); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#FCFCFC), to(#D0D0D0)); + background-image: -webkit-linear-gradient(top, #FCFCFC, #D0D0D0); + background-image: -o-linear-gradient(top, #FCFCFC, #D0D0D0); + background-image: linear-gradient(to bottom, #FCFCFC, #D0D0D0); + background-repeat: repeat-x; + border-color: #D0D0D0; + border-color: #888; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FCFCFC', endColorstr='#D0D0D0', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} +.btn-sample:hover, +.btn-sample:focus, +.btn-sample:active, +.btn-sample.active, +.btn-sample.disabled, +.btn-sample[disabled] { + color: #FFFFFF; + background-color: #D0D0D0; + *background-color: #003bb3; +} |