diff --git a/src/vitis/client/javascript/externs/formReader/formReaderDrtv.js b/src/vitis/client/javascript/externs/formReader/formReaderDrtv.js index 8bfa3d57fc4fdb53f6c9dad257cfbca34eed7c4c..b1d3ba9bc5d670cda51c35656f8dac26274c36a1 100644 --- a/src/vitis/client/javascript/externs/formReader/formReaderDrtv.js +++ b/src/vitis/client/javascript/externs/formReader/formReaderDrtv.js @@ -425,9 +425,9 @@ formReader.formReaderDirective = function ($q, formReaderService, propertiesSrvc } catch (e) { isVisible = false; } - } else if(formReaderService["isCustomTernaryString"](oField["visible"])) { + } else if(formReaderService["isCustomTernaryString"](oField["visible"], true)) { try { - isVisible = scope.$eval(formReaderService["translateCustomTernaryString"](oField["visible"], scope['oFormValues'], scope['sFormDefinitionName'])); + isVisible = scope.$eval(formReaderService["translateCustomTernaryString"](oField["visible"], true, scope['oFormValues'], scope['sFormDefinitionName'])); } catch (e) { isVisible = false; } @@ -486,6 +486,73 @@ formReader.formReaderDirective = function ($q, formReaderService, propertiesSrvc } }; + /** + * Set the filed value using dynamic_value + * + * @param {object} oField + */ + scope['setDynamicValue'] = function (oField) { + + var value = formReaderService['getFormValue'](oField['name']); + + if(formReaderService["isCustomTernaryString"](oField["dynamic_value"], false)) { + try { + value = scope.$eval(formReaderService["translateCustomTernaryString"](oField["dynamic_value"], false, scope['oFormValues'], scope['sFormDefinitionName'])); + formReaderService['setFormValue'](oField['name'], value, scope['oFormValues'], scope['sFormDefinitionName']); + } catch (e) { + console.error('error with ternary : ' + oField["dynamic_value"]); + } + } + } + /** + * Ajoute des watchers pour déclencher les dynamic values + * + */ + scope['setFormDynamicValues'] = function () { + + var aAttrs; + var oFormDefinition = scope['oFormDefinition']; + var sFormDefinitionName = scope['sFormDefinitionName']; + + // Nettoyage automatique des watchers + if (goog.isArray(this.dynamicWatchers_)) { + for (var i = this.dynamicWatchers_.length - 1; i >= 0; i--) { + this.dynamicWatchers_[i](); + this.dynamicWatchers_.pop(); + } + } else { + this.dynamicWatchers_ = []; + } + + if (goog.isDefAndNotNull(oFormDefinition)) { + if (goog.isDefAndNotNull(oFormDefinition[sFormDefinitionName])) { + + var aFormElementDefinitions = formReaderService['getAllFormElementDefinition'](sFormDefinitionName, oFormDefinition) + + for (var i = 0; i < aFormElementDefinitions.length; i++) { + if (goog.isDefAndNotNull(aFormElementDefinitions[i]['dynamic_value'])) { + + // Ajoute les watchers sur les champs présents dans l'expression dynamic_value + if(formReaderService["isCustomTernaryString"](aFormElementDefinitions[i]["dynamic_value"], false)) { + aAttrs = formReaderService['getCustomTernaryStringAttrs'](aFormElementDefinitions[i]["dynamic_value"]); + + for (var ii = 0; ii < aAttrs.length; ii++) { + if (goog.isDefAndNotNull(aAttrs[ii][1])) { + + this.dynamicWatchers_.push(scope.$watch('oFormValues[sFormDefinitionName].' + aAttrs[ii][1], angular.bind(this, function(oField, newVal, oldVal, scope){ + + // Set la nouvelle valeur + this['setDynamicValue'](oField); + }, angular.copy(aFormElementDefinitions[i])), true)); + } + } + } + } + } + } + } + } + /** * Determine if the button has to be present * @param {object} oButton @@ -654,8 +721,12 @@ formReader.formReaderDirective = function ($q, formReaderService, propertiesSrvc // Lors du chargement du formulaire scope.$on('loadForm', function () { + // Vide les file inputs scope['resetFileInputs'](); + + // Trigger dynamic values + scope['setFormDynamicValues'](); }); } }; diff --git a/src/vitis/client/javascript/externs/formReader/formReaderSrvc.js b/src/vitis/client/javascript/externs/formReader/formReaderSrvc.js index f3baa43a1fde7180abd8099aeeee8cc80fccfaaf..c4dfddeb1f64979e0a7e8cd0529c290ab78eab81 100644 --- a/src/vitis/client/javascript/externs/formReader/formReaderSrvc.js +++ b/src/vitis/client/javascript/externs/formReader/formReaderSrvc.js @@ -686,16 +686,16 @@ formReader.formReaderService = function ($translate, $rootScope, $q, $log, $time * La chaine de caractère passée est une expression ternaire définie par l'administrateur * ex : "= {{puissance}} == 500" * @param {string} sString Chaine de caractère. + * @param {boolean} bIsCondition Trus si il s'agis d'une condition true/false * @return {boolean} */ - "isCustomTernaryString": function (sString) { - if (goog.isDefAndNotNull(this['translateCustomTernaryString'](sString))) { + "isCustomTernaryString": function (sString, bIsCondition) { + if (goog.isDefAndNotNull(this['translateCustomTernaryString'](sString, bIsCondition))) { return true; } else { return false; } }, - /** * translateCustomTernaryString function * Traduit une chaine ternaire customisée par une chaine ternaire exploitable @@ -705,7 +705,7 @@ formReader.formReaderService = function ($translate, $rootScope, $q, $log, $time * @param {string} sFormDefinitionName * @return {string} */ - "translateCustomTernaryString": function (sString, oFormValues, sFormDefinitionName) { + "translateCustomTernaryString": function (sString, bIsCondition, oFormValues, sFormDefinitionName) { // Verif type if (!goog.isString(sString)) { @@ -717,20 +717,11 @@ formReader.formReaderService = function ($translate, $rootScope, $q, $log, $time return null; } - if (!goog.isDefAndNotNull(RegExp('==').exec(sString))) { - return null; - } - // Enlève le premier signe "=" sString = sString.substr(1); // Cherche les attributs - var aAttrs = []; - var attrRegex = RegExp('{{(\\w*?)}}','g'); - var attrRegexResult; - while ((attrRegexResult = attrRegex.exec(sString)) !== null) { - aAttrs.push(attrRegexResult); - } + var aAttrs = this['getCustomTernaryStringAttrs'](sString); // Remplace les attributs var sReplacer; @@ -748,9 +739,6 @@ formReader.formReaderService = function ($translate, $rootScope, $q, $log, $time if (goog.isDefAndNotNull(oFormValues[sFormDefinitionName][aAttrs[i][1]]['selectedOption']['value'])) { sReplacer = 'oFormValues[sFormDefinitionName].' + aAttrs[i][1] + '.selectedOption.value'; } - $log.log(aAttrs[i][0] + ': ' + oFormValues[sFormDefinitionName][aAttrs[i][1]]['selectedOption']['value']); - } else { - $log.log(aAttrs[i][0] + ': ' + oFormValues[sFormDefinitionName][aAttrs[i][1]]); } } } @@ -762,10 +750,30 @@ formReader.formReaderService = function ($translate, $rootScope, $q, $log, $time } // Ajoute le retour true/false - sString = sString + ' ? true : false'; + if (bIsCondition) { + sString = sString + ' ? true : false'; + } return sString; }, + /** + * Cherche les attributs dans l'expression ternaire + * + * @param {string} sString + * @return {array} + */ + "getCustomTernaryStringAttrs": function (sString) { + + // Cherche les attributs + var aAttrs = []; + var attrRegex = RegExp('{{(\\w*?)}}','g'); + var attrRegexResult; + while ((attrRegexResult = attrRegex.exec(sString)) !== null) { + aAttrs.push(attrRegexResult); + } + + return aAttrs; + }, /** * selectFirstOption function. * Sélectionne la 1ere option d'un <select>. @@ -1267,7 +1275,6 @@ formReader.formReaderService = function ($translate, $rootScope, $q, $log, $time * @returns {string} */ "getFormValue": function (sName) { - $log.info("getFormValue"); if (!goog.isString(sName)) { return null; @@ -1283,14 +1290,56 @@ formReader.formReaderService = function ($translate, $rootScope, $q, $log, $time var sValue = oFormValues[sName.trim()]; - if (goog.isDefAndNotNull(sValue['selectedOption'])) { - if (goog.isDefAndNotNull(sValue['selectedOption']['value'])) { - sValue = sValue['selectedOption']['value']; + if (goog.isDefAndNotNull(sValue)) { + if (goog.isDefAndNotNull(sValue['selectedOption'])) { + if (goog.isDefAndNotNull(sValue['selectedOption']['value'])) { + sValue = sValue['selectedOption']['value']; + } } } return sValue; + }, + /** + * Set a form value + * @param {string} sName + * @param {string} sValue + * @returns {string} + */ + "setFormValue": function (sName, sValue, oFormValues, sFormDefinitionName) { + + if (!goog.isString(sName)) { + return null; + } + + sName = sName.trim(); + + oFormValues = goog.isDefAndNotNull(oFormValues) ? oFormValues : this['oFormValues']; + sFormDefinitionName = goog.isDefAndNotNull(sFormDefinitionName) ? sFormDefinitionName : this['sFormDefinitionName']; + + var oFormValues = oFormValues[sFormDefinitionName]; + + if (!goog.isDefAndNotNull(oFormValues)) { + console.error('oFormValues.sFormDefinitionName not defined'); + return null; + } + + var bIsList = false; + if (goog.isDefAndNotNull(oFormValues[sName])) { + if (goog.isDefAndNotNull(oFormValues[sName]['selectedOption'])) { + if (goog.isDefAndNotNull(oFormValues[sName]['selectedOption']['value'])) { + bIsList = true; + } + } + } + + if (bIsList) { + oFormValues[sName]['selectedOption']['value'] = sValue; + } else { + oFormValues[sName] = sValue; + } + return true; }, /** * Concats all the arguments passed diff --git a/src/vitis/client/javascript/externs/studio/javascript/app/ElementForm.js b/src/vitis/client/javascript/externs/studio/javascript/app/ElementForm.js index a6a52ba36adeb6405f481364443e285296c6d258..c5e29d59626d66e5fcb35470c481eedc6e022651 100755 --- a/src/vitis/client/javascript/externs/studio/javascript/app/ElementForm.js +++ b/src/vitis/client/javascript/externs/studio/javascript/app/ElementForm.js @@ -284,7 +284,7 @@ nsVFB.ElementForm.prototype.helperDirective = function () { $(element)["popover"]({ "trigger": "hover", "container": "body", - "title": "HelperBox", + "title": "Aide", "content": function () { return attrs.text; } diff --git a/src/vitis/client/javascript/externs/studio/javascript/app/VisualizerMode/FormMode.js b/src/vitis/client/javascript/externs/studio/javascript/app/VisualizerMode/FormMode.js index 5c898e9ae8014f0987e471b87b0de7bb694f21c3..86872e18c1b4e658d1b5f6c10839cd58df6e80d5 100755 --- a/src/vitis/client/javascript/externs/studio/javascript/app/VisualizerMode/FormMode.js +++ b/src/vitis/client/javascript/externs/studio/javascript/app/VisualizerMode/FormMode.js @@ -129,9 +129,8 @@ nsVFB.nsVisualizerMode.FormMode.prototype.visualizerFormModeController = functio } } - /** - * !Important! utilisation d'un pointeur permet que les changements + * !Important! utilisation d'un pointeur permet que les changements * de oFormDefinition affecteront getJsonOutput */ $scope['oFormDefinition'] = data; @@ -148,6 +147,7 @@ nsVFB.nsVisualizerMode.FormMode.prototype.visualizerFormModeController = functio // Refresh le formReader angular.element($('#studio_form_reader').children()).scope()['ctrl'].refreshForm(); + angular.element($('#studio_form_reader').children()).scope().$broadcast('loadForm'); } else { oVFB.log('visualizerFormModeController. Load JSON form fail: ' + $scope['selected_form_type'] + ' undefined in ', data); @@ -268,8 +268,8 @@ nsVFB.nsVisualizerMode.FormMode.prototype.visualizerFormModeController.prototype }; /** - * Recusive function that remove the selected elements: - * if sFormDefinitionName is not defined the function will remove from all the names + * Recusive function that remove the selected elements: + * if sFormDefinitionName is not defined the function will remove from all the names * if aRows is not defined the function will remove from $scope['oFormDefinition'] and oVFB.getJsonOutput() * @param {string|undefined} sFormDefinitionName * @export @@ -305,7 +305,7 @@ nsVFB.nsVisualizerMode.FormMode.prototype.visualizerFormModeController.prototype }; /** - * Remove the selected and hovered elements from sFormDefinitionName, + * Remove the selected and hovered elements from sFormDefinitionName, * if sFormDefinitionName is not defined the function will remove from all the names in $scope['oFormDefinition'] * @param {string|undefined} sFormDefinitionName * @export @@ -338,8 +338,8 @@ nsVFB.nsVisualizerMode.FormMode.prototype.visualizerFormModeController.prototype }; /** - * Recusive function that remove the selected and hovered elements: - * if sFormDefinitionName is not defined the function will remove from all the names + * Recusive function that remove the selected and hovered elements: + * if sFormDefinitionName is not defined the function will remove from all the names * if aRows is not defined the function will remove from $scope['oFormDefinition'] and oVFB.getJsonOutput() * @param {string|undefined} sFormDefinitionName * @export diff --git a/src/vitis/client/javascript/externs/studio/lang/lang-en.json b/src/vitis/client/javascript/externs/studio/lang/lang-en.json index ca2c8719f889d84db5deb53cf801a99adaa8a05b..dc673374030c00a3dd49a37bd8677dd2b4d05e4f 100755 --- a/src/vitis/client/javascript/externs/studio/lang/lang-en.json +++ b/src/vitis/client/javascript/externs/studio/lang/lang-en.json @@ -155,10 +155,13 @@ "Height": "Height :", "Required": "Required", "displayOnly": "Display only", + "Default": "Default", "DefaultValue": "Default value", + "DynamicOptions": "Dynamic options", "Value": "Value", + "ValueHelp": "Use a complex expression to link this field value with an other field value ex : \"= int({{puissance}}) + int({{portee}})\"", "Visible": "Visible", - "VisibleHelp": "Utilisez le gestionnaire de sources de données (bouton en bas à droite) pour ajouter ou modifier une source données" + "VisibleHelp": "Use a complex expression to show/hide this field from others field values ex : \"= {{id_com}} == 75000\", ex : \"= int({{puissance}}) + int({{portee}}) == 1000\"" }, "BusinessObject": { "BusinessObject": "Business object", diff --git a/src/vitis/client/javascript/externs/studio/lang/lang-fr.json b/src/vitis/client/javascript/externs/studio/lang/lang-fr.json index ae9fd62b4e586cd3b7ccd7a6cc3cf5416949567d..3527a5d149be9cbc62c82ede5db623f1aa4aec4d 100755 --- a/src/vitis/client/javascript/externs/studio/lang/lang-fr.json +++ b/src/vitis/client/javascript/externs/studio/lang/lang-fr.json @@ -161,10 +161,13 @@ "Height": "Hauteur :", "Required": "Requis", "displayOnly": "Uniquement en consultation", + "Default": "Défaut", "DefaultValue": "Valeur par défaut", + "DynamicOptions": "Options dynamiques", "Value": "Valeur", + "ValueHelp": "Pour mettre à jour la valeur d'un champ en fonction d'un autre, utilisez une expression complexe utilisant les valeurs du formulaire ex : \"= int({{puissance}}) + int({{portee}})\"", "Visible": "Visible", - "VisibleHelp": "Pour afficher/cacher le champ utilisez true/false ou une expression complexe utilisant les valeurs du formulaire ex : \"= {{id_com}} == 75000\", ex : \"= int({{puissance}}) + int({{portee}}) == 1000\"" + "VisibleHelp": "Pour afficher/cacher le champ en fonction d'un autre, utilisez une expression complexe utilisant les valeurs du formulaire ex : \"= {{id_com}} == 75000\", ex : \"= int({{puissance}}) + int({{portee}}) == 1000\"" }, "BusinessObject": { "BusinessObject": "Objet métier", diff --git a/src/vitis/client/javascript/externs/studio/templates/ElementForm.html b/src/vitis/client/javascript/externs/studio/templates/ElementForm.html index f1b2cff9fbd997cbec3c37d8323ca9e5553aec30..05698ebca5c59b75a0341f5788d648db36c6f634 100755 --- a/src/vitis/client/javascript/externs/studio/templates/ElementForm.html +++ b/src/vitis/client/javascript/externs/studio/templates/ElementForm.html @@ -75,7 +75,7 @@ <input ng-disabled="locker" ng-model="model.name" id="Element_Form_name_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Label.Name_PH}}" aria-describedby="Element_Form_name_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <textarea ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label" rows="3"></textarea> </div> <div id="div_slider_Form"> @@ -115,7 +115,7 @@ <input ng-disabled="locker" ng-model="model.name" id="Element_Form_name_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Radio.Name_PH}}" aria-describedby="Element_Form_name_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <select ng-disabled="locker" ng-model="model.default_value" ng-change="model.default_value = model.default_value === 'true' ? true : model.default_value === 'false' ? false : model.default_value" @@ -167,7 +167,7 @@ <input ng-disabled="locker" ng-model="model.name" id="Element_Form_name_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.TextArea.Name_PH}}" aria-describedby="Element_Form_name_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <textarea ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label" rows="3"></textarea> </div> <div id="div_slider_Form"> @@ -387,7 +387,7 @@ <input ng-disabled="locker" ng-model="model.name" id="Element_Form_name_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Select.Name_PH}}" aria-describedby="Element_Form_name_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <!--Source de donnees--> @@ -796,7 +796,7 @@ <input ng-disabled="locker" ng-model="model.name" id="Element_Form_name_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Date.Name_PH}}" aria-describedby="Element_Form_name_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <div id="div_slider_Form"> @@ -819,7 +819,7 @@ <input ng-disabled="locker" ng-model="model.name" id="Element_Form_name_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Date.Name_PH}}" aria-describedby="Element_Form_name_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <div id="div_slider_Form"> @@ -895,7 +895,7 @@ <input ng-disabled="locker" ng-model="model.nb_rows" id="Element_Form_rows_input" type="number" min="0" class="form-control" placeholder="{{::ctrl.text.Component.TinyMce.Row_PH}}" aria-describedby="Element_Form_rows_label"> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <textarea ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label" rows="3"></textarea> </div> <div class="checkbox checkbox_margin"> @@ -915,7 +915,7 @@ <input ng-disabled="locker" ng-model="model.name" id="Element_Form_name_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.ColorPicker.Name_PH}}" aria-describedby="Element_Form_name_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <div id="div_slider_Form"> @@ -935,7 +935,7 @@ <input ng-disabled="locker" ng-model="model.name" id="Element_Form_name_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Hidden.Name_PH}}" aria-describedby="Element_Form_name_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <textarea ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label" rows="3"></textarea> </div> </div> @@ -964,7 +964,7 @@ <input ng-disabled="locker" ng-model="model.options.precision" id="Element_Form_prec_input" type="number" min="0" class="form-control" placeholder="{{::ctrl.text.Component.Slider.Precision_PH}}" aria-describedby="Element_Form_prec_label"> </div>--> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="number" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <div id="div_slider_Form"> @@ -988,7 +988,7 @@ <input ng-disabled="locker" ng-model="model.pattern" id="Element_Form_label_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Text.Pattern_PH}}" aria-describedby="Element_Form_pattern_label"> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <textarea ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label" rows="3"></textarea> </div> <div id="div_slider_Form"> @@ -1016,7 +1016,7 @@ <input ng-disabled="locker" ng-model="model.pattern" id="Element_Form_label_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Password.Pattern_PH}}" aria-describedby="Element_Form_pattern_label"> </div> <!--<div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label"></input> </div>--> <div id="div_slider_Form"> @@ -1044,7 +1044,7 @@ <input ng-disabled="locker" ng-model="model.pattern" id="Element_Form_label_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.URL.Pattern_PH}}" aria-describedby="Element_Form_pattern_label"> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <div id="div_slider_Form"> @@ -1072,7 +1072,7 @@ <input ng-disabled="locker" ng-model="model.pattern" id="Element_Form_label_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.URL.Pattern_PH}}" aria-describedby="Element_Form_pattern_label"> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <div id="div_slider_Form"> @@ -1225,7 +1225,7 @@ </div>--> <hr> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <textarea ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label" rows="5"></textarea> </div> </div> @@ -1385,7 +1385,7 @@ </div>--> <hr> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <textarea ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label" rows="5"></textarea> </div> </div> @@ -1477,7 +1477,7 @@ </div>--> <hr> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <textarea ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label" rows="5"></textarea> </div> </div> @@ -1544,7 +1544,7 @@ <input ng-disabled="locker" ng-model="model.max" id="Element_Form_max_input" type="number" min="0" class="form-control" placeholder="{{::ctrl.text.Component.Number.Maximum_PH}}" aria-describedby="Element_Form_max_label"> </div>--> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="number" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <div class="checkbox checkbox_margin"> @@ -1572,7 +1572,7 @@ <input ng-disabled="locker" ng-model="model.max" id="Element_Form_max_input" type="number" min="0" class="form-control" placeholder="{{::ctrl.text.Component.Number.Maximum_PH}}" aria-describedby="Element_Form_max_label"> </div>--> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="number" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <div class="checkbox checkbox_margin"> @@ -1627,7 +1627,7 @@ <input ng-disabled="locker" ng-model="model.name" id="Element_Form_name_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Number.Name_PH}}" aria-describedby="Element_Form_name_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> <div id="div_slider_Form"> @@ -1708,7 +1708,7 @@ <input ng-disabled="locker" ng-model="model.target" id="Element_Form_target_input" type="text" class="form-control" placeholder="{{::ctrl.text.Component.Link.Target_PH}}" aria-describedby="Element_Form_target_label" required> </div> <div class="input-group element-margin input-group-xs"> - <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Value}}</span> + <span class="input-group-addon" id="Element_Form_value_label">{{::ctrl.text.Component.General.Default}}</span> <input ng-disabled="locker" ng-model="model.default_value" id="Element_Form_value_input" type="text" class="form-control" aria-describedby="Element_Form_value_label"></input> </div> </div> @@ -2178,19 +2178,40 @@ <!-- Default --> <div ng-switch-default> </div> - <!-- Champ visible --> - <div> - <div ng-if="model.type != 'undefined'" class="input-group element-margin input-group-xs"> + + <!-- Options avancées --> + <div ng-if="model.type != 'undefined'"> + <label>{{::ctrl.text.Component.General.DynamicOptions}}</label> + <!-- Valeur --> + <div ng-if="model.type != 'file_wsdata' && + model.type != 'image_wsdata' && + model.type != 'bo_grid' && + model.type != 'section_grid' && + model.type != 'button' && + model.type != 'hr'" + class="input-group element-margin input-group-xs"> + <span id="Element_Form_dynamic_value_label" class="input-group-addon">{{::ctrl.text.Component.General.Value}}</span> + <input ng-disabled="locker" + ng-model="model.dynamic_value" + id="Element_Form_value_input" + type="text" + class="form-control" + aria-describedby="Element_Form_dynamic_value_label" + data-app-helper-icon + data-text="{{::ctrl.text.Component.General.ValueHelp}}"> + </div> + <!-- Champ visible --> + <div ng-if="model.type != 'hidden'" + class="input-group element-margin input-group-xs"> <span id="Element_Form_visible_label" class="input-group-addon">{{::ctrl.text.Component.General.Visible}}</span> - <textarea ng-disabled="locker" + <input ng-disabled="locker" ng-model="model.visible" id="Element_Form_visible_input" type="text" class="form-control" aria-describedby="Element_Form_visible_label" data-app-helper-icon - data-text="{{::ctrl.text.Component.General.VisibleHelp}}" - rows="3"></textarea> + data-text="{{::ctrl.text.Component.General.VisibleHelp}}"> </div> </div> </div>