Skip to content

Commit 7acb0c8

Browse files
author
hikki
committed
7.1
1 parent c1b317f commit 7acb0c8

File tree

6 files changed

+29
-6
lines changed

6 files changed

+29
-6
lines changed

resources/assets/component.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@
399399
border-bottom: 1px solid #505050;
400400
border-radius: 3px 3px 0 0;
401401
height: 24px!important;
402+
color: white!important;
402403
}
403404
.plane-header .header-content{
404405
margin-right: auto;

src/DLPServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public function boot(DLP $extension)
2929
}
3030

3131
Admin::booting(function () {
32-
Admin::css('vendor/dlp/component.min.css?v7.0');
33-
Admin::headerJs('vendor/dlp/component.min.js?v7.0');
32+
Admin::css('vendor/dlp/component.min.css?v7.1');
33+
Admin::headerJs('vendor/dlp/component.min.js?v7.1');
3434
});
3535
}
3636
}

src/Layer/Dialog.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Dialog
99
private $information;
1010
private $options = ['width' => '420px', 'height' => '93px', 'f' => false];
1111
private $xhr = ['url' => '', 'method' => 'POST'];
12+
private $title = '';
1213

1314
public function __construct(array $xhr = ['url' => '', 'method' => 'POST'])
1415
{
@@ -80,6 +81,16 @@ public function button($title, $params = [], $callback = 'function(response){if(
8081
return $this;
8182
}
8283

84+
/**
85+
* @param string $title
86+
* @return $this
87+
*/
88+
public function setTitle($title)
89+
{
90+
$this->title = ".setTitle('$title')";
91+
return $this;
92+
}
93+
8394
public function __toString()
8495
{
8596
$this->options = json_encode($this->options);
@@ -97,7 +108,7 @@ public function __toString()
97108
{$this->button}
98109
dialog.append(operates);
99110
return dialog;
100-
}(),$this->options).make();
111+
}(),$this->options){$this->title}.make();
101112
EOF;
102113
if (!$this->trigger) return $content;
103114
return sprintf($this->trigger, $content);

src/Layer/Window.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class Window
77
private $trigger;
88
private $content;
99
private $options = ['width' => '0.8', 'height' => '0.8'];
10+
private $title = '';
1011

1112
/**
1213
* Window constructor.
@@ -48,6 +49,16 @@ public function trigger($selector, $event = 'click')
4849
return $this;
4950
}
5051

52+
/**
53+
* @param string $title
54+
* @return $this
55+
*/
56+
public function setTitle($title)
57+
{
58+
$this->title = ".setTitle('$title')";
59+
return $this;
60+
}
61+
5162
/**
5263
* @param array $options
5364
*/
@@ -60,7 +71,7 @@ public function __toString()
6071
{
6172
$this->options = json_encode($this->options);
6273
$content = <<<EOF
63-
new ComponentPlane({$this->content},$this->options).make();
74+
new ComponentPlane({$this->content},$this->options){$this->title}.make();
6475
EOF;
6576
if (!$this->trigger) return $content;
6677
return sprintf($this->trigger, $content);

src/Widget/PlaneAction/HeadPosAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function render()
5050
let XHR = JSON.parse('{$this->xhr}');
5151
XHR.url = XHR.url !== undefined ? XHR.url : url;
5252
XHR.callback = {$this->callback};
53-
new ComponentPlane({url:url},{$this->options}){$this->binding}.make();
53+
new ComponentPlane({url:url},{$this->options}){$this->binding}.setTitle('{$this->title}').make();
5454
});
5555
EOF
5656
);

src/Widget/PlaneAction/RowPosAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function render()
5050
let XHR = JSON.parse('{$this->xhr}');
5151
XHR.url = XHR.url !== undefined ? XHR.url : url;
5252
XHR.callback = {$this->callback};
53-
new ComponentPlane({url:url},{$this->options}){$this->binding}.make();
53+
new ComponentPlane({url:url},{$this->options}){$this->binding}.setTitle('{$this->title}').make();
5454
});
5555
EOF
5656
);

0 commit comments

Comments
 (0)