Commit 15c54b6333def0ce3af18691803ebbb4d549e366
1 parent
9b3bc0b3
photographer und owner werden mit dem de/aktivieren der entsprechenden Bloecke auch de/aktiviert
Showing
3 changed files
with
52 additions
and
35 deletions
@@ -25,6 +25,12 @@ | @@ -25,6 +25,12 @@ | ||
25 | font-weight: bold; | 25 | font-weight: bold; |
26 | color: #000000 | 26 | color: #000000 |
27 | } | 27 | } |
28 | +.f-grp-head-unset1 { | ||
29 | + font-family: verdana, sans-serif; | ||
30 | + font-size: 10pt; | ||
31 | + font-weight: bold; | ||
32 | + color: #484848 | ||
33 | +} | ||
28 | .f-box-head1 { | 34 | .f-box-head1 { |
29 | font-family: verdana, sans-serif; | 35 | font-family: verdana, sans-serif; |
30 | font-size: 10pt; | 36 | font-size: 10pt; |
@@ -35,42 +35,30 @@ function personInUp ( | @@ -35,42 +35,30 @@ function personInUp ( | ||
35 | var blockElement = titleElement.parentNode; | 35 | var blockElement = titleElement.parentNode; |
36 | var dataElement = blockElement.getElementsByTagName ('div')[1]; | 36 | var dataElement = blockElement.getElementsByTagName ('div')[1]; |
37 | 37 | ||
38 | - if (dataElement.style.display == 'none') | 38 | + var insBox = document.getElementById (this.insBox); |
39 | + var person = (insBox.checked == true)? this.newPerson: this.person; | ||
40 | + | ||
41 | + switch (titleId) | ||
39 | { | 42 | { |
40 | - dataElement.style.display = 'block'; | ||
41 | - imgElement.src = arrDown.getImgUrl (titleElement); | ||
42 | - | ||
43 | - switch (titleId) | ||
44 | - { | ||
45 | - case 'title_photographer': | ||
46 | - if (this.person._photographerId != -1) | ||
47 | - this.person.photographerId = this.person._photographerId; | ||
48 | - else | ||
49 | - this.person.photographerId = 0; | ||
50 | - break; | 43 | + case 'title_photographer': |
44 | + var id = 'photographerId'; | ||
45 | + var _id = '_photographerId'; | ||
46 | + break; | ||
51 | 47 | ||
52 | - case 'title_owner': | ||
53 | - if (this.person._ownerId != -1) | ||
54 | - this.person.ownerId = this.person._ownerId; | ||
55 | - else | ||
56 | - this.person.ownerId = 0; | ||
57 | - } | 48 | + case 'title_owner': |
49 | + var id = 'ownerId'; | ||
50 | + var _id = '_ownerId'; | ||
58 | } | 51 | } |
52 | + | ||
53 | + if (dataElement.style.display == 'none') | ||
54 | + if (person[_id] != -1) | ||
55 | + person[id] = person[_id]; | ||
56 | + else | ||
57 | + person[id] = 0; | ||
59 | else | 58 | else |
60 | - { | ||
61 | - dataElement.style.display = 'none'; | ||
62 | - imgElement.src = arrRight.getImgUrl (titleElement); | ||
63 | - | ||
64 | - switch (titleId) | ||
65 | - { | ||
66 | - case 'title_photographer': | ||
67 | - this.person.photographerId = -1; | ||
68 | - break; | 59 | + person[id] = -1; |
69 | 60 | ||
70 | - case 'title_owner': | ||
71 | - this.person.ownerId = -1; | ||
72 | - } | ||
73 | - } | 61 | + this.un_fold (person[id], dataElement) |
74 | } | 62 | } |
75 | 63 | ||
76 | this.de_activate = function (field) | 64 | this.de_activate = function (field) |
@@ -88,17 +76,26 @@ function personInUp ( | @@ -88,17 +76,26 @@ function personInUp ( | ||
88 | 76 | ||
89 | this.un_fold = function (id, element) | 77 | this.un_fold = function (id, element) |
90 | { | 78 | { |
91 | - title = element.parentNode.getElementsByTagName ('div')[0]; | ||
92 | - img = title.getElementsByTagName ('img')[0]; | 79 | + var title = element.parentNode.getElementsByTagName ('div')[0]; |
80 | + var img = title.getElementsByTagName ('img')[0]; | ||
81 | + | ||
82 | + var classes = ''; | ||
83 | + var _classes = title.className.split (' '); | ||
84 | + | ||
85 | + for (c in _classes) | ||
86 | + if (_classes[c][0] != 'f') | ||
87 | + classes += ' ' + _classes[c]; | ||
93 | 88 | ||
94 | if (id != -1) | 89 | if (id != -1) |
95 | { | 90 | { |
96 | element.style.display = 'block'; | 91 | element.style.display = 'block'; |
92 | + title.className = classes + ' f-grp-head1'; | ||
97 | img.src = this.arrDown.getImgUrl (title); | 93 | img.src = this.arrDown.getImgUrl (title); |
98 | } | 94 | } |
99 | else | 95 | else |
100 | { | 96 | { |
101 | element.style.display = 'none'; | 97 | element.style.display = 'none'; |
98 | + title.className = classes + ' f-grp-head-unset1'; | ||
102 | img.src = this.arrRight.getImgUrl (title); | 99 | img.src = this.arrRight.getImgUrl (title); |
103 | } | 100 | } |
104 | } | 101 | } |
@@ -35,6 +35,20 @@ | @@ -35,6 +35,20 @@ | ||
35 | <td style="vertical-align: middle"><?=_('insert')?></td> | 35 | <td style="vertical-align: middle"><?=_('insert')?></td> |
36 | <td align="right" width="100%"> | 36 | <td align="right" width="100%"> |
37 | <input type="button" id="submit" | 37 | <input type="button" id="submit" |
38 | + onClick="alert (person.personId + ',' + | ||
39 | + person.photographerId + ',' + person.ownerId + ',' + | ||
40 | + person.firstname + ',' + person.surname + ',' + | ||
41 | + person.company + ',' + person.email + ',' + | ||
42 | + person.url + ',' + person.cameraId + ',' + | ||
43 | + person.wmWidth + ',' + person.wmHeight + ',' + | ||
44 | + person.wmXPos + ',' + person.wmYPos); | ||
45 | + alert (newPerson.personId + ',' + | ||
46 | + newPerson.photographerId + ',' + newPerson.ownerId + ',' + | ||
47 | + newPerson.firstname + ',' + newPerson.surname + ',' + | ||
48 | + newPerson.company + ',' + newPerson.email + ',' + | ||
49 | + newPerson.url + ',' + newPerson.cameraId + ',' + | ||
50 | + newPerson.wmWidth + ',' + newPerson.wmHeight + ',' + | ||
51 | + newPerson.wmXPos + ',' + newPerson.wmYPos)" | ||
38 | value="<?=_('submit')?>" disabled="true" /> | 52 | value="<?=_('submit')?>" disabled="true" /> |
39 | </td> | 53 | </td> |
40 | </tr></table> | 54 | </tr></table> |
@@ -92,7 +106,7 @@ | @@ -92,7 +106,7 @@ | ||
92 | </div> | 106 | </div> |
93 | 107 | ||
94 | <div class="bgc-grp1 d-grp1" style="margin-top: 2px"> | 108 | <div class="bgc-grp1 d-grp1" style="margin-top: 2px"> |
95 | - <div class="bgc-grp-head1 f-grp-head1 d-grp-head1" | 109 | + <div class="bgc-grp-head1 f-grp-head-unset1 d-grp-head1" |
96 | id="title_photographer"> | 110 | id="title_photographer"> |
97 | <img style=" | 111 | <img style=" |
98 | position: relative; | 112 | position: relative; |
@@ -116,7 +130,7 @@ | @@ -116,7 +130,7 @@ | ||
116 | </div> | 130 | </div> |
117 | 131 | ||
118 | <div class="bgc-grp1 d-grp1" style="margin-top: 2px"> | 132 | <div class="bgc-grp1 d-grp1" style="margin-top: 2px"> |
119 | - <div class="bgc-grp-head1 f-grp-head1 d-grp-head1" | 133 | + <div class="bgc-grp-head1 f-grp-head-unset1 d-grp-head1" |
120 | id="title_owner"> | 134 | id="title_owner"> |
121 | <img style=" | 135 | <img style=" |
122 | position: relative; | 136 | position: relative; |
Please
register
or
login
to post a comment