Author: jablko
Date: Thu Oct 14 15:47:41 2010
New Revision: 8131
Log:
Refactor, like information object module
Modified:
trunk/apps/qubit/modules/actor/actions/editAction.class.php
trunk/apps/qubit/modules/actor/actions/indexAction.class.php
trunk/js/multiDelete.js
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/editAction.class.php
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/indexAction.class.php
Modified: trunk/apps/qubit/modules/actor/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/actor/actions/editAction.class.php Thu Oct 14
15:39:49 2010 (r8130)
+++ trunk/apps/qubit/modules/actor/actions/editAction.class.php Thu Oct 14
15:47:41 2010 (r8131)
@@ -71,19 +71,6 @@
$this->form->setDefault('next', $this->request->getReferer());
$this->form->setValidator('next', new sfValidatorString);
$this->form->setWidget('next', new sfWidgetFormInputHidden);
-
- $title = $this->context->i18n->__('Add new authority record');
- if (isset($this->getRoute()->resource))
- {
- if (1 > strlen($title = $this->resource))
- {
- $title = $this->context->i18n->__('Untitled');
- }
-
- $title = "Edit $title";
- }
-
- $this->response->setTitle("$title - {$this->response->getTitle()}");
}
protected function addField($name)
Modified: trunk/apps/qubit/modules/actor/actions/indexAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/actor/actions/indexAction.class.php Thu Oct
14 15:39:49 2010 (r8130)
+++ trunk/apps/qubit/modules/actor/actions/indexAction.class.php Thu Oct
14 15:47:41 2010 (r8131)
@@ -35,13 +35,6 @@
QubitAcl::forwardUnauthorized();
}
- if (1 > strlen($title = $this->resource))
- {
- $title = $this->context->i18n->__('Untitled');
- }
-
- $this->response->setTitle("$title - {$this->response->getTitle()}");
-
$criteria = new Criteria;
$criteria->add(QubitRelation::OBJECT_ID, $this->resource->id);
$criteria->addJoin(QubitRelation::SUBJECT_ID, QubitFunction::ID);
Modified: trunk/js/multiDelete.js
==============================================================================
--- trunk/js/multiDelete.js Thu Oct 14 15:39:49 2010 (r8130)
+++ trunk/js/multiDelete.js Thu Oct 14 15:47:41 2010 (r8131)
@@ -11,7 +11,7 @@
*/
Qubit.multiDelete = function ()
{
- $(this).attr('checked', true);
+ $(this).attr('checked', 'checked');
// Hide element
var $parentRows = $(this).closest('tr');
@@ -38,7 +38,7 @@
Drupal.behaviors.replaceMultiDelete = {
attach: function (context)
{
- $('.multiDelete')
+ $('.multiDelete', context)
.after(function ()
{
var input = this;
Modified:
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/editAction.class.php
==============================================================================
---
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/editAction.class.php
Thu Oct 14 15:39:49 2010 (r8130)
+++
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/editAction.class.php
Thu Oct 14 15:47:41 2010 (r8131)
@@ -72,6 +72,19 @@
parent::earlyExecute();
$this->isaar = new sfIsaarPlugin($this->resource);
+
+ $title = $this->context->i18n->__('Add new authority record');
+ if (isset($this->getRoute()->resource))
+ {
+ if (1 > strlen($title = $this->resource))
+ {
+ $title = $this->context->i18n->__('Untitled');
+ }
+
+ $title = "Edit $title";
+ }
+
+ $this->response->setTitle("$title - {$this->response->getTitle()}");
}
protected function addField($name)
Modified:
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/indexAction.class.php
==============================================================================
---
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/indexAction.class.php
Thu Oct 14 15:39:49 2010 (r8130)
+++
trunk/plugins/sfIsaarPlugin/modules/sfIsaarPlugin/actions/indexAction.class.php
Thu Oct 14 15:47:41 2010 (r8131)
@@ -34,6 +34,13 @@
$this->isaar = new sfIsaarPlugin($this->resource);
+ if (1 > strlen($title = $this->resource))
+ {
+ $title = $this->context->i18n->__('Untitled');
+ }
+
+ $this->response->setTitle("$title - {$this->response->getTitle()}");
+
if (QubitAcl::check($this->resource, 'update'))
{
$validatorSchema = new sfValidatorSchema;
--
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.