fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9398]


From: Torstein
Subject: [Fmsystem-commits] [9398]
Date: Mon, 14 May 2012 12:21:34 +0000

Revision: 9398
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9398
Author:   vator
Date:     2012-05-14 12:21:34 +0000 (Mon, 14 May 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/js/controller/ajax.js
    
trunk/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
    trunk/controller/templates/base/css/base.css

Removed Paths:
-------------
    trunk/controller/js/yahoo/control_tabs_rubbish.js

Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js      2012-05-14 12:19:52 UTC (rev 
9397)
+++ trunk/controller/js/controller/ajax.js      2012-05-14 12:21:34 UTC (rev 
9398)
@@ -316,8 +316,6 @@
                        
     });
        
-       // file: control.xsl 
-       // When control area is selected, procedures are fetched from db and 
procedure select list is populated
        $("#control_area_id").change(function () {
                 var control_area_id = $(this).val();
                 
@@ -350,6 +348,8 @@
                          }  
                        });     
     });
+       
+       /* ================================  CONTROL GROUP 
================================== */
                        
        $("#frm_save_control_groups").submit(function(e){
                var thisForm = $(this);
@@ -361,6 +361,8 @@
                }
        });
        
+       /* ================================  CONTROL ITEM 
================================== */
+       
        $("#frm_control_items").submit(function(e){
                var thisForm = $(this);
                var num_checked = $(this).find("input:checked").length;
@@ -375,17 +377,14 @@
                
$("#frm_save_control_details").find(".focus").removeClass("focus");
                $(this).addClass("focus");
        });
-       
-       $("#frm_save_control_details input").focus(function(e){
-               
$("#frm_save_control_details").find(".focus").removeClass("focus");
-               $(this).addClass("focus");
-       });
-       
+               
        $("#frm_save_control_details select").focus(function(e){
                
$("#frm_save_control_details").find(".focus").removeClass("focus");
                $(this).addClass("focus");
        });
        
+       /* =========================  CONTROL  
=============================================== */
+       
        // =================  SAVE CONTROL DETAILS - FORM SUBMIT  
==================
        $("#frm_save_control_details").submit(function(e){
                
@@ -430,56 +429,35 @@
                
        });
        
-       // Fetches info about a check list on hover status image icon
-       $('a.view_info_box').bind('contextmenu', function(){
-               var thisA = $(this);
-               var divWrp = $(this).parent();
-               
-               var add_param = $(thisA).find("span").text();
-               
-               var oArgs = 
{menuaction:'controller.uicheck_list.get_cases_for_check_list'};
-               var baseUrl = phpGWLink('index.php', oArgs, true);
-               var requestUrl = baseUrl + add_param
-               
-               //var requestUrl = 
"http://portico/pe/index.php?menuaction=controller.uicheck_list.get_cases_for_check_list";
 + add_param;
-               
-               $.ajax({
-                         type: 'POST',
-                         url: requestUrl,
-                         dataType: 'json',
-                 success: function(data) {
-                         if(data){
-                                 var obj = jQuery.parseJSON(data);
-
-                                 // Show info box with info about check list
-                                 var infoBox = $(divWrp).find("#info_box");
-                                 $(infoBox).show();
-                                 
-                                 var htmlStr = "<h3>Åpne saker</h3>";
-                               
-                                 $.each(obj, function(i) {
-                                         htmlStr += "<div 
class='check_item'><h5>" + (parseInt(i) + 1) + ". " + obj[i].control_item.title 
+ "</h5>";
-                                                                               
  
-                                         
$(obj[i].cases_array).each(function(j) {
-                                                 htmlStr += "<p class='case'>" 
+ "<label>Sak " + (parseInt(j) + 1) + ": </label>" + 
obj[i].cases_array[j].descr + "</p>";
-                                         });
-                                       });
-                                 
-                                 htmlStr += "</div>"; 
-                               
-                                 $(infoBox).html( htmlStr );  
-                         }
-                 }
-                  });
-               
-               return false;
+       /* HELP TEXT */
+       $("#control_details input").focus(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeIn(300);
        });
        
-       $("a.view_info_box").mouseout(function(){
-               var infoBox = $(this).parent().find("#info_box");
+       $("#control_details input").focusout(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeOut(300);
+       });
+       
+       $("#control_details select").focus(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeIn(300);
+       });
+       
+       $("#control_details select").focusout(function(e){
+               var wrpElem = $(this).parents("dd");
+               $(wrpElem).find(".help_text").fadeOut(300);
+       });
+       
+       /*
+       $(".frm_save_control_item").click(function(e){
+               var thisForm = $(this);
+               var submitBnt = $(thisForm).find("input[type='submit']");
                
-               $(infoBox).hide();
+               $(submitBnt).removeClass("not_active");
        });
+       */
        
        $(".frm_save_control_item").live("click", function(e){
                e.preventDefault();
@@ -505,8 +483,33 @@
                        });
        });
        
