Kendo controls render in Debug mode only - kendo-asp.net-mvc

I have created a MVC 3 site using Kendo. When I go into Debug mode the Kendo controls render with no problem. When I public the project to my IIS7 server the controls do not render. Here is what I have in the layout file to reference the kendo javascript files and other javascript files.
<script src="#Url.Content("~/Scripts/common.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/json2.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/kendo/2013.1.319/jquery.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/kendo/2013.1.319/kendo.web.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/kendo/2013.1.319/kendo.aspnetmvc.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/kendo/2013.1.319/kendo.culture.en-US.min.js")" type="text/javascript"></script>

Related

Bootstrap popover does not work with downloaded js and css

I am having some weird problem with using popover in my django app. When using the css and js of a latest version of bootstrap it simply does not work. When I use link to 3.4.1 version I found in some tutorial everything works just fine. I'm attaching code that doesn't work and the one that does.
Did popover function got removed in latest bootstrap?
Works (3.5.1):
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="{% static 'js/jquery-3.5.1.min.js' %}"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
Toggle popover
<script>
$(document).ready(function(){
$('[data-toggle="popover"]').popover();
});
</script>
Does not work (4.5.x):
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
<script src="{% static 'js/jquery-3.5.1.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
Toggle popover
<script>
$(document).ready(function(){
$('[data-toggle="popover"]').popover();
});
</script>
You are missing popper.js.
Note that the bootstrap bundle js include the popper.js library. Try to load this one from CDN instead of bootstrap.js.
Require order :
Jquery
Popper
Bootstrap

Mixing and Matching Components for Zurb Foundation 6 Sites & Apps

Is it possible to mix and match components for Zurb Foundation 6 for Sites/Apps? For example, can I use the the Card component of Zurb Foundation 6 for Apps in a Foundation 6 for Sites installation?
If so, how is this possible?
Its is very much possible and I've been using them in my works. Simply make sure to include appropriate css and js files.
For example :
<!--Scripts-->
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/foundation.min.js"></script>
<script type="text/javascript" src="js/foundation-apps.min.js"></script>
<script type="text/javascript" src="js/foundation.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.js"></script>
<script type="text/javascript" src="js/iconic.min.js"></script>
<script type="text/javascript" src="js/motion-ui.min.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<!--Styles-->
<link rel="stylesheet" href="css/foundation-apps.min.css"/>
<link rel="stylesheet" href="css/foundation.min.css"/>
<link rel="stylesheet" href="css/motion-ui.min.css"/>
<link rel="stylesheet" href="css/app.css"/>
You this for local development and if you want, you can compress all files into one minified (.min) file for production.

Contents of a view not displaying, simple app based on TODO tutorial, ember.js

I'm trying to create a simple TODO app based on the one in the Getting Started Ember.js tutorials, but with persistence to a backend.
I've had everything working until I wanted to look at wrapping my markup for rendering a todo in a view (called 'todo-element'), to enable drag & drop sorting.
Then, my view refused to render. I've simplified the markup for the view just to render the text 'Hello', to try to debug things. The instance of the view sets the tagName to 'li'. So I should be getting a list of lis with the text 'Hello' in them. However, all I get is a list of empty lis.
This is the markup:
<!DOCTYPE html>
<html>
<head>
<title>Todos</title>
</head>
<body>
<script type="text/x-handlebars">
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="todos">
<section id="todos">
<header>
<h1>The TODOs</h1>
{{input type="text" placeholder="Enter new TODO description here ..."
value=newDescription action="createTodo"}}
<button {{action "createTodo"}} id="add-todo">Add</button>
</header>
<ul id="todos">
{{#each itemController="todo"}}
{{todo-element}}
{{/each}}
</ul>
</section>
</script>
<script type="text/x-handlebars" data-template-name="todo-element">
<span>Hello</span>
</script>
<script type="text/javascript" src="javascripts/jquery"></script>
<script type="text/javascript" src="javascripts/handlebars-1.0.0.js"></script>
<script type="text/javascript" src="javascripts/ember.js"></script>
<script type="text/javascript" src="javascripts/ember-data.js"></script>
<script type="text/javascript" src="javascripts/todos/app.js"></script>
<script type="text/javascript" src="javascripts/todos/todo.js"></script>
<script type="text/javascript" src="javascripts/todos/router.js"></script>
<script type="text/javascript" src="javascripts/todos/todos_controller.js"></script>
<script type="text/javascript" src="javascripts/todos/todo_controller.js"></script>
<script type="text/javascript" src="javascripts/todos/todo_element_view.js"></script>
<script type="text/javascript" src="javascripts/todos/edit_todo_view.js"></script>
</body>
</html>
And this is the code for the view:
Todos.TodoElementView = Ember.View.extend( {
templateView : 'todo-element',
tagName : 'li'
} );
Ember.Handlebars.helper( 'todo-element', Todos.TodoElementView );
My best guess is that the 'todo-element' markup is not getting associated with the TodoElementView, as I get exactly the same empty list of lis if I change the 'todo-element' markup's data-template-name to something random.
If anybody could help me with where I'm going wrong here, I'd be very grateful.
Cheers,
Doug.
think you are little confused between ember components and ember views
1. A view is called with view helper {{view App.ViewName}}. Your code {{todo-element}} looks more like a component.
In your component you have a static tag span hello so I guess it's showing only hello. Put dynamic data in it using {{}}

Load css from handlebars template

I am using ember js. How do I load a css style sheet from a handlebars js template
For example this doesn't work
<script type="text/x-handlebars" id="about">
<link rel="stylesheet" href="/static/css/about.css"}}
// HTML CONTENT
.......
</script>
It looks like it works to me.
<script type="text/x-handlebars" data-template-name="color">
<h3>Color</h3>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
The color of the day is: {{color}}
</script>
http://emberjs.jsbin.com/OxIDiVU/162/edit

using tinymce wih django admin panel

I am trying to integrate tinymce with django using these steps, however I can't. All I see in my admin panel is a simple TextField.
It seems there is something wrong with my settings.py file because in the code of the admin page I get this:
<script type="text/javascript">window.__admin_media_prefix__ = "/static/admin/";</script>
<script type="text/javascript" src="/admin/jsi18n/"></script>
<script type="text/javascript" src="/static/admin/js/core.js"></script>
<script type="text/javascript" src="/static/admin/js/admin/RelatedObjectLookups.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>
<script type="text/javascript" src="/static/admin/js/actions.min.js"></script>
<script type="text/javascript" src="/static/tiny_mce/tiny_mce.js"></script>
Shouldn't tiny_mce.js source file exist in static/admin directory? What am I doing wrong?
First - look at this code throught Firebug (or something else, as you wish), maybe .js code doesn't linked with that page, then you will see 404 page there. Also, if everything correct you must check javascript errors, maybe there some dependencies fails.
And I'm sure, that you connect all needed code inn your .py files.