Revision 3725:b47f38c701ee,
665 bytes
checked in by franck <carnet.franck.paul@…>, 7 years ago
(diff) |
Use specialized input fields (color, email, url, number, …) where is relevant
|
Line | |
---|
1 | /*global $, dotclear */ |
---|
2 | 'use strict'; |
---|
3 | |
---|
4 | $(function() { |
---|
5 | // Enable submet button only if mandotory field is not empty |
---|
6 | $('#link-insert-ok').prop('disabled', true); |
---|
7 | $('#link-insert-ok').addClass('disabled'); |
---|
8 | $('#href').keyup(function() { |
---|
9 | $('#link-insert-ok').prop('disabled', (this.value == '' ? true : false)); |
---|
10 | $('#link-insert-ok').toggleClass('disabled', (this.value == '' ? true : false)); |
---|
11 | }); |
---|
12 | |
---|
13 | // Set focus on #href input |
---|
14 | $('#href').focus(); |
---|
15 | |
---|
16 | // Deal with enter key on link insert popup form : every form element will be filtered but Cancel button |
---|
17 | dotclear.enterKeyInForm('#link-insert-form', '#link-insert-ok', '#link-insert-cancel'); |
---|
18 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.