How to order an asp-src-include statement? - asp.net-core

I used:
<environment names="Development">
<script asp-src-include="~/js/*.js"></script>
</environment>
I had two js files, ~/js/jquery.js and ~/js/bootstrap.js but the outputted script tags were in alphabetical order, i.e. bootstrap.js then jquery.js, but jQuery needs to be first.
I got around it by changing to:
<environment names="Development">
<script src="~/js/jquery.js"></script>
<script src="~/js/bootstrap.js"></script>
</environment>
Is there a way to still use asp-src-include but to have more control over the order it uses?

Related

Where do I find the "the HTMLQuestion schema URL" and CDATA (newbie ... run out of options)

I want to conduct a simple turk survey.
I've made the form, uploaded the images and set the details but I'm not quite sure what's next.
Here is the framework of my form with what I think are the AWS elements needed but:
1) How do I find the "the HTMLQuestion schema URL"?
2) Do I generate the assignmentId or does it get inserted on the POST?
3) Is there something I need to add for CDATA is it is a placeholder for an array?
(Please forgive my ignorance but I may even being asking the wrong questions. I'm just not clear what to do next - especially to test it myself (sandbox). I tried posting in the Turk forum but no replies in two days. I don't expect the AWS manual to be for novices.)
<pre>
<HTMLQuestion xmlns="[the HTMLQuestion schema URL]">
<HTMLContent><![CDATA[
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
<script type='text/javascript' src='https://s3.amazonaws.com/mturk-public/externalHIT_v1.js'></script>
</head>
<body>
<form name='mturk_form' method='post' id='mturk_form' action='https://www.mturk.com/mturk/externalSubmit'>
<input type='hidden' value='' name='assignmentId' id='assignmentId'/>
... my handwritten form elements ...
</form>
<script language='Javascript'>turkSetAssignmentID();</script>
</body>
</html>
]]>
</HTMLContent>
<FrameHeight>0</FrameHeight>
</HTMLQuestion>
</pre>
Here is the latest link I found so far:
<HTMLQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2011-11-11/HTMLQuestion.xsd">

how do I validate a particular script in persent in page source using selenium?

In page source I have script tags as below,
how to validate in selenium that particular scripts are persent???
<script src="/core/assets/vendor/domready/ready.min.js?v=1.0.8"></script>
<script src="/core/misc/drupalSettingsLoader.js?v=8.4.8"></script>
<script src="/core/misc/drupal.js?v=8.4.8"></script>
<script src="/core/misc/drupal.init.js?v=8.4.8"></script>
you can search for attribute src within a script. i.e. finding element by attribute
driver.findElement(By.xpath("//script[#src='/core/assets/vendor/domready/ready.min.js?v=1.0.8']"))
OR
driver.findElement(By.xpath("//script[contains(#src,'/core/assets/vendor/domready/ready.min.js?v=1.0.8')]")
OR
driver.findElement(By.cssSelector("script[src='/core/assets/vendor/domready/ready.min.js?v=1.0.8']"))

Datatables jquery-ui and position of global search field

With Datatables, I just switched over from the Datatables css to the jquery.datTable.jqueryui.css.
I've been having a hard time trying to figure out how to correct these issues:
The property that will let me correct the label text vertical alignment of the "show ... records per page',
so I can get it to v-align to the bottom
(some other style I have must be hitting it and taking it to v-top
and it looks bad like that).
How can I get the "search" label and field back up on the far right
and on the same line as the "show ... records" field?
How would you apply styles to the text labels of those fields (color, size, etc.)?
I have no styles or attributes effecting things right now, other than whatever base style might be causing the "show...records" text to v-align to the top.
I've tried a few solution and the best result I've gotten so far is that search will move over to the right like it normally would be, except it's still on a new line (so one line down from the "show...records" text & field.
Thanks for any help.
<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.structure.min.css">
<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.theme.min.css">
<link rel="stylesheet" type="text/css" href="../../css/dataTables.jqueryui.css">
<link rel="stylesheet" type="text/css" href="../../css/jquery.dataTables_themeroller">
This will give you the "records per page", filter, and pagination on the top of your datatable; spaced using bootstrap grid classes.
sDom: '<"H"r<"col-sm-5"i><"col-sm-3"f><"col-sm-4"p>>t',

MSBuild to update html tag

Here is my html file:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script id="ScriptId" src=""></script>
</body>
</html>
I want to replace empty src by script.js.
I tried with XmlPoke, but my XPath query doesn't work I think or maybe I can't do this way:
<XmlPoke XmlInputPath="test.html"
Query="/html/body/script[id='ScriptId']/src"
Value="script.js"/>
Thanks in advance to help me to update this src value.
Attributes in XPath are prefixed with #.
/html/body/script[#id='ScriptId']/#src
You probably shouldn't be using something designed for XML with HTML as two are not the same, at best, if HTML is well-formed, it'll strip out non-XML stuff like DOCTYPE, at worst it'll blow up.

Dojo NumberTextBox : defining max constraint

I'm having troubles with the NumberTextBox max constraint. If I use standard markup declaration and create the numbertextbox with default setting, e.g.
dojo.require("dijit.form.NumberTextBox");
<link href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.3/dojo/resources/dojo.css" rel="stylesheet" />
<link href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.3/dijit/themes/claro/claro.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.9.3/dojo/dojo.js" djConfig="parseOnLoad:true"></script>
<body class="claro">
<input id="q05" type="text" dojoType="dijit.form.NumberTextBox" constraints="{places:0}" required="true" >
this control is constrained to be max of 16digits. And that's the issue. What if I need the user to be able to enter a 16+ digit number?
I seem to be unable to overwrite this with the constraints:"{max:99999999999999999999}" (it's 20 of them) nor with the maxLength:"20" attributes.
Any ideas on how to properly set the control to be constrained let's say up to 20 digits, instead of 16 (which appears to be a limit now)?
Thank you
Use ValidationTextBox and use propert regExp to narrow possible input.