[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8548]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [8548] |
Date: |
Tue, 10 Jan 2012 07:49:51 +0000 |
Revision: 8548
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8548
Author: vator
Date: 2012-01-10 07:49:50 +0000 (Tue, 10 Jan 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.socheck_item.inc.php
trunk/controller/inc/class.uicase.inc.php
trunk/controller/inc/class.uicheck_list.inc.php
trunk/controller/inc/class.uicheck_list_for_location.inc.php
trunk/controller/js/controller/ajax.js
trunk/controller/templates/base/case/create_case.xsl
trunk/controller/templates/base/case/view_case.xsl
trunk/controller/templates/base/check_list/edit_check_list.xsl
trunk/controller/templates/base/check_list/view_control_info.xsl
trunk/controller/templates/base/check_list/view_errors_for_check_list.xsl
trunk/controller/templates/base/check_list/view_measurements.xsl
Added Paths:
-----------
trunk/controller/inc/class.socase.inc.php
trunk/controller/templates/base/check_list/register_case.xsl
trunk/controller/templates/base/check_list/view_closed_cases.xsl
trunk/controller/templates/base/check_list/view_open_cases.xsl
Removed Paths:
-------------
trunk/controller/templates/base/check_list/register_errors.xsl
trunk/controller/templates/base/check_list/view_closed_errors.xsl
trunk/controller/templates/base/check_list/view_open_errors.xsl
Added: trunk/controller/inc/class.socase.inc.php
===================================================================
--- trunk/controller/inc/class.socase.inc.php (rev 0)
+++ trunk/controller/inc/class.socase.inc.php 2012-01-10 07:49:50 UTC (rev
8548)
@@ -0,0 +1,115 @@
+<?php
+ /**
+ * phpGroupWare - controller: a part of a Facilities Management System.
+ *
+ * @author Erink Holm-Larsen <address@hidden>
+ * @author Torstein Vadla <address@hidden>
+ * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package property
+ * @subpackage controller
+ * @version $Id: class.socheck_item.inc.php 8535 2012-01-09 10:14:45Z
vator $
+ */
+
+ phpgw::import_class('controller.socommon');
+
+ include_class('controller', 'check_item_case', 'inc/model/');
+
+ class controller_socase extends controller_socommon
+ {
+ protected static $so;
+
+ /**
+ * Get a static reference to the storage object associated with
this model object
+ *
+ * @return controller_socontrol_group the storage object
+ */
+ public static function get_instance()
+ {
+ if (self::$so == null) {
+ self::$so = CreateObject('controller.socase');
+ }
+ return self::$so;
+ }
+
+ function get_query(string $sort_field, boolean $ascending,
string $search_for, string $search_type, array $filters, boolean
$return_count){}
+
+ function populate(int $object_id, &$object){}
+
+ function add(&$case)
+ {
+ $cols = array(
+ 'check_item_id',
+ 'status',
+ 'location_id',
+ 'location_item_id',
+ 'descr',
+ 'user_id',
+ 'entry_date',
+ 'modified_date',
+ 'modified_by',
+ );
+
+ $values = array(
+ $this->marshal($case->get_check_item_id(),
'int'),
+ $case->get_status(),
+ $this->marshal($case->get_location_id(), 'int'),
+ $this->marshal($case->get_location_item_id(),
'int'),
+ $this->marshal($case->get_descr(), 'int'),
+ $this->marshal($case->get_user_id(), 'int'),
+ $this->marshal($case->get_entry_date(), 'int'),
+ $this->marshal($case->get_modified_date(),
'int'),
+ $this->marshal($case->get_modified_by(), 'int')
+ );
+
+ $result = $this->db->query('INSERT INTO
controller_check_item_case (' . join(',', $cols) . ') VALUES (' . join(',',
$values) . ')', __LINE__,__FILE__);
+
+ return isset($result) ?
$this->db->get_last_insert_id('controller_check_item_case', 'id') : 0;
+ }
+
+ function update($case)
+ {
+ $id = $case->get_id();
+
+ $values = array(
+ 'check_item_id = ' .
$this->marshal($case->get_check_item_id(), 'int'),
+ 'location_id = ' .
$this->marshal($case->get_location_id(), 'int'),
+ 'location_item_id = ' .
$this->marshal($case->get_location_item_id(), 'int'),
+ 'descr = ' . $this->marshal($case->get_descr(),
'string'),
+ 'user_id = ' .
$this->marshal($case->get_user_id(), 'int'),
+ 'entry_date = ' .
$this->marshal($case->get_entry_date(), 'int'),
+ 'modified_date = ' .
$this->marshal($case->get_modified_date(), 'int'),
+ 'modified_by = ' .
$this->marshal($case->get_modified_by(), 'int'),
+ );
+
+ $result = $this->db->query('UPDATE
controller_check_item_case SET ' . join(',', $values) . " WHERE id=$id",
__LINE__,__FILE__);
+
+ if( isset($result) )
+ {
+ return $id;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ function get_id_field_name(){}
+ }
Modified: trunk/controller/inc/class.socheck_item.inc.php
===================================================================
--- trunk/controller/inc/class.socheck_item.inc.php 2012-01-09 14:34:10 UTC
(rev 8547)
+++ trunk/controller/inc/class.socheck_item.inc.php 2012-01-10 07:49:50 UTC
(rev 8548)
@@ -136,6 +136,41 @@
}
}
+
+ public function
get_check_item_by_check_list_and_control_item($check_list_id, $control_item_id)
+ {
+ $sql = "SELECT ci.*, ci.id as c_id, coi.id as coi_id,
coi.* ";
+ $sql .= "FROM controller_check_item ci,
controller_control_item coi ";
+ $sql .= "WHERE ci.check_list_id = $check_list_id ";
+ $sql .= "AND ci.control_item_id = coi.id ";
+ $sql .= "AND ci.control_item_id = $control_item_id";
+
+ $this->db->limit_query($sql, 0, __LINE__, __FILE__, 1);
+
+ if($this->db->next_record()) {
+ $check_item = new
controller_check_item($this->unmarshal($this->db->f('c_id', true), 'int'));
+
$check_item->set_status($this->unmarshal($this->db->f('status', true), 'bool'));
+
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
+
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
+
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
+
+ $control_item = new
controller_control_item($this->unmarshal($this->db->f('coi_id', true), 'int'));
+ $control_item->set_title($this->db->f('title',
true), 'string');
+
$control_item->set_required($this->db->f('required', true), 'string');
+
$control_item->set_what_to_do($this->db->f('what_to_do', true), 'string');
+
$control_item->set_how_to_do($this->db->f('how_to_do', true), 'string');
+
$control_item->set_control_group_id($this->db->f('control_group_id', true),
'string');
+
+
$check_item->set_control_item($control_item->toArray());
+
+ return $check_item;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
public function get_check_items($check_list_id, $status, $type){
$sql = "SELECT ci.id as ci_id, ci.status,
control_item_id, ci.comment, ci.measurement, check_list_id, ";
$sql .= "coi.id as coi_id, coi.title, coi.required,
coi.what_to_do, coi.how_to_do, coi.control_group_id, coi.type ";
@@ -177,12 +212,94 @@
return $check_items_array;
}
+ public function get_check_items_and_cases($check_list_id){
+ $sql = "SELECT ci.id as ci_id, ci.status,
control_item_id, ci.comment, ci.measurement, check_list_id, cic.* ";
+ $sql .= "FROM controller_check_item ci ";
+ $sql .= "LEFT JOIN controller_check_item_case as cic ON
ci.id = cic.check_item_id ";
+ $sql .= "WHERE ci.check_list_id = $check_list_id ";
+
+ $this->db->query($sql);
+
+ while ($this->db->next_record()) {
+
+ if( $this->db->f('cl_id', true) !=
$check_list_id ){
+
+ if($check_list_id != 0){
+
$check_list->set_check_item_array($check_items_array);
+ $check_list_array[] =
$check_list->toArray();
+ }
+
+ $check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
+
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
+
$check_item->set_status($this->unmarshal($this->db->f('status', true), 'bool'));
+
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
+
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
+
$check_item->set_measurement($this->unmarshal($this->db->f('measurement',
true), 'int'));
+
+ $check_list = new
controller_check_list($this->unmarshal($this->db->f('cl_id', true), 'int'));
+
$check_list->set_status($this->unmarshal($this->db->f('cl_status', true),
'bool'));
+
$check_list->set_comment($this->unmarshal($this->db->f('cl_comment', true),
'string'));
+
$check_list->set_deadline($this->unmarshal($this->db->f('deadline', true),
'int'));
+
+ $check_items_array = array();
+ }
+
+ $check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
+
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
+
$check_item->set_status($this->unmarshal($this->db->f('ci_status', true),
'bool'));
+
$check_item->set_comment($this->unmarshal($this->db->f('ci_comment', true),
'string'));
+
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
+
+ $check_items_array[] = $check_item->toArray();
+
+ $check_list_id = $check_list->get_id();
+ }
+
+ if($check_list != null){
+
$check_list->set_check_item_array($check_items_array);
+ $check_list_array[] = $check_list->toArray();
+
+ return $check_list_array;
+ }else {
+ return null;
+ }
+
+
+
+
+
+
+ while ($this->db->next_record()) {
+ $check_item = new
controller_check_item($this->unmarshal($this->db->f('ci_id', true), 'int'));
+
$check_item->set_control_item_id($this->unmarshal($this->db->f('control_item_id',
true), 'int'));
+
$check_item->set_status($this->unmarshal($this->db->f('status', true), 'bool'));
+
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
+
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
+
$check_item->set_measurement($this->unmarshal($this->db->f('measurement',
true), 'int'));
+
+ $case = new
controller_check_item_case($this->unmarshal($this->db->f('coi_id', true),
'int'));
+ $control_item->set_title($this->db->f('title',
true), 'string');
+
$control_item->set_required($this->db->f('required', true), 'string');
+
$control_item->set_what_to_do($this->db->f('what_to_do', true), 'string');
+
$control_item->set_how_to_do($this->db->f('how_to_do', true), 'string');
+
$control_item->set_control_group_id($this->db->f('control_group_id', true),
'string');
+ $control_item->set_type($this->db->f('type',
true), 'string');
+
+
$check_item->set_control_item($control_item->toArray());
+
+ $check_items_array[] = $check_item->toArray();
+ }
+
+ return $check_items_array;
+ }
+
public function get_check_items_by_message($message_ticket_id){
- $sql = "SELECT ci.id as ci_id, ci.status,
control_item_id, ci.comment, ci.message_ticket_id, ci.measurement,
check_list_id, ";
+ $sql = "SELECT ci.id as ci_id, ci.status,
control_item_id, ci.comment, ci.measurement, check_list_id, ";
$sql .= "coi.id as coi_id, coi.title, coi.required,
coi.what_to_do, coi.how_to_do, coi.control_group_id, coi.type ";
$sql .= "FROM controller_check_item ci ";
$sql .= "LEFT JOIN controller_control_item as coi ON
ci.control_item_id = coi.id ";
- $sql .= "WHERE ci.message_ticket_id =
$message_ticket_id ";
+ $sql .= "LEFT JOIN controller_check_item_case as cic ON
ci.id = cic.check_item_id ";
+ $sql .= "WHERE cic.location_item_id =
$message_ticket_id ";
$this->db->query($sql);
@@ -192,7 +309,6 @@
$check_item->set_status($this->unmarshal($this->db->f('status', true), 'bool'));
$check_item->set_comment($this->unmarshal($this->db->f('comment', true),
'string'));
$check_item->set_check_list_id($this->unmarshal($this->db->f('check_list_id',
true), 'int'));
-
$check_item->set_message_ticket_id($this->unmarshal($this->db->f('message_ticket_id',
true), 'int'));
$check_item->set_measurement($this->unmarshal($this->db->f('measurement',
true), 'int'));
$control_item = new
controller_control_item($this->unmarshal($this->db->f('coi_id', true), 'int'));
Modified: trunk/controller/inc/class.uicase.inc.php
===================================================================
--- trunk/controller/inc/class.uicase.inc.php 2012-01-09 14:34:10 UTC (rev
8547)
+++ trunk/controller/inc/class.uicase.inc.php 2012-01-10 07:49:50 UTC (rev
8548)
@@ -30,47 +30,69 @@
phpgw::import_class('phpgwapi.yui');
phpgw::import_class('controller.uicommon');
- phpgw::import_class('controller.socontrol_area');
+ phpgw::import_class('controller.socase');
+ phpgw::import_class('controller.socheck_list');
+ phpgw::import_class('controller.socheck_item');
+ phpgw::import_class('controller.socontrol');
- include_class('controller', 'check_list', 'inc/model/');
include_class('controller', 'check_item_case', 'inc/model/');
- include_class('controller', 'date_generator', 'inc/component/');
-
+
class controller_uicase extends controller_uicommon
{
- private $so_control_area;
+ private $so;
+ private $so_check_list;
private $so_control;
- private $so_check_list;
- private $so_control_item;
- private $so_check_item;
-
+
var $public_functions = array(
-
'create_case' => true,
-
'save_case' => true
- );
+
'register_case' => true,
+
'create_case_message' => true,
+
'view_case_message' => true,
+
'save_case_message' => true
+ );
function __construct()
{
parent::__construct();
-
- $this->bo =
CreateObject('property.bolocation',true);
- $this->bocommon = &
$this->bo->bocommon;
- $this->so_control_area =
CreateObject('controller.socontrol_area');
- $this->so_control =
CreateObject('controller.socontrol');
- $this->so_check_list =
CreateObject('controller.socheck_list');
- $this->so_control_item =
CreateObject('controller.socontrol_item');
- $this->so_check_item =
CreateObject('controller.socheck_item');
- $this->type_id =
$this->bo->type_id;
-
-
self::set_active_menu('controller::control::location_for_check_list');
+ $this->so = CreateObject('controller.socase');
+ $this->so_check_list =
CreateObject('controller.socheck_list');
+ $this->so_control =
CreateObject('controller.socontrol');
+ $this->so_check_item =
CreateObject('controller.socheck_item');
}
- function create_case(){
+ function register_case(){
$check_list_id = phpgw::get_var('check_list_id');
+ $control_item_id = phpgw::get_var('control_item_id');
- $check_list_with_check_items =
$this->so_check_list->get_single_with_check_items($check_list_id, null,
'control_item_type_1');
+ $check_list =
$this->so_check_list->get_single($check_list_id);
+ $control_id = $check_list->get_control_id();
+ $control = $this->so_control->get_single( $control_id );
+
+ $check_item =
$this->so_check_item->get_check_item_by_check_list_and_control_item($check_list_id,
$control_item_id);
+
+ $todays_date = mktime(0,0,0,date("m"), date("d"),
date("Y"));
+
+ $user_id = $GLOBALS['phpgw_info']['user']['id'];
+ $status = 0;
+
+ $case = new controller_check_item_case();
+ $case->set_check_item_id( $check_item->get_id() );
+ $case->set_status($status);
+ $case->set_location_id($location_id);
+ $case->set_user_id($user_id);
+ $case->set_entry_date($todays_date);
+ $case->set_modified_date($todays_date);
+ $case->set_modified_by($user_id);
+
+ return $this->so->store($case);
+ }
+
+ function create_case_message(){
+ $check_list_id = phpgw::get_var('check_list_id');
+
+ $check_items_and_cases =
$this->so_check_list->get_check_items_by_check_list($check_list_id);
+
$control_id =
$check_list_with_check_items["control_id"];
$control = $this->so_control->get_single( $control_id );
@@ -115,12 +137,12 @@
self::render_template_xsl('case/create_case', $data);
}
- function save_case(){
+ function save_case_message(){
$check_list_id = phpgw::get_var('check_list_id');
- $check_item_ids = phpgw::get_var('check_item_ids');
$location_code = phpgw::get_var('location_code');
$message_title = phpgw::get_var('message_title');
$message_cat_id = phpgw::get_var('message_cat_id');
+ $check_item_ids = phpgw::get_var('check_item_ids');
$check_list =
$this->so_check_list->get_single($check_list_id);
@@ -133,6 +155,8 @@
$location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
+ $message_details = "Kontroll: " .
$control->get_title() . "\n\n";
+
// Generates message details from comment field in
check item
foreach($check_item_ids as $check_item_id){
$check_item =
$this->so_check_item->get_single($check_item_id);
@@ -158,33 +182,48 @@
$message_ticket_id = $botts->add_ticket($ticket);
$todays_date = mktime(0,0,0,date("m"), date("d"),
date("Y"));
+
+ $user_id = $GLOBALS['phpgw_info']['user']['id'];
+ $status = 0;
-
// Registers message and updates check items with
message ticket id
foreach($check_item_ids as $check_item_id){
$check_item =
$this->so_check_item->get_single($check_item_id);
- $user_id =
-
- $case =
CreateObject('controller.check_item_case');
+ $case = new controller_check_item_case();
$case->set_check_item_id($check_item_id);
- $case->set_status(0);
+ $case->set_status($status);
$case->set_location_id($location_id);
$case->set_location_item_id($message_ticket_id);
$case->set_user_id($user_id);
$case->set_entry_date($todays_date);
$case->set_modified_date($todays_date);
- $case->set_modified_by($modified_by);
-
+ $case->set_modified_by($user_id);
-
-
-
- $this->so_check_item->update($check_item);
+ $this->so->store($case);
}
+ $this->redirect(array('menuaction' =>
'controller.uicase.view_case', 'check_list_id'=>$check_list_id,
'message_ticket_id'=>$message_ticket_id));
+ }
+
+ function view_case_message(){
+ $check_list_id = phpgw::get_var('check_list_id');
+ $message_ticket_id =
phpgw::get_var('message_ticket_id');
+
+ $check_list =
$this->so_check_list->get_single($check_list_id);
+
+ $control_id = $check_list->get_control_id();
+ $control = $this->so_control->get_single( $control_id );
+
+ $location_code = $check_list->get_location_code();
+
+ $date_format =
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+
+ $location_array =
execMethod('property.bolocation.read_single', array('location_code' =>
$location_code));
+
$registered_message_check_items =
$this->so_check_item->get_check_items_by_message($message_ticket_id);
+ $botts = CreateObject('property.botts',true);
$message_ticket =
$botts->read_single($message_ticket_id);
$catsObj = CreateObject('phpgwapi.categories', -1,
'property', '.ticket');
Modified: trunk/controller/inc/class.uicheck_list.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list.inc.php 2012-01-09 14:34:10 UTC
(rev 8547)
+++ trunk/controller/inc/class.uicheck_list.inc.php 2012-01-10 07:49:50 UTC
(rev 8548)
@@ -61,9 +61,9 @@
'view_control_items' =>
true,
'view_control_details' =>
true,
'print_check_list'
=> true,
- 'register_errors'
=> true,
- 'view_open_errors'
=> true,
- 'view_closed_errors' =>
true,
+ 'register_case'
=> true,
+ 'view_open_cases'
=> true,
+ 'view_closed_cases'
=> true,
'view_measurements'
=> true
);
@@ -362,7 +362,7 @@
self::render_template_xsl('check_list/print_check_list', $data);
}
- function register_errors(){
+ function register_case(){
$check_list_id = phpgw::get_var('check_list_id');
$check_list =
$this->so_check_list->get_single($check_list_id);
@@ -378,10 +378,10 @@
'check_list' => $check_list->toArray()
);
- self::render_template_xsl('check_list/register_errors',
$data);
+ self::render_template_xsl('check_list/register_case',
$data);
}
- function view_open_errors(){
+ function view_open_cases(){
$check_list_id = phpgw::get_var('check_list_id');
$check_list =
$this->so_check_list->get_single($check_list_id);
@@ -395,10 +395,10 @@
'check_list' =>
$check_list->toArray()
);
-
self::render_template_xsl('check_list/view_open_errors', $data);
+ self::render_template_xsl('check_list/view_open_cases',
$data);
}
- function view_closed_errors(){
+ function view_closed_cases(){
$check_list_id = phpgw::get_var('check_list_id');
$check_list =
$this->so_check_list->get_single($check_list_id);
@@ -412,7 +412,7 @@
'check_list' => $check_list->toArray()
);
-
self::render_template_xsl('check_list/view_closed_errors', $data);
+
self::render_template_xsl('check_list/view_closed_cases', $data);
}
function view_measurements(){
Modified: trunk/controller/inc/class.uicheck_list_for_location.inc.php
===================================================================
--- trunk/controller/inc/class.uicheck_list_for_location.inc.php
2012-01-09 14:34:10 UTC (rev 8547)
+++ trunk/controller/inc/class.uicheck_list_for_location.inc.php
2012-01-10 07:49:50 UTC (rev 8548)
@@ -61,7 +61,7 @@
'add_check_list_for_location' => true,
'save_check_list_for_location' => true,
'edit_check_list_for_location' => true,
-
'create_error_report_message' => true,
+
'create_case_message' => true,
'view_control_info' => true,
'view_errors_for_check_list' => true
);
@@ -444,7 +444,7 @@
$this->redirect(array('menuaction' =>
'controller.uicheck_list_for_location.edit_check_list_for_location',
'check_list_id'=>$check_list_id));
}
- function create_error_report_message(){
+ function create_case_message(){
$check_list_id = phpgw::get_var('check_list_id');
$check_list_with_check_items =
$this->so_check_list->get_single_with_check_items($check_list_id);
@@ -473,7 +473,7 @@
$GLOBALS['phpgw']->css->add_external_file('controller/templates/base/css/jquery-ui.custom.css');
-
self::render_template_xsl('create_error_report_message', $data);
+ self::render_template_xsl('create_case_messsage',
$data);
}
public function view_control_info(){
Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js 2012-01-09 14:34:10 UTC (rev
8547)
+++ trunk/controller/js/controller/ajax.js 2012-01-10 07:49:50 UTC (rev
8548)
@@ -284,6 +284,35 @@
});
});
+ $("#frm_register_case").live("submit", function(e){
+ e.preventDefault();
+
+ var thisForm = $(this);
+ var submitBnt = $(thisForm).find("input[type='submit']");
+ var requestUrl = $(thisForm).attr("action");
+
+ $.ajax({
+ type: 'POST',
+ url: requestUrl + "&" + $(thisForm).serialize(),
+ success: function(data) {
+ if(data){
+ var obj = jQuery.parseJSON(data);
+
+ if(obj.saveStatus == "updated"){
+ var submitBnt =
$(thisForm).find("input[type='submit']");
+ $(submitBnt).val("Lagret");
+
+ // Changes text on save button back
to original
+ window.setTimeout(function() {
+ $(submitBnt).val('Lagre
sjekkpunkt');
+
$(submitBnt).addClass("not_active");
+ }, 1000);
+ }
+ }
+ }
+ });
+ });
+
$("#frm_update_check_list").live("click", function(e){
var thisForm = $(this);
var submitBnt = $(thisForm).find("input[type='submit']");
@@ -301,4 +330,10 @@
var submitBnt = $(thisForm).find("input[type='submit']");
$(submitBnt).removeClass("not_active");
});
+
+ $("#frm_register_case").live("click", function(e){
+ var thisForm = $(this);
+ var submitBnt = $(thisForm).find("input[type='submit']");
+ $(submitBnt).removeClass("not_active");
+ });
});
\ No newline at end of file
Modified: trunk/controller/templates/base/case/create_case.xsl
===================================================================
--- trunk/controller/templates/base/case/create_case.xsl 2012-01-09
14:34:10 UTC (rev 8547)
+++ trunk/controller/templates/base/case/create_case.xsl 2012-01-10
07:49:50 UTC (rev 8548)
@@ -50,14 +50,6 @@
<xsl:value-of select="check_list/id"/>
</xsl:attribute>
</input>
- <input>
- <xsl:attribute
name="name">location_code</xsl:attribute>
- <xsl:attribute
name="type">hidden</xsl:attribute>
- <xsl:attribute name="value">
- <xsl:value-of
select="location_array/location_code"/>
- </xsl:attribute>
- </input>
-
<div>
<label>Tittel på melding</label>
<input name="message_title"
type="text" />
Modified: trunk/controller/templates/base/case/view_case.xsl
===================================================================
--- trunk/controller/templates/base/case/view_case.xsl 2012-01-09 14:34:10 UTC
(rev 8547)
+++ trunk/controller/templates/base/case/view_case.xsl 2012-01-10 07:49:50 UTC
(rev 8548)
@@ -6,9 +6,8 @@
<h1>Avviksmelding registrert</h1>
- <div class="tab_menu">
- <a class="active" href="#">Meldingen gjaldt</a>
- </div>
+
+ <h3 class="box_header" href="#">Meldingen gjaldt</h3>
<div id="case_details">
<h3>Bygg: <xsl:value-of
select="location_array/loc1_name"/></h3>
<h3>Tittel på kontroll: <xsl:value-of
select="control_array/title"/></h3>
@@ -22,9 +21,7 @@
</xsl:choose>
</div>
- <div class="tab_menu">
- <a class="active" href="#">Detaljer for melding</a>
- </div>
+ <h3 class="box_header" href="#">Detaljer for melding</h3>
<div id="case_details">
<div>
<label>Tittel på melding</label>
Modified: trunk/controller/templates/base/check_list/edit_check_list.xsl
===================================================================
--- trunk/controller/templates/base/check_list/edit_check_list.xsl
2012-01-09 14:34:10 UTC (rev 8547)
+++ trunk/controller/templates/base/check_list/edit_check_list.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -53,7 +53,7 @@
Vis info om kontroll
</a>
- <a style="background:#DD624B;border-bottom: 1px solid
#CB563F;border-top: 1px solid #EE836F;box-shadow: 0 1px 0 #A9422E, 0 -1px 0
#A9422E;color: #FFFFFF;height: 18px;margin-left: 40px;margin-top: 1px;">
+ <a style="background:#DD624B;border-bottom: 1px solid
#CB563F;border-top: 1px solid #EE836F;box-shadow: 0 1px 0 #A9422E, 0 -1px 0
#A9422E;color: #FFFFFF;height: 18px;margin-left: 75px;margin-top: 1px;">
<xsl:attribute name="href">
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.register_error</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
Copied: trunk/controller/templates/base/check_list/register_case.xsl (from rev
8541, trunk/controller/templates/base/check_list/register_errors.xsl)
===================================================================
--- trunk/controller/templates/base/check_list/register_case.xsl
(rev 0)
+++ trunk/controller/templates/base/check_list/register_case.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -0,0 +1,102 @@
+<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+
+<div id="error_message_menu">
+ <a class="btn" id="view_open_errors">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_errors</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+ <xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+ </xsl:attribute>
+ Vis avvik/måling
+ </a>
+ <a class="btn">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicase.create_case_message</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+ </xsl:attribute>
+ Registrer avviksmelding
+ </a>
+</div>
+
+<div id="register_errors_content">
+ <div class="tab_menu"><a class="active">Registrer
sak/måling</a></div>
+
+ <div class="tab_item active">
+
+ <xsl:choose>
+ <xsl:when
test="control_items_for_check_list/child::node()">
+
+ <ul id="control_items_list"
class="check_items expand_list">
+ <xsl:for-each
select="control_items_for_check_list">
+ <li>
+ <h4><img
src="controller/images/arrow_right.png" width="14"/><span><xsl:value-of
select="title"/></span></h4>
+ <form
id="frm_register_case"
action="index.php?menuaction=controller.uicase.register_case&phpgw_return_as=json"
method="post">
+
<xsl:variable name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
+ <input
type="hidden" name="control_item_id" value="{$control_item_id}" />
+ <input
name="check_list_id" type="hidden">
+
<xsl:attribute name="value">
+
<xsl:value-of select="//check_list/id"/>
+
</xsl:attribute>
+ </input>
+ <input
name="status" type="hidden" value="0" />
+
+ <xsl:choose>
+
<xsl:when test="type = 'control_item_type_1'">
+
<input name="type" type="hidden" value="control_item_type_1" />
+
+
<div class="check_item">
+
<div>
+
<label class="comment">Kommentar</label>
+
<textarea name="comment">
+
<xsl:value-of select="comment"/>
+
</textarea>
+
</div>
+
<div class="form-buttons">
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'register_error')" /></xsl:variable>
+
<input type="submit" name="save_control" value="{$lang_save}"
class="not_active" title="{$lang_save}" />
+
</div>
+
</div>
+
</xsl:when>
+
<xsl:when test="type = 'control_item_type_2'">
+
<input name="type" type="hidden" value="control_item_type_2" />
+
<div class="check_item">
+
<div>
+
<label class="comment">Registrer målingsverdi</label>
+
<input>
+
<xsl:attribute name="name">measurement</xsl:attribute>
+
<xsl:attribute name="type">text</xsl:attribute>
+
<xsl:attribute name="value">
+
<xsl:value-of select="measurement"/>
+
</xsl:attribute>
+
</input>
+
</div>
+
<div>
+
<label class="comment">Kommentar</label>
+
<textarea name="comment">
+
<xsl:value-of select="comment"/>
+
</textarea>
+
</div>
+
<div class="form-buttons">
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'register_error')" /></xsl:variable>
+
<input type="submit" name="save_control" value="Registrer
avvik" class="not_active" title="{$lang_save}" />
+
</div>
+
</div>
+
</xsl:when>
+ </xsl:choose>
+
+ </form>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:when>
+ <xsl:otherwise>
+ Alle sjekkpunkter for kontroll
er registert som åpent/håndtert avvik eller måling
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </div>
+</xsl:template>
Property changes on:
trunk/controller/templates/base/check_list/register_case.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/controller/templates/base/check_list/register_errors.xsl
===================================================================
--- trunk/controller/templates/base/check_list/register_errors.xsl
2012-01-09 14:34:10 UTC (rev 8547)
+++ trunk/controller/templates/base/check_list/register_errors.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -1,102 +0,0 @@
-<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
-
-<xsl:template match="data" xmlns:php="http://php.net/xsl">
-
-<div id="error_message_menu">
- <a class="btn" id="view_open_errors">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_errors</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
- <xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Vis avvik/måling
- </a>
- <a class="btn">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uierror_report_message.create_error_report_message</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
- </xsl:attribute>
- Registrer avviksmelding
- </a>
-</div>
-
-<div id="register_errors_content">
- <div class="tab_menu"><a class="active">Registrer
sak/måling</a></div>
-
- <div class="tab_item active">
-
- <xsl:choose>
- <xsl:when
test="control_items_for_check_list/child::node()">
-
- <ul id="control_items_list"
class="check_items expand_list">
- <xsl:for-each
select="control_items_for_check_list">
- <li>
- <h4><img
src="controller/images/arrow_right.png" width="14"/><span><xsl:value-of
select="title"/></span></h4>
- <form
class="frm_save_control_item"
action="index.php?menuaction=controller.uicheck_list.add_check_item_to_list"
method="post">
-
<xsl:variable name="control_item_id"><xsl:value-of select="id"/></xsl:variable>
- <input
type="hidden" name="control_item_id" value="{$control_item_id}" />
- <input
name="check_list_id" type="hidden">
-
<xsl:attribute name="value">
-
<xsl:value-of select="//check_list/id"/>
-
</xsl:attribute>
- </input>
- <input
name="status" type="hidden" value="0" />
-
- <xsl:choose>
-
<xsl:when test="type = 'control_item_type_1'">
-
<input name="type" type="hidden" value="control_item_type_1" />
-
-
<div class="check_item">
-
<div>
-
<label class="comment">Kommentar</label>
-
<textarea name="comment">
-
<xsl:value-of select="comment"/>
-
</textarea>
-
</div>
-
<div class="form-buttons">
-
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'register_error')" /></xsl:variable>
-
<input type="submit" name="save_control" value="{$lang_save}"
class="not_active" title="{$lang_save}" />
-
</div>
-
</div>
-
</xsl:when>
-
<xsl:when test="type = 'control_item_type_2'">
-
<input name="type" type="hidden" value="control_item_type_2" />
-
<div class="check_item">
-
<div>
-
<label class="comment">Registrer målingsverdi</label>
-
<input>
-
<xsl:attribute name="name">measurement</xsl:attribute>
-
<xsl:attribute name="type">text</xsl:attribute>
-
<xsl:attribute name="value">
-
<xsl:value-of select="measurement"/>
-
</xsl:attribute>
-
</input>
-
</div>
-
<div>
-
<label class="comment">Kommentar</label>
-
<textarea name="comment">
-
<xsl:value-of select="comment"/>
-
</textarea>
-
</div>
-
<div class="form-buttons">
-
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'register_error')" /></xsl:variable>
-
<input type="submit" name="save_control" value="Registrer
avvik" class="not_active" title="{$lang_save}" />
-
</div>
-
</div>
-
</xsl:when>
- </xsl:choose>
-
- </form>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:when>
- <xsl:otherwise>
- Alle sjekkpunkter for kontroll
er registert som åpent/håndtert avvik eller måling
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </div>
-</xsl:template>
Copied: trunk/controller/templates/base/check_list/view_closed_cases.xsl (from
rev 8538, trunk/controller/templates/base/check_list/view_closed_errors.xsl)
===================================================================
--- trunk/controller/templates/base/check_list/view_closed_cases.xsl
(rev 0)
+++ trunk/controller/templates/base/check_list/view_closed_cases.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -0,0 +1,110 @@
+<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
+
+<xsl:template match="data">
+
+<div id="error_message_menu">
+ <a class="btn" id="register_errors">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.register_case</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+ <xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+ </xsl:attribute>
+ Registrer sak/måling
+ </a>
+ <a class="btn">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicase.create_case_message</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+ </xsl:attribute>
+ Registrer avviksmelding
+ </a>
+</div>
+
+<div id="view_errors">
+
+ <div class="tab_menu">
+ <a id="view_open_errors">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_cases</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+ </xsl:attribute>
+ Vis åpne saker
+ </a>
+ <a class="active" id="view_closed_errors">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_closed_cases</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+ </xsl:attribute>
+ Vis lukkede saker
+ </a>
+ <a id="view_measurements">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_measurements</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+ </xsl:attribute>
+ Vis målinger
+ </a>
+ </div>
+
+ <div class="tab_item">
+ <xsl:choose>
+ <xsl:when test="handled_check_items/child::node()">
+
+ <div class="expand_menu"><div class="expand_all">Vis
alle</div><div class="collapse_all focus">Skjul alle</div></div>
+
+ <ul id="check_list_fixed_list"
class="check_items expand_list">
+ <xsl:for-each
select="handled_check_items">
+ <xsl:if test="status =
1">
+ <li>
+ <h4><img
src="controller/images/arrow_right.png" width="14"/><span><xsl:value-of
select="control_item/title"/></span></h4>
+ <form
id="frm_save_check_item"
action="index.php?menuaction=controller.uicheck_list.save_check_item"
method="post">
+
<xsl:variable name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
+ <input
type="hidden" name="check_item_id" value="{$check_item_id}" />
+ <div
class="check_item">
+ <div>
+
<label>Status</label>
+
<select name="status">
+
<xsl:choose>
+
<xsl:when test="status = 0">
+
<option value="0" SELECTED="SELECTED">Avvik er
åpent</option>
+
<option value="1">Avvik er håndtert</option>
+
</xsl:when>
+
<xsl:when test="status = 1">
+
<option value="0">Avvik er åpent</option>
+
<option value="1" SELECTED="SELECTED">Avvik er
lukket</option>
+
</xsl:when>
+
</xsl:choose>
+
</select>
+ </div>
+ <div>
+ <label
class="comment">Kommentar</label>
+
<textarea name="comment">
+
<xsl:value-of select="comment"/>
+
</textarea>
+ </div>
+ <div
class="form-buttons">
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save_check_item')" /></xsl:variable>
+
<input type="submit" name="save_control" value="Oppdater håndtert
avvik" class="not_active" title="{$lang_save}" />
+
</div>
+ </div>
+ </form>
+ </li>
+ </xsl:if>
+ </xsl:for-each>
+ </ul>
+ </xsl:when>
+ <xsl:otherwise>
+ Ingen registrerte håndterte avvik
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</div>
+</xsl:template>
\ No newline at end of file
Property changes on:
trunk/controller/templates/base/check_list/view_closed_cases.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/controller/templates/base/check_list/view_closed_errors.xsl
===================================================================
--- trunk/controller/templates/base/check_list/view_closed_errors.xsl
2012-01-09 14:34:10 UTC (rev 8547)
+++ trunk/controller/templates/base/check_list/view_closed_errors.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -1,110 +0,0 @@
-<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
-
-<xsl:template match="data">
-
-<div id="error_message_menu">
- <a class="btn" id="register_errors">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.register_errors</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
- <xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Registrer sak/måling
- </a>
- <a class="btn">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicase.create_case</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
- </xsl:attribute>
- Registrer avviksmelding
- </a>
-</div>
-
-<div id="view_errors">
-
- <div class="tab_menu">
- <a id="view_open_errors">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_errors</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
-
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Vis åpne saker
- </a>
- <a class="active" id="view_closed_errors">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_closed_errors</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
-
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Vis lukkede saker
- </a>
- <a id="view_measurements">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_measurements</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
-
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Vis målinger
- </a>
- </div>
-
- <div class="tab_item">
- <xsl:choose>
- <xsl:when test="handled_check_items/child::node()">
-
- <div class="expand_menu"><div class="expand_all">Vis
alle</div><div class="collapse_all focus">Skjul alle</div></div>
-
- <ul id="check_list_fixed_list"
class="check_items expand_list">
- <xsl:for-each
select="handled_check_items">
- <xsl:if test="status =
1">
- <li>
- <h4><img
src="controller/images/arrow_right.png" width="14"/><span><xsl:value-of
select="control_item/title"/></span></h4>
- <form
id="frm_save_check_item"
action="index.php?menuaction=controller.uicheck_list.save_check_item"
method="post">
-
<xsl:variable name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
- <input
type="hidden" name="check_item_id" value="{$check_item_id}" />
- <div
class="check_item">
- <div>
-
<label>Status</label>
-
<select name="status">
-
<xsl:choose>
-
<xsl:when test="status = 0">
-
<option value="0" SELECTED="SELECTED">Avvik er
åpent</option>
-
<option value="1">Avvik er håndtert</option>
-
</xsl:when>
-
<xsl:when test="status = 1">
-
<option value="0">Avvik er åpent</option>
-
<option value="1" SELECTED="SELECTED">Avvik er
lukket</option>
-
</xsl:when>
-
</xsl:choose>
-
</select>
- </div>
- <div>
- <label
class="comment">Kommentar</label>
-
<textarea name="comment">
-
<xsl:value-of select="comment"/>
-
</textarea>
- </div>
- <div
class="form-buttons">
-
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save_check_item')" /></xsl:variable>
-
<input type="submit" name="save_control" value="Oppdater håndtert
avvik" class="not_active" title="{$lang_save}" />
-
</div>
- </div>
- </form>
- </li>
- </xsl:if>
- </xsl:for-each>
- </ul>
- </xsl:when>
- <xsl:otherwise>
- Ingen registrerte håndterte avvik
- </xsl:otherwise>
- </xsl:choose>
- </div>
-</div>
-</xsl:template>
\ No newline at end of file
Modified: trunk/controller/templates/base/check_list/view_control_info.xsl
===================================================================
--- trunk/controller/templates/base/check_list/view_control_info.xsl
2012-01-09 14:34:10 UTC (rev 8547)
+++ trunk/controller/templates/base/check_list/view_control_info.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -94,7 +94,7 @@
Vis info om kontroll
</a>
- <a style="background:#DD624B;border-bottom: 1px solid
#CB563F;border-top: 1px solid #EE836F;box-shadow: 0 1px 0 #A9422E, 0 -1px 0
#A9422E;color: #FFFFFF;height: 18px;margin-left: 40px;margin-top: 1px;">
+ <a style="background:#DD624B;border-bottom: 1px solid
#CB563F;border-top: 1px solid #EE836F;box-shadow: 0 1px 0 #A9422E, 0 -1px 0
#A9422E;color: #FFFFFF;height: 18px;margin-left: 75px;margin-top: 1px;">
<xsl:attribute name="href">
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.register_error</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
Modified:
trunk/controller/templates/base/check_list/view_errors_for_check_list.xsl
===================================================================
--- trunk/controller/templates/base/check_list/view_errors_for_check_list.xsl
2012-01-09 14:34:10 UTC (rev 8547)
+++ trunk/controller/templates/base/check_list/view_errors_for_check_list.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -8,28 +8,28 @@
// ====================== LASTER FANEN view_open_errors NÅR
SIDEN LASTES FØRSTE GANG ===================
$(document).ready(function() {
- var requestUrl = $("#view_open_errors").attr("href");
+ var requestUrl = $("#view_open_cases").attr("href");
load_tab(requestUrl);
});
// ====================== FUNKSJONALITET FOR LASTING AV TABS
===================
$(function() {
- $("#register_errors").live("click", function(){
+ $("#register_case").live("click", function(){
var requestUrl = $(this).attr("href");
load_tab(requestUrl);
return false;
});
- $("#view_open_errors").live("click", function(){
+ $("#view_open_cases").live("click", function(){
var requestUrl = $(this).attr("href");
load_tab(requestUrl);
return false;
});
- $("#view_closed_errors").live("click", function(){
+ $("#view_closed_cases").live("click", function(){
var requestUrl = $(this).attr("href");
load_tab(requestUrl);
@@ -83,7 +83,7 @@
Vis info om kontroll
</a>
- <a style="background:#DD624B;border-bottom: 1px solid
#CB563F;border-top: 1px solid #EE836F;box-shadow: 0 1px 0 #A9422E, 0 -1px 0
#A9422E;color: #FFFFFF;height: 18px;margin-left: 40px;margin-top: 1px;">
+ <a style="background:#DD624B;border-bottom: 1px solid
#CB563F;border-top: 1px solid #EE836F;box-shadow: 0 1px 0 #A9422E, 0 -1px 0
#A9422E;color: #FFFFFF;height: 18px;margin-left: 75px;margin-top: 1px;">
<xsl:attribute name="href">
<xsl:text>index.php?menuaction=controller.uicheck_list_for_location.register_error</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
@@ -94,9 +94,9 @@
</div>
- <a style="display:none;" id="view_open_errors">
+ <a style="display:none;" id="view_open_cases">
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_errors</xsl:text>
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_cases</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
<xsl:value-of select="check_list/id"/>
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
Modified: trunk/controller/templates/base/check_list/view_measurements.xsl
===================================================================
--- trunk/controller/templates/base/check_list/view_measurements.xsl
2012-01-09 14:34:10 UTC (rev 8547)
+++ trunk/controller/templates/base/check_list/view_measurements.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -5,7 +5,7 @@
<div id="error_message_menu">
<a class="btn" id="register_errors">
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.register_errors</xsl:text>
+
<xsl:text>index.php?menuaction=controller.uicheck_list.register_case</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
<xsl:value-of select="check_list/id"/>
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
@@ -14,7 +14,7 @@
</a>
<a class="btn">
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicase.create_case</xsl:text>
+
<xsl:text>index.php?menuaction=controller.uicase.create_case_message</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
<xsl:value-of select="check_list/id"/>
</xsl:attribute>
@@ -27,7 +27,7 @@
<div class="tab_menu">
<a id="view_open_errors">
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_errors</xsl:text>
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_cases</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
<xsl:value-of select="check_list/id"/>
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
@@ -36,7 +36,7 @@
</a>
<a id="view_closed_errors">
<xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_closed_errors</xsl:text>
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_closed_cases</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
<xsl:value-of select="check_list/id"/>
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
Copied: trunk/controller/templates/base/check_list/view_open_cases.xsl (from
rev 8538, trunk/controller/templates/base/check_list/view_open_errors.xsl)
===================================================================
--- trunk/controller/templates/base/check_list/view_open_cases.xsl
(rev 0)
+++ trunk/controller/templates/base/check_list/view_open_cases.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -0,0 +1,110 @@
+<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
+
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+
+<div id="error_message_menu">
+ <a class="btn" id="register_case">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.register_case</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+ <xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+ </xsl:attribute>
+ Registrer sak/måling
+ </a>
+ <a class="btn">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicase.create_case_message</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+ </xsl:attribute>
+ Registrer avviksmelding
+ </a>
+</div>
+
+<div id="view_errors">
+
+ <div class="tab_menu">
+ <a class="active" id="view_open_cases">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_cases</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+ </xsl:attribute>
+ Vis åpne saker
+ </a>
+ <a id="view_closed_cases">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_closed_cases</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+ </xsl:attribute>
+ Vis lukkede saker
+ </a>
+ <a id="view_measurements">
+ <xsl:attribute name="href">
+
<xsl:text>index.php?menuaction=controller.uicheck_list.view_measurements</xsl:text>
+ <xsl:text>&check_list_id=</xsl:text>
+ <xsl:value-of select="check_list/id"/>
+
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
+ </xsl:attribute>
+ Vis målinger
+ </a>
+ </div>
+
+ <div class="tab_item active">
+ <xsl:choose>
+ <xsl:when test="open_check_items/child::node()">
+
+ <div class="expand_menu"><div class="expand_all">Vis
alle</div><div class="collapse_all focus">Skjul alle</div></div>
+
+ <ul id="check_list_not_fixed_list"
class="check_items expand_list">
+ <xsl:for-each select="open_check_items">
+ <li>
+ <xsl:if test="status =
0">
+ <h4><img
src="controller/images/arrow_right.png" width="14"/><span><xsl:value-of
select="control_item/title"/></span></h4>
+ <form
id="frm_save_check_item"
action="index.php?menuaction=controller.uicheck_list.save_check_item"
method="post">
+
<xsl:variable name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
+ <input
type="hidden" name="check_item_id" value="{$check_item_id}" />
+ <div
class="check_item">
+ <div>
+
<label>Status</label>
+
<select name="status">
+
<xsl:choose>
+
<xsl:when test="status = 0">
+
<option value="0" SELECTED="SELECTED">Avvik er
åpent</option>
+
<option value="1">Avvik er håndtert</option>
+
</xsl:when>
+
<xsl:when test="status = 1">
+
<option value="0">Avvik er åpent</option>
+
<option value="1" SELECTED="SELECTED">Avvik er
håndtert</option>
+
</xsl:when>
+
</xsl:choose>
+
</select>
+ </div>
+ <div>
+ <label
class="comment">Kommentar</label>
+
<textarea name="comment">
+
<xsl:value-of select="comment"/>
+
</textarea>
+ </div>
+ <div
class="form-buttons">
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save_check_item')" /></xsl:variable>
+
<input style="width: 200px;" type="submit" name="save_control"
value="Oppdater registrert avvik" class="not_active" title="{$lang_save}" />
+
</div>
+ </div>
+ </form>
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:when>
+ <xsl:otherwise>
+ Ingen registrerte åpne avvik
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</div>
+</xsl:template>
Property changes on:
trunk/controller/templates/base/check_list/view_open_cases.xsl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/controller/templates/base/check_list/view_open_errors.xsl
===================================================================
--- trunk/controller/templates/base/check_list/view_open_errors.xsl
2012-01-09 14:34:10 UTC (rev 8547)
+++ trunk/controller/templates/base/check_list/view_open_errors.xsl
2012-01-10 07:49:50 UTC (rev 8548)
@@ -1,110 +0,0 @@
-<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
-
-<xsl:template match="data" xmlns:php="http://php.net/xsl">
-
-<div id="error_message_menu">
- <a class="btn" id="register_errors">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.register_errors</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
- <xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Registrer sak/måling
- </a>
- <a class="btn">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicase.create_case</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
- </xsl:attribute>
- Registrer avviksmelding
- </a>
-</div>
-
-<div id="view_errors">
-
- <div class="tab_menu">
- <a class="active" id="view_open_errors">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_open_errors</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
-
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Vis åpne saker
- </a>
- <a id="view_closed_errors">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_closed_errors</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
-
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Vis lukkede saker
- </a>
- <a id="view_measurements">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicheck_list.view_measurements</xsl:text>
- <xsl:text>&check_list_id=</xsl:text>
- <xsl:value-of select="check_list/id"/>
-
<xsl:text>&phpgw_return_as=stripped_html</xsl:text>
- </xsl:attribute>
- Vis målinger
- </a>
- </div>
-
- <div class="tab_item active">
- <xsl:choose>
- <xsl:when test="open_check_items/child::node()">
-
- <div class="expand_menu"><div class="expand_all">Vis
alle</div><div class="collapse_all focus">Skjul alle</div></div>
-
- <ul id="check_list_not_fixed_list"
class="check_items expand_list">
- <xsl:for-each select="open_check_items">
- <li>
- <xsl:if test="status =
0">
- <h4><img
src="controller/images/arrow_right.png" width="14"/><span><xsl:value-of
select="control_item/title"/></span></h4>
- <form
id="frm_save_check_item"
action="index.php?menuaction=controller.uicheck_list.save_check_item"
method="post">
-
<xsl:variable name="check_item_id"><xsl:value-of select="id"/></xsl:variable>
- <input
type="hidden" name="check_item_id" value="{$check_item_id}" />
- <div
class="check_item">
- <div>
-
<label>Status</label>
-
<select name="status">
-
<xsl:choose>
-
<xsl:when test="status = 0">
-
<option value="0" SELECTED="SELECTED">Avvik er
åpent</option>
-
<option value="1">Avvik er håndtert</option>
-
</xsl:when>
-
<xsl:when test="status = 1">
-
<option value="0">Avvik er åpent</option>
-
<option value="1" SELECTED="SELECTED">Avvik er
håndtert</option>
-
</xsl:when>
-
</xsl:choose>
-
</select>
- </div>
- <div>
- <label
class="comment">Kommentar</label>
-
<textarea name="comment">
-
<xsl:value-of select="comment"/>
-
</textarea>
- </div>
- <div
class="form-buttons">
-
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'save_check_item')" /></xsl:variable>
-
<input style="width: 200px;" type="submit" name="save_control"
value="Oppdater registrert avvik" class="not_active" title="{$lang_save}" />
-
</div>
- </div>
- </form>
- </xsl:if>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:when>
- <xsl:otherwise>
- Ingen registrerte åpne avvik
- </xsl:otherwise>
- </xsl:choose>
- </div>
-</div>
-</xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8548],
Torstein <=