Jump to content

in2tech

Members
  • Posts

    292
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by in2tech

  1. 17 hours ago, servetas said:

    It really works but if you simply change the "px" values to percent values, everything is going to work fine. For example:

    
     <tr>
        <th align= "center" width="10%">Avatar</th>
        <th align= "center" width="10%">Pilot Hub</th>
        <th align= "center" width="10%">ID</th>
        <th align= "center" width="20%">Name</th>
        <th align= "center" width="10%">Rank</th>
        <th align= "center" width="5%">Flights</th>
        <th align= "center" width="5%">Hours</th>
        <th align= "center" width="10%">Vatsim</th>
        <th align= "center" width="10%">IVAO</th>
        <th align= "center" width="10%">Status</th>
    
    </tr> 

     

    So it will be responsive now? If so nice, and thanks!

     

  2. On 8/3/2014 at 9:52 AM, servetas said:

    When your pilots file their pireps manual can select the aircraft they flown...

    But can't be done when car's flight filed right? Also, would like to see this as an option in version 4 or 7?

  3. 15 hours ago, shakamonkey88 said:

    The problem with that code is that it isn't responsive with set px values and doesn't care up/down correctly. I'm pretty sure the answer is that it's missing a div somewhere. Once I get to work, I'll have a look and post it here. 

    True it Is not responsive but it does work :)

  4. Something like this will do it. You have to edit your pilot_list.php or tpl file:

     

    <tr>
        <th align= "center" width="100px">Avatar</th>
        <th align= "center" width="100px">Pilot Hub</th>
        <th align= "center" width="100px">ID</th>
        <th align= "center" width="200px">Name</th>
        <th align= "center" width="100px">Rank</th>
        <th align= "center" width="100px">Flights</th>
        <th align= "center" width="100px">Hours</th>
        <th align= "center" width="100px">Vatsim</th>
        <th align= "center" width="100px">IVAO</th>
        <th align= "center" width="100px">Status</th>

    </tr>

    This is how I lined mine up! I think I got the code here somewhere! Of course you edit it for your options!

  5. Thanks,

    Since I have done this the schedules used to appear on the page as soon as I selected the menu item. Now I have to click on Find Flights for it to show up and it also appears to opening in a separate page if that makes sense. Wonder why they are no longer showing when I click the menu by default.

    Used to show schedule results right under this with schedules listed. Now I have to click Find Flights and it shows on another page!

     

     

    2017-09-16_2120

     

    This is what it used to look like when you clicked the schedules link in the main menu:

     

    2017-09-17_0217

    Thanks for all your help!

  6. Thank you, is this also true of the other options, airports. aircraft, etc... I think it is just those three?

    Odd they are not showing up when I click the schedule link now, but if I click find flights the updated ones are there. Any ideas?

  7. So in the early stages of testing the virtual airline. For the most part working on the template which does not effect the database or anything like that. In trying to learn the CSV import and export functions, I noticed that there is an option in the Import for Schedules that states : "Delete all previous routes - NOTE: this could potentially mess up any PIREPS from ACARS flights which are currently in progress, whose routes have changed. " , which like I said we are in the testing phase. So If we say have 1,000 schedules as an example and we edit the spreadsheet to have 500 and tick the DELETE, it will delete the 1,000 first right and than upload the new 500 on the spreadsheet? Is this the way it works for schedules, airports, etc...?

    Thanks!

  8. ProAvia,

    No it is not a template. Those are 2 different templates of mine. And my second template has pagination code already in it and styled, so I just had to find the right DataTable styling to pull it out. If that makes sense :) I am trying to get the first picture to look like the second one but have not figured it out myself yet. I am pretty sure the DataTable code is pulling information that works with my templates. For example, my second picture ( The RED one) is heavily relying on Bootstrap and my second templates is basically built on Bootstrap so the DataTable CDN code is pulling the right info ( the DataTable stylesheet link).

    You really just have to mess with it and see if it works. There is a page on DataTable that you can choose what you want and it adds it to the DataTable style and script codes. You just have to mess around and see if it works out. Or dig deep in the code and figure it out yourself.

    It's called the Download Builder:

    https://www.datatables.net/download/index

    It's kind of hard to understand at first. I just selected the styling options I wanted until it worked. You choose what you want, I think I ONLY choose the Bootstrap option at first and tried it.

    2017-02-02_1533

    And than it generated the codes at the bottom to try. I mixed and matched them, and finally it worked on my RED template :)

    2017-02-02_1535

    BACKUP, BACKUP, BACKUP your original file before trying this. You might just get lucky :) Also, if you have another template or skin try it on that one too and see what happens. Also, be careful that the generated code does not cause a No Routes Passed Error, check often!

    Good luck,

  9. ProAvia,

    Show us a screenshot or provide a link. Does it look like this:

    2017-02-01_2344

     

    Instead of this:

    2017-02-01_2346

    These are 2 different templates. And actually the one at the top when you hover over the numbers, or next, last, etc... has a hover effect. Does yours? Best thing is to show a screen shot while hovering if you can, or even better a link.

  10. Accidentally got rid of the default Search Form, which I really don't need anyway because DataTable Search does everything. I would still like to get it to work, or make another version to work.

    2017-01-29_1434

    That's really all I need. You can search for anything the default search for does :) Although I got ride of the search form by accident...need to figure out how and why...well I know it was the No Conflict code and where and how I placed it :)

    But heck this works really well...I think!

    Well actually it does not as now I get a No Routes Passed error.....

    Really odd some times it works, sometimes I get the No Routes Passed...strange!

  11. You mean the tabs in the search form like this:

    <div id="tabcontainer">

    <li><a href="#depapttab"><span>By Departure Airport</span></a></li>
            <li><a href="#arrapttab"><span>By Arrival Airport</span></a></li>
            <li><a href="#airlinetab"><span>By Airline</span></a></li>
                    <li><a href="#aircrafttab"><span>By Aircraft Type</span></a></li>

    So forth and so on....

    I have added this code to the page but no luck on search form or results. This is what I have in my layout.php file too to get DataTables to work on my other pages.

    <script>
    jQuery.noConflict();
    </script>

    I must say I am very confused about this. Can you give an example(s) of a fix to guide me please... I would really like to get DataTables working on my schedules page.

    Thanks,

  12. For me in the schedule results I always have an issue with it messing up the search form, when I apply the DataTables. On my test sites I have to use the javascript no conflict code to get DataTables to work for me.

    Once again I would try to get the width working without any DataTable code or links to DataTable  styling and so forth and than go from there. But like I said I have always had issue's trying to get it to work with the schedule results. If I get the results working with DataTables it messes up the search form horribly. Not sure why yet.

    2017-01-29_1359

    Let us know,

  13. ProAvia,

    For some reason I have had trouble trying to get it to work with the schedule results page at the moment. But really haven't tried a lot. For one thing your table should fill the entire width. Something is wrong and probably that is messing up your other items, like the pagination at the bottom. Fix that first with out the DataTable code and than add the DataTable code.

    Should look similar to this before the DataTable code:

     

    2017-01-28_2241

    Try

    <table id="table" class="table">

    or

    <table class="table">

    and see if that makes it fill almost the entire page.

  14. 2 hours ago, ProAvia said:

    That code works great! And I just started reading about all the options that are available.

    I have the code working in Schedules and View PIREPS. One issue I'm having is the placement of the First, Previous, Next, Last and page selection numbers. Right now they show in a vertical column on the lower right side of each paginated page. Is there a way to move them and possible style them into buttons?

    Thanks!

    Show us your link or links please. Are you using the CDN script's that get's the styling and so forth for the DataTables? There should be no reason why you have to make them buttons. Now sure if it matter's or not but is your template bootstrap? It should look similar to this, although might not be exactly.

    2017-01-28_1958

    I will say one thing I can not get to work most of the time, is the X that should let you clear the search and take you back to your default ordering. Not  sure how to fix this? But I really want to get it to work at some point. Any ideas anyone? How to get the X, for clearing the field to work?

    From the DataTables website:

    2017-01-28_2001

    Yeah the DataTables are amazing. Trying to figure out some of the options and getting them to work sometimes takes awhile. Like I have tried some of the styling options, but I think my main css style sheets are taking over at times. I can get the bootstrap table styling to work, but not the DataTable styling. Might be another CDN link I need :)

    See the X for clearing and starting over is working in this template. It's really nice when it works. Just easier to clear and start over your new search!

    2017-01-28_2019

     

  15. Got it working. If I had been paying attention, I would have noticed I only needed a comma on the line above...duh!!!!!

    Working DataTable code with length options and now ordering options. You can add or change ton's of stuff in the DataTables code:

     

    <script type="text/javascript">
    $(document).ready(function() {
    $('.table').dataTable({
      "sPaginationType": "full_numbers",
      "lengthMenu": [ [ 5, 20, 40, -1], [ 5, 20, 40, "All"] ],
       "order": [[ 2, "asc" ]]
    });
    });
    </script>


    <table class="table">

    ( your phpVMS code goes here, like pilot list code, pirep viewall code, etc...)

    </table>

    You can see now it starts off ordering the Pilot ID column.

    https://www.screencast.com/t/KZZuQsWv

    Notice I have a 2 in the order although it is column 3 from the left.

  16. web541,

    I had this working once and can not find the original code I had it working in. 

    I need to add only the BOLD order part:

    $(document).ready(function() {
        $('#example').DataTable( {
            "order": [[ 3, "desc" ]]
        } );
    } );
     
    To this:
     
    <script type="text/javascript">
    $(document).ready(function() {
    $('.table').dataTable({
      "sPaginationType": "full_numbers",
      "lengthMenu": [ [ 5, 20, 40, -1], [ 5, 20, 40, "All"] ]
    });
    });
    </script>
     
    I had this working once and know I have it somewhere but can not find it. I will say the column order is kind of funky as I have to use like column 2, which is really column 3 to get it to work. I guess it is ignoring a column or something. With the ordering code added you can set for instance Pilot ID to be the default ordering column, ( or any column with data )! Of course images and ranks don't work. You just have to mess with it to find the correct column you need ordered :) And of course you can change desc to asc depending on how you want it to order.
     
     
    Thanks,
×
×
  • Create New...