fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16107] more on rental


From: sigurdne
Subject: [Fmsystem-commits] [16107] more on rental
Date: Tue, 20 Dec 2016 16:39:37 +0000 (UTC)

Revision: 16107
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16107
Author:   sigurdne
Date:     2016-12-20 16:39:37 +0000 (Tue, 20 Dec 2016)
Log Message:
-----------
more on rental

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.login.inc.php
    trunk/rental/inc/class.uimoveout.inc.php
    trunk/rental/js/rental/moveout.edit.js
    trunk/rental/setup/phpgw_no.lang
    trunk/rental/templates/base/moveout.xsl

Modified: trunk/phpgwapi/inc/class.login.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.login.inc.php      2016-12-20 14:08:52 UTC (rev 
16106)
+++ trunk/phpgwapi/inc/class.login.inc.php      2016-12-20 16:39:37 UTC (rev 
16107)
@@ -67,6 +67,8 @@
                        if($frontend)
                        {
                                
$GLOBALS['phpgw']->hooks->process('set_auth_type', array($frontend));
+                               $GLOBALS['phpgw_info']['login_left_message'] = 
'';
+                               $GLOBALS['phpgw_info']['login_right_message'] = 
'';
                        }
                        
                        if (isset($_REQUEST['skip_remote']) && 
$_REQUEST['skip_remote']) // In case a user failed logged in via SSO - get 
another try

Modified: trunk/rental/inc/class.uimoveout.inc.php
===================================================================
--- trunk/rental/inc/class.uimoveout.inc.php    2016-12-20 14:08:52 UTC (rev 
16106)
+++ trunk/rental/inc/class.uimoveout.inc.php    2016-12-20 16:39:37 UTC (rev 
16107)
@@ -157,6 +157,10 @@
                                'label' => lang('moveout'),
                                'link' => '#first_tab'
                        );
+//                     $tabs['signature'] = array(
+//                             'label' => lang('signature'),
+//                             'link' => '#signature'
+//                     );
 
 
                        $comments = (array)$moveout->comments;
@@ -219,8 +223,11 @@
                        );
                        phpgwapi_jquery::formvalidator_generate(array());
                        phpgwapi_jquery::load_widget('autocomplete');
+//                     self::add_javascript('phpgwapi', 'signature_pad', 
'signature_pad.min.js');
+//                     
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/signature_pad/signature-pad.css');
+                       $attributes_xsl = $mode == 'edit' ? 'attributes_form' : 
'attributes_view';
                        self::add_javascript('rental', 'rental', 
'moveout.edit.js');
-                       self::render_template_xsl(array('moveout', 
'datatable_inline', 'attributes_form'), array($mode => $data));
+                       self::render_template_xsl(array('moveout', 
'datatable_inline', $attributes_xsl), array($mode => $data));
                }
 
                /*
@@ -247,4 +254,18 @@
                {
                        parent::save();
                }
+
+               /**
+                * (non-PHPdoc)
+                * @see eventplanner/inc/eventplanner_uicommon#query()
+                */
+               public function query()
+               {
+                       $params = $this->bo->build_default_read_params();
+                       $values = $this->bo->read($params);
+                       array_walk($values["results"], array($this, 
"_add_links"), "rental.uimoveout.edit");
+
+                       return $this->jquery_results($values);
+               }
+
        }
\ No newline at end of file

Modified: trunk/rental/js/rental/moveout.edit.js
===================================================================
--- trunk/rental/js/rental/moveout.edit.js      2016-12-20 14:08:52 UTC (rev 
16106)
+++ trunk/rental/js/rental/moveout.edit.js      2016-12-20 16:39:37 UTC (rev 
16107)
@@ -59,7 +59,7 @@
        JqueryPortico.execute_ajax(requestUrl,
                function (result)
                {
-               
+
                        $("#executive_officer").html(result.executive_officer);
                        $("#composite").html(result.composite);
                        $("#rented_area").html(result.rented_area);
@@ -78,3 +78,51 @@
                }, data, "POST", "json"
                );
 }
+
+/*
+$(document).ready(function ()
+{
+
+       var wrapper = document.getElementById("signature-pad"),
+               clearButton = wrapper.querySelector("[data-action=clear]"),
+               saveButton = wrapper.querySelector("[data-action=save]"),
+               canvas = wrapper.querySelector("canvas"),
+               signaturePad;
+
+// Adjust canvas coordinate space taking into account pixel ratio,
+// to make it look crisp on mobile devices.
+// This also causes canvas to be cleared.
+       function resizeCanvas()
+       {
+               // When zoomed out to less than 100%, for some very strange 
reason,
+               // some browsers report devicePixelRatio as less than 1
+               // and only part of the canvas is cleared then.
+               var ratio = Math.max(window.devicePixelRatio || 1, 1);
+               canvas.width = canvas.offsetWidth * ratio;
+               canvas.height = canvas.offsetHeight * ratio;
+               canvas.getContext("2d").scale(ratio, ratio);
+       }
+
+       window.onresize = resizeCanvas;
+       resizeCanvas();
+
+       signaturePad = new SignaturePad(canvas);
+
+       clearButton.addEventListener("click", function (event)
+       {
+               signaturePad.clear();
+       });
+
+       saveButton.addEventListener("click", function (event)
+       {
+               if (signaturePad.isEmpty())
+               {
+                       alert("Please provide signature first.");
+               }
+               else
+               {
+                       window.open(signaturePad.toDataURL());
+               }
+       });
+});
+ */
\ No newline at end of file

Modified: trunk/rental/setup/phpgw_no.lang
===================================================================
--- trunk/rental/setup/phpgw_no.lang    2016-12-20 14:08:52 UTC (rev 16106)
+++ trunk/rental/setup/phpgw_no.lang    2016-12-20 16:39:37 UTC (rev 16107)
@@ -643,4 +643,8 @@
 schedule       rental  no      Kalender
 moveout        rental  no      Utflytting
 custom fields  rental  no      Egendefinerte felt
-custom field groups    rental  no      Grupper for Egendefinerte felt
\ No newline at end of file
+custom field groups    rental  no      Grupper for Egendefinerte felt
+report rental  no      Rapport
+basis data     rental  no      Grunnlagsdata
+created        rental  no      Registrert
+modified       rental  no      Endret
\ No newline at end of file

Modified: trunk/rental/templates/base/moveout.xsl
===================================================================
--- trunk/rental/templates/base/moveout.xsl     2016-12-20 14:08:52 UTC (rev 
16106)
+++ trunk/rental/templates/base/moveout.xsl     2016-12-20 16:39:37 UTC (rev 
16107)
@@ -82,118 +82,10 @@
                                                        <div 
