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.


Messages - ras2000

Pages: [1] 2
1
How To's / Re: Currency setting?
« on: May 07, 2009, 09:01:01 am »
Sorry, my bad

You go to administration, under configuration, choose general and you can change the default currency.


2
How To's / Re: Currency setting?
« on: May 07, 2009, 08:57:10 am »
You have to set it manually.

In the database, open the table og_config_options, id 43, change the $ to whatever you want.

3
How To's / Re: "Due Today"? I don't think so.
« on: May 07, 2009, 08:48:31 am »
As far as I can tell, the time set is not local time, for some reason.

Sitting in DK, I can see that the hours are wrong by two hours.

I'm guessing that this is the problem.

4
How To's / Re: Multiple task selection extended
« on: May 07, 2009, 08:37:48 am »
I would really like to be able to assign multiple tasks to one user, but when I try to replicate what I did to uncomplete tasks, I keep getting an error, og.taskstoptoolbar is not a constructor.

Anybody know what I'm doing wrong?

5
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() {
            ogTasks.executeAction('uncomplete');
         },
         scope: this
      })
around line 130
and add
   this.add(actions.uncomplete);
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){
         this.actions.del.disable();
         this.actions.complete.disable();
         this.actions.tag.disable();
      } else {
         this.actions.del.enable();
         this.actions.tag.enable();
         if (allIncomplete)
            this.actions.complete.enable();
         else
            this.actions.complete.disable();
         if (allComplete)
            this.actions.uncomplete.enable();
         else
            this.actions.uncomplete.disable();
            
      }
in TaskController.class.php, add the function
   function uncomplete_task() {
      ajx_current("empty");
      $task = ProjectTasks::findById(get_id());
      if(!($task instanceof ProjectTask)) {
         flash_error(lang('task dnx'));
         return;
      } // if

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

      try {
         DB::beginWork();
         $task->uncompleteTask();
         DB::commit();
         flash_success(lang('success uncomplete task'));
         
         $redirect_to = array_var($_GET, 'redirect_to', false);
         if (array_var($_GET, 'quick', false)) {
            ajx_current("empty");
            ajx_extra_data(array("task" => $task->getArrayInfo()));
         } else {
            ajx_current("reload");
         }
      } catch(Exception $e) {
         DB::rollback();
         flash_error($e->getMessage());
      } // try
   } // uncomplete_task
ie around line 1130
and in ProjectTask.class.php add the function
   function uncompleteTask() {
      $this->setCompletedOn(null);
      $this->setCompletedById(0);
      $this->save();
      ApplicationLogs::createLog($this, $this->getWorkspaces(), ApplicationLogs::ACTION_OPEN);
   } // uncompleteTask
ie around line 433

6
How To's / Re: Show week numbers in Calendar
« on: May 07, 2009, 06:52:44 am »
The chosen code in version 1.4 is a lot messier than the one I wrote, and that was plenty messy!

7
Ideas / Re: Timeline Display for Workspaces
« on: May 07, 2009, 06:15:41 am »
That was it. Thanks!

8
Ideas / Re: Timeline Display for Workspaces
« on: April 24, 2009, 10:24:17 am »
I fell across this question while searching for help on adding an icon to the top toolbar in tasks.

I'd like to make it possible to assign several tasks to one user, complete and uncomplete multiple tasks, and a few other things.

I tried doing the things mentioned here in TasksTopToolbar, but I keep getting the error "og.taskstoolbar is not a constructor".

What am I doing wrong?

9
Development / Re: List more than 8 tasks on a page
« on: April 23, 2009, 05:36:04 am »
I've made a different solution. This way each user can decide how many tasks to show in the view, handy if the different users have different sized screens
Insert a new post in the table og_user_ws_config_options
INSERT INTO `opengoo`.`og_user_ws_config_options` (
`id` ,
`category_name` ,
`name` ,
`default_value` ,
`config_handler_class` ,
`is_system` ,
`option_order` ,
`dev_comment`
)
VALUES (
NULL , 'task panel', 'noOfTasks', '8', 'IntegerConfigHandler', '0', '100', NULL
);

Insert line
'user ws config option name noOfTasks' => 'Set number of tasks shown as default',
in language/en_us/administration.php

Insert line
og.noOfTasks = <?php echo user_config_option('noOfTasks') ?>;
in application/layouts/website.php

Insert line
var no_of_tasks = og.noOfTasks;
in public/assets/javascript/og/tasks/drawing.js, line 153
replace the 8 lines 155 og 161 with no_of_tasks

10
How To's / Re: Show week numbers in Calendar
« on: April 22, 2009, 09:15:56 am »
Best argument for the developer team NOT taking this in is in the table buildup.
I changed the width of the weekday table cells from 2X15% and 5X14% to 7X14% and used the extra 2% for the weeknumber column.

