Seshu-Kumar-M | f7800f4 | 2016-09-16 18:35:58 +0800 | [diff] [blame] | 1 | /* Copyright 2016, Huawei Technologies Co., Ltd.
|
Seshu-Kumar-M | 72f3252 | 2016-09-14 18:06:11 +0800 | [diff] [blame] | 2 | *
|
| 3 | * Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 | * you may not use this file except in compliance with the License.
|
| 5 | * You may obtain a copy of the License at
|
| 6 | *
|
Seshu-Kumar-M | 72508a1 | 2016-09-16 22:33:16 +0800 | [diff] [blame] | 7 | * http://www.apache.org/licenses/LICENSE-2.0
|
Seshu-Kumar-M | 72f3252 | 2016-09-14 18:06:11 +0800 | [diff] [blame] | 8 | *
|
| 9 | * Unless required by applicable law or agreed to in writing, software
|
| 10 | * distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 | * See the License for the specific language governing permissions and
|
| 13 | * limitations under the License.
|
| 14 | */
|
| 15 |
|
Seshu-Kumar-M | 72508a1 | 2016-09-16 22:33:16 +0800 | [diff] [blame] | 16 |
|
Seshu-Kumar-M | a06adb7 | 2016-09-14 16:45:06 +0800 | [diff] [blame] | 17 | $(function(){
|
| 18 | $('.creat-btn').click(function(){
|
| 19 | $('#vmAppDialog').addClass('in').css({'display':'block'});
|
| 20 |
|
| 21 | });
|
| 22 | $('.close,.button-previous').click(function(){
|
| 23 | $('#vmAppDialog').removeClass('in').css('display','none');
|
| 24 | });
|
| 25 | $('.detail-top ul li').click(function(){
|
| 26 | $(this).addClass('current').siblings().removeClass('current');
|
| 27 | });
|
| 28 | $('.para').click(function(){
|
| 29 | if($('#serviceTemplateName').val() == ''){
|
| 30 | alert('Please choose the service templet!');
|
| 31 | $('#flavorTab').css('display','none');
|
| 32 | }else{
|
| 33 | $('#flavorTab').css('display','block');
|
| 34 | }
|
| 35 | $('#basicTab').css('display','block');
|
| 36 | });
|
| 37 | $('.basic').click(function(){
|
| 38 | $('#flavorTab').css('display','none');
|
| 39 | });
|
| 40 |
|
| 41 | $('.table tbody tr').click(function(){
|
| 42 | $(this).addClass('openoTable_row_selected').siblings().removeClass('openoTable_row_selected');
|
| 43 | });
|
| 44 | $('.table tr:odd').addClass('active');
|
| 45 | $('#false').click(function(){
|
| 46 | $('#vmAppDialog').addClass('in').css({'display':'block'});
|
| 47 | });
|
| 48 | $('.close,.button-previous').click(function(){
|
| 49 | $('#vmAppDialog').removeClass('in').css('display','none');
|
| 50 | });
|
| 51 | $('#filterTpLogicalType').click(function(){
|
| 52 | $('#filterTpLogicalType_select_popupcontainer').toggleClass('openo-hide');
|
| 53 | $('#filterTpLogicalType').toggleClass('openo-focus');
|
| 54 | var oLeft = $('#open_base_tpL_td6').offset().left;
|
| 55 | var oTop = $('#open_base_tpL_td6').offset().top;
|
| 56 | var oHeight = $('#open_base_tpL_td6').height();
|
| 57 | $('#filterTpLogicalType_select_popupcontainer').css({'left':oLeft,'top':oTop + oHeight + 10});
|
| 58 | });
|
| 59 | $('div.openo-select-popup-container>div.openo-select-item>label').click(function(){
|
| 60 | var Lvalue = $(this).html();
|
| 61 | $('#filterTpLogicalType_select_input').attr('value',Lvalue);
|
| 62 | $('#filterTpLogicalType_select_popupcontainer').addClass('openo-hide');
|
| 63 | $('#filterTpLogicalType').removeClass('openo-focus');
|
| 64 | });
|
| 65 | $.fn.serializeObject = function() {
|
| 66 | var o = {};
|
| 67 | var a = this.serializeArray();
|
| 68 | $.each(a, function() {
|
| 69 | if (o[this.name] !== undefined) {
|
| 70 | if (!o[this.name].push) {
|
| 71 | o[this.name] = [ o[this.name] ];
|
| 72 | }
|
| 73 | o[this.name].push(this.value || '');
|
| 74 | } else {
|
| 75 | o[this.name] = this.value || '';
|
| 76 | }
|
| 77 | });
|
| 78 | return o;
|
| 79 | };
|
| 80 |
|
Seshu-Kumar-M | a06adb7 | 2016-09-14 16:45:06 +0800 | [diff] [blame] | 81 | }) |