lawrencepit / jquery_jeditable forked from tuupola/jquery_jeditable

jQuery edit in place plugin. Extendable via plugin architecture. Plugins for plugin. Really.

This URL has Read+Write access

jquery_jeditable / jquery.jeditable.masked.js
100644 28 lines (26 sloc) 0.739 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
* Masked input for Jeditable
*
* Copyright (c) 2007-2008 Mika Tuupola
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Depends on Masked Input jQuery plugin by Josh Bush:
* http://digitalbush.com/projects/masked-input-plugin
*
* Project home:
* http://www.appelsiini.net/projects/jeditable
*
* Revision: $Id$
*
*/
 
$.editable.addInputType('masked', {
    element : function(settings, original) {
        /* Create an input. Mask it using masked input plugin. Settings */
        /* for mask can be passed with Jeditable settings hash. */
        var input = $('<input />').mask(settings.mask);
        $(this).append(input);
        return(input);
    }
});