client/app/components/cron/cronEditor.controller.js
// Each time user change value in expert mode, it calculates the best view
Each time user change value in expert mode, it calculates the best view
Each time user change value in expert mode it calculates the best view
function checkIfExpertInlineView(field) {
      let expertInlineView = true;
      let caretPos;
      angular.forEach($scope.cron.expert, (val) => {
        if (val && val.length > 7) {
          expertInlineView = false;
        }
      });
      $scope.expertInlineView = expertInlineView;
      if (
        angular.element(`#currentAction .cron_${field}:visible`)
        && angular.element(`#currentAction .cron_${field}:visible`).length
      ) {
        caretPos = getCaretPosition(angular.element(`#currentAction .cron_${field}:visible`)[0]);
        $timeout(() => {
          setCaretPosition(
            angular.element(`#currentAction .cron_${field}:visible`)[0],
            caretPos,
          );
        }, 42);
      }
    }
function checkIfExpertInlineView ( field ) { let expertInlineView = true ; let caretPos ; angular . forEach ( $scope . cron . expert , ( val ) => { if ( val && val . length > 7 ) { expertInlineView = false ; } } ) ; $scope . expertInlineView = expertInlineView ; if ( angular . element ( ` ${ field } ` ) && angular . element ( ` ${ field } ` ) . length ) { caretPos = getCaretPosition ( angular . element ( ` ${ field } ` ) [ 0 ] ) ; $timeout ( ( ) => { setCaretPosition ( angular . element ( ` ${ field } ` ) [ 0 ] , caretPos , ) ; } , 42 ) ; } }
Each time user change value in expert mode, it calculates the best view
Each time user change value in expert mode it calculates the best view