Skip to content

Commit

Permalink
Merge pull request #812 from apache/feature/WW-5362-remove-type
Browse files Browse the repository at this point in the history
[WW-5362] Removes type attribute out of <s:script/> tag
  • Loading branch information
lukaszlenart authored Jan 1, 2024
2 parents b5e0790 + b9c797e commit 3dabcf1
Show file tree
Hide file tree
Showing 62 changed files with 139 additions and 139 deletions.
2 changes: 1 addition & 1 deletion apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<s:script src="%{jqueryJs}"/>
<s:url var="bootstrapJs" value='/js/bootstrap.min.js' encode='false' includeParams='none'/>
<s:script src="%{bootstrapJs}"/>
<s:script type="text/javascript">
<s:script>
$(function () {
var alerts = $('ul.alert').wrap('<div />');
alerts.prepend('<a class="close" data-dismiss="alert" href="#">&times;</a>');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</div>
</div>

<s:script type="text/javascript">
<s:script>
/********************************************************************
* JS just used on this page.
* Usually this would be placed in a JS file
Expand Down
8 changes: 4 additions & 4 deletions assembly/src/main/resources/template.vm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#set ($stylebase = "https://struts.apache.org/css")
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
Expand All @@ -16,7 +16,7 @@ software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
under the License.
-->
<html>
<head>
Expand All @@ -43,12 +43,12 @@ under the License.
<script src='http://struts.apache.org/highlighter/js/$hscript' type='text/javascript'></script>
#end

<script type="text/javascript">
<script>
SyntaxHighlighter.defaults['toolbar'] = false;
SyntaxHighlighter.all();
</script>
#end
<script type="text/javascript" language="javascript">
<script>
var hide = null;
var show = null;
var children = null;
Expand Down
12 changes: 6 additions & 6 deletions bundles/admin/src/main/resources/osgi/admin/shell.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
<head>
<title>OSGi Console</title>

<link rel="stylesheet" type="text/css" href="<@s.url value="${parameters.staticContentPath}/css/shell.css" />" />
<link rel="stylesheet" type="text/css" href="<@s.url value="${parameters.staticContentPath}/css/main.css" />" />
<link rel="stylesheet" type="text/css" href="<@s.url value="${parameters.staticContentPath}/css/redmond/jquery-ui-1.12.1.redmond.css" />" />
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/shell.css" />
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/main.css" />
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/redmond/jquery-ui-1.12.1.redmond.css" />

<script src="<@s.url value="${parameters.staticContentPath}/js/shell.js" />"></script>
<script src="<@s.url value="${parameters.staticContentPath}/js/jquery-1.12.4.min.js" />"></script>
<script src="<@s.url value="${parameters.staticContentPath}/js/jquery-ui-1.12.1.min.js" />"></script>
<@s.script src="${base}${parameters.staticContentPath}/js/shell.js" />
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-1.12.4.min.js" />
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-ui-1.12.1.min.js" />
</head>
<body>
<div class="menu">
Expand Down
14 changes: 7 additions & 7 deletions bundles/admin/src/main/resources/osgi/admin/viewBundle.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
<head>
<title>${bundle.symbolicName!}</title>

<link rel="stylesheet" type="text/css" href="<@s.url value="${parameters.staticContentPath}/css/main.css" />" />
<link rel="stylesheet" type="text/css" href="<@s.url value="${parameters.staticContentPath}/css/redmond/jquery-ui-1.12.1.redmond.css" />" />
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/main.css" />
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/redmond/jquery-ui-1.12.1.redmond.css" />

<script src="<@s.url value="${parameters.staticContentPath}/js/jquery-1.12.4.min.js" />"></script>
<script src="<@s.url value="${parameters.staticContentPath}/js/jquery-ui-1.12.1.min.js" />"></script>
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-1.12.4.min.js"/>
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-ui-1.12.1.min.js" />

<script type="text/javascript">
<@s.script>
$(function() {
$("#tabs").tabs();
});
</script>
</@s.script>

</head>
<body>
Expand Down Expand Up @@ -72,7 +72,7 @@
<span class="ui-icon ui-icon-transferthick-e-w"></span>
OSGi Shell
</a>
</div>
</div>
</div>

<@s.actionerror />
Expand Down
10 changes: 5 additions & 5 deletions bundles/admin/src/main/resources/osgi/admin/viewBundles.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
<head>
<title>OSGi Bundles</title>

<link rel="stylesheet" type="text/css" href="<@s.url value="${parameters.staticContentPath}/css/main.css" />" />
<link rel="stylesheet" type="text/css" href="<@s.url value="${parameters.staticContentPath}/css/redmond/jquery-ui-1.12.1.redmond.css" />" />
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/main.css" />
<@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/css/redmond/jquery-ui-1.12.1.redmond.css" />

<script src="<@s.url value="${parameters.staticContentPath}/js/jquery-1.12.4.min.js" />"></script>
<script src="<@s.url value="${parameters.staticContentPath}/js/jquery-ui-1.12.1.min.js" />"></script>
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-1.12.4.min.js" />
<@s.script src="${base}${parameters.staticContentPath}/js/jquery-ui-1.12.1.min.js" />
</head>
<body>

Expand All @@ -42,7 +42,7 @@
<span class="ui-icon ui-icon-transferthick-e-w"></span>
OSGi Shell
</a>
</div>
</div>
</div>

<@s.actionerror />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,39 @@
-->
<!DOCTYPE html>
<html>
<style>
<@s.style>
.debugTable {
border-style: solid;
border-width: 1px;
}

.debugTable td {
border-style: solid;
border-width: 1px;
}

.nameColumn {
background-color:#CCDDFF;
}

.valueColumn {
background-color: #CCFFCC;
}

.nullValue {
background-color: #FF0000;
}

.typeColumn {
background-color: white;
}

.emptyCollection {
background-color: #EEEEEE;
}
</style>
</@s.style>

<script>
<@s.script>
function expand(src, path) {
var baseUrl = location.href;
var i = baseUrl.indexOf("&object=");
Expand Down Expand Up @@ -83,7 +83,7 @@
};
request.send();
}
</script>
</@s.script>

<body>
${debugHtml?no_esc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!DOCTYPE html>
<html>
<head>
<@s.script type="text/javascript">
<@s.script>
var baseUrl = "<@s.url value="/static" includeParams="none"/>";
window.open(baseUrl+"/webconsole.html", 'OGNL Console','width=500,height=450,status=no,toolbar=no,menubar=no');
</@s.script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
-->
<#if parameters.validate!false == true>
<script type="text/javascript" src="${base}${parameters.staticContentPath}/css_xhtml/validation.js"></script>
<@s.script src="${base}${parameters.staticContentPath}/css_xhtml/validation.js"/>
<#if parameters.onsubmit??>
${tag.addParameter('onsubmit', "${parameters.onsubmit}; return validateForm_${parameters.escapedId}();")}
<#else>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/template/simple/combobox.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* under the License.
*/
-->
<@s.script type="text/javascript">
<@s.script>
function autoPopulate_${parameters.escapedId}(targetElement) {
<#if parameters.headerKey?? && parameters.headerValue??>
if (targetElement.options[targetElement.selectedIndex].value == '${parameters.headerKey?js_string}') {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/template/simple/doubleselect.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
</#if>
/><#rt/>
</#if>
<@s.script type="text/javascript">
<@s.script>
<#assign itemCount = startCount/>
var ${parameters.escapedId}Group = new Array(${parameters.listSize?number?c} + ${startCount});
for (var i = 0; i < (${parameters.listSize?number?c} + ${startCount}); i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
--><#t/>
<#if (parameters.hasTooltip!false)><#t/>
<#lt/><!-- javascript that is needed for tooltips -->
<#lt/><@s.script type="text/javascript" src="${base}${parameters.staticContentPath}/domTT.js" />
<#lt/><@s.script src="${base}${parameters.staticContentPath}/domTT.js" />
<#lt/><@s.link rel="stylesheet" type="text/css" href="${base}${parameters.staticContentPath}/domTT.css" />
</#if><#t/>
2 changes: 1 addition & 1 deletion core/src/main/resources/template/simple/form-close.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</form>

<#if (parameters.customOnsubmitEnabled??)>
<@s.script type="text/javascript">
<@s.script>
<#--
Enable auto-select of optiontransferselect tag's entries upon containing form's
submission.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/template/simple/head.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
* under the License.
*/
-->
<@s.script src="${base}${parameters.staticContentPath}/utils.js" type="text/javascript" />
<@s.script src="${base}${parameters.staticContentPath}/utils.js" />
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
-->
<#if !stack.findValue("#inputtransferselect_js_included")??><#t/>
<@s.script type="text/javascript" src="${base}${parameters.staticContentPath}/inputtransferselect.js"/>
<@s.script src="${base}${parameters.staticContentPath}/inputtransferselect.js"/>
<#assign temporaryVariable = stack.setValue("#inputtransferselect_js_included", "true") /><#t/>
</#if><#t/>
<table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
-->
<#if !stack.findValue("#optiontransferselect_js_included")??><#t/>
<@s.script type="text/javascript" src="${base}${parameters.staticContentPath}/optiontransferselect.js" />
<@s.script src="${base}${parameters.staticContentPath}/optiontransferselect.js" />
<#assign temporaryVariable = stack.setValue("#optiontransferselect_js_included", "true") /><#t/>
</#if><#t/>
<table>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/template/simple/updownselect.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
-->
<#if !stack.findValue("#optiontransferselect_js_included")??><#t/>
<@s.script type="text/javascript" src="${base}${parameters.staticContentPath}/optiontransferselect.js" /><#t/>
<@s.script src="${base}${parameters.staticContentPath}/optiontransferselect.js" /><#t/>
<#assign temporaryVariable = stack.setValue("#optiontransferselect_js_included", "true") /><#t/>
</#if><#t/>
<table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Only the following validators are supported:
END SNIPPET: supported-validators
-->
<#if ((parameters.validate!false == true) && (parameters.performValidation!false == true))>
<@s.script type="text/javascript">
<@s.script>
function validateForm_${parameters.escapedId}() {
<#--
In case of multiselect fields return only the first value.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/template/xhtml/form-close.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<#include "/${parameters.templateDir}/simple/form-close.ftl" />
<#include "/${parameters.templateDir}/${parameters.expandTheme}/form-close-validate.ftl" />
<#if parameters.focusElement??>
<@s.script type="text/javascript">
<@s.script>
StrutsUtils.addOnLoad(function() {
var element = document.getElementById("${parameters.focusElement?js_string}");
if(element) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/template/xhtml/form-validate.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
-->
<#if parameters.validate!false == true>
<@s.script type="text/javascript" src="${base}${parameters.staticContentPath}/xhtml/validation.js" />
<@s.script src="${base}${parameters.staticContentPath}/xhtml/validation.js" />
<#if parameters.onsubmit??>
${tag.addParameter('onsubmit', "${parameters.onsubmit}; return validateForm_${parameters.escapedId}();")}
<#else>
Expand Down
2 changes: 1 addition & 1 deletion core/src/site/confluence/ww-template-autoexport.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
color: #666;
}
</style>
<script type="text/javascript" language="javascript">
<script>
var hide = null;
var show = null;
var children = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<tr>
<td class="tdLabel"><label for="cb" class="label">mylabel:</label></td>
<td class="tdInput">
<script type="text/javascript" nonce="r4nd0m">
<script nonce="r4nd0m">
function autoPopulate_cb(targetElement) {
targetElement.form.elements['foo'].value=targetElement.options[targetElement.selectedIndex].value;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<tr>
<td class="tdLabel"><label for="myFavouriteFruit" class="label">My Favourite Fruit:</label></td>
<td class="tdInput">
<script type="text/javascript">
<script>
function autoPopulate_myFavouriteFruit(targetElement) {
if (targetElement.options[targetElement.selectedIndex].value == '-1') {
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<tr>
<td class="tdLabel"><label for="myFavouriteFruit" class="label">My Favourite Fruit:</label></td>
<td class="tdInput">
<script type="text/javascript">
<script>
function autoPopulate_myFavouriteFruit(targetElement) {
if (targetElement.options[targetElement.selectedIndex].value == '-1') {
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<tr>
<td class="tdLabel"><label for="cb[&#39;&quot;.&quot;&#39;]=bc(){};//" class="label">mylabel:</label></td>
<td class="tdInput">
<script type="text/javascript">
<script>
function autoPopulate_cb__________bc_______(targetElement) {
targetElement.form.elements['foo'].value=targetElement.options[targetElement.selectedIndex].value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<br/>
<select name="region" id="region" class="c2" style="s2">
</select>
<script type="text/javascript" nonce="r4nd0m">
<script nonce="r4nd0m">
var fooGroup = new Array(2 + 0);
for (var i = 0; i < (2 + 0); i++) {
fooGroup[i] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<br/>
<select name="region" id="region">
</select>
<script type="text/javascript">
<script>
var fooGroup = new Array(2 + 0);
for (var i = 0; i < (2 + 0); i++) {
fooGroup[i] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<br/>
<select name="region" id="region">
</select>
<script type="text/javascript">
<script>
var foo_barGroup = new Array(2 + 0);
for (var i = 0; i < (2 + 0); i++) {
foo_barGroup[i] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<br/>
<select name="region" id="region" class="c2" style="s2">
</select>
<script type="text/javascript">
<script>
var fooGroup = new Array(2 + 0);
for (var i = 0; i < (2 + 0); i++) {
fooGroup[i] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</select>
<br />
<select name="region" disabled="disabled" id="region" title="someTitle" select-name="secondName"></select>
<script type="text/javascript">
<script>
var someIdGroup = newArray(2 + 0);
for (var i = 0; i < (2 + 0); i++) {
someIdGroup[i] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<br/>
<select name="region" id="region" onclick="testMe()" ondblclick="testMe()" onmousedown="testMe()" onmouseup="testMe()" onmouseover="testMe()" onmousemove="testMe()" onmouseout="testMe()" onfocus="testMe()" onblur="testMe()" onkeypress="testMe()" onkeydown="testMe()" onselect="testMe()" onchange="testMe()">
</select>
<script type="text/javascript" >
<script>
var fooGroup = new Array(2 + 0);
for (var i = 0; i < (2 + 0); i++) {
fooGroup[i] = [];
Expand Down
Loading

0 comments on commit 3dabcf1

Please sign in to comment.