forked from pact-foundation/pact_broker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
173 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module PactBroker | ||
|
||
class Error < StandardError; end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
function handleRadioButtonClicked() { | ||
selectApplicableTextBox($(this)); | ||
} | ||
|
||
function selectApplicableTextBox(selectedRadioButton) { | ||
selectedRadioButton.closest('.input-group').find('input[type="text"]').first().focus(); | ||
} | ||
|
||
function handleTextBoxClicked() { | ||
selectApplicableRadioButton($(this)); | ||
clearOtherTextBoxes($(this)); | ||
} | ||
|
||
function selectApplicableRadioButton(selectedTextBox) { | ||
selectedTextBox.closest('.input-group').find('.version-selectorizor').prop('checked', 'checked'); | ||
} | ||
|
||
function clearOtherTextBoxes(selectedTextBox) { | ||
selectedTextBox.closest('.selector').find('input[type="text"]').each(function(){ | ||
if(!selectedTextBox.is($(this))) { | ||
$(this).prop('value', ''); | ||
} | ||
}); | ||
} | ||
|
||
function onSubmit() { | ||
disableFieldsThatShouldNotBeSubmitted(); | ||
return true; | ||
} | ||
|
||
function disableFieldsThatShouldNotBeSubmitted() { | ||
disableInputsForUncheckedRadioButtons(); | ||
disableRadioButtons(); | ||
} | ||
|
||
function disableInputsForUncheckedRadioButtons() { | ||
$('.version-selectorizor').each(function(){ | ||
if($(this).prop('checked') === false) { | ||
$(this).closest('.input-group').find('input').prop('disabled', 'disabled'); | ||
} | ||
}); | ||
} | ||
|
||
function disableRadioButtons() { | ||
$('.version-selectorizor').prop('disabled', 'disabled'); | ||
} | ||
|
||
$(document).ready(function(){ | ||
$('.by-version').click(handleTextBoxClicked); | ||
$('.by-latest-tag').click(handleTextBoxClicked); | ||
$('.version-selectorizor').click(handleRadioButtonClicked); | ||
|
||
$("#matrix").tablesorter({ | ||
textExtraction : function(node, table, cellIndex){ | ||
n = $(node); | ||
return n.attr('data-sort-value') || n.text(); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.input-group { | ||
display: inline-block; | ||
padding-left: 20px | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters