Configuration property to allow positioning the symbol at the left or right hand side of the value#56
Configuration property to allow positioning the symbol at the left or right hand side of the value#56cattox wants to merge 2 commits intoplentz:masterfrom
Conversation
This will allow the user to select symbol location: to the left or to the right of the value
|
@cattox thank you very much for the pull request and sorry for taking so long to reply to you. unfortunally, the pull request can't be automatically merged anymore, so I will apply the changes directly in the new code after the first beta of version 2.0 personal reminder:
function setSymbol(v) {
if (settings.showSymbol) {
if (v.substr(0, settings.symbol.length) != settings.symbol && v.substr(v.length-settings.symbol.length, v.length) != settings.symbol){
if(settings.symbolLocation == "left"){
return settings.symbol+v;
} else {
return v+settings.symbol;
}
}
}
return v;
} |
|
i am interested in making a negative number -$ 123 into ($ 123). it this possible? |
|
@mynumbercrunching that's not possible yet, but I think that it's not that hard to do. The main problem is to create a config to allow that and still be compatible with the default negative form(using |
|
related http://www.catarinamartinscard.com/jquery/maskmoney/jquery.maskMoney.js "Só acrescentei um parâmetro 'symbolPosition' e alterei a função 'setSymbol'." by https://www.facebook.com/jccoss |
|
I actually want to have jquery-maskmoney working with jQuery Globalize. Globalize uses a currency pattern, e.g. fr-FR currency pattern is: It's not hard to do, so I'll probably fork the project and implement it, then do a pull request later. |
|
@baohouse that would be great :) |
|
@cattox @mynumbercrunching @baohouse @extreme-dh @rafaelkarst hey guys, I just released maskMoney 2.6.0 with the config to allow setting the position of the symbol. grab it while it's hot ;) |
- `symbol` ~> `prefix` - `symbolStay` ~> `affixesStay` - `symbolPosition` no longer exists and to put the symbol at the right, you should use `suffix` - `affixesStay` is now default to `true` related #56
This change will alllow the user to choose if he wants the symbol at the left (R$100) or right (100€) hand side of the value.