fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10454]


From: Torstein
Subject: [Fmsystem-commits] [10454]
Date: Sun, 04 Nov 2012 16:08:22 +0000

Revision: 10454
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10454
Author:   vator
Date:     2012-11-04 16:08:21 +0000 (Sun, 04 Nov 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/logistic/inc/class.uiactivity.inc.php
    trunk/logistic/inc/class.uiproject.inc.php
    trunk/logistic/js/logistic/activity.js
    trunk/logistic/setup/phpgw_no.lang
    trunk/logistic/templates/base/activity/add_activity_item.xsl
    trunk/logistic/templates/base/css/base.css
    trunk/logistic/templates/base/requirement/requirement_overview.xsl

Modified: trunk/logistic/inc/class.uiactivity.inc.php
===================================================================
--- trunk/logistic/inc/class.uiactivity.inc.php 2012-11-04 14:04:15 UTC (rev 
10453)
+++ trunk/logistic/inc/class.uiactivity.inc.php 2012-11-04 16:08:21 UTC (rev 
10454)
@@ -391,6 +391,10 @@
                                        $parent_activity = 
$this->so->get_single( $parent_activity_id );
                                        $activity->set_project_id( 
$parent_activity->get_project_id() );
                                }
+                               else
+                               {
+                                       $projects = $this->so_project->get();
+                               }
                        }
 
                        if($activity->get_parent_id() > 0)
@@ -416,6 +420,11 @@
                                $data['project'] = $project;
                        }
                        
