Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Commit

Permalink
making burn-after-reading and discussion mutually exclusive options t…
Browse files Browse the repository at this point in the history
…o improve UI, resolves #11
  • Loading branch information
elrido committed Aug 11, 2016
1 parent 7dbca9f commit 5ec20c1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions js/privatebin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,23 @@ $(function() {
}
},

/**
* If discussion is checked, disable "burn after reading".
*/
changeOpenDisc: function()
{
if (this.openDiscussion.is(':checked') )
{
this.burnAfterReadingOption.addClass('buttondisabled');
this.burnAfterReading.attr({checked: false, disabled: true});
}
else
{
this.burnAfterReadingOption.removeClass('buttondisabled');
this.burnAfterReading.removeAttr('disabled');
}
},

/**
* Reload the page.
*
Expand Down Expand Up @@ -1419,6 +1436,7 @@ $(function() {
bindEvents: function()
{
this.burnAfterReading.change($.proxy(this.changeBurnAfterReading, this));
this.openDisc.change($.proxy(this.changeOpenDisc, this));
this.sendButton.click($.proxy(this.sendData, this));
this.cloneButton.click($.proxy(this.clonePaste, this));
this.rawTextButton.click($.proxy(this.rawText, this));
Expand Down

0 comments on commit 5ec20c1

Please sign in to comment.