Commit 15c54b6333def0ce3af18691803ebbb4d549e366

Authored by Georg Hopp
1 parent 9b3bc0b3

photographer und owner werden mit dem de/aktivieren der entsprechenden Bloecke auch de/aktiviert

... ... @@ -25,6 +25,12 @@
25 25 font-weight: bold;
26 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 34 .f-box-head1 {
29 35 font-family: verdana, sans-serif;
30 36 font-size: 10pt;
... ...
... ... @@ -35,42 +35,30 @@ function personInUp (
35 35 var blockElement = titleElement.parentNode;
36 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 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 64 this.de_activate = function (field)
... ... @@ -88,17 +76,26 @@ function personInUp (
88 76
89 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 89 if (id != -1)
95 90 {
96 91 element.style.display = 'block';
  92 + title.className = classes + ' f-grp-head1';
97 93 img.src = this.arrDown.getImgUrl (title);
98 94 }
99 95 else
100 96 {
101 97 element.style.display = 'none';
  98 + title.className = classes + ' f-grp-head-unset1';
102 99 img.src = this.arrRight.getImgUrl (title);
103 100 }
104 101 }
... ...
... ... @@ -35,6 +35,20 @@
35 35 <td style="vertical-align: middle"><?=_('insert')?></td>
36 36 <td align="right" width="100%">
37 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 52 value="<?=_('submit')?>" disabled="true" />
39 53 </td>
40 54 </tr></table>
... ... @@ -92,7 +106,7 @@
92 106 </div>
93 107
94 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 110 id="title_photographer">
97 111 <img style="
98 112 position: relative;
... ... @@ -116,7 +130,7 @@
116 130 </div>
117 131
118 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 134 id="title_owner">
121 135 <img style="
122 136 position: relative;
... ...
Please register or login to post a comment