+                       if($projects)
+                       {
+                               $data['projects'] = $projects;
+                       }
+                       
                        if($parent_activity)
                        {
                                $data['parent_activity'] = $parent_activity;

Modified: trunk/logistic/inc/class.uiproject.inc.php
===================================================================
--- trunk/logistic/inc/class.uiproject.inc.php  2012-11-04 14:04:15 UTC (rev 
10453)
+++ trunk/logistic/inc/class.uiproject.inc.php  2012-11-04 16:08:21 UTC (rev 
10454)
@@ -247,7 +247,7 @@
                                                ),
                                                array(
                                                        'key' => 
'add_activity_link',
-                                                       'label' => 
lang('Delete'),
+                                                       'label' => lang('Add 
activity'),
                                                        'sortable' => false
                                                ),
                                                array(

Modified: trunk/logistic/js/logistic/activity.js
===================================================================
--- trunk/logistic/js/logistic/activity.js      2012-11-04 14:04:15 UTC (rev 
10453)
+++ trunk/logistic/js/logistic/activity.js      2012-11-04 16:08:21 UTC (rev 
10454)
@@ -1,17 +1,22 @@
 $(document).ready(function(){
-       $("#select_activity").change(function () {
+       $("#select_parent_activity").change(function () {
                 var parent_id = $(this).val();
                 var thisForm = $(this).closest("form");
-                var activity_id = 
$(thisForm).find("input[name=activity_id]").val();
-                var activity_id = 
$(thisForm).find("input[name=activity_id]").val();
+                
$(thisForm).find("input[name=parent_activity_id]").val(parent_id);
+
+                alert(activity_id);
                 
-                var oArgs = {menuaction:'logistic.uiactivity.edit'};
-                var baseUrl = phpGWLink('index.php', oArgs, false);
-                var requestUrl = baseUrl + "&parent_id=" + parent_id + 
"&activity_id=" + activity_id;
-                        
-                window.location.href = requestUrl;
        });
        
+       $("#select_project").change(function () {
+                var project_id = $(this).val();
+                var thisForm = $(this).closest("form");
+                $(thisForm).find("input[name=project_id]").val(project_id);
+
+                alert(project_id);
+                
+       });
+       
        $("#activity_details input").focus(function(e){
                var wrpElem = $(this).parents("dd");
                $(wrpElem).find(".help_text").fadeIn(200);

Modified: trunk/logistic/setup/phpgw_no.lang
===================================================================
--- trunk/logistic/setup/phpgw_no.lang  2012-11-04 14:04:15 UTC (rev 10453)
+++ trunk/logistic/setup/phpgw_no.lang  2012-11-04 16:08:21 UTC (rev 10454)
@@ -88,4 +88,6 @@
 Edit activity  logistic        no      Endre aktivitet
 Add activity   logistic        no      Legg til aktivitet
 Overview of resources for activity     logistic        no      Oversikt over 
ressurser for aktivteten
+Allocated resouces     logistic        no      Tildelte ressurser
+Click on table above to get allocations        logistic        no      Klikk 
på en rad i tabellen over for å få frem visning
 Add activity to project        logistic        no      Legg aktivitet til 
prosjektet
\ No newline at end of file

Modified: trunk/logistic/templates/base/activity/add_activity_item.xsl
===================================================================
--- trunk/logistic/templates/base/activity/add_activity_item.xsl        
2012-11-04 14:04:15 UTC (rev 10453)
+++ trunk/logistic/templates/base/activity/add_activity_item.xsl        
2012-11-04 16:08:21 UTC (rev 10454)
@@ -11,7 +11,7 @@
                                <span style="margin-left:5px;"><xsl:value-of 
select="project/name" /></span>
                        </h1>
                </xsl:when>
-               <xsl:when test="activity/id != '' or activity/id != 0">
+               <xsl:when test="activity/id != '' and activity/id != 0">
                        <h1>
                                <xsl:value-of select="php:function('lang', 
'Edit activity')" />
                        </h1>
@@ -34,13 +34,12 @@
                                <input type="hidden" name="parent_id" 
value="{parent_activity/id}" />
                                
                                <dl class="proplist-col">
-                                       <xsl:choose>
-                                               <xsl:when 
test="parent_activity/id &gt; 0">
+                                 <xsl:choose>
+                                               <xsl:when test="(editable) and 
(parent_activity/id &gt; 0)">
                                                        <dt>            
-                                                               <xsl:if 
test="editable">
-                                                                       <div 
style="display:none;margin-bottom: 1em;">
+                                                                       <div 
style="margin-bottom: 1em;">
                                                                                
<label style="display:block;">Velg en annen hovedaktivitet</label>
-                                                                               
<select id="select_activity" name="parent_activity_id" class="selectLocation">
+                                                                               
<select id="select_parent_activity" name="parent_activity_id">
                                                                                
        <option>Velg aktivitet</option>
                                                                                
        <xsl:for-each select="activities">
                                                                        <option 
value="{id}">
@@ -54,19 +53,17 @@
                                                                                
  </xsl:for-each>
                                                                                
</select>                                       
                                                                        </div>
-                                                                       
</xsl:if>
                                                                </dt>
-                                               </xsl:when>
-                                               <xsl:otherwise>
+                                                 </xsl:when>
+                                                 <xsl:otherwise>
                                                        <dt>            
-                                                               <xsl:if 
test="editable">
                                                                        <div 
style="margin-bottom: 1em;">
-                                                                               
<label style="display:block;">Er aktiviteten en underaktivitet?</label>
-                                                                               
<select id="select_activity" name="parent_activity_id" class="selectLocation">
-                                                                               
        <option>Velg hovedaktivitet</option>
-                                                                               
        <xsl:for-each select="activities">
+                                                                               
<label style="display:block;">Velg et annet prosjekt for aktiviteten </label>
+                                                                               
<select id="select_project" name="select_project">
+                                                                               
        <option>Velg prosjekt</option>
+                                                                               
        <xsl:for-each select="projects">
                                                                        <option 
value="{id}">
-                                                                               
<xsl:if test="activity/parent_id = id">
+                                                                               
<xsl:if test="project/id = project_id">
                                                                                
        <xsl:attribute name="selected">
                                                                                
                        selected
                                                                                
                        </xsl:attribute>
@@ -76,10 +73,9 @@
                                                                                
  </xsl:for-each>
                                                                                
</select>                                       
                                                                        </div>
-                                                                       
</xsl:if>
                                                                </dt>
-                                               </xsl:otherwise>        
-                                       </xsl:choose>
+                                                 </xsl:otherwise>
+                                         </xsl:choose>
                                        <dt>
                                                <label for="name"><xsl:value-of 
select="php:function('lang','Activity name')" /></label>
                                        </dt>

Modified: trunk/logistic/templates/base/css/base.css
===================================================================
--- trunk/logistic/templates/base/css/base.css  2012-11-04 14:04:15 UTC (rev 
10453)
+++ trunk/logistic/templates/base/css/base.css  2012-11-04 16:08:21 UTC (rev 
10454)
@@ -855,8 +855,9 @@
 }
 
 .btn-sm {
-  font-size: 12px;
-  padding: 1px 4px;
+    font-size: 12px;
+    padding: 1px 4px;
+    text-align: center;
 }
 
 .btn.cancel, .btn_m.cancel {

Modified: trunk/logistic/templates/base/requirement/requirement_overview.xsl
===================================================================
--- trunk/logistic/templates/base/requirement/requirement_overview.xsl  
2012-11-04 14:04:15 UTC (rev 10453)
+++ trunk/logistic/templates/base/requirement/requirement_overview.xsl  
2012-11-04 16:08:21 UTC (rev 10454)
@@ -26,12 +26,12 @@
                                <xsl:value-of 
select="php:function('get_phpgw_link', '/index.php', $add_req_params )" />
                        </xsl:variable>
                        
-                       <h2 style="float:left;">Krav</h2>
+                       <h2 style="float:left;"><xsl:value-of 
select="php:function('lang', 'Requirement')" /></h2>
                        <a id="add-requirement-btn" class="btn focus" 
href="{$add_req_url}"><xsl:value-of select="php:function('lang', 'Add 
requirement')" /></a>
                        <div style="clear:both;" id="paging"></div>
                        <div style="margin-bottom: 40px;" 
id="requirement-container"></div>
                                
-                       <h2 style="clear:both;">Tildelte ressurser</h2>
+                       <h2 style="clear:both;"><xsl:value-of 
select="php:function('lang', 'Allocated resouces')" /><span 
style="margin-left:350px;font-size:14px;">(<xsl:value-of 
select="php:function('lang', 'Click on table above to get allocations')" 
/>)</span></h2>
                        <div id="allocation-container"></div>
        </div>
        <xsl:call-template name="datasource-def" />




reply via email to

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