From 9b3bc0b3cdbd52681f3b167cf39d3a3c67d2cc1e Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Mon, 8 Oct 2007 17:49:42 +0000 Subject: [PATCH] photographer und owner werden mit dem de/aktivieren der entsprechenden Bloecke auch de/aktiviert --- js/personAdmin/person.js | 78 ++++++++++++++++++------------------ js/personAdmin/personInUp.js | 10 +---- 2 files changed, 41 insertions(+), 47 deletions(-) diff --git a/js/personAdmin/person.js b/js/personAdmin/person.js index 0571548..dcafa7e 100644 --- a/js/personAdmin/person.js +++ b/js/personAdmin/person.js @@ -26,19 +26,19 @@ function c_person (personId, photographerId, ownerId, firstname, surname, { if (this.personId != -1) { - this.personId = -1; - this.photographerId = -1; - this.ownerId = -1; - this.firstname = ''; - this.surname = ''; - this.company = ''; - this.email = ''; - this.url = ''; - this.cameraId = -1; - this.wmWidth = ''; - this.wmHeight = ''; - this.wmXPos = ''; - this.wmYPos = ''; + this.personId = this._personId = -1; + this.photographerId = this._photographerId = -1; + this.ownerId = this._ownerId = -1; + this.firstname = this._firstname = ''; + this.surname = this._surname = ''; + this.company = this._company = ''; + this.email = this._email = ''; + this.url = this._url = ''; + this.cameraId = this._cameraId = -1; + this.wmWidth = this._wmWidth = ''; + this.wmHeight = this._wmHeight = ''; + this.wmXPos = this._wmXPos = ''; + this.wmYPos = this._wmYPos = ''; if (this.personForm != null) this.personForm.updateForm (); @@ -47,19 +47,19 @@ function c_person (personId, photographerId, ownerId, firstname, surname, this.reset = function () { - this.personId = -1; - this.photographerId = -1; - this.ownerId = -1; - this.firstname = ''; - this.surname = ''; - this.company = ''; - this.email = ''; - this.url = ''; - this.cameraId = -1; - this.wmWidth = ''; - this.wmHeight = ''; - this.wmXPos = ''; - this.wmYPos = ''; + this.personId = this._personId; + this.photographerId = this._photographerId; + this.ownerId = this._ownerId; + this.firstname = this._firstname; + this.surname = this._surname; + this.company = this._company; + this.email = this._email; + this.url = this._url; + this.cameraId = this._cameraId; + this.wmWidth = this._wmWidth; + this.wmHeight = this._wmHeight; + this.wmXPos = this._wmXPos; + this.wmYPos = this._wmYPos; if (this.personForm != null) this.personForm.updateForm (); @@ -69,19 +69,19 @@ function c_person (personId, photographerId, ownerId, firstname, surname, { if (this.personId != p.personId) { - this.personId = p.personId; - this.photographerId = p.photographerId; - this.ownerId = p.ownerId; - this.firstname = p.firstname; - this.surname = p.surname; - this.company = p.company; - this.email = p.email; - this.url = p.url; - this.cameraId = p.cameraId; - this.wmWidth = p.wmWidth; - this.wmHeight = p.wmHeight; - this.wmXPos = p.wmXPos; - this.wmYPos = p.wmYPos; + this.personId = this._personId = p.personId; + this.photographerId = this._photographerId = p.photographerId; + this.ownerId = this._ownerId = p.ownerId; + this.firstname = this._firstname = p.firstname; + this.surname = this._surname = p.surname; + this.company = this._company = p.company; + this.email = this._email = p.email; + this.url = this._url = p.url; + this.cameraId = this._cameraId = p.cameraId; + this.wmWidth = this._wmWidth = p.wmWidth; + this.wmHeight = this._wmHeight = p.wmHeight; + this.wmXPos = this._wmXPos = p.wmXPos; + this.wmYPos = this._wmYPos = p.wmYPos; if (this.personForm != null) this.personForm.updateForm (); diff --git a/js/personAdmin/personInUp.js b/js/personAdmin/personInUp.js index e978b5e..3504e5d 100644 --- a/js/personAdmin/personInUp.js +++ b/js/personAdmin/personInUp.js @@ -64,17 +64,11 @@ function personInUp ( switch (titleId) { case 'title_photographer': - if (this.person._photographerId != -1) - this.person.photographerId = this.person._photographerId; - else - this.person.photographerId = 0; + this.person.photographerId = -1; break; case 'title_owner': - if (this.person._ownerId != -1) - this.person.ownerId = this.person._ownerId; - else - this.person.ownerId = 0; + this.person.ownerId = -1; } } }