id="contract_container"/>
                                                </div>
 
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'executive_officer')"/>
-                                                       </label>
-                                                       <div 
id="executive_officer" class="pure-custom">
-                                                               <xsl:value-of 
select="contract/executive_officer"/>
-                                                       </div>
-                                               </div>
+                                               <xsl:call-template 
name="contract_info">
+                                                       <xsl:with-param 
name="contract" select ='contract'/>
+                                               </xsl:call-template>
 
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'composite')"/>
-                                                       </label>
-                                                       <div id="composite" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/composite"/>
-                                                       </div>
-                                               </div>
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'rented_area')"/>
-                                                       </label>
-                                                       <div id="rented_area" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/rented_area"/>
-                                                       </div>
-                                               </div>
-
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'security_amount')"/>
-                                                       </label>
-                                                       <div 
id="security_amount" class="pure-custom">
-                                                               <xsl:value-of 
select="contract/security_amount"/>
-                                                       </div>
-                                               </div>
-
-
-
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'date_start')"/>
-                                                       </label>
-                                                       <div id="date_start" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/date_start"/>
-                                                       </div>
-                                               </div>
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'date_end')"/>
-                                                       </label>
-                                                       <div id="date_end" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/date_end"/>
-                                                       </div>
-                                               </div>
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'type')"/>
-                                                       </label>
-                                                       <div id="type" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/type"/>
-                                                       </div>
-                                               </div>
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'party')"/>
-                                                       </label>
-                                                       <div id="party" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/party"/>
-                                                       </div>
-                                               </div>
-
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'identifier')"/>
-                                                       </label>
-                                                       <div id="identifier" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/identifier"/>
-                                                       </div>
-                                               </div>
-
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'mobile_phone')"/>
-                                                       </label>
-                                                       <div id="mobile_phone" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/mobile_phone"/>
-                                                       </div>
-                                               </div>
-
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'department')"/>
-                                                       </label>
-                                                       <div id="department" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/department"/>
-                                                       </div>
-                                               </div>
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'contract_status')"/>
-                                                       </label>
-                                                       <div 
id="contract_status" class="pure-custom">
-                                                               <xsl:value-of 
select="contract/contract_status"/>
-                                                       </div>
-                                               </div>
-                                               <div class="pure-control-group">
-                                                       <label>
-                                                               <xsl:value-of 
select="php:function('lang', 'billing_terms')"/>
-                                                       </label>
-                                                       <div id="term_label" 
class="pure-custom">
-                                                               <xsl:value-of 
select="contract/term_label"/>
-                                                       </div>
-                                               </div>
                                        </fieldset>
 
                                        <fieldset>
@@ -262,20 +154,206 @@
 
 
 <xsl:template xmlns:php="http://php.net/xsl"; match="view">
+       <xsl:variable name="date_format">
+               <xsl:value-of select="php:function('get_phpgw_info', 
'user|preferences|common|dateformat')" />
+       </xsl:variable>
+       <xsl:variable name="form_action">
+               <xsl:value-of select="form_action"/>
+       </xsl:variable>
+       <xsl:variable name="mode">
+               <xsl:value-of select="mode"/>
+       </xsl:variable>
        <div>
                <form id="form" name="form" method="post" action="" 
class="pure-form pure-form-aligned">
                        <div id="tab-content">
                                <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
-                               <div id="showing">
+                               <div id="first_tab">
+                                       <fieldset>
+                                               <legend>
+                                                       <xsl:value-of 
select="php:function('lang', 'basis data')"/>
+                                               </legend>
+                                               <xsl:if test="moveout/id > 0">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'id')"/>
+                                                               </label>
+                                                               <input 
type="hidden" name="id" value="{moveout/id}"/>
+                                                               <xsl:value-of 
select="moveout/id"/>
+                                                       </div>
+                                               </xsl:if>
 
+
+                                               <div class="pure-control-group">
+                                                       <xsl:variable 
name="lang_contract">
+                                                               <xsl:value-of 
select="php:function('lang', 'contract')"/>
+                                                       </xsl:variable>
+                                                       <label>
+                                                               <xsl:value-of 
select="$lang_contract"/>
+                                                       </label>
+                                                       <div id="composite" 
class="pure-custom">
+                                                               <xsl:value-of 
select="contract/old_contract_id"/>
+                                                       </div>
+                                               </div>
+       
+                                               <xsl:call-template 
name="contract_info">
+                                                       <xsl:with-param 
name="contract" select ='contract'/>
+                                               </xsl:call-template>
+
+                                       </fieldset>
+
+                                       <fieldset>
+                                               <legend>
+                                                       <xsl:value-of 
select="php:function('lang', 'report')"/>
+                                               </legend>
+
+                                               <xsl:call-template 
name="attributes_values"/>
+
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'details')"/>
+                                                       </label>
+                                                       <div 
class="pure-custom">
+                                                               <xsl:for-each 
select="datatable_def">
+                                                                       <xsl:if 
test="container = 'datatable-container_0'">
+                                                                               
<xsl:call-template name="table_setup">
+                                                                               
        <xsl:with-param name="container" select ='container'/>
+                                                                               
        <xsl:with-param name="requestUrl" select ='requestUrl'/>
+                                                                               
        <xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+                                                                               
        <xsl:with-param name="data" select ='data'/>
+                                                                               
        <xsl:with-param name="config" select ='config'/>
+                                                                               
</xsl:call-template>
+                                                                       
</xsl:if>
+                                                               </xsl:for-each>
+                                                       </div>
+                                               </div>
+                                       </fieldset>
                                </div>
                        </div>
                        <div class="proplist-col">
                                <xsl:variable name="cancel_url">
                                        <xsl:value-of select="cancel_url"/>
                                </xsl:variable>
-                               <input type="button" class="pure-button 
pure-button-primary" name="cancel" value="{lang_cancel}" 
onMouseout="window.status='';return true;" onClick="window.location = 
'{cancel_url}';"/>
+                               <xsl:variable name="lang_cancel">
+                                       <xsl:value-of 
select="php:function('lang', 'cancel')"/>
+                               </xsl:variable>
+                               <input type="button" class="pure-button 
pure-button-primary" name="cancel" value="{$lang_cancel}" 
onClick="window.location = '{cancel_url}';"/>
                        </div>
                </form>
        </div>
 </xsl:template>
+
+
+<xsl:template name="contract_info" xmlns:php="http://php.net/xsl";>
+       <xsl:param name="contract" />
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'executive_officer')"/>
+               </label>
+               <div id="executive_officer" class="pure-custom">
+                       <xsl:value-of select="contract/executive_officer"/>
+               </div>
+       </div>
+
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'composite')"/>
+               </label>
+               <div id="composite" class="pure-custom">
+                       <xsl:value-of select="contract/composite"/>
+               </div>
+       </div>
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'rented_area')"/>
+               </label>
+               <div id="rented_area" class="pure-custom">
+                       <xsl:value-of select="contract/rented_area"/>
+               </div>
+       </div>
+
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'security_amount')"/>
+               </label>
+               <div id="security_amount" class="pure-custom">
+                       <xsl:value-of select="contract/security_amount"/>
+               </div>
+       </div>
+
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'date_start')"/>
+               </label>
+               <div id="date_start" class="pure-custom">
+                       <xsl:value-of select="contract/date_start"/>
+               </div>
+       </div>
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'date_end')"/>
+               </label>
+               <div id="date_end" class="pure-custom">
+                       <xsl:value-of select="contract/date_end"/>
+               </div>
+       </div>
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 'type')"/>
+               </label>
+               <div id="type" class="pure-custom">
+                       <xsl:value-of select="contract/type"/>
+               </div>
+       </div>
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 'party')"/>
+               </label>
+               <div id="party" class="pure-custom">
+                       <xsl:value-of select="contract/party"/>
+               </div>
+       </div>
+
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'identifier')"/>
+               </label>
+               <div id="identifier" class="pure-custom">
+                       <xsl:value-of select="contract/identifier"/>
+               </div>
+       </div>
+
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'mobile_phone')"/>
+               </label>
+               <div id="mobile_phone" class="pure-custom">
+                       <xsl:value-of select="contract/mobile_phone"/>
+               </div>
+       </div>
+
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'department')"/>
+               </label>
+               <div id="department" class="pure-custom">
+                       <xsl:value-of select="contract/department"/>
+               </div>
+       </div>
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'contract_status')"/>
+               </label>
+               <div id="contract_status" class="pure-custom">
+                       <xsl:value-of select="contract/contract_status"/>
+               </div>
+       </div>
+       <div class="pure-control-group">
+               <label>
+                       <xsl:value-of select="php:function('lang', 
'billing_terms')"/>
+               </label>
+               <div id="term_label" class="pure-custom">
+                       <xsl:value-of select="contract/term_label"/>
+               </div>
+       </div>
+
+</xsl:template>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]