Jsgrid: password field type

Created on 1 Feb 2018  路  1Comment  路  Source: tabalinas/jsgrid

Feature Request:
- password field
- in an admin table panel to manage setting of user password

enhancement

Most helpful comment

         var MyPasswordField = function (config) {
             jsGrid.Field.call(this, config);
          };

        MyPasswordField.prototype = new jsGrid.Field({
            sorter: function (pass1, pass2) {

                if (pass1 < pass2) {
                    return -1;
                } else if (pass1 > pass2) {
                    return  1;
                } else {
                    return 0;
                }
            },

            itemTemplate: function (value) {
                return "<input type='password' value='" + value + "'  style='border:none;background:transparent;' >";
            },

            insertTemplate: function (value) {
                return this._insertPicker = $("<input type='password'  >");

            },

            editTemplate: function (value) {
                return this._editPicker = $("<input type='password' value='" + value + "'  >");

            },

            insertValue: function () {
                return this._insertPicker.val();

            },

            editValue: function () {
                return this._editPicker.val();

            }
        });

        jsGrid.fields.myPasswordField = MyPasswordField;

>All comments

         var MyPasswordField = function (config) {
             jsGrid.Field.call(this, config);
          };

        MyPasswordField.prototype = new jsGrid.Field({
            sorter: function (pass1, pass2) {

                if (pass1 < pass2) {
                    return -1;
                } else if (pass1 > pass2) {
                    return  1;
                } else {
                    return 0;
                }
            },

            itemTemplate: function (value) {
                return "<input type='password' value='" + value + "'  style='border:none;background:transparent;' >";
            },

            insertTemplate: function (value) {
                return this._insertPicker = $("<input type='password'  >");

            },

            editTemplate: function (value) {
                return this._editPicker = $("<input type='password' value='" + value + "'  >");

            },

            insertValue: function () {
                return this._insertPicker.val();

            },

            editValue: function () {
                return this._editPicker.val();

            }
        });

        jsGrid.fields.myPasswordField = MyPasswordField;
Was this page helpful?
0 / 5 - 0 ratings