API Docs for: 1.0.0
Show:

File: Resources/public/js/views/fields/ez-float-view.js

  1. /*
  2. * Copyright (C) eZ Systems AS. All rights reserved.
  3. * For full copyright and license information view LICENSE file distributed with this source code.
  4. */
  5. YUI.add('ez-float-view', function (Y) {
  6. "use strict";
  7. /**
  8. * Provides the Float field view
  9. *
  10. * @module ez-float-view
  11. */
  12. Y.namespace('eZ');
  13.  
  14. /**
  15. * The Float field view
  16. *
  17. * @namespace eZ
  18. * @class FloatView
  19. * @constructor
  20. * @extends eZ.FieldView
  21. */
  22. Y.eZ.FloatView = Y.Base.create('floatView', Y.eZ.FieldView, [], {
  23. _isFieldEmpty: function () {
  24. return (this.get('field').fieldValue === null);
  25. },
  26.  
  27. /**
  28. * Overrides the name to use the generic field view template
  29. *
  30. * @method _getName
  31. * @protected
  32. * @return String
  33. */
  34. _getName: function () {
  35. return Y.eZ.FieldView.NAME;
  36. },
  37. });
  38.  
  39. Y.eZ.FieldView.registerFieldView('ezfloat', Y.eZ.FloatView);
  40. });
  41.