-       //===========================  CHECKLIST  
================================
+       //=====================================  CHECKLIST  
================================
        
+       // ADD CHECKLIST
+       $("#frm_add_check_list").live("submit", function(e){
+               
+               var thisForm = $(this);
+               var statusFieldVal = $("#status").val();
+               var completedDateVal = $("#completed_date").val();
+               var completedDateRow = $("#completed_date").closest(".row");
+               
+               // Checks that COMPLETE DATE is set if status is set to DONE 
+               if(statusFieldVal == 1 & completedDateVal == ''){
+                       e.preventDefault();
+                       // Displays error message above completed date
+                       $(completedDateRow).before("<div 
class='input_error_msg'>Vennligst angi når kontrollen ble utført</div>");
+               }               
+       });     
+       
+       // Display submit button on click
+       $("#frm_add_check_list").live("click", function(e){
+               var thisForm = $(this);
+               var submitBnt = $(thisForm).find("input[type='submit']");
+               $(submitBnt).removeClass("not_active");
+       });
+
+       
+       
        // UPDATE CHECKLIST DETAILS     
        $("#frm_update_check_list").live("submit", function(e){
                e.preventDefault();
@@ -556,90 +559,13 @@
                var submitBnt = $(thisForm).find("input[type='submit']");
                $(submitBnt).removeClass("not_active");
        });
-
-       //=============================  ADD CHECKLIST  
===========================
-
-       // ADD CHECKLIST
-       $("#frm_add_check_list").live("submit", function(e){
-               
-               var thisForm = $(this);
-               var statusFieldVal = $("#status").val();
-               var completedDateVal = $("#completed_date").val();
-               var completedDateRow = $("#completed_date").closest(".row");
-               
-               // Checks that COMPLETE DATE is set if status is set to DONE 
-               if(statusFieldVal == 1 & completedDateVal == ''){
-                       e.preventDefault();
-                       // Displays error message above completed date
-                       $(completedDateRow).before("<div 
class='input_error_msg'>Vennligst angi når kontrollen ble utført</div>");
-               }               
-       });     
        
-       // Display submit button on click
-       $("#frm_add_check_list").live("click", function(e){
-               var thisForm = $(this);
-               var submitBnt = $(thisForm).find("input[type='submit']");
-               $(submitBnt).removeClass("not_active");
-       });
-
        
-       
-       //=============================  MESSAGE  ===========================
-       
-       // REGISTER MESSAGE
-       $("#frmRegCaseMessage").submit(function(e){
-               
-               var thisForm = $(this);
 
-               var $required_input_fields = $(this).find(".required");
-               var status = true;
        
-               // Checking that required fields (fields with class required) 
is not null
-           $required_input_fields.each(function() {
-               
-               // User has selected a value from select list
-               if( $(this).is("select") & $(this).val() == 0 ){
-                       var nextElem = $(this).next();
-                       
-                       if( !$(nextElem).hasClass("input_error_msg") )
-                               $(this).after("<div 
class='input_error_msg'>Vennligst velg fra listen</div>");
-                                               
-                       status = false;
-               }
-               // Input field is not empty
-               else if( $(this).is("input") & $(this).val() == '' ){
-                       var nextElem = $(this).next();
-                       
-                       if( !$(nextElem).hasClass("input_error_msg") )
-                               $(this).after("<div 
class='input_error_msg'>Vennligst fyll ut dette feltet</div>");
-                                               
-                       status = false;
-               }
-               else{
-                       var nextElem = $(this).next();
-
-                       if( $(nextElem).hasClass("input_error_msg") )
-                               $(nextElem).remove();
-               }
-           }); 
-           
-           if( $(thisForm).find('input[type=checkbox]:checked').length == 0){
-               
-               if( 
!$(thisForm).find("ul.cases").prev().hasClass("input_error_msg") )
-                       $(thisForm).find("ul.cases").before("<div 
class='input_error_msg'>Vennligst velg en sak som meldingen omfatter</div>");
-               
-               status = false;
-           }
-         
-           if( !status ){
-               e.preventDefault();
-           }
-               
-       });
        
        
        
-       
        //=======================================  CASE  
======================================
        
        // REGISTER CASE
@@ -876,31 +802,111 @@
                $(submitBnt).removeClass("not_active");
        });
        
-       $("#control_details input").focus(function(e){
-               var wrpElem = $(this).parents("dd");
-               $(wrpElem).find(".help_text").fadeIn(300);
-       });
+       //=============================  MESSAGE  ===========================
        
-       $("#control_details input").focusout(function(e){
-               var wrpElem = $(this).parents("dd");
-               $(wrpElem).find(".help_text").fadeOut(300);
-       });
+       // REGISTER MESSAGE
+       $("#frmRegCaseMessage").submit(function(e){
+               
+               var thisForm = $(this);
+
+               var $required_input_fields = $(this).find(".required");
+               var status = true;
        
-       $("#control_details select").focus(function(e){
-               var wrpElem = $(this).parents("dd");
-               $(wrpElem).find(".help_text").fadeIn(300);
+               // Checking that required fields (fields with class required) 
is not null
+           $required_input_fields.each(function() {
+               
+               // User has selected a value from select list
+               if( $(this).is("select") & $(this).val() == 0 ){
+                       var nextElem = $(this).next();
+                       
+                       if( !$(nextElem).hasClass("input_error_msg") )
+                               $(this).after("<div 
class='input_error_msg'>Vennligst velg fra listen</div>");
+                                               
+                       status = false;
+               }
+               // Input field is not empty
+               else if( $(this).is("input") & $(this).val() == '' ){
+                       var nextElem = $(this).next();
+                       
+                       if( !$(nextElem).hasClass("input_error_msg") )
+                               $(this).after("<div 
class='input_error_msg'>Vennligst fyll ut dette feltet</div>");
+                                               
+                       status = false;
+               }
+               else{
+                       var nextElem = $(this).next();
+
+                       if( $(nextElem).hasClass("input_error_msg") )
+                               $(nextElem).remove();
+               }
+           }); 
+           
+           if( $(thisForm).find('input[type=checkbox]:checked').length == 0){
+               
+               if( 
!$(thisForm).find("ul.cases").prev().hasClass("input_error_msg") )
+                       $(thisForm).find("ul.cases").before("<div 
class='input_error_msg'>Vennligst velg en sak som meldingen omfatter</div>");
+               
+               status = false;
+           }
+         
+           if( !status ){
+               e.preventDefault();
+           }
+               
        });
        
-       $("#control_details select").focusout(function(e){
-               var wrpElem = $(this).parents("dd");
-               $(wrpElem).find(".help_text").fadeOut(300);
+       
+       /* ==================================  CALENDAR 
===================================== */ 
+       
+       // Fetches info about a check list on hover status image icon
+       $('a.view_info_box').bind('contextmenu', function(){
+               var thisA = $(this);
+               var divWrp = $(this).parent();
+               
+               var add_param = $(thisA).find("span").text();
+               
+               var oArgs = 
{menuaction:'controller.uicheck_list.get_cases_for_check_list'};
+               var baseUrl = phpGWLink('index.php', oArgs, true);
+               var requestUrl = baseUrl + add_param
+               
+               //var requestUrl = 
"http://portico/pe/index.php?menuaction=controller.uicheck_list.get_cases_for_check_list";
 + add_param;
+               
+               $.ajax({
+                         type: 'POST',
+                         url: requestUrl,
+                         dataType: 'json',
+                 success: function(data) {
+                         if(data){
+                                 var obj = jQuery.parseJSON(data);
+
+                                 // Show info box with info about check list
+                                 var infoBox = $(divWrp).find("#info_box");
+                                 $(infoBox).show();
+                                 
+                                 var htmlStr = "<h3>Åpne saker</h3>";
+                               
+                                 $.each(obj, function(i) {
+                                         htmlStr += "<div 
class='check_item'><h5>" + (parseInt(i) + 1) + ". " + obj[i].control_item.title 
+ "</h5>";
+                                                                               
  
+                                         
$(obj[i].cases_array).each(function(j) {
+                                                 htmlStr += "<p class='case'>" 
+ "<label>Sak " + (parseInt(j) + 1) + ": </label>" + 
obj[i].cases_array[j].descr + "</p>";
+                                         });
+                                       });
+                                 
+                                 htmlStr += "</div>"; 
+                               
+                                 $(infoBox).html( htmlStr );  
+                         }
+                 }
+                  });
+               
+               return false;
        });
        
-       $(".frm_save_control_item").click(function(e){
-               var thisForm = $(this);
-               var submitBnt = $(thisForm).find("input[type='submit']");
+       $("a.view_info_box").mouseout(function(){
+               var infoBox = $(this).parent().find("#info_box");
                
-               $(submitBnt).removeClass("not_active");
+               $(infoBox).hide();
        });
                
        

Deleted: trunk/controller/js/yahoo/control_tabs_rubbish.js
===================================================================
--- trunk/controller/js/yahoo/control_tabs_rubbish.js   2012-05-14 12:19:52 UTC 
(rev 9397)
+++ trunk/controller/js/yahoo/control_tabs_rubbish.js   2012-05-14 12:21:34 UTC 
(rev 9398)
@@ -1,15 +0,0 @@
-YAHOO.util.Event.addListener(window, "load", function() {
-
-       /*
-       var oArgs = {menuaction:'controller.uicontrol.edit'};
-       var url = phpGWLink('index.php', oArgs, true);
-       var colDefs = [{key: 'name', label: lang['Name'], formatter: 
YAHOO.portico.formatLink}, {key: 'category', label: lang['Category']}, {key: 
'actions', label: lang['Actions'], formatter: 
YAHOO.portico.formatGenericLink(lang['Edit'], lang['Delete'])}];
-       YAHOO.portico.inlineTableHelper('details_container', url, colDefs);
-       
-
-       var oArgs = 
{menuaction:'booking.uipermission_resource.index',sort:'name',filter_object_id:resource_id};
-       var url = phpGWLink('index.php', oArgs, true);
-       var colDefs = [{key: 'subject_name', label: lang['Account']}, {key: 
'role', label: lang['Role']}, {key: 'actions', label: lang['Actions'], 
formatter: YAHOO.portico.formatGenericLink(lang['Edit'], lang['Delete'])}];
-       YAHOO.portico.inlineTableHelper('permissions_container', url, 
colDefs);*/
-});
-

Modified: 
trunk/controller/templates/base/calendar/view_calendar_year_for_locations.xsl
===================================================================
--- 
trunk/controller/templates/base/calendar/view_calendar_year_for_locations.xsl   
    2012-05-14 12:19:52 UTC (rev 9397)
+++ 
trunk/controller/templates/base/calendar/view_calendar_year_for_locations.xsl   
    2012-05-14 12:21:34 UTC (rev 9398)
@@ -7,7 +7,7 @@
        <div id="control_plan">
                <div class="top">
                        <h1>Kontrollplan for <xsl:value-of 
select="control/title"/></h1>
-                       <h3>Periode: <xsl:value-of select="period"/></h3>
+                       <h3>Periode: <xsl:value-of select="current_year"/></h3>
                        
                        <!-- =====================  SELECT MY LOCATIONS  
================= -->
                        <xsl:call-template name="select_my_locations" />

Modified: trunk/controller/templates/base/css/base.css
===================================================================
--- trunk/controller/templates/base/css/base.css        2012-05-14 12:19:52 UTC 
(rev 9397)
+++ trunk/controller/templates/base/css/base.css        2012-05-14 12:21:34 UTC 
(rev 9398)
@@ -1129,7 +1129,7 @@
 }
 ul#search_list input[type="submit"] {
     margin: 0;
-    padding: 3px 15px;
+    padding: 2px 15px;
 }
 ul#search_list input[type="text"] {
     margin: 0 5px 0 0;




reply via email to

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