[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10875] Overwrited function edit_check_list in mobile
From: |
Torstein |
Subject: |
[Fmsystem-commits] [10875] Overwrited function edit_check_list in mobilefrontend |
Date: |
Sat, 16 Feb 2013 11:52:41 +0000 |
Revision: 10875
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10875
Author: vator
Date: 2013-02-16 11:52:41 +0000 (Sat, 16 Feb 2013)
Log Message:
-----------
Overwrited function edit_check_list in mobilefrontend
Modified Paths:
--------------
trunk/controller/templates/base/case/add_case.xsl
trunk/controller/templates/base/case/view_closed_cases.xsl
trunk/controller/templates/base/case/view_open_cases.xsl
trunk/controller/templates/mobilefrontend/check_list/fragments/check_list_menu.xsl
trunk/controller/templates/mobilefrontend/css/base.css
Added Paths:
-----------
trunk/controller/templates/mobilefrontend/case/
trunk/controller/templates/mobilefrontend/case/add_case.xsl
Removed Paths:
-------------
trunk/controller/templates/base/check_list/view_cases_for_check_list.xsl
Modified: trunk/controller/templates/base/case/add_case.xsl
===================================================================
--- trunk/controller/templates/base/case/add_case.xsl 2013-02-16 11:52:27 UTC
(rev 10874)
+++ trunk/controller/templates/base/case/add_case.xsl 2013-02-16 11:52:41 UTC
(rev 10875)
@@ -3,33 +3,9 @@
<xsl:variable name="session_url">&<xsl:value-of
select="php:function('get_phpgw_session_url')" /></xsl:variable>
<div id="main_content" class="medium">
- <div id="check-list-heading">
- <div class="box-1">
- <h1>Kontroll: <xsl:value-of
select="control/title"/></h1>
- <xsl:choose>
- <xsl:when test="type = 'component'">
- <h2><xsl:value-of
select="component_array/xml_short_desc"/></h2>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="location_level
= 1">
- <h2>Eiendom:
<xsl:value-of select="location_array/loc1_name"/></h2>
- </xsl:when>
- <xsl:otherwise>
- <h2>Bygg:
<xsl:value-of select="location_array/loc2_name"/></h2>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- <div class="box-2 select-box">
- <xsl:call-template name="nav_control_plan" />
- </div>
+
+ <xsl:call-template name="check_list_top_section" />
- <!-- ================== CHECKLIST TAB MENU
===================== -->
- <xsl:call-template name="check_list_menu" />
- </div>
-
<div style="margin:20px 0;">
<xsl:call-template name="select_buildings_on_property"
/>
</div>
Modified: trunk/controller/templates/base/case/view_closed_cases.xsl
===================================================================
--- trunk/controller/templates/base/case/view_closed_cases.xsl 2013-02-16
11:52:27 UTC (rev 10874)
+++ trunk/controller/templates/base/case/view_closed_cases.xsl 2013-02-16
11:52:41 UTC (rev 10875)
@@ -2,6 +2,7 @@
<xsl:template match="data" xmlns:php="http://php.net/xsl">
<xsl:variable name="session_url">&<xsl:value-of
select="php:function('get_phpgw_session_url')" /></xsl:variable>
+<div id="main_content" class="medium">
<xsl:call-template name="check_list_top_section" />
<div id="view_cases">
@@ -96,7 +97,6 @@
</xsl:choose>
</xsl:for-each>
</ul>
-
</xsl:when>
<xsl:otherwise>
<p>Ingen lukkede saker</p>
@@ -104,4 +104,5 @@
</xsl:choose>
</div>
</div>
+</div>
</xsl:template>
Modified: trunk/controller/templates/base/case/view_open_cases.xsl
===================================================================
--- trunk/controller/templates/base/case/view_open_cases.xsl 2013-02-16
11:52:27 UTC (rev 10874)
+++ trunk/controller/templates/base/case/view_open_cases.xsl 2013-02-16
11:52:41 UTC (rev 10875)
@@ -1,6 +1,7 @@
<!-- $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="main_content" class="medium">
<xsl:call-template name="check_list_top_section" />
<div id="view_cases">
@@ -42,4 +43,5 @@
</xsl:choose>
</div>
</div>
+</div>
</xsl:template>
Deleted:
trunk/controller/templates/base/check_list/view_cases_for_check_list.xsl
===================================================================
--- trunk/controller/templates/base/check_list/view_cases_for_check_list.xsl
2013-02-16 11:52:27 UTC (rev 10874)
+++ trunk/controller/templates/base/check_list/view_cases_for_check_list.xsl
2013-02-16 11:52:41 UTC (rev 10875)
@@ -1,80 +0,0 @@
-<!-- $Id: edit_check_list.xsl 8513 2012-01-07 10:38:09Z vator $ -->
-<xsl:template match="data" name="view_check_list"
xmlns:php="http://php.net/xsl">
-<xsl:variable name="date_format"><xsl:value-of
select="php:function('get_phpgw_info', 'user|preferences|common|dateformat')"
/></xsl:variable>
-<xsl:variable name="session_url">&<xsl:value-of
select="php:function('get_phpgw_session_url')" /></xsl:variable>
-
-<div id="main_content" class="medium">
- <script>
-
- // ====================== LASTER FANEN view_open_errors NÅR
SIDEN LASTES FØRSTE GANG ===================
- $(document).ready(function() {
- var requestUrl = $("#view_open_cases").attr("href");
- load_tab(requestUrl);
- });
-
- // ====================== FUNKSJONALITET FOR LASTING AV TABS
===================
- $(function() {
-
- $("#register_case").live("click", function(){
- var requestUrl = $(this).attr("href");
- load_tab(requestUrl);
-
- return false;
- });
-
- $("#view_open_cases").live("click", function(){
- var requestUrl = $(this).attr("href");
- load_tab(requestUrl);
-
- return false;
- });
-
- $("#view_closed_cases").live("click", function(){
- var requestUrl = $(this).attr("href");
- load_tab(requestUrl);
-
- return false;
- });
-
- $("#view_measurements").live("click", function(){
- var requestUrl = $(this).attr("href");
- load_tab(requestUrl);
-
- return false;
- });
- });
-
- function load_tab(requestUrl){
- $.ajax({
- type: 'POST',
- url: requestUrl,
- success: function(data) {
- $("#load_view_content").html(data);
- },
- error: function(XMLHttpRequest, textStatus,
errorThrown) {
- if (XMLHttpRequest.status === 401) {
- location.href = '/';
- }
- }
- });
- }
- </script>
-
- <xsl:call-template name="check_list_top_section" />
-
- <a id="view_open_cases">
- <xsl:attribute name="href">
-
<xsl:text>index.php?menuaction=controller.uicase.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:value-of select="$session_url"/>
- </xsl:attribute>
- </a>
-
- <div style="margin:20px 0;">
- <xsl:call-template name="select_buildings_on_property"
/>
- </div>
- <div id="load_view_content"></div>
-</div>
-</xsl:template>
Copied: trunk/controller/templates/mobilefrontend/case/add_case.xsl (from rev
10860, trunk/controller/templates/base/case/add_case.xsl)
===================================================================
--- trunk/controller/templates/mobilefrontend/case/add_case.xsl
(rev 0)
+++ trunk/controller/templates/mobilefrontend/case/add_case.xsl 2013-02-16
11:52:41 UTC (rev 10875)
@@ -0,0 +1,190 @@
+<!-- $Id: choose_control_items.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+<xsl:variable name="session_url">&<xsl:value-of
select="php:function('get_phpgw_session_url')" /></xsl:variable>
+
+<div id="main_content" class="medium">
+
+ <xsl:call-template name="check_list_top_section" />
+
+ <div style="margin:20px 0;">
+ <xsl:call-template name="select_buildings_on_property"
/>
+ </div>
+
+ <div id="view_cases">
+
+ <h3 class="box_header ext">Registrer sak/måling</h3>
+ <div class="tab_item active ext">
+
+ <xsl:variable name="action_url"><xsl:value-of
select="php:function('get_phpgw_link', '/index.php',
'menuaction:controller.uicase.add_case,phpgw_return_as:json')" /></xsl:variable>
+
+ <ul class="add-cases">
+ <xsl:for-each select="control_groups_with_items_array">
+ <xsl:choose>
+ <xsl:when test="control_items/child::node()">
+ <li>
+ <h3 class="expand-trigger"><img
src="controller/images/arrow_right.png" /><xsl:value-of
select="control_group/group_name"/></h3>
+ <ul class="expand_list"
style="display:none;">
+ <xsl:for-each
select="control_items">
+ <li>
+
<h4><img src="controller/images/arrow_right.png" /><span><xsl:value-of
select="title"/></span></h4>
+
<xsl:choose>
+
<xsl:when test="type = 'control_item_type_1'">
+
<form class="frm_register_case expand_item"
action="{$action_url}" 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 type="hidden"
name="check_list_id"><xsl:attribute name="value"><xsl:value-of
select="//check_list/id"/></xsl:attribute></input>
+
<input type="hidden" name="status" value="0" />
+ <input type="hidden" name="type"
value="control_item_type_1" />
+ <input type="hidden" name="location_code" value=""
class="required" />
+
+ <!-- WHAT TO DO -->
+ <div class="row what-to-do">
+ <label>Hva skal sjekkes:</label>
+ <div>
+ <xsl:value-of disable-output-escaping="yes"
select="what_to_do"/>
+ </div>
+ </div>
+
+ <!-- HOW TO DO -->
+ <div class="row how-to-do">
+ <label>Utførelsesbeskrivelse:</label>
+ <div>
+ <xsl:value-of disable-output-escaping="yes"
select="how_to_do"/>
+ </div>
+ </div>
+
+
<div>
+ <label class="comment">Beskrivelse av sak</label>
+
<textarea name="case_descr" class="required">
+
<xsl:value-of select="comment"/>
+
</textarea>
+
</div>
+
<input type="submit" class="btn" name="save_control"
value="Lagre sak" />
+
</form>
+
</xsl:when>
+
<xsl:when test="type = 'control_item_type_2'">
+
<form class="frm_register_case expand_item" action="{$action_url}"
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="type" type="hidden"
value="control_item_type_2" />
+
+
<div class="row">
+
<label>Status</label>
+
<select name="status">
+
<option value="0"
SELECTED="SELECTED">Åpen</option>
+
<option value="1" >Lukket</option>
+
<option value="2" >Venter på
tilbakemelding</option>
+
</select>
+
</div>
+
<div class="row">
+
<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 class="row">
+
<label class="comment">Beskrivelse av sak</label>
+
<textarea name="case_descr">
+
<xsl:value-of select="comment"/>
+
</textarea>
+
</div>
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'register_error')" /></xsl:variable>
+
<input type="submit" name="save_control" value="Lagre
måling" title="{$lang_save}" />
+
</form>
+
</xsl:when>
+
<xsl:when test="type = 'control_item_type_3'">
+
<form class="frm_register_case expand_item"
action="{$action_url}" 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="type" type="hidden"
value="control_item_type_3" />
+
+
<div class="row">
+
<label>Status</label>
+
<select name="status">
+
<option value="0"
SELECTED="SELECTED">Åpen</option>
+
<option value="1" >Lukket</option>
+
<option value="2" >Venter på
tilbakemelding</option>
+
</select>
+
</div>
+
<div class="row">
+
<label class="comment">Velg verdi fra liste</label>
+
<select name="option_value">
+
<xsl:for-each select="options_array">
+
<option>
+
<xsl:attribute
name="value"><xsl:value-of select="option_value"/></xsl:attribute>
+
<xsl:value-of
select="option_value"/>
+
</option>
+
</xsl:for-each>
+
</select>
+
</div>
+
<div class="row">
+
<label class="comment">Beskrivelse av sak</label>
+
<textarea name="case_descr">
+
<xsl:value-of select="comment"/>
+
</textarea>
+
</div>
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'register_error')" /></xsl:variable>
+
<input type="submit" name="save_control" value="Lagre
sak/måling" title="{$lang_save}" />
+
</form>
+
</xsl:when>
+
<xsl:when test="type = 'control_item_type_4'">
+
<form class="frm_register_case expand_item"
action="{$action_url}" 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="type" type="hidden"
value="control_item_type_4" />
+
+
<div class="row">
+
<label>Status</label>
+
<select name="status">
+
<option value="0"
SELECTED="SELECTED">Åpen</option>
+
<option value="1" >Lukket</option>
+
<option value="2" >Venter på
tilbakemelding</option>
+
</select>
+
</div>
+
<div class="row">
+
<label class="comment">Velg verdi fra liste</label>
+
<select name="option_value">
+
<xsl:for-each select="options_array">
+
<option>
+
<xsl:attribute
name="value"><xsl:value-of select="option_value"/></xsl:attribute>
+
<xsl:value-of
select="option_value"/>
+
</option>
+
</xsl:for-each>
+
</select>
+
</div>
+
<div class="row">
+
<label class="comment">Beskrivelse av sak</label>
+
<textarea name="case_descr">
+
<xsl:value-of select="comment"/>
+
</textarea>
+
</div>
+
<xsl:variable name="lang_save"><xsl:value-of
select="php:function('lang', 'register_error')" /></xsl:variable>
+
<input type="submit" name="save_control" value="Lagre
sak/måling" title="{$lang_save}" />
+
</form>
+
</xsl:when>
+
</xsl:choose>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </li>
+ </xsl:when>
+ <xsl:otherwise>
+ <li class="list_item">
+ <h3><xsl:value-of
select="control_group/group_name"/></h3>
+ <div>Ingen kontrollpunkt for
denne gruppen</div>
+ </li>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </ul>
+ </div>
+</div>
+</div>
+</xsl:template>
Modified:
trunk/controller/templates/mobilefrontend/check_list/fragments/check_list_menu.xsl
===================================================================
---
trunk/controller/templates/mobilefrontend/check_list/fragments/check_list_menu.xsl
2013-02-16 11:52:27 UTC (rev 10874)
+++
trunk/controller/templates/mobilefrontend/check_list/fragments/check_list_menu.xsl
2013-02-16 11:52:41 UTC (rev 10875)
@@ -4,9 +4,14 @@
<div id="check_list_menu">
<a class="first">
- <xsl:if test="$active_tab = 'reg_cases'">
- <xsl:attribute name="class">active</xsl:attribute>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="cases_view = 'add_case'">
+ <xsl:attribute name="class">first active</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">first</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="href">
<xsl:text>index.php?menuaction=controller.uicheck_list.add_case</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
@@ -16,7 +21,7 @@
Registrer sak
</a>
<a>
- <xsl:if test="$active_tab = 'view_cases'">
+ <xsl:if test="cases_view = 'open_cases'">
<xsl:attribute name="class">active</xsl:attribute>
</xsl:if>
<xsl:attribute name="href">
@@ -28,9 +33,14 @@
Vis åpne saker
</a>
<a class="last">
- <xsl:if test="$active_tab = 'view_cases'">
- <xsl:attribute name="class">active</xsl:attribute>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="cases_view = 'closed_cases'">
+ <xsl:attribute name="class">last active</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">last</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="href">
<xsl:text>index.php?menuaction=controller.uicase.view_closed_cases</xsl:text>
<xsl:text>&check_list_id=</xsl:text>
Modified: trunk/controller/templates/mobilefrontend/css/base.css
===================================================================
--- trunk/controller/templates/mobilefrontend/css/base.css 2013-02-16
11:52:27 UTC (rev 10874)
+++ trunk/controller/templates/mobilefrontend/css/base.css 2013-02-16
11:52:41 UTC (rev 10875)
@@ -1,5 +1,8 @@
+#main_content{
+ text-align: left;
+}
+
#main_content.medium {
- text-align: left;
width: 96%;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10875] Overwrited function edit_check_list in mobilefrontend,
Torstein <=