Messy code, a no-no.

I do however think it should just be there, not as a choice, but standard. If you don't need it/use it, it doesn't take up much space, and for us that do plan in weeks, it's really a necessity.

11
How To's / Re: Translation of right panel with the Opengoo help text
« on: April 22, 2009, 09:07:08 am »
It's in a file called
opengoo\public\help\index.html

Static file, so it won't be changed if someone were to choose another language.

Easy to change that, but I think the developers have some bigger plans for the help system.

12
How To's / Re: Show week numbers in Calendar
« on: April 22, 2009, 07:54:29 am »
Sorry, left out the most important part
in calendar.php change
               for ($week_index = 0;; $week_index++) {
               ?>
                  <tr>
               <?php

to
               for ($week_index = 0;; $week_index++) {
               ?>
                  <tr>
               <?php
               if(cal_option("show_week_numbers")) {
               ?>
                     <td class="weeknumber" valign="top"><?php echo $week_index + $firstweek?></td>
               <?php


13
How To's / Re: Show week numbers in Calendar
« on: April 22, 2009, 07:41:32 am »
Make week numbers available in calendar, month view.

Change setting for calendar panel

UPDATE `opengoo`.`og_user_ws_config_categories` SET `is_system` = '0' WHERE `og_user_ws_config_categories`.`id` = 5;

Add option in user_config

INSERT INTO `opengoo`.`og_user_ws_config_options` (
`id` ,
`category_name` ,
`name` ,
`default_value` ,
`config_handler_class` ,
`is_system` ,
`option_order` ,
`dev_comment`
)
VALUES (
NULL , 'calendar panel', 'show_week_numbers', '0', 'BoolConfigHandler', '0', '0', NULL
);

Add in language/en_us/administrations.php (Or whatever language folder you are using)(in my file I've added it as line 95)
     'user ws config category name calendar panel' => 'Calendar',

Add in language/en_us/administrations.php (Or whatever language folder you are using)(in my file I've added it as line 115-116)
     'user ws config option name show_week_numbers' => 'Show week numbers',
     'user ws config option desc show_week_numbers' => 'Will show week numbers in calendar',

Add in language/en_us/calendar.php (Or whatever language folder you are using)(in my file I've added it as line 134)
   "week" => "week",

Add in application/views/event/calendar.php (line 45 in my file)
$firstweek = date("W", mktime(0, 0, 0, $month, 1, $year));

Change in application/views/event/calendar.php (line 91 to 113 in my file)
               <tr>
               <?php
               if(!cal_option("start_monday")) {
               ?>
                  <th width="14%"> <?php echo lang('sunday short') ?> </th>
               <?php } ?>
               <th width="14%"><?php echo  lang('monday short') ?></th>
               <th width="14%"><?php echo  lang('tuesday short') ?></th>
               <th width="14%"><?php echo  lang('wednesday short') ?></th>
               <th width="14%"><?php echo  lang('thursday short') ?></th>
               <th width="14%"><?php echo  lang('friday short') ?></th>
               <th width="14%"><?php echo  lang('saturday short') ?></th>
               
               <?php
               $output = '';
               if(cal_option("start_monday")) {
               ?>
                  <th width="14%"> <?php echo lang('sunday short') ?> </th>
               <?php } ?>
 to
 
                <tr>
               <?php
               if(cal_option("show_week_numbers")) {
               ?>
                  <th width="2%"> <?php echo lang('week') ?> </th>
               <?php }
               if(!cal_option("start_monday")) {
               ?>
                  <th width="14%"> <?php echo lang('sunday short') ?> </th>
               <?php } ?>
               <th width="14%"><?php echo  lang('monday short') ?></th>
               <th width="14%"><?php echo  lang('tuesday short') ?></th>
               <th width="14%"><?php echo  lang('wednesday short') ?></th>
               <th width="14%"><?php echo  lang('thursday short') ?></th>
               <th width="14%"><?php echo  lang('friday short') ?></th>
               <th width="14%"><?php echo  lang('saturday short') ?></th>
               
               <?php
               $output = '';
               if(cal_option("start_monday")) {
               ?>
                  <th width="14%"> <?php echo lang('sunday short') ?> </th>
               <?php } ?>

change function
function cal_load_options(){
   global $cal_db, $cal_options;
   // Find current user id
   $id = $_SESSION['cal_userid'];
   // call the DB for options
   $result = cal_query_getoptions($id);
   // get all options
   $d = array();
   while($t = $cal_db->sql_fetchrow($result)){
      $d[$t['name']] = $t['value'];
   }
   // set the options that have values
   if(array_var($d,'timeout')!="")       $cal_options['timeout'] = $d['timeout'];
   if(array_var($d,'skin')!="")          $cal_options['skin'] = $d['skin'];
   if(array_var($d,'language')!="")       $cal_options['language'] = $d['language'];
   if(array_var($d,'root_password')!="") $cal_options['root_password'] = $d['root_password'];
   // set the options that are true or false
   if(array_var($d,'show_times')=='y')    $cal_options['show_times'] = TRUE;
   else                   $cal_options['show_times'] = FALSE;
   if(array_var($d,'hours_24')=='y')    $cal_options['hours_24'] = TRUE;
   else                   $cal_options['hours_24'] = FALSE;
   if(array_var($d,'start_monday')=='1') $cal_options['start_monday'] = TRUE;
   else                   $cal_options['start_monday'] = FALSE;
   if(array_var($d,'anon_naming')=='y')    $cal_options['anon_naming'] = TRUE;
   else                   $cal_options['anon_naming'] = FALSE;
}
in library/cal/cal_gatekeeper.php to
function cal_load_options(){
   global $cal_db, $cal_options;
   // Find current user id
   $id = $_SESSION['cal_userid'];
   // call the DB for options
   $result = cal_query_getoptions($id);
   // get all options
   $d = array();
   while($t = $cal_db->sql_fetchrow($result)){
      $d[$t['name']] = $t['value'];
   }
   // set the options that have values
   if(array_var($d,'timeout')!="")       $cal_options['timeout'] = $d['timeout'];
   if(array_var($d,'skin')!="")          $cal_options['skin'] = $d['skin'];
   if(array_var($d,'language')!="")       $cal_options['language'] = $d['language'];
   if(array_var($d,'root_password')!="") $cal_options['root_password'] = $d['root_password'];
   // set the options that are true or false
   if(array_var($d,'show_times')=='y')    $cal_options['show_times'] = TRUE;
   else                   $cal_options['show_times'] = FALSE;
   if(array_var($d,'hours_24')=='y')    $cal_options['hours_24'] = TRUE;
   else                   $cal_options['hours_24'] = FALSE;
   if(array_var($d,'start_monday')=='1') $cal_options['start_monday'] = TRUE;
   else                   $cal_options['start_monday'] = FALSE;
   if(array_var($d,'show_week_numbers')=='1') $cal_options['show_week_numbers'] = TRUE;
   else                   $cal_options['show_week_numbers'] = FALSE;
   if(array_var($d,'anon_naming')=='y')    $cal_options['anon_naming'] = TRUE;
   else                   $cal_options['anon_naming'] = FALSE;
}

change function cal_query_getoptions in library/cal/queries/mysql.php from whatever it is to
function cal_query_getoptions($id){
   global $cal_db;
   $q = 'SELECT name, value
      FROM `og_user_ws_config_options`
      INNER JOIN `og_user_ws_config_option_values` ON `id` = `option_id`
      WHERE `category_name` = "calendar panel" AND `user_id` = ' . $id . '
      LIMIT 0 , 30';
   $r = $cal_db->sql_query($q);
   if(!$r AND DEBUG){
      echo $cal_db->sql_error();
   }
   return $r;
}

Add following lines in public/assets/themes/default/stylesheets/custom.css (if it does not exist, it needs to be created)
#calendar td.weeknumber{
  text-align: center;
  color: white;
  background-color: #339;
  border: #999999 1px solid;
  }

It will take some time to set in, there is a cached css file that doesn't update until I've restarted my computer.

14
How To's / Re: $ ---> €
« on: April 22, 2009, 06:07:08 am »
Yeah, probably the smartest solution.

I changed a few things as described here http://forums.opengoo.org/index.php?topic=1495.0.

That way you can have different currencies for different billing categories.

It is, however, not a very wise way to do it, firstly when adding up the bills, you need to GROUP BY currency, secondly it would be necessary to have a new table with the currencies to avoid redundancy, to avoid people writing the same currency differently, ie DKr, DKR, Kr, kr, dkr, etc.

Maybe a thought for the future, but having one central currency makes a lot of sense.

15
How To's / Re: adding fields in table, applying in controller
« on: April 22, 2009, 05:58:53 am »
I found the missing link myself. I'll just post it, in case someone else is stumped by the same.
in BaseBillingCategories.class.php under models, the new array value needs to be designed:
    static private $columns = array(
       'id' => DATA_TYPE_INTEGER,
       'name' => DATA_TYPE_STRING,
       'default_value' => DATA_TYPE_FLOAT,
       'default_currency' => DATA_TYPE_STRING,
       'description' => DATA_TYPE_STRING,
       'report_name' => DATA_TYPE_STRING,
       'created_on' => DATA_TYPE_DATETIME,
       'created_by_id' => DATA_TYPE_INTEGER,
       'updated_on' => DATA_TYPE_DATETIME,
       'updated_by_id' => DATA_TYPE_INTEGER,
    );

Pages: [1] 2