[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8233]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [8233] |
Date: |
Mon, 05 Dec 2011 09:01:13 +0000 |
Revision: 8233
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8233
Author: vator
Date: 2011-12-05 09:01:01 +0000 (Mon, 05 Dec 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/js/controller/ajax.js
trunk/controller/js/controller/controller_datatable_test.js
Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js 2011-12-05 08:59:52 UTC (rev
8232)
+++ trunk/controller/js/controller/ajax.js 2011-12-05 09:01:01 UTC (rev
8233)
@@ -1,7 +1,7 @@
$(document).ready(function(){
- // uicheck_list_for_location.xsl when control area is selected control
list with control area is fetched form db
- // and control select list is populated
+ // file: uicheck_list_for_location.xsl
+ // When control area is selected, controls are fetched from db and
control select list is populated
$("#control_area_list option").click(function () {
var control_area_id = $(this).val();
@@ -21,20 +21,18 @@
htmlString += "<option
value='" + obj[i].id + "'>" + obj[i].title + "</option>";
});
- $("#control_list").html( htmlString );
- }
- else
- {
+ $("#control_id").html( htmlString );
+ }else {
htmlString += "<option>Ingen
kontroller</option>"
- $("#control_list").html( htmlString
);
+ $("#control_id").html( htmlString );
}
}
});
});
- // Control.xsl when control area is selected procedures related to
control area is fetched form db
- // and procedure select list is populated
+ // file: control.xsl
+ // When control area is selected, procedures are fetched from db and
procedure select list is populated
$("#control_area_id option").click(function () {
var control_area_id = $(this).val();
var requestUrl =
"index.php?menuaction=controller.uiprocedure.get_procedures&phpgw_return_as=json"
@@ -64,6 +62,7 @@
});
});
+ // file: sort_check_list.xsl
// Saves order of control items for a group
$(".frm_save_order").submit(function(e){
e.preventDefault();
@@ -98,8 +97,8 @@
});
});
- // Used in file: view_check_lists_for_location.xsl
- // Fetches info about a check list when one hovers over an a tag
+ // file: view_check_lists_for_location.xsl
+ // Fetches info about a check list on hover status image icon
$("a.view_list").mouseover(function(){
var thisA = $(this);
var divWrp = $(this).parent();
Modified: trunk/controller/js/controller/controller_datatable_test.js
===================================================================
--- trunk/controller/js/controller/controller_datatable_test.js 2011-12-05
08:59:52 UTC (rev 8232)
+++ trunk/controller/js/controller/controller_datatable_test.js 2011-12-05
09:01:01 UTC (rev 8233)
@@ -36,27 +36,26 @@
}
);
}
-
-
// Reloads all data sources that are necessary based on the selected
related datatable
function reloadDataSources(selected_datatable){
-
+
//... hooks into the regular callback function
(onDataReturnInitializeTable) call to set empty payload array
var loaded = function ( sRequest , oResponse , oPayload ) {
var payload = new Array();
this.onDataReturnInitializeTable( sRequest , oResponse
, payload );
}
-
+
//... refresh the selected data tables
selected_datatable.getDataSource().sendRequest('',{success:loaded,
scope:selected_datatable});
-
+
//... traverse all datatables and refresh related (to the
selected) data tables
for(var i=0; i<YAHOO.controller.datatables.length; i++){
var datatable = YAHOO.controller.datatables[i];
for(var j=0;j<selected_datatable.related.length;j++){
var curr_related =
selected_datatable.related[j];
+
if(datatable.tid == curr_related){
datatable.getDataSource().sendRequest('',{success:loaded,scope: datatable});
}
@@ -216,12 +215,7 @@
//... check whether this action should be an
AJAX call
if( record.getData().ajax[task.index] ) {
-
- if(task.index == 1) {
-
-
- }
-
+
var alertStatus = false;
// Check if confirm box should be
displayed before request is executed
@@ -238,14 +232,14 @@
return false;
}
}
-
+
var request =
YAHOO.util.Connect.asyncRequest(
'GET',
record.getData().actions[
task.index ],
{
success:
ajaxResponseSuccess,
success:
ajaxResponseFailure,
- args:table
+ args: table
});
} else {
window.location =
record.getData().actions[task.index];
@@ -371,11 +365,12 @@
?>
*/
// ... create a paginator for this datasource
+
var pag = new YAHOO.widget.Paginator({
rowsPerPage: 10,
alwaysVisible: true,
rowsPerPageOptions: [5, 10, 25, 50, 100, 200],
- firstPageLinkLabel: "<< <?php echo
lang('first') ?>",
+ firstPageLinkLabel: "<<asdasd <?php echo
lang('first') ?>",
previousPageLinkLabel: "< <?php echo
lang('previous') ?>",
nextPageLinkLabel: "<?php echo lang('next') ?>
>",
lastPageLinkLabel: "<?php echo lang('last') ?>
>>",
@@ -383,7 +378,7 @@
pageReportTemplate : "<?php echo
lang('shows_from') ?> {startRecord} <?php echo lang('to') ?> {endRecord} <?php
echo lang('of_total') ?> {totalRecords}.",
containers: [source_properties.paginator]
});
-
+
pag.render();
//... send data source properties and paginator to
wrapper function
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8233],
Torstein <=