summaryrefslogtreecommitdiffstats
path: root/common/src/main/webapp/usageguide/browser/templates/dropdown.html
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main/webapp/usageguide/browser/templates/dropdown.html')
-rw-r--r--common/src/main/webapp/usageguide/browser/templates/dropdown.html83
1 files changed, 83 insertions, 0 deletions
diff --git a/common/src/main/webapp/usageguide/browser/templates/dropdown.html b/common/src/main/webapp/usageguide/browser/templates/dropdown.html
new file mode 100644
index 0000000..cb97477
--- /dev/null
+++ b/common/src/main/webapp/usageguide/browser/templates/dropdown.html
@@ -0,0 +1,83 @@
+<!--
+
+ 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.
+
+-->
+
+
+<div class="container col-sm-12 col-md-12 col-lg-12">
+ <h4>Drop Down</h4>
+
+ <div id="dropdown" class="container col-sm-12 col-md-12 col-lg-12" ng-init="init()">
+ <h3>Simple Dropdown</h3>
+ <div id="plainDropDown"></div>
+ <h3>Dropdown</h3>
+ <div id="dropArea" type="button"></div>
+ <h3>Dropup</h3>
+ <div id="dropAreaUP" type="button"></div>
+ <h3>Dropdown Header</h3>
+ <div id="dropAreaHeader" type="button"></div>
+
+ </div>
+ <div class="col-sm-12 col-md-12 col-lg-12 shortnote">
+ <div class="shortnoteHeader">Usage</div>
+ <div class="shortnoteText">Create a div tag in html file with specific id for example plainDropDown,dropArea,dropAreaUP,dropAreaHeader and write a specific function in javascript file to perform your business logic. An sample example as shown below:</div>
+ <br>
+ <div>HTML file:</div>
+ <pre><code>&ltdiv id="dropdown" ng-init="init()"&gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="plainDropDown" &gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="dropArea" &gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="dropAreaUP" &gt&lt/div&gt</code></pre>
+ <pre><code>&ltdiv id="dropAreaHeader" &gt&lt/div&gt</code></pre>
+
+
+ <br>
+ <div>Javascript file:</div>
+ <pre><code>
+ var data ={"dropped_down_data" :{"title":"DropDown","position":"down", "items":[{"itemLabel": "Node JS"},{"itemLabel": "JS"}]},"dropped_up_data" :{"title":"DropUp","position":"up", "items":[{"itemLabel": "PHP"},{"itemLabel": "ASP"}]},"dropHeader_data" :{"title":"DropHeader","position":"down","items":[{"itemLabel": "Web UI", "isheader":true},{"itemLabel": "HTML", "isheader":false},{"itemLabel": "CSS", "isheader":false},{"itemLabel": "JS", "isheader":false},{"itemLabel": "Programming", "isheader":true},{"itemLabel": "C", "isheader":false},{"itemLabel": "C++", "isheader":false}]},"dropSimple_data" : {"title":"--PleaseSelect--","items":[{"itemLabel": "Cameras"},{"itemLabel": "Mobile Phones"},{"itemLabel": "Computers"},{"itemLabel": "Monitors"},{"itemLabel": "Tablets"},{"itemLabel": "Others"}]}};
+
+ $scope.init = function() {
+ loadDrop();
+ }
+
+ function loadDrop() {
+ var drop_tpl = $(modelTemplate).filter('#dropDown').html();
+ var dropHeader_tpl = $(modelTemplate).filter('#dropDownHeader').html();
+ var dropSimple_tpl = $(modelTemplate).filter('#simpleDropdownTmpl').html();
+
+ var html = Mustache.to_html(drop_tpl, data.dropped_down_data);
+ $('#dropArea').html(html);
+
+ var html = Mustache.to_html(drop_tpl, data.dropped_up_data);
+ $('#dropAreaUP').html(html);
+
+ var html = Mustache.to_html(dropHeader_tpl, data.dropHeader_data);
+ $('#dropAreaHeader').html(html);
+
+ var html = Mustache.to_html(dropSimple_tpl, data.dropSimple_data);
+ $('#plainDropDown').html(html);
+
+ }</code></pre>
+
+
+
+
+ </div>
+ </div>
+</div>
+
+
+
+