From 3f64eb25ab89964127681a52265207dbeb7e1e9b Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Thu, 26 Apr 2012 14:52:55 +0200 Subject: some fixes fore movable apps --- core/js/oc-dialogs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/js/oc-dialogs.js') diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index a3aa1e8c149..6a3dac02ea7 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -107,7 +107,7 @@ OCdialogs = { $(c_id + ' #dirtree').focus(function() { var t = $(this); t.data('oldval', t.val())}) .change({dcid: c_id}, OC.dialogs.handleTreeListSelect); $(c_id).ready(function(){ - $.getJSON(OC.webroot+'/files/ajax/rawlist.php', {mimetype: mimetype_filter} ,function(r){OC.dialogs.fillFilePicker(r, c_id, callback)}); + $.getJSON(OC.filePath('files', 'ajax', 'rawlist.php'), {mimetype: mimetype_filter} ,function(r){OC.dialogs.fillFilePicker(r, c_id, callback)}); }).data('multiselect', multiselect).data('mimetype',mimetype_filter); // build buttons var b = [ @@ -222,7 +222,7 @@ OCdialogs = { $(this).children().each(function(i, element) { if (skip_first) {skip_first = false; return; }path += '/'+$(element).text(); }); $(event.data.dcid).data('path', path); $(event.data.dcid + ' .filepicker_loader').css('visibility', 'visible'); - $.getJSON(OC.webroot+'/files/ajax/rawlist.php', {dir: path, mimetype: $(event.data.dcid).data('mimetype')}, function(r){OC.dialogs.fillFilePicker(r, event.data.dcid)}); + $.getJSON(OC.filePath('files', 'ajax', 'rawlist.php'), {dir: path, mimetype: $(event.data.dcid).data('mimetype')}, function(r){OC.dialogs.fillFilePicker(r, event.data.dcid)}); }, // this function is in early development state, please dont use it unlsess you know what you are doing handlePickerClick:function(element, name, dcid) { -- cgit v1.2.3 From 9c520c70a8df5057ab20db8282e8fb63520bde88 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Mon, 30 Apr 2012 01:48:01 +0200 Subject: Various file path fixes. --- apps/contacts/ajax/currentphoto.php | 2 +- apps/contacts/ajax/oc_photo.php | 8 ++++---- apps/contacts/js/contacts.js | 3 +++ apps/contacts/templates/part.contact.php | 2 +- apps/contacts/templates/part.importaddressbook.php | 2 +- apps/files/ajax/rawlist.php | 2 +- core/js/oc-dialogs.js | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) (limited to 'core/js/oc-dialogs.js') diff --git a/apps/contacts/ajax/currentphoto.php b/apps/contacts/ajax/currentphoto.php index 15cb6c7a083..171f5c34785 100644 --- a/apps/contacts/ajax/currentphoto.php +++ b/apps/contacts/ajax/currentphoto.php @@ -20,7 +20,7 @@ * */ // Init owncloud -require_once('../../../lib/base.php'); +//require_once('../../../lib/base.php'); // Check if we are a user // Firefox and Konqueror tries to download application/json for me. --Arthur diff --git a/apps/contacts/ajax/oc_photo.php b/apps/contacts/ajax/oc_photo.php index 14d77ea50b7..e46441c4821 100644 --- a/apps/contacts/ajax/oc_photo.php +++ b/apps/contacts/ajax/oc_photo.php @@ -20,7 +20,7 @@ * */ // Init owncloud -require_once('../../../lib/base.php'); +require_once('lib/base.php'); // Check if we are a user // Firefox and Konqueror tries to download application/json for me. --Arthur @@ -36,11 +36,11 @@ function debug($msg) { OC_Log::write('contacts','ajax/oc_photo.php: '.$msg, OC_Log::DEBUG); } -if (!isset($_GET['id'])) { +if(!isset($_GET['id'])) { bailOut(OC_Contacts_App::$l10n->t('No contact ID was submitted.')); } -if (!isset($_GET['path'])) { +if(!isset($_GET['path'])) { bailOut(OC_Contacts_App::$l10n->t('No photo path was submitted.')); } @@ -66,7 +66,7 @@ if(!$image->fixOrientation()) { // No fatal error so we don't bail out. debug('Couldn\'t save correct image orientation: '.$tmpfname); } if($image->save($tmpfname)) { - OC_JSON::success(array('data' => array('mime'=>$_SERVER['CONTENT_TYPE'], 'name'=>$fn, 'id'=>$id, 'tmp'=>$tmpfname))); + OC_JSON::success(array('data' => array('id'=>$_GET['id'], 'tmp'=>$tmpfname))); exit(); } else { bailOut('Couldn\'t save temporary image: '.$tmpfname); diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 7333b0e8d42..ba8e08fd875 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -1066,6 +1066,9 @@ Contacts={ }, loadPhotoHandlers:function(){ $('#phototools li a').tipsy(); + $('#phototools li a').click(function() { + $(this).tipsy('hide'); + }); $('#contacts_details_photo_wrapper').hover( function () { $('#phototools').slideDown(200); diff --git a/apps/contacts/templates/part.contact.php b/apps/contacts/templates/part.contact.php index a35d38e8867..bbe20143325 100644 --- a/apps/contacts/templates/part.contact.php +++ b/apps/contacts/templates/part.contact.php @@ -23,7 +23,7 @@ $id = isset($_['id']) ? $_['id'] : '';
-
+
diff --git a/apps/contacts/templates/part.importaddressbook.php b/apps/contacts/templates/part.importaddressbook.php index 3efb90cd220..2db23368866 100644 --- a/apps/contacts/templates/part.importaddressbook.php +++ b/apps/contacts/templates/part.importaddressbook.php @@ -22,7 +22,7 @@ - + "> diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php index 8f1990d1b8f..0b37b93674f 100644 --- a/apps/files/ajax/rawlist.php +++ b/apps/files/ajax/rawlist.php @@ -5,7 +5,7 @@ $RUNTIME_APPTYPES=array('filesystem'); // Init owncloud -require_once('../../lib/template.php'); +require_once('lib/template.php'); OC_JSON::checkLoggedIn(); diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 6a3dac02ea7..7e41c1a7a59 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -240,6 +240,6 @@ OCdialogs = { var newval = parseInt($(dcid + ' #dirtree option:last').val())+1; $(dcid + ' #dirtree').append(''); $(dcid + ' .filepicker_loader').css('visibility', 'visible'); - $.getJSON(OC.webroot+'/files/ajax/rawlist.php', {dir: p, mimetype: $(dcid).data('mimetype')}, function(r){OC.dialogs.fillFilePicker(r, dcid)}); + $.getJSON(OC.filePath('files', 'ajax', 'rawlist.php'), {dir: p, mimetype: $(dcid).data('mimetype')}, function(r){OC.dialogs.fillFilePicker(r, dcid)}); } }; -- cgit v1.2.3 From 5611e6c9d3d75a1f051dabe9f4dd0e0fa86a924d Mon Sep 17 00:00:00 2001 From: Bartek Przybylski Date: Thu, 3 May 2012 12:32:04 +0200 Subject: fix incorrect dialog computing in ff --- core/js/oc-dialogs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/js/oc-dialogs.js') diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 7e41c1a7a59..f6870e62710 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -131,7 +131,7 @@ OCdialogs = { }, {text: t('dialogs', 'Cancel'), click: function(){$(c_id).dialog('close'); }} ]; - $(c_id).dialog({width: 4*$(document).width()/9, height: 400, modal: modal, buttons: b}); + $(c_id).dialog({width: ((4*$('body').width())/9), height: 400, modal: modal, buttons: b}); OCdialogs.dialogs_counter++; }, // guts, dont use, dont touch -- cgit v1.2.3