Jump to content


Photo

MFL Custom Submit Lineup Script


145 replies to this topic

#61 Squintz82

Squintz82

    Veteran

  • Members
  • PipPipPip
  • 59 posts

Posted 17 July 2017 - 08:27 AM

Hab got this request implemented

 

script updated in first post to allow to click and have bench / starters flip at once

 

<script>
var lu_includeValidation = true;
var lu_mobileFlipOnAddRemove = true;
</script> 

 

Awesome, thanks for this. I noticed that the lineup now default to bench, however. How can I have the lineup screen (mobile) show current lineup first? 



#62 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,428 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 17 July 2017 - 04:19 PM

updated to show starters table first with new var setting


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#63 Squintz82

Squintz82

    Veteran

  • Members
  • PipPipPip
  • 59 posts

Posted 18 July 2017 - 10:17 AM

updated to show starters table first with new var setting

 

 

Thanks for this.

 

Not sure if this is a bug, but I fixed it via CSS. There's a new "Optional" spot if a position requires a range of players. Each time I add a player to that position, it adds an additional "Optional" slot (I had 5 at one point). I just hid those spots via CSS for now.

 

.qb_optional, .rb_optional, .wr_optional, .te_optional, .pk_optional, .de_optional, .lb_optional, .cb_optional, .s_optional, .def_optional {
display: none;
}


#64 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,756 posts
  • Gender:Male
  • Location:Leamington ON, Canada

  • 2019 MFL: 55681
  • , 18835

Posted 18 July 2017 - 12:57 PM

updated to show starters table first with new var setting

 

 

Thanks for this.

 

Not sure if this is a bug, but I fixed it via CSS. There's a new "Optional" spot if a position requires a range of players. Each time I add a player to that position, it adds an additional "Optional" slot (I had 5 at one point). I just hid those spots via CSS for now.

 

.qb_optional, .rb_optional, .wr_optional, .te_optional, .pk_optional, .de_optional, .lb_optional, .cb_optional, .s_optional, .def_optional {
display: none;
}

 

This is not working as intended.  I just sent TOS the fix.  He will update this thread when he uploads the script to his site.  You will need to remove the CSS you added to see how the script is supposed to behave.  Make sure you clear your cache (CTRL-F5) when TOS posts the update.


My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#65 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,428 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 18 July 2017 - 01:52 PM

script updated , new Var added , default it set to off , to enable the optional td cells to show

 

 

var lu_addOptionalStarters = true;


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#66 braven112

braven112

    Veteran

  • Members
  • PipPipPip
  • 1,173 posts
  • Location:mfladdons.com
  • Interests:Seatle Seahawks

Posted 18 July 2017 - 11:42 PM

script updated , new Var added , default it set to off , to enable the optional td cells to show

 

 

var lu_addOptionalStarters = true;

Seems to be set to true by default.


MFLaddons.com, your home for MFL templates and graphics.

Visit MFL.football for a free mobile friendly MFL template.


#67 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,428 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 19 July 2017 - 04:56 AM

script updated , new Var added , default it set to off , to enable the optional td cells to show

 

 

var lu_addOptionalStarters = true;

Seems to be set to true by default.

 

 

my mistake , it is turned on by default 


FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#68 t1break

t1break

    Member

  • Members
  • PipPip
  • 29 posts

Posted 22 July 2017 - 08:23 AM

Awesome script/enhancement!.  A couple styling questions:  How do I make it so the player image circle fills with white and the letter for the injury designation is left justified, how would i center that?

 

vVINa6e.png



#69 theeohiostate

theeohiostate

    Veteran

  • Members
  • PipPipPip
  • 3,428 posts
  • Gender:Male
  • Location:O-H-I-O

Posted 22 July 2017 - 08:27 AM

Adjust the CSS in the provided file everything should be marked

FREE Player Cuts Collection
https://www.nitrogra...om/player-cuts/


#70 Squintz82

Squintz82

    Veteran

  • Members
  • PipPipPip
  • 59 posts

Posted 25 July 2017 - 10:48 AM

Just curious, but is there a warning when a lineup is over the total limit? For example, in my league a team can start 1-3 RBs, 2-4 WRs, 1-2 TEs (among other positions), and a full lineup total of 12 players. This is essentially allows multiple flex spots.

 

The lineup warnings works great when a single position is over or under the limits. However, if a team attempts to submit 13 players, I notice the submission button deactivate, but don't see a total lineup limit warning. I don't think I hid this via CSS, so I'm not sure if there is a warning for the total lineup?



#71 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,756 posts
  • Gender:Male
  • Location:Leamington ON, Canada

  • 2019 MFL: 55681
  • , 18835

Posted 25 July 2017 - 10:52 AM

