Skip to content

Commit 81db979

Browse files
committed
box changes
1 parent bb5058f commit 81db979

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

j-Box/component.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@ COMPONENT('box', 'zindex:12;padding:25;scrollbar:1;scrolltop:1;style:1;align:cen
5757
};
5858

5959
self.cancel = function() {
60-
config.cancel && self.EXEC(config.cancel, self.hide);
61-
self.hide();
60+
if (config.cancel)
61+
self.EXEC(config.cancel, self.hide);
62+
else
63+
self.hide();
6264
};
6365

6466
self.hide = function() {
67+
config.close && self.EXEC(config.close);
6568
if (config.independent)
6669
self.hideforce();
6770
self.set('');

j-Box/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"datecreated": "2022-01-12T20:15:00.000Z",
3-
"dateupdated": "2023-01-08T19:44:00.000Z",
3+
"dateupdated": "2023-01-18T10:44:00.000Z",
44
"name": "j-Box",
55
"tags": [
66
"large",

j-Box/example.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<div data---="box__common.form__if:user;width:500;title:Title;submit:userform_submit" class="hidden">
1+
<ui-component name="box" path="common.form" config="if:user;width:500;title:Title;submit:userform_submit" class="hidden">
22
<nav>
3-
<button><i class="fa fa-angle-down"></i>Menu</button>
3+
<button><i class="ti ti-angle-down"></i>Menu</button>
44
</nav>
55
<div class="padding">
66
SOME CONTENT
@@ -9,7 +9,7 @@
99
<button name="submit">SUBMIT</button>
1010
<button name="cancel">CANCEL</button>
1111
</nav>
12-
</div>
12+
</ui-component>
1313

1414
<script>
1515

j-Box/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ __Configuration__:
2626
- `background {Boolean}` optional, enables/disables background (default: `true`)
2727
- `transparent {Boolean}` optional, all elements on the background of the box will be clickable (default: `false`)
2828
- `align {String}` optional, `center` (default), `left`, `right`
29-
29+
- `close {String}` link to a global `function()` and it's executed if the form is closing
3030
The component supports dynamic evaluation of the content of `<script type="text/html">`. The example below contains a script with HTML and the component evaluates the content if the j-Form will be displayed (only once).
3131

3232
```html

0 commit comments

Comments
 (0)