Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
I'm populating an element with a currency value via javascript. Is there a way to make js use the [UIHint("lc"] decorator? Or do you have to do it manually since you're in js and not MVC? Or do you already have a helper method to format decimals to currency in js? Code:
function grdReturableItems_Edit(e) {
var editForm = e.container;
var model = e.model;
editForm.find("#lblPrice").text(model.Price);
}
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
You have to do it manually. There is no javascript helper method in AC.
Thanks.
|
|
|
|
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
Ok is there an example of how Able does it somewhere you could point me to please?
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
Thanks: 5 times Was thanked: 113 time(s) in 112 post(s)
|
There is an example in admin - manage - Payments list page Search this line in Website\Areas\Admin\Views\Payments\Index.cshtml The function is used to update the Capture total amount on a button. The text on button will be updated upon list checkbox selections. Please visit Admin - Manage - Payments page and try to select the payments in the list and see the Catpure button text changing.
|
|
|
|
Rank: Advanced Member
Groups: HelpDesk, Developers Joined: 11/9/2018(UTC) Posts: 564
Thanks: 122 times Was thanked: 26 time(s) in 25 post(s)
|
Worked perfectly, thanks so much!
Sorry I know that was probably a really, really simple question. This javascript stuff is really hard for me. I've gotten so used to C# IntelliSense showing me available methods on an object. When I need to do something in javascript, I don't even know what to search for in Able to find a working example. I appreciate the help.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close