From 21d72c4a80fe2937d0c4ddd20624b27adbcd989b Mon Sep 17 00:00:00 2001 From: lizi00164331 Date: Mon, 7 Aug 2017 11:39:39 +0800 Subject: Upload the ESR GUI seed code Issue-ID: AAI-68 Change-Id: Ia50ce0570c2fabecd77199d4e8454f56fe587c4e Signed-off-by: lizi00164331 --- .../usageguide/browser/templates/textarea.html | 150 +++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 common/src/main/webapp/usageguide/browser/templates/textarea.html (limited to 'common/src/main/webapp/usageguide/browser/templates/textarea.html') 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 @@ + + +

Text Area

+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+ + +
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
Usage
+
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:
+
+
HTML file:
+
<div id="textArea" ng-init="init()"></div>
+
<div id="Email"></div>
+
<div id="note"></div>
+
+
Javascript file:
+

+        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: '
'+data.Note.message+'
' + }); + + }
+ + +
+ + + -- cgit 1.2.3-korg