Remove ECOMP in headers
[clamp.git] / src / main / resources / META-INF / resources / designer / partials / portfolios / Template_model.html
1 <!--
2   ============LICENSE_START=======================================================
3   ONAP CLAMP
4   ================================================================================
5   Copyright (C) 2017 AT&T Intellectual Property. All rights
6                               reserved.
7   ================================================================================
8   Licensed under the Apache License, Version 2.0 (the "License"); 
9   you may not use this file except in compliance with the License. 
10   You may obtain a copy of the License at
11   
12   http://www.apache.org/licenses/LICENSE-2.0
13   
14   Unless required by applicable law or agreed to in writing, software 
15   distributed under the License is distributed on an "AS IS" BASIS, 
16   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
17   See the License for the specific language governing permissions and 
18   limitations under the License.
19   ============LICENSE_END============================================
20   ===================================================================
21   
22   -->
23
24 <style>
25     .fileUpload {
26         position: relative;
27         overflow: hidden;
28         margin: 10px;
29     }
30     .fileUpload input.upload {
31         position: absolute;
32         top: 0;
33         right: 0;
34         margin: 0;
35         padding: 0;
36         font-size: 20px;
37         cursor: pointer;
38         opacity: 0;
39         filter: alpha(opacity=0);
40         float:left;
41     }
42     .fileDisplay {
43
44         display: inline-block;
45         overflow: hidden;
46         float: right;
47         margin-left: 0px;
48         z-index: initial;
49         text-align: center;
50         margin-top: 17px;
51     }
52
53
54 </style>
55
56
57 <div attribute-test="templatemodel" id="configure-widgets"  >
58     <div attribute-test="templatemodelh" class="modal-header">
59         <button type="button" class="close" ng-click="close(false)" aria-hidden="true" style="margin-top: -3px">&times;</button>
60         <h4>'Template'</h4>
61     </div>
62     <div class="modal-body" style="height: 280px">
63         <div style="height: 10px">
64         </div>
65         <form id="saveProps" name="t" class="form-horizontal">
66
67             <div>
68                 <div class="form-group">
69                     <label for="schemaLocation" class="col-sm-4 control-label">ID</label>
70
71                     <div class="col-sm-8">
72                         <input class="form-control" type="text" focus="true" name="_id"  id="_id" readonly>
73                            <div hidden id="warnings_">Special Characters are not allowed in template id.</span> <!-- <span ng-show="nameinUse" style="color: red"> Model Name Already In Use</span> --></div>
74                         </input>
75                     </div>
76                 </div>
77             </div>
78         </form>
79     </div>
80     <div attribute-test="templatemodelf" class="modal-footer">
81         <button  id="savePropsBtn" class="btn btn-primary" ng-disabled="t._id.$error.pattern" >Close</button>
82         <button ng-click="close(true)" id="close_button" class="btn btn-primary">Cancel</button>
83
84     </div>
85     <script>
86     loadPropertyWindow("template");
87     var el=elementMap[lastElementSelected];
88     //console.log(el)
89     //console.log(lastElementSelected)
90     //$("#id").val("lolololol")
91    // $('.modal-header > h4').html($('.djs-visual > text').val());
92     if(el!==undefined){
93         
94         for(var i=0;i<el.length;i++){   
95                 console.log(el.length)
96                 console.log(el[i].name)
97                 console.log(el[i].value)
98             $("#"+el[i].name).val(el[i].value);
99         }
100     }
101      $("#_id").keyup(function(){
102         var pattern=/^\s*[\w\-]*\s*$/
103         if( !pattern.test($(this).val()) && !$(this).is("[disabled]")){
104             $("#savePropsBtn").attr("disabled","");
105             $("#warnings_").removeAttr("hidden")
106             console.log("remove hidden")
107         }
108         else{
109             //console.log($(this).is("[disabled]"))
110             console.log("add hidden ")
111             if($("#savePropsBtn").is("[disabled]")){
112                 $("#savePropsBtn").removeAttr("disabled");
113                  $("#warnings_").attr("hidden", "");
114             console.log("add hidden if")
115             }
116            
117         }
118     })
119     
120     $("#saveProps").on('submit', function (event) {
121         //console.log(lastElementSelected)
122         saveProperties($(this).serializeArray())
123         event.preventDefault();
124         $("#close_button").click();
125     })
126     
127     $("#savePropsBtn").click(function (event) {
128         $("#saveProps").submit();
129     })
130 </script>
131 </div>
132
133