{% block head %}
<script src="{{ STATIC_URL }}js/jquery-ui.js"></script>
<script src="{{ STATIC_URL }}js/jquery-ui-combobox.js"></script>
-<link rel='stylesheet' type='text/css' href="{{ STATIC_URL }}css/jquery-ui.css">
+<link rel='stylesheet' type='text/css' href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/jquery.ui.combobox.css">
{% endblock head %}
{% block content %}
<script>
$(document).ready(function() {
var myprojects = JSON.parse(localStorage.getItem('projects'));
- console.log(myprojects);
if (myprojects) {
$.each(myprojects, function (i, val){
- console.log(val);
$('.project-list').append('<tr><td>'+ val +'</td></tr>');
});
} else {
$("#project_loading").hide();
$("#projects").html(projects.join( "" ));
$("#projects").combobox();
+ var $s = jQuery("#projects").next().attr('id','listProjects');
+ jQuery('#listProjects').bind("click",function(){
+ // show all items click
+ this.childNodes[1].click();
+ });
+
});
/*
- $("#authority_hrn").load("/rest/user/", {"fields" : ["parent_authority"], "filters": {"user_hrn": "{{ user_hrn }}"}}, function(data) {
+ $("#authority_hrn").load("/rest/myslice:user/", {"fields" : ["parent_authority"], "filters": {"user_hrn": "{{ user_hrn }}"}}, function(data) {
var jsonData = JSON.parse(data);
$(this).attr("value", jsonData[0]['parent_authority']);
});
// auto-complete the form
jQuery("#org_name").combobox();
+ $('input[name=project_name]').keyup(function(){
+ this.value = this.value.toLowerCase();
+ });
});
</script>
{% endblock %}