Fix #2644 overlapping popup preview image after increasing preview image size (hagalaz)

Fix: Button widget child class static instantiation not working
Fix: ModalButton instatiation and added ModalButton::close()
This commit is contained in:
buddh4 2017-06-28 15:30:07 +02:00
parent ac9a9705b8
commit 1353c263ca
5 changed files with 27 additions and 13 deletions

View File

@ -3,6 +3,9 @@ HumHub Change Log
1.2.2 in developement
- Enh: Allow returning class names beside BasePermission instances in `Module::getPermissions()`
- Enh: Increase profile image size to 800px.
- Fix #2644 overlapping popup preview image after increasing preview image size (hagalaz)
- Fix: Button widget child class static instantiation not working
- Fix: ModalButton instatiation and added ModalButton::close()
1.2.1 (June 17, 2017)
- Fix: Invite error in french language

View File

@ -52,7 +52,7 @@ class Button extends Widget
public static function instance($text = null)
{
return new self(['text' => $text]);
return new static(['text' => $text]);
}
public static function back($url, $text = null)
@ -67,37 +67,37 @@ class Button extends Widget
public static function none($text = null)
{
return new self(['type' => self::TYPE_NONE, 'text' => $text]);
return new static(['type' => self::TYPE_NONE, 'text' => $text]);
}
public static function primary($text = null)
{
return new self(['type' => self::TYPE_PRIMARY, 'text' => $text]);
return new static(['type' => self::TYPE_PRIMARY, 'text' => $text]);
}
public static function defaultType($text = null)
{
return new self(['type' => self::TYPE_DEFAULT, 'text' => $text]);
return new static(['type' => self::TYPE_DEFAULT, 'text' => $text]);
}
public static function info($text = null)
{
return new self(['type' => self::TYPE_INFO, 'text' => $text]);
return new static(['type' => self::TYPE_INFO, 'text' => $text]);
}
public static function warning($text = null)
{
return new self(['type' => self::TYPE_WARNING, 'text' => $text]);
return new static(['type' => self::TYPE_WARNING, 'text' => $text]);
}
public static function success($text = null)
{
return new self(['type' => self::TYPE_SUCCESS, 'text' => $text]);
return new static(['type' => self::TYPE_SUCCESS, 'text' => $text]);
}
public static function danger($text = null)
{
return new self(['type' => self::TYPE_DANGER, 'text' => $text]);
return new static(['type' => self::TYPE_DANGER, 'text' => $text]);
}
public function loader($active = true)

View File

@ -32,17 +32,24 @@ class ModalButton extends Button
{
public function init()
{
$this->actionClick('ui.modal.load');
$this->action('ui.modal.load');
parent::init(); // TODO: Change the autogenerated stub
}
public function load($url)
{
$this->actionClick('ui.modal.load', $url);
$this->action('ui.modal.load', $url);
return $this;
}
public function close()
{
$this->options(['data-modal-close' => '']);
}
public function post($url)
{
$this->actionClick('ui.modal.post', $url);
$this->action('ui.modal.post', $url);
return $this;
}
}

View File

@ -22,8 +22,12 @@
a {
color: @info;
}
img {
max-width: 100%;
}
}
.popover-navigation {
padding: 15px;
}
}
}

File diff suppressed because one or more lines are too long