[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
r144 - in gnue-pim: . forms schema
From: |
kilo |
Subject: |
r144 - in gnue-pim: . forms schema |
Date: |
Fri, 26 Nov 2004 07:20:54 -0600 (CST) |
Author: kilo
Date: 2004-11-26 07:20:53 -0600 (Fri, 26 Nov 2004)
New Revision: 144
Modified:
gnue-pim/NEWS
gnue-pim/forms/SelectAddr.gfd
gnue-pim/forms/pim.gfd
gnue-pim/schema/pim.gcd
Log:
GNUe PIM.
Address selector form basically works, UI errors though.
Modified: gnue-pim/NEWS
===================================================================
--- gnue-pim/NEWS 2004-11-26 11:19:06 UTC (rev 143)
+++ gnue-pim/NEWS 2004-11-26 13:20:53 UTC (rev 144)
@@ -6,6 +6,8 @@
*Changed name format.
*Moved reusable trigger code.
*Added address selector form.
+*Changed address format.
+*Address add/remove works on the db, ui is broken though...
New features / changes by 2004.11.25.
*Designed new main form.
Modified: gnue-pim/forms/SelectAddr.gfd
===================================================================
--- gnue-pim/forms/SelectAddr.gfd 2004-11-26 11:19:06 UTC (rev 143)
+++ gnue-pim/forms/SelectAddr.gfd 2004-11-26 13:20:53 UTC (rev 144)
@@ -25,10 +25,22 @@
-->
<form style="dialog" xmlns:c="GNUe:Layout:Char" title="Select addresses">
+ <trigger type="On-Startup">
+ form.setFeature('GUI:MENUBAR:SUPPRESS', True)
+ #form.setFeature('GUI:TOOLBAR:SUPPRESS', True)
+ form.setFeature('GUI:STATUSBAR:SUPPRESS', True)
+ </trigger>
+
<options/>
<datasource name="dtsPIM_AdPe" connection="pim" table="PIM_AdPe"
- prequery="Y"/>
+ prequery="Y">
+ <condition>
+ <null>
+ <cfield name="PIM_until"/>
+ </null>
+ </condition>
+ </datasource>
<datasource name="dtsBoundAddr" connection="pim" table="ADDR_Address"
master="dtsPIM_AdPe" masterlink="PIM_addr" detaillink="gnue_id"/>
<datasource name="dtsFreeAddr" connection="pim" table="ADDR_Address"
@@ -36,6 +48,7 @@
<logic>
<block name="blkPIM_AdPe" datasource="dtspim_adpe">
+ <field name="fldGnueId" field="gnue_id" maxLength="32"/>
<field name="fldPimAddr" field="PIM_addr" maxLength="32"/>
<field name="fldPimPerson" field="PIM_person" maxLength="32"/>
</block>
@@ -59,17 +72,38 @@
block="blkFreeAddr" field="fldFormatted" style="listbox"/>
<button name="btnEditFree" c:height="1" c:width="7" c:x="12" c:y="9"
label="Edit...">
+ <trigger type="ON-ACTION" name="btnEditFreeTrigger">
+ params = {'id': blkFreeAddr.fldFormatted.get() or None}
+ form.runForm('ADDR_Address.gfd', params)
+ blkFreeAddr.fldFormatted.resetForeignKey()
+ </trigger>
</button>
<entry name="entBoundAddr" c:height="8" c:width="30" c:x="40" c:y="1"
block="blkBoundAddr" field="fldFormatted" style="listbox"/>
<button name="btnEditBound" c:height="1" c:width="7" c:x="52" c:y="9"
label="Edit...">
+ <trigger type="ON-ACTION" name="btnEditBoundTrigger">
+ params = {'id': blkBoundAddr.fldFormatted.get() or None}
+ form.runForm('ADDR_Address.gfd', params)
+ blkBoundAddr.fldFormatted.resetForeignKey()
+ </trigger>
</button>
<button name="btnAdd" c:height="1" c:width="9" c:x="31" c:y="3"
- label="Add >" />
+ label="Add >">
+ <trigger type="ON-ACTION" name="add">
+ person = blkPIM_AdPe.fldPimPerson.get() or None
+ addr = blkFreeAddr.fldFormatted.get() or None
+ blkPIM_AdPe.call('PIM_add', {'person':person, 'addr':addr})
+ </trigger>
+ </button>
<button name="btnRemove" c:height="1" c:width="9" c:x="31" c:y="5"
- label="< Remove" />
+ label="< Remove">
+ <trigger type="ON-ACTION" name="remove">
+ id = blkPIM_AdPe.fldGnueId.get() or None
+ blkPIM_AdPe.call('PIM_remove', {'id':id})
+ </trigger>
+ </button>
</page>
</layout>
Modified: gnue-pim/forms/pim.gfd
===================================================================
--- gnue-pim/forms/pim.gfd 2004-11-26 11:19:06 UTC (rev 143)
+++ gnue-pim/forms/pim.gfd 2004-11-26 13:20:53 UTC (rev 144)
@@ -96,7 +96,7 @@
<button name="btnEditPerson" c:height="1" c:width="12" c:x="22" c:y="1"
label="Add/Edit...">
<trigger type="ON-ACTION" name="btnEditPersonTrigger">
- params = {'id': blkPIM_AdPe.fldAdpePerson.get() or ''}
+ params = {'id': blkPIM_AdPe.fldAdpePerson.get() or None}
form.runForm('PERSON_Person.gfd', params)
blkPIM_AdPe.fldAdpePerson.resetForeignKey()
</trigger>
@@ -105,11 +105,11 @@
<!--Address box-->
<box name="boxAddress" c:height="6" c:width="58" c:x="1" c:y="3"
label="Addresses" />
- <button name="btnAddAddress" c:height="1" c:width="12" c:x="3" c:y="4"
- label="Add/Edit...">
- <trigger type="ON-ACTION" name="btnEditAddressTrigger">
- params = {'id': blkADDR_Address.fldGnueId.get() or None}
- form.runForm('ADDR_Address.gfd', params)
+ <button name="btnAddAddress" c:height="1" c:width="9" c:x="3" c:y="4"
+ label="Manage...">
+ <trigger type="ON-ACTION" name="btnManageAddressTrigger">
+ params = {'person': blkPIM_AdPe.fldAdpePerson.get() or None}
+ form.runForm('SelectAddr.gfd', params)
form.activateTrigger('Refresh')
</trigger>
</button>
Modified: gnue-pim/schema/pim.gcd
===================================================================
--- gnue-pim/schema/pim.gcd 2004-11-26 11:19:06 UTC (rev 143)
+++ gnue-pim/schema/pim.gcd 2004-11-26 13:20:53 UTC (rev 144)
@@ -25,14 +25,46 @@
-->
<module name="PIM" comment="PIM">
+
<class name="AdPe" comment="Address-Person m:n link">
<property name="person" type="PERSON_Person" />
<property name="addr" type="ADDR_Address" />
<property name="type" type="ADDR_Type" />
<property name="from" type="datetime" />
<property name="until" type="datetime" />
+
+ <procedure name="add" type="boolean" comment="Add an address/person
connection">
+ <parameter name="addr" type="ADDR_Address"/>
+ <parameter name="person" type="PERSON_Person"/>
+ print "PIM_AdPe::add person %s\n, addr %s" % (person, addr)
+ import mx.DateTime
+
+ adpe = new('PIM_AdPe')
+
+ adpe.PIM_person = person
+ adpe.PIM_addr = addr
+ adpe.PIM_from = mx.DateTime.now()
+
+ session.commit()
+ return True
+ </procedure>
+
+ <procedure name="remove" type="boolean" comment="Invalidate an
address/person connection">
+ <parameter name="id" type="id"/>
+ print "PIM_AdPe::remove id %s" % id
+ import mx.DateTime
+
+ adpeList = find('PIM_AdPe',{'gnue_id':id}, [], [])
+ print "PIM_AdPe::remove found %d records" % len(adpeList)
+ adpe = adpeList[0]
+ adpe.PIM_until = mx.DateTime.now()
+
+ session.commit()
+ return True
+ </procedure>
</class>
+
<class name="PeCo" comment="Communication-Person m:n link">
<property name="person" type="PERSON_Person" />
<property name="comm" type="COMM_Comm" />
@@ -41,6 +73,7 @@
<property name="until" type="datetime" />
</class>
+
<class name="AdPa" comment="Address-Party m:n link">
<property name="party" type="PARTY_Party" />
<property name="addr" type="ADDR_Address" />
@@ -49,6 +82,7 @@
<property name="until" type="datetime" />
</class>
+
<class name="PaCo" comment="Communication-Party m:n link">
<property name="party" type="PARTY_Party" />
<property name="comm" type="COMM_Comm" />
@@ -57,6 +91,7 @@
<property name="until" type="datetime" />
</class>
+
<class name="PaPe" comment="Party-Person m:n link">
<property name="party" type="PARTY_Party" />
<property name="person" type="PERSON_Person" />
@@ -64,4 +99,5 @@
<property name="from" type="datetime" />
<property name="until" type="datetime" />
</class>
+
</module>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- r144 - in gnue-pim: . forms schema,
kilo <=