fix(ecma): 'go' method default variables started. Completed Forms types.

main
KyMAN 2 months ago
parent 9aa3d5b66c
commit fd45e3ff9d
  1. 14
      Public/ecma/AnP.ecma.js
  2. 2
      Public/ecma/comp/AnP.Components.Forms.ecma.js

@ -338,7 +338,19 @@ AnP = function(custom, object){
delete globals[name];
};
this.go = (url, _new) => _new ? window.open(url, "_blank") : window.location.href = url;
this.go = (url, _new) => {
url.substring(0, 1) == "#" &&
(url = self.string_variables(url, {
current_path : window.location.hash.replace(/\#\/([^\/]+)(\/([0-9]+|add|deleted)(\/(history|edit|set)(\/i18n)?)?)?$/, (...arguments) => {
console.log([url.replace(/^\#(\{[^\{\}]+\})?\/([^\/]+)(\/.*)?$/, "$2"), arguments[1]]);
return arguments[2] || url.replace(/^\#(\{[^\{\}]+\})?\/([^\/]+)(\/.*)?$/, "$2") == arguments[1] ? "" : arguments[1];
})
}));
_new ? window.open(url, "_blank") : window.location.href = url;
};
const i18n_get = this.i18n_get = (names, variables, _default) => {
if(i18n)

@ -2,10 +2,12 @@ AnP.Components.Forms = function(anp, input){
const self = this,
type_synonyms = {
i18n : "text",
varchar : "text",
string : "text",
integer : "number",
float : "number",
bool : "checkbox",
boolean : "checkbox",
decimal : "number"
},

Loading…
Cancel
Save