Ejemplo n.º 1
0
    ?>
',
            desc:  '<?php 
    echo __js('Set this achievement as expired');
    ?>
',
            url:   '<?php 
    echo url_for(array('controller' => 'achievements', 'action' => 'set_expired', 'id' => $achievement->id));
    ?>
',
            class: 'expiredLink'
        },
        3: {
            title: '<?php 
    echo __js('Delete');
    ?>
',
            desc:  '<?php 
    echo __js('Delete this achievement');
    ?>
',
            url:   '<?php 
    echo url_for(array('controller' => 'achievements', 'action' => 'delete', 'id' => $achievement->id));
    ?>
',
            class: 'deleteLink'
        }
    });
</script>
<?php 
}
Ejemplo n.º 2
0
    
    function validateLogin() {
        var isEmptyPasswordAllowed = false;
        
        if ($('#txtUsername').val() == '') {
            showMessage('<?php 
echo __js('Username cannot be empty');
?>
');
            return false;
        }
        
        if (!isEmptyPasswordAllowed) {
            if ($('#txtPassword').val() == '') {
                showMessage('<?php 
echo __js('Password cannot be empty');
?>
');
                return false;
            }
        }
        
        return true;
    }
    
    $(document).ready(function() {
        /*Set a delay to compatible with chrome browser*/
        setTimeout(checkSavedUsernames,100);
        
        $('#txtUsername').focus(function() {
            removeHint();