Skip to content

Commit

Permalink
minimise distance to Diaspora Inc code
Browse files Browse the repository at this point in the history
- no changes to function
- code with the same purpose now is identical with the Diaspora Inc.
  code to make future merges easier
  • Loading branch information
Ricardo committed Mar 10, 2012
1 parent fbc25a0 commit 78ea813
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions public/javascripts/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,20 @@ var Publisher = {
Publisher.determineSubmitAvailability();
},

cachedForm : false,
form: function(){
if(!Publisher.cachedForm){
Publisher.cachedForm = $('#publisher');
}
return Publisher.cachedForm;
return Publisher.cachedForm = Publisher.cachedForm || $('#publisher');
},

cachedInput : false,
input: function(){
if(!Publisher.cachedInput){
Publisher.cachedInput = Publisher.form().find('#status_message_fake_text');
}
return Publisher.cachedInput;
return Publisher.cachedInput = Publisher.cachedInput || Publisher.form().find('#status_message_fake_text');
},

cachedHiddenInput : false,
hiddenInput: function(){
if(!Publisher.cachedHiddenInput){
Publisher.cachedHiddenInput = Publisher.form().find('#status_message_text');
}
return Publisher.cachedHiddenInput;
return Publisher.cachedHiddenInput= Publisher.cachedHiddenInput || Publisher.form().find('#status_message_text');
},

cachedSubmit : false,
submit: function(){
if(!Publisher.cachedSubmit){
Publisher.cachedSubmit = Publisher.form().find('#status_message_submit');
}
return Publisher.cachedSubmit;
return Publisher.cachedSubmit = Publisher.cachedSubmit || Publisher.form().find('#status_message_submit');
},

autocompletion: {
Expand Down Expand Up @@ -367,6 +351,7 @@ var Publisher = {
}
}
},

createCounter: function(service){
var counter = $("#publisher .counter");
counter.remove();
Expand Down Expand Up @@ -476,8 +461,6 @@ var Publisher = {
selection.popover(options);
selection.bind("click", function(){$(this).popover("hide")});



setTimeout(function(){
selection.popover("show");

Expand Down

0 comments on commit 78ea813

Please sign in to comment.