Beispiel #1
0
 /**
  * Get a list of JavaScript files required to display the widget properly
  *
  * @return array
  */
 public function getJSFiles()
 {
     $list = parent::getJSFiles();
     $list[] = 'button/js/remove.js';
     return $list;
 }
Beispiel #2
0
 /**
  * Return CSS files list
  *
  * @return array
  */
 public function getCSSFiles()
 {
     $list = parent::getCSSFiles();
     $list[] = 'button/css/print_invoice.css';
     return $list;
 }
Beispiel #3
0
 /**
  * Get attributes
  *
  * @return array
  */
 protected function getAttributes()
 {
     $list = parent::getAttributes();
     return array_merge($list, $this->getLinkAttributes());
 }
Beispiel #4
0
 /**
  * Get class
  *
  * @return string
  */
 protected function getClass()
 {
     return parent::getClass() . ' progress-state' . ' ' . $this->getParam(static::PARAM_STATE);
 }
Beispiel #5
0
 /**
  * Define widget params
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams += array(static::PARAM_PARCEL_ID => new \XLite\Model\WidgetParam\Int('Parcel ID', 0));
 }
Beispiel #6
0
 /**
  * Defines CSS class for widget to use in templates
  *
  * @return string
  */
 protected function getClass()
 {
     return parent::getClass() . ' popup-button';
 }
Beispiel #7
0
 /**
  * Defines CSS class for widget to use in templates
  *
  * @return string
  */
 protected function getClass()
 {
     return parent::getClass() . $this->getSubmitClass();
 }
Beispiel #8
0
 /**
  * Define widget parameters
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams += array(self::PARAM_LOCATION => new \XLite\Model\WidgetParam\String('Redirect to', null, true), self::PARAM_JS_CODE => new \XLite\Model\WidgetParam\String('JS code', null, true), self::PARAM_BLANK => new \XLite\Model\WidgetParam\Bool('Open in new window', false));
 }
Beispiel #9
0
 /**
  * Return CSS files list
  *
  * @return array
  */
 public function getCSSFiles()
 {
     $list = parent::getCSSFiles();
     $list[] = 'button/css/dropdown.css';
     return $list;
 }
 /**
  * Return JS files for the widget
  * 
  * @return array
  */
 public function getJSFiles()
 {
     $list = parent::getJSFiles();
     $list[] = 'modules_manager/js/install_modules_selected.js';
     return $list;
 }
Beispiel #11
0
 /**
  * Define widget parameters
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams += array(self::PARAM_ENABLED => new \XLite\Model\WidgetParam\Bool('Enabled', true));
 }
Beispiel #12
0
 /**
  * Define widget parameters
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams[self::PARAM_LABEL]->setValue('Remove');
 }
Beispiel #13
0
 /**
  * Define widget parameters
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams += array(self::PARAM_ACTION => new \XLite\Model\WidgetParam\String('LC action', $this->getDefaultAction(), true), self::PARAM_JS_CODE => new \XLite\Model\WidgetParam\String('JS code', '', true), self::PARAM_FORM_PARAMS => new \XLite\Model\WidgetParam\Collection('Form params to modify', array(), true));
 }
Beispiel #14
0
 /**
  * Return button CSS class
  *
  * @return string
  */
 protected function getClass()
 {
     return parent::getClass() . ' purchase-module';
 }
Beispiel #15
0
 /**
  * Define widget params
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams += array(self::PARAM_FIRST => new \XLite\Model\WidgetParam\String('First callback', ''), self::PARAM_SECOND => new \XLite\Model\WidgetParam\String('Second callback', ''));
 }
Beispiel #16
0
 /**
  * Get attributes
  *
  * @return array
  */
 protected function getAttributes()
 {
     $list = parent::getAttributes();
     $list['onclick'] = 'javascript: ' . $this->getJSCode();
     return $list;
 }
Beispiel #17
0
 /**
  * Get default attributes
  *
  * @return array
  */
 protected function getButtonAttributes()
 {
     return parent::getButtonAttributes() + array('data-clipboard-text' => $this->getCopyURL());
 }
Beispiel #18
0
 /**
  * Define widget params
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams += array(self::PARAM_ORDER_ID => new \XLite\Model\WidgetParam\Int('OrderID', null));
 }