Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - ras2000

Pages: [1]
How To's / Multiple task selection extended
« on: May 07, 2009, 08:34:29 am »
I am trying to add a few possibilities in the task view. So far I've managed to make it possible to 'un'complete selected tasks by

In public/assets/javascript/og/tasks/taskstoptoolbar.js add
      uncomplete: new Ext.Action({
         text: lang('do uncomplete'),
            tooltip: lang('uncomplete selected tasks'),
            iconCls: 'ico-uncomplete',
         disabled: true,
         handler: function() {
         scope: this
around line 130
and add
around line 390
and change the function updateCheckedStatus() to
   updateCheckedStatus : function(){
      var checked = false;
      var allIncomplete = true;
      var allComplete = true;
      for (var i = 0; i < ogTasks.Tasks.length; i++)
         if (ogTasks.Tasks.isChecked){
            checked = true;
            if (ogTasks.Tasks.status == 1)
               allIncomplete = false;
            if (ogTasks.Tasks.status == 0)
               allComplete = false;
      if (!checked){
      } else {
         if (allIncomplete)
         if (allComplete)
in TaskController.class.php, add the function
   function uncomplete_task() {
      $task = ProjectTasks::findById(get_id());
      if(!($task instanceof ProjectTask)) {
         flash_error(lang('task dnx'));
      } // if

      if(!$task->canChangeStatus(logged_user())) {
         flash_error(lang('no access permissions'));
      } // if

      try {
         flash_success(lang('success uncomplete task'));
         $redirect_to = array_var($_GET, 'redirect_to', false);
         if (array_var($_GET, 'quick', false)) {
            ajx_extra_data(array("task" => $task->getArrayInfo()));
         } else {
      } catch(Exception $e) {
      } // try
   } // uncomplete_task
ie around line 1130
and in ProjectTask.class.php add the function
   function uncompleteTask() {
      ApplicationLogs::createLog($this, $this->getWorkspaces(), ApplicationLogs::ACTION_OPEN);
   } // uncompleteTask
ie around line 433

How To's / adding fields in table, applying in controller
« on: April 21, 2009, 09:38:42 am »
Hello all
I was looking at
and thought I'd give it a try

I added a column to og_billing_categories called default_currency

I added the fields in add.php and index.php

I added the functions inBaseBillingCategory.class.php and the parameter in BillingController.class.php.

But the field is not updated in the table, and if I enter the currency manually, it does not appear on the pages.

Anyone know what I'm doing wrong?

I added the functions
    function getDefaultCurrency() {
      return $this->getColumnValue('default_currency');
    } // getDefaultCurrency()
    function setDefaultCurrency($value) {
      return $this->setColumnValue('default_currency', $value);
    } // setDefaultCurrency)
in BaseBillingCategory.class.php

I added this in BillingController.class.php, wherever relevant
            'default_currency' => '',

And changed the line where the $ was hardcoded in billing/index.php to
    <td style="text-align: center;padding:5px;padding-left:10px;padding-right:10px;"><?php echo clean($billing->getDefaultCurrency()) ?></td>
    <td style="text-align: center;padding:5px;padding-left:10px;padding-right:10px;"><?php echo clean($billing->getDefaultValue()) ?></td>

What else needs to be done for it to take effect?

How To's / Amount of tasks shown in view
« on: April 20, 2009, 06:15:06 am »
I would like to change the amount of tasks listed in the task view from 8, but I can't find out where that limit is set.

I would have thought that the files would be in the application/views/task folder, but that doesn't seem to be the case.

How To's / Starting the week with a monday
« on: April 15, 2009, 07:27:04 am »
Working in Denmark, we prefer seeing the calendar starting the week with monday.

Looking through the code in cal_gatekeeper.php, I can see that it seeks an option called start_monday in the db through a function called cal_query_getoptions().

This function is blocked out however, so I can't see where to set this property.

Does anyone know where I can set this value?

How To's / Multiple users can edit the same document at the same time?
« on: March 27, 2009, 09:10:57 am »
Hello, just getting started with this system, so I'm not sure this is the right board for my question.

In the documents view, if the document is .html or .slim, two users can edit the same document at the same time.

Is there any way to lock a document being edited? I know the right way is to check the document out, but not all users will do so.

We are a few in the company who enjoy getting our hands dirty with PHP, so very technical answers would also be useful.


Pages: [1]