css fixed: arrow in combobox
[myslice.git] / portal / templates / fed4fire / fed4fire_projectrequest_view.html
index 1da22fa..3b267bf 100644 (file)
@@ -3,7 +3,7 @@
 {% 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 {
@@ -159,10 +157,16 @@ $(document).ready(function() {
         $("#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']);
     });
@@ -204,6 +208,9 @@ $(document).ready(function() {
        // auto-complete the form
     jQuery("#org_name").combobox();
 
+    $('input[name=project_name]').keyup(function(){
+        this.value = this.value.toLowerCase();
+    });
 });
 </script>
 {% endblock %}