[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9419] frontend: add ticket to entity
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [9419] frontend: add ticket to entity |
Date: |
Tue, 22 May 2012 13:43:15 +0000 |
Revision: 9419
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9419
Author: sigurdne
Date: 2012-05-22 13:43:14 +0000 (Tue, 22 May 2012)
Log Message:
-----------
frontend: add ticket to entity
Modified Paths:
--------------
trunk/frontend/inc/class.uientity.inc.php
trunk/frontend/inc/class.uihelpdesk.inc.php
trunk/frontend/templates/base/helpdesk.xsl
trunk/property/js/tinybox2/style.css
trunk/property/js/yahoo/property.js
Modified: trunk/frontend/inc/class.uientity.inc.php
===================================================================
--- trunk/frontend/inc/class.uientity.inc.php 2012-05-22 07:05:44 UTC (rev
9418)
+++ trunk/frontend/inc/class.uientity.inc.php 2012-05-22 13:43:14 UTC (rev
9419)
@@ -45,6 +45,7 @@
public function __construct()
{
+ $GLOBALS['phpgw']->translation->add_app('property');
$this->location_id =
phpgw::get_var('location_id', 'int', 'REQUEST', 0);
$location_info =
$GLOBALS['phpgw']->locations->get_name($this->location_id);
$this->acl_location =
$location_info['location'];
@@ -606,11 +607,11 @@
(
'menuaction' =>
'frontend.uihelpdesk.add_ticket',
'noframework' => 1,
- 'target'
=> '_lightbox',
+// 'target'
=> '_blank',
+ 'target'
=> '_tinybox',
'p_entity_id' =>
$this->entity_id,
'p_cat_id'
=> $this->cat_id,
'type'
=> $this->type,
- 'target'
=> '_blank',
'bypass'
=> true,
'origin'
=> ".{$this->type}.{$this->entity_id}.{$this->cat_id}",
)),
@@ -618,6 +619,8 @@
);
}
+ $GLOBALS['phpgw']->js->validate_file('tinybox2',
'packed' , 'property');
+
$GLOBALS['phpgw']->css->add_external_file('property/js/tinybox2/style.css');
$jasper = execMethod('property.sojasper.read',
array('location_id' =>
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type],
$this->acl_location)));
@@ -877,7 +880,6 @@
public function view()
{
- $GLOBALS['phpgw']->translation->add_app('property');
$bo = & $this->bo;
$id = phpgw::get_var('id');
$values = $bo->read_single(array('id' => $id,
'entity_id' => $this->entity_id, 'cat_id' => $this->cat_id, 'view' => true));
Modified: trunk/frontend/inc/class.uihelpdesk.inc.php
===================================================================
--- trunk/frontend/inc/class.uihelpdesk.inc.php 2012-05-22 07:05:44 UTC (rev
9418)
+++ trunk/frontend/inc/class.uihelpdesk.inc.php 2012-05-22 13:43:14 UTC (rev
9419)
@@ -48,6 +48,7 @@
phpgwapi_cache::session_set('frontend','tab',$GLOBALS['phpgw']->locations->get_id('frontend','.ticket'));
parent::__construct();
$this->location_code =
$this->header_state['selected_location'];
+ $GLOBALS['phpgw']->translation->add_app('property');
}
public function index()
@@ -517,12 +518,36 @@
public function add_ticket()
{
+
+ $values = phpgw::get_var('values');
+
+ $bypass = phpgw::get_var('bypass',
'bool');
+ if($bypass)
+ {
+ $boadmin_entity =
CreateObject('property.boadmin_entity');
+ $p_entity_id =
phpgw::get_var('p_entity_id', 'int');
+ $p_cat_id =
phpgw::get_var('p_cat_id', 'int');
+ $values['p'][$p_entity_id]['p_entity_id']
= $p_entity_id;
+ $values['p'][$p_entity_id]['p_cat_id']
= $p_cat_id;
+ $values['p'][$p_entity_id]['p_num']
= phpgw::get_var('p_num');
+
+ if($p_entity_id && $p_cat_id)
+ {
+ $entity_category =
$boadmin_entity->read_single_category($p_entity_id,$p_cat_id);
+
$values['p'][$p_entity_id]['p_cat_name'] = $entity_category['name'];
+
+ $id = phpgw::get_var('p_num');
+ $item =
execMethod('property.boentity.read_single',(array('id' => $id, 'entity_id' =>
$p_entity_id, 'cat_id' => $p_cat_id, 'view' => true)));
+ }
+
+ }
+
$bo = CreateObject('property.botts',true);
$boloc = CreateObject('property.bolocation',true);
$location_details =
$boloc->read_single($this->location_code, array('noattrib' => true));
- $values = phpgw::get_var('values');
+
$missingfields = false;
$msglog = array();
@@ -668,10 +693,11 @@
'locationdesc' =>
$values['locationdesc'],
'description' =>
$values['description'],
'noform' => $noform,
- 'category_list' => $category_list
+ 'category_list' => $category_list,
+ 'custom_attributes' => array('attributes'
=> $item['attributes']),
);
-
$GLOBALS['phpgw']->xslttpl->add_file(array('frontend','helpdesk'));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('frontend','helpdesk','attributes_view'));
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',
array('add_ticket' => $data));
}
Modified: trunk/frontend/templates/base/helpdesk.xsl
===================================================================
--- trunk/frontend/templates/base/helpdesk.xsl 2012-05-22 07:05:44 UTC (rev
9418)
+++ trunk/frontend/templates/base/helpdesk.xsl 2012-05-22 13:43:14 UTC (rev
9419)
@@ -50,7 +50,7 @@
</script>
</xsl:when>
</xsl:choose>
- <h2>Ny skademelding</h2>
+ <h2>Ny melding</h2>
<form ENCTYPE="multipart/form-data" name="form" method="post"
action="{form_action}">
<table cellpadding="0" cellspacing="0" width="100%">
<xsl:choose>
@@ -66,7 +66,7 @@
<xsl:if test="noform != 1">
<tr>
- <td class="th_text" valign="top">
+ <td class="th_text" valign="top">
<xsl:value-of select="php:function('lang',
'category')" />
</td>
<td class="th_text" valign="top">
@@ -126,6 +126,17 @@
<input type="submit" name="values[save]"
value="{$lang_send}" title='{$lang_send}'/>
</td>
</tr>
+ <tr>
+ <td>
+ </td>
+ <td >
+ <li>
+ <xsl:apply-templates
select="custom_attributes/attributes"/>
+ <hr/>
+ </li>
+ </td>
+ </tr>
+
</xsl:if>
</table>
</form>
Modified: trunk/property/js/tinybox2/style.css
===================================================================
--- trunk/property/js/tinybox2/style.css 2012-05-22 07:05:44 UTC (rev
9418)
+++ trunk/property/js/tinybox2/style.css 2012-05-22 13:43:14 UTC (rev
9419)
@@ -1,4 +1,4 @@
-body {font:12px/1.4 Verdana,Arial; background:#eee; height:100%; margin:25px
0; padding:0}
+/*body {font:12px/1.4 Verdana,Arial; background:#eee; height:100%; margin:25px
0; padding:0}
h1 {font:30px 'Trebuchet MS',Verdana; margin:0}
h2 {font-size:12px; font-weight:normal; font-style:italic; margin:0 0 20px}
p {margin:0 0 14px}
@@ -7,7 +7,7 @@
ul {list-style:none; margin-bottom:12px; padding:0}
li {font:14px Georgia,Verdana; margin-bottom:4px; padding:8px 10px 9px;
border:1px solid #ccc; background:#eee; cursor:pointer}
li:hover {border:1px solid #bbb; background:#e3e3e3}
-
+*/
.tbox {position:absolute; display:none; padding:14px 17px; z-index:900}
.tinner {padding:15px; -moz-border-radius:5px; border-radius:5px;
background:#fff url(images/preload.gif) no-repeat 50% 50%; border-right:1px
solid #333; border-bottom:1px solid #333}
.tmask {position:absolute; display:none; top:0px; left:0px; height:100%;
width:100%; background:#000; z-index:800}
Modified: trunk/property/js/yahoo/property.js
===================================================================
--- trunk/property/js/yahoo/property.js 2012-05-22 07:05:44 UTC (rev 9418)
+++ trunk/property/js/yahoo/property.js 2012-05-22 13:43:14 UTC (rev 9419)
@@ -676,6 +676,12 @@
//console.log(sUrl); //
firebug
showlightbox(sUrl);
}
+ else
if(substr_count(sUrl,'target=_tinybox')>0)
+ {
+ //have to be defined as
a local function. Example in invoice.list_sub.js
+ //console.log(sUrl); //
firebug
+ showtinybox(sUrl);
+ }
else
{
window.open(sUrl,'_self');
@@ -1470,6 +1476,25 @@
}
return array_result;
}
+
+ this.showtinybox = function(sUrl)
+ {
+ TINY.box.show({
+ iframe:sUrl,
+ boxid:'frameless',
+ width:750,
+ height:450,
+ fixed:false,
+ maskid:'darkmask',
+ maskopacity:40,
+ mask:true,
+ animate:true,
+ close: true,
+ // closejs:function(){closeJS_local()}
+ });
+ }
+
+
//----------------------------------------------------------------------------------------
CreateLoading();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9419] frontend: add ticket to entity,
Sigurd Nes <=