Sortable.php 815 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. *
  4. * PHP Pro Bid $Id$ tl6Fq6ikhVRRBj8x5MQI+9dtUj4sc2C6/Z/a0oTGE5U=
  5. *
  6. * @link http://www.phpprobid.com
  7. * @copyright Copyright (c) 2015 Online Ventures Software & CodeCube SRL
  8. * @license http://www.phpprobid.com/license Commercial License
  9. *
  10. * @version 7.5
  11. */
  12. namespace Ppb\Form\Element\MultiUpload;
  13. use Ppb\Form\Element\MultiUpload as MultiUploadElement;
  14. class Sortable extends MultiUploadElement
  15. {
  16. /**
  17. *
  18. * class constructor
  19. *
  20. * @param string $name
  21. */
  22. public function __construct($name)
  23. {
  24. parent::__construct($name);
  25. $this->_thumbDivId = $name . 'Sortable';
  26. $this->setBodyCode('<script type="text/javascript">
  27. $("#' . $this->_thumbDivId . '").sortable();
  28. </script>');
  29. }
  30. }