BigW Consortium Gitlab

Commit c78393ec by Dmitriy Zaporozhets

Remove $.ready events

parent 8c918e58
......@@ -27,13 +27,11 @@
:javascript
$(function() {
var availableTags = #{@project.repository.ref_names.to_json};
var availableTags = #{@project.repository.ref_names.to_json};
$("#from, #to").autocomplete({
source: availableTags,
minLength: 1
});
disableButtonIfEmptyField('#to', '.commits-compare-btn');
$("#from, #to").autocomplete({
source: availableTags,
minLength: 1
});
disableButtonIfEmptyField('#to', '.commits-compare-btn');
:javascript
$(function() {
GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_project_path(@project)}"
GitLab.GfmAutoComplete.Emoji.assetBase = '#{image_path("emoji")}'
GitLab.GfmAutoComplete.setup();
});
GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_project_path(@project)}"
GitLab.GfmAutoComplete.Emoji.assetBase = '#{image_path("emoji")}'
GitLab.GfmAutoComplete.setup();
......@@ -62,20 +62,18 @@
Cancel
:javascript
$(function(){
disableButtonIfEmptyField("#merge_request_title", ".btn-save");
disableButtonIfEmptyField("#merge_request_title", ".btn-save");
var source_branch = $("#merge_request_source_branch")
, target_branch = $("#merge_request_target_branch");
var source_branch = $("#merge_request_source_branch")
, target_branch = $("#merge_request_target_branch");
$.get("#{branch_from_project_merge_requests_path(@project)}", {ref: source_branch.val() });
$.get("#{branch_to_project_merge_requests_path(@project)}", {ref: target_branch.val() });
$.get("#{branch_from_project_merge_requests_path(@project)}", {ref: source_branch.val() });
$.get("#{branch_to_project_merge_requests_path(@project)}", {ref: target_branch.val() });
source_branch.live("change", function() {
$.get("#{branch_from_project_merge_requests_path(@project)}", {ref: $(this).val() });
});
source_branch.live("change", function() {
$.get("#{branch_from_project_merge_requests_path(@project)}", {ref: $(this).val() });
});
target_branch.live("change", function() {
$.get("#{branch_to_project_merge_requests_path(@project)}", {ref: $(this).val() });
});
target_branch.live("change", function() {
$.get("#{branch_to_project_merge_requests_path(@project)}", {ref: $(this).val() });
});
......@@ -40,10 +40,8 @@
:javascript
$(function() {
disableButtonIfEmptyField("#milestone_title", ".btn-save");
$( ".datepicker" ).datepicker({
dateFormat: "yy-mm-dd",
onSelect: function(dateText, inst) { $("#milestone_due_date").val(dateText) }
}).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $('#milestone_due_date').val()));
});
disableButtonIfEmptyField("#milestone_title", ".btn-save");
$( ".datepicker" ).datepicker({
dateFormat: "yy-mm-dd",
onSelect: function(dateText, inst) { $("#milestone_due_date").val(dateText) }
}).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $('#milestone_due_date').val()));
......@@ -49,7 +49,5 @@
= paginate @blobs, theme: 'gitlab'
:javascript
$(function() {
$(".search_results .term").highlight("#{escape_javascript(params[:search])}");
})
$(".search_results .term").highlight("#{escape_javascript(params[:search])}");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment