mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-11-29 11:24:11 +01:00
Contacts: One more inline js var down - one more to go ;)
This commit is contained in:
parent
a94d8b2906
commit
5475d3f16e
10
js/app.js
10
js/app.js
@ -74,6 +74,14 @@ utils.moveCursorToEnd = function(el) {
|
||||
}
|
||||
};
|
||||
|
||||
utils.linkToRemote = function(service) {
|
||||
return window.location.protocol + '//' + window.location.host + utils.linkToRemoteBase(service);
|
||||
};
|
||||
|
||||
utils.linkToRemoteBase = function(service) {
|
||||
return OC.webroot + '/remote.php/' + service;
|
||||
};
|
||||
|
||||
if (typeof Object.create !== 'function') {
|
||||
Object.create = function (o) {
|
||||
function F() {}
|
||||
@ -811,7 +819,7 @@ OC.Contacts = OC.Contacts || {
|
||||
var id = parseInt($(this).parents('li').first().data('id'));
|
||||
var book = self.contacts.addressbooks[id];
|
||||
var uri = (book.owner === oc_current_user ) ? book.uri : book.uri + '_shared_by_' + book.owner;
|
||||
var link = totalurl+'/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(uri);
|
||||
var link = utils.linkToRemote('carddav')+'/addressbooks/'+encodeURIComponent(oc_current_user)+'/'+encodeURIComponent(uri);
|
||||
var $dropdown = $('<div id="dropdown" class="drop"><input type="text" value="' + link + '" /></div>');
|
||||
$dropdown.appendTo($(this).parents('li').first());
|
||||
var $input = $dropdown.find('input');
|
||||
|
@ -1,6 +1,5 @@
|
||||
<div id='notification'></div>
|
||||
<script type='text/javascript'>
|
||||
var totalurl = '<?php echo OCP\Util::linkToRemote('carddav'); ?>addressbooks';
|
||||
var lang = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(), 'core', 'lang', 'en'); ?>';
|
||||
</script>
|
||||
<form class="float" id="file_upload_form" action="<?php echo OCP\Util::linkTo('contacts', 'ajax/uploadphoto.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target">
|
||||
|
Loading…
Reference in New Issue
Block a user