HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/slfopp7cb1df/public_html/sitepacket.com/system/app/Views/dashboards/sticky_note_widget.php
<?php
$textarea_style = "";
if ($custom_class == "h377") {
    $textarea_style = "height:330px";
}
?>

<div class="card bg-white <?php echo $custom_class; ?>">
    <div class="card-header">
        <i data-feather="book" class="icon-16"></i>&nbsp; <?php echo app_lang("sticky_note"); ?>
    </div>
    <div id="sticky-note-container">
        <?php
        echo form_textarea(array(
            "id" => "sticky-note",
            "name" => "note",
            "value" => $login_user->sticky_note ? $login_user->sticky_note : "",
            "class" => "sticky-note",
            "style" => $textarea_style
        ));
        ?>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function () {
        var $stickyNote = $("#sticky-note");

        var saveStickyNote = function () {
            appAjaxRequest({
                url: "<?php echo get_uri("dashboard/save_sticky_note") ?>",
                data: {sticky_note: $stickyNote.val()},
                cache: false,
                type: 'POST'
            });
        };

        $stickyNote.change(function () {
            saveStickyNote();
        });

        //save sticky not on window refresh/tab close/browser close
        $stickyNote.keydown(function () {
            window.addEventListener("beforeunload", function (e) {
                saveStickyNote();
            });
        });
    });
</script>