almost done
This commit is contained in:
parent
e169879311
commit
51332931ee
4 changed files with 19 additions and 18 deletions
|
|
@ -1,19 +1,15 @@
|
||||||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
|
||||||
= javascript_include_tag "publisher.js"
|
= javascript_include_tag "publisher.js"
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
$(document).ready(function()
|
Mentions.options.prefillMention = #{@person.to_json};
|
||||||
{
|
|
||||||
var person = {name: '#{@person.name}', handle: '#{@person.diaspora_handle}' };
|
$(function() {
|
||||||
Publisher.autocompletion.onSelect($("#status_message_fake_text"),person,'#{@person.name}');
|
$("#publisher").bind('ajax:success', function(){ location.reload(); });
|
||||||
$("#publisher #status_message_fake_text").val(function(index, value){ return value + " " });
|
Publisher.bookmarklet = true;
|
||||||
$("#publisher").bind('ajax:success', function(){location.reload();});
|
});
|
||||||
Publisher.bookmarklet = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
#new_status_message_pane
|
#new_status_message_pane
|
||||||
.span-15.last
|
.span-15.last
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,10 @@ javascripts:
|
||||||
- public/javascripts/aspect-edit-pane.js
|
- public/javascripts/aspect-edit-pane.js
|
||||||
- public/javascripts/fileuploader-custom.js
|
- public/javascripts/fileuploader-custom.js
|
||||||
people:
|
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/vendor/jquery.autoSuggest.custom.js
|
||||||
- public/javascripts/aspect-edit-pane.js
|
- public/javascripts/aspect-edit-pane.js
|
||||||
photos:
|
photos:
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
var Mentions = {
|
var Mentions = {
|
||||||
initialize: function(mentionsInput) {
|
initialize: function(mentionsInput) {
|
||||||
Mentions.fetchContacts(function(data) {
|
mentionsInput.mentionsInput(Mentions.options);
|
||||||
Mentions.contacts = data;
|
|
||||||
mentionsInput.mentionsInput(Mentions.options);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
fetchContacts: function(callback) {
|
$.getJSON($(".selected_contacts_link").attr("href"), function(data) {
|
||||||
$.getJSON($(".selected_contacts_link").attr("href"), callback);
|
Mentions.contacts = data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
|
|
|
||||||
6
public/javascripts/vendor/jquery.mentionsInput.js
generated
vendored
6
public/javascripts/vendor/jquery.mentionsInput.js
generated
vendored
|
|
@ -64,7 +64,7 @@
|
||||||
var elmInputBox, elmInputWrapper, elmAutocompleteList, elmWrapperBox, elmMentionsOverlay, elmActiveAutoCompleteItem;
|
var elmInputBox, elmInputWrapper, elmAutocompleteList, elmWrapperBox, elmMentionsOverlay, elmActiveAutoCompleteItem;
|
||||||
var mentionsCollection = [];
|
var mentionsCollection = [];
|
||||||
var inputBuffer = [];
|
var inputBuffer = [];
|
||||||
var currentDataQuery;
|
var currentDataQuery = '';
|
||||||
|
|
||||||
function initTextarea() {
|
function initTextarea() {
|
||||||
elmInputBox = $(input);
|
elmInputBox = $(input);
|
||||||
|
|
@ -329,6 +329,10 @@
|
||||||
initTextarea();
|
initTextarea();
|
||||||
initAutocomplete();
|
initAutocomplete();
|
||||||
initMentionsOverlay();
|
initMentionsOverlay();
|
||||||
|
|
||||||
|
if(options.prefillMention) {
|
||||||
|
addMention(options.prefillMention);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
val : function (callback) {
|
val : function (callback) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue