Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //callback to build the profileChooser
- function inventoryProfilesByClass(cbd){
- $('#simProfile_profile').empty();
- for(var i in cbd){
- profileArray.push(cbd[i]);
- $("<option>", {
- value : cbd[i].id,
- html : cbd[i].description,
- }).appendTo("#simProfile_profile");
- }
- $("<option>", {
- value : 0,
- html : "---"
- }).prependTo("#simProfile_profile");
- $("<option>", {
- value : "0xDEAD",
- html : "Neu",
- selected : true
- }).appendTo("#simProfile_profile");
- $('#simProfile_profile').trigger("chosen:updated");
- $('#simProfile_profile').attr('disabled',false).trigger("chosen:updated");
- }
- //on change check if new profile
- //on change change the inventory
- $('#simProfile_profile').on('change',function(){
- if($('#simProfile_profile').val() === '0xDEAD'){
- //NEW PROFILE
- } else{
- //LOAD PROFILE IN CHARDESIGNER
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement