Location: PHPKode > projects > phlyMail Lite > phlymail/frontend/templates/folderproperties.tpl
<script type="text/javascript">
/*<![CDATA[*/
function submit_rename()
{<!-- START js_norename -->
    return false;<!-- END js_norename -->
    return false;
}

function submit_icon() // This will fade in a list with possible icons for selecting one
{<!-- START js_noicon -->
    return false;<!-- END js_noicon -->
    return false;
}

function on_view_default()
{
    $('#show_fields_area').css('display', $('#view_default').is(':checked') ? 'none' : 'block');
}

function open_export()
{
    window.open
            ('{exportwinurl}'
            ,'export_' + new Date().getTime()
            ,'top=200,left=200,width=460,height=200,scrollbars=no,resizable=yes,location=no,menubar=no,status=yes,toolbar=no'
            );
}

function open_subscribe()
{
    window.open
            ('{subscribewinurl}'
            ,'subscribe_' + new Date().getTime()
            ,'top=200,left=200,width=460,height=600,scrollbars=no,resizable=yes,location=no,menubar=no,status=yes,toolbar=no'
            );
}

function open_hidefolders()
{
    window.open
            ('{hidefolderswinurl}'
            ,'hidefolders_' + new Date().getTime()
            ,'top=200,left=200,width=460,height=600,scrollbars=no,resizable=yes,location=no,menubar=no,status=yes,toolbar=no'
            );
}

function draw_bar(bid, klimit, usage, keep)
{
    var g, r;
    var cont = document.getElementById(bid + '_cont');
    var bar = document.getElementById(bid + '_bar');
    if (((usage == '' || klimit == '' || usage == 0 || klimit == 0) && keep != 1)
            || (usage == 0 && klimit == 0 && keep == 1)) {
        bar.style.visibility = 'hidden';
        cont.title = '0%';
        return;
    }
    // Since MSIE fails to read cont.offsetWidth I had to set the value from the style.width setting manually
    var fullwidth = 40; // cont.offsetWidth;

    klimit = klimit * 1;
    usage  = usage * 1;
    if (usage >= klimit) {
        bar.style.width = fullwidth + 'px';
        bar.style.height = '12px';
        bar.style.backgroundColor = '#FF0000';
        cont.title = '>= 100%';
    } else {
        var prozent = Math.round(100 * usage / klimit);
        bar.style.width = (fullwidth * prozent / 100) + 'px';
        bar.style.height = '12px';
        g = r = 100;
        if (prozent < 50) {
            r = prozent * 2;
        } else if (prozent > 50) {
            g = (100-prozent) * 2;
        }
        bar.style.backgroundColor = 'rgb(' + r + '%,' + g + '%,0%)';
        cont.title = prozent + '%';
    }
}

function adjust_height()
{
    var wh = $(window).height();
    var dh = $(document).height();
    var ww = $(window).width();
    var dw = $(document).width();
    window.resizeBy(ww < dw ? dw-ww : 0, wh < dh ? dh-wh : 0);
}

$(document).ready(function() {
    addsel = document.getElementById('addselect');
    addform = document.getElementById('selected_form');
    on_view_default();
    $('#showfields_sortable').sortable().disableSelection();
    adjust_height();
})
/*]]>*/
</script>
<div class="l">
    <fieldset>
        <legend>{msg_properties}</legend>
        <div style="float:left;padding:10px;margin-right:10px;">
            <img src="{big_icon}" alt="Folder Icon" style="display:block;" />
        </div>
        <table border="0" cellpadding="2" cellspacing="0">
            <tr>
                <td class="l t">{msg_name}:&nbsp;</td>
                <td class="l t">{foldername}</td>
            </tr>
            <tr>
                <td class="l t">{msg_type}:&nbsp;</td>
                <td class="l t">{type}</td>
            </tr>
            <tr>
                <td class="l" colspan="2">{msg_has_folders}: {has_folders}</td>
            </tr>
            <tr>
                <td class="l" colspan="2">{msg_has_items}: {has_items}</td>
            </tr>
        </table>
        <div><!-- START has_export -->
            <button type="button" onclick="open_export();">{msg_export}</button><!-- END has_export --><!-- START has_subscribe -->
            <button type="button" onclick="open_subscribe();">{msg_subscribe}</button><!-- END has_subscribe --><!-- START has_hidefolders -->
            <button type="button" onclick="open_hidefolders();">{msg_hidefolders}</button><!-- END has_hidefolders -->
        </div>
    </fieldset>
    <br />
    <!-- START plugin --><!-- END plugin --><!-- START display -->
    <fieldset>
        <legend>{leg_display}</legend>
        <form action="{form_target}" method="post" name="fieldsform">
            <div id="preview"<!-- START nopreview --> style="display:none;"<!-- END nopreview -->>
                <input type="checkbox" name="show_preview" value="1" id="chk_preview"<!-- START show_preview --> checked="checked"<!-- END show_preview --> />
                <label for="chk_preview">{msg_use_preview}</label>
                <br />
            </div>
            <div id="cnt_default"<!-- START noviewdefault --> style="display:none;"<!-- END noviewdefault -->>
                <input type="checkbox" name="view_default" onclick="on_view_default();" value="1" id="view_default"<!-- START view_default --> checked="checked"<!-- END view_default --> />
                <label for="view_default" onclick="on_view_default();">{msg_use_default}</label><br />
            </div>
            <div id="show_fields_area">
                <ul id="showfields_sortable" class="l sendmenubut sendmenuborder"><!-- START dbline -->
                    <li id="cont_{id}">
                        <span class="ui-icon"></span>
                        <input type="checkbox" name="show_field[{id}]" value="1" id="show_field_{id}"<!-- START checked --> checked="checked"<!-- END checked --> />
                        <label id="lbl_sf_{id}" for="show_field_{id}"><strong>{value}</strong></label>
                    </li><!-- END dbline -->
                </ul><!-- START has_set_as_default -->
                <div id="cont_set_as_default">
                    <input type="checkbox" name="set_as_default" value="1" id="set_as_default" />
                    <label for="set_as_default">{msg_set_as_default}</label>
                </div><!-- END has_set_as_default -->
            </div><!-- START has_orderby -->
            <div style="padding:4px 0 4px 0;">
                {msg_orderby}:
                <select size="1" name="orderby"><!-- START orderline -->
                    <option value="{val}"<!-- START sel --> selected="selected"<!-- END sel -->>{name}</option><!-- END orderline -->
                </select>
                <select size="1" name="orderdir">
                    <option value="ASC"<!-- START selasc --> selected="selected"<!-- END selasc -->>{msg_asc}</option>
                    <option value="DESC"<!-- START seldesc --> selected="selected"<!-- END seldesc -->>{msg_desc}</option>
                </select>
            </div><!-- END has_orderby --><!-- START has_groupby -->
            <div style="padding:4px 0 4px 0;">
                {msg_groupby}:
                <select size="1" name="groupby"><!-- START groupline -->
                    <option value="{val}"<!-- START sel --> selected="selected"<!-- END sel -->>{name}</option><!-- END groupline -->
                </select>
            </div><!-- END has_groupby --><!-- START has_show_in_root -->
            <div>
                <input type="checkbox" name="show_in_root" id="show_in_root" value="1"<!-- START show_in_root --> checked="checked"<!-- END show_in_root --> />
                <label for="show_in_root">{msg_show_in_root}</label>
            </div><!-- END has_show_in_root --><!-- START has_show_in_sync -->
            <div>
                <input type="checkbox" name="show_in_sync" id="show_in_sync" value="1"<!-- START show_in_sync --> checked="checked"<!-- END show_in_sync --> />
                <label for="show_in_sync">{msg_show_in_sync}</label>
            </div><!-- END has_show_in_sync --><!-- START has_show_in_pinboard -->
            <div>
                <input type="checkbox" name="show_in_pinboard" id="show_in_pinboard" value="1"<!-- START show_in_pinboard --> checked="checked"<!-- END show_in_pinboard --> />
                <label for="show_in_pinboard">{msg_show_in_pinboard}</label>
            </div><!-- END has_show_in_pinboard -->
            <input type="submit" value="{msg_save}" />
            <br />
        </form>
    </fieldset>
    <br /><!-- END display --><!-- START quotas -->
    <fieldset>
        <legend>{leg_quotas}</legend>
        <table border="0" cellpadding="2" cellspacing="0"><!-- START quotaline -->
            <tr>
                <td>{msg_crit}</td>
                <td>{msg_use}</td>
                <td> / </td>
                <td>{msg_limit}</td>
                <td>
                    <div id="{crit_id}_cont" class="quotabar_cont"><div id="{crit_id}_bar"></div></div>
                    <script type="text/javascript">/*<![CDATA[*/draw_bar("{crit_id}", {limit}, {use});/*]]>*/</script>
                </td>
            </tr><!-- END quotaline -->
        </table>
    </fieldset>
    <br /><!-- END quotas --><!-- START webapi -->
    <fieldset>
        <legend>{leg_api}</legend>
        {about_webapi}<br />
        <br />
        <input type="text" name="" value="{url}" readonly="readonly" size="64" style="width:95%" />
    </fieldset>
    <br /><!-- END webapi -->
</div>
Return current item: phlyMail Lite