Skip to content
Extraits de code Groupes Projets
Valider 51332931 rédigé par Dan Hansen's avatar Dan Hansen Validation de Dennis Collinson
Parcourir les fichiers

almost done

parent e1698793
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= javascript_include_tag "publisher.js"
:javascript
$(document).ready(function()
{
var person = {name: '#{@person.name}', handle: '#{@person.diaspora_handle}' };
Publisher.autocompletion.onSelect($("#status_message_fake_text"),person,'#{@person.name}');
$("#publisher #status_message_fake_text").val(function(index, value){ return value + " " });
$("#publisher").bind('ajax:success', function(){location.reload();});
Publisher.bookmarklet = true;
});
Mentions.options.prefillMention = #{@person.to_json};
$(function() {
$("#publisher").bind('ajax:success', function(){ location.reload(); });
Publisher.bookmarklet = true;
});
#new_status_message_pane
.span-15.last
......
......@@ -76,6 +76,10 @@ javascripts:
- public/javascripts/aspect-edit-pane.js
- public/javascripts/fileuploader-custom.js
people:
- public/javascripts/aspect-edit-pane.js
- public/javascripts/fileuploader-custom.js
people:
- public/javascripts/vendor/jquery.autoSuggest.custom.js
- public/javascripts/vendor/jquery.autoSuggest.custom.js
- public/javascripts/aspect-edit-pane.js
photos:
......
var Mentions = {
initialize: function(mentionsInput) {
Mentions.fetchContacts(function(data) {
mentionsInput.mentionsInput(Mentions.options);
$.getJSON($(".selected_contacts_link").attr("href"), function(data) {
Mentions.contacts = data;
mentionsInput.mentionsInput(Mentions.options);
});
},
fetchContacts: function(callback) {
$.getJSON($(".selected_contacts_link").attr("href"), callback);
},
options: {
elastic: false,
......
......@@ -64,7 +64,7 @@
var elmInputBox, elmInputWrapper, elmAutocompleteList, elmWrapperBox, elmMentionsOverlay, elmActiveAutoCompleteItem;
var mentionsCollection = [];
var inputBuffer = [];
var currentDataQuery;
var currentDataQuery = '';
function initTextarea() {
elmInputBox = $(input);
......@@ -329,6 +329,10 @@
initTextarea();
initAutocomplete();
initMentionsOverlay();
if(options.prefillMention) {
addMention(options.prefillMention);
}
},
val : function (callback) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter