Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into pr-max-file-size-re…
…size
- Loading branch information
Showing
137 changed files
with
5,482 additions
and
1,199 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
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,36 @@ | ||
function Gws_Memo_ExportAndBackup($el) { | ||
this.$el = $el; | ||
|
||
this.render(); | ||
} | ||
|
||
Gws_Memo_ExportAndBackup.prototype.render = function() { | ||
this.$el.find('a.ajax-box').data('on-select', function($item) { | ||
var $data = $item.closest('[data-id]'); | ||
var id = $data.attr('data-id'); | ||
var attachments = $data.data('attachments'); | ||
var from = $data.data('from'); | ||
var name = $data.data('name'); | ||
var priority = $data.data('priority'); | ||
var send_date = $data.data('send_date'); | ||
var size = $data.data('display_size'); | ||
|
||
var $newTr = $('<tr />').attr('data-id', id); | ||
var $newInput = SS_SearchUI.anchorAjaxBox.closest('dl').find('.hidden-ids').clone(false); | ||
$newInput = $newInput.val(id).removeClass('hidden-ids'); | ||
var $newA = $('<a>').attr('class','deselect btn').attr('href','#').text('<%= I18n.t "ss.buttons.delete" %>').on('click', SS_SearchUI.deselect); | ||
|
||
var icon = $('<i class="material-icons md-15"></i>'); | ||
if (!attachments) { | ||
icon.css('visibility','hidden'); | ||
} | ||
$newTr.append($('<td />').text(from).prepend(icon)); | ||
$newTr.append($('<td />').append($newInput).append(name)); | ||
$newTr.append($('<td />').text(priority)); | ||
$newTr.append($('<td />').text(send_date)); | ||
$newTr.append($('<td />').text(size)); | ||
$newTr.append($('<td />').append($newA)); | ||
SS_SearchUI.anchorAjaxBox.closest('dl').find('.ajax-selected tbody').prepend($newTr); | ||
SS_SearchUI.anchorAjaxBox.closest('dl').find('.ajax-selected').trigger('change'); | ||
}); | ||
}; |
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
30 changes: 30 additions & 0 deletions
30
app/controllers/concerns/gws/memo/export_and_backup_filter.rb
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,30 @@ | ||
module Gws::Memo::ExportAndBackupFilter | ||
extend ActiveSupport::Concern | ||
include Gws::BaseFilter | ||
include Gws::CrudFilter | ||
|
||
included do | ||
model Gws::Memo::Message | ||
|
||
navi_view "gws/memo/messages/navi" | ||
menu_view nil | ||
|
||
before_action :deny_with_auth | ||
end | ||
|
||
private | ||
|
||
def deny_with_auth | ||
raise "403" unless @model.allowed?(:edit, @cur_user, site: @cur_site) | ||
end | ||
|
||
def fix_params | ||
{ cur_user: @cur_user, cur_site: @cur_site } | ||
end | ||
|
||
public | ||
|
||
def index | ||
@item = @model.new | ||
end | ||
end |
Oops, something went wrong.