Author: jablko
Date: Fri Oct 29 16:52:28 2010
New Revision: 8698
Log:
Cosmetic change
Modified:
trunk/apps/qubit/modules/informationobject/templates/_event.php
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_event.php
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
Modified: trunk/apps/qubit/modules/informationobject/templates/_event.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/_event.php Fri Oct
29 16:45:30 2010 (r8697)
+++ trunk/apps/qubit/modules/informationobject/templates/_event.php Fri Oct
29 16:52:28 2010 (r8698)
@@ -52,31 +52,15 @@
// Add special rendering rules
var handleFieldRender = function (fname)
{
- var matches = fname.match(/(\w+)\[(\w+)\]/);
- if (null == matches)
+ if (-1 !== fname.indexOf('date')
+ && 1 > this.getField('date').value.length
+ && (0 < this.getField('startDate').value.length
+ || 0 < this.getField('endDate').value.length))
{
- return this.renderField(fname);
+ return this.getField('startDate').value + ' - ' +
this.getField('endDate').value;
}
- switch (matches[2])
- {
- case 'date':
-
- if (0 < this.getField('date').value.length)
- {
- return this.getField('date').value;
- }
- else if (0 < this.getField('startDate').value.length && 0 <
this.getField('endDate').value.length)
- {
- return this.getField('startDate').value + ' - ' +
this.getField('endDate').value;
- }
-
- return this.getField('startDate').value;
-
- default:
-
- return this.renderField(fname);
- }
+ return this.renderField(fname);
}
// Define dialog
Modified: trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_event.php
==============================================================================
--- trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_event.php
Fri Oct 29 16:45:30 2010 (r8697)
+++ trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_event.php
Fri Oct 29 16:52:28 2010 (r8698)
@@ -70,31 +70,15 @@
// Add special rendering rules
var handleFieldRender = function (fname)
{
- var matches = fname.match(/(\w+)\[(\w+)\]/);
- if (null == matches)
+ if (-1 !== fname.indexOf('date')
+ && 1 > this.getField('date').value.length
+ && (0 < this.getField('startDate').value.length
+ || 0 < this.getField('endDate').value.length))
{
- return this.renderField(fname);
+ return this.getField('startDate').value + ' - ' +
this.getField('endDate').value;
}
- switch (matches[2])
- {
- case 'date':
-
- if (0 < this.getField('date').value.length)
- {
- return this.getField('date').value;
- }
- else if (0 < this.getField('startDate').value.length && 0 <
this.getField('endDate').value.length)
- {
- return this.getField('startDate').value + ' - ' +
this.getField('endDate').value;
- }
-
- return this.getField('startDate').value;
-
- default:
-
- return this.renderField(fname);
- }
+ return this.renderField(fname);
}
// Define dialog
Modified:
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
==============================================================================
---
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
Fri Oct 29 16:45:30 2010 (r8697)
+++
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/templates/_relatedAuthorityRecord.php
Fri Oct 29 16:52:28 2010 (r8698)
@@ -82,31 +82,15 @@
// Add special rendering rules
var handleFieldRender = function (fname)
{
- var matches = fname.match(/(\w+)\[(\w+)\]/);
- if (null == matches)
+ if (-1 !== fname.indexOf('date')
+ && 1 > this.getField('date').value.length
+ && (0 < this.getField('startDate').value.length
+ || 0 < this.getField('endDate').value.length))
{
- return this.renderField(fname);
+ return this.getField('startDate').value + ' - ' +
this.getField('endDate').value;
}
- switch (matches[2])
- {
- case 'date':
-
- if (0 < this.getField('date').value.length)
- {
- return this.getField('date').value;
- }
- else if (0 < this.getField('startDate').value.length && 0 <
this.getField('endDate').value.length)
- {
- return this.getField('startDate').value + ' - ' +
this.getField('endDate').value;
- }
-
- return this.getField('startDate').value;
-
- default:
-
- return this.renderField(fname);
- }
+ return this.renderField(fname);
}
// Define dialog
Modified:
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
==============================================================================
---
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
Fri Oct 29 16:45:30 2010 (r8697)
+++
trunk/plugins/sfIsdfPlugin/modules/sfIsdfPlugin/templates/_relatedFunction.php
Fri Oct 29 16:52:28 2010 (r8698)
@@ -80,31 +80,15 @@
// Add special rendering rules
var handleFieldRender = function (fname)
{
- var matches = fname.match(/(\w+)\[(\w+)\]/);
- if (null == matches)
+ if (-1 !== fname.indexOf('date')
+ && 1 > this.getField('date').value.length
+ && (0 < this.getField('startDate').value.length
+ || 0 < this.getField('endDate').value.length))
{
- return this.renderField(fname);
+ return this.getField('startDate').value + ' - ' +
this.getField('endDate').value;
}
- switch (matches[2])
- {
- case 'date':
-
- if (0 < this.getField('date').value.length)
- {
- return this.getField('date').value;
- }
- else if (0 < this.getField('startDate').value.length && 0 <
this.getField('endDate').value.length)
- {
- return this.getField('startDate').value + ' - ' +
this.getField('endDate').value;
- }
-
- return this.getField('startDate').value;
-
- default:
-
- return this.renderField(fname);
- }
+ return this.renderField(fname);
}
Drupal.behaviors.relatedFunction = {
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.