So I've recently decided to upgrade to Rally SDK 2.0. I'm using the starter kit and following the directions on the website. All I've done so far is added:
launch: function() {
this.iterationCombobox = this.add({
xtype: 'rallyiterationcombobox'
});
}
To the js file. Ran the rake command, loaded App.html into a browser. It is blank. According to the website, there should be a small combobox on the top left of the screen. I don't know what I missed, I assumed the example would work as the website displayed.
edit I should add that this isn't the only thing contained in the HTML file. I just meant that rake generates an HTML file at the beginning that adds //Add Code Here to the javascript function. I meant that the above code is the only tihng I've changed.
I tested your code snippet and it works in my testing. Did you paste the App code into a Custom HTML App in Rally? Or are you running outside of Rally?
If the latter, you'll need to modify the src attribute of the script tag in App.html:
<script type="text/javascript" src="https://rally1.rallydev.com/apps/2.0p5/sdk.js"></script>
So that it contains a fully-qualified reference to the AppSDK2 JS library.
The AppSDK API Docs have some good Examples of simple starter Apps. The Grid examples are good places to start. You can click on the "View Source" link within any of the Example apps and see the source code.
Related
I have a simple vue app based on this official example
What I've added is this template for the login page. When displaying the login page directly by URL it is being rendered correctly:
But when I got it via the link from another page it is being sized incorrectly:
How could it be fixed? Thanks!
ps: sorry, I could not make an online example, just the entire source code on github
How do I navigate to another page within my Elm application?
Specifically, I am trying to navigate from the Home page to the Contributor page.
The Contributor page is located under my Domain folder.
The file structure is below:
- Home.elm
- Domain
- Contributor.elm
I thought I could do something like this:
a [href "Domain/Contributor.elm"] [text "click me!"]
or this:
a [href "Domain/Contributor.html"] [text "click me!"]
However, neither of these paths work.
Note:
The app that I'm working on is NOT a SPA.
You are using elm-live, which is a development server. It targets a single Elm source file as its entry point, so unless your Elm code is built as a single page application, you won't be able to do any navigation to another file (though there is nothing wrong with hard-coding href links that link elsewhere).
elm-live is also only for development. You wouldn't want to run it on a production server.
If you are trying to avoid a SPA and would rather have each Elm file represent the complete functionality for a single page, perhaps you could go with the default functionality of elm make, which generates an HTML file that contains inline javascript compiled from Elm code. This is, in essence, what drives the elm-lang.org website. If you look at the source code, you'll see the html generated by the default elm make command, compiled against each Elm file "page" of the application.
On the other hand, if you are trying to build a SPA, #Bill's answer is a good starting point.
I don't believe you can do the sort of navigation you are trying to do within an Elm app without building a SPA. You are attempting to use the HTML href attribute to navigate. That attribute needs to be a real URL. Without using something like the Elm navigation package, you wont's have support for multiple routes.
Simple navigation in Elm is fairly straightforward. I wrote a blog post on this subject.
Also, here is the github repo that demonstrates the work in this post.
I've created a JavaScript Windows Store blank app, and added the following code into it.
var url = new Windows.Foundation.Uri("http://www.google.com")
Windows.System.Launcher.launchUriAsync(url);
when debugging my program the above launches google without fail, but if I put a .edu site or something that ends in .aspx, the site won't launch.
I'm not able to reproduce this. Perhaps there's something in how you're doing this that's causing the issue.
To try to repro, here's what I did.
Started with the JavaScript Blank app template.
Added a button to default.html, on the line following the <p> element: <input id="Button1" type="button" value="Launch" />
Added an event handler for the button in default.js, just after the call to WinJS.UI.ProcessAll: document.getElementById("Button1").addEventListener("click", launchUri);
Added the launchUri function, as follows, to default.js:
launchUri:
function launchUri() {
var uri = new Windows.Foundation.Uri("http://www.communitymegaphone.com/Default.aspx");
Windows.System.Launcher.launchUriAsync(uri);
}
Works fine for me, both with aspx (as shown above) as well as for .edu addresses.
If you're still not able to make it work, please post some additional code for context.
Hope that helps.
For more info on Windows Store app development, register for Generation App.
I want to modify the appearance of the login page. I've added some jquery and javascript to DesktopModules/AuthenticationServices/DNN/Login.ascx so i could have a virtual keyboard which the user can use to type the username and password. The problem is that when the login fails, it seems to me that the jquery and the javascript scripts are not executed and consequently the virtual keyboard does not appear.
I've done a lot of search on this one. I'm considering making a new login module, but i'm not sure how or if this will enable me to solve the problem.
Any suggestions out there?
DNN Version: 6.1.3
I would advise against changing the core login directly, because it's considered a "core change" and would be overwritten in an upgrade. It would require that you merge your changes before upgrading every time.
Instead, if you require that level of access, I'd suggest creating your own login module.
In looking at your problem though, I don't think that's necessary. You could achieve this same effect by creating and implementing a skin widget. Skin widgets will allow you to manipulate the UI in nearly any way you can think of since you can use jQuery and inject jQuery plugins.
This is a much more elegant solution that can scale, is testable, safe against upgrades, and allows you to reuse it as needed across multiple sites and installations.
Examples of widgets and documentation can be found in the following two links:
DNN Widget Suite Project
Skin Widget Wiki Article with many linked resources
Like Will said you definitely should not edit or add code to the core files as they will get overwritten in DNN upgrades. You should be able to solve this with just Javascript, but you could also look at a 3rd party login module like this one: http://www.dnnspot.com/Modules/DotNetNuke-Custom-Login
Has features to customize the sign in view, logged in view, even error messages. So you should be able to inject different javascript as needed in different situations.
Disclaimer - I am affiliated with DNNspot.
I used this javascript On-Screen-Keyboard (OSK) which is lovely.
(http://www.greywyvern.com/code/javascript/keyboard)
I am using DNN 5.6.8 so I'm not sure if my solution works for DNN 6.x .
I modify the "page.ascx" file of the "skin" I'm using, but I think you can modify the "page.ascx" of the default skin as well.
At the top of the page.ascx, below the list of "Register"'s I wrote this:
<script type="text/javascript" src="/js/keyboard.js" charset="UTF-8"></script>
<link rel="stylesheet" type="text/css" href="/js/keyboard.css">
Those 2 files (keyboard.js and keyboard.css) are the on-screen-keyboard. You may store them in other folders than "/js" of course.
At the bottom of the page.ascx, I put this script:
<script type="text/javascript">
$(document).ready(function () {
if (document.getElementById('dnn_ctr_Login_Login_DNN_txtUsername') != null) {
$("#dnn_ctr_Login_Login_DNN_txtUsername").attr("lang", "es");
$("#dnn_ctr_Login_Login_DNN_txtPassword").attr("lang", "es");
VKI_attach(document.getElementById('dnn_ctr_Login_Login_DNN_txtUsername'));
VKI_attach(document.getElementById('dnn_ctr_Login_Login_DNN_txtPassword'));
}
});
</script>
These names: 'dnn_ctr_Login_Login_DNN_txtUsername' and 'dnn_ctr_Login_Login_DNN_txtPassword' were the ones I saw by right-clicking and "View source code" of my DNN site running, and I think there's no reason to think they can be different in other DNN sites, but nevertheless you can check yours.
Obviously you must have jQuery active in your DNN installation. :)
That's it. It works great!!
HTH!
ok so I've got a couple of js files located in "views/relationships"….the original code is for 3.0…I'm on 3.1 and the javascript files are not working….how do I get these to works? here is the code for one of the files….
expounding on "not working":
the user clicks on a "unfollow" button, an ajax call takes place and runs on a function to do something, the "unfollow" button then changes to a "follow" button. That's what is supposed to happen...what actually...
UPDATE: turns out to be a simple prototype to jquery problem...
$("follow_form").update("<%= escape_javascript(render('users/unfollow'))%>")
$("followers").update('<%= "#{#user.followers.count} followers" %>')
becomes...
$("#follow_form").html("<%= escape_javascript(render('users/unfollow'))%>")
$("#followers").html('<%= "#{#user.followers.count} followers" %>')
Not all JavaScript files should be moved to app/assets/javascripts: only move files that are used to add functionality to your app (e.g. having tabbed menus with javascript). JavaScript templates rendering AJAX views (e.g. create.js.erb) should remain in the app/views/users/ folder.
So to answer your question: the files you're talking about (based on the 2 lines included in your question) should remain where they are.