-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
418 changed files
with
24,728 additions
and
3,685 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ branches: | |
only: | ||
- master | ||
- develop | ||
- alaveteli-pro-develop | ||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 @@ | ||
// ... | ||
//= require alaveteli_pro/selectize | ||
//= require alaveteli_pro/authority_select |
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,43 @@ | ||
(function($){ | ||
$(function(){ | ||
var $select = $('.js-authority-select'); | ||
var $message = $('.js-outgoing-message-body'); | ||
var defaultAuthorityName = $message.data('salutation-body-name'); | ||
var currentAuthorityName = defaultAuthorityName; | ||
var salutationTemplate = $message.data('salutation-template'); | ||
|
||
var updateSalutation = function updateSalutation(value) { | ||
var oldAuthorityName = currentAuthorityName; | ||
var oldSalutation = salutationTemplate.replace(defaultAuthorityName, oldAuthorityName); | ||
var oldMessage = $message.val(); | ||
|
||
var newAuthorityName = $select.find('option:selected').text(); | ||
var newSalutation = salutationTemplate.replace(defaultAuthorityName, newAuthorityName); | ||
var newMessage = oldMessage.replace(oldSalutation, newSalutation); | ||
|
||
$message.val(newMessage); | ||
currentAuthorityName = newAuthorityName; | ||
}; | ||
|
||
$select.selectize({ | ||
valueField: 'id', | ||
labelField: 'name', | ||
searchField: 'name', | ||
options: [], | ||
create: false, | ||
maxItems: 1, | ||
render: { | ||
option: function(body, escape) { | ||
// No need to use escape because data is trusted (from our DB) | ||
var html = '<div class="recipient-result">'; | ||
html += '<h4 class="name">' + body.name + '</h4>'; | ||
html += '<p class="description">' + body.notes + '</p>'; | ||
html += '<p class="requests">' + body.info_requests_visible_count + ' requests made</p>'; | ||
html += '</div>'; | ||
return html; | ||
} | ||
}, | ||
onChange: updateSalutation | ||
}); | ||
}); | ||
})(window.jQuery); |
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,8 @@ | ||
$(function() { | ||
$('#request_filter_order').change(function() { | ||
this.form.submit(); | ||
}); | ||
$('#request_filter_filter').change(function() { | ||
this.form.submit(); | ||
}); | ||
}); |
Oops, something went wrong.