blob: c27dbf0732f91dae87b562e51e3d118e5c250deb [file] [log] [blame]
Seshu-Kumar-Mf7800f42016-09-16 18:35:58 +08001/* Copyright 2016, Huawei Technologies Co., Ltd.
Seshu-Kumar-M72f32522016-09-14 18:06:11 +08002 *
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-M72508a12016-09-16 22:33:16 +08007 * http://www.apache.org/licenses/LICENSE-2.0
Seshu-Kumar-M72f32522016-09-14 18:06:11 +08008 *
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-M72508a12016-09-16 22:33:16 +080016
Seshu-Kumar-Ma06adb72016-09-14 16:45:06 +080017$(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-Ma06adb72016-09-14 16:45:06 +080081})