Added multimenu tests
Change-Id: I57b62676657e1069bc460b7692b25f166169d403
diff --git a/dev/demo/menu.html b/dev/demo/menu.html
index 4401d87..e42f342 100644
--- a/dev/demo/menu.html
+++ b/dev/demo/menu.html
@@ -23,19 +23,20 @@
<div id="menu" class="vc" style="padding-top: 80px; padding-left: 80px;"></div>
<div id="largemenu" style="padding-top: 0px; padding-left: 500px;"></div>
+ <div id="multisortmenu" style="padding-top: 0px; padding-left: 550px;"></div>
<span id="choose-ql" class="menu select" style="position: absolute; right: 100px; top: 90px;">
<select name="ql">
- <option value="poliqarp">Poliqarp</option>
- <option value="cosmas2">Cosmas 2</option>
- <option value="annis" selected>Annis QL</option>
- <option value="cql">CQL</option>
+ <option value="poliqarp">Poliqarp</option>
+ <option value="cosmas2">Cosmas 2</option>
+ <option value="annis" selected>Annis QL</option>
+ <option value="cql">CQL</option>
</select>
</span>
-
+
<main>
<div>
- <div id="pagination"><a rel="prev"><span><i class="fa fa-caret-left"></i></span></a><a rel="self"><span>1</span></a><a href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&ql=poliqarp&p=2"><span>2</span></a><a href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&ql=poliqarp&p=3"><span>3</span></a><span><i class="fa fa-ellipsis-h"></i></span><a href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&ql=poliqarp&p=52230"><span>52230</span></a><a rel="next" href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&ql=poliqarp&p=2"><span><i class="fa fa-caret-right"></i></span></a></div>
+ <div id="pagination"><a rel="prev"><span><i class="fa fa-caret-left"></i></span></a><a rel="self"><span>1</span></a><a href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&ql=poliqarp&p=2"><span>2</span></a><a href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&ql=poliqarp&p=3"><span>3</span></a><span><i class="fa fa-ellipsis-h"></i></span><a href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&ql=poliqarp&p=52230"><span>52230</span></a><a rel="next" href="/kalamar?q=der+%5Bmate/m%3Dnumber:sg%5D&ql=poliqarp&p=2"><span><i class="fa fa-caret-right"></i></span></a></div>
</div>
</main>
</body>
diff --git a/dev/demo/menudemo.js b/dev/demo/menudemo.js
index 3d67a14..1ca569a 100644
--- a/dev/demo/menudemo.js
+++ b/dev/demo/menudemo.js
@@ -2,7 +2,7 @@
baseUrl: '../js/src'
});
-require(['menu','menu/item', 'menu/prefix', 'menu/lengthField', 'selectMenu', 'hint/item', 'hint/lengthField'], function (menuClass, itemClass, prefixClass, lengthFieldClass, selectMenuClass, hintItemClass, hintLengthField) {
+require(['menu','menu/item', 'menu/prefix', 'menu/lengthField', 'selectMenu', 'hint/item', 'hint/lengthField', 'multimenu'], function (menuClass, itemClass, prefixClass, lengthFieldClass, selectMenuClass, hintItemClass, hintLengthField, multiMenuClass) {
/**
* Create own menu item class.
@@ -144,8 +144,15 @@
["XY", "XY ", "Non-Word"]
], { 'itemClass' : hintItemClass, 'lengthField' : hintLengthField });
+ var multiMenu = multiMenuClass.create([
+ ["textSigle", "textSigle"],
+ ["author", "author"]
+ ]);
+
+
document.getElementById('menu').appendChild(menu.element());
document.getElementById('largemenu').appendChild(largeMenu.element());
+ document.getElementById('multimenu').appendChild(multiMenu.element());
menu.limit(3).show(3);
menu.focus();
diff --git a/dev/js/src/multimenu.js b/dev/js/src/multimenu.js
new file mode 100644
index 0000000..021e3e2
--- /dev/null
+++ b/dev/js/src/multimenu.js
@@ -0,0 +1,14 @@
+define(
+ ['menu'],
+ function (menuClass) {
+ return {
+ create : function (hmm) {
+ var obj.create(menuClass)
+ .upgradeTo(this)
+ ._init(hmm);
+ },
+ chosen : function () {
+ }
+ }
+ }
+);