New menu class that has an entry at the very end, similar to the input
text prefix, that is always available
Change-Id: I03d8f689e37021d3daac6bf34f7d35f0e4d71999
diff --git a/dev/js/src/alwaysentry.js b/dev/js/src/alwaysentry.js
new file mode 100644
index 0000000..f3f7b42
--- /dev/null
+++ b/dev/js/src/alwaysentry.js
@@ -0,0 +1,43 @@
+/**
+ * An entry in menus that is always
+ * displayed, with a string and onClick functionality
+ * uses menu/prefix.js as prototype and doesn't change much, all
+ * functionality comes from the alwaysmenu
+ *
+ *
+ * @author Leo Repp
+ */
+
+
+"use strict";
+
+define([
+ 'menu/prefix'
+], function (prefixClass) {
+
+ return {
+
+ /**
+ * Create new always visible menu entry object.
+ * Like a prefix Object, always visible, for some defined action
+ */
+ create : function (text) {
+ const obj = prefixClass.create()
+ .upgradeTo(this)
+ ._init();
+ obj._el.innerHTML = text || "Speichern";
+ //dont forget to adjust alwaysMenuSpec - alwaysEntry!
+ return obj;
+ },
+
+ _update : function () {
+ if (this._string.length!==0){ // I assume that this is a sufficient criterium for infering that the prefix is active
+ this._el.style.bottom="-27px";
+ } else if (this._string.length===0) {
+ this._el.style.bottom="0px";
+ }
+ return this._string; // No need to change the text (=innerHTML)
+ },
+
+ };
+});