1 |
85ad3d82
|
Assos Assos
|
(function ($) {
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
Drupal.behaviors.menuAttributesOptionsSummary = {
|
7 |
|
|
attach: function (context) {
|
8 |
|
|
|
9 |
|
|
$('fieldset#edit-title', context).drupalSetSummary(function (context) {
|
10 |
|
|
if (!$('input[type="checkbox"]:checked', context).val()) {
|
11 |
|
|
return Drupal.t('Disabled');
|
12 |
|
|
}
|
13 |
|
|
var value = $('.form-textarea', context).val();
|
14 |
|
|
if (!value) {
|
15 |
|
|
return Drupal.t('No title');
|
16 |
|
|
}
|
17 |
|
|
else {
|
18 |
|
|
return Drupal.checkPlain(value);
|
19 |
|
|
}
|
20 |
|
|
});
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
$('fieldset#edit-id', context).drupalSetSummary(function (context) {
|
24 |
|
|
if (!$('input[type="checkbox"]:checked', context).val()) {
|
25 |
|
|
return Drupal.t('Disabled');
|
26 |
|
|
}
|
27 |
|
|
var value = $('.form-text', context).val();
|
28 |
|
|
if (!value) {
|
29 |
|
|
return Drupal.t('No ID');
|
30 |
|
|
}
|
31 |
|
|
else {
|
32 |
|
|
return Drupal.checkPlain(value);
|
33 |
|
|
}
|
34 |
|
|
});
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
$('fieldset#edit-name', context).drupalSetSummary(function (context) {
|
38 |
|
|
if (!$('input[type="checkbox"]:checked', context).val()) {
|
39 |
|
|
return Drupal.t('Disabled');
|
40 |
|
|
}
|
41 |
|
|
var value = $('.form-text', context).val();
|
42 |
|
|
if (!value) {
|
43 |
|
|
return Drupal.t('No name');
|
44 |
|
|
}
|
45 |
|
|
else {
|
46 |
|
|
return Drupal.checkPlain(value);
|
47 |
|
|
}
|
48 |
|
|
});
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
$('fieldset#edit-rel', context).drupalSetSummary(function (context) {
|
52 |
|
|
if (!$('input[type="checkbox"]:checked', context).val()) {
|
53 |
|
|
return Drupal.t('Disabled');
|
54 |
|
|
}
|
55 |
|
|
var value = $('.form-text', context).val();
|
56 |
|
|
if (!value) {
|
57 |
|
|
return Drupal.t('No relationship');
|
58 |
|
|
}
|
59 |
|
|
else {
|
60 |
|
|
return Drupal.checkPlain(value);
|
61 |
|
|
}
|
62 |
|
|
});
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
$('fieldset#edit-class', context).drupalSetSummary(function (context) {
|
66 |
|
|
if (!$('input[type="checkbox"]:checked', context).val()) {
|
67 |
|
|
return Drupal.t('Disabled');
|
68 |
|
|
}
|
69 |
|
|
var value = $('.form-text', context).val();
|
70 |
|
|
if (!value) {
|
71 |
|
|
return Drupal.t('No classes');
|
72 |
|
|
}
|
73 |
|
|
else {
|
74 |
|
|
return Drupal.checkPlain(value.replace(/\s/g, ', '));
|
75 |
|
|
}
|
76 |
|
|
});
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
$('fieldset#edit-style', context).drupalSetSummary(function (context) {
|
80 |
|
|
if (!$('input[type="checkbox"]:checked', context).val()) {
|
81 |
|
|
return Drupal.t('Disabled');
|
82 |
|
|
}
|
83 |
|
|
var value = $('.form-text', context).val();
|
84 |
|
|
if (!value) {
|
85 |
|
|
return Drupal.t('No style');
|
86 |
|
|
}
|
87 |
|
|
else {
|
88 |
|
|
return Drupal.checkPlain(value);
|
89 |
|
|
}
|
90 |
|
|
});
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
$('fieldset#edit-target', context).drupalSetSummary(function (context) {
|
94 |
|
|
if (!$('input[type="checkbox"]:checked', context).val()) {
|
95 |
|
|
return Drupal.t('Disabled');
|
96 |
|
|
}
|
97 |
|
|
|
98 |
|
|
var value = $('.form-select option:selected', context).text();
|
99 |
|
|
return Drupal.checkPlain(value);
|
100 |
|
|
});
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
$('fieldset#edit-accesskey', context).drupalSetSummary(function (context) {
|
104 |
|
|
if (!$('input[type="checkbox"]:checked', context).val()) {
|
105 |
|
|
return Drupal.t('Disabled');
|
106 |
|
|
}
|
107 |
|
|
var value = $('.form-text', context).val();
|
108 |
|
|
if (!value) {
|
109 |
|
|
return Drupal.t('No access key');
|
110 |
|
|
}
|
111 |
|
|
else {
|
112 |
|
|
return Drupal.checkPlain(value);
|
113 |
|
|
}
|
114 |
|
|
});
|
115 |
|
|
|
116 |
|
|
}
|
117 |
|
|
};
|
118 |
|
|
|
119 |
|
|
})(jQuery); |