generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
test/fixtures/linter/rules/NoDeprecatedApi/NoInlineJS.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<html> | ||
|
||
<head> | ||
<title>No inline JS</title> | ||
</head> | ||
|
||
<body> | ||
<script type="text/javascript"> | ||
sap.ui.controller("my.own.controller", { | ||
doSomething: function () { | ||
alert("Hello World!"); | ||
} | ||
}); | ||
</script> | ||
|
||
<script type=""> | ||
(function() { | ||
alert("test") | ||
})(); | ||
</script> | ||
|
||
<script> | ||
sap.ui.controller("myController", { | ||
onInit: function () { | ||
var model = new sap.ui.model.json.JSONModel(); | ||
model.setData({ | ||
buttonText: "Click Me!" | ||
}); | ||
this.getView().setModel(model); | ||
}, | ||
doSomething: function () { | ||
alert("Hello World!"); | ||
} | ||
}); | ||
sap.ui.xmlview({ viewContent: jQuery('#myXml').html() }).placeAt("content"); | ||
</script> | ||
</body> | ||
|
||
</html> |
23 changes: 23 additions & 0 deletions
23
test/fixtures/linter/rules/NoDeprecatedApi/NoInlineJS_negative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<html> | ||
|
||
<head> | ||
<title>No inline JS</title> | ||
</head> | ||
|
||
<body> | ||
<script id="myXml" type="text/xmldata"> | ||
<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="myController" displayBlock="true"> | ||
<App> | ||
<Page title="Hello"> | ||
<Button text="{/buttonText}" press= "doSomething"/> | ||
</Page> | ||
</App> | ||
</mvc:View> | ||
</script> | ||
|
||
<script type="" src="./path/to/js.js"></script> | ||
|
||
<script src="./another/path/to/js.js"></script> | ||
</body> | ||
|
||
</html> |