JSFiddle - React, Tailwind, and code Playground

by Irvin Dominin

HTML

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/ui-lightness/jquery-ui.css">
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<div id="content"> <span>
        <button id="filterPartners" title="Filter by partner">Select partner</button>
        <button id="filterPartnersSelect" title="Filter by partner">Select partner</button>
    </span>

    <ul style="z-index:1">
        <li><a href="?op=viewPromotions" idpartner="0">All partners</a>

        </li>
        <li><a href="?op=viewPromotions&amp;idPartner=1" idpartner="3">Partner 1</a>

        </li>
        <li><a href="?op=viewPromotions&amp;idPartner=2" idpartner="1">Partner 2</a>

        </li>
    </ul>
    <hr>
    <table border="1">
        <tbody>
            <tr>
                <th>Col 1</th>
                <th>Col 2</th>
                <th>Col 3</th>
                <th>Col 4</th>
                <th>Interval</th>
                <th>Col 6</th>
            </tr>
            <tr class="ui-state-disabled">
                <td>Val 1</td>
                <td>Val 2</td>
                <td>Val 3</td>
                <td> <strong></strong>

                    <br />
                </td>
                <td>2014-03-15
                    <br />2014-03-31</td>
                <td>Val 6
                    <br />
                </td>
            </tr>
        </tbody>
    </table>
</div>

CSS

#content table a {
    color: inherit;
    padding-right: 20px;
    background: url(images/icons/anchor.png) no-repeat right center;
}
table tbody tr th {
    text-align: left;
}
table tbody tr th.ui-dialog-titlebar.ui-widget-header {
    text-align: inherit;
}
.ui-widget, .ui-widget * {
    font-size: 12px;
}
.ui-menu {
    position: absolute;
    width: 120px;
}
.user_type_1 {
    color: red;
    font-weight: bolder;
}
.user_type_2 {
    color: orange;
    font-weight: bolder;
}
.user_type_3 {
    color: blue;
    font-weight: bold;
}
.user_type_4 {
    color: green;
}
.user_type_5 {
    /*color: black;*/
}
.ui-dialog-content.ui-widget-content table td {
    white-space: nowrap;
}
.ui-dialog.ui-widget.ui-widget-content.ui-corner-all.ui-front.ui-dialog-buttons.ui-draggable.ui-resizable {
    min-width: 400px;
}
#addPartnerErrors, #addPromotionErrors, #addPackageErrors, #addServiceErrors, #addUserErrors, #addClientErrors {
    padding: 5px 5px 5px 42px;
    /*line-height: 20px;*/
    min-height: 32px;
    background: url("images/icons/warning32.png") 5px 5px no-repeat;
}

JavaScript

$(function () {
    $("#filterCanceledType").buttonset();
    $("#content").on("change", "#filterCanceledType :radio", function () {
        location.href = "?op=viewPromotions&idPartner=xxx";
    });

    $("#filterPartners").button().button("disable").click(function () {
        // buton dezactivat, nu avem nevoie de click(). ramane totusi pentru viitor
    }).next().button({
        text: false,
        icons: {
            primary: "ui-icon-triangle-1-s"
        }
    }).click(function () {
        var menuPartners = $(this).parent().next().show().position({
            my: "right top",
            at: "right bottom",
            of: this
        });
        $(document).one("click", function () {
            menuPartners.hide();
        });
        return false;
    }).parent().buttonset().next().hide().menu();
});