[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12629]
From: |
Nelson Guerra |
Subject: |
[Fmsystem-commits] [12629] |
Date: |
Mon, 19 Jan 2015 23:27:32 +0000 |
Revision: 12629
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12629
Author: nelson224
Date: 2015-01-19 23:27:31 +0000 (Mon, 19 Jan 2015)
Log Message:
-----------
Modified Paths:
--------------
branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl
Modified: branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl
===================================================================
--- branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl
2015-01-19 23:26:25 UTC (rev 12628)
+++ branches/dev-syncromind/phpgwapi/templates/base/datatable_inline.xsl
2015-01-19 23:27:31 UTC (rev 12629)
@@ -80,155 +80,137 @@
"sRowSelect": "multi",
"aButtons":
[
+
"select_all",
+
"select_none",
+
<xsl:choose>
+
<xsl:when test="download">
{
-
"sExtends": "collection",
-
"sButtonText": "Operation",
-
"aButtons": [
-
'copy',
-
"select_all",
-
"select_none"
-
<xsl:choose>
-
<xsl:when test="download">
-
,{
-
"sExtends": "download",
-
"sButtonText": "Download",
-
"sUrl": '<xsl:value-of select="download"/>'
-
}
-
</xsl:when>
-
</xsl:choose>
-
<xsl:choose>
-
<xsl:when test="$tabletools">
-
,
+
"sExtends": "download",
+
"sButtonText": "Download",
+
"sUrl": '<xsl:value-of select="download"/>'
+
},
+
</xsl:when>
+
</xsl:choose>
+
<xsl:for-each select="$tabletools">
+
<xsl:choose>
+
<xsl:when test="type = 'custom'">
{
-
sExtends: "div",
-
sButtonText: "Knapper nedenfor gjelder pr valgt element
"
-
},
-
</xsl:when>
-
</xsl:choose>
+
sExtends: "select",
+
sButtonText: "<xsl:value-of select="text"/>",
+
fnClick: function (nButton, oConfig,
oFlash) {
-
<xsl:for-each select="$tabletools">
-
<xsl:choose>
-
<xsl:when test="type = 'custom'">
-
{
-
sExtends: "select",
-
sButtonText: "<xsl:value-of
select="text"/>",
-
fnClick: function
(nButton, oConfig, oFlash) {
+
<xsl:if
test="confirm_msg">
+
var confirm_msg
= "<xsl:value-of select="confirm_msg"/>";
+
var r =
confirm(confirm_msg);
+
if (r != true) {
+
return
false;
+
}
+
</xsl:if>
-
<xsl:if test="confirm_msg">
-
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
-
var r = confirm(confirm_msg);
-
if (r != true) {
-
return false;
-
}
-
</xsl:if>
+
var action =
"<xsl:value-of select="action"/>";
-
var action = "<xsl:value-of select="action"/>";
+
<xsl:if
test="parameters">
+
var parameters
= <xsl:value-of select="parameters"/>;
+
var i = 0;
+
len =
parameters.parameter.length;
+
for (; i <
len; ) {
+
action
+= '&' + parameters.parameter[i]['name'] + '=' +
aData[parameters.parameter[i]['source']];
+
i++;
+
}
+
</xsl:if>
-
<xsl:if test="parameters">
-
var parameters = <xsl:value-of select="parameters"/>;
-
var i = 0;
-
len = parameters.parameter.length;
-
for (; i < len; ) {
-
action += '&' + parameters.parameter[i]['name'] + '=' +
aData[parameters.parameter[i]['source']];
-
i++;
-
}
-
</xsl:if>
+
<xsl:value-of
select="custom_code"/>
+
}
-
<xsl:value-of select="custom_code"/>
+
}<xsl:value-of select="phpgw:conditional(not(position() =
last()), ',', '')"/>
+
</xsl:when>
+
<xsl:otherwise>
+
{
+
sExtends: "select",
+
sButtonText: "<xsl:value-of select="text"/>",
+
fnClick: function (nButton, oConfig,
oFlash) {
+
var receiptmsg = [];
+
var selected =
JqueryPortico.fnGetSelected(oTable<xsl:number value="($num - 1)"/>);
+
var numSelected =
selected.length;
+
+
if (numSelected ==0){
+
alert('None
selected');
+
return false;
}
-
}<xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/>
-
</xsl:when>
-
<xsl:otherwise>
-
{
-
sExtends: "select",
-
sButtonText: "<xsl:value-of
select="text"/>",
-
fnClick: function
(nButton, oConfig, oFlash) {
-
var
receiptmsg = [];
-
var
selected = JqueryPortico.fnGetSelected(oTable<xsl:number value="($num - 1)"/>);
-
var
numSelected = selected.length;
+
<xsl:if
test="confirm_msg">
+
var confirm_msg
= "<xsl:value-of select="confirm_msg"/>";
+
var r =
confirm(confirm_msg);
+
if (r != true) {
+
return
false;
+
}
+
</xsl:if>
-
if
(numSelected ==0){
-
alert('None selected');
-
return false;
-
}
+
var target =
"<xsl:value-of select="target"/>";
+
if(!target)
+
{
+
target =
'_self';
+
}
-
<xsl:if
test="confirm_msg">
-
var confirm_msg = "<xsl:value-of select="confirm_msg"/>";
-
var r = confirm(confirm_msg);
-
if (r != true) {
-
return false;
-
}
-
</xsl:if>
+
if (numSelected > 1){
+
target =
'_blank';
+
}
-
var
target = "<xsl:value-of select="target"/>";
-
if(!target)
-
{
-
target = '_self';
-
}
+
var n = 0;
+
for (; n <
numSelected; ) {
-
if
(numSelected > 1){
-
target = '_blank';
-
}
+
//
console.log(selected[n]);
+
var aData =
oTable<xsl:number value="($num - 1)"/>.fnGetData( selected[n] ); //complete
dataset from json returned from server
+
//
console.log(aData);
-
var n =
0;
-
for (;
n < numSelected; ) {
+
//delete stuff
comes here
+
var action =
"<xsl:value-of select="action"/>";
-
//
console.log(selected[n]);
-
var aData = oTable<xsl:number value="($num - 1)"/>.fnGetData( selected[n] );
//complete dataset from json returned from server
-
//
console.log(aData);
+
<xsl:if
test="parameters">
+
var
parameters = <xsl:value-of select="parameters"/>;
+
//
console.log(parameters.parameter);
+
var i =
0;
+
len =
parameters.parameter.length;
+
for (;
i < len; ) {
+
action += '&' + parameters.parameter[i]['name'] + '=' +
aData[parameters.parameter[i]['source']];
+
i++;
+
}
+
</xsl:if>
-
//delete stuff comes here
-
var action = "<xsl:value-of select="action"/>";
+
// look for the
word "DELETE" in URL
+
if(JqueryPortico.substr_count(action,'delete')>0)
+
{
+
action += "&confirm=yes&phpgw_return_as=json";
+
JqueryPortico.execute_ajax(action, function(result){
+
document.getElementById("message").innerHTML += '<br/>' + result;
+
});
+
oTable<xsl:number value="($num - 1)"/>.fnDraw();
+
}
+
else if (target
== 'ajax')
+
{
+
action += "&phpgw_return_as=json";
+
JqueryPortico.execute_ajax(action, function(result){
+
document.getElementById("message").innerHTML += '<br/>' + result;
+
});
+
oTable<xsl:number value="($num - 1)"/>.fnDraw();
+
}
+
else
+
{
+
window.open(action,target);
+
}
-
<xsl:if test="parameters">
-
var parameters = <xsl:value-of select="parameters"/>;
-
//
console.log(parameters.parameter);
-
var i = 0;
-
len = parameters.parameter.length;
-
for (; i < len; ) {
-
action += '&' + parameters.parameter[i]['name'] + '=' +
aData[parameters.parameter[i]['source']];
-
i++;
-
}
-
</xsl:if>
-
-
// look for the word "DELETE" in URL
-
if(JqueryPortico.substr_count(action,'delete')>0)
-
{
-
action += "&confirm=yes&phpgw_return_as=json";
-
JqueryPortico.execute_ajax(action, function(result){
-
document.getElementById("message").innerHTML += '<br/>'
+ result;
-
});
-
oTable<xsl:number value="($num - 1)"/>.fnDraw();
-
}
-
else if (target == 'ajax')
-
{
-
action += "&phpgw_return_as=json";
-
JqueryPortico.execute_ajax(action, function(result){
-
document.getElementById("message").innerHTML += '<br/>'
+ result;
-
});
-
oTable<xsl:number value="($num - 1)"/>.fnDraw();
-
}
-
else
-
{
-
window.open(action,target);
-
}
-
-
n++;
-
}
+
n++;
}
+
}
-
}<xsl:value-of
select="phpgw:conditional(not(position() = last()), ',', '')"/>
-
</xsl:otherwise>
-
</xsl:choose>
-
</xsl:for-each>
-
-
]
-
}
- ]
- };
+
}<xsl:value-of select="phpgw:conditional(not(position() =
last()), ',', '')"/>
+
</xsl:otherwise>
+
</xsl:choose>
+
</xsl:for-each>
+ ]
+ };
</xsl:when>
- </xsl:choose>
+ </xsl:choose>
JqueryPortico.inlineTablesDefined += 1;
var PreColumns = [
@@ -293,10 +275,6 @@
options<xsl:number value="($num - 1)"/>.TableTools =
JqueryPortico.TableTools<xsl:number value="($num - 1)"/>;
}
- <xsl:if test="$tabletools != ''">
- options<xsl:number value="($num - 1)"/>.TableTools =
<xsl:value-of disable-output-escaping="yes" select="$tabletools"/>;
- </xsl:if>
-
<xsl:variable name="dataset">
<xsl:choose>
<xsl:when test="$data !=''">
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12629],
Nelson Guerra <=