%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/cwg/wp-content/plugins/addthis/frontend/src/directives/
Upload File :
Create Path :
Current File : //var/www/cwg/wp-content/plugins/addthis/frontend/src/directives/validateProFieldUseDrct.js

appAddThisWordPress.directive('validateProFieldUse', function() {
  return {
    require: 'ngModel',
    transclude: true,
    link: function(scope, elm, attrs, ctrl) {
      // this directive manipulates its parent's scope and is only meant be used
      // inside of the toolGallerySettingsPage directive
      ctrl.$validators.addThisProField = function(modelValue) {
        var isProValue = true;

        if (typeof modelValue === 'undefined') {
          isProValue = false;
        } else if ((typeof attrs.basicValue !== 'undefined') &&
          modelValue === attrs.basicValue
        ) {
          isProValue = false;
        } else if ((typeof attrs.basicValue === 'undefined') &&
          (modelValue === '' || modelValue === false)
        ) {
          isProValue = false;
        }

        if (typeof scope.proFields === 'object') {
          scope.proFields[ctrl.$name] = isProValue;
        }

        return isProValue;
      };
    }
  };
});

Zerion Mini Shell 1.0