lib/apijs_attachment.rb in redmine_apijs-6.3.0 vs lib/apijs_attachment.rb in redmine_apijs-6.4.0
- old
+ new
@@ -1,8 +1,8 @@
# encoding: utf-8
# Created V/27/12/2013
-# Updated D/26/07/2020
+# Updated J/20/08/2020
#
# Copyright 2008-2020 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
# https://www.luigifab.fr/redmine/apijs
#
# This program is free software, you can redistribute it or modify
@@ -78,14 +78,18 @@
def getDownloadButton
return "self.location.href = '" + self.getUrl('download', true) + "';"
end
def getEditButton(token)
- return "apijsRedmine.editAttachment(" + self.id.to_s + ", '" + self.getUrl('editdesc') + "', '" + token + "');"
+ return "apijsRedmine.editAttachment(this, " + self.id.to_s + ", '" + self.getUrl('editdesc') + "', '" + token + "');"
end
+ def getRenameButton(token)
+ return "apijsRedmine.renameAttachment(this, " + self.id.to_s + ", '" + self.getUrl('editname') + "', '" + token + "');"
+ end
+
def getDeleteButton(token)
- return "apijsRedmine.removeAttachment(" + self.id.to_s + ", '" + self.getUrl('delete') + "', '" + token + "');"
+ return "apijsRedmine.removeAttachment(this, " + self.id.to_s + ", '" + self.getUrl('delete') + "', '" + token + "');"
end
def getShowButton(setting_show_filename, setting_show_exifdate, description)
if self.isImage?
return "apijs.dialog.dialogPhoto('" + self.getShowUrl + "', '" + ((setting_show_filename) ? self.filename : 'false') + "', '" + ((setting_show_exifdate) ? format_time(self.created_on) : 'false') + "', '" + description + "');"
\ No newline at end of file