Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Aug 31, 2022
1 parent 04e510d commit c051760
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
14 changes: 7 additions & 7 deletions wfc/ui/vuetify/CRUDList.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace wfc\ui\vuetify;

use webfiori\ui\HTMLNode;
use wfc\ui\vuetify\Dialog;
use wfc\ui\vuetify\VDialog;
use webfiori\framework\exceptions\UIException;
use wfc\ui\vuetify\VBtn;
/**
Expand All @@ -16,12 +16,12 @@ class CRUDList extends HTMLNode {
private $vlist;
/**
*
* @var Dialog
* @var VDialog
*/
private $addEditDialog;
/**
*
* @var Dialog
* @var VDialog
*/
private $confirmDeleteDialog;
/**
Expand Down Expand Up @@ -98,11 +98,11 @@ public function __construct($props) {
if (!isset($props['dialog'])) {
throw new UIException('The add/edit dialog model is missing.');
}
$this->addEditDialog = new Dialog($props['dialog'], true);
$this->addEditDialog = new VDialog($props['dialog'], true);
if (!isset($props['confirm-delete-dialog'])) {
throw new UIException('The "confirm-delete-dialog" model is missing.');
}
$this->confirmDeleteDialog = new Dialog($props['confirm-delete-dialog'], true);
$this->confirmDeleteDialog = new VDialog($props['confirm-delete-dialog'], true);
$this->addChild($this->confirmDeleteDialog);
$deleteText = isset($props['delete-prompt']) ? $props['delete-prompt'] : 'Are you sure that you would like to remove the item?';
$this->getConfirmDeleteDialog()->addToBody('v-card-text', [
Expand Down Expand Up @@ -347,15 +347,15 @@ public function addCol($colProps = ['cols' => 12, 'sm' => 12]) {
/**
* Returns the dialog which is used as add/edit dialog.
*
* @return Dialog
* @return VDialog
*/
public function getDialog() {
return $this->addEditDialog;
}
/**
* Returns the dialog which is used as confirm delete dialog.
*
* @return Dialog
* @return VDialog
*/
public function getConfirmDeleteDialog() {
return $this->confirmDeleteDialog;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
namespace wfc\ui\vuetify;

use wfc\ui\vuetify\Dialog;
use wfc\ui\vuetify\VDialog;
use wfc\ui\vuetify\VBtn;
/**
* A simple dialog for showing basic system messages with a close button.
*
* @author Ibrahim
*/
class SimpleMessageDialog extends Dialog {
class MessageDialog extends VDialog {
private $closeBtn;
/**
* Creates new instance of the class.
Expand Down
1 change: 0 additions & 1 deletion wfc/ui/vuetify/VBtn.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public function __construct($props = []) {
public function setIcon($mdiIcon, array $iconProps = []) {
if ($this->iconNode === null) {
$this->iconNode = $this->addChild('v-icon');
$this->setAttribute('icon');
}
if ($this->iconNode->childrenCount() != 1) {
$this->iconNode->text('');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author Ibrahim
*/
class DataTable extends HTMLNode {
class VDataTable extends HTMLNode {

private $pageSizeSelect;
private $footer;
Expand Down
2 changes: 1 addition & 1 deletion wfc/ui/vuetify/Dialog.php → wfc/ui/vuetify/VDialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author Ibrahim
*/
class Dialog extends HTMLNode {
class VDialog extends HTMLNode {
private $vCard;
private $vToolbar;
private $model;
Expand Down
2 changes: 1 addition & 1 deletion wfc/ui/vuetify/Tooltip.php → wfc/ui/vuetify/VTooltip.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author Ibrahim
*/
class Tooltip extends HTMLNode {
class VTooltip extends HTMLNode {
private $contentArea;
/**
* Creates new instance of the class.
Expand Down
4 changes: 2 additions & 2 deletions wfc/ui/vuetify/ViewFileDialog.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace wfc\ui\vuetify;

use wfc\ui\vuetify\Dialog;
use wfc\ui\vuetify\VDialog;
use wfc\ui\vuetify\VBtn;
/**
* A simple dialog which can be used to display a file in the same page as pop-up.
*
* @author Ibrahim
*/
class ViewFileDialog extends Dialog {
class ViewFileDialog extends VDialog {
/**
*
* @param string $model The name of the object that will
Expand Down

0 comments on commit c051760

Please sign in to comment.