mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
refactor js and cucumber scenario for integrations page
This commit is contained in:
parent
d1b35090ab
commit
05b3b7cebc
5 changed files with 37 additions and 52 deletions
|
|
@ -90,6 +90,19 @@ var ContextListPage = {
|
|||
}
|
||||
}
|
||||
|
||||
var IntegrationsPage = {
|
||||
setup_behavior: function () {
|
||||
$('#applescript1-contexts').live('change', function(){
|
||||
$("#applescript1").load(relative_to_root('integrations/get_applescript1?context_id='+this.value));
|
||||
});
|
||||
$('#applescript2-contexts').live('change', function(){
|
||||
$("#applescript2").load(relative_to_root('integrations/get_applescript2?context_id='+this.value));
|
||||
});
|
||||
$('#quicksilver-contexts').live('change', function(){
|
||||
$("#quicksilver").load(relative_to_root('integrations/get_quicksilver_applescript?context_id='+this.value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.clearForm = function() {
|
||||
return this.each(function() {
|
||||
|
|
@ -726,42 +739,7 @@ $(document).ready(function() {
|
|||
$("#feeds-for-project").load('/feedlist/get_feeds_for_project?project_id='+this.value);
|
||||
});
|
||||
|
||||
/* Integrations page */
|
||||
/*
|
||||
<%= observe_field "applescript1-contexts", :update => "applescript1",
|
||||
:with => 'context_id',
|
||||
:url => { :controller => "integrations", :action => "get_applescript1" },
|
||||
:before => "$('applescript1').startWaiting()",
|
||||
:complete => "$('applescript1').stopWaiting()"
|
||||
%>
|
||||
*/
|
||||
$('#applescript1-contexts').live('change', function(){
|
||||
$("#applescript1").load(relative_to_root('integrations/get_applescript1?context_id='+this.value));
|
||||
});
|
||||
|
||||
/*
|
||||
<%= observe_field "applescript2-contexts", :update => "applescript2",
|
||||
:with => 'context_id',
|
||||
:url => { :controller => "integrations", :action => "get_applescript2" },
|
||||
:before => "$('applescript2').startWaiting()",
|
||||
:complete => "$('applescript2').stopWaiting()"
|
||||
%>
|
||||
*/
|
||||
$('#applescript2-contexts').live('change', function(){
|
||||
$("#applescript2").load(relative_to_root('integrations/get_applescript2?context_id='+this.value));
|
||||
});
|
||||
|
||||
/*
|
||||
<%= observe_field "quicksilver-contexts", :update => "quicksilver",
|
||||
:with => 'context_id',
|
||||
:url => { :controller => "integrations", :action => "get_quicksilver_applescript" },
|
||||
:before => "$('quicksilver').startWaiting()",
|
||||
:complete => "$('quicksilver').stopWaiting()"
|
||||
%>
|
||||
*/
|
||||
$('#quicksilver-contexts').live('change', function(){
|
||||
$("#quicksilver").load(relative_to_root('integrations/get_quicksilver_applescript?context_id='+this.value));
|
||||
});
|
||||
IntegrationsPage.setup_behavior();
|
||||
|
||||
/* Gets called from some AJAX callbacks, too */
|
||||
enable_rich_interaction();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue