added enter-key binding to a username input box in the project map view
This commit is contained in:
parent
dd36a94619
commit
b4288906e4
@ -54,7 +54,6 @@ var GraphApp = (function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.graph_container = $('#' + graph_container_id);
|
this.graph_container = $('#' + graph_container_id);
|
||||||
this.refresh_button_inited = false;
|
|
||||||
this.refresh_button = $('#' + refresh_button_id);
|
this.refresh_button = $('#' + refresh_button_id);
|
||||||
this.refresh_spin = $('#' + refresh_spin_id);
|
this.refresh_spin = $('#' + refresh_spin_id);
|
||||||
this.refresh_progress = $('#' + refresh_progress_id);
|
this.refresh_progress = $('#' + refresh_progress_id);
|
||||||
@ -212,6 +211,21 @@ var GraphApp = (function()
|
|||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// PUBLIC FUNCTIONS
|
// PUBLIC FUNCTIONS
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
App.prototype.initWidgets = function ()
|
||||||
|
{
|
||||||
|
var self = this;
|
||||||
|
this.refresh_button.button().click (function ()
|
||||||
|
{
|
||||||
|
self.refresh (self.filter.val().trim());
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// not a real button. button() for styling only
|
||||||
|
this.filter.button().bind ('keyup', function(e) {
|
||||||
|
if (e.keyCode == 13) self.triggerRefresh ();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
App.prototype.refresh = function (filter)
|
App.prototype.refresh = function (filter)
|
||||||
{
|
{
|
||||||
var url = this.url_base;
|
var url = this.url_base;
|
||||||
@ -224,21 +238,6 @@ var GraphApp = (function()
|
|||||||
this.ajax_req = $.ajax ({url: url, context: this, success: show_graph, error: handle_error });
|
this.ajax_req = $.ajax ({url: url, context: this, success: show_graph, error: handle_error });
|
||||||
};
|
};
|
||||||
|
|
||||||
App.prototype.initRefresh = function ()
|
|
||||||
{
|
|
||||||
if (!this.refresh_button_inited)
|
|
||||||
{
|
|
||||||
this.refresh_button_inited = true;
|
|
||||||
|
|
||||||
var self = this;
|
|
||||||
this.refresh_button.button().click (function ()
|
|
||||||
{
|
|
||||||
self.refresh (self.filter.val().trim());
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
App.prototype.triggerRefresh = function ()
|
App.prototype.triggerRefresh = function ()
|
||||||
{
|
{
|
||||||
this.refresh_button.trigger ('click');
|
this.refresh_button.trigger ('click');
|
||||||
@ -275,8 +274,8 @@ $(function ()
|
|||||||
'project_map_filter', 'project_map_title_band',
|
'project_map_filter', 'project_map_title_band',
|
||||||
'codepot_footer', 'project_map_alert');
|
'codepot_footer', 'project_map_alert');
|
||||||
|
|
||||||
|
graph_app.initWidgets ();
|
||||||
$(window).resize(function () { graph_app.resize(); });
|
$(window).resize(function () { graph_app.resize(); });
|
||||||
graph_app.initRefresh ();
|
|
||||||
graph_app.triggerRefresh ();
|
graph_app.triggerRefresh ();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -388,3 +388,10 @@
|
|||||||
#project_list_mainarea_result_my_issues {
|
#project_list_mainarea_result_my_issues {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------
|
||||||
|
* project map view
|
||||||
|
*-----------------------------------------------*/
|
||||||
|
#project_map_filter {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user