Initial project's source code check-in.
This commit is contained in:
commit
b03b0b373f
4573 changed files with 981205 additions and 0 deletions
10
WebsitePanel/Sources/WebsitePanel.Templates/Tests/cf1.txt
Normal file
10
WebsitePanel/Sources/WebsitePanel.Templates/Tests/cf1.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
#hello.world# this is a static text and #var#
|
||||
escape: ##eeff55; #test.# a <ad:if test="#var1 == 2#">
|
||||
branch 1
|
||||
<ad:elseif test="#method1(a, b + 3)#">
|
||||
branch 3
|
||||
</ad:if>
|
||||
|
||||
<<<ad:foreach collection="#collection is "test"#" var="cust" index="i">
|
||||
#i#: #cust.lastname#, #cust.firstname#
|
||||
</ad:foreach>
|
49
WebsitePanel/Sources/WebsitePanel.Templates/Tests/cf2.txt
Normal file
49
WebsitePanel/Sources/WebsitePanel.Templates/Tests/cf2.txt
Normal file
|
@ -0,0 +1,49 @@
|
|||
#isdefined("c")#
|
||||
<ad:if test="#isdefined("a") and IsDefined("b")#">
|
||||
A and B are defined
|
||||
</ad:if>
|
||||
|
||||
ID: #a#
|
||||
|
||||
First name: #b# Last name: #str#
|
||||
|
||||
<ad:if test="#not(a is 2)#">
|
||||
a = 2
|
||||
<ad:else>
|
||||
b = 2
|
||||
</ad:if>
|
||||
|
||||
<ad:set name="var1" value="#b#" />
|
||||
<ad:set name="var2" value=" hello, world" />
|
||||
|
||||
Total: #arr[1]#
|
||||
|
||||
<ad:foreach collection="#arr#" var="item" index="i">
|
||||
<p><ad:ShowBillingPeriod tmp="#item#">#i+10#</ad:ShowBillingPeriod></p>
|
||||
</ad:foreach>
|
||||
|
||||
<ad:for from="0" to="#arr.Length - 1#" index="j">
|
||||
#j# = #arr[j].ToString()#
|
||||
</ad:for>
|
||||
|
||||
<ad:for index="k" from="0" to="10">
|
||||
#k.ToString("0.00")#
|
||||
</ad:for>
|
||||
|
||||
<ad:for from="0" to="#customer.OrderNumbers.Length - 1#" index="j">
|
||||
#j# = #customer.OrderNumbers[j].ToString()#
|
||||
</ad:for>
|
||||
|
||||
#integersDict[101]#
|
||||
#integersDict[102]#
|
||||
|
||||
Customer 1: #customersDict["customer1"].OrderNumbers.Length#
|
||||
Customer 2: #customersDict["customer2"].OrderNumbers.Length#
|
||||
|
||||
<ad:foreach collection="#customersList#" var="cust">
|
||||
customer: #cust.name#
|
||||
</ad:foreach>
|
||||
|
||||
#customersList[1].name#
|
||||
|
||||
<ad:template name="ShowBillingPeriod">#innerText#: <b>#tmp#</b></ad:template>
|
106
WebsitePanel/Sources/WebsitePanel.Templates/Tests/cf3.txt
Normal file
106
WebsitePanel/Sources/WebsitePanel.Templates/Tests/cf3.txt
Normal file
|
@ -0,0 +1,106 @@
|
|||
## just a comment...
|
||||
|
||||
A = #a#
|
||||
B = #b#
|
||||
D = #d#
|
||||
|
||||
*** isdefined ***
|
||||
#isdefined("c")#
|
||||
<ad:if test="#isdefined("a") and IsDefined("b")#">
|
||||
A and B are defined
|
||||
</ad:if>
|
||||
|
||||
*** ifdefined ***
|
||||
#ifdefined("a", "a IS defined")#
|
||||
#ifdefined("c", "c IS NOT defined")#
|
||||
#ifdefined("d", (3+2)/5)#
|
||||
|
||||
*** equals ***
|
||||
A equals B: #equals(a, b)#
|
||||
D equals A: #equals(d, a)#
|
||||
|
||||
*** notequals ***
|
||||
A notequals B: #notequals(a, b)#
|
||||
D notequals A: #notequals(d, a)#
|
||||
|
||||
*** iseven ***
|
||||
A is even: #iseven(a)#
|
||||
B is even: #iseven(b)#
|
||||
|
||||
*** isodd ***
|
||||
A is odd: #isodd(a)#
|
||||
B is odd: #isodd(b)#
|
||||
|
||||
*** isempty ***
|
||||
str1 is empty: #isempty(str1)#
|
||||
str2 is empty: #isempty(str2)#
|
||||
str3 is empty: #isempty(str3)#
|
||||
|
||||
*** isnumber ***
|
||||
A is number: #isnumber(A)#
|
||||
str1 is number: #isnumber(str1)#
|
||||
|
||||
*** toupper ***
|
||||
str1: #ToUpper(str1)#
|
||||
str2: #ToUpper(str2)#
|
||||
str3: #ToUpper(str3)#
|
||||
|
||||
*** tolower ***
|
||||
str1: #ToLower(str1)#
|
||||
str2: #ToLower(str2)#
|
||||
str3: #ToLower(str3)#
|
||||
|
||||
*** len ***
|
||||
str1: #len(str1)#
|
||||
str2: #len(str2)#
|
||||
str3: #len(str3)#
|
||||
|
||||
*** isnull ***
|
||||
a: #isnull(a)#
|
||||
str1: #isnull(str1)#
|
||||
str3: #isnull(str3)#
|
||||
|
||||
*** not ***
|
||||
not(isnull(a)): #not(isnull(a))#
|
||||
not(isempty(str2)): #not(isempty(str2))#
|
||||
|
||||
*** iif ***
|
||||
#iif(a == b, "a = b", "a != b")#
|
||||
#iif(a == d, "a = d", "a != d")#
|
||||
#iif(a % 2 is 0, "even", "odd")#
|
||||
|
||||
*** format ***
|
||||
format(a, "0.00"): #format(a, "0.00")#
|
||||
format(b, "C"): #format(b, "C")#
|
||||
|
||||
*** Trim ***
|
||||
trim(" hello "): #trim(" hello ")#
|
||||
trim(str1): #trim(str1)#
|
||||
|
||||
*** Compare ***
|
||||
compare(a,b): #compare(a,b)#
|
||||
compare(a,d): #compare(a,d)#
|
||||
compare(b,d): #compare(b,d)#
|
||||
|
||||
*** CompareNoCase ***
|
||||
CompareNoCase(str1, "hello, world"): #CompareNoCase(str1, "hello, world")#
|
||||
|
||||
*** StripNewLines ***
|
||||
StripNewLines(str1) : #StripNewLines(str1)#
|
||||
|
||||
*** TypeOf **
|
||||
typeof(a): #typeof(a)#
|
||||
typeof(str1): #typeof(str1)#
|
||||
|
||||
*** cint ***
|
||||
cint("1"): #typeof(cint("1"))#
|
||||
|
||||
*** cdouble ***
|
||||
cdouble("1.222"): #typeof(cdouble("1.222"))#
|
||||
|
||||
*** cdate ***
|
||||
cdate("2010-10-12"): #cdate("2010-10-12")#
|
||||
|
||||
*** ToList ***
|
||||
tolist(arr, null, ", "): #tolist(arr, null, ", ")#
|
||||
tolist(customersDict.Values, "Name", ", "): #tolist(customersDict.Values, "Name", ", ")#
|
26
WebsitePanel/Sources/WebsitePanel.Templates/Tests/tmp1.txt
Normal file
26
WebsitePanel/Sources/WebsitePanel.Templates/Tests/tmp1.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
Hello {$name+null},
|
||||
|
||||
{if 1 !=0.2 +"str1"
|
||||
&&""||'fff'}
|
||||
This is some text...
|
||||
{{/if}
|
||||
|
||||
Best regards,
|
||||
Support team
|
||||
|
||||
function setSelectionRange(textElem, selectionStart, selectionEnd) {
|
||||
if (textElem.setSelectionRange) { // FF
|
||||
// textElem.focus(); // needed?
|
||||
window.setTimeout(function(x,posL,posR){ // bug 265159
|
||||
return function(){x.setSelectionRange(posL,posR);};}
|
||||
(textElem,selectionStart,selectionEnd),100);
|
||||
} else if (textElem.createTextRange) { // IE
|
||||
var range = textElem.createTextRange();
|
||||
range.collapse(true);
|
||||
range.moveEnd('character', selectionEnd);
|
||||
range.moveStart('character', selectionStart);
|
||||
range.select();
|
||||
}
|
||||
}
|
||||
|
||||
{/if}
|
12
WebsitePanel/Sources/WebsitePanel.Templates/Tests/tmp2.txt
Normal file
12
WebsitePanel/Sources/WebsitePanel.Templates/Tests/tmp2.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
Hello {$2+a},
|
||||
{if ff}
|
||||
|
||||
{if -a.b[2+2].d[0]-2/3 #}
|
||||
This is some text...
|
||||
{/if}
|
||||
|
||||
{/idf1 }
|
||||
|
||||
{rest}
|
||||
Best regards,
|
||||
Support team
|
22
WebsitePanel/Sources/WebsitePanel.Templates/Tests/tmp3.txt
Normal file
22
WebsitePanel/Sources/WebsitePanel.Templates/Tests/tmp3.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
{foreach elem in arr1 index idx}
|
||||
{$elem} - {$idx % 2}
|
||||
{/foreach}
|
||||
|
||||
{for i = 0 to b*4}{if i >= 4},{/if} {$i}{/for}
|
||||
|
||||
{$arr1[1]}
|
||||
{$ arr1[1]
|
||||
.length}
|
||||
{$a+b-1}
|
||||
{$ a*(b/1) / 2-a+b+3/2 }
|
||||
|
||||
{if a}a!!!{/if}
|
||||
{if b==null}b is not set{/if}
|
||||
|
||||
Hello {$2+a},
|
||||
{if a+(b+1)/2*4 == 42/3}
|
||||
conditional expression
|
||||
{/if}
|
||||
|
||||
Best regards,
|
||||
Support team
|
Loading…
Add table
Add a link
Reference in a new issue