andrewfritz86 / esl_app Goto Github PK
View Code? Open in Web Editor NEWThis is the repo for 'StoryBuilder'
This is the repo for 'StoryBuilder'
Hi all, here is the message I get in the JS console when trying to make an API request. This works fine in development.
[blocked] The page at 'https://safe-cove-5673.herokuapp.com/story_form' was loaded over HTTPS, but ran insecure content from 'http://api.wordnik.com/v4/word.json/different/definitions?limit=200&include…ncludeTags=false&api_key=64e90a58d89a8e7f3f000001fe809d0cd55d32cb45b9f117e': this content should also be loaded over HTTPS.
Adding an 's' to the URL doesn't seem to help.
Hey guys, running into the same issue I had last night, trying to render views and the underscore template is coming back undefined because my scripts aren't loading in order.
I tried moving my scripts for rendering views and creating models directly onto the page which contains their templates. The problem is that the scripts won't load because jquery hasn't loaded yet (the javascript_include_tag is now in the footer of application.html.css.
I then moved the JS include tags back to the header, but still no luck. Any thoughts?
Hi all.
My app has a resource called a 'citation', basically a snippet of text that is appended to a longer paragraph in my app that builds a story.
I have three JS files going, main, citation_view, and citation. I am able to persist citations to the db, so the model for citations seems to be working.
However, I am getting an undefined function error when I try and init my citationView objects. The object is created (I can see that with debugger), but when I try and call init on it, I can't go any further.
Below is the code for citation_view js in my app
console.log("citation views linked!")
function CitationView(model){
this.$el = $("<p>");
this.model = model;
this.id = model.id;
debugger
}
CitationView.prototype = {
template: _.template($("#citation-template").html()),
render: function(){
var template = this.template({citation: this.model});
this.$el = $(template);
return this;
},
init: function(){
var view = this;
// view.render();
toAppend = $("<p>");
toAppend.html(this.model.body)
$(".story").append(toAppend);
return this;
}
}
I've been staring at this for hours and just can't find a way around. The error stems from my createCitation function in mainJS, which looks like this.
eslApp.createCitation = function(data){
var citation = new Citation(data);
var citationView = new CitationView(citation)
// debugger
citationView = citationView.init();
//eslApp.pushView(citationView)
return citation;
}
If I comment out the line below the debugger, the line calling init on CitationView, the object persists to the db just fine. Any and all help would be great. I'm really stuck.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.