Just curious, but is there a warning when a lineup is over the total limit? For example, in my league a team can start 1-3 RBs, 2-4 WRs, 1-2 TEs (among other positions), and a full lineup total of 12 players. This is essentially allows multiple flex spots.
 
The lineup warnings works great when a single position is over or under the limits. However, if a team attempts to submit 13 players, I notice the submission button deactivate, but don't see a total lineup limit warning. I don't think I hid this via CSS, so I'm not sure if there is a warning for the total lineup?


I think the only notification we have for that is when you hover over the submit button. It will show all the errors as to why the button is disabled.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#72 Squintz82

Squintz82

    Veteran

  • Members
  • PipPipPip
  • 59 posts

Posted 25 July 2017 - 10:54 AM

Just curious, but is there a warning when a lineup is over the total limit? For example, in my league a team can start 1-3 RBs, 2-4 WRs, 1-2 TEs (among other positions), and a full lineup total of 12 players. This is essentially allows multiple flex spots.
 
The lineup warnings works great when a single position is over or under the limits. However, if a team attempts to submit 13 players, I notice the submission button deactivate, but don't see a total lineup limit warning. I don't think I hid this via CSS, so I'm not sure if there is a warning for the total lineup?


I think the only notification we have for that is when you hover over the submit button. It will show all the errors as to why the button is disabled.

 

Ah, yeah I see that the input title reflects the exact information I'd like to display to the user. Perhaps replacing the "value" content with the "title" content would allow the button to display this info. I assume this is possible with jQuery?



#73 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,756 posts
  • Gender:Male
  • Location:Leamington ON, Canada

  • 2019 MFL: 55681
  • , 18835

Posted 25 July 2017 - 12:06 PM

 

Just curious, but is there a warning when a lineup is over the total limit? For example, in my league a team can start 1-3 RBs, 2-4 WRs, 1-2 TEs (among other positions), and a full lineup total of 12 players. This is essentially allows multiple flex spots.
 
The lineup warnings works great when a single position is over or under the limits. However, if a team attempts to submit 13 players, I notice the submission button deactivate, but don't see a total lineup limit warning. I don't think I hid this via CSS, so I'm not sure if there is a warning for the total lineup?


I think the only notification we have for that is when you hover over the submit button. It will show all the errors as to why the button is disabled.

 

Ah, yeah I see that the input title reflects the exact information I'd like to display to the user. Perhaps replacing the "value" content with the "title" content would allow the button to display this info. I assume this is possible with jQuery?

That would be one ugly looking button.  It might be best to create a new container with a warning with all the lineup errors instead of cramming it into the button.  Will get back to you


My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#74 Squintz82

Squintz82

    Veteran

  • Members
  • PipPipPip
  • 59 posts

Posted 25 July 2017 - 12:09 PM

 

 

Just curious, but is there a warning when a lineup is over the total limit? For example, in my league a team can start 1-3 RBs, 2-4 WRs, 1-2 TEs (among other positions), and a full lineup total of 12 players. This is essentially allows multiple flex spots.
 
The lineup warnings works great when a single position is over or under the limits. However, if a team attempts to submit 13 players, I notice the submission button deactivate, but don't see a total lineup limit warning. I don't think I hid this via CSS, so I'm not sure if there is a warning for the total lineup?


I think the only notification we have for that is when you hover over the submit button. It will show all the errors as to why the button is disabled.

 

Ah, yeah I see that the input title reflects the exact information I'd like to display to the user. Perhaps replacing the "value" content with the "title" content would allow the button to display this info. I assume this is possible with jQuery?

That would be one ugly looking button.  It might be best to create a new container with a warning with all the lineup errors instead of cramming it into the button.  Will get back to you

 

Yikes, yeah I just realized the title changes with EVERY error :lol: . It would be nice to display when you're ONLY over or under the total limit near the button. The tables already do the job of displaying when positional limits are not met.



#75 wolfe

wolfe

    Veteran

  • Members
  • PipPipPip
  • 64 posts
  • Gender:Male
  • Location:Tennessee

Posted 13 August 2017 - 02:28 PM

MFL's default submission form allows you to submit any lineup then if the submission fails it warns you after the fact that something is wrong.


 

 

I have tried to simulate the same logic that MFL uses only I disabled the button if the lineup is invalid.  If you hover over the disabled button then you will be able to see why the button is disabled.

 

If leagues allow partial lineups then I changed the submit button to "Submit Partial Lineup" if a partial lineup is detected.  If you hover over the button you will be able to see why a partial lineup is detected.

 

Lastly the script also checks for valid line formations if your league uses formations.

 

It would be great to get feedback if my logic is failing some places.

 

My league uses formations and the submit button is disabled. Every combination of RB, WR and TE is considered invalid.





Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users