Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Commit

Permalink
include AutoNumeric
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Sep 16, 2019
1 parent f52a86e commit ef99c35
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 0.10.3
- New assets: `AutoNumeric`

# 0.10.2
- Set active state when loading menu from array

# 0.10.1
- Hide parent menu without URL

# 0.10.0
- Support Laravel 6

# 0.9.0
## Rename folder `lib` to `plugins`
To comply with Vega pentest.
Expand Down
2 changes: 1 addition & 1 deletion public/js/all.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/css/app.css": "/css/app.css?id=c9f8cd41799b385cd014",
"/js/all.js": "/js/all.js?id=3054c482d11fde7bc752",
"/js/all.js": "/js/all.js?id=bb165e61fddde519ecc3",
"/css/all.css": "/css/all.css?id=414acc0ef56df5f6d37d",
"/semantic/semantic.min.css": "/semantic/semantic.min.css?id=8326a6c2bdbe93f39c6f"
}
2 changes: 2 additions & 0 deletions public/plugins/autoNumeric.min.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions resources/js/init/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,17 @@ $(function () {
}
});
});

if (typeof AutoNumeric === 'function') {
new AutoNumeric('input[data-role="rupiah"]', {
currencySymbol: '',
decimalCharacter: ',',
digitGroupSeparator: '.',
decimalPlaces: 0,
unformatOnSubmit: true,
});
}

});


7 changes: 6 additions & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function boot()
/**
* Loads a path relative to the package base directory
*
* @param string $path
* @param string $path
* @return string
*/
protected function packagePath($path = '')
Expand Down Expand Up @@ -166,6 +166,11 @@ protected function registerAssets()
'laravolt/plugins/vegas/vegas.min.css',
'laravolt/plugins/vegas/vegas.min.js',
]
)->registerCollection(
'autoNumeric',
[
'laravolt/plugins/autoNumeric.min.js',
]
);
}
}

0 comments on commit ef99c35

Please sign in to comment.