• R/O
  • SSH

fcf: Commit

FCF - Full Stack Javascript Framework

OpenSource is a full stack development framework designed to simplify the development of WEB projects of various complexity levels.

It is based on unique technologies that open up new opportunities in development approaches with NODEJS.


Commit MetaInfo

Révision235c528242aded1393edc5e6c0e1da689c4994e7 (tree)
l'heure2022-06-18 13:19:37
AuteurVladimir Markin <v.o.markin221@gmai...>
CommiterVladimir Markin

Message de Log

VERSION 1.1.45-a1 (hotfix: fixed short template path for fcf.argTmpl())

Change Summary

Modification

diff -r ea8dd79c6e18 -r 235c528242ad NClient/Render.js
--- a/NClient/Render.js Fri Jun 17 23:48:09 2022 +0300
+++ b/NClient/Render.js Sat Jun 18 07:19:37 2022 +0300
@@ -713,7 +713,7 @@
713713 .then(async ()=>{
714714 let templateRender = new TemplateRender({template: a_options.template, state: state, args: resultArgs});
715715 let lct = fcf.getContext().currentTemplate;
716- fcf.getContext().currentTemplate = {id: fcfId};
716+ fcf.getContext().currentTemplate = {id: fcfId, template: a_options.template};
717717 let libFCF = {};
718718 libFCF.__proto__ = fcf;
719719 libFCF.argRef = function(){
diff -r ea8dd79c6e18 -r 235c528242ad NRender/NDetails/ArgsBuilder.js
--- a/NRender/NDetails/ArgsBuilder.js Fri Jun 17 23:48:09 2022 +0300
+++ b/NRender/NDetails/ArgsBuilder.js Sat Jun 18 07:19:37 2022 +0300
@@ -302,7 +302,7 @@
302302 return;
303303 }
304304
305- fcf.getContext().currentTemplate = { id: a_taskInfo.args.fcfId };
305+ fcf.getContext().currentTemplate = { id: a_taskInfo.args.fcfId, template: a_taskInfo.template };
306306
307307 if (!(fcf.isArg(a_srcArg)) || a_srcArg.type == "value") {
308308 a_act.complete(self._processValue(a_srcArg, a_taskInfo));
@@ -612,7 +612,7 @@
612612 return;
613613 }
614614
615- fcf.getContext().currentTemplate = { id: a_taskInfo.args.fcfId };
615+ fcf.getContext().currentTemplate = { id: a_taskInfo.args.fcfId, template: a_taskInfo.template };
616616
617617 if (!(fcf.isArg(a_srcArg)) || a_srcArg.type == "value") {
618618 a_cb(undefined, self._processValue(a_srcArg, a_taskInfo));
diff -r ea8dd79c6e18 -r 235c528242ad NRender/NDetails/TemplateProcessor.js
--- a/NRender/NDetails/TemplateProcessor.js Fri Jun 17 23:48:09 2022 +0300
+++ b/NRender/NDetails/TemplateProcessor.js Sat Jun 18 07:19:37 2022 +0300
@@ -102,7 +102,7 @@
102102 }
103103
104104 this._renderBlock = async function(a_code, a_args, a_path, a_stringNumber, a_template) {
105- fcf.getContext().currentTemplate = {id: a_args.args.fcfId};
105+ fcf.getContext().currentTemplate = {id: a_args.args.fcfId, template: a_template};
106106 let ov = fcf.NDetails.currentTemplate;
107107 fcf.NDetails.currentTemplate = a_template;
108108 await fcf.scriptExecutor.execute(a_code, a_args, a_path, a_stringNumber, 0, true);
diff -r ea8dd79c6e18 -r 235c528242ad NRender/Render.js
--- a/NRender/Render.js Fri Jun 17 23:48:09 2022 +0300
+++ b/NRender/Render.js Sat Jun 18 07:19:37 2022 +0300
@@ -58,7 +58,7 @@
5858
5959 var fcfId = typeof a_options.args === "object" && a_options.args.fcfId ? a_options.args.fcfId :
6060 fcf.id();
61- fcf.getContext().currentTemplate = { id: fcfId };
61+ fcf.getContext().currentTemplate = { id: fcfId, template: a_options.template };
6262 var needOnServer = !fcf.isServer() && fcf.getContext().get("needBabel");
6363 needOnServer = !fcf.isServer();
6464 var part = a_options.template.split("+")[1] ? a_options.template.split("+")[1] : "";
diff -r ea8dd79c6e18 -r 235c528242ad NSystem/builder.js
--- a/NSystem/builder.js Fri Jun 17 23:48:09 2022 +0300
+++ b/NSystem/builder.js Sat Jun 18 07:19:37 2022 +0300
@@ -385,7 +385,7 @@
385385 templateInfo.templates[""] ? templateInfo.templates[""].options :
386386 templateInfo.options;
387387 if (options.clientRendering)
388- wrapperCode += "var lastCurrentTemplate = fcf.getContext().currentTemplate; fcf.getContext().currentTemplate = { id: undefined };\n";
388+ wrapperCode += "var lastCurrentTemplate = fcf.getContext().currentTemplate; fcf.getContext().currentTemplate = { id: undefined, template: undefined };\n";
389389 wrapperCode += "fcf.NDetails.renderInstructions[\"" + templateBlockPath + "\"]={\n";
390390 wrapperCode += " options: " + JSON.stringify(options) + ",\n";
391391 wrapperCode += "};\n"
diff -r ea8dd79c6e18 -r 235c528242ad fcf.js
--- a/fcf.js Fri Jun 17 23:48:09 2022 +0300
+++ b/fcf.js Sat Jun 18 07:19:37 2022 +0300
@@ -4662,8 +4662,14 @@
46624662 let arg = { "fcf.Arg": true, type: "template", template: a_template, args: a_args };
46634663 if (a_options)
46644664 fcf.append(arg, a_options);
4665- if (arg.type == "template" && fcf.NDetails.currentTemplate && arg.template.charAt(0) == "+")
4666- arg.template = fcf.NDetails.currentTemplate.split("+")[0] + arg.template;
4665+ if (arg.template.charAt(0) == "+"){
4666+ if (fcf.NDetails.currentTemplate){
4667+ arg.template = fcf.NDetails.currentTemplate.split("+")[0] + arg.template;
4668+ } else if (fcf.getContext().currentTemplate && fcf.getContext().currentTemplate.template){
4669+ arg.template = fcf.getContext().currentTemplate.template.split("+")[0] + arg.template;
4670+ }
4671+
4672+ }
46674673 return arg;
46684674 }
46694675
Afficher sur ancien navigateur de dépôt.