Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 156... Línea 156...
156
     *
156
     *
157
     * @method  isEditing
157
     * @method  isEditing
158
     * @return  {Boolean}            True if edit mode is enabled
158
     * @return  {Boolean}            True if edit mode is enabled
159
     */
159
     */
160
    PasswordUnmask.prototype.isEditing = function() {
160
    PasswordUnmask.prototype.isEditing = function() {
161
        return this.inputField.hasClass('d-inline-block');
161
        return !this.inputField.hasClass('d-none');
162
    };
162
    };
Línea 163... Línea 163...
163
 
163
 
164
    /**
164
    /**
165
     * Enable the editing functionality.
165
     * Enable the editing functionality.
Línea 176... Línea 176...
176
            this.inputField.attr('type', 'password');
176
            this.inputField.attr('type', 'password');
177
        }
177
        }
178
        this.inputField.val(value);
178
        this.inputField.val(value);
179
        this.inputField.attr('size', this.inputField.attr('data-size'));
179
        this.inputField.attr('size', this.inputField.attr('data-size'));
180
        // Show the field.
180
        // Show the field.
181
        this.inputField.addClass('d-inline-block');
181
        this.inputField.removeClass('d-none');
Línea 182... Línea 182...
182
 
182
 
183
        if (this.editInstructions.length) {
183
        if (this.editInstructions.length) {
184
            this.inputField.attr('aria-describedby', this.editInstructions.attr('id'));
184
            this.inputField.attr('aria-describedby', this.editInstructions.attr('id'));
185
            this.editInstructions.show();
185
            this.editInstructions.show();
Línea 216... Línea 216...
216
        this.inputField
216
        this.inputField
217
            // Ensure that the aria-describedby is removed.
217
            // Ensure that the aria-describedby is removed.
218
            .attr('aria-describedby', null);
218
            .attr('aria-describedby', null);
219
        this.inputField.val(value);
219
        this.inputField.val(value);
220
        // Hide the field again.
220
        // Hide the field again.
221
        this.inputField.removeClass('d-inline-block');
221
        this.inputField.addClass('d-none');
Línea 222... Línea 222...
222
 
222
 
Línea 223... Línea 223...
223
        this.editInstructions.hide();
223
        this.editInstructions.hide();
224
 
224