diff options
Diffstat (limited to 'common/src/main/webapp/usageguide/browser/templates/textarea.html')
-rw-r--r-- | common/src/main/webapp/usageguide/browser/templates/textarea.html | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/common/src/main/webapp/usageguide/browser/templates/textarea.html b/common/src/main/webapp/usageguide/browser/templates/textarea.html new file mode 100644 index 0000000..9d885e6 --- /dev/null +++ b/common/src/main/webapp/usageguide/browser/templates/textarea.html @@ -0,0 +1,150 @@ +<!--
+
+ Copyright 2016-2017, Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file 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.
+
+-->
+
+<h4>Text Area</h4>
+<body>
+<div name="myForm" method="post">
+ <div class="form-group row">
+ <label for="fname" class="col-xs-2 col-form-label labelstyle">Text</label>
+ <div class="col-xs-10">
+ <div id="fname"></div>
+
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label for="email" class="col-xs-2 col-form-label labelstyle">Email</label>
+ <div class="col-xs-10">
+ <div id="email" ></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="url" class="col-xs-2 col-form-label labelstyle">URL</label>
+ <div class="col-xs-10">
+ <div id="url"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="password" class="col-xs-2 col-form-label labelstyle">Password</label>
+ <div class="col-xs-10">
+ <div id="password"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="numeric" class="col-xs-2 col-form-label labelstyle">Numeric</label>
+ <div class="col-xs-10">
+ <div id="numeric"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="dot" class="col-xs-2 col-form-label labelstyle">Date and time</label>
+ <div class="col-xs-10">
+ <div id="dot"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="dateinput" class="col-xs-2 col-form-label labelstyle">Date</label>
+ <div class="col-xs-10">
+ <div id="dateinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="monthinput" class="col-xs-2 col-form-label labelstyle">Month</label>
+ <div class="col-xs-10">
+ <div id="monthinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="weekinput" class="col-xs-2 col-form-label labelstyle">Week</label>
+ <div class="col-xs-10">
+ <div id="weekinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="timeinput" class="col-xs-2 col-form-label labelstyle">Time</label>
+ <div class="col-xs-10">
+ <div id="timeinput"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="ipv4" class="col-xs-2 col-form-label labelstyle">IPV4 Address</label>
+ <div class="col-xs-10">
+ <div id="ipv4"></div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="ipv6" class="col-xs-2 col-form-label labelstyle">IPV6 Address</label>
+ <div class="col-xs-10">
+ <div id="ipv6"></div>
+ </div>
+ </div>
+
+
+ <div class="form-group row">
+ <label for="textarea" class="col-xs-2 col-form-label labelstyle">Text Area</label>
+ <div class="col-xs-10">
+ <div id="textarea"></div>
+
+ </div>
+ </div>
+
+ <div class="form-group row">
+ <label for="note" class="col-xs-2 col-form-label labelstyle">Note</label>
+ <div class="col-xs-10">
+ <div id="note">
+ </div>
+
+ </div>
+ </div>
+
+</div>
+<div class="shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example Email and write a specific function in javascript file to perform your business logic. An sample example as shown below for Email and Note, the same logic can be followed by all remaining text fields:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code><div id="textArea" ng-init="init()"></div></code></pre>
+ <pre><code><div id="Email"></div></code></pre>
+ <pre><code><div id="note"></div></code></pre>
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"Note" : {"message" : "Hi I am Note","placement" : "bottom"},"Email" : {"errmsg" : "The email is required.","placeholder" : "Email","modalVar":"email","errtag":"emailErr","errfunc":"validateemail"}};
+
+ $scope.init = function() {
+ loadTextArea();
+ }
+
+ function loadTextArea() {
+ var note = $(modelTemplate).filter('#note').html();
+ var email = $(modelTemplate).filter('#email').html();
+ var html = Mustache.to_html(email, data.Email);
+ $('#email').html($compile(html)($scope));
+ var html = Mustache.to_html(note, {"placement":data.Note.placement});
+ $('#note').html(html);
+ $("#noteanchor").popover({
+ template: '<div class="popover fade bottom in customPopover"><div class="arrow"></div>'+data.Note.message+'</div>'
+ });
+
+ }</code></pre>
+
+
+</div>
+</div>
+</body>
+
|