jQWidgets Forums

jQuery UI Widgets Forums Navigation Tabs Tabs in IE 8 not displayed correctly

This topic contains 9 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 7 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • Tabs in IE 8 not displayed correctly #9445

    Frogomat
    Participant

    Hi everyone

    I got a problem with the display of tabs in IE 8. Other Browsers like Chrome or Firefox had no problems. The Tabs in IE 8 are spanned over the whole div and only a fex pixels high. Can someone help me with that?

    Thanks

    Tabs in IE 8 not displayed correctly #9446

    Peter Stoev
    Keymaster

    Hi Frogomat,

    Ensure that you add in your page. If that does not help, post a code which demonstrates the issue.

    Best Regards,
    Peter SToev

    jQWidgets Team
    http://www.jqwidgets.com

    Tabs in IE 8 not displayed correctly #9447

    Frogomat
    Participant

    Here is the codepart that is used for the tabcreation. The tabs are displayed in the rowdetails within a grid.

    var initAuftragsRowDetails = function (index, parentElement, gridElement, record) {

                    var id = record.uid.toString();
    var grid = $($(parentElement).children()[0]);
    tmpRecord = record;
    grid.append($("<div id='sendung_"+record['id']+"' ></div>"));
    grid.append($("<div id='statusHistorie_"+record['id']+"' ></div>"));
    grid.jqxTabs({ autoHeight: true, theme: theme });
    grid.jqxTabs({initTabContent: function (tab) {
    switch (tab) {
    case 0:
    initSendungsTab(record['id']);
    break;
    case 1:
    initStatusHistorieTab(record['id']);
    break;
    }
    }});
    }
    $("#jqxgrid").jqxGrid(
    {
    width: 1180,
    height: 200,
    source: dataAdapterAuftraege,
    pageable: true,
    pagesizeoptions: ['10', '25', '50', '100'],
    pagesize: 25,
    autoheight: true,
    sortable: true,
    theme: theme,
    rowdetails: true,
    rowdetailstemplate: {
    rowdetails: "<div style='margin: 10px;'><ul style='margin-left: 30px;'><li>Sendungen</li><li>Statushistorie</li></ul></div>"
    },
    initrowdetails: initAuftragsRowDetails,
    columns: [
    { text: 'LD-Ref.', datafield: 'ldref', width: 100 },
    { text: 'BT-KD.NR.', datafield: 'empfaengerNr', width: 100 },
    { text: 'BT-Ref.', datafield: 'empfaengerRef', width: 100 },
    { text: 'BT-Kd.-Ref', datafield: 'kundenRef', width: 200 },
    { text: 'TDL', datafield: 'tdl', width: 100 },
    { text: 'Strasse', datafield: 'strasse', width: 150 },
    { text: 'PLZ', datafield: 'plz', width: 50 },
    { text: 'Ort', datafield: 'ort', width: 100 },
    { text: 'LandCode', datafield: 'landCode', width: 100 },
    { text: 'Gewicht[kg]', datafield: 'gewicht', width: 50 },
    { text: 'Sendungen', datafield: 'anzahlSendungen', width: 100 }]
    });
    Tabs in IE 8 not displayed correctly #9451

    Peter Stoev
    Keymaster

    Hi Frogomat,

    We can’t reproduce the reported issue with jqxTabs and IE8.

    Here’s a sample code:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title id='Description'>This example shows how to display row details after each grid row.</title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxmenu.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.pager.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxtabs.js"></script>
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getTheme();
    // prepare the data
    var data = new Array();
    var firstNames = ["Nancy", "Andrew", "Janet", "Margaret", "Steven", "Michael", "Robert", "Laura", "Anne"];
    var lastNames = ["Davolio", "Fuller", "Leverling", "Peacock", "Buchanan", "Suyama", "King", "Callahan", "Dodsworth"];
    var titles = ["Sales Representative", "Vice President, Sales", "Sales Representative", "Sales Representative", "Sales Manager", "Sales Representative", "Sales Representative", "Inside Sales Coordinator", "Sales Representative"];
    var titleofcourtesy = ["Ms.", "Dr.", "Ms.", "Mrs.", "Mr.", "Mr.", "Mr.", "Ms.", "Ms."];
    var birthdate = ["08-Dec-48", "19-Feb-52", "30-Aug-63", "19-Sep-37", "04-Mar-55", "02-Jul-63", "29-May-60", "09-Jan-58", "27-Jan-66"];
    var hiredate = ["01-May-92", "14-Aug-92", "01-Apr-92", "03-May-93", "17-Oct-93", "17-Oct-93", "02-Jan-94", "05-Mar-94", "15-Nov-94"];
    var address = ["507 - 20th Ave. E. Apt. 2A", "908 W. Capital Way", "722 Moss Bay Blvd.", "4110 Old Redmond Rd.", "14 Garrett Hill", "Coventry House", "Miner Rd.", "Edgeham Hollow", "Winchester Way", "4726 - 11th Ave. N.E.", "7 Houndstooth Rd."];
    var city = ["Seattle", "Tacoma", "Kirkland", "Redmond", "London", "London", "London", "Seattle", "London"];
    var postalcode = ["98122", "98401", "98033", "98052", "SW1 8JR", "EC2 7JR", "RG1 9SP", "98105", "WG2 7LT"];
    var country = ["USA", "USA", "USA", "USA", "UK", "UK", "UK", "USA", "UK"];
    var homephone = ["(206) 555-9857", "(206) 555-9482", "(206) 555-3412", "(206) 555-8122", "(71) 555-4848", "(71) 555-7773", "(71) 555-5598", "(206) 555-1189", "(71) 555-4444"];
    var notes = ["Education includes a BA in psychology from Colorado State University in 1970. She also completed 'The Art of the Cold Call.' Nancy is a member of Toastmasters International.",
    "Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association.",
    "Janet has a BS degree in chemistry from Boston College (1984). She has also completed a certificate program in food retailing management. Janet was hired as a sales associate in 1991 and promoted to sales representative in February 1992.",
    "Margaret holds a BA in English literature from Concordia College (1958) and an MA from the American Institute of Culinary Arts (1966). She was assigned to the London office temporarily from July through November 1992.",
    "Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree in 1976. Upon joining the company as a sales representative in 1992, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses 'Successful Telemarketing' and 'International Sales Management.' He is fluent in French.",
    "Michael is a graduate of Sussex University (MA, economics, 1983) and the University of California at Los Angeles (MBA, marketing, 1986). He has also taken the courses 'Multi-Cultural Selling' and 'Time Management for the Sales Professional.' He is fluent in Japanese and can read and write French, Portuguese, and Spanish.",
    "Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the University of Michigan in 1992, the year he joined the company. After completing a course entitled 'Selling in Europe,' he was transferred to the London office in March 1993.",
    "Laura received a BA in psychology from the University of Washington. She has also completed a course in business French. She reads and writes French.",
    "Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German."];
    var k = 0;
    for (var i = 0; i < firstNames.length; i++) {
    var row = {};
    row["firstname"] = firstNames[k];
    row["lastname"] = lastNames[k];
    row["title"] = titles[k];
    row["titleofcourtesy"] = titleofcourtesy[k];
    row["birthdate"] = birthdate[k];
    row["hiredate"] = hiredate[k];
    row["address"] = address[k];
    row["city"] = city[k];
    row["postalcode"] = postalcode[k];
    row["country"] = country[k];
    row["homephone"] = homephone[k];
    row["notes"] = notes[k];
    data[i] = row;
    k++;
    }
    var source =
    {
    localdata: data,
    datatype: "array"
    };
    var initrowdetails = function (index, parentElement, gridElement, datarecord) {
    var tabsdiv = null;
    var information = null;
    var notes = null;
    tabsdiv = $($(parentElement).children()[0]);
    tabsdiv.append($("<div class='notes' ></div>"));
    tabsdiv.append($("<div class='title' ></div>"));
    if (tabsdiv != null) {
    information = tabsdiv.find('.information');
    notes = tabsdiv.find('.notes');
    var title = tabsdiv.find('.title');
    title.text(datarecord.firstname);
    var container = $('<div style="margin: 5px;"></div>')
    container.appendTo($(information));
    var photocolumn = $('<div style="float: left; width: 15%;"></div>');
    var leftcolumn = $('<div style="float: left; width: 45%;"></div>');
    var rightcolumn = $('<div style="float: left; width: 40%;"></div>');
    container.append(photocolumn);
    container.append(leftcolumn);
    container.append(rightcolumn);
    var photo = $("<div class='jqx-rc-all' style='margin: 10px;'><b>Photo:</b></div>");
    var image = $("<div style='margin-top: 10px;'></div>");
    var imgurl = '../../images/' + datarecord.firstname.toLowerCase() + '.png';
    var img = $('<img height="60" src="' + imgurl + '"/>');
    image.append(img);
    image.appendTo(photo);
    photocolumn.append(photo);
    var firstname = "<div style='margin: 10px;'><b>First Name:</b> " + datarecord.firstname + "</div>";
    var lastname = "<div style='margin: 10px;'><b>Last Name:</b> " + datarecord.lastname + "</div>";
    var title = "<div style='margin: 10px;'><b>Title:</b> " + datarecord.title + "</div>";
    var address = "<div style='margin: 10px;'><b>Address:</b> " + datarecord.address + "</div>";
    $(leftcolumn).append(firstname);
    $(leftcolumn).append(lastname);
    $(leftcolumn).append(title);
    $(leftcolumn).append(address);
    var postalcode = "<div style='margin: 10px;'><b>Postal Code:</b> " + datarecord.postalcode + "</div>";
    var city = "<div style='margin: 10px;'><b>City:</b> " + datarecord.city + "</div>";
    var phone = "<div style='margin: 10px;'><b>Phone:</b> " + datarecord.homephone + "</div>";
    var hiredate = "<div style='margin: 10px;'><b>Hire Date:</b> " + datarecord.hiredate + "</div>";
    $(rightcolumn).append(postalcode);
    $(rightcolumn).append(city);
    $(rightcolumn).append(phone);
    $(rightcolumn).append(hiredate);
    var notescontainer = $('<div style="white-space: normal; margin: 5px;"><span>' + datarecord.notes + '</span></div>');
    $(notes).append(notescontainer);
    $(tabsdiv).jqxTabs({ autoHeight: true, theme: theme });
    }
    }
    var dataAdapter = new $.jqx.dataAdapter(source);
    $("#jqxgrid").jqxGrid(
    {
    width: 670,
    height: 250,
    source: dataAdapter,
    theme: theme,
    rowdetails: true,
    autoheight: true,
    pageable: true,
    pagesizeoptions: ['10', '25', '50', '100'],
    pagesize: 25,
    rowdetailstemplate: { rowdetails: "<div style='margin: 10px;'><ul style='margin-left: 30px;'><li class='title'></li><li>Notes</li></ul></div>", rowdetailsheight: 200 },
    ready: function () {
    $("#jqxgrid").jqxGrid('showrowdetails', 0);
    $("#jqxgrid").jqxGrid('showrowdetails', 1);
    },
    initrowdetails: initrowdetails,
    columns: [
    { text: 'First Name', datafield: 'firstname', width: 100 },
    { text: 'Last Name', datafield: 'lastname', width: 100 },
    { text: 'Title', datafield: 'title', width: 180 },
    { text: 'City', datafield: 'city', width: 100 },
    { text: 'Country', datafield: 'country', width: 140 }
    ]
    });
    });
    </script>
    </head>
    <body class='default'>
    <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;">
    <div id="jqxgrid"></div>
    </div>
    </body>
    </html>

    Best Regards,
    Peter SToev

    jQWidgets Team
    http://www.jqwidgets.com

    Tabs in IE 8 not displayed correctly #9515

    Frogomat
    Participant

    I researched a bit. This is the code gernerated in IE8 and below that, the code from Firefox. In the IE 8 the margin-top of jqx-tabs-titleContentWrapper is set to -12 and the surrounding jqx-reset is set to a height of 4px. In Firefox the height is set to 16 and the margin-top is 0px.

    <LI style="POSITION: static; FLOAT: left; HEIGHT: 4px" class="jqx-reset jqx-disableselect jqx-tabs-title jqx-item jqx-rc-t jqx-tabs-title-selected-top jqx-fill-state-pressed" jQuery17204034568277627916="105">
    <DIV style="Z-INDEX: 15; POSITION: relative; OUTLINE-STYLE: none; OUTLINE-COLOR: invert; OUTLINE-WIDTH: medium; HEIGHT: 100%" class=jqx-tabs-titleWrapper>
    <DIV style="MARGIN-TOP: -12px; FLOAT: left" class="jqx-tabs-titleContentWrapper jqx-disableselect">Sendungen</DIV>
    <DIV style="MARGIN-TOP: -11px; WIDTH: 16px; DISPLAY: none; FLOAT: left; HEIGHT: 16px; FONT-SIZE: 1px" class=jqx-tabs-close-button jQuery17204034568277627916="106"></DIV></DIV></LI>
    <LI style="POSITION: static; FLOAT: left; HEIGHT: 4px" class="jqx-reset jqx-disableselect jqx-tabs-title jqx-item jqx-rc-t" jQuery17204034568277627916="103">
    <DIV style="Z-INDEX: 15; POSITION: relative; OUTLINE-STYLE: none; OUTLINE-COLOR: invert; OUTLINE-WIDTH: medium; HEIGHT: 100%" class=jqx-tabs-titleWrapper>
    <DIV style="MARGIN-TOP: -12px; FLOAT: left" class="jqx-tabs-titleContentWrapper jqx-disableselect">Statushistorie</DIV>
    <DIV style="MARGIN-TOP: -11px; WIDTH: 16px; DISPLAY: none; FLOAT: left; HEIGHT: 16px; FONT-SIZE: 1px" class=jqx-tabs-close-button jQuery17204034568277627916="104"></DIV></DIV></LI>
    <li style="float: left; position: static; height: 16px;" class="jqx-reset jqx-disableselect jqx-tabs-title jqx-item jqx-rc-t jqx-tabs-title-selected-top jqx-fill-state-pressed"><div class="jqx-tabs-titleWrapper" style="outline: medium none; position: relative; z-index: 15; height: 100%;"><div style="float: left; margin-top: 0px;" class="jqx-tabs-titleContentWrapper jqx-disableselect">Sendungen</div><div style="height: 16px; width: 16px; float: left; font-size: 1px; display: none; margin-top: 1px;" class="jqx-tabs-close-button"></div></div></li><li style="float: left; position: static; height: 16px;" class="jqx-reset jqx-disableselect jqx-tabs-title jqx-item jqx-rc-t"><div class="jqx-tabs-titleWrapper" style="outline: medium none; position: relative; z-index: 15; height: 100%;"><div style="float: left; margin-top: 0px;" class="jqx-tabs-titleContentWrapper jqx-disableselect">Statushistorie</div><div style="height: 16px; width: 16px; float: left; font-size: 1px; display: none; margin-top: 1px;" class="jqx-tabs-close-button"></div></div></li>
    Tabs in IE 8 not displayed correctly #9519

    Peter Stoev
    Keymaster

    Hi Frogomat,

    Such thing may happen, if the Grid’s DIV tag is initially hidden i.e when the jQuery’s width and height methods return 0 in such case. As I don’t have the full source and only part of it, I can’t provide additional information. The code from my post works as expected.

    Best Regards,
    Peter SToev

    jQWidgets Team
    http://www.jqwidgets.com

    Tabs in IE 8 not displayed correctly #9520

    Frogomat
    Participant

    Here is the code so far. no problems in FF or Chrome. IE 8 and 9 not working :(.

    $(document).ready(function () {
    var initSendungsTab = function (id) {
    var dataAdapter = getDataAdapterSendungen(id);
    // Wenn ein bestimmter Status
    var crlieferscheinLink = function (row, columnfield, value, defaulthtml, columnproperties) {
    if (value != ' ' ) {
    return '<span style="margin: 4px; float: ' + columnproperties.cellsalign + '; color: #0000ff;">' + value + '</span>';
    } else {
    return '<span style="margin: 4px; float: ' + columnproperties.cellsalign + '; color: #008000;">' + value + '</span>';
    }
    }
    $("#sendung_"+id).jqxGrid(
    {
    width: 600,
    height: 560,
    theme: theme,
    // pageable: true,
    pagesizeoptions: ['5', '10', '20'],
    autoheight: true,
    sortable: true,
    source: dataAdapter,
    columns: [
    { text: 'SendungsId', datafield: 'nr', width: 100, cellsrenderer: crlieferscheinLink },
    { text: 'Gewicht[kg]', datafield: 'gewicht', width: 100 },
    { text: 'Datum/Uhrzeit', datafield: 'amUm', width: 160 },
    { text: 'Status', datafield: 'statusBezeichung', width: 100 }
    ]
    });
    }
    var initStatusHistorieTab = function (id) {
    var dataAdapter = getDataAdapterStatus(id);
    $(("#statusHistorie_"+id)).jqxGrid(
    {
    width: 600,
    height: 560,
    source: dataAdapter,
    theme: theme,
    // pageable: true,
    pagesizeoptions: ['5', '10', '20'],
    autoheight: true,
    sortable: true,
    columns: [
    { text: 'Code', datafield: 'statusCode', width: 100 },
    { text: 'Bezeichung', datafield: 'statusText', width: 100 },
    { text: 'Datum/Uhrzeit', datafield: 'statusGueltigAbAmUm', width: 160 }
    ]
    });
    }
    var initAuftragsRowDetails = function (index, parentElement, gridElement, record) {
    var id = record.uid.toString();
    var grid = $($(parentElement).children()[0]);
    tmpRecord = record;
    grid.append($("<div id='sendung_"+record['id']+"' ></div>"));
    grid.append($("<div id='statusHistorie_"+record['id']+"' ></div>"));
    grid.jqxTabs({autoHeight: true, theme: theme });
    grid.jqxTabs({initTabContent: function (tab) {
    switch (tab) {
    case 0:
    initSendungsTab(record['id']);
    break;
    case 1:
    initStatusHistorieTab(record['id']);
    break;
    }
    }});
    }
    $("#jqxgrid").jqxGrid(
    {
    width: 1180,
    height: 200,
    source: dataAdapterAuftraege,
    pageable: true,
    pagesizeoptions: ['10', '25', '50', '100'],
    pagesize: 25,
    autoheight: true,
    sortable: true,
    theme: theme,
    rowdetails: true,
    rowdetailstemplate: {
    rowdetails: "<div style='margin: 10px;'><ul style='margin-left: 30px;'><li>Sendungen</li><li>Statushistorie</li></ul></div>"
    ,autoheight: true},
    initrowdetails: initAuftragsRowDetails,
    columns: [
    { text: 'LD-Ref.', datafield: 'ldref', width: 100 },
    { text: 'BT-KD.NR.', datafield: 'empfaengerNr', width: 100 },
    { text: 'BT-Ref.', datafield: 'empfaengerRef', width: 100 },
    { text: 'BT-Kd.-Ref', datafield: 'kundenRef', width: 200 },
    { text: 'TDL', datafield: 'tdl', width: 100 },
    { text: 'Strasse', datafield: 'strasse', width: 150 },
    { text: 'PLZ', datafield: 'plz', width: 50 },
    { text: 'Ort', datafield: 'ort', width: 100 },
    { text: 'LandCode', datafield: 'landCode', width: 100 },
    { text: 'Gewicht[kg]', datafield: 'gewicht', width: 50 },
    { text: 'Sendungen', datafield: 'anzahlSendungen', width: 100 }]
    });
    });
    Tabs in IE 8 not displayed correctly #9522

    Peter Stoev
    Keymaster

    There’s no HTML markup. I would also suggest you to try the sample from my post.

    Best Regards,
    Peter SToev

    jQWidgets Team
    http://www.jqwidgets.com

    Tabs in IE 8 not displayed correctly #9528

    Frogomat
    Participant

    Thanks for trying to help me Peter Stoev. The sample you posted works fine for me. But my version of it does not. I’m a little in the dark whats the big difference between these two. Here is the html part.

        <link rel="stylesheet" href="/stylesheets/jqwidgets/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="/jqwidgets/scripts/jquery-1.8.1.min.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxcore.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxdata.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxbuttons.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxscrollbar.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxmenu.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxgrid.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxgrid.selection.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxtabs.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxgrid.pager.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxlistbox.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxdropdownlist.js"/>
    <script type="text/javascript" src="/jqwidgets/jqwidgets/jqxgrid.sort.js"/>
    <script type="text/javascript">
    <xsl:call-template name="scripts"/>
    </script>
    <html>
    <head>
    <title>ev@s Track and Tracing</title>
    </head>
    <body>
    <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;">
    <div id="jqxgrid">
    </div>
    </div>
    </body>
    </html>
    Tabs in IE 8 not displayed correctly #9539

    Peter Stoev
    Keymaster

    Hi Frogomat,

    I am still unable to reproduce the reported issue. Below is an image from my test with Internet Explorer and expecially Internet Explorer 8.

    Below is my code which is based on your code, but uses sample data because there wasn’t any in your posting.

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="../../scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="../../qwidgets/jqxmenu.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.selection.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxtabs.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.pager.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxgrid.sort.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var initSendungsTab = function (id) {
    var data = new Array();
    for (var i = 0; i < 200; i++) {
    var row = {};
    row["gewicht"] = "Item 1";
    row["amUm"] = "Item 1";
    row["nr"] = "Item 1";
    row["statusBezeichung"] = "Item 1";
    data[i] = row;
    }
    var source =
    {
    localdata: data,
    datatype: "array"
    };
    var dataAdapter = new $.jqx.dataAdapter(source);
    // Wenn ein bestimmter Status
    var crlieferscheinLink = function (row, columnfield, value, defaulthtml, columnproperties) {
    if (value != ' ' ) {
    return '<span style="margin: 4px; float: ' + columnproperties.cellsalign + '; color: #0000ff;">' + value + '</span>';
    } else {
    return '<span style="margin: 4px; float: ' + columnproperties.cellsalign + '; color: #008000;">' + value + '</span>';
    }
    }
    $("#sendung_"+id).jqxGrid(
    {
    width: 600,
    height: 560,
    pagesizeoptions: ['5', '10', '20'],
    autoheight: true,
    sortable: true,
    source: dataAdapter,
    columns: [
    { text: 'SendungsId', datafield: 'nr', width: 100, cellsrenderer: crlieferscheinLink },
    { text: 'Gewicht[kg]', datafield: 'gewicht', width: 100 },
    { text: 'Datum/Uhrzeit', datafield: 'amUm', width: 160 },
    { text: 'Status', datafield: 'statusBezeichung', width: 100 }
    ]
    });
    }
    var initStatusHistorieTab = function (id) {
    var dataAdapter = getDataAdapterStatus(id);
    $(("#statusHistorie_"+id)).jqxGrid(
    {
    width: 600,
    height: 560,
    source: dataAdapter,
    theme: theme,
    // pageable: true,
    pagesizeoptions: ['5', '10', '20'],
    autoheight: true,
    sortable: true,
    columns: [
    { text: 'Code', datafield: 'statusCode', width: 100 },
    { text: 'Bezeichung', datafield: 'statusText', width: 100 },
    { text: 'Datum/Uhrzeit', datafield: 'statusGueltigAbAmUm', width: 160 }
    ]
    });
    }
    var initAuftragsRowDetails = function (index, parentElement, gridElement, record) {
    var id = "";//record.uid.toString();
    var grid = $($(parentElement).children()[0]);
    tmpRecord = record;
    grid.append($("<div id='sendung_"+record['id']+"' ></div>"));
    grid.append($("<div id='statusHistorie_"+record['id']+"' ></div>"));
    grid.jqxTabs({autoHeight: true });
    grid.jqxTabs({initTabContent: function (tab) {
    switch (tab) {
    case 0:
    initSendungsTab(record['id']);
    break;
    case 1:
    initStatusHistorieTab(record['id']);
    break;
    }
    }});
    }
    var data = new Array();
    for (var i = 0; i < 200; i++) {
    var row = {};
    row["ldref"] = "Item 1";
    row["empfaengerNr"] = "Item 1";
    row["empfaengerRef"] = "Item 1";
    row["kundenRef"] = "Item 1";
    row["tdl"] = "Item 1";
    row["strasse"] = "Item 1";
    row["plz"] = "Item 1";
    row["ort"] = "Item 1";
    row["landCode"] = "Item 1";
    row["gewicht"] = "Item 1";
    row["anzahlSendungen"] = "Item 1";
    data[i] = row;
    }
    var source =
    {
    localdata: data,
    datatype: "array"
    };
    var dataAdapterAuftraege = new $.jqx.dataAdapter(source);
    $("#jqxgrid").jqxGrid(
    {
    width: 1180,
    height: 200,
    source: dataAdapterAuftraege,
    pageable: true,
    pagesizeoptions: ['10', '25', '50', '100'],
    pagesize: 25,
    autoheight: true,
    sortable: true,
    rowdetails: true,
    rowdetailstemplate: {
    rowdetails: "<div style='margin: 10px;'><ul style='margin-left: 30px;'><li>Sendungen</li><li>Statushistorie</li></ul></div>"
    ,autoheight: true},
    initrowdetails: initAuftragsRowDetails,
    columns: [
    { text: 'LD-Ref.', datafield: 'ldref', width: 100 },
    { text: 'BT-KD.NR.', datafield: 'empfaengerNr', width: 100 },
    { text: 'BT-Ref.', datafield: 'empfaengerRef', width: 100 },
    { text: 'BT-Kd.-Ref', datafield: 'kundenRef', width: 200 },
    { text: 'TDL', datafield: 'tdl', width: 100 },
    { text: 'Strasse', datafield: 'strasse', width: 150 },
    { text: 'PLZ', datafield: 'plz', width: 50 },
    { text: 'Ort', datafield: 'ort', width: 100 },
    { text: 'LandCode', datafield: 'landCode', width: 100 },
    { text: 'Gewicht[kg]', datafield: 'gewicht', width: 50 },
    { text: 'Sendungen', datafield: 'anzahlSendungen', width: 100 }]
    });
    });
    </script>
    </head>
    <body>
    <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;">
    <div id="jqxgrid">
    </div>
    </div>
    </body>
    </html>

    Best Regards,
    Peter